From 15b24c3de61f15ca607316a7c908edbf6239a9d5 Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Sat, 16 May 2026 09:24:35 +0100 Subject: [PATCH 01/24] feat(responses): Add next-step verbosity controls Add next-step instructions to runtime responses while keeping the structured output envelope intact. The runtime now decides between minimal and normal response detail without directly owning CLI verbosity policy. Expose CLI control so regular CLI output can default to normal detail while agent-oriented CLI usage can request minimal output matching MCP. Co-Authored-By: OpenAI Codex --- manifests/tools/boot_sim.yaml | 2 +- manifests/tools/build_device.yaml | 2 +- manifests/tools/build_macos.yaml | 2 +- manifests/tools/build_run_device.yaml | 2 +- manifests/tools/build_run_macos.yaml | 2 +- manifests/tools/build_run_sim.yaml | 2 +- manifests/tools/build_sim.yaml | 2 +- manifests/tools/button.yaml | 2 +- manifests/tools/clean.yaml | 2 +- manifests/tools/debug_attach_sim.yaml | 2 +- manifests/tools/debug_breakpoint_add.yaml | 2 +- manifests/tools/debug_breakpoint_remove.yaml | 2 +- manifests/tools/debug_continue.yaml | 2 +- manifests/tools/debug_detach.yaml | 2 +- manifests/tools/debug_lldb_command.yaml | 2 +- manifests/tools/debug_stack.yaml | 2 +- manifests/tools/debug_variables.yaml | 2 +- manifests/tools/discover_projs.yaml | 2 +- manifests/tools/doctor.yaml | 2 +- manifests/tools/erase_sims.yaml | 2 +- manifests/tools/gesture.yaml | 2 +- manifests/tools/get_app_bundle_id.yaml | 2 +- manifests/tools/get_coverage_report.yaml | 2 +- manifests/tools/get_device_app_path.yaml | 2 +- manifests/tools/get_file_coverage.yaml | 2 +- manifests/tools/get_mac_app_path.yaml | 2 +- manifests/tools/get_mac_bundle_id.yaml | 2 +- manifests/tools/get_sim_app_path.yaml | 2 +- manifests/tools/install_app_device.yaml | 2 +- manifests/tools/install_app_sim.yaml | 2 +- manifests/tools/key_press.yaml | 2 +- manifests/tools/key_sequence.yaml | 2 +- manifests/tools/launch_app_device.yaml | 2 +- manifests/tools/launch_app_sim.yaml | 2 +- manifests/tools/launch_mac_app.yaml | 2 +- manifests/tools/list_devices.yaml | 2 +- manifests/tools/list_schemes.yaml | 2 +- manifests/tools/list_sims.yaml | 2 +- manifests/tools/long_press.yaml | 2 +- manifests/tools/manage_workflows.yaml | 2 +- manifests/tools/open_sim.yaml | 2 +- manifests/tools/record_sim_video.yaml | 2 +- manifests/tools/reset_sim_location.yaml | 2 +- manifests/tools/scaffold_ios_project.yaml | 2 +- manifests/tools/scaffold_macos_project.yaml | 2 +- manifests/tools/screenshot.yaml | 2 +- manifests/tools/session_clear_defaults.yaml | 2 +- manifests/tools/session_set_defaults.yaml | 2 +- manifests/tools/session_show_defaults.yaml | 2 +- .../tools/session_use_defaults_profile.yaml | 2 +- manifests/tools/set_sim_appearance.yaml | 2 +- manifests/tools/set_sim_location.yaml | 2 +- manifests/tools/show_build_settings.yaml | 2 +- manifests/tools/sim_statusbar.yaml | 2 +- manifests/tools/snapshot_ui.yaml | 2 +- manifests/tools/stop_app_device.yaml | 2 +- manifests/tools/stop_app_sim.yaml | 2 +- manifests/tools/stop_mac_app.yaml | 2 +- manifests/tools/swift_package_build.yaml | 2 +- manifests/tools/swift_package_clean.yaml | 2 +- manifests/tools/swift_package_list.yaml | 2 +- manifests/tools/swift_package_run.yaml | 2 +- manifests/tools/swift_package_stop.yaml | 2 +- manifests/tools/swift_package_test.yaml | 2 +- manifests/tools/swipe.yaml | 2 +- manifests/tools/sync_xcode_defaults.yaml | 2 +- manifests/tools/tap.yaml | 2 +- manifests/tools/test_device.yaml | 2 +- manifests/tools/test_macos.yaml | 2 +- manifests/tools/test_sim.yaml | 2 +- .../toggle_connect_hardware_keyboard.yaml | 2 +- manifests/tools/toggle_software_keyboard.yaml | 2 +- manifests/tools/touch.yaml | 2 +- manifests/tools/type_text.yaml | 2 +- manifests/tools/xcode_ide_call_tool.yaml | 2 +- manifests/tools/xcode_ide_list_tools.yaml | 2 +- .../tools/xcode_tools_bridge_disconnect.yaml | 2 +- .../tools/xcode_tools_bridge_status.yaml | 2 +- manifests/tools/xcode_tools_bridge_sync.yaml | 2 +- .../_defs/common.schema.json | 8 + .../2.schema.json | 108 +++++ .../2.schema.json | 121 ++++++ .../2.schema.json | 143 +++++++ .../2.schema.json | 73 ++++ .../2.schema.json | 65 +++ .../2.schema.json | 229 +++++++++++ .../2.schema.json | 232 +++++++++++ .../2.schema.json | 177 +++++++++ .../2.schema.json | 60 +++ .../2.schema.json | 97 +++++ .../2.schema.json | 115 ++++++ .../2.schema.json | 141 +++++++ .../2.schema.json | 85 ++++ .../2.schema.json | 90 +++++ .../xcodebuildmcp.output.error/1.schema.json | 19 +- .../2.schema.json | 73 ++++ .../2.schema.json | 85 ++++ .../2.schema.json | 97 +++++ .../2.schema.json | 109 +++++ .../2.schema.json | 92 +++++ .../2.schema.json | 85 ++++ .../2.schema.json | 68 ++++ .../2.schema.json | 57 +++ .../2.schema.json | 205 ++++++++++ .../2.schema.json | 78 ++++ .../2.schema.json | 79 ++++ .../2.schema.json | 168 ++++++++ .../2.schema.json | 244 ++++++++++++ .../2.schema.json | 67 ++++ .../1.schema.json | 58 ++- .../2.schema.json | 65 ++- .../3.schema.json | 90 +++++ .../1.schema.json | 37 +- .../2.schema.json | 58 +++ .../1.schema.json | 59 ++- .../2.schema.json | 79 ++++ .../1.schema.json | 94 ++++- .../2.schema.json | 48 ++- .../3.schema.json | 68 ++++ src/cli.ts | 2 +- .../__tests__/register-tool-commands.test.ts | 212 ++++++++++ src/cli/register-tool-commands.ts | 19 +- src/cli/yargs-app.ts | 2 +- .../structured-output-schema.test.ts | 239 ++++++++++- src/mcp/tools/coverage/get_coverage_report.ts | 2 +- src/mcp/tools/coverage/get_file_coverage.ts | 2 +- src/mcp/tools/debugging/debug_attach_sim.ts | 2 +- .../tools/debugging/debug_breakpoint_add.ts | 2 +- .../debugging/debug_breakpoint_remove.ts | 2 +- src/mcp/tools/debugging/debug_continue.ts | 2 +- src/mcp/tools/debugging/debug_detach.ts | 2 +- src/mcp/tools/debugging/debug_lldb_command.ts | 2 +- src/mcp/tools/debugging/debug_stack.ts | 2 +- src/mcp/tools/debugging/debug_variables.ts | 2 +- src/mcp/tools/device/list_devices.ts | 2 +- src/mcp/tools/doctor/doctor.ts | 2 +- .../tools/project-discovery/discover_projs.ts | 2 +- .../tools/project-discovery/list_schemes.ts | 2 +- .../project-discovery/show_build_settings.ts | 2 +- .../project-scaffolding/domain-result.ts | 2 +- .../session_clear_defaults.ts | 2 +- .../session_set_defaults.ts | 2 +- .../session_show_defaults.ts | 2 +- .../session_use_defaults_profile.ts | 2 +- .../tools/simulator-management/erase_sims.ts | 2 +- .../reset_sim_location.ts | 2 +- .../set_sim_appearance.ts | 2 +- .../simulator-management/set_sim_location.ts | 2 +- .../simulator-management/sim_statusbar.ts | 2 +- .../toggle_connect_hardware_keyboard.ts | 2 +- .../toggle_software_keyboard.ts | 2 +- .../simulator/__tests__/list_sims.test.ts | 4 +- src/mcp/tools/simulator/boot_sim.ts | 2 +- src/mcp/tools/simulator/list_sims.ts | 2 +- src/mcp/tools/simulator/open_sim.ts | 2 +- src/mcp/tools/simulator/record_sim_video.ts | 2 +- .../swift-package/swift_package_build.ts | 2 +- .../swift-package/swift_package_clean.ts | 2 +- .../tools/swift-package/swift_package_list.ts | 2 +- .../tools/swift-package/swift_package_run.ts | 2 +- .../tools/swift-package/swift_package_stop.ts | 2 +- .../tools/swift-package/swift_package_test.ts | 2 +- .../ui-automation/shared/domain-result.ts | 4 +- src/mcp/tools/utilities/clean.ts | 2 +- .../workflow-discovery/manage_workflows.ts | 2 +- src/mcp/tools/xcode-ide/shared.ts | 2 +- .../tools/xcode-ide/sync_xcode_defaults.ts | 2 +- .../tools/xcode-ide/xcode_ide_call_tool.ts | 2 +- .../tools/xcode-ide/xcode_ide_list_tools.ts | 2 +- .../__tests__/text-render-parity.test.ts | 37 +- src/rendering/render.ts | 26 +- src/runtime/__tests__/tool-invoker.test.ts | 2 +- src/types/common.ts | 6 +- src/types/structured-output.ts | 1 + .../structured-output-envelope.test.ts | 317 +++++++++++++++ src/utils/app-lifecycle-results.ts | 6 +- src/utils/app-query-results.ts | 4 +- src/utils/file-path-render-style.ts | 20 +- .../__tests__/next-steps-renderer.test.ts | 54 ++- src/utils/responses/next-step-formatting.ts | 100 +++++ src/utils/responses/next-steps-renderer.ts | 108 +---- src/utils/structured-output-envelope.ts | 63 ++- src/utils/tool-registry.ts | 376 +++++++++++------- src/utils/typed-tool-factory.ts | 14 +- src/utils/xcodebuild-domain-results.ts | 2 +- 185 files changed, 5289 insertions(+), 499 deletions(-) create mode 100644 schemas/structured-output/xcodebuildmcp.output.app-path/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.build-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.build-run-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.build-settings/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.bundle-id/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.capture-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.coverage-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.debug-breakpoint-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.debug-command-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.debug-session-action/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.debug-stack-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.debug-variables-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.device-list/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.doctor-report/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.install-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.launch-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.process-list/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.project-list/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.scaffold-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.scheme-list/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.session-defaults/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.session-profile/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.simulator-action-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.simulator-list/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.stop-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.test-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.ui-action-result/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.workflow-selection/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/3.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.xcode-bridge-status/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.xcode-bridge-sync/2.schema.json create mode 100644 schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/3.schema.json create mode 100644 src/utils/responses/next-step-formatting.ts diff --git a/manifests/tools/boot_sim.yaml b/manifests/tools/boot_sim.yaml index dfc60e23b..4acd0048c 100644 --- a/manifests/tools/boot_sim.yaml +++ b/manifests/tools/boot_sim.yaml @@ -6,7 +6,7 @@ names: description: Boot iOS simulator for manual/non-build flows. Not required before simulator build-and-run (build_run_sim). outputSchema: schema: xcodebuildmcp.output.simulator-action-result - version: "1" + version: "2" annotations: title: Boot Simulator readOnlyHint: false diff --git a/manifests/tools/build_device.yaml b/manifests/tools/build_device.yaml index 8323c181f..8f1c716a3 100644 --- a/manifests/tools/build_device.yaml +++ b/manifests/tools/build_device.yaml @@ -6,7 +6,7 @@ names: description: Build for device. outputSchema: schema: xcodebuildmcp.output.build-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/build_macos.yaml b/manifests/tools/build_macos.yaml index d614f7e02..51c4f4f24 100644 --- a/manifests/tools/build_macos.yaml +++ b/manifests/tools/build_macos.yaml @@ -6,7 +6,7 @@ names: description: Build macOS app. outputSchema: schema: xcodebuildmcp.output.build-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/build_run_device.yaml b/manifests/tools/build_run_device.yaml index 8d921610d..e74848c37 100644 --- a/manifests/tools/build_run_device.yaml +++ b/manifests/tools/build_run_device.yaml @@ -6,7 +6,7 @@ names: description: Build, install, and launch on physical device. Preferred single-step run tool when defaults are set. outputSchema: schema: xcodebuildmcp.output.build-run-result - version: '1' + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/build_run_macos.yaml b/manifests/tools/build_run_macos.yaml index ea2c48d66..14028552c 100644 --- a/manifests/tools/build_run_macos.yaml +++ b/manifests/tools/build_run_macos.yaml @@ -6,7 +6,7 @@ names: description: Build and run macOS app. outputSchema: schema: xcodebuildmcp.output.build-run-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/build_run_sim.yaml b/manifests/tools/build_run_sim.yaml index 95e9156cd..c4c2e0a39 100644 --- a/manifests/tools/build_run_sim.yaml +++ b/manifests/tools/build_run_sim.yaml @@ -6,7 +6,7 @@ names: description: Build, install, and launch on iOS Simulator; boots simulator and attempts to open Simulator.app as needed. Runtime logs are captured automatically and the log file path is included in the response. Preferred single-step run tool when defaults are set. outputSchema: schema: xcodebuildmcp.output.build-run-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/build_sim.yaml b/manifests/tools/build_sim.yaml index 0a91906f4..e7305ee09 100644 --- a/manifests/tools/build_sim.yaml +++ b/manifests/tools/build_sim.yaml @@ -6,7 +6,7 @@ names: description: Build for iOS sim (compile-only, no launch). outputSchema: schema: xcodebuildmcp.output.build-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/button.yaml b/manifests/tools/button.yaml index f2e8ee1f3..2dd5068a0 100644 --- a/manifests/tools/button.yaml +++ b/manifests/tools/button.yaml @@ -6,7 +6,7 @@ names: description: Press simulator hardware button. outputSchema: schema: xcodebuildmcp.output.ui-action-result - version: "1" + version: "2" annotations: title: Hardware Button readOnlyHint: true diff --git a/manifests/tools/clean.yaml b/manifests/tools/clean.yaml index 1d5858f44..2646d320e 100644 --- a/manifests/tools/clean.yaml +++ b/manifests/tools/clean.yaml @@ -6,7 +6,7 @@ names: description: Clean build products. outputSchema: schema: xcodebuildmcp.output.build-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/debug_attach_sim.yaml b/manifests/tools/debug_attach_sim.yaml index 44a8c5878..9741e167e 100644 --- a/manifests/tools/debug_attach_sim.yaml +++ b/manifests/tools/debug_attach_sim.yaml @@ -6,7 +6,7 @@ names: description: Attach LLDB to sim app. outputSchema: schema: xcodebuildmcp.output.debug-session-action - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/debug_breakpoint_add.yaml b/manifests/tools/debug_breakpoint_add.yaml index ff1f2c9cf..43d7afacf 100644 --- a/manifests/tools/debug_breakpoint_add.yaml +++ b/manifests/tools/debug_breakpoint_add.yaml @@ -6,7 +6,7 @@ names: description: Add breakpoint. outputSchema: schema: xcodebuildmcp.output.debug-breakpoint-result - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/debug_breakpoint_remove.yaml b/manifests/tools/debug_breakpoint_remove.yaml index 71e28e5ea..9a755971b 100644 --- a/manifests/tools/debug_breakpoint_remove.yaml +++ b/manifests/tools/debug_breakpoint_remove.yaml @@ -6,7 +6,7 @@ names: description: Remove breakpoint. outputSchema: schema: xcodebuildmcp.output.debug-breakpoint-result - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/debug_continue.yaml b/manifests/tools/debug_continue.yaml index 981b969c2..806b6a2d7 100644 --- a/manifests/tools/debug_continue.yaml +++ b/manifests/tools/debug_continue.yaml @@ -6,7 +6,7 @@ names: description: Continue debug session. outputSchema: schema: xcodebuildmcp.output.debug-session-action - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/debug_detach.yaml b/manifests/tools/debug_detach.yaml index 08439d376..8a9def692 100644 --- a/manifests/tools/debug_detach.yaml +++ b/manifests/tools/debug_detach.yaml @@ -6,7 +6,7 @@ names: description: Detach debugger. outputSchema: schema: xcodebuildmcp.output.debug-session-action - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/debug_lldb_command.yaml b/manifests/tools/debug_lldb_command.yaml index 4a4e068cd..814cbf002 100644 --- a/manifests/tools/debug_lldb_command.yaml +++ b/manifests/tools/debug_lldb_command.yaml @@ -6,7 +6,7 @@ names: description: Run LLDB command. outputSchema: schema: xcodebuildmcp.output.debug-command-result - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/debug_stack.yaml b/manifests/tools/debug_stack.yaml index e499c79bb..443c405b2 100644 --- a/manifests/tools/debug_stack.yaml +++ b/manifests/tools/debug_stack.yaml @@ -6,7 +6,7 @@ names: description: Get backtrace. outputSchema: schema: xcodebuildmcp.output.debug-stack-result - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/debug_variables.yaml b/manifests/tools/debug_variables.yaml index 2b2862234..5a632702d 100644 --- a/manifests/tools/debug_variables.yaml +++ b/manifests/tools/debug_variables.yaml @@ -6,7 +6,7 @@ names: description: Get frame variables. outputSchema: schema: xcodebuildmcp.output.debug-variables-result - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/discover_projs.yaml b/manifests/tools/discover_projs.yaml index 2cb845b7f..ce91449d5 100644 --- a/manifests/tools/discover_projs.yaml +++ b/manifests/tools/discover_projs.yaml @@ -6,7 +6,7 @@ names: description: Scans a directory (defaults to workspace root) to find Xcode project (.xcodeproj) and workspace (.xcworkspace) files. Use when project/workspace path is unknown. outputSchema: schema: xcodebuildmcp.output.project-list - version: "1" + version: "2" annotations: title: Discover Projects readOnlyHint: true diff --git a/manifests/tools/doctor.yaml b/manifests/tools/doctor.yaml index 9ec30c501..d2791a182 100644 --- a/manifests/tools/doctor.yaml +++ b/manifests/tools/doctor.yaml @@ -6,7 +6,7 @@ names: description: MCP environment info. outputSchema: schema: xcodebuildmcp.output.doctor-report - version: "1" + version: "2" annotations: title: Doctor readOnlyHint: true diff --git a/manifests/tools/erase_sims.yaml b/manifests/tools/erase_sims.yaml index 6d8abf63a..f05415adc 100644 --- a/manifests/tools/erase_sims.yaml +++ b/manifests/tools/erase_sims.yaml @@ -6,7 +6,7 @@ names: description: Erase simulator. outputSchema: schema: xcodebuildmcp.output.simulator-action-result - version: "1" + version: "2" annotations: title: Erase Simulators readOnlyHint: false diff --git a/manifests/tools/gesture.yaml b/manifests/tools/gesture.yaml index 15c989e38..a543f2303 100644 --- a/manifests/tools/gesture.yaml +++ b/manifests/tools/gesture.yaml @@ -6,7 +6,7 @@ names: description: Simulator gesture preset. outputSchema: schema: xcodebuildmcp.output.ui-action-result - version: "1" + version: "2" annotations: title: Gesture readOnlyHint: true diff --git a/manifests/tools/get_app_bundle_id.yaml b/manifests/tools/get_app_bundle_id.yaml index 2dc6b5569..c8cee22e7 100644 --- a/manifests/tools/get_app_bundle_id.yaml +++ b/manifests/tools/get_app_bundle_id.yaml @@ -6,7 +6,7 @@ names: description: Extract bundle id from .app. outputSchema: schema: xcodebuildmcp.output.bundle-id - version: "1" + version: "2" annotations: title: Get App Bundle ID readOnlyHint: true diff --git a/manifests/tools/get_coverage_report.yaml b/manifests/tools/get_coverage_report.yaml index 6d7cb120d..989717748 100644 --- a/manifests/tools/get_coverage_report.yaml +++ b/manifests/tools/get_coverage_report.yaml @@ -6,7 +6,7 @@ names: description: Show per-target code coverage from an xcresult bundle. outputSchema: schema: xcodebuildmcp.output.coverage-result - version: "1" + version: "2" annotations: title: Get Coverage Report readOnlyHint: true diff --git a/manifests/tools/get_device_app_path.yaml b/manifests/tools/get_device_app_path.yaml index b348894b8..769665ecd 100644 --- a/manifests/tools/get_device_app_path.yaml +++ b/manifests/tools/get_device_app_path.yaml @@ -6,7 +6,7 @@ names: description: Get device built app path. outputSchema: schema: xcodebuildmcp.output.app-path - version: "1" + version: "2" annotations: title: Get Device App Path readOnlyHint: true diff --git a/manifests/tools/get_file_coverage.yaml b/manifests/tools/get_file_coverage.yaml index 083fe46c7..60fc5a6ab 100644 --- a/manifests/tools/get_file_coverage.yaml +++ b/manifests/tools/get_file_coverage.yaml @@ -6,7 +6,7 @@ names: description: Show function-level coverage and uncovered line ranges for a specific file. outputSchema: schema: xcodebuildmcp.output.coverage-result - version: "1" + version: "2" annotations: title: Get File Coverage readOnlyHint: true diff --git a/manifests/tools/get_mac_app_path.yaml b/manifests/tools/get_mac_app_path.yaml index a3d3327f2..0b596e301 100644 --- a/manifests/tools/get_mac_app_path.yaml +++ b/manifests/tools/get_mac_app_path.yaml @@ -6,7 +6,7 @@ names: description: Get macOS built app path. outputSchema: schema: xcodebuildmcp.output.app-path - version: "1" + version: "2" annotations: title: Get macOS App Path readOnlyHint: true diff --git a/manifests/tools/get_mac_bundle_id.yaml b/manifests/tools/get_mac_bundle_id.yaml index f5d81f74e..9d28c7897 100644 --- a/manifests/tools/get_mac_bundle_id.yaml +++ b/manifests/tools/get_mac_bundle_id.yaml @@ -6,7 +6,7 @@ names: description: Extract bundle id from macOS .app. outputSchema: schema: xcodebuildmcp.output.bundle-id - version: "1" + version: "2" annotations: title: Get Mac Bundle ID readOnlyHint: true diff --git a/manifests/tools/get_sim_app_path.yaml b/manifests/tools/get_sim_app_path.yaml index 0b1dad5f7..b0d6e9b5e 100644 --- a/manifests/tools/get_sim_app_path.yaml +++ b/manifests/tools/get_sim_app_path.yaml @@ -6,7 +6,7 @@ names: description: Get sim built app path. outputSchema: schema: xcodebuildmcp.output.app-path - version: "1" + version: "2" annotations: title: Get Simulator App Path readOnlyHint: true diff --git a/manifests/tools/install_app_device.yaml b/manifests/tools/install_app_device.yaml index bd85eda66..7dd5eb798 100644 --- a/manifests/tools/install_app_device.yaml +++ b/manifests/tools/install_app_device.yaml @@ -6,7 +6,7 @@ names: description: Install app on device. outputSchema: schema: xcodebuildmcp.output.install-result - version: "1" + version: "2" annotations: title: Install App Device readOnlyHint: false diff --git a/manifests/tools/install_app_sim.yaml b/manifests/tools/install_app_sim.yaml index 64dbd2c2c..293e69d58 100644 --- a/manifests/tools/install_app_sim.yaml +++ b/manifests/tools/install_app_sim.yaml @@ -6,7 +6,7 @@ names: description: Install app on sim. outputSchema: schema: xcodebuildmcp.output.install-result - version: "1" + version: "2" annotations: title: Install App Simulator readOnlyHint: false diff --git a/manifests/tools/key_press.yaml b/manifests/tools/key_press.yaml index 23671da20..1d2d60a7f 100644 --- a/manifests/tools/key_press.yaml +++ b/manifests/tools/key_press.yaml @@ -6,7 +6,7 @@ names: description: Press key by keycode. outputSchema: schema: xcodebuildmcp.output.ui-action-result - version: "1" + version: "2" annotations: title: Key Press readOnlyHint: true diff --git a/manifests/tools/key_sequence.yaml b/manifests/tools/key_sequence.yaml index 3ef142f7c..d313f71a0 100644 --- a/manifests/tools/key_sequence.yaml +++ b/manifests/tools/key_sequence.yaml @@ -6,7 +6,7 @@ names: description: Press a sequence of keys by their keycodes. outputSchema: schema: xcodebuildmcp.output.ui-action-result - version: "1" + version: "2" annotations: title: Key Sequence readOnlyHint: true diff --git a/manifests/tools/launch_app_device.yaml b/manifests/tools/launch_app_device.yaml index 9dd0d132d..cae3c5cf5 100644 --- a/manifests/tools/launch_app_device.yaml +++ b/manifests/tools/launch_app_device.yaml @@ -6,7 +6,7 @@ names: description: Launch app on device. outputSchema: schema: xcodebuildmcp.output.launch-result - version: "1" + version: "2" annotations: title: Launch App Device readOnlyHint: false diff --git a/manifests/tools/launch_app_sim.yaml b/manifests/tools/launch_app_sim.yaml index 80b4581d4..5e96d2752 100644 --- a/manifests/tools/launch_app_sim.yaml +++ b/manifests/tools/launch_app_sim.yaml @@ -6,7 +6,7 @@ names: description: Launch app on simulator. Runtime logs are captured automatically and the log file path is included in the response. outputSchema: schema: xcodebuildmcp.output.launch-result - version: "1" + version: "2" annotations: title: Launch App Simulator readOnlyHint: false diff --git a/manifests/tools/launch_mac_app.yaml b/manifests/tools/launch_mac_app.yaml index d9594290a..62d321673 100644 --- a/manifests/tools/launch_mac_app.yaml +++ b/manifests/tools/launch_mac_app.yaml @@ -6,7 +6,7 @@ names: description: Launch macOS app. outputSchema: schema: xcodebuildmcp.output.launch-result - version: "1" + version: "2" annotations: title: Launch macOS App readOnlyHint: false diff --git a/manifests/tools/list_devices.yaml b/manifests/tools/list_devices.yaml index 9747e4a74..45827025c 100644 --- a/manifests/tools/list_devices.yaml +++ b/manifests/tools/list_devices.yaml @@ -6,7 +6,7 @@ names: description: List connected devices. outputSchema: schema: xcodebuildmcp.output.device-list - version: "1" + version: "2" annotations: title: List Devices readOnlyHint: true diff --git a/manifests/tools/list_schemes.yaml b/manifests/tools/list_schemes.yaml index a0e0bc08e..c010abce9 100644 --- a/manifests/tools/list_schemes.yaml +++ b/manifests/tools/list_schemes.yaml @@ -6,7 +6,7 @@ names: description: List Xcode schemes. outputSchema: schema: xcodebuildmcp.output.scheme-list - version: "1" + version: "2" annotations: title: List Schemes readOnlyHint: true diff --git a/manifests/tools/list_sims.yaml b/manifests/tools/list_sims.yaml index 468960ee6..f64d83e9b 100644 --- a/manifests/tools/list_sims.yaml +++ b/manifests/tools/list_sims.yaml @@ -6,7 +6,7 @@ names: description: List iOS simulators. outputSchema: schema: xcodebuildmcp.output.simulator-list - version: "1" + version: "2" annotations: title: List Simulators readOnlyHint: true diff --git a/manifests/tools/long_press.yaml b/manifests/tools/long_press.yaml index b1e5a3ab9..0e39ab876 100644 --- a/manifests/tools/long_press.yaml +++ b/manifests/tools/long_press.yaml @@ -6,7 +6,7 @@ names: description: Long press at coords. outputSchema: schema: xcodebuildmcp.output.ui-action-result - version: "1" + version: "2" annotations: title: Long Press readOnlyHint: true diff --git a/manifests/tools/manage_workflows.yaml b/manifests/tools/manage_workflows.yaml index 5494d9955..39f85c42d 100644 --- a/manifests/tools/manage_workflows.yaml +++ b/manifests/tools/manage_workflows.yaml @@ -6,7 +6,7 @@ names: description: Workflows are groups of tools exposed by XcodeBuildMCP. By default, not all workflows (and therefore tools) are enabled; only simulator tools are enabled by default. Some workflows are mandatory and can't be disabled. outputSchema: schema: xcodebuildmcp.output.workflow-selection - version: "1" + version: "2" availability: cli: true annotations: diff --git a/manifests/tools/open_sim.yaml b/manifests/tools/open_sim.yaml index e7a2ef4c3..d3560b109 100644 --- a/manifests/tools/open_sim.yaml +++ b/manifests/tools/open_sim.yaml @@ -6,7 +6,7 @@ names: description: Open Simulator.app for visibility/manual workflows. Not required before simulator build-and-run (build_run_sim). outputSchema: schema: xcodebuildmcp.output.simulator-action-result - version: "1" + version: "2" annotations: title: Open Simulator readOnlyHint: true diff --git a/manifests/tools/record_sim_video.yaml b/manifests/tools/record_sim_video.yaml index e059186a7..fc6fe7eda 100644 --- a/manifests/tools/record_sim_video.yaml +++ b/manifests/tools/record_sim_video.yaml @@ -6,7 +6,7 @@ names: description: Record sim video. outputSchema: schema: xcodebuildmcp.output.capture-result - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/reset_sim_location.yaml b/manifests/tools/reset_sim_location.yaml index 8ab95712f..4cea33309 100644 --- a/manifests/tools/reset_sim_location.yaml +++ b/manifests/tools/reset_sim_location.yaml @@ -6,7 +6,7 @@ names: description: Reset sim location. outputSchema: schema: xcodebuildmcp.output.simulator-action-result - version: "1" + version: "2" annotations: title: Reset Simulator Location readOnlyHint: true diff --git a/manifests/tools/scaffold_ios_project.yaml b/manifests/tools/scaffold_ios_project.yaml index ec9e77b3b..7495bfb7a 100644 --- a/manifests/tools/scaffold_ios_project.yaml +++ b/manifests/tools/scaffold_ios_project.yaml @@ -6,7 +6,7 @@ names: description: Scaffold iOS project. outputSchema: schema: xcodebuildmcp.output.scaffold-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/scaffold_macos_project.yaml b/manifests/tools/scaffold_macos_project.yaml index 16c21396b..215ff6a15 100644 --- a/manifests/tools/scaffold_macos_project.yaml +++ b/manifests/tools/scaffold_macos_project.yaml @@ -6,7 +6,7 @@ names: description: Scaffold macOS project. outputSchema: schema: xcodebuildmcp.output.scaffold-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/screenshot.yaml b/manifests/tools/screenshot.yaml index 22c0dd0a9..9b42550f7 100644 --- a/manifests/tools/screenshot.yaml +++ b/manifests/tools/screenshot.yaml @@ -6,7 +6,7 @@ names: description: Capture screenshot. outputSchema: schema: xcodebuildmcp.output.capture-result - version: "1" + version: "2" annotations: title: Screenshot readOnlyHint: true diff --git a/manifests/tools/session_clear_defaults.yaml b/manifests/tools/session_clear_defaults.yaml index 4cea73b74..4554910f8 100644 --- a/manifests/tools/session_clear_defaults.yaml +++ b/manifests/tools/session_clear_defaults.yaml @@ -6,7 +6,7 @@ names: description: Clear session defaults for the active profile or a specified profile. outputSchema: schema: xcodebuildmcp.output.session-defaults - version: "1" + version: "2" annotations: title: Clear Session Defaults readOnlyHint: false diff --git a/manifests/tools/session_set_defaults.yaml b/manifests/tools/session_set_defaults.yaml index d2b0394e8..83373d393 100644 --- a/manifests/tools/session_set_defaults.yaml +++ b/manifests/tools/session_set_defaults.yaml @@ -6,7 +6,7 @@ names: description: Set session defaults for the active profile, or for a specified profile and make it active. outputSchema: schema: xcodebuildmcp.output.session-defaults - version: "1" + version: "2" annotations: title: Set Session Defaults readOnlyHint: false diff --git a/manifests/tools/session_show_defaults.yaml b/manifests/tools/session_show_defaults.yaml index af404a455..03ccea45e 100644 --- a/manifests/tools/session_show_defaults.yaml +++ b/manifests/tools/session_show_defaults.yaml @@ -6,7 +6,7 @@ names: description: Show current active defaults. Required before your first build/run/test call in a session — do not assume defaults are configured. outputSchema: schema: xcodebuildmcp.output.session-defaults - version: "1" + version: "2" annotations: title: Show Session Defaults readOnlyHint: true diff --git a/manifests/tools/session_use_defaults_profile.yaml b/manifests/tools/session_use_defaults_profile.yaml index 6f2ea401b..fb47d7a57 100644 --- a/manifests/tools/session_use_defaults_profile.yaml +++ b/manifests/tools/session_use_defaults_profile.yaml @@ -6,7 +6,7 @@ names: description: Switch the active session defaults profile. outputSchema: schema: xcodebuildmcp.output.session-profile - version: "1" + version: "2" annotations: title: Use Session Defaults Profile readOnlyHint: false diff --git a/manifests/tools/set_sim_appearance.yaml b/manifests/tools/set_sim_appearance.yaml index b8d114520..d603d293c 100644 --- a/manifests/tools/set_sim_appearance.yaml +++ b/manifests/tools/set_sim_appearance.yaml @@ -6,7 +6,7 @@ names: description: Set sim appearance. outputSchema: schema: xcodebuildmcp.output.simulator-action-result - version: "1" + version: "2" annotations: title: Set Simulator Appearance readOnlyHint: true diff --git a/manifests/tools/set_sim_location.yaml b/manifests/tools/set_sim_location.yaml index 4dc679e2e..1c2174b60 100644 --- a/manifests/tools/set_sim_location.yaml +++ b/manifests/tools/set_sim_location.yaml @@ -6,7 +6,7 @@ names: description: Set sim location. outputSchema: schema: xcodebuildmcp.output.simulator-action-result - version: "1" + version: "2" annotations: title: Set Simulator Location readOnlyHint: true diff --git a/manifests/tools/show_build_settings.yaml b/manifests/tools/show_build_settings.yaml index 4b730940d..d2b5ebb30 100644 --- a/manifests/tools/show_build_settings.yaml +++ b/manifests/tools/show_build_settings.yaml @@ -6,7 +6,7 @@ names: description: Show build settings. outputSchema: schema: xcodebuildmcp.output.build-settings - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/sim_statusbar.yaml b/manifests/tools/sim_statusbar.yaml index 502592ad2..75b6df180 100644 --- a/manifests/tools/sim_statusbar.yaml +++ b/manifests/tools/sim_statusbar.yaml @@ -6,7 +6,7 @@ names: description: Set sim status bar network. outputSchema: schema: xcodebuildmcp.output.simulator-action-result - version: "1" + version: "2" annotations: title: Simulator Statusbar readOnlyHint: true diff --git a/manifests/tools/snapshot_ui.yaml b/manifests/tools/snapshot_ui.yaml index 6bcedf121..81d659216 100644 --- a/manifests/tools/snapshot_ui.yaml +++ b/manifests/tools/snapshot_ui.yaml @@ -6,7 +6,7 @@ names: description: Print view hierarchy with precise view coordinates (x, y, width, height) for visible elements. outputSchema: schema: xcodebuildmcp.output.capture-result - version: "1" + version: "2" nextSteps: - label: Refresh after layout changes toolId: snapshot_ui diff --git a/manifests/tools/stop_app_device.yaml b/manifests/tools/stop_app_device.yaml index 7fb44c7d1..50b78439a 100644 --- a/manifests/tools/stop_app_device.yaml +++ b/manifests/tools/stop_app_device.yaml @@ -6,7 +6,7 @@ names: description: Stop device app. outputSchema: schema: xcodebuildmcp.output.stop-result - version: "1" + version: "2" annotations: title: Stop App Device readOnlyHint: false diff --git a/manifests/tools/stop_app_sim.yaml b/manifests/tools/stop_app_sim.yaml index 8187194d4..7d85d827f 100644 --- a/manifests/tools/stop_app_sim.yaml +++ b/manifests/tools/stop_app_sim.yaml @@ -6,7 +6,7 @@ names: description: Stop sim app. outputSchema: schema: xcodebuildmcp.output.stop-result - version: "1" + version: "2" annotations: title: Stop App Simulator readOnlyHint: false diff --git a/manifests/tools/stop_mac_app.yaml b/manifests/tools/stop_mac_app.yaml index 9a8908af4..a4c79cf00 100644 --- a/manifests/tools/stop_mac_app.yaml +++ b/manifests/tools/stop_mac_app.yaml @@ -6,7 +6,7 @@ names: description: Stop macOS app. outputSchema: schema: xcodebuildmcp.output.stop-result - version: "1" + version: "2" annotations: title: Stop macOS App readOnlyHint: false diff --git a/manifests/tools/swift_package_build.yaml b/manifests/tools/swift_package_build.yaml index e764364a3..0d578c985 100644 --- a/manifests/tools/swift_package_build.yaml +++ b/manifests/tools/swift_package_build.yaml @@ -6,7 +6,7 @@ names: description: swift package target build. outputSchema: schema: xcodebuildmcp.output.build-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/swift_package_clean.yaml b/manifests/tools/swift_package_clean.yaml index 012abac64..aaa5d9e30 100644 --- a/manifests/tools/swift_package_clean.yaml +++ b/manifests/tools/swift_package_clean.yaml @@ -6,7 +6,7 @@ names: description: swift package clean. outputSchema: schema: xcodebuildmcp.output.build-result - version: "1" + version: "2" annotations: title: Swift Package Clean readOnlyHint: false diff --git a/manifests/tools/swift_package_list.yaml b/manifests/tools/swift_package_list.yaml index 01f754cbb..0141f9f4b 100644 --- a/manifests/tools/swift_package_list.yaml +++ b/manifests/tools/swift_package_list.yaml @@ -6,7 +6,7 @@ names: description: List SwiftPM processes. outputSchema: schema: xcodebuildmcp.output.process-list - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/swift_package_run.yaml b/manifests/tools/swift_package_run.yaml index dd1d7d763..a74526596 100644 --- a/manifests/tools/swift_package_run.yaml +++ b/manifests/tools/swift_package_run.yaml @@ -6,7 +6,7 @@ names: description: swift package target run. outputSchema: schema: xcodebuildmcp.output.build-run-result - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/swift_package_stop.yaml b/manifests/tools/swift_package_stop.yaml index 7e73f5faa..50d7a6acb 100644 --- a/manifests/tools/swift_package_stop.yaml +++ b/manifests/tools/swift_package_stop.yaml @@ -6,7 +6,7 @@ names: description: Stop SwiftPM run. outputSchema: schema: xcodebuildmcp.output.stop-result - version: "1" + version: "2" routing: stateful: true annotations: diff --git a/manifests/tools/swift_package_test.yaml b/manifests/tools/swift_package_test.yaml index 9ac636c0a..367e33f47 100644 --- a/manifests/tools/swift_package_test.yaml +++ b/manifests/tools/swift_package_test.yaml @@ -6,7 +6,7 @@ names: description: Run swift package target tests. outputSchema: schema: xcodebuildmcp.output.test-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/swipe.yaml b/manifests/tools/swipe.yaml index a21c3808d..e365373ab 100644 --- a/manifests/tools/swipe.yaml +++ b/manifests/tools/swipe.yaml @@ -6,7 +6,7 @@ names: description: Swipe between points. outputSchema: schema: xcodebuildmcp.output.ui-action-result - version: "1" + version: "2" annotations: title: Swipe readOnlyHint: true diff --git a/manifests/tools/sync_xcode_defaults.yaml b/manifests/tools/sync_xcode_defaults.yaml index ff31f39d2..ee895be79 100644 --- a/manifests/tools/sync_xcode_defaults.yaml +++ b/manifests/tools/sync_xcode_defaults.yaml @@ -6,7 +6,7 @@ names: description: Sync session defaults (scheme, simulator) from Xcode's current IDE selection. outputSchema: schema: xcodebuildmcp.output.session-defaults - version: "1" + version: "2" predicates: - xcodeAutoSyncDisabled annotations: diff --git a/manifests/tools/tap.yaml b/manifests/tools/tap.yaml index 39b36ba9a..f2c3ba405 100644 --- a/manifests/tools/tap.yaml +++ b/manifests/tools/tap.yaml @@ -6,7 +6,7 @@ names: description: Tap UI element by accessibility id/label (recommended) or coordinates as fallback. outputSchema: schema: xcodebuildmcp.output.ui-action-result - version: "1" + version: "2" annotations: title: Tap readOnlyHint: true diff --git a/manifests/tools/test_device.yaml b/manifests/tools/test_device.yaml index 1903b6088..3f0562f1d 100644 --- a/manifests/tools/test_device.yaml +++ b/manifests/tools/test_device.yaml @@ -6,7 +6,7 @@ names: description: Test on device. outputSchema: schema: xcodebuildmcp.output.test-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/test_macos.yaml b/manifests/tools/test_macos.yaml index 1d8afa50f..ef5db1325 100644 --- a/manifests/tools/test_macos.yaml +++ b/manifests/tools/test_macos.yaml @@ -6,7 +6,7 @@ names: description: Test macOS target. outputSchema: schema: xcodebuildmcp.output.test-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/test_sim.yaml b/manifests/tools/test_sim.yaml index 286008b21..d15375220 100644 --- a/manifests/tools/test_sim.yaml +++ b/manifests/tools/test_sim.yaml @@ -6,7 +6,7 @@ names: description: Test on iOS sim. outputSchema: schema: xcodebuildmcp.output.test-result - version: "1" + version: "2" predicates: - hideWhenXcodeAgentMode annotations: diff --git a/manifests/tools/toggle_connect_hardware_keyboard.yaml b/manifests/tools/toggle_connect_hardware_keyboard.yaml index 2ee4766ed..26be0031d 100644 --- a/manifests/tools/toggle_connect_hardware_keyboard.yaml +++ b/manifests/tools/toggle_connect_hardware_keyboard.yaml @@ -6,7 +6,7 @@ names: description: Toggle whether the iOS Simulator receives Mac hardware keyboard input (Cmd+Shift+K). Disconnecting makes the on-screen keyboard appear for tap-based input. Requires the simulator to be booted and Accessibility permission for the MCP host. outputSchema: schema: xcodebuildmcp.output.simulator-action-result - version: "1" + version: "2" annotations: title: Toggle Connect Hardware Keyboard readOnlyHint: false diff --git a/manifests/tools/toggle_software_keyboard.yaml b/manifests/tools/toggle_software_keyboard.yaml index 94e99d9fb..680e6eeee 100644 --- a/manifests/tools/toggle_software_keyboard.yaml +++ b/manifests/tools/toggle_software_keyboard.yaml @@ -6,7 +6,7 @@ names: description: Toggle the iOS Simulator software keyboard (Cmd+K). Shows or hides the on-screen keyboard. Requires the simulator to be booted and Accessibility permission for the MCP host. outputSchema: schema: xcodebuildmcp.output.simulator-action-result - version: "1" + version: "2" annotations: title: Toggle Software Keyboard readOnlyHint: false diff --git a/manifests/tools/touch.yaml b/manifests/tools/touch.yaml index a6a25d4b4..4faf99470 100644 --- a/manifests/tools/touch.yaml +++ b/manifests/tools/touch.yaml @@ -6,7 +6,7 @@ names: description: Touch down/up at coords. outputSchema: schema: xcodebuildmcp.output.ui-action-result - version: "1" + version: "2" annotations: title: Touch readOnlyHint: true diff --git a/manifests/tools/type_text.yaml b/manifests/tools/type_text.yaml index 103e56437..de6a08a9a 100644 --- a/manifests/tools/type_text.yaml +++ b/manifests/tools/type_text.yaml @@ -6,7 +6,7 @@ names: description: Type text. outputSchema: schema: xcodebuildmcp.output.ui-action-result - version: "1" + version: "2" annotations: title: Type Text readOnlyHint: true diff --git a/manifests/tools/xcode_ide_call_tool.yaml b/manifests/tools/xcode_ide_call_tool.yaml index 18854fe28..bf76d50a9 100644 --- a/manifests/tools/xcode_ide_call_tool.yaml +++ b/manifests/tools/xcode_ide_call_tool.yaml @@ -6,7 +6,7 @@ names: description: Call a remote Xcode IDE MCP tool. outputSchema: schema: xcodebuildmcp.output.xcode-bridge-call-result - version: '2' + version: "3" routing: stateful: true annotations: diff --git a/manifests/tools/xcode_ide_list_tools.yaml b/manifests/tools/xcode_ide_list_tools.yaml index 9fc2ca2c5..d3b7eca44 100644 --- a/manifests/tools/xcode_ide_list_tools.yaml +++ b/manifests/tools/xcode_ide_list_tools.yaml @@ -6,7 +6,7 @@ names: description: "Lists Xcode-IDE-only MCP capabilities (Use for: SwiftUI previews image capture, code snippet execution, issue Navigator/build logs, and window/tab context)." outputSchema: schema: xcodebuildmcp.output.xcode-bridge-tool-list - version: "2" + version: "3" routing: stateful: true annotations: diff --git a/manifests/tools/xcode_tools_bridge_disconnect.yaml b/manifests/tools/xcode_tools_bridge_disconnect.yaml index fee3a3592..84f050e9e 100644 --- a/manifests/tools/xcode_tools_bridge_disconnect.yaml +++ b/manifests/tools/xcode_tools_bridge_disconnect.yaml @@ -6,7 +6,7 @@ names: description: Disconnect bridge and unregister proxied `xcode_tools_*` tools. outputSchema: schema: xcodebuildmcp.output.xcode-bridge-status - version: "1" + version: "2" predicates: - debugEnabled annotations: diff --git a/manifests/tools/xcode_tools_bridge_status.yaml b/manifests/tools/xcode_tools_bridge_status.yaml index cf740742f..5474fdfb5 100644 --- a/manifests/tools/xcode_tools_bridge_status.yaml +++ b/manifests/tools/xcode_tools_bridge_status.yaml @@ -6,7 +6,7 @@ names: description: Show xcrun mcpbridge availability and proxy tool sync status. outputSchema: schema: xcodebuildmcp.output.xcode-bridge-status - version: "1" + version: "2" predicates: - debugEnabled annotations: diff --git a/manifests/tools/xcode_tools_bridge_sync.yaml b/manifests/tools/xcode_tools_bridge_sync.yaml index eaadf33c3..e1f49f16c 100644 --- a/manifests/tools/xcode_tools_bridge_sync.yaml +++ b/manifests/tools/xcode_tools_bridge_sync.yaml @@ -6,7 +6,7 @@ names: description: One-shot connect + tools/list sync (manual retry; avoids background prompt spam). outputSchema: schema: xcodebuildmcp.output.xcode-bridge-sync - version: "1" + version: "2" predicates: - debugEnabled annotations: diff --git a/schemas/structured-output/_defs/common.schema.json b/schemas/structured-output/_defs/common.schema.json index 8cfba5abd..e6354be2b 100644 --- a/schemas/structured-output/_defs/common.schema.json +++ b/schemas/structured-output/_defs/common.schema.json @@ -556,6 +556,14 @@ "xcodePid", "xcodeSessionId" ] + }, + "nextSteps": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1 } } } diff --git a/schemas/structured-output/xcodebuildmcp.output.app-path/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.app-path/2.schema.json new file mode 100644 index 000000000..cb0159dff --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.app-path/2.schema.json @@ -0,0 +1,108 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.app-path/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.app-path" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "request": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/appPathRequest" + }, + "summary": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "enum": [ + "SUCCEEDED", + "FAILED" + ] + }, + "durationMs": { + "type": "integer", + "minimum": 0 + }, + "target": { + "enum": [ + "simulator", + "device", + "macos", + "swift-package" + ] + } + }, + "required": [ + "status" + ] + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "appPath": { + "type": "string" + } + }, + "required": [ + "appPath" + ] + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [], + "anyOf": [ + { + "properties": { + "artifacts": true + }, + "required": [ + "artifacts" + ] + }, + { + "properties": { + "diagnostics": true + }, + "required": [ + "diagnostics" + ] + } + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.build-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.build-result/2.schema.json new file mode 100644 index 000000000..8496ece63 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.build-result/2.schema.json @@ -0,0 +1,121 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.build-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.build-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "request": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/buildInvocationRequest" + }, + "summary": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "enum": [ + "SUCCEEDED", + "FAILED" + ] + }, + "durationMs": { + "type": "integer", + "minimum": 0 + }, + "target": { + "enum": [ + "simulator", + "device", + "macos", + "swift-package" + ] + } + }, + "required": [ + "status" + ] + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "appPath": { + "type": "string" + }, + "bundleId": { + "type": "string" + }, + "buildLogPath": { + "type": "string" + }, + "packagePath": { + "type": "string" + }, + "workspacePath": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "configuration": { + "type": "string" + }, + "platform": { + "type": "string" + } + }, + "required": [], + "minProperties": 1 + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "summary", + "artifacts", + "diagnostics" + ] + }, + { + "type": "null" + } + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.build-run-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.build-run-result/2.schema.json new file mode 100644 index 000000000..0df631c1f --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.build-run-result/2.schema.json @@ -0,0 +1,143 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.build-run-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.build-run-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "request": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/buildInvocationRequest" + }, + "summary": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "enum": [ + "SUCCEEDED", + "FAILED" + ] + }, + "durationMs": { + "type": "integer", + "minimum": 0 + }, + "target": { + "enum": [ + "simulator", + "device", + "macos", + "swift-package" + ] + } + }, + "required": [ + "status" + ] + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "appPath": { + "type": "string" + }, + "bundleId": { + "type": "string" + }, + "processId": { + "type": "integer", + "minimum": 1 + }, + "simulatorId": { + "type": "string" + }, + "deviceId": { + "type": "string" + }, + "buildLogPath": { + "type": "string" + }, + "runtimeLogPath": { + "type": "string" + }, + "osLogPath": { + "type": "string" + }, + "packagePath": { + "type": "string" + }, + "executablePath": { + "type": "string" + } + }, + "required": [], + "minProperties": 1 + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + }, + "output": { + "type": "object", + "additionalProperties": false, + "properties": { + "stdout": { + "type": "array", + "items": { + "type": "string" + } + }, + "stderr": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "stdout", + "stderr" + ] + } + }, + "required": [ + "summary", + "artifacts", + "diagnostics" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.build-settings/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.build-settings/2.schema.json new file mode 100644 index 000000000..f886cf293 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.build-settings/2.schema.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.build-settings/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.build-settings" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "workspacePath": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "required": [ + "workspacePath", + "scheme" + ] + }, + "entries": { + "type": "array", + "items": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/orderedEntry" + } + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "artifacts", + "entries" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.bundle-id/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.bundle-id/2.schema.json new file mode 100644 index 000000000..b5eda365a --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.bundle-id/2.schema.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.bundle-id/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.bundle-id" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "appPath": { + "type": "string" + }, + "bundleId": { + "type": "string" + } + }, + "required": [ + "appPath" + ] + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "artifacts" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.capture-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.capture-result/2.schema.json new file mode 100644 index 000000000..95dbea2c2 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.capture-result/2.schema.json @@ -0,0 +1,229 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.capture-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "$defs": { + "frame": { + "type": "object", + "additionalProperties": false, + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "width", + "height" + ] + }, + "accessibilityNode": { + "type": "object", + "additionalProperties": true, + "properties": { + "frame": { + "$ref": "#/$defs/frame" + }, + "type": { + "type": "string" + }, + "role": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/accessibilityNode" + } + }, + "enabled": { + "type": "boolean" + }, + "custom_actions": { + "type": "array", + "items": { + "type": "string" + } + }, + "AXFrame": { + "type": "string" + }, + "AXUniqueId": { + "type": [ + "string", + "null" + ] + }, + "role_description": { + "type": [ + "string", + "null" + ] + }, + "AXLabel": { + "type": [ + "string", + "null" + ] + }, + "content_required": { + "type": "boolean" + }, + "title": { + "type": [ + "string", + "null" + ] + }, + "help": { + "type": [ + "string", + "null" + ] + }, + "AXValue": { + "type": [ + "string", + "null" + ] + }, + "subrole": { + "type": [ + "string", + "null" + ] + }, + "pid": { + "type": "number" + } + }, + "required": [ + "frame", + "type", + "role", + "children", + "enabled", + "custom_actions" + ] + } + }, + "properties": { + "schema": { + "const": "xcodebuildmcp.output.capture-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "summary": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/statusSummary" + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "simulatorId": { + "type": "string" + }, + "screenshotPath": { + "type": "string" + } + }, + "required": [ + "simulatorId" + ] + }, + "capture": { + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "format": { + "type": "string" + }, + "width": { + "type": "integer", + "minimum": 0 + }, + "height": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "format", + "width", + "height" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "ui-hierarchy" + }, + "uiHierarchy": { + "type": "array", + "items": { + "$ref": "#/$defs/accessibilityNode" + } + } + }, + "required": [ + "type", + "uiHierarchy" + ] + } + ] + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "summary", + "artifacts" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.coverage-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.coverage-result/2.schema.json new file mode 100644 index 000000000..d791cf932 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.coverage-result/2.schema.json @@ -0,0 +1,232 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.coverage-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.coverage-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "summary": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "enum": [ + "SUCCEEDED", + "FAILED" + ] + }, + "coveragePct": { + "type": "number", + "minimum": 0, + "maximum": 100 + }, + "coveredLines": { + "type": "integer", + "minimum": 0 + }, + "executableLines": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "status" + ] + }, + "coverageScope": { + "enum": [ + "report", + "file" + ] + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "xcresultPath": { + "type": "string" + }, + "target": { + "type": "string" + }, + "file": { + "type": "string" + }, + "sourceFilePath": { + "type": "string" + } + }, + "required": [ + "xcresultPath" + ] + }, + "targets": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "coveragePct": { + "type": "number", + "minimum": 0, + "maximum": 100 + }, + "coveredLines": { + "type": "integer", + "minimum": 0 + }, + "executableLines": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "name", + "coveragePct", + "coveredLines", + "executableLines" + ] + } + }, + "functions": { + "type": "object", + "additionalProperties": false, + "properties": { + "notCovered": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "line": { + "type": "integer", + "minimum": 1 + }, + "name": { + "type": "string" + }, + "coveredLines": { + "type": "integer", + "minimum": 0 + }, + "executableLines": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "line", + "name", + "coveredLines", + "executableLines" + ] + } + }, + "partialCoverage": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "line": { + "type": "integer", + "minimum": 1 + }, + "name": { + "type": "string" + }, + "coveredLines": { + "type": "integer", + "minimum": 0 + }, + "executableLines": { + "type": "integer", + "minimum": 0 + }, + "coveragePct": { + "type": "number", + "minimum": 0, + "maximum": 100 + } + }, + "required": [ + "line", + "name", + "coveragePct", + "coveredLines", + "executableLines" + ] + } + }, + "fullCoverageCount": { + "type": "integer", + "minimum": 0 + }, + "notCoveredFunctionCount": { + "type": "integer", + "minimum": 0 + }, + "notCoveredLineCount": { + "type": "integer", + "minimum": 0 + }, + "partialCoverageFunctionCount": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "fullCoverageCount", + "notCoveredFunctionCount", + "notCoveredLineCount", + "partialCoverageFunctionCount" + ] + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "summary", + "coverageScope", + "artifacts" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.debug-breakpoint-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.debug-breakpoint-result/2.schema.json new file mode 100644 index 000000000..4da7a3cd6 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.debug-breakpoint-result/2.schema.json @@ -0,0 +1,177 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.debug-breakpoint-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "$defs": { + "addFileLineBreakpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "kind": { + "const": "file-line" + }, + "file": { + "type": "string" + }, + "line": { + "type": "integer", + "minimum": 1 + }, + "breakpointId": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "kind", + "file", + "line" + ] + }, + "addFunctionBreakpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "kind": { + "const": "function" + }, + "name": { + "type": "string" + }, + "breakpointId": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "kind", + "name" + ] + }, + "removeBreakpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "breakpointId": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "breakpointId" + ] + } + }, + "properties": { + "schema": { + "const": "xcodebuildmcp.output.debug-breakpoint-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "action": { + "enum": [ + "add", + "remove" + ] + }, + "breakpoint": { + "oneOf": [ + { + "$ref": "#/$defs/addFileLineBreakpoint" + }, + { + "$ref": "#/$defs/addFunctionBreakpoint" + }, + { + "$ref": "#/$defs/removeBreakpoint" + } + ] + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "action", + "breakpoint" + ], + "allOf": [ + { + "if": { + "properties": { + "action": { + "const": "add" + } + }, + "required": [ + "action" + ] + }, + "then": { + "properties": { + "breakpoint": { + "oneOf": [ + { + "$ref": "#/$defs/addFileLineBreakpoint" + }, + { + "$ref": "#/$defs/addFunctionBreakpoint" + } + ] + } + } + } + }, + { + "if": { + "properties": { + "action": { + "const": "remove" + } + }, + "required": [ + "action" + ] + }, + "then": { + "properties": { + "breakpoint": { + "$ref": "#/$defs/removeBreakpoint" + } + } + } + } + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.debug-command-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.debug-command-result/2.schema.json new file mode 100644 index 000000000..7c851aa6f --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.debug-command-result/2.schema.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.debug-command-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.debug-command-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "command": { + "type": "string" + }, + "outputLines": { + "type": "array", + "items": { + "type": "string" + } + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "command", + "outputLines" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.debug-session-action/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.debug-session-action/2.schema.json new file mode 100644 index 000000000..52142a56e --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.debug-session-action/2.schema.json @@ -0,0 +1,97 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.debug-session-action/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.debug-session-action" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "action": { + "enum": [ + "attach", + "continue", + "detach" + ] + }, + "session": { + "type": "object", + "additionalProperties": false, + "properties": { + "debugSessionId": { + "type": "string" + }, + "connectionState": { + "enum": [ + "attached", + "detached" + ] + }, + "executionState": { + "enum": [ + "paused", + "running" + ] + } + }, + "required": [ + "debugSessionId", + "connectionState" + ] + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "simulatorId": { + "type": "string" + }, + "processId": { + "type": "integer", + "minimum": 1 + } + }, + "required": [], + "minProperties": 1 + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "action" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.debug-stack-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.debug-stack-result/2.schema.json new file mode 100644 index 000000000..29c4add9c --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.debug-stack-result/2.schema.json @@ -0,0 +1,115 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.debug-stack-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.debug-stack-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "threads": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "threadId": { + "type": "integer", + "minimum": 1 + }, + "name": { + "type": "string" + }, + "truncated": { + "type": "boolean" + }, + "frames": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "index": { + "type": "integer", + "minimum": 0 + }, + "symbol": { + "type": "string" + }, + "displayLocation": { + "type": "string" + } + }, + "required": [ + "index", + "symbol", + "displayLocation" + ] + } + } + }, + "required": [ + "threadId", + "name", + "truncated", + "frames" + ] + } + } + }, + "required": [ + "threads" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "diagnostics" + ] + }, + { + "type": "null" + } + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.debug-variables-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.debug-variables-result/2.schema.json new file mode 100644 index 000000000..64955193c --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.debug-variables-result/2.schema.json @@ -0,0 +1,141 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.debug-variables-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.debug-variables-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "scopes": { + "type": "object", + "additionalProperties": false, + "properties": { + "locals": { + "type": "object", + "additionalProperties": false, + "properties": { + "variables": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + }, + "required": [ + "variables" + ] + }, + "globals": { + "type": "object", + "additionalProperties": false, + "properties": { + "variables": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + }, + "required": [ + "variables" + ] + }, + "registers": { + "type": "object", + "additionalProperties": false, + "properties": { + "groups": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "variables": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + }, + "required": [ + "name", + "variables" + ] + } + } + }, + "required": [ + "groups" + ] + } + }, + "required": [ + "locals", + "globals", + "registers" + ] + } + }, + "required": [ + "scopes" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "diagnostics" + ] + }, + { + "type": "null" + } + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.device-list/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.device-list/2.schema.json new file mode 100644 index 000000000..e2ee1831d --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.device-list/2.schema.json @@ -0,0 +1,85 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.device-list/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.device-list" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "devices": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "deviceId": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "state": { + "type": "string" + }, + "isAvailable": { + "type": "boolean" + }, + "osVersion": { + "type": "string" + } + }, + "required": [ + "name", + "deviceId", + "platform", + "state", + "isAvailable", + "osVersion" + ] + } + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "devices" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.doctor-report/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.doctor-report/2.schema.json new file mode 100644 index 000000000..7f5ab798e --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.doctor-report/2.schema.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.doctor-report/2.schema.json", + "title": "Doctor Report", + "description": "Structured output envelope for environment and dependency diagnostics.", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.doctor-report" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "serverVersion": { + "type": "string" + }, + "checks": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "status": { + "enum": [ + "ok", + "warning", + "error" + ] + }, + "message": { + "type": "string" + } + }, + "required": [ + "name", + "status", + "message" + ] + } + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "serverVersion", + "checks" + ] + }, + { + "type": "null" + } + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.error/1.schema.json b/schemas/structured-output/xcodebuildmcp.output.error/1.schema.json index 0cb320a81..79c6b6ccb 100644 --- a/schemas/structured-output/xcodebuildmcp.output.error/1.schema.json +++ b/schemas/structured-output/xcodebuildmcp.output.error/1.schema.json @@ -27,15 +27,28 @@ "additionalProperties": false, "properties": { "category": { - "enum": ["runtime", "validation", "schema"] + "enum": [ + "runtime", + "validation", + "schema" + ] }, "code": { "type": "string", "minLength": 1 } }, - "required": ["category", "code"] + "required": [ + "category", + "code" + ] } }, - "required": ["schema", "schemaVersion", "didError", "error", "data"] + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] } diff --git a/schemas/structured-output/xcodebuildmcp.output.install-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.install-result/2.schema.json new file mode 100644 index 000000000..480c2e54e --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.install-result/2.schema.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.install-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.install-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "summary": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/statusSummary" + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "appPath": { + "type": "string" + }, + "simulatorId": { + "type": "string" + }, + "deviceId": { + "type": "string" + } + }, + "required": [ + "appPath" + ] + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "summary", + "artifacts", + "diagnostics" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.launch-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.launch-result/2.schema.json new file mode 100644 index 000000000..03b92b7a9 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.launch-result/2.schema.json @@ -0,0 +1,85 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.launch-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.launch-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "summary": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/statusSummary" + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "appPath": { + "type": "string" + }, + "bundleId": { + "type": "string" + }, + "processId": { + "type": "integer", + "minimum": 1 + }, + "simulatorId": { + "type": "string" + }, + "deviceId": { + "type": "string" + }, + "runtimeLogPath": { + "type": "string" + }, + "osLogPath": { + "type": "string" + } + }, + "required": [], + "minProperties": 1 + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "summary", + "artifacts", + "diagnostics" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.process-list/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.process-list/2.schema.json new file mode 100644 index 000000000..eec79d0e5 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.process-list/2.schema.json @@ -0,0 +1,97 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.process-list/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.process-list" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "summary": { + "type": "object", + "additionalProperties": false, + "properties": { + "runningProcessCount": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "runningProcessCount" + ] + }, + "processes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "processId": { + "type": "integer", + "minimum": 1 + }, + "uptimeSeconds": { + "type": "integer", + "minimum": 0 + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "packagePath": { + "type": "string" + } + }, + "required": [], + "minProperties": 1 + } + }, + "required": [ + "name", + "processId", + "uptimeSeconds" + ] + } + } + }, + "required": [ + "summary", + "processes" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.project-list/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.project-list/2.schema.json new file mode 100644 index 000000000..b3674e8f8 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.project-list/2.schema.json @@ -0,0 +1,109 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.project-list/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.project-list" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "summary": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "enum": [ + "SUCCEEDED", + "FAILED" + ] + }, + "maxDepth": { + "type": "integer", + "minimum": 0 + }, + "projectCount": { + "type": "integer", + "minimum": 0 + }, + "workspaceCount": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "status", + "maxDepth" + ] + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "workspaceRoot": { + "type": "string" + }, + "scanPath": { + "type": "string" + } + }, + "required": [ + "workspaceRoot", + "scanPath" + ] + }, + "projects": { + "type": "array", + "items": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/pathItem" + } + }, + "workspaces": { + "type": "array", + "items": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/pathItem" + } + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "summary", + "artifacts", + "projects", + "workspaces" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.scaffold-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.scaffold-result/2.schema.json new file mode 100644 index 000000000..08fcbb1bd --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.scaffold-result/2.schema.json @@ -0,0 +1,92 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.scaffold-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.scaffold-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "summary": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "enum": [ + "SUCCEEDED", + "FAILED" + ] + }, + "platform": { + "enum": [ + "iOS", + "macOS" + ] + } + }, + "required": [ + "status", + "platform" + ] + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "projectName": { + "type": "string" + }, + "outputPath": { + "type": "string" + }, + "workspacePath": { + "type": "string" + } + }, + "required": [ + "projectName", + "outputPath" + ] + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "summary", + "artifacts" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.scheme-list/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.scheme-list/2.schema.json new file mode 100644 index 000000000..ebe4c8d3c --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.scheme-list/2.schema.json @@ -0,0 +1,85 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.scheme-list/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.scheme-list" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "artifacts": { + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "workspacePath": { + "type": "string" + } + }, + "required": [ + "workspacePath" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "projectPath": { + "type": "string" + } + }, + "required": [ + "projectPath" + ] + } + ] + }, + "schemes": { + "type": "array", + "items": { + "type": "string" + } + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "artifacts", + "schemes" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.session-defaults/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.session-defaults/2.schema.json new file mode 100644 index 000000000..b92cc7a0d --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.session-defaults/2.schema.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.session-defaults/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.session-defaults" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "currentProfile": { + "type": "string" + }, + "profiles": { + "type": "object", + "properties": { + "(default)": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/sessionDefaultsProfile" + } + }, + "required": [ + "(default)" + ], + "additionalProperties": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/sessionDefaultsProfile" + } + }, + "operation": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/sessionDefaultsOperation" + } + }, + "required": [ + "currentProfile", + "profiles" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.session-profile/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.session-profile/2.schema.json new file mode 100644 index 000000000..3aa5b26fe --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.session-profile/2.schema.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.session-profile/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.session-profile" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "previousProfile": { + "type": "string" + }, + "currentProfile": { + "type": "string" + }, + "persisted": { + "type": "boolean" + } + }, + "required": [ + "previousProfile", + "currentProfile" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.simulator-action-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.simulator-action-result/2.schema.json new file mode 100644 index 000000000..bc7397468 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.simulator-action-result/2.schema.json @@ -0,0 +1,205 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.simulator-action-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.simulator-action-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "summary": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/statusSummary" + }, + "action": { + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "boot" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "erase" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "open" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "reset-location" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "set-location" + }, + "coordinates": { + "type": "object", + "additionalProperties": false, + "properties": { + "latitude": { + "type": "number", + "minimum": -90, + "maximum": 90 + }, + "longitude": { + "type": "number", + "minimum": -180, + "maximum": 180 + } + }, + "required": [ + "latitude", + "longitude" + ] + } + }, + "required": [ + "type", + "coordinates" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "set-appearance" + }, + "appearance": { + "type": "string" + } + }, + "required": [ + "type", + "appearance" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "statusbar" + }, + "dataNetwork": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "toggle-software-keyboard" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "toggle-connect-hardware-keyboard" + } + }, + "required": [ + "type" + ] + } + ] + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "simulatorId": { + "type": "string" + } + }, + "required": [], + "minProperties": 1 + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "summary", + "action" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.simulator-list/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.simulator-list/2.schema.json new file mode 100644 index 000000000..015c732b9 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.simulator-list/2.schema.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.simulator-list/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.simulator-list" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "simulators": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "simulatorId": { + "type": "string" + }, + "state": { + "type": "string" + }, + "isAvailable": { + "type": "boolean" + }, + "runtime": { + "type": "string" + } + }, + "required": [ + "name", + "simulatorId", + "state", + "isAvailable", + "runtime" + ] + } + } + }, + "required": [ + "simulators" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.stop-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.stop-result/2.schema.json new file mode 100644 index 000000000..1532b3cc9 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.stop-result/2.schema.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.stop-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.stop-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "summary": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/statusSummary" + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "simulatorId": { + "type": "string" + }, + "deviceId": { + "type": "string" + }, + "processId": { + "type": "integer", + "minimum": 1 + }, + "bundleId": { + "type": "string" + }, + "appName": { + "type": "string" + } + }, + "required": [], + "minProperties": 1 + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "summary", + "artifacts", + "diagnostics" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.test-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.test-result/2.schema.json new file mode 100644 index 000000000..b2664013e --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.test-result/2.schema.json @@ -0,0 +1,168 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.test-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.test-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "request": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/buildInvocationRequest" + }, + "summary": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "enum": [ + "SUCCEEDED", + "FAILED" + ] + }, + "durationMs": { + "type": "integer", + "minimum": 0 + }, + "target": { + "enum": [ + "simulator", + "device", + "macos", + "swift-package" + ] + }, + "counts": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/counts" + } + }, + "required": [ + "status" + ] + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "deviceId": { + "type": "string" + }, + "buildLogPath": { + "type": "string" + }, + "packagePath": { + "type": "string" + }, + "xcresultPath": { + "type": "string" + } + }, + "required": [], + "minProperties": 1 + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/testDiagnostics" + }, + "tests": { + "type": "object", + "additionalProperties": false, + "properties": { + "selected": { + "type": "array", + "items": { + "type": "string" + } + }, + "discovered": { + "type": "object", + "additionalProperties": false, + "properties": { + "total": { + "type": "integer", + "minimum": 0 + }, + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "total", + "items" + ] + } + }, + "required": [] + }, + "testCases": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "suite": { + "type": "string" + }, + "test": { + "type": "string" + }, + "status": { + "enum": [ + "passed", + "failed", + "skipped" + ] + }, + "durationMs": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "test", + "status" + ] + } + } + }, + "required": [ + "summary", + "artifacts", + "diagnostics" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.ui-action-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.ui-action-result/2.schema.json new file mode 100644 index 000000000..78625e55c --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.ui-action-result/2.schema.json @@ -0,0 +1,244 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.ui-action-result/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.ui-action-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "summary": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/statusSummary" + }, + "action": { + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "tap" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "id": { + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "swipe" + }, + "from": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/point" + }, + "to": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/point" + }, + "durationSeconds": { + "type": "number", + "minimum": 0 + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "touch" + }, + "event": { + "type": "string" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "long-press" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "durationMs": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "type", + "x", + "y", + "durationMs" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "button" + }, + "button": { + "type": "string" + } + }, + "required": [ + "type", + "button" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "gesture" + }, + "gesture": { + "type": "string" + } + }, + "required": [ + "type", + "gesture" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "type-text" + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "key-press" + }, + "keyCode": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "type", + "keyCode" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "key-sequence" + }, + "keyCodes": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + } + } + }, + "required": [ + "type", + "keyCodes" + ] + } + ] + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "simulatorId": { + "type": "string" + } + }, + "required": [ + "simulatorId" + ] + }, + "diagnostics": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/basicDiagnostics" + } + }, + "required": [ + "summary", + "action", + "artifacts" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.workflow-selection/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.workflow-selection/2.schema.json new file mode 100644 index 000000000..0ac77118d --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.workflow-selection/2.schema.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.workflow-selection/2.schema.json", + "title": "Workflow Selection", + "description": "Structured output envelope for enabling and disabling MCP workflows.", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.workflow-selection" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "enabledWorkflows": { + "type": "array", + "items": { + "type": "string" + } + }, + "registeredToolCount": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "enabledWorkflows", + "registeredToolCount" + ] + }, + { + "type": "null" + } + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/1.schema.json b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/1.schema.json index 86c3ac076..c4ba5149d 100644 --- a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/1.schema.json +++ b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/1.schema.json @@ -13,33 +13,67 @@ "type": "object", "additionalProperties": true, "properties": { - "type": { "type": "string" } + "type": { + "type": "string" + } }, - "required": ["type"] + "required": [ + "type" + ] } }, "properties": { - "schema": { "const": "xcodebuildmcp.output.xcode-bridge-call-result" }, - "schemaVersion": { "const": "1" }, - "didError": { "type": "boolean" }, - "error": { "type": ["string", "null"] }, + "schema": { + "const": "xcodebuildmcp.output.xcode-bridge-call-result" + }, + "schemaVersion": { + "const": "1" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, "data": { "type": "object", "additionalProperties": false, "properties": { - "remoteTool": { "type": "string" }, - "succeeded": { "type": "boolean" }, + "remoteTool": { + "type": "string" + }, + "succeeded": { + "type": "boolean" + }, "content": { "type": "array", - "items": { "$ref": "#/$defs/relayedContentItem" } + "items": { + "$ref": "#/$defs/relayedContentItem" + } }, "structuredContent": { - "type": ["object", "null"], + "type": [ + "object", + "null" + ], "additionalProperties": true } }, - "required": ["remoteTool", "succeeded", "content"] + "required": [ + "remoteTool", + "succeeded", + "content" + ] } }, - "required": ["schema", "schemaVersion", "didError", "error", "data"] + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] } diff --git a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/2.schema.json index 7942d60ed..a3e25a22d 100644 --- a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/2.schema.json +++ b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/2.schema.json @@ -13,38 +13,75 @@ "type": "object", "additionalProperties": true, "properties": { - "type": { "type": "string" } + "type": { + "type": "string" + } }, - "required": ["type"] + "required": [ + "type" + ] }, "artifacts": { "type": "object", "additionalProperties": false, "properties": { - "rawResponseJsonPath": { "type": "string" } + "rawResponseJsonPath": { + "type": "string" + } }, - "required": ["rawResponseJsonPath"] + "required": [ + "rawResponseJsonPath" + ] } }, "properties": { - "schema": { "const": "xcodebuildmcp.output.xcode-bridge-call-result" }, - "schemaVersion": { "const": "2" }, - "didError": { "type": "boolean" }, - "error": { "type": ["string", "null"] }, + "schema": { + "const": "xcodebuildmcp.output.xcode-bridge-call-result" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, "data": { "type": "object", "additionalProperties": false, "properties": { - "remoteTool": { "type": "string" }, - "succeeded": { "type": "boolean" }, + "remoteTool": { + "type": "string" + }, + "succeeded": { + "type": "boolean" + }, "content": { "type": "array", - "items": { "$ref": "#/$defs/relayedContentItem" } + "items": { + "$ref": "#/$defs/relayedContentItem" + } }, - "artifacts": { "$ref": "#/$defs/artifacts" } + "artifacts": { + "$ref": "#/$defs/artifacts" + } }, - "required": ["remoteTool", "succeeded", "content"] + "required": [ + "remoteTool", + "succeeded", + "content" + ] } }, - "required": ["schema", "schemaVersion", "didError", "error", "data"] + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] } diff --git a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/3.schema.json b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/3.schema.json new file mode 100644 index 000000000..54628f7ae --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/3.schema.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-call-result/3.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "$defs": { + "relayedContentItem": { + "type": "object", + "additionalProperties": true, + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "rawResponseJsonPath": { + "type": "string" + } + }, + "required": [ + "rawResponseJsonPath" + ] + } + }, + "properties": { + "schema": { + "const": "xcodebuildmcp.output.xcode-bridge-call-result" + }, + "schemaVersion": { + "const": "3" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "remoteTool": { + "type": "string" + }, + "succeeded": { + "type": "boolean" + }, + "content": { + "type": "array", + "items": { + "$ref": "#/$defs/relayedContentItem" + } + }, + "artifacts": { + "$ref": "#/$defs/artifacts" + } + }, + "required": [ + "remoteTool", + "succeeded", + "content" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-status/1.schema.json b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-status/1.schema.json index 1efa5ea1e..d0697ac2f 100644 --- a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-status/1.schema.json +++ b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-status/1.schema.json @@ -9,24 +9,47 @@ } ], "properties": { - "schema": { "const": "xcodebuildmcp.output.xcode-bridge-status" }, - "schemaVersion": { "const": "1" }, - "didError": { "type": "boolean" }, - "error": { "type": ["string", "null"] }, + "schema": { + "const": "xcodebuildmcp.output.xcode-bridge-status" + }, + "schemaVersion": { + "const": "1" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, "data": { "type": "object", "additionalProperties": false, "properties": { "action": { "type": "string", - "enum": ["status", "disconnect"] + "enum": [ + "status", + "disconnect" + ] }, "status": { "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/bridgeStatus" } }, - "required": ["action", "status"] + "required": [ + "action", + "status" + ] } }, - "required": ["schema", "schemaVersion", "didError", "error", "data"] + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] } diff --git a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-status/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-status/2.schema.json new file mode 100644 index 000000000..11191f419 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-status/2.schema.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-status/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.xcode-bridge-status" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "action": { + "type": "string", + "enum": [ + "status", + "disconnect" + ] + }, + "status": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/bridgeStatus" + } + }, + "required": [ + "action", + "status" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-sync/1.schema.json b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-sync/1.schema.json index 7e4723f98..d4b094604 100644 --- a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-sync/1.schema.json +++ b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-sync/1.schema.json @@ -9,10 +9,21 @@ } ], "properties": { - "schema": { "const": "xcodebuildmcp.output.xcode-bridge-sync" }, - "schemaVersion": { "const": "1" }, - "didError": { "type": "boolean" }, - "error": { "type": ["string", "null"] }, + "schema": { + "const": "xcodebuildmcp.output.xcode-bridge-sync" + }, + "schemaVersion": { + "const": "1" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, "data": { "type": "object", "additionalProperties": false, @@ -21,19 +32,45 @@ "type": "object", "additionalProperties": false, "properties": { - "added": { "type": "integer", "minimum": 0 }, - "updated": { "type": "integer", "minimum": 0 }, - "removed": { "type": "integer", "minimum": 0 }, - "total": { "type": "integer", "minimum": 0 } + "added": { + "type": "integer", + "minimum": 0 + }, + "updated": { + "type": "integer", + "minimum": 0 + }, + "removed": { + "type": "integer", + "minimum": 0 + }, + "total": { + "type": "integer", + "minimum": 0 + } }, - "required": ["added", "updated", "removed", "total"] + "required": [ + "added", + "updated", + "removed", + "total" + ] }, "status": { "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/bridgeStatus" } }, - "required": ["sync", "status"] + "required": [ + "sync", + "status" + ] } }, - "required": ["schema", "schemaVersion", "didError", "error", "data"] + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] } diff --git a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-sync/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-sync/2.schema.json new file mode 100644 index 000000000..e95a78d06 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-sync/2.schema.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-sync/2.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "properties": { + "schema": { + "const": "xcodebuildmcp.output.xcode-bridge-sync" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "sync": { + "type": "object", + "additionalProperties": false, + "properties": { + "added": { + "type": "integer", + "minimum": 0 + }, + "updated": { + "type": "integer", + "minimum": 0 + }, + "removed": { + "type": "integer", + "minimum": 0 + }, + "total": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "added", + "updated", + "removed", + "total" + ] + }, + "status": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/bridgeStatus" + } + }, + "required": [ + "sync", + "status" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/1.schema.json b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/1.schema.json index 339cd76dc..6924f51c2 100644 --- a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/1.schema.json +++ b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/1.schema.json @@ -11,45 +11,103 @@ "$defs": { "schemaValue": { "oneOf": [ - { "type": "object", "additionalProperties": true }, - { "type": "boolean" }, - { "type": "null" } + { + "type": "object", + "additionalProperties": true + }, + { + "type": "boolean" + }, + { + "type": "null" + } ] }, "toolDescriptor": { "type": "object", "additionalProperties": false, "properties": { - "name": { "type": "string" }, - "title": { "type": ["string", "null"] }, - "description": { "type": ["string", "null"] }, - "inputSchema": { "$ref": "#/$defs/schemaValue" }, - "outputSchema": { "$ref": "#/$defs/schemaValue" }, + "name": { + "type": "string" + }, + "title": { + "type": [ + "string", + "null" + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "inputSchema": { + "$ref": "#/$defs/schemaValue" + }, + "outputSchema": { + "$ref": "#/$defs/schemaValue" + }, "annotations": { - "type": ["object", "null"], + "type": [ + "object", + "null" + ], "additionalProperties": true } }, - "required": ["name", "title", "description", "inputSchema", "outputSchema", "annotations"] + "required": [ + "name", + "title", + "description", + "inputSchema", + "outputSchema", + "annotations" + ] } }, "properties": { - "schema": { "const": "xcodebuildmcp.output.xcode-bridge-tool-list" }, - "schemaVersion": { "const": "1" }, - "didError": { "type": "boolean" }, - "error": { "type": ["string", "null"] }, + "schema": { + "const": "xcodebuildmcp.output.xcode-bridge-tool-list" + }, + "schemaVersion": { + "const": "1" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, "data": { "type": "object", "additionalProperties": false, "properties": { - "toolCount": { "type": "integer", "minimum": 0 }, + "toolCount": { + "type": "integer", + "minimum": 0 + }, "tools": { "type": "array", - "items": { "$ref": "#/$defs/toolDescriptor" } + "items": { + "$ref": "#/$defs/toolDescriptor" + } } }, - "required": ["toolCount", "tools"] + "required": [ + "toolCount", + "tools" + ] } }, - "required": ["schema", "schemaVersion", "didError", "error", "data"] + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] } diff --git a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/2.schema.json b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/2.schema.json index 2f5f4addf..0dee59773 100644 --- a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/2.schema.json +++ b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/2.schema.json @@ -13,25 +13,53 @@ "type": "object", "additionalProperties": false, "properties": { - "rawResponseJsonPath": { "type": "string" } + "rawResponseJsonPath": { + "type": "string" + } }, - "required": ["rawResponseJsonPath"] + "required": [ + "rawResponseJsonPath" + ] } }, "properties": { - "schema": { "const": "xcodebuildmcp.output.xcode-bridge-tool-list" }, - "schemaVersion": { "const": "2" }, - "didError": { "type": "boolean" }, - "error": { "type": ["string", "null"] }, + "schema": { + "const": "xcodebuildmcp.output.xcode-bridge-tool-list" + }, + "schemaVersion": { + "const": "2" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, "data": { "type": "object", "additionalProperties": false, "properties": { - "toolCount": { "type": "integer", "minimum": 0 }, - "artifacts": { "$ref": "#/$defs/artifacts" } + "toolCount": { + "type": "integer", + "minimum": 0 + }, + "artifacts": { + "$ref": "#/$defs/artifacts" + } }, - "required": ["toolCount"] + "required": [ + "toolCount" + ] } }, - "required": ["schema", "schemaVersion", "didError", "error", "data"] + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] } diff --git a/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/3.schema.json b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/3.schema.json new file mode 100644 index 000000000..f7ba93259 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/3.schema.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://xcodebuildmcp.com/schemas/structured-output/xcodebuildmcp.output.xcode-bridge-tool-list/3.schema.json", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency" + } + ], + "$defs": { + "artifacts": { + "type": "object", + "additionalProperties": false, + "properties": { + "rawResponseJsonPath": { + "type": "string" + } + }, + "required": [ + "rawResponseJsonPath" + ] + } + }, + "properties": { + "schema": { + "const": "xcodebuildmcp.output.xcode-bridge-tool-list" + }, + "schemaVersion": { + "const": "3" + }, + "didError": { + "type": "boolean" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "object", + "additionalProperties": false, + "properties": { + "toolCount": { + "type": "integer", + "minimum": 0 + }, + "artifacts": { + "$ref": "#/$defs/artifacts" + } + }, + "required": [ + "toolCount" + ] + }, + "nextSteps": { + "$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/nextSteps" + } + }, + "required": [ + "schema", + "schemaVersion", + "didError", + "error", + "data" + ] +} diff --git a/src/cli.ts b/src/cli.ts index 9777a3e2f..3c125f9f8 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -76,7 +76,7 @@ async function buildLightweightYargsApp(): Promise { + stdoutChunks.push(String(chunk)); + return true; + }); + return stdoutChunks; +} + +function createBuildResultTool(options: { emitStatus?: boolean; includeNextSteps?: boolean } = {}) { + return createTool({ + handler: vi.fn(async (_args, ctx) => { + if (!ctx) { + return; + } + if (options.emitStatus) { + ctx.emit({ + kind: 'presentation', + fragment: 'status', + level: 'info', + message: 'Starting work', + }); + } + ctx.structuredOutput = { + schema: 'xcodebuildmcp.output.build-result', + schemaVersion: '2', + result: { + kind: 'build-result', + didError: false, + error: null, + request: { + scheme: 'CalculatorApp', + workspacePath: 'CalculatorApp.xcworkspace', + }, + summary: { status: 'SUCCEEDED', durationMs: 1234, target: 'simulator' }, + artifacts: { buildLogPath: '/tmp/build.log' }, + diagnostics: { warnings: [], errors: [] }, + }, + }; + if (options.includeNextSteps) { + ctx.nextSteps = [ + { + tool: 'get_sim_app_path', + cliTool: 'get-app-path', + workflow: 'simulator', + label: 'Get app path', + params: { scheme: 'CalculatorApp' }, + when: 'success', + }, + ]; + } + }) as ToolDefinition['handler'], + }); +} + +function createAppPathTool() { + return createTool({ + handler: vi.fn(async (_args, ctx) => { + if (ctx) { + ctx.structuredOutput = { + schema: 'xcodebuildmcp.output.app-path', + schemaVersion: '2', + result: { + kind: 'app-path', + didError: false, + error: null, + request: { + scheme: 'CalculatorApp', + workspacePath: 'CalculatorApp.xcworkspace', + }, + artifacts: { appPath: '/tmp/MyApp.app' }, + diagnostics: { warnings: [], errors: [] }, + }, + }; + } + }) as ToolDefinition['handler'], + }); +} + describe('registerToolCommands', () => { const originalArgv = process.argv; @@ -430,6 +514,92 @@ describe('registerToolCommands', () => { expect(stdoutChunks.join('')).not.toContain('└ App Path: /tmp/MyApp.app'); }); + it('keeps full request payloads in default json output', async () => { + mockInvokeDirectThroughHandler(); + const stdoutChunks = captureStdoutChunks(); + const app = createApp(createCatalog([createBuildResultTool()])); + + await expect( + app.parseAsync(['simulator', 'run-tool', '--output', 'json']), + ).resolves.toBeDefined(); + + expect(JSON.parse(stdoutChunks.join(''))).toEqual({ + schema: 'xcodebuildmcp.output.build-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + request: { + scheme: 'CalculatorApp', + workspacePath: 'CalculatorApp.xcworkspace', + }, + summary: { status: 'SUCCEEDED', durationMs: 1234, target: 'simulator' }, + artifacts: { buildLogPath: '/tmp/build.log' }, + diagnostics: { warnings: [], errors: [] }, + }, + }); + }); + + it('prunes request payloads but preserves CLI next steps for minimal json output', async () => { + mockInvokeDirectThroughHandler(); + const stdoutChunks = captureStdoutChunks(); + const app = createApp(createCatalog([createBuildResultTool({ includeNextSteps: true })])); + + await expect( + app.parseAsync(['simulator', 'run-tool', '--style', 'minimal', '--output', 'json']), + ).resolves.toBeDefined(); + + expect(JSON.parse(stdoutChunks.join(''))).toEqual({ + schema: 'xcodebuildmcp.output.build-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + summary: { status: 'SUCCEEDED', durationMs: 1234, target: 'simulator' }, + artifacts: { buildLogPath: '/tmp/build.log' }, + diagnostics: { warnings: [], errors: [] }, + }, + nextSteps: ['Get app path: xcodebuildmcp simulator get-app-path --scheme CalculatorApp'], + }); + }); + + it('uses compact headerless tree artifact formatting for minimal text output', async () => { + mockInvokeDirectThroughHandler(); + const stdoutChunks = captureStdoutChunks(); + const app = createApp(createCatalog([createAppPathTool()])); + + await expect( + app.parseAsync(['simulator', 'run-tool', '--style', 'minimal']), + ).resolves.toBeDefined(); + + const output = stdoutChunks.join(''); + expect(output).not.toContain('Scheme: CalculatorApp'); + expect(output).not.toContain('Workspace: CalculatorApp.xcworkspace'); + expect(output).toContain('└── /tmp/MyApp.app — App Path'); + expect(output).not.toContain('└ App Path: /tmp/MyApp.app'); + }); + + it('lets explicit file path render style override minimal text defaults', async () => { + mockInvokeDirectThroughHandler(); + const stdoutChunks = captureStdoutChunks(); + const app = createApp(createCatalog([createAppPathTool()])); + + await expect( + app.parseAsync([ + 'simulator', + 'run-tool', + '--style', + 'minimal', + '--file-path-render-style', + 'list', + ]), + ).resolves.toBeDefined(); + + const output = stdoutChunks.join(''); + expect(output).toContain('└ App Path: /tmp/MyApp.app'); + expect(output).not.toContain('└── /tmp/MyApp.app — App Path'); + }); + it('writes a structured envelope for tools that provide structured output', async () => { mockInvokeDirectThroughHandler(); const stdoutChunks: string[] = []; @@ -466,6 +636,16 @@ describe('registerToolCommands', () => { ], }, }; + ctx.nextSteps = [ + { + tool: 'boot_sim', + cliTool: 'boot', + workflow: 'simulator', + label: 'Boot this simulator', + params: { simulatorId: 'test-uuid-123' }, + when: 'success', + }, + ]; } }) as ToolDefinition['handler'], }); @@ -493,6 +673,9 @@ describe('registerToolCommands', () => { }, ], }, + nextSteps: [ + 'Boot this simulator: xcodebuildmcp simulator boot --simulator-id test-uuid-123', + ], }, null, 2, @@ -549,6 +732,28 @@ describe('registerToolCommands', () => { ); }); + it('emits the same fragment-only jsonl output for minimal style', async () => { + mockInvokeDirectThroughHandler(); + const stdoutChunks = captureStdoutChunks(); + const app = createApp(createCatalog([createBuildResultTool({ emitStatus: true })])); + + await expect( + app.parseAsync(['simulator', 'run-tool', '--output', 'jsonl']), + ).resolves.toBeDefined(); + const normalOutput = stdoutChunks.join(''); + + stdoutChunks.length = 0; + + await expect( + app.parseAsync(['simulator', 'run-tool', '--style', 'minimal', '--output', 'jsonl']), + ).resolves.toBeDefined(); + + expect(stdoutChunks.join('')).toBe(normalOutput); + expect(normalOutput).toBe( + `${JSON.stringify({ event: 'presentation.status', level: 'info', message: 'Starting work' })}\n`, + ); + }); + it('does not duplicate daemon-streamed fragments for jsonl output', async () => { const streamedFragment = { kind: 'transcript', @@ -612,6 +817,13 @@ describe('registerToolCommands', () => { level: 'info', message: 'legacy event', }); + if (ctx) { + ctx.nextSteps = [ + { + label: 'Should not be included without structured output', + }, + ]; + } }) as ToolDefinition['handler'], }); const app = createApp(createCatalog([tool])); diff --git a/src/cli/register-tool-commands.ts b/src/cli/register-tool-commands.ts index 4c8d6107a..da4f66c7d 100644 --- a/src/cli/register-tool-commands.ts +++ b/src/cli/register-tool-commands.ts @@ -9,6 +9,7 @@ import { groupToolsByWorkflow } from '../runtime/tool-catalog.ts'; import { getWorkflowMetadataFromManifest } from '../core/manifest/load-manifest.ts'; import type { ResolvedRuntimeConfig } from '../utils/config-store.ts'; import type { ToolHandlerContext } from '../rendering/types.ts'; +import type { OutputStyle } from '../types/common.ts'; import type { FilePathRenderStyle } from '../utils/runtime-config-types.ts'; import type { AnyFragment } from '../types/domain-fragments.ts'; import { transcriptEmitterStorage } from '../utils/transcript-context.ts'; @@ -92,14 +93,21 @@ function createBufferedHandlerContext( }; } -function writeJsonOutput(handlerContext: ToolHandlerContext): boolean { - const structuredOutput = handlerContext.structuredOutput; - +function writeJsonOutput( + handlerContext: ToolHandlerContext, + session: ReturnType, + outputStyle: OutputStyle, +): boolean { + const { structuredOutput } = handlerContext; const envelope = structuredOutput ? toStructuredEnvelope( structuredOutput.result, structuredOutput.schema, structuredOutput.schemaVersion, + { + nextSteps: session.getNextSteps?.(), + outputStyle, + }, ) : toStructuredEnvelope( createStructuredErrorOutput({ @@ -109,6 +117,7 @@ function writeJsonOutput(handlerContext: ToolHandlerContext): boolean { }).result, STRUCTURED_ERROR_SCHEMA, STRUCTURED_ERROR_SCHEMA_VERSION, + { outputStyle }, ); process.stdout.write(JSON.stringify(envelope, null, 2) + '\n'); @@ -275,6 +284,7 @@ function registerToolSubcommand( const jsonArg = argv.json as string | undefined; const profileOverride = argv.profile as string | undefined; const outputFormat = (argv.output as OutputFormat) ?? 'text'; + const outputStyle: OutputStyle = argv.style === 'minimal' ? 'minimal' : 'normal'; const socketPath = argv.socket as string; const logLevel = argv['log-level'] as string | undefined; const filePathRenderStyle = argv.filePathRenderStyle as FilePathRenderStyle | undefined; @@ -361,6 +371,7 @@ function registerToolSubcommand( const session = createRenderSession(renderStrategy, { interactive: outputFormat === 'text' && process.stdout.isTTY === true, runtime: 'cli', + outputStyle, filePathRenderStyle, }); const writeJsonlFragment = @@ -395,7 +406,7 @@ function registerToolSubcommand( } if (outputFormat === 'json') { - if (writeJsonOutput(handlerContext)) { + if (writeJsonOutput(handlerContext, session, outputStyle)) { process.exitCode = 1; } return; diff --git a/src/cli/yargs-app.ts b/src/cli/yargs-app.ts index f9836d265..874e3b0f7 100644 --- a/src/cli/yargs-app.ts +++ b/src/cli/yargs-app.ts @@ -51,7 +51,7 @@ export function buildYargsApp(opts: YargsAppOptions): ReturnType { }) .option('style', { type: 'string', - describe: 'Output verbosity (minimal hides next steps)', + describe: 'Output style (normal is detailed; minimal is compact MCP-like output)', choices: ['normal', 'minimal'] as const, default: 'normal', }) diff --git a/src/core/__tests__/structured-output-schema.test.ts b/src/core/__tests__/structured-output-schema.test.ts index af8ce4b1b..75cb203d4 100644 --- a/src/core/__tests__/structured-output-schema.test.ts +++ b/src/core/__tests__/structured-output-schema.test.ts @@ -127,6 +127,211 @@ describe('structured output schema bundling', () => { expectStandaloneCompile(jsonSchema); }); + it('rejects nextSteps against the immutable v1 contract', () => { + const schema = getMcpOutputSchema({ + schema: 'xcodebuildmcp.output.build-result', + version: '1', + }); + const ajv = new Ajv2020({ allErrors: true, strict: true, validateSchema: true }); + const validate = ajv.compile(schema); + + expect( + validate({ + schema: 'xcodebuildmcp.output.build-result', + schemaVersion: '1', + didError: false, + error: null, + data: { + summary: { + status: 'SUCCEEDED', + durationMs: 1234, + target: 'simulator', + }, + artifacts: { + buildLogPath: '~/Library/Developer/XcodeBuildMCP/logs/build.log', + }, + diagnostics: { + warnings: [], + errors: [], + }, + }, + nextSteps: ['Get app path: get_sim_app_path({ scheme: "CalculatorApp" })'], + }), + ).toBe(false); + }); + + it('accepts non-error structured envelopes with nextSteps in the bumped contract', () => { + const schema = getMcpOutputSchema({ + schema: 'xcodebuildmcp.output.build-result', + version: '2', + }); + const ajv = new Ajv2020({ allErrors: true, strict: true, validateSchema: true }); + const validate = ajv.compile(schema); + + expect( + validate({ + schema: 'xcodebuildmcp.output.build-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + summary: { + status: 'SUCCEEDED', + durationMs: 1234, + target: 'simulator', + }, + artifacts: { + buildLogPath: '~/Library/Developer/XcodeBuildMCP/logs/build.log', + }, + diagnostics: { + warnings: [], + errors: [], + }, + }, + nextSteps: ['Get app path: get_sim_app_path({ scheme: "CalculatorApp" })'], + }), + ).toBe(true); + }); + + it('accepts normal and minimal request-bearing envelopes in the bumped contracts', () => { + const ajv = new Ajv2020({ allErrors: true, strict: true, validateSchema: true }); + const cases = [ + { + schema: getMcpOutputSchema({ schema: 'xcodebuildmcp.output.build-result', version: '2' }), + normal: { + schema: 'xcodebuildmcp.output.build-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + request: { scheme: 'CalculatorApp', workspacePath: 'CalculatorApp.xcworkspace' }, + summary: { status: 'SUCCEEDED', durationMs: 1234, target: 'simulator' }, + artifacts: { buildLogPath: '~/Library/Developer/XcodeBuildMCP/logs/build.log' }, + diagnostics: { warnings: [], errors: [] }, + }, + nextSteps: ['Get app path: xcodebuildmcp simulator get-app-path --scheme CalculatorApp'], + }, + minimal: { + schema: 'xcodebuildmcp.output.build-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + summary: { status: 'SUCCEEDED', durationMs: 1234, target: 'simulator' }, + artifacts: { buildLogPath: '~/Library/Developer/XcodeBuildMCP/logs/build.log' }, + diagnostics: { warnings: [], errors: [] }, + }, + nextSteps: ['Get app path: xcodebuildmcp simulator get-app-path --scheme CalculatorApp'], + }, + }, + { + schema: getMcpOutputSchema({ + schema: 'xcodebuildmcp.output.build-run-result', + version: '2', + }), + normal: { + schema: 'xcodebuildmcp.output.build-run-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + request: { scheme: 'CalculatorApp', workspacePath: 'CalculatorApp.xcworkspace' }, + summary: { status: 'SUCCEEDED', durationMs: 1234, target: 'simulator' }, + artifacts: { appPath: '/tmp/CalculatorApp.app', processId: 1234 }, + diagnostics: { warnings: [], errors: [] }, + }, + }, + minimal: { + schema: 'xcodebuildmcp.output.build-run-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + summary: { status: 'SUCCEEDED', durationMs: 1234, target: 'simulator' }, + artifacts: { appPath: '/tmp/CalculatorApp.app', processId: 1234 }, + diagnostics: { warnings: [], errors: [] }, + }, + }, + }, + { + schema: getMcpOutputSchema({ schema: 'xcodebuildmcp.output.test-result', version: '2' }), + normal: { + schema: 'xcodebuildmcp.output.test-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + request: { scheme: 'CalculatorApp', workspacePath: 'CalculatorApp.xcworkspace' }, + summary: { + status: 'SUCCEEDED', + durationMs: 1234, + target: 'simulator', + counts: { passed: 1, failed: 0, skipped: 0 }, + }, + artifacts: { xcresultPath: '/tmp/result.xcresult' }, + diagnostics: { warnings: [], errors: [], testFailures: [] }, + }, + }, + minimal: { + schema: 'xcodebuildmcp.output.test-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + summary: { + status: 'SUCCEEDED', + durationMs: 1234, + target: 'simulator', + counts: { passed: 1, failed: 0, skipped: 0 }, + }, + artifacts: { xcresultPath: '/tmp/result.xcresult' }, + diagnostics: { warnings: [], errors: [], testFailures: [] }, + }, + }, + }, + { + schema: getMcpOutputSchema({ schema: 'xcodebuildmcp.output.app-path', version: '2' }), + normal: { + schema: 'xcodebuildmcp.output.app-path', + schemaVersion: '2', + didError: false, + error: null, + data: { + request: { scheme: 'CalculatorApp', platform: 'iOS Simulator' }, + artifacts: { appPath: '/tmp/CalculatorApp.app' }, + diagnostics: { warnings: [], errors: [] }, + }, + }, + minimal: { + schema: 'xcodebuildmcp.output.app-path', + schemaVersion: '2', + didError: false, + error: null, + data: { + artifacts: { appPath: '/tmp/CalculatorApp.app' }, + diagnostics: { warnings: [], errors: [] }, + }, + }, + }, + ]; + + const failures: string[] = []; + for (const testCase of cases) { + const validate = ajv.compile(testCase.schema); + for (const [style, envelope] of [ + ['normal', testCase.normal], + ['minimal', testCase.minimal], + ] as const) { + if (!validate(envelope)) { + const envelopeSchema = (envelope as { schema: string }).schema; + failures.push(`${envelopeSchema} ${style}: ${JSON.stringify(validate.errors)}`); + } + } + } + + expect(failures).toEqual([]); + }); + it('accepts structured error envelopes in registered output schemas', () => { const outputSchema = getMcpOutputSchemaForRegistration({ schema: 'xcodebuildmcp.output.simulator-list', @@ -153,7 +358,7 @@ describe('structured output schema bundling', () => { it('accepts xcode bridge call-result artifacts', () => { const schema = getMcpOutputSchema({ schema: 'xcodebuildmcp.output.xcode-bridge-call-result', - version: '2', + version: '3', }); const ajv = new Ajv2020({ allErrors: true, strict: true, validateSchema: true }); const validate = ajv.compile(schema); @@ -161,7 +366,7 @@ describe('structured output schema bundling', () => { expect( validate({ schema: 'xcodebuildmcp.output.xcode-bridge-call-result', - schemaVersion: '2', + schemaVersion: '3', didError: false, error: null, data: { @@ -176,6 +381,36 @@ describe('structured output schema bundling', () => { ).toBe(true); }); + it('every manifest-declared output schema uses a bumped contract that accepts optional top-level nextSteps', () => { + const manifest = loadManifest(); + const failures: string[] = []; + + for (const tool of manifest.tools.values()) { + if (!tool.outputSchema) { + continue; + } + + try { + const schema = getMcpOutputSchema(tool.outputSchema); + const properties = schema.properties as JsonObject | undefined; + const required = schema.required as unknown[] | undefined; + const nextSteps = properties?.nextSteps as JsonObject | undefined; + + if (!nextSteps) { + failures.push(`${tool.id}: missing optional top-level nextSteps`); + } + if (required?.includes('nextSteps')) { + failures.push(`${tool.id}: nextSteps must stay optional`); + } + } catch (error) { + const message = error instanceof Error ? error.message : String(error); + failures.push(`${tool.id}: ${message}`); + } + } + + expect(failures).toEqual([]); + }); + it('resolves every manifest-declared output schema', () => { const manifest = loadManifest(); const failures: string[] = []; diff --git a/src/mcp/tools/coverage/get_coverage_report.ts b/src/mcp/tools/coverage/get_coverage_report.ts index 194d7207d..93f8dcb7f 100644 --- a/src/mcp/tools/coverage/get_coverage_report.ts +++ b/src/mcp/tools/coverage/get_coverage_report.ts @@ -120,7 +120,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: GetCoverageReportR ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.coverage-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/coverage/get_file_coverage.ts b/src/mcp/tools/coverage/get_file_coverage.ts index 053ad28f7..9fb05d12c 100644 --- a/src/mcp/tools/coverage/get_file_coverage.ts +++ b/src/mcp/tools/coverage/get_file_coverage.ts @@ -129,7 +129,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: GetFileCoverageRes ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.coverage-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/debugging/debug_attach_sim.ts b/src/mcp/tools/debugging/debug_attach_sim.ts index 8d256f767..b2360ceae 100644 --- a/src/mcp/tools/debugging/debug_attach_sim.ts +++ b/src/mcp/tools/debugging/debug_attach_sim.ts @@ -104,7 +104,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: DebugAttachSimResu ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.debug-session-action', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/debugging/debug_breakpoint_add.ts b/src/mcp/tools/debugging/debug_breakpoint_add.ts index f6698847a..58b7abfa2 100644 --- a/src/mcp/tools/debugging/debug_breakpoint_add.ts +++ b/src/mcp/tools/debugging/debug_breakpoint_add.ts @@ -90,7 +90,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: DebugBreakpointAdd ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.debug-breakpoint-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/debugging/debug_breakpoint_remove.ts b/src/mcp/tools/debugging/debug_breakpoint_remove.ts index 4dd99b014..a468b0274 100644 --- a/src/mcp/tools/debugging/debug_breakpoint_remove.ts +++ b/src/mcp/tools/debugging/debug_breakpoint_remove.ts @@ -49,7 +49,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: DebugBreakpointRem ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.debug-breakpoint-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/debugging/debug_continue.ts b/src/mcp/tools/debugging/debug_continue.ts index e42e924d9..4abeb6766 100644 --- a/src/mcp/tools/debugging/debug_continue.ts +++ b/src/mcp/tools/debugging/debug_continue.ts @@ -54,7 +54,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: DebugContinueResul ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.debug-session-action', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/debugging/debug_detach.ts b/src/mcp/tools/debugging/debug_detach.ts index 6633c2d87..d8182203e 100644 --- a/src/mcp/tools/debugging/debug_detach.ts +++ b/src/mcp/tools/debugging/debug_detach.ts @@ -53,7 +53,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: DebugDetachResult) ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.debug-session-action', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/debugging/debug_lldb_command.ts b/src/mcp/tools/debugging/debug_lldb_command.ts index 3dff8a36d..a3793d083 100644 --- a/src/mcp/tools/debugging/debug_lldb_command.ts +++ b/src/mcp/tools/debugging/debug_lldb_command.ts @@ -53,7 +53,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: DebugLldbCommandRe ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.debug-command-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/debugging/debug_stack.ts b/src/mcp/tools/debugging/debug_stack.ts index c9d09a1b9..4e577e548 100644 --- a/src/mcp/tools/debugging/debug_stack.ts +++ b/src/mcp/tools/debugging/debug_stack.ts @@ -51,7 +51,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: DebugStackResult): ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.debug-stack-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/debugging/debug_variables.ts b/src/mcp/tools/debugging/debug_variables.ts index 2541085d8..d77a5072e 100644 --- a/src/mcp/tools/debugging/debug_variables.ts +++ b/src/mcp/tools/debugging/debug_variables.ts @@ -50,7 +50,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: DebugVariablesResu ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.debug-variables-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/device/list_devices.ts b/src/mcp/tools/device/list_devices.ts index c6131a015..65712a81a 100644 --- a/src/mcp/tools/device/list_devices.ts +++ b/src/mcp/tools/device/list_devices.ts @@ -114,7 +114,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: ListDevicesResult) ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.device-list', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/doctor/doctor.ts b/src/mcp/tools/doctor/doctor.ts index 52ba7bb30..acb673dd9 100644 --- a/src/mcp/tools/doctor/doctor.ts +++ b/src/mcp/tools/doctor/doctor.ts @@ -423,7 +423,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: DoctorResult): voi ctx.structuredOutput = { result, schema: STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/project-discovery/discover_projs.ts b/src/mcp/tools/project-discovery/discover_projs.ts index 94c82cee8..1f5cf4273 100644 --- a/src/mcp/tools/project-discovery/discover_projs.ts +++ b/src/mcp/tools/project-discovery/discover_projs.ts @@ -301,7 +301,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: DiscoverProjsResul ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.project-list', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/project-discovery/list_schemes.ts b/src/mcp/tools/project-discovery/list_schemes.ts index 390146112..7fb810c9a 100644 --- a/src/mcp/tools/project-discovery/list_schemes.ts +++ b/src/mcp/tools/project-discovery/list_schemes.ts @@ -101,7 +101,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: ListSchemesResult) ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.scheme-list', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/project-discovery/show_build_settings.ts b/src/mcp/tools/project-discovery/show_build_settings.ts index 221131aa9..8b2eb3bfc 100644 --- a/src/mcp/tools/project-discovery/show_build_settings.ts +++ b/src/mcp/tools/project-discovery/show_build_settings.ts @@ -108,7 +108,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: ShowBuildSettingsR ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.build-settings', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/project-scaffolding/domain-result.ts b/src/mcp/tools/project-scaffolding/domain-result.ts index 0c93eda09..2747ce9d7 100644 --- a/src/mcp/tools/project-scaffolding/domain-result.ts +++ b/src/mcp/tools/project-scaffolding/domain-result.ts @@ -36,6 +36,6 @@ export function setScaffoldStructuredOutput( ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.scaffold-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/session-management/session_clear_defaults.ts b/src/mcp/tools/session-management/session_clear_defaults.ts index 55a480176..583eefab2 100644 --- a/src/mcp/tools/session-management/session_clear_defaults.ts +++ b/src/mcp/tools/session-management/session_clear_defaults.ts @@ -83,7 +83,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SessionClearDefaul ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.session-defaults', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/session-management/session_set_defaults.ts b/src/mcp/tools/session-management/session_set_defaults.ts index edd0b00f2..c38f831ce 100644 --- a/src/mcp/tools/session-management/session_set_defaults.ts +++ b/src/mcp/tools/session-management/session_set_defaults.ts @@ -96,7 +96,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SessionSetDefaults ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.session-defaults', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/session-management/session_show_defaults.ts b/src/mcp/tools/session-management/session_show_defaults.ts index eaabd8683..a46327ba8 100644 --- a/src/mcp/tools/session-management/session_show_defaults.ts +++ b/src/mcp/tools/session-management/session_show_defaults.ts @@ -64,7 +64,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SessionShowDefault ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.session-defaults', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/session-management/session_use_defaults_profile.ts b/src/mcp/tools/session-management/session_use_defaults_profile.ts index 4f5eb7497..7ffa8ccb0 100644 --- a/src/mcp/tools/session-management/session_use_defaults_profile.ts +++ b/src/mcp/tools/session-management/session_use_defaults_profile.ts @@ -56,7 +56,7 @@ function setStructuredOutput( ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.session-profile', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/simulator-management/erase_sims.ts b/src/mcp/tools/simulator-management/erase_sims.ts index 9324a9c5c..a78081f02 100644 --- a/src/mcp/tools/simulator-management/erase_sims.ts +++ b/src/mcp/tools/simulator-management/erase_sims.ts @@ -53,7 +53,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: EraseSimsResult): ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.simulator-action-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/simulator-management/reset_sim_location.ts b/src/mcp/tools/simulator-management/reset_sim_location.ts index 0f5356955..b72889049 100644 --- a/src/mcp/tools/simulator-management/reset_sim_location.ts +++ b/src/mcp/tools/simulator-management/reset_sim_location.ts @@ -50,7 +50,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: ResetSimulatorLoca ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.simulator-action-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/simulator-management/set_sim_appearance.ts b/src/mcp/tools/simulator-management/set_sim_appearance.ts index 9b24d0c3f..804d48519 100644 --- a/src/mcp/tools/simulator-management/set_sim_appearance.ts +++ b/src/mcp/tools/simulator-management/set_sim_appearance.ts @@ -53,7 +53,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SetSimAppearanceRe ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.simulator-action-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/simulator-management/set_sim_location.ts b/src/mcp/tools/simulator-management/set_sim_location.ts index 2611cf6be..3fb1f7fef 100644 --- a/src/mcp/tools/simulator-management/set_sim_location.ts +++ b/src/mcp/tools/simulator-management/set_sim_location.ts @@ -58,7 +58,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SetSimulatorLocati ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.simulator-action-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/simulator-management/sim_statusbar.ts b/src/mcp/tools/simulator-management/sim_statusbar.ts index 6d3837403..cfc94b618 100644 --- a/src/mcp/tools/simulator-management/sim_statusbar.ts +++ b/src/mcp/tools/simulator-management/sim_statusbar.ts @@ -68,7 +68,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SimStatusbarResult ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.simulator-action-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/simulator-management/toggle_connect_hardware_keyboard.ts b/src/mcp/tools/simulator-management/toggle_connect_hardware_keyboard.ts index 530589063..41f3d66b9 100644 --- a/src/mcp/tools/simulator-management/toggle_connect_hardware_keyboard.ts +++ b/src/mcp/tools/simulator-management/toggle_connect_hardware_keyboard.ts @@ -54,7 +54,7 @@ function setStructuredOutput( ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.simulator-action-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/simulator-management/toggle_software_keyboard.ts b/src/mcp/tools/simulator-management/toggle_software_keyboard.ts index 899d0ed66..a56caaf27 100644 --- a/src/mcp/tools/simulator-management/toggle_software_keyboard.ts +++ b/src/mcp/tools/simulator-management/toggle_software_keyboard.ts @@ -51,7 +51,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: ToggleSoftwareKeyb ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.simulator-action-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/simulator/__tests__/list_sims.test.ts b/src/mcp/tools/simulator/__tests__/list_sims.test.ts index 07be94c54..bb70b110a 100644 --- a/src/mcp/tools/simulator/__tests__/list_sims.test.ts +++ b/src/mcp/tools/simulator/__tests__/list_sims.test.ts @@ -134,7 +134,7 @@ describe('list_sims tool', () => { expect(text).toContain('Shutdown'); expect(result.structuredOutput).toEqual({ schema: 'xcodebuildmcp.output.simulator-list', - schemaVersion: '1', + schemaVersion: '2', result: { kind: 'simulator-list', didError: false, @@ -214,7 +214,7 @@ describe('list_sims tool', () => { expect(result.isError).toBe(true); expect(result.structuredOutput).toEqual({ schema: 'xcodebuildmcp.output.simulator-list', - schemaVersion: '1', + schemaVersion: '2', result: { kind: 'simulator-list', didError: true, diff --git a/src/mcp/tools/simulator/boot_sim.ts b/src/mcp/tools/simulator/boot_sim.ts index eb6eac273..dce3d3f34 100644 --- a/src/mcp/tools/simulator/boot_sim.ts +++ b/src/mcp/tools/simulator/boot_sim.ts @@ -73,7 +73,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: BootSimResult): vo ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.simulator-action-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/simulator/list_sims.ts b/src/mcp/tools/simulator/list_sims.ts index 7c69275c4..aedff1420 100644 --- a/src/mcp/tools/simulator/list_sims.ts +++ b/src/mcp/tools/simulator/list_sims.ts @@ -176,7 +176,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SimulatorListResul ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.simulator-list', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/simulator/open_sim.ts b/src/mcp/tools/simulator/open_sim.ts index 0d2d75ec1..c07c4ff73 100644 --- a/src/mcp/tools/simulator/open_sim.ts +++ b/src/mcp/tools/simulator/open_sim.ts @@ -39,7 +39,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: OpenSimResult): vo ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.simulator-action-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/simulator/record_sim_video.ts b/src/mcp/tools/simulator/record_sim_video.ts index cfab39d0a..08fad302f 100644 --- a/src/mcp/tools/simulator/record_sim_video.ts +++ b/src/mcp/tools/simulator/record_sim_video.ts @@ -93,7 +93,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: RecordSimVideoResu ctx.structuredOutput = { result, schema: 'xcodebuildmcp.output.capture-result', - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/swift-package/swift_package_build.ts b/src/mcp/tools/swift-package/swift_package_build.ts index 81d5316de..8b9255dc3 100644 --- a/src/mcp/tools/swift-package/swift_package_build.ts +++ b/src/mcp/tools/swift-package/swift_package_build.ts @@ -43,7 +43,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SwiftPackageBuildR ctx.structuredOutput = { result, schema: STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/swift-package/swift_package_clean.ts b/src/mcp/tools/swift-package/swift_package_clean.ts index e824a2411..a2882772d 100644 --- a/src/mcp/tools/swift-package/swift_package_clean.ts +++ b/src/mcp/tools/swift-package/swift_package_clean.ts @@ -23,7 +23,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SwiftPackageCleanR ctx.structuredOutput = { result, schema: STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/swift-package/swift_package_list.ts b/src/mcp/tools/swift-package/swift_package_list.ts index 1252f5b07..2706ea1ce 100644 --- a/src/mcp/tools/swift-package/swift_package_list.ts +++ b/src/mcp/tools/swift-package/swift_package_list.ts @@ -24,7 +24,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: ProcessListDomainR ctx.structuredOutput = { result, schema: STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/swift-package/swift_package_run.ts b/src/mcp/tools/swift-package/swift_package_run.ts index ca6063430..e1478ef73 100644 --- a/src/mcp/tools/swift-package/swift_package_run.ts +++ b/src/mcp/tools/swift-package/swift_package_run.ts @@ -127,7 +127,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SwiftPackageRunRes ctx.structuredOutput = { result, schema: STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/swift-package/swift_package_stop.ts b/src/mcp/tools/swift-package/swift_package_stop.ts index 1967b4052..715efc2d8 100644 --- a/src/mcp/tools/swift-package/swift_package_stop.ts +++ b/src/mcp/tools/swift-package/swift_package_stop.ts @@ -88,7 +88,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SwiftPackageStopRe ctx.structuredOutput = { result, schema: STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/swift-package/swift_package_test.ts b/src/mcp/tools/swift-package/swift_package_test.ts index 1f027d88b..42f225fce 100644 --- a/src/mcp/tools/swift-package/swift_package_test.ts +++ b/src/mcp/tools/swift-package/swift_package_test.ts @@ -45,7 +45,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SwiftPackageTestRe ctx.structuredOutput = { result, schema: STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/ui-automation/shared/domain-result.ts b/src/mcp/tools/ui-automation/shared/domain-result.ts index 6b91c6a6c..0700a9896 100644 --- a/src/mcp/tools/ui-automation/shared/domain-result.ts +++ b/src/mcp/tools/ui-automation/shared/domain-result.ts @@ -154,7 +154,7 @@ export function setUiActionStructuredOutput( ctx.structuredOutput = { result, schema: UI_ACTION_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } @@ -165,6 +165,6 @@ export function setCaptureStructuredOutput( ctx.structuredOutput = { result, schema: CAPTURE_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/utilities/clean.ts b/src/mcp/tools/utilities/clean.ts index 8042e802c..011e9fad5 100644 --- a/src/mcp/tools/utilities/clean.ts +++ b/src/mcp/tools/utilities/clean.ts @@ -247,7 +247,7 @@ export async function cleanLogic(params: CleanParams, executor: CommandExecutor) const executeClean = createCleanExecutor(executor); const result = await executeClean(params); - ctx.structuredOutput = { result, schema: STRUCTURED_OUTPUT_SCHEMA, schemaVersion: '1' }; + ctx.structuredOutput = { result, schema: STRUCTURED_OUTPUT_SCHEMA, schemaVersion: '2' }; } const publicSchemaObject = baseSchemaObject.omit({ diff --git a/src/mcp/tools/workflow-discovery/manage_workflows.ts b/src/mcp/tools/workflow-discovery/manage_workflows.ts index d6c7c2179..d5f943fa8 100644 --- a/src/mcp/tools/workflow-discovery/manage_workflows.ts +++ b/src/mcp/tools/workflow-discovery/manage_workflows.ts @@ -51,7 +51,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: ManageWorkflowsRes ctx.structuredOutput = { result, schema: STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/xcode-ide/shared.ts b/src/mcp/tools/xcode-ide/shared.ts index ba943a82a..a619ed44e 100644 --- a/src/mcp/tools/xcode-ide/shared.ts +++ b/src/mcp/tools/xcode-ide/shared.ts @@ -73,7 +73,7 @@ export function finalizeBridgeToolExecution( executionContext: BridgeToolExecutionContext, result: ToolDomainResult, schema: string, - schemaVersion = '1', + schemaVersion = '2', ): void { ctx.structuredOutput = { result, diff --git a/src/mcp/tools/xcode-ide/sync_xcode_defaults.ts b/src/mcp/tools/xcode-ide/sync_xcode_defaults.ts index 4bf6bbe7e..86a2693be 100644 --- a/src/mcp/tools/xcode-ide/sync_xcode_defaults.ts +++ b/src/mcp/tools/xcode-ide/sync_xcode_defaults.ts @@ -90,7 +90,7 @@ function setStructuredOutput(ctx: ToolHandlerContext, result: SyncXcodeDefaultsR ctx.structuredOutput = { result, schema: STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/mcp/tools/xcode-ide/xcode_ide_call_tool.ts b/src/mcp/tools/xcode-ide/xcode_ide_call_tool.ts index 4b334d34f..852ffc304 100644 --- a/src/mcp/tools/xcode-ide/xcode_ide_call_tool.ts +++ b/src/mcp/tools/xcode-ide/xcode_ide_call_tool.ts @@ -56,7 +56,7 @@ export async function xcodeIdeCallToolLogic(params: Params): Promise { executionContext, result, 'xcodebuildmcp.output.xcode-bridge-call-result', - '2', + '3', ); } diff --git a/src/mcp/tools/xcode-ide/xcode_ide_list_tools.ts b/src/mcp/tools/xcode-ide/xcode_ide_list_tools.ts index 5175034e9..051784c28 100644 --- a/src/mcp/tools/xcode-ide/xcode_ide_list_tools.ts +++ b/src/mcp/tools/xcode-ide/xcode_ide_list_tools.ts @@ -43,7 +43,7 @@ export async function xcodeIdeListToolsLogic(params: Params): Promise { executionContext, result, 'xcodebuildmcp.output.xcode-bridge-tool-list', - '2', + '3', ); } diff --git a/src/rendering/__tests__/text-render-parity.test.ts b/src/rendering/__tests__/text-render-parity.test.ts index fbe4cac85..1caaf03a4 100644 --- a/src/rendering/__tests__/text-render-parity.test.ts +++ b/src/rendering/__tests__/text-render-parity.test.ts @@ -340,7 +340,7 @@ describe('text render parity', () => { expect(rendered).not.toContain('❌ Build failed. (⏱️ 9.9s)'); }); - it('omits header frontmatter for MCP runtime text transcripts', () => { + it('omits header frontmatter for minimal style text transcripts', () => { const output = renderTranscript( { items: [], @@ -364,7 +364,7 @@ describe('text render parity', () => { }, }, 'text', - { runtime: 'mcp' }, + { outputStyle: 'minimal' }, ); expect(output).toContain('🚀 Build & Run'); @@ -374,6 +374,37 @@ describe('text render parity', () => { expect(output).toContain('✅ Build succeeded. (⏱️ 5.0s)'); }); + it('defaults minimal style text transcripts to tree artifact paths unless explicitly overridden', () => { + const input = { + items: [], + structuredOutput: { + schema: 'xcodebuildmcp.output.app-path', + schemaVersion: '1.0.0', + result: { + kind: 'app-path' as const, + request: { + scheme: 'MyApp', + projectPath: '/tmp/MyApp.xcodeproj', + }, + didError: false, + error: null, + artifacts: { appPath: '/tmp/build/MyApp.app' }, + }, + }, + }; + + const minimalOutput = renderTranscript(input, 'text', { outputStyle: 'minimal' }); + const overriddenOutput = renderTranscript(input, 'text', { + outputStyle: 'minimal', + filePathRenderStyle: 'list', + }); + + expect(minimalOutput).toContain('└── /tmp/build/MyApp.app — App Path'); + expect(minimalOutput).not.toContain('└ App Path: /tmp/build/MyApp.app'); + expect(overriddenOutput).toContain('└ App Path: /tmp/build/MyApp.app'); + expect(overriddenOutput).not.toContain('└── /tmp/build/MyApp.app — App Path'); + }); + it('renders next steps in MCP tool-call syntax for MCP runtime text transcripts', () => { const fixture: TranscriptFixture = { progressEvents: [], @@ -621,7 +652,7 @@ describe('text render parity', () => { 'text', ); expect(output).toBe(captureCliText(fixture)); - expect(output).toContain('xcodebuildmcp macos get-app-path --scheme "MCPTest"'); + expect(output).toContain('xcodebuildmcp macos get-app-path --scheme MCPTest'); expect(output).not.toContain('get_mac_app_path({'); }); }); diff --git a/src/rendering/render.ts b/src/rendering/render.ts index f9eabae56..4ce03de0d 100644 --- a/src/rendering/render.ts +++ b/src/rendering/render.ts @@ -1,12 +1,9 @@ import type { AnyFragment } from '../types/domain-fragments.ts'; -import type { NextStep } from '../types/common.ts'; +import type { NextStep, OutputStyle } from '../types/common.ts'; +import type { RuntimeKind } from '../runtime/types.ts'; import { sessionStore } from '../utils/session-store.ts'; import { getConfig } from '../utils/config-store.ts'; -import { - normalizeRenderRuntime, - resolveFilePathRenderStyle, - type FilePathRenderRuntime, -} from '../utils/file-path-render-style.ts'; +import { resolveFilePathRenderStyle } from '../utils/file-path-render-style.ts'; import type { FilePathRenderStyle } from '../utils/runtime-config-types.ts'; import { createCliTextRenderer, @@ -94,7 +91,8 @@ function createRenderHooks( strategy: RenderStrategy, options: { interactive: boolean; - runtime?: FilePathRenderRuntime; + runtime?: RuntimeKind; + outputStyle?: OutputStyle; filePathRenderStyle?: FilePathRenderStyle; includeHeaderDetails?: boolean; }, @@ -102,13 +100,13 @@ function createRenderHooks( const suppressWarnings = sessionStore.get('suppressWarnings'); const config = getConfig(); const showTestTiming = config.showTestTiming; - const runtime = options.runtime ?? normalizeRenderRuntime(process.env.XCODEBUILDMCP_RUNTIME); + const outputStyle = options.outputStyle ?? 'normal'; const filePathRenderStyle = resolveFilePathRenderStyle({ explicit: options.filePathRenderStyle, configured: config.filePathRenderStyle, - runtime, + outputStyle, }); - const includeHeaderDetails = options.includeHeaderDetails ?? runtime !== 'mcp'; + const includeHeaderDetails = options.includeHeaderDetails ?? outputStyle !== 'minimal'; switch (strategy) { case 'text': @@ -177,7 +175,8 @@ function createRenderHooks( export interface RenderSessionOptions { interactive?: boolean; - runtime?: FilePathRenderRuntime; + runtime?: RuntimeKind; + outputStyle?: OutputStyle; filePathRenderStyle?: FilePathRenderStyle; includeHeaderDetails?: boolean; } @@ -194,7 +193,10 @@ export function createRenderSession( export function renderTranscript( input: RenderTranscriptInput, strategy: RenderStrategy, - options?: Pick, + options?: Pick< + RenderSessionOptions, + 'runtime' | 'outputStyle' | 'filePathRenderStyle' | 'includeHeaderDetails' + >, ): string { return createRenderHooks(strategy, { ...options, interactive: false }).finalize(input); } diff --git a/src/runtime/__tests__/tool-invoker.test.ts b/src/runtime/__tests__/tool-invoker.test.ts index 397a2fdd8..73a5e0fb8 100644 --- a/src/runtime/__tests__/tool-invoker.test.ts +++ b/src/runtime/__tests__/tool-invoker.test.ts @@ -661,7 +661,7 @@ describe('DefaultToolInvoker next steps post-processing', () => { const text = response.content.map((c) => (c.type === 'text' ? c.text : '')).join('\n'); expect(text).toContain('Next steps:'); expect(text).toContain('Take screenshot'); - expect(text).toContain('xcodebuildmcp ui-automation screenshot --simulator-id "123"'); + expect(text).toContain('xcodebuildmcp ui-automation screenshot --simulator-id 123'); }); it('injects manifest template next steps from dynamic nextStepParams when response omits nextSteps', async () => { diff --git a/src/types/common.ts b/src/types/common.ts index 5d8cbbba8..3534c2c6d 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -36,9 +36,9 @@ export type NextStepParams = Record; export type NextStepParamsMap = Record; /** - * Output style controls verbosity of tool responses. - * - 'normal': Full output including next steps - * - 'minimal': Essential result only, no next steps + * Output style controls compactness of final tool output. + * - 'normal': Detailed, human-friendly CLI text and JSON output + * - 'minimal': Compact MCP-like text and JSON output while preserving next steps */ export type OutputStyle = 'normal' | 'minimal'; diff --git a/src/types/structured-output.ts b/src/types/structured-output.ts index 5fe86dbb7..1dd56dae0 100644 --- a/src/types/structured-output.ts +++ b/src/types/structured-output.ts @@ -4,4 +4,5 @@ export interface StructuredOutputEnvelope { didError: boolean; error: string | null; data: TData | null; + nextSteps?: string[]; } diff --git a/src/utils/__tests__/structured-output-envelope.test.ts b/src/utils/__tests__/structured-output-envelope.test.ts index 0356112c7..8c05d7044 100644 --- a/src/utils/__tests__/structured-output-envelope.test.ts +++ b/src/utils/__tests__/structured-output-envelope.test.ts @@ -1,9 +1,11 @@ import { describe, expect, it } from 'vitest'; import { toStructuredEnvelope } from '../structured-output-envelope.ts'; +import type { NextStep } from '../../types/common.ts'; import type { BuildResultDomainResult, DeviceListDomainResult, } from '../../types/domain-results.ts'; +import type { StructuredOutputEnvelope } from '../../types/structured-output.ts'; describe('toStructuredEnvelope', () => { it('strips kind, didError, and error from the data payload', () => { @@ -49,4 +51,319 @@ describe('toStructuredEnvelope', () => { data: null, }); }); + + it('omits nextSteps when no serializable steps are provided', () => { + const result: BuildResultDomainResult = { + kind: 'build-result', + didError: true, + error: 'Build failed', + }; + const expectedEnvelope = { + schema: 'xcodebuildmcp.output.build-result', + schemaVersion: '1', + didError: true, + error: 'Build failed', + data: null, + }; + + expect( + toStructuredEnvelope(result, 'xcodebuildmcp.output.build-result', '1', { nextSteps: [] }), + ).toEqual(expectedEnvelope); + }); + + it('serializes next steps as rendered CLI command lines by default sorted by priority', () => { + const result: DeviceListDomainResult = { + kind: 'device-list', + didError: false, + error: null, + devices: [], + }; + const nextSteps: NextStep[] = [ + { + tool: 'launch_app_sim', + cliTool: 'launch-app', + workflow: 'simulator', + label: 'Launch app', + params: { simulatorId: 'SIM-1' }, + priority: 20, + when: 'success', + }, + { + tool: 'boot_sim', + cliTool: 'boot', + workflow: 'simulator', + label: 'Boot the simulator', + params: { simulatorId: 'SIM-1', useLatestOS: true }, + priority: 10, + when: 'success', + }, + ]; + + expect( + toStructuredEnvelope(result, 'xcodebuildmcp.output.device-list', '2', { nextSteps }), + ).toEqual({ + schema: 'xcodebuildmcp.output.device-list', + schemaVersion: '2', + didError: false, + error: null, + data: { + devices: [], + }, + nextSteps: [ + 'Boot the simulator: xcodebuildmcp simulator boot --simulator-id SIM-1 --use-latest-os', + 'Launch app: xcodebuildmcp simulator launch-app --simulator-id SIM-1', + ], + }); + }); + + it('shell-escapes only JSON next step arguments that need quoting', () => { + const result: DeviceListDomainResult = { + kind: 'device-list', + didError: false, + error: null, + devices: [], + }; + const nextSteps: NextStep[] = [ + { + tool: 'launch_sim', + cliTool: 'launch', + workflow: 'simulator', + label: 'Launch app', + params: { + simulatorId: 'SIM-1', + appPath: '/tmp/My App.app', + displayName: "Cam's App", + }, + }, + ]; + + expect( + toStructuredEnvelope(result, 'xcodebuildmcp.output.device-list', '2', { nextSteps }), + ).toMatchObject({ + nextSteps: [ + "Launch app: xcodebuildmcp simulator launch --simulator-id SIM-1 --app-path '/tmp/My App.app' --display-name 'Cam'\\''s App'", + ], + }); + }); + + it('serializes CLI next steps when only cliTool is present', () => { + const result: DeviceListDomainResult = { + kind: 'device-list', + didError: false, + error: null, + devices: [], + }; + + expect( + toStructuredEnvelope(result, 'xcodebuildmcp.output.device-list', '2', { + nextSteps: [ + { + cliTool: 'list', + workflow: 'simulator', + label: 'List simulators', + params: { platform: 'iOS Simulator' }, + }, + ], + }), + ).toMatchObject({ + nextSteps: ["List simulators: xcodebuildmcp simulator list --platform 'iOS Simulator'"], + }); + }); + + it('serializes next steps as MCP tool-call lines for MCP structured content', () => { + const result: DeviceListDomainResult = { + kind: 'device-list', + didError: false, + error: null, + devices: [], + }; + + expect( + toStructuredEnvelope(result, 'xcodebuildmcp.output.device-list', '2', { + nextSteps: [ + { + tool: 'get_mac_app_path', + cliTool: 'get-app-path', + workflow: 'macos', + label: 'Get app path', + params: { scheme: 'MCPTest' }, + }, + ], + nextStepRuntime: 'mcp', + }), + ).toMatchObject({ + nextSteps: ['Get app path: get_mac_app_path({ scheme: "MCPTest" })'], + }); + }); + + it('escapes MCP structured next-step string params as JSON string literals', () => { + const result: DeviceListDomainResult = { + kind: 'device-list', + didError: false, + error: null, + devices: [], + }; + + expect( + toStructuredEnvelope(result, 'xcodebuildmcp.output.device-list', '2', { + nextSteps: [ + { + tool: 'launch_app_sim', + cliTool: 'launch-app', + workflow: 'simulator', + label: 'Launch app', + params: { + scheme: 'Cam "Debug" App', + bundleId: 'com.example.$APP\\debug', + launchArg: 'line1\nline2', + }, + }, + ], + nextStepRuntime: 'mcp', + }), + ).toMatchObject({ + nextSteps: [ + 'Launch app: launch_app_sim({ scheme: "Cam \\"Debug\\" App", bundleId: "com.example.$APP\\\\debug", launchArg: "line1\\nline2" })', + ], + }); + }); + + it('preserves request data for normal structured output', () => { + const result: BuildResultDomainResult = { + kind: 'build-result', + didError: false, + error: null, + request: { + scheme: 'CalculatorApp', + workspacePath: 'example_projects/iOS_Calculator/CalculatorApp.xcworkspace', + }, + summary: { status: 'SUCCEEDED', durationMs: 1234, target: 'simulator' }, + artifacts: { buildLogPath: '~/Library/Developer/XcodeBuildMCP/logs/build.log' }, + diagnostics: { warnings: [], errors: [] }, + }; + + expect(toStructuredEnvelope(result, 'xcodebuildmcp.output.build-result', '2')).toEqual({ + schema: 'xcodebuildmcp.output.build-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + request: { + scheme: 'CalculatorApp', + workspacePath: 'example_projects/iOS_Calculator/CalculatorApp.xcworkspace', + }, + summary: { status: 'SUCCEEDED', durationMs: 1234, target: 'simulator' }, + artifacts: { buildLogPath: '~/Library/Developer/XcodeBuildMCP/logs/build.log' }, + diagnostics: { warnings: [], errors: [] }, + }, + }); + }); + + it('preserves CLI next steps while applying minimal structured-output compactness', () => { + const result: BuildResultDomainResult = { + kind: 'build-result', + didError: false, + error: null, + request: { + scheme: 'CalculatorApp', + workspacePath: 'example_projects/iOS_Calculator/CalculatorApp.xcworkspace', + }, + summary: { status: 'SUCCEEDED', durationMs: 1234, target: 'simulator' }, + artifacts: { buildLogPath: '~/Library/Developer/XcodeBuildMCP/logs/build.log' }, + diagnostics: { warnings: [], errors: [] }, + }; + + expect( + toStructuredEnvelope(result, 'xcodebuildmcp.output.build-result', '2', { + nextSteps: [ + { + tool: 'get_mac_app_path', + cliTool: 'get-app-path', + workflow: 'macos', + label: 'Get built app path', + params: { scheme: 'CalculatorApp' }, + }, + ], + outputStyle: 'minimal', + }), + ).toEqual({ + schema: 'xcodebuildmcp.output.build-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + summary: { status: 'SUCCEEDED', durationMs: 1234, target: 'simulator' }, + artifacts: { buildLogPath: '~/Library/Developer/XcodeBuildMCP/logs/build.log' }, + diagnostics: { warnings: [], errors: [] }, + }, + nextSteps: ['Get built app path: xcodebuildmcp macos get-app-path --scheme CalculatorApp'], + }); + }); + + it('uses null data when minimal pruning removes the only data field', () => { + const result: BuildResultDomainResult = { + kind: 'build-result', + didError: false, + error: null, + request: { scheme: 'CalculatorApp' }, + }; + + expect( + toStructuredEnvelope(result, 'xcodebuildmcp.output.build-result', '2', { + outputStyle: 'minimal', + }), + ).toEqual({ + schema: 'xcodebuildmcp.output.build-result', + schemaVersion: '2', + didError: false, + error: null, + data: null, + }); + }); + + it('leaves minimal structured output without request frontmatter unchanged', () => { + const result: StructuredOutputEnvelope<{ simulators: [] }> = { + schema: 'xcodebuildmcp.output.simulator-list', + schemaVersion: '1', + didError: false, + error: null, + data: { simulators: [] }, + }; + + expect( + toStructuredEnvelope( + { + kind: 'simulator-list', + didError: result.didError, + error: result.error, + simulators: [], + }, + result.schema, + result.schemaVersion, + { outputStyle: 'minimal' }, + ), + ).toEqual(result); + }); + + it('serializes label-only next steps as text lines', () => { + const result: DeviceListDomainResult = { + kind: 'device-list', + didError: false, + error: null, + devices: [], + }; + + expect( + toStructuredEnvelope(result, 'xcodebuildmcp.output.device-list', '2', { + nextSteps: [ + { + label: 'Open Simulator', + params: {}, + }, + ], + }), + ).toMatchObject({ + nextSteps: ['Open Simulator'], + }); + }); }); diff --git a/src/utils/app-lifecycle-results.ts b/src/utils/app-lifecycle-results.ts index 4f808b7fd..16148debf 100644 --- a/src/utils/app-lifecycle-results.ts +++ b/src/utils/app-lifecycle-results.ts @@ -70,7 +70,7 @@ export function setInstallResultStructuredOutput( ctx.structuredOutput = { result, schema: INSTALL_RESULT_STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } @@ -113,7 +113,7 @@ export function setLaunchResultStructuredOutput( ctx.structuredOutput = { result, schema: LAUNCH_RESULT_STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } @@ -164,6 +164,6 @@ export function setStopResultStructuredOutput( ctx.structuredOutput = { result, schema: STOP_RESULT_STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } diff --git a/src/utils/app-query-results.ts b/src/utils/app-query-results.ts index ccc7dff6c..1fd5dfa1c 100644 --- a/src/utils/app-query-results.ts +++ b/src/utils/app-query-results.ts @@ -61,7 +61,7 @@ export function setAppPathStructuredOutput( ctx.structuredOutput = { result, schema: APP_PATH_STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', }; } @@ -91,7 +91,7 @@ export function setBundleIdStructuredOutput( ctx.structuredOutput = { result, schema: BUNDLE_ID_STRUCTURED_OUTPUT_SCHEMA, - schemaVersion: '1', + schemaVersion: '2', ...(renderHints ? { renderHints } : {}), }; } diff --git a/src/utils/file-path-render-style.ts b/src/utils/file-path-render-style.ts index de3dea293..7a12fcb74 100644 --- a/src/utils/file-path-render-style.ts +++ b/src/utils/file-path-render-style.ts @@ -1,27 +1,19 @@ +import type { OutputStyle } from '../types/common.ts'; import type { FilePathRenderStyle } from './runtime-config-types.ts'; -export type FilePathRenderRuntime = 'cli' | 'daemon' | 'mcp'; - export function isFilePathRenderStyle(value: unknown): value is FilePathRenderStyle { return value === 'tree' || value === 'list'; } -export function defaultFilePathRenderStyleForRuntime( - runtime: FilePathRenderRuntime, -): FilePathRenderStyle { - return runtime === 'mcp' ? 'tree' : 'list'; -} - export function resolveFilePathRenderStyle(options: { explicit?: FilePathRenderStyle; configured?: FilePathRenderStyle; - runtime: FilePathRenderRuntime; + outputStyle?: OutputStyle; }): FilePathRenderStyle { return ( - options.explicit ?? options.configured ?? defaultFilePathRenderStyleForRuntime(options.runtime) + options.explicit ?? + (options.outputStyle === 'minimal' ? 'tree' : undefined) ?? + options.configured ?? + 'list' ); } - -export function normalizeRenderRuntime(runtime: string | undefined): FilePathRenderRuntime { - return runtime === 'mcp' || runtime === 'daemon' ? runtime : 'cli'; -} diff --git a/src/utils/responses/__tests__/next-steps-renderer.test.ts b/src/utils/responses/__tests__/next-steps-renderer.test.ts index d81cef3ad..fb4707337 100644 --- a/src/utils/responses/__tests__/next-steps-renderer.test.ts +++ b/src/utils/responses/__tests__/next-steps-renderer.test.ts @@ -28,7 +28,7 @@ describe('next-steps-renderer', () => { const result = renderNextStep(step, 'cli'); expect(result).toBe( - 'Install an app: xcodebuildmcp simulator install-app-sim --simulator-id "ABC123" --app-path "/path/to/app"', + 'Install an app: xcodebuildmcp simulator install-app-sim --simulator-id ABC123 --app-path /path/to/app', ); }); @@ -43,7 +43,7 @@ describe('next-steps-renderer', () => { const result = renderNextStep(step, 'cli'); expect(result).toBe( - 'Install an app: xcodebuildmcp simulator install-app --simulator-id "ABC123"', + 'Install an app: xcodebuildmcp simulator install-app --simulator-id ABC123', ); }); @@ -92,6 +92,40 @@ describe('next-steps-renderer', () => { expect(result).toBe('Do something: xcodebuildmcp some-tool'); }); + it('should shell-escape CLI text params that start with a dash', () => { + const step: NextStep = { + tool: 'test_sim', + cliTool: 'test', + workflow: 'simulator', + label: 'Run focused test', + params: { extraArg: '-only-testing:AppTests' }, + }; + + const result = renderNextStep(step, 'cli'); + expect(result).toBe( + "Run focused test: xcodebuildmcp simulator test --extra-arg '-only-testing:AppTests'", + ); + }); + + it('should shell-escape CLI text params that contain shell metacharacters', () => { + const step: NextStep = { + tool: 'launch_app_sim', + cliTool: 'launch-app', + workflow: 'simulator', + label: 'Launch app', + params: { + simulatorName: 'Cam "Debug" App', + bundleId: 'com.example.$APP\\debug', + launchArg: 'line1\nline2', + }, + }; + + const result = renderNextStep(step, 'cli'); + expect(result).toBe( + "Launch app: xcodebuildmcp simulator launch-app --simulator-name 'Cam \"Debug\" App' --bundle-id 'com.example.$APP\\debug' --launch-arg 'line1\nline2'", + ); + }); + it('should format step for MCP with no params', () => { const step: NextStep = { tool: 'open_sim', @@ -178,7 +212,7 @@ describe('next-steps-renderer', () => { expect(result).toBe( 'Next steps:\n' + '1. Open Simulator: xcodebuildmcp open-sim\n' + - '2. Install app: xcodebuildmcp install-app-sim --simulator-id "X"', + '2. Install app: xcodebuildmcp install-app-sim --simulator-id X', ); }); @@ -196,17 +230,17 @@ describe('next-steps-renderer', () => { ); }); - it('should keep declared order', () => { + it('should sort by priority', () => { const steps: NextStep[] = [ - { tool: 'third', label: 'Third', params: {} }, - { tool: 'first', label: 'First', params: {} }, - { tool: 'second', label: 'Second', params: {} }, + { tool: 'third', label: 'Third', params: {}, priority: 3 }, + { tool: 'first', label: 'First', params: {}, priority: 1 }, + { tool: 'second', label: 'Second', params: {}, priority: 2 }, ]; const result = renderNextStepsSection(steps, 'mcp'); - expect(result).toContain('1. Third: third()'); - expect(result).toContain('2. First: first()'); - expect(result).toContain('3. Second: second()'); + expect(result).toContain('1. First: first()'); + expect(result).toContain('2. Second: second()'); + expect(result).toContain('3. Third: third()'); }); it('should render label-only next step without command', () => { diff --git a/src/utils/responses/next-step-formatting.ts b/src/utils/responses/next-step-formatting.ts new file mode 100644 index 000000000..92b075f39 --- /dev/null +++ b/src/utils/responses/next-step-formatting.ts @@ -0,0 +1,100 @@ +import type { RuntimeKind } from '../../runtime/types.ts'; +import type { NextStep } from '../../types/common.ts'; +import { toKebabCase } from '../../runtime/naming.ts'; +import { shellEscapeArg } from '../shell-escape.ts'; + +export interface FormatNextStepOptions { + runtime: RuntimeKind; +} + +const SHELL_SAFE_UNQUOTED_ARG = /^[A-Za-z0-9_@%+=:,./~-]+$/; + +function resolveLabel(step: NextStep): string { + if (step.label?.trim()) return step.label; + if (step.tool) return step.tool; + if (step.cliTool) return step.cliTool; + return 'Next action'; +} + +function formatCliArg(value: string): string { + return SHELL_SAFE_UNQUOTED_ARG.test(value) && !value.startsWith('-') + ? value + : shellEscapeArg(value); +} + +function formatNextStepForCli(step: NextStep): string { + const commandName = step.cliTool ?? (step.tool ? toKebabCase(step.tool) : undefined); + if (!commandName) { + return resolveLabel(step); + } + + const parts = ['xcodebuildmcp']; + if (step.workflow) { + parts.push(step.workflow); + } + parts.push(commandName); + + for (const [key, value] of Object.entries(step.params ?? {})) { + const flagName = toKebabCase(key); + if (typeof value === 'boolean') { + if (value) { + parts.push(`--${flagName}`); + } + } else { + parts.push(`--${flagName}`, formatCliArg(String(value))); + } + } + + return parts.join(' '); +} + +function formatMcpValue(value: string | number | boolean): string { + if (typeof value === 'string') { + return JSON.stringify(value); + } + return String(value); +} + +function formatNextStepForMcp(step: NextStep): string { + if (!step.tool) { + return resolveLabel(step); + } + + const paramEntries = Object.entries(step.params ?? {}); + if (paramEntries.length === 0) { + return `${step.tool}()`; + } + + const paramsStr = paramEntries + .map(([key, value]) => `${key}: ${formatMcpValue(value)}`) + .join(', '); + + return `${step.tool}({ ${paramsStr} })`; +} + +export function formatNextStep(step: NextStep, options: FormatNextStepOptions): string { + const formatted = + options.runtime === 'cli' ? formatNextStepForCli(step) : formatNextStepForMcp(step); + + if (!step.label || formatted === step.label) { + return formatted; + } + + return `${step.label}: ${formatted}`; +} + +export function serializeNextSteps( + nextSteps: readonly NextStep[] | undefined, + options: FormatNextStepOptions, +): string[] | undefined { + if (!nextSteps || nextSteps.length === 0) { + return undefined; + } + + const serialized = [...nextSteps] + .sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0)) + .map((step) => formatNextStep(step, options)) + .filter((step) => step.trim().length > 0); + + return serialized.length > 0 ? serialized : undefined; +} diff --git a/src/utils/responses/next-steps-renderer.ts b/src/utils/responses/next-steps-renderer.ts index 969e2d8a4..83961c3ce 100644 --- a/src/utils/responses/next-steps-renderer.ts +++ b/src/utils/responses/next-steps-renderer.ts @@ -1,83 +1,9 @@ import type { RuntimeKind } from '../../runtime/types.ts'; -import type { NextStep, OutputStyle, ToolResponse } from '../../types/common.ts'; -import { toKebabCase } from '../../runtime/naming.ts'; - -function resolveLabel(step: NextStep): string { - if (step.label?.trim()) return step.label; - if (step.tool) return step.tool; - if (step.cliTool) return step.cliTool; - return 'Next action'; -} - -/** - * Format a single next step for CLI output. - * Example: xcodebuildmcp simulator open-sim - * Example: xcodebuildmcp simulator install-app-sim --simulator-id "ABC123" --app-path "PATH" - */ -function formatNextStepForCli(step: NextStep): string { - if (!step.tool) { - return resolveLabel(step); - } - const parts = ['xcodebuildmcp']; - const cliTool = step.cliTool ?? toKebabCase(step.tool); - const params = step.params ?? {}; - - if (step.workflow) { - parts.push(step.workflow); - } - - parts.push(cliTool); - - for (const [key, value] of Object.entries(params)) { - const flagName = toKebabCase(key); - if (typeof value === 'boolean') { - if (value) { - parts.push(`--${flagName}`); - } - } else { - parts.push(`--${flagName} "${String(value)}"`); - } - } - - return parts.join(' '); -} - -/** - * Format a single next step for MCP output. - * Example: open_sim() - * Example: install_app_sim({ simulatorId: "ABC123", appPath: "PATH" }) - */ -function formatNextStepForMcp(step: NextStep): string { - if (!step.tool) { - return resolveLabel(step); - } - - const paramEntries = Object.entries(step.params ?? {}); - if (paramEntries.length === 0) { - return `${step.tool}()`; - } - - const paramsStr = paramEntries - .map(([key, value]) => { - if (typeof value === 'string') { - return `${key}: "${value}"`; - } - return `${key}: ${String(value)}`; - }) - .join(', '); - - return `${step.tool}({ ${paramsStr} })`; -} +import type { NextStep, ToolResponse } from '../../types/common.ts'; +import { formatNextStep } from './next-step-formatting.ts'; export function renderNextStep(step: NextStep, runtime: RuntimeKind): string { - if (!step.tool) { - return resolveLabel(step); - } - const formatted = runtime === 'cli' ? formatNextStepForCli(step) : formatNextStepForMcp(step); - if (!step.label) { - return formatted; - } - return `${step.label}: ${formatted}`; + return formatNextStep(step, { runtime }); } export function renderNextStepsSection(steps: NextStep[], runtime: RuntimeKind): string { @@ -91,28 +17,24 @@ export function renderNextStepsSection(steps: NextStep[], runtime: RuntimeKind): return `Next steps:\n${lines.join('\n')}`; } -export function processToolResponse( - response: ToolResponse, - runtime: RuntimeKind, - style: OutputStyle = 'normal', -): ToolResponse { +export function processToolResponse(response: ToolResponse, runtime: RuntimeKind): ToolResponse { const { nextSteps, ...rest } = response; - if (!nextSteps || nextSteps.length === 0 || style === 'minimal') { + if (!nextSteps || nextSteps.length === 0) { return { ...rest }; } const nextStepsSection = renderNextStepsSection(nextSteps, runtime); - - const processedContent = response.content.map((item, index) => { - if (item.type === 'text' && index === response.content.length - 1) { - return { ...item, text: item.text + '\n\n' + nextStepsSection }; - } - return item; - }); - - const hasTextContent = response.content.some((item) => item.type === 'text'); - if (!hasTextContent && nextStepsSection) { + const processedContent = [...response.content]; + const lastIndex = processedContent.length - 1; + const lastItem = lastIndex >= 0 ? processedContent[lastIndex] : undefined; + + if (lastItem?.type === 'text') { + processedContent[lastIndex] = { + ...lastItem, + text: lastItem.text + '\n\n' + nextStepsSection, + }; + } else if (!processedContent.some((item) => item.type === 'text') && nextStepsSection) { processedContent.push({ type: 'text', text: nextStepsSection.trim() }); } diff --git a/src/utils/structured-output-envelope.ts b/src/utils/structured-output-envelope.ts index 1fec8ee90..769d22eed 100644 --- a/src/utils/structured-output-envelope.ts +++ b/src/utils/structured-output-envelope.ts @@ -1,23 +1,78 @@ -import type { ToolDomainResult } from '../types/domain-results.js'; -import type { StructuredOutputEnvelope } from '../types/structured-output.js'; +import type { RuntimeKind } from '../runtime/types.ts'; +import type { NextStep, OutputStyle } from '../types/common.ts'; +import type { ToolDomainResult } from '../types/domain-results.ts'; +import type { StructuredOutputEnvelope } from '../types/structured-output.ts'; +import { serializeNextSteps } from './responses/next-step-formatting.ts'; type DomainResultData = Omit< TResult, 'kind' | 'didError' | 'error' >; +export interface StructuredEnvelopeOptions { + nextSteps?: readonly NextStep[]; + nextStepRuntime?: RuntimeKind; + outputStyle?: OutputStyle; +} + +const MINIMAL_DATA_PRUNE_KEYS = ['request'] as const; + +function isRecord(value: unknown): value is Record { + return typeof value === 'object' && value !== null && !Array.isArray(value); +} + +function applyStructuredOutputStyle( + envelope: StructuredOutputEnvelope, + outputStyle: OutputStyle, +): StructuredOutputEnvelope { + if (outputStyle !== 'minimal' || !isRecord(envelope.data)) { + return envelope; + } + + const data = { ...envelope.data }; + let didPrune = false; + + for (const key of MINIMAL_DATA_PRUNE_KEYS) { + if (Object.hasOwn(data, key)) { + delete data[key]; + didPrune = true; + } + } + + if (!didPrune) { + return envelope; + } + + return { + ...envelope, + data: Object.keys(data).length > 0 ? (data as TData) : null, + }; +} + export function toStructuredEnvelope( result: TResult, schema: string, schemaVersion: string, + options: StructuredEnvelopeOptions = {}, ): StructuredOutputEnvelope> { - const { kind: _kind, didError, error, ...data } = result; + const { nextSteps, nextStepRuntime = 'cli', outputStyle = 'normal' } = options; + const { didError, error } = result; + const data: Partial = { ...result }; + delete data.kind; + delete data.didError; + delete data.error; + const serializedNextSteps = serializeNextSteps(nextSteps, { + runtime: nextStepRuntime, + }); - return { + const envelope: StructuredOutputEnvelope> = { schema, schemaVersion, didError, error, data: Object.keys(data).length === 0 ? null : (data as DomainResultData), + ...(serializedNextSteps ? { nextSteps: serializedNextSteps } : {}), }; + + return applyStructuredOutputStyle(envelope, outputStyle); } diff --git a/src/utils/tool-registry.ts b/src/utils/tool-registry.ts index 56895307d..d7a308d5d 100644 --- a/src/utils/tool-registry.ts +++ b/src/utils/tool-registry.ts @@ -5,7 +5,11 @@ import type { ToolCatalog, ToolDefinition } from '../runtime/types.ts'; import { log } from './logger.ts'; import { loadManifest, type ResolvedManifest } from '../core/manifest/load-manifest.ts'; import { importToolModule } from '../core/manifest/import-tool-module.ts'; -import { getEffectiveCliName, type WorkflowManifestEntry } from '../core/manifest/schema.ts'; +import { + getEffectiveCliName, + type ToolManifestEntry, + type WorkflowManifestEntry, +} from '../core/manifest/schema.ts'; import { createToolCatalog } from '../runtime/tool-catalog.ts'; import { postProcessSession } from '../runtime/tool-invoker.ts'; import type { PredicateContext } from '../visibility/predicate-types.ts'; @@ -14,13 +18,35 @@ import { getConfig } from './config-store.ts'; import { recordInternalErrorMetric, recordToolInvocationMetric } from './sentry.ts'; import type { ToolHandlerContext } from '../rendering/types.ts'; import { createRenderSession } from '../rendering/render.ts'; +import type { StructuredOutputEnvelope } from '../types/structured-output.ts'; import { toStructuredEnvelope } from './structured-output-envelope.ts'; import { getMcpOutputSchemaForRegistration } from '../core/structured-output-schema.ts'; -function sessionToToolResponse(session: ReturnType): ToolResponse { +type RenderSession = ReturnType; + +function buildStructuredContent( + session: RenderSession, +): StructuredOutputEnvelope | undefined { + const structuredOutput = session.getStructuredOutput?.(); + if (!structuredOutput) { + return undefined; + } + + return toStructuredEnvelope( + structuredOutput.result, + structuredOutput.schema, + structuredOutput.schemaVersion, + { + nextSteps: session.getNextSteps?.(), + nextStepRuntime: 'mcp', + outputStyle: 'minimal', + }, + ); +} + +function sessionToToolResponse(session: RenderSession): ToolResponse { const text = session.finalize(); const attachments = session.getAttachments(); - const structuredOutput = session.getStructuredOutput?.(); const content: ToolResponse['content'] = []; if (text) { @@ -34,18 +60,12 @@ function sessionToToolResponse(session: ReturnType): }); } + const structuredContent = buildStructuredContent(session); + return { content, isError: session.isError() || undefined, - ...(structuredOutput - ? { - structuredContent: toStructuredEnvelope( - structuredOutput.result, - structuredOutput.schema, - structuredOutput.schemaVersion, - ), - } - : {}), + ...(structuredContent ? { structuredContent } : {}), }; } @@ -120,6 +140,19 @@ function resolveCustomWorkflowToolIds( return { toolIds, unknownToolNames }; } +function buildCustomWorkflowEntry(name: string, toolIds: string[]): WorkflowManifestEntry { + return { + id: name, + title: name, + description: `Custom workflow '${name}' from config.yaml.`, + targetPlatforms: [], + availability: { mcp: true, cli: false }, + selection: { mcp: { defaultEnabled: false, autoInclude: false } }, + predicates: [], + tools: toolIds, + }; +} + export function createCustomWorkflowsFromConfig( manifest: ResolvedManifest, customWorkflows: Record, @@ -154,16 +187,7 @@ export function createCustomWorkflowsFromConfig( continue; } - workflows.push({ - id: workflowName, - title: workflowName, - description: `Custom workflow '${workflowName}' from config.yaml.`, - targetPlatforms: [], - availability: { mcp: true, cli: false }, - selection: { mcp: { defaultEnabled: false, autoInclude: false } }, - predicates: [], - tools: toolIds, - }); + workflows.push(buildCustomWorkflowEntry(workflowName, toolIds)); } return { workflows, warnings }; @@ -177,16 +201,20 @@ function emitConfigWarningMetric(kind: 'unknown_workflow' | 'invalid_custom_work }); } -export function getRuntimeRegistration(): RuntimeToolInfo | null { - if (registryState.tools.size === 0 && registryState.enabledWorkflows.size === 0) { - return null; - } +function snapshotRuntimeRegistration(): RuntimeToolInfo { return { enabledWorkflows: [...registryState.enabledWorkflows], registeredToolCount: registryState.tools.size, }; } +export function getRuntimeRegistration(): RuntimeToolInfo | null { + if (registryState.tools.size === 0 && registryState.enabledWorkflows.size === 0) { + return null; + } + return snapshotRuntimeRegistration(); +} + export function getRegisteredWorkflows(): string[] { return [...registryState.enabledWorkflows]; } @@ -203,17 +231,116 @@ export function getMcpPredicateContext(): PredicateContext { return registryState.currentContext ?? defaultPredicateContext(); } -export async function applyWorkflowSelectionFromManifest( - requestedWorkflows: string[] | undefined, - ctx: PredicateContext, -): Promise { +type ImportedToolModule = Awaited>; + +function recordMcpInvocation( + toolName: string, + startedAt: number, + outcome: 'completed' | 'infra_error', +): void { + recordToolInvocationMetric({ + toolName, + runtime: 'mcp', + transport: 'direct', + outcome, + durationMs: Date.now() - startedAt, + }); +} + +async function invokeRegisteredTool( + toolName: string, + toolModule: ImportedToolModule, + args: unknown, +): Promise { + const startedAt = Date.now(); + + try { + const session = createRenderSession('text', { outputStyle: 'minimal' }); + const ctx: ToolHandlerContext = { + emit: (fragment) => { + session.emit(fragment); + }, + attach: session.attach, + }; + await toolModule.handler(args as Record, ctx); + + if (ctx.structuredOutput) { + session.setStructuredOutput?.(ctx.structuredOutput); + } + + const catalog = registryState.catalog; + const catalogTool = catalog?.getByMcpName(toolName); + if (catalog && catalogTool) { + postProcessSession({ + tool: catalogTool, + session, + ctx, + catalog, + runtime: 'mcp', + }); + } + + const response = sessionToToolResponse(session); + recordMcpInvocation(toolName, startedAt, 'completed'); + return response; + } catch (error) { + recordInternalErrorMetric({ + component: 'mcp-tool-registry', + runtime: 'mcp', + errorKind: error instanceof Error ? error.name || 'Error' : typeof error, + }); + recordMcpInvocation(toolName, startedAt, 'infra_error'); + throw error; + } +} + +function registerToolFromManifest( + toolManifest: ToolManifestEntry, + toolModule: ImportedToolModule, +): void { if (!server) { throw new Error('Tool registry has not been initialized.'); } - registryState.currentContext = ctx; + const toolName = toolManifest.names.mcp; + if (registryState.tools.has(toolName)) { + return; + } - const manifest = loadManifest(); + const outputSchema = toolManifest.outputSchema + ? getMcpOutputSchemaForRegistration(toolManifest.outputSchema) + : undefined; + + const registeredTool = server.registerTool( + toolName, + { + description: toolManifest.description ?? '', + inputSchema: toolModule.schema, + ...(outputSchema ? { outputSchema } : {}), + annotations: toolManifest.annotations, + }, + (args: unknown): Promise => invokeRegisteredTool(toolName, toolModule, args), + ); + registryState.tools.set(toolName, registeredTool); +} + +function shouldExposeTool( + toolManifest: ToolManifestEntry, + ctx: PredicateContext, + forceExposedToolAliases: Set, +): boolean { + const isForceExposed = + forceExposedToolAliases.has(normalizeName(toolManifest.id)) || + forceExposedToolAliases.has(normalizeName(toolManifest.names.mcp)); + + return isForceExposed || isToolExposedForRuntime(toolManifest, ctx); +} + +function resolveSelectedWorkflows( + manifest: ResolvedManifest, + requestedWorkflows: string[] | undefined, + ctx: PredicateContext, +): WorkflowManifestEntry[] { const customSelection = createCustomWorkflowsFromConfig(manifest, ctx.config.customWorkflows); for (const warning of customSelection.warnings) { log('warning', warning); @@ -239,10 +366,58 @@ export async function applyWorkflowSelectionFromManifest( emitConfigWarningMetric('unknown_workflow'); } + return selectedWorkflows; +} + +async function tryImportToolModule( + toolManifest: ToolManifestEntry, + cache: Map, +): Promise { + const cached = cache.get(toolManifest.id); + if (cached) { + return cached; + } + + try { + const toolModule = await importToolModule(toolManifest.module); + cache.set(toolManifest.id, toolModule); + return toolModule; + } catch (err) { + log('warn', `Failed to import tool module ${toolManifest.module}: ${err}`); + return undefined; + } +} + +function toCatalogTool( + toolManifest: ToolManifestEntry, + workflow: WorkflowManifestEntry, + toolModule: ImportedToolModule, +): ToolDefinition { + return { + id: toolManifest.id, + cliName: getEffectiveCliName(toolManifest), + mcpName: toolManifest.names.mcp, + workflow: workflow.id, + description: toolManifest.description, + annotations: toolManifest.annotations, + outputSchema: toolManifest.outputSchema, + nextStepTemplates: toolManifest.nextSteps, + mcpSchema: toolModule.schema, + cliSchema: toolModule.schema, + stateful: toolManifest.routing?.stateful ?? false, + handler: toolModule.handler as ToolDefinition['handler'], + }; +} + +async function enumerateAndRegisterTools( + manifest: ResolvedManifest, + selectedWorkflows: WorkflowManifestEntry[], + ctx: PredicateContext, +): Promise<{ registeredCount: number; desiredWorkflows: Set }> { const desiredToolNames = new Set(); const desiredWorkflows = new Set(); const catalogTools: ToolDefinition[] = []; - const moduleCache = new Map>>(); + const moduleCache = new Map(); const forceExposedToolAliases = getForceExposedToolAliases(); for (const workflow of selectedWorkflows) { @@ -252,114 +427,19 @@ export async function applyWorkflowSelectionFromManifest( const toolManifest = manifest.tools.get(toolId); if (!toolManifest) continue; - const isForceExposed = - forceExposedToolAliases.has(normalizeName(toolManifest.id)) || - forceExposedToolAliases.has(normalizeName(toolManifest.names.mcp)); - - if (!isForceExposed && !isToolExposedForRuntime(toolManifest, ctx)) { + if (!shouldExposeTool(toolManifest, ctx, forceExposedToolAliases)) { continue; } - const toolName = toolManifest.names.mcp; - desiredToolNames.add(toolName); + desiredToolNames.add(toolManifest.names.mcp); - let toolModule = moduleCache.get(toolId); + const toolModule = await tryImportToolModule(toolManifest, moduleCache); if (!toolModule) { - try { - toolModule = await importToolModule(toolManifest.module); - moduleCache.set(toolId, toolModule); - } catch (err) { - log('warn', `Failed to import tool module ${toolManifest.module}: ${err}`); - continue; - } + continue; } - const outputSchema = toolManifest.outputSchema - ? getMcpOutputSchemaForRegistration(toolManifest.outputSchema) - : undefined; - - catalogTools.push({ - id: toolManifest.id, - cliName: getEffectiveCliName(toolManifest), - mcpName: toolName, - workflow: workflow.id, - description: toolManifest.description, - annotations: toolManifest.annotations, - outputSchema: toolManifest.outputSchema, - nextStepTemplates: toolManifest.nextSteps, - mcpSchema: toolModule.schema, - cliSchema: toolModule.schema, - stateful: toolManifest.routing?.stateful ?? false, - handler: toolModule.handler as ToolDefinition['handler'], - }); - - if (!registryState.tools.has(toolName)) { - const registeredTool = server.registerTool( - toolName, - { - description: toolManifest.description ?? '', - inputSchema: toolModule.schema, - ...(outputSchema ? { outputSchema } : {}), - annotations: toolManifest.annotations, - }, - async (args: unknown): Promise => { - const startedAt = Date.now(); - try { - const session = createRenderSession('text'); - const ctx: ToolHandlerContext = { - emit: (fragment) => { - session.emit(fragment); - }, - attach: session.attach, - }; - await toolModule.handler(args as Record, ctx); - - if (ctx.structuredOutput) { - session.setStructuredOutput?.(ctx.structuredOutput); - } - - const catalog = registryState.catalog; - const catalogTool = catalog?.getByMcpName(toolName); - if (catalog && catalogTool) { - postProcessSession({ - tool: catalogTool, - session, - ctx, - catalog, - runtime: 'mcp', - }); - } - - const response = sessionToToolResponse(session); - - recordToolInvocationMetric({ - toolName, - runtime: 'mcp', - transport: 'direct', - outcome: 'completed', - durationMs: Date.now() - startedAt, - }); - - return response; - } catch (error) { - recordInternalErrorMetric({ - component: 'mcp-tool-registry', - runtime: 'mcp', - errorKind: error instanceof Error ? error.name || 'Error' : typeof error, - }); - recordToolInvocationMetric({ - toolName, - runtime: 'mcp', - transport: 'direct', - outcome: 'infra_error', - durationMs: Date.now() - startedAt, - }); - throw error; - } - }, - ); - registryState.tools.set(toolName, registeredTool); - } + catalogTools.push(toCatalogTool(toolManifest, workflow, toolModule)); + registerToolFromManifest(toolManifest, toolModule); } } @@ -372,15 +452,33 @@ export async function applyWorkflowSelectionFromManifest( } } + return { registeredCount: desiredToolNames.size, desiredWorkflows }; +} + +export async function applyWorkflowSelectionFromManifest( + requestedWorkflows: string[] | undefined, + ctx: PredicateContext, +): Promise { + if (!server) { + throw new Error('Tool registry has not been initialized.'); + } + + registryState.currentContext = ctx; + + const manifest = loadManifest(); + const selectedWorkflows = resolveSelectedWorkflows(manifest, requestedWorkflows, ctx); + const { registeredCount, desiredWorkflows } = await enumerateAndRegisterTools( + manifest, + selectedWorkflows, + ctx, + ); + registryState.enabledWorkflows = desiredWorkflows; const workflowLabel = selectedWorkflows.map((w) => w.id).join(', '); - log('info', `Registered ${desiredToolNames.size} tools from workflows: ${workflowLabel}`); + log('info', `Registered ${registeredCount} tools from workflows: ${workflowLabel}`); - return { - enabledWorkflows: [...registryState.enabledWorkflows], - registeredToolCount: registryState.tools.size, - }; + return snapshotRuntimeRegistration(); } export async function registerWorkflowsFromManifest( diff --git a/src/utils/typed-tool-factory.ts b/src/utils/typed-tool-factory.ts index d1f43f223..23e7264c0 100644 --- a/src/utils/typed-tool-factory.ts +++ b/src/utils/typed-tool-factory.ts @@ -3,10 +3,10 @@ import * as z from 'zod'; import type { ToolHandlerContext } from '../rendering/types.ts'; import { createRenderSession } from '../rendering/render.ts'; import { getConfig } from './config-store.ts'; -import { normalizeRenderRuntime, resolveFilePathRenderStyle } from './file-path-render-style.ts'; +import { resolveFilePathRenderStyle } from './file-path-render-style.ts'; import { renderCliTextTranscript } from './renderers/cli-text-renderer.ts'; import type { CommandExecutor } from './execution/index.ts'; -import type { DomainFragment } from '../types/domain-fragments.ts'; +import type { OutputStyle } from '../types/common.ts'; import { setStructuredErrorOutput } from './structured-error.ts'; import { sessionStore, type SessionDefaults } from './session-store.ts'; @@ -61,17 +61,21 @@ function setValidationErrorOutput(ctx: ToolHandlerContext, message: string, code }); } +function outputStyleForTestResult(): OutputStyle { + return process.env.XCODEBUILDMCP_RUNTIME === 'mcp' ? 'minimal' : 'normal'; +} + function sessionToTestResult(session: ReturnType): ToolTestResult { - const runtime = normalizeRenderRuntime(process.env.XCODEBUILDMCP_RUNTIME); + const outputStyle = outputStyleForTestResult(); const text = renderCliTextTranscript({ items: [], structuredOutput: session.getStructuredOutput?.(), nextSteps: session.getNextSteps?.(), nextStepsRuntime: session.getNextStepsRuntime?.(), - includeHeaderDetails: runtime !== 'mcp', + includeHeaderDetails: outputStyle !== 'minimal', filePathRenderStyle: resolveFilePathRenderStyle({ configured: getConfig().filePathRenderStyle, - runtime, + outputStyle, }), }); diff --git a/src/utils/xcodebuild-domain-results.ts b/src/utils/xcodebuild-domain-results.ts index 0ece1c045..44ad61b69 100644 --- a/src/utils/xcodebuild-domain-results.ts +++ b/src/utils/xcodebuild-domain-results.ts @@ -454,7 +454,7 @@ export function setXcodebuildStructuredOutput Date: Sat, 16 May 2026 09:24:45 +0100 Subject: [PATCH 02/24] test(snapshot): Split fixtures by runtime output mode Restructure snapshot fixtures so CLI and MCP each have text and JSON coverage. Add parity tests for both JSON fixture sets and update harness parsing to keep runtime/output expectations explicit. Co-Authored-By: OpenAI Codex --- package.json | 2 +- ...coverage-report--error-invalid-bundle.json | 2 +- .../get-coverage-report--success.json | 30 + ...t-file-coverage--error-invalid-bundle.json | 2 +- .../coverage/get-file-coverage--success.json | 103 + .../add-breakpoint--error-no-session.json | 2 +- .../debugging/add-breakpoint--success.json | 2 +- .../debugging/attach--error-no-process.json | 2 +- .../debugging/attach--success-continue.json | 23 + .../cli/json/debugging/attach--success.json | 23 + .../debugging/continue--error-no-session.json | 2 +- .../json/debugging/continue--success.json | 2 +- .../debugging/detach--error-no-session.json | 2 +- .../json/debugging/detach--success.json | 2 +- .../lldb-command--error-no-session.json | 2 +- .../json/debugging/lldb-command--success.json | 2 +- .../remove-breakpoint--error-no-session.json | 2 +- .../debugging/remove-breakpoint--success.json | 2 +- .../debugging/stack--error-no-session.json | 2 +- .../json/debugging/stack--success.json | 2 +- .../variables--error-no-session.json | 2 +- .../json/debugging/variables--success.json | 2 +- .../json/device/build--error-compiler.json | 2 +- .../device/build--error-wrong-scheme.json | 2 +- .../{ => cli}/json/device/build--success.json | 7 +- .../device/build-and-run--error-compiler.json | 2 +- .../build-and-run--error-wrong-scheme.json | 2 +- .../json/device/build-and-run--success.json | 7 +- .../get-app-path--error-wrong-scheme.json | 2 +- .../json/device/get-app-path--success.json | 26 + .../device/install--error-invalid-app.json | 2 +- .../json/device/install--success.json | 2 +- .../device/launch--error-invalid-bundle.json | 2 +- .../cli/json/device/launch--success.json | 23 + .../cli/json/device/list--success.json | 47 + .../json/device/stop--error-no-app.json | 2 +- .../{ => cli}/json/device/stop--success.json | 2 +- .../json/device/test--error-compiler.json | 2 +- .../cli/json/device/test--failure.json | 79 + .../{ => cli}/json/device/test--success.json | 2 +- .../json/macos/build--error-compiler.json | 2 +- .../json/macos/build--error-wrong-scheme.json | 2 +- .../{ => cli}/json/macos/build--success.json | 7 +- .../macos/build-and-run--error-compiler.json | 2 +- .../build-and-run--error-wrong-scheme.json | 2 +- .../json/macos/build-and-run--success.json | 7 +- .../get-app-path--error-wrong-scheme.json | 2 +- .../json/macos/get-app-path--success.json | 8 +- ...et-macos-bundle-id--error-missing-app.json | 2 +- .../macos/get-macos-bundle-id--success.json | 16 + .../json/macos/launch--error-invalid-app.json | 2 +- .../{ => cli}/json/macos/launch--success.json | 2 +- .../json/macos/stop--error-no-app.json | 2 +- .../{ => cli}/json/macos/stop--success.json | 2 +- .../json/macos/test--error-compiler.json | 2 +- .../json/macos/test--error-wrong-scheme.json | 2 +- .../{ => cli}/json/macos/test--failure.json | 14 +- .../{ => cli}/json/macos/test--success.json | 2 +- .../discover-projs--error-invalid-root.json | 2 +- .../discover-projs--success.json | 7 +- .../get-app-bundle-id--error-missing-app.json | 2 +- .../get-app-bundle-id--success.json | 18 + ...et-macos-bundle-id--error-missing-app.json | 2 +- .../get-macos-bundle-id--success.json} | 8 +- ...list-schemes--error-invalid-workspace.json | 2 +- .../list-schemes--success.json | 21 + ...ow-build-settings--error-wrong-scheme.json | 2 +- .../show-build-settings--success.json | 2431 +++++++++++++++++ .../scaffold-ios--error-existing.json | 2 +- .../scaffold-ios--success.json | 22 + .../scaffold-macos--error-existing.json | 2 +- .../scaffold-macos--success.json | 22 + .../boot--error-invalid-id.json | 2 +- .../simulator-management/boot--success.json | 22 + .../erase--error-invalid-id.json | 2 +- .../simulator-management/erase--success.json | 2 +- .../simulator-management/list--success.json | 93 + .../simulator-management/open--success.json | 17 + ...set-location--error-invalid-simulator.json | 2 +- .../reset-location--success.json | 2 +- ...t-appearance--error-invalid-simulator.json | 2 +- .../set-appearance--success.json | 2 +- ...set-location--error-invalid-simulator.json | 2 +- .../set-location--success.json | 2 +- .../statusbar--error-invalid-simulator.json | 2 +- .../statusbar--success.json | 2 +- ...are-keyboard--error-invalid-simulator.json | 2 +- ...le-connect-hardware-keyboard--success.json | 2 +- ...are-keyboard--error-invalid-simulator.json | 2 +- .../toggle-software-keyboard--success.json | 2 +- .../json/simulator/build--error-compiler.json | 2 +- .../simulator/build--error-wrong-scheme.json | 2 +- .../json/simulator/build--success.json | 7 +- .../build-and-run--error-compiler.json | 2 +- .../build-and-run--error-wrong-scheme.json | 2 +- .../simulator/build-and-run--success.json | 7 +- .../get-app-path--error-wrong-scheme.json | 2 +- .../json/simulator/get-app-path--success.json | 29 + .../simulator/install--error-invalid-app.json | 2 +- .../cli/json/simulator/install--success.json | 23 + .../launch-app--error-not-installed.json | 2 +- .../json/simulator/launch-app--success.json | 26 + .../cli/json/simulator/list--success.json | 93 + .../screenshot--error-invalid-simulator.json | 2 +- .../json/simulator/screenshot--success.json | 2 +- .../json/simulator/stop--error-no-app.json | 2 +- .../json/simulator/stop--success.json | 2 +- .../json/simulator/test--error-compiler.json | 2 +- .../simulator/test--error-wrong-scheme.json | 2 +- .../cli/json/simulator/test--failure.json | 88 + .../json/simulator/test--success.json | 2 +- .../swift-package/build--error-bad-path.json | 2 +- .../json/swift-package/build--success.json | 2 +- .../swift-package/clean--error-bad-path.json | 2 +- .../json/swift-package/clean--success.json | 2 +- .../swift-package/list--no-processes.json | 2 +- .../json/swift-package/list--success.json | 2 +- .../run--error-bad-executable.json | 2 +- .../json/swift-package/run--success.json | 18 +- .../swift-package/stop--error-no-process.json | 2 +- .../swift-package/test--error-bad-path.json | 2 +- .../json/swift-package/test--failure.json | 27 +- .../json/swift-package/test--success.json | 2 +- .../button--error-no-simulator.json | 2 +- .../json/ui-automation/button--success.json | 2 +- .../gesture--error-no-simulator.json | 2 +- .../json/ui-automation/gesture--success.json | 2 +- .../key-press--error-no-simulator.json | 2 +- .../ui-automation/key-press--success.json | 2 +- .../key-sequence--error-no-simulator.json | 2 +- .../ui-automation/key-sequence--success.json | 2 +- .../long-press--error-no-simulator.json | 2 +- .../ui-automation/long-press--success.json | 2 +- .../snapshot-ui--error-no-simulator.json | 2 +- .../ui-automation/snapshot-ui--success.json | 508 ++++ .../swipe--error-no-simulator.json | 2 +- .../json/ui-automation/swipe--success.json | 2 +- .../tap--error-no-simulator.json | 2 +- .../json/ui-automation/tap--success.json | 2 +- .../touch--error-no-simulator.json | 2 +- .../json/ui-automation/touch--success.json | 2 +- .../type-text--error-no-simulator.json | 2 +- .../ui-automation/type-text--success.json | 2 +- .../utilities/clean--error-wrong-scheme.json | 2 +- .../json/utilities/clean--success.json | 2 +- .../documentation-search--success.json | 0 .../json/xcode-ide/list-tools--success.json | 0 .../macos/get-macos-bundle-id--success.txt | 11 - .../get-app-bundle-id--success.txt | 13 - .../get-macos-bundle-id--success.txt | 11 - .../list-schemes--success.txt | 16 - ...-coverage-report--error-invalid-bundle.txt | 0 .../coverage/get-coverage-report--success.txt | 2 +- ...et-file-coverage--error-invalid-bundle.txt | 0 .../coverage/get-file-coverage--success.txt | 2 +- .../add-breakpoint--error-no-session.txt | 0 .../debugging/add-breakpoint--success.txt | 0 .../debugging/attach--error-no-process.txt | 0 .../debugging/attach--success-continue.txt | 6 +- .../{ => text}/debugging/attach--success.txt | 6 +- .../debugging/continue--error-no-session.txt | 0 .../debugging/continue--success.txt | 0 .../debugging/detach--error-no-session.txt | 0 .../{ => text}/debugging/detach--success.txt | 0 .../lldb-command--error-no-session.txt | 0 .../debugging/lldb-command--success.txt | 0 .../remove-breakpoint--error-no-session.txt | 0 .../debugging/remove-breakpoint--success.txt | 0 .../debugging/stack--error-no-session.txt | 0 .../{ => text}/debugging/stack--success.txt | 0 .../debugging/variables--error-no-session.txt | 0 .../debugging/variables--success.txt | 0 .../device/build--error-compiler.txt | 0 .../device/build--error-wrong-scheme.txt | 0 .../cli/{ => text}/device/build--success.txt | 2 +- .../device/build-and-run--error-compiler.txt | 0 .../build-and-run--error-wrong-scheme.txt | 0 .../device/build-and-run--success.txt | 2 +- .../get-app-path--error-wrong-scheme.txt | 0 .../device/get-app-path--success.txt | 6 +- .../device/install--error-invalid-app.txt | 0 .../{ => text}/device/install--success.txt | 0 .../device/launch--error-invalid-bundle.txt | 0 .../cli/{ => text}/device/launch--success.txt | 2 +- .../cli/{ => text}/device/list--success.txt | 4 +- .../{ => text}/device/stop--error-no-app.txt | 0 .../cli/{ => text}/device/stop--success.txt | 0 .../device/test--error-compiler.txt | 0 .../cli/{ => text}/device/test--failure.txt | 0 .../cli/{ => text}/device/test--success.txt | 0 .../macos/build--error-compiler.txt | 0 .../macos/build--error-wrong-scheme.txt | 0 .../cli/{ => text}/macos/build--success.txt | 2 +- .../macos/build-and-run--error-compiler.txt | 0 .../build-and-run--error-wrong-scheme.txt | 0 .../macos/build-and-run--success.txt | 0 .../get-app-path--error-wrong-scheme.txt | 0 .../macos/get-app-path--success.txt | 4 +- ...get-macos-bundle-id--error-missing-app.txt | 0 .../macos/get-macos-bundle-id--success.txt | 11 + .../macos/launch--error-invalid-app.txt | 0 .../cli/{ => text}/macos/launch--success.txt | 0 .../{ => text}/macos/stop--error-no-app.txt | 0 .../cli/{ => text}/macos/stop--success.txt | 0 .../{ => text}/macos/test--error-compiler.txt | 0 .../macos/test--error-wrong-scheme.txt | 0 .../cli/{ => text}/macos/test--failure.txt | 0 .../cli/{ => text}/macos/test--success.txt | 0 .../discover-projs--error-invalid-root.txt | 0 .../discover-projs--success.txt | 0 .../get-app-bundle-id--error-missing-app.txt | 0 .../get-app-bundle-id--success.txt | 13 + ...get-macos-bundle-id--error-missing-app.txt | 0 .../get-macos-bundle-id--success.txt | 11 + .../list-schemes--error-invalid-workspace.txt | 0 .../list-schemes--success.txt | 16 + ...how-build-settings--error-wrong-scheme.txt | 0 .../show-build-settings--success.txt | 6 +- .../scaffold-ios--error-existing.txt | 0 .../scaffold-ios--success.txt | 4 +- .../scaffold-macos--error-existing.txt | 0 .../scaffold-macos--success.txt | 4 +- .../boot--error-invalid-id.txt | 0 .../simulator-management/boot--success.txt | 4 +- .../erase--error-invalid-id.txt | 0 .../simulator-management/erase--success.txt | 0 .../simulator-management}/list--success.txt | 6 +- .../simulator-management/open--success.txt | 2 +- ...eset-location--error-invalid-simulator.txt | 0 .../reset-location--success.txt | 0 ...et-appearance--error-invalid-simulator.txt | 0 .../set-appearance--success.txt | 0 .../set-location--error-invalid-simulator.txt | 0 .../set-location--success.txt | 0 .../statusbar--error-invalid-simulator.txt | 0 .../statusbar--success.txt | 0 ...ware-keyboard--error-invalid-simulator.txt | 0 ...gle-connect-hardware-keyboard--success.txt | 0 ...ware-keyboard--error-invalid-simulator.txt | 0 .../toggle-software-keyboard--success.txt | 0 .../simulator/build--error-compiler.txt | 0 .../simulator/build--error-wrong-scheme.txt | 0 .../{ => text}/simulator/build--success.txt | 2 +- .../build-and-run--error-compiler.txt | 0 .../build-and-run--error-wrong-scheme.txt | 0 .../simulator/build-and-run--success.txt | 2 +- .../get-app-path--error-wrong-scheme.txt | 0 .../simulator/get-app-path--success.txt | 8 +- .../simulator/install--error-invalid-app.txt | 0 .../{ => text}/simulator/install--success.txt | 2 +- .../launch-app--error-not-installed.txt | 0 .../simulator/launch-app--success.txt | 2 +- .../simulator}/list--success.txt | 6 +- .../screenshot--error-invalid-simulator.txt | 0 .../simulator/screenshot--success.txt | 0 .../simulator/stop--error-no-app.txt | 0 .../{ => text}/simulator/stop--success.txt | 0 .../simulator/test--error-compiler.txt | 0 .../simulator/test--error-wrong-scheme.txt | 0 .../{ => text}/simulator/test--failure.txt | 0 .../{ => text}/simulator/test--success.txt | 0 .../swift-package/build--error-bad-path.txt | 0 .../swift-package/build--success.txt | 0 .../swift-package/clean--error-bad-path.txt | 0 .../swift-package/clean--success.txt | 0 .../swift-package/list--no-processes.txt | 0 .../swift-package/list--success.txt | 0 .../run--error-bad-executable.txt | 0 .../{ => text}/swift-package/run--success.txt | 0 .../swift-package/stop--error-no-process.txt | 0 .../swift-package/test--error-bad-path.txt | 0 .../swift-package/test--failure.txt | 0 .../swift-package/test--success.txt | 0 .../button--error-no-simulator.txt | 0 .../ui-automation/button--success.txt | 0 .../gesture--error-no-simulator.txt | 0 .../ui-automation/gesture--success.txt | 0 .../key-press--error-no-simulator.txt | 0 .../ui-automation/key-press--success.txt | 0 .../key-sequence--error-no-simulator.txt | 0 .../ui-automation/key-sequence--success.txt | 0 .../long-press--error-no-simulator.txt | 0 .../ui-automation/long-press--success.txt | 0 .../snapshot-ui--error-no-simulator.txt | 0 .../ui-automation/snapshot-ui--success.txt | 6 +- .../swipe--error-no-simulator.txt | 0 .../ui-automation/swipe--success.txt | 0 .../ui-automation/tap--error-no-simulator.txt | 0 .../{ => text}/ui-automation/tap--success.txt | 0 .../touch--error-no-simulator.txt | 0 .../ui-automation/touch--success.txt | 0 .../type-text--error-no-simulator.txt | 0 .../ui-automation/type-text--success.txt | 0 .../utilities/clean--error-wrong-scheme.txt | 0 .../{ => text}/utilities/clean--success.txt | 0 .../documentation-search--success.txt | 0 .../xcode-ide/list-tools--success.txt | 0 .../json/device/get-app-path--success.json | 21 - .../json/device/test--failure.json | 205 -- .../list-schemes--success.json | 15 - .../scaffold-ios--success.json | 17 - .../scaffold-macos--success.json | 17 - .../open--error-launch-services-timeout.json | 22 - .../json/simulator/get-app-path--success.json | 23 - .../json/simulator/test--failure.json | 379 --- ...coverage-report--error-invalid-bundle.json | 23 + .../get-coverage-report--success.json | 7 +- ...t-file-coverage--error-invalid-bundle.json | 24 + .../coverage/get-file-coverage--success.json | 7 +- .../add-breakpoint--error-no-session.json | 22 + .../debugging/add-breakpoint--success.json | 15 + .../debugging/attach--error-no-process.json | 20 + .../debugging/attach--success-continue.json | 23 + .../json/debugging/attach--success.json | 9 +- .../debugging/continue--error-no-session.json | 17 + .../json/debugging/continue--success.json} | 8 +- .../debugging/detach--error-no-session.json | 17 + .../mcp/json/debugging/detach--success.json | 13 + .../lldb-command--error-no-session.json | 18 + .../json/debugging/lldb-command--success.json | 17 + .../remove-breakpoint--error-no-session.json | 20 + .../debugging/remove-breakpoint--success.json | 12 + .../debugging/stack--error-no-session.json | 16 + .../mcp/json/debugging/stack--success.json | 102 + .../variables--error-no-session.json | 16 + .../json/debugging/variables--success.json | 40 + .../json/device/build--error-compiler.json | 25 + .../device/build--error-wrong-scheme.json | 24 + .../mcp/json/device/build--success.json | 23 + .../device/build-and-run--error-compiler.json | 26 + .../build-and-run--error-wrong-scheme.json | 25 + .../json/device/build-and-run--success.json | 27 + .../get-app-path--error-wrong-scheme.json | 20 + .../json/device/get-app-path--success.json | 20 + .../device/install--error-invalid-app.json | 23 + .../json/device}/install--success.json | 6 +- .../device/launch--error-invalid-bundle.json | 23 + .../json/device/launch--success.json | 7 +- .../{ => mcp}/json/device/list--success.json | 11 +- .../mcp/json/device/stop--error-no-app.json | 23 + .../mcp/json/device/stop--success.json | 19 + .../mcp/json/device/test--error-compiler.json | 44 + .../mcp/json/device/test--failure.json | 68 + .../mcp/json/device/test--success.json | 47 + .../mcp/json/macos/build--error-compiler.json | 25 + .../json/macos/build--error-wrong-scheme.json | 24 + .../mcp/json/macos/build--success.json | 24 + .../macos/build-and-run--error-compiler.json | 25 + .../build-and-run--error-wrong-scheme.json | 24 + .../json/macos/build-and-run--success.json | 30 + .../get-app-path--error-wrong-scheme.json | 20 + .../mcp/json/macos/get-app-path--success.json | 19 + ...et-macos-bundle-id--error-missing-app.json | 19 + .../macos/get-macos-bundle-id--success.json | 8 +- .../json/macos/launch--error-invalid-app.json | 22 + .../mcp/json/macos/launch--success.json | 20 + .../mcp/json/macos/stop--error-no-app.json | 23 + .../mcp/json/macos/stop--success.json | 18 + .../mcp/json/macos/test--error-compiler.json | 45 + .../json/macos/test--error-wrong-scheme.json | 31 + .../mcp/json/macos/test--failure.json | 65 + .../mcp/json/macos/test--success.json | 54 + .../discover-projs--error-invalid-root.json | 26 + .../discover-projs--success.json | 32 + .../get-app-bundle-id--error-missing-app.json | 19 + .../get-app-bundle-id--success.json | 18 + ...et-macos-bundle-id--error-missing-app.json | 19 + .../get-macos-bundle-id--success.json | 8 +- ...list-schemes--error-invalid-workspace.json | 20 + .../list-schemes--success.json | 21 + ...ow-build-settings--error-wrong-scheme.json | 21 + .../show-build-settings--success.json | 9 +- .../scaffold-ios--error-existing.json | 24 + .../scaffold-ios--success.json | 22 + .../scaffold-macos--error-existing.json | 24 + .../scaffold-macos--success.json | 22 + .../session-clear-defaults--success.json | 2 +- .../session-set-defaults--scheme.json | 2 +- .../session-set-defaults--success.json | 2 +- .../session-show-defaults--empty.json | 2 +- .../session-show-defaults--success.json | 2 +- .../session-sync-xcode-defaults--success.json | 2 +- ...use-defaults-profile--persist-success.json | 2 +- ...session-use-defaults-profile--success.json | 2 +- .../boot--error-invalid-id.json | 25 + .../simulator-management/boot--success.json | 22 + .../erase--error-invalid-id.json | 25 + .../simulator-management/erase--success.json} | 4 +- .../simulator-management/list--success.json | 10 +- .../simulator-management/open--success.json | 7 +- ...set-location--error-invalid-simulator.json | 25 + .../reset-location--success.json | 17 + ...t-appearance--error-invalid-simulator.json | 26 + .../set-appearance--success.json | 18 + ...set-location--error-invalid-simulator.json | 29 + .../set-location--success.json | 21 + .../statusbar--error-invalid-simulator.json | 26 + .../statusbar--success.json | 18 + ...are-keyboard--error-invalid-simulator.json | 25 + ...le-connect-hardware-keyboard--success.json | 17 + ...are-keyboard--error-invalid-simulator.json | 25 + .../toggle-software-keyboard--success.json | 17 + .../json/simulator/build--error-compiler.json | 25 + .../simulator/build--error-wrong-scheme.json | 24 + .../mcp/json/simulator/build--success.json | 23 + .../build-and-run--error-compiler.json | 25 + .../build-and-run--error-wrong-scheme.json | 24 + .../simulator/build-and-run--success.json | 29 + .../get-app-path--error-wrong-scheme.json | 20 + .../json/simulator/get-app-path--success.json | 22 + .../simulator/install--error-invalid-app.json | 23 + .../mcp/json/simulator/install--success.json | 23 + .../launch-app--error-not-installed.json | 23 + .../json/simulator/launch-app--success.json | 8 +- .../json/simulator/list--success.json | 10 +- .../screenshot--error-invalid-simulator.json | 22 + .../json/simulator/screenshot--success.json | 20 + .../json/simulator/stop--error-no-app.json | 23 + .../mcp/json/simulator/stop--success.json | 19 + .../json/simulator/test--error-compiler.json | 37 + .../simulator/test--error-wrong-scheme.json | 25 + .../mcp/json/simulator/test--failure.json | 78 + .../mcp/json/simulator/test--success.json | 46 + .../swift-package/build--error-bad-path.json | 25 + .../json/swift-package/build--success.json | 21 + .../swift-package/clean--error-bad-path.json | 23 + .../json/swift-package/clean--success.json | 19 + .../swift-package/list--no-processes.json | 12 + .../mcp/json/swift-package/list--success.json | 21 + .../run--error-bad-executable.json | 25 + .../mcp/json/swift-package/run--success.json | 40 + .../swift-package/stop--error-no-process.json | 22 + .../swift-package/test--error-bad-path.json | 26 + .../mcp/json/swift-package/test--failure.json | 52 + .../mcp/json/swift-package/test--success.json | 33 + .../button--error-no-simulator.json | 26 + .../json/ui-automation/button--success.json | 18 + .../gesture--error-no-simulator.json | 26 + .../json/ui-automation/gesture--success.json | 18 + .../key-press--error-no-simulator.json | 26 + .../ui-automation/key-press--success.json | 18 + .../key-sequence--error-no-simulator.json | 30 + .../ui-automation/key-sequence--success.json | 22 + .../long-press--error-no-simulator.json | 28 + .../ui-automation/long-press--success.json | 28 + .../snapshot-ui--error-no-simulator.json | 22 + .../ui-automation/snapshot-ui--success.json | 9 +- .../swipe--error-no-simulator.json | 25 + .../json/ui-automation/swipe--success.json | 33 + .../tap--error-no-simulator.json | 27 + .../mcp/json/ui-automation/tap--success.json | 27 + .../touch--error-no-simulator.json | 25 + .../json/ui-automation/touch--success.json | 28 + .../type-text--error-no-simulator.json | 25 + .../ui-automation/type-text--success.json | 17 + .../utilities/clean--error-wrong-scheme.json | 25 + .../mcp/json/utilities/clean--success.json | 21 + .../documentation-search--success.json | 14 + .../json/xcode-ide/list-tools--success.json | 12 + ...-coverage-report--error-invalid-bundle.txt | 0 .../coverage/get-coverage-report--success.txt | 0 ...et-file-coverage--error-invalid-bundle.txt | 0 .../coverage/get-file-coverage--success.txt | 0 .../add-breakpoint--error-no-session.txt | 0 .../debugging/add-breakpoint--success.txt | 0 .../debugging/attach--error-no-process.txt | 0 .../debugging/attach--success-continue.txt | 0 .../{ => text}/debugging/attach--success.txt | 0 .../debugging/continue--error-no-session.txt | 0 .../debugging/continue--success.txt | 0 .../debugging/detach--error-no-session.txt | 0 .../{ => text}/debugging/detach--success.txt | 0 .../lldb-command--error-no-session.txt | 0 .../debugging/lldb-command--success.txt | 0 .../remove-breakpoint--error-no-session.txt | 0 .../debugging/remove-breakpoint--success.txt | 0 .../debugging/stack--error-no-session.txt | 0 .../{ => text}/debugging/stack--success.txt | 0 .../debugging/variables--error-no-session.txt | 0 .../debugging/variables--success.txt | 0 .../device/build--error-compiler.txt | 0 .../device/build--error-wrong-scheme.txt | 0 .../mcp/{ => text}/device/build--success.txt | 0 .../device/build-and-run--error-compiler.txt | 0 .../build-and-run--error-wrong-scheme.txt | 0 .../device/build-and-run--success.txt | 0 .../get-app-path--error-wrong-scheme.txt | 0 .../device/get-app-path--success.txt | 0 .../device/install--error-invalid-app.txt | 0 .../{ => text}/device/install--success.txt | 0 .../device/launch--error-invalid-bundle.txt | 0 .../mcp/{ => text}/device/launch--success.txt | 0 .../mcp/{ => text}/device/list--success.txt | 2 +- .../{ => text}/device/stop--error-no-app.txt | 0 .../mcp/{ => text}/device/stop--success.txt | 0 .../device/test--error-compiler.txt | 0 .../mcp/{ => text}/device/test--failure.txt | 0 .../mcp/{ => text}/device/test--success.txt | 0 .../macos/build--error-compiler.txt | 0 .../macos/build--error-wrong-scheme.txt | 0 .../mcp/{ => text}/macos/build--success.txt | 0 .../macos/build-and-run--error-compiler.txt | 0 .../build-and-run--error-wrong-scheme.txt | 0 .../macos/build-and-run--success.txt | 0 .../get-app-path--error-wrong-scheme.txt | 0 .../macos/get-app-path--success.txt | 0 ...get-macos-bundle-id--error-missing-app.txt | 0 .../macos/get-macos-bundle-id--success.txt | 0 .../macos/launch--error-invalid-app.txt | 0 .../mcp/{ => text}/macos/launch--success.txt | 0 .../{ => text}/macos/stop--error-no-app.txt | 0 .../mcp/{ => text}/macos/stop--success.txt | 0 .../{ => text}/macos/test--error-compiler.txt | 0 .../macos/test--error-wrong-scheme.txt | 0 .../mcp/{ => text}/macos/test--failure.txt | 0 .../mcp/{ => text}/macos/test--success.txt | 0 .../discover-projs--error-invalid-root.txt | 0 .../discover-projs--success.txt | 0 .../get-app-bundle-id--error-missing-app.txt | 0 .../get-app-bundle-id--success.txt | 0 ...get-macos-bundle-id--error-missing-app.txt | 0 .../get-macos-bundle-id--success.txt | 0 .../list-schemes--error-invalid-workspace.txt | 0 .../list-schemes--success.txt | 0 ...how-build-settings--error-wrong-scheme.txt | 0 .../show-build-settings--success.txt | 0 .../scaffold-ios--error-existing.txt | 0 .../scaffold-ios--success.txt | 0 .../scaffold-macos--error-existing.txt | 0 .../scaffold-macos--success.txt | 0 .../{ => text}/resources/devices--success.txt | 2 +- .../{ => text}/resources/doctor--success.txt | 0 .../resources/session-status--success.txt | 0 .../resources/simulators--success.txt | 0 .../session-clear-defaults--success.txt | 0 .../session-set-defaults--scheme.txt | 0 .../session-set-defaults--success.txt | 0 .../session-show-defaults--empty.txt | 0 .../session-show-defaults--success.txt | 0 .../session-sync-xcode-defaults--success.txt | 0 .../session-use-defaults-profile--success.txt | 0 .../boot--error-invalid-id.txt | 0 .../simulator-management/boot--success.txt | 0 .../erase--error-invalid-id.txt | 0 .../simulator-management/erase--success.txt | 0 .../simulator-management/list--success.txt | 0 .../simulator-management/open--success.txt | 0 ...eset-location--error-invalid-simulator.txt | 0 .../reset-location--success.txt | 0 ...et-appearance--error-invalid-simulator.txt | 0 .../set-appearance--success.txt | 0 .../set-location--error-invalid-simulator.txt | 0 .../set-location--success.txt | 0 .../statusbar--error-invalid-simulator.txt | 0 .../statusbar--success.txt | 0 ...ware-keyboard--error-invalid-simulator.txt | 0 ...gle-connect-hardware-keyboard--success.txt | 0 ...ware-keyboard--error-invalid-simulator.txt | 0 .../toggle-software-keyboard--success.txt | 0 .../simulator/build--error-compiler.txt | 0 .../simulator/build--error-missing-params.txt | 0 .../simulator/build--error-wrong-scheme.txt | 0 .../{ => text}/simulator/build--success.txt | 0 .../build-and-run--error-compiler.txt | 0 .../build-and-run--error-wrong-scheme.txt | 0 .../simulator/build-and-run--success.txt | 0 .../get-app-path--error-wrong-scheme.txt | 0 .../simulator/get-app-path--success.txt | 0 .../simulator/install--error-invalid-app.txt | 0 .../{ => text}/simulator/install--success.txt | 0 .../launch-app--error-not-installed.txt | 0 .../simulator/launch-app--success.txt | 0 .../{ => text}/simulator/list--success.txt | 0 .../screenshot--error-invalid-simulator.txt | 0 .../simulator/screenshot--success.txt | 0 .../simulator/stop--error-no-app.txt | 0 .../{ => text}/simulator/stop--success.txt | 0 .../simulator/test--error-compiler.txt | 0 .../simulator/test--error-wrong-scheme.txt | 0 .../{ => text}/simulator/test--failure.txt | 0 .../{ => text}/simulator/test--success.txt | 0 .../swift-package/build--error-bad-path.txt | 0 .../swift-package/build--success.txt | 0 .../swift-package/clean--error-bad-path.txt | 0 .../swift-package/clean--success.txt | 0 .../swift-package/list--no-processes.txt | 0 .../swift-package/list--success.txt | 0 .../run--error-bad-executable.txt | 0 .../{ => text}/swift-package/run--success.txt | 0 .../swift-package/stop--error-no-process.txt | 0 .../swift-package/test--error-bad-path.txt | 0 .../swift-package/test--failure.txt | 0 .../swift-package/test--success.txt | 0 .../button--error-no-simulator.txt | 0 .../ui-automation/button--success.txt | 0 .../gesture--error-no-simulator.txt | 0 .../ui-automation/gesture--success.txt | 0 .../key-press--error-no-simulator.txt | 0 .../ui-automation/key-press--success.txt | 0 .../key-sequence--error-no-simulator.txt | 0 .../ui-automation/key-sequence--success.txt | 0 .../long-press--error-no-simulator.txt | 0 .../ui-automation/long-press--success.txt | 0 .../snapshot-ui--error-no-simulator.txt | 0 .../ui-automation/snapshot-ui--success.txt | 0 .../swipe--error-no-simulator.txt | 0 .../ui-automation/swipe--success.txt | 0 .../ui-automation/tap--error-no-simulator.txt | 0 .../{ => text}/ui-automation/tap--success.txt | 0 .../touch--error-no-simulator.txt | 0 .../ui-automation/touch--success.txt | 0 .../type-text--error-no-simulator.txt | 0 .../ui-automation/type-text--success.txt | 0 .../utilities/clean--error-wrong-scheme.txt | 0 .../{ => text}/utilities/clean--success.txt | 0 .../documentation-search--success.txt | 0 .../xcode-ide/list-tools--success.txt | 0 .../cli-json-fixture-parity.snapshot.test.ts | 23 + .../__tests__/coverage.snapshot.test.ts | 4 +- .../__tests__/debugging.snapshot.test.ts | 4 +- .../__tests__/device.snapshot.test.ts | 4 +- .../__tests__/fixture-io.test.ts | 33 +- .../__tests__/json-fixture-schema.test.ts | 33 +- .../json-harness-error-state.test.ts | 48 + .../__tests__/json-normalize.test.ts | 44 +- .../__tests__/macos.snapshot.test.ts | 4 +- ... mcp-json-fixture-parity.snapshot.test.ts} | 24 +- .../__tests__/output-parsers.test.ts | 23 + .../project-discovery.snapshot.test.ts | 4 +- .../project-scaffolding.snapshot.test.ts | 4 +- .../session-management.snapshot.test.ts | 2 +- .../simulator-management.snapshot.test.ts | 4 +- .../__tests__/simulator.snapshot.test.ts | 4 +- .../__tests__/swift-package.snapshot.test.ts | 4 +- .../__tests__/ui-automation.snapshot.test.ts | 4 +- .../__tests__/utilities.snapshot.test.ts | 4 +- .../__tests__/xcode-ide.snapshot.test.ts | 7 +- src/snapshot-tests/contracts.ts | 38 +- src/snapshot-tests/fixture-io.ts | 15 +- src/snapshot-tests/harness.ts | 68 + src/snapshot-tests/json-harness.ts | 4 +- src/snapshot-tests/json-normalize.ts | 60 +- src/snapshot-tests/json-schema-validation.ts | 46 +- src/snapshot-tests/mcp-harness.ts | 22 +- src/snapshot-tests/output-parsers.ts | 76 +- src/snapshot-tests/suites/debugging-suite.ts | 10 +- src/snapshot-tests/suites/device-suite.ts | 8 +- src/snapshot-tests/suites/helpers.ts | 25 +- src/snapshot-tests/suites/macos-suite.ts | 6 +- src/snapshot-tests/suites/resources-suite.ts | 2 +- .../suites/session-management-suite.ts | 40 +- src/snapshot-tests/suites/simulator-suite.ts | 15 +- .../suites/swift-package-suite.ts | 6 +- src/snapshot-tests/suites/xcode-ide-suite.ts | 11 +- 654 files changed, 8072 insertions(+), 1164 deletions(-) rename src/snapshot-tests/__fixtures__/{ => cli}/json/coverage/get-coverage-report--error-invalid-bundle.json (97%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/coverage/get-coverage-report--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/coverage/get-file-coverage--error-invalid-bundle.json (97%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/coverage/get-file-coverage--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/add-breakpoint--error-no-session.json (94%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/add-breakpoint--success.json (91%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/attach--error-no-process.json (93%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/debugging/attach--success-continue.json create mode 100644 src/snapshot-tests/__fixtures__/cli/json/debugging/attach--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/continue--error-no-session.json (93%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/continue--success.json (91%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/detach--error-no-session.json (93%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/detach--success.json (90%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/lldb-command--error-no-session.json (94%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/lldb-command--success.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/remove-breakpoint--error-no-session.json (94%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/remove-breakpoint--success.json (88%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/stack--error-no-session.json (92%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/stack--success.json (99%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/variables--error-no-session.json (93%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/debugging/variables--success.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/build--error-compiler.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/build--error-wrong-scheme.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/build--success.json (84%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/build-and-run--error-compiler.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/build-and-run--error-wrong-scheme.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/build-and-run--success.json (88%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/get-app-path--error-wrong-scheme.json (96%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/device/get-app-path--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/install--error-invalid-app.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/install--success.json (94%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/launch--error-invalid-bundle.json (97%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/device/launch--success.json create mode 100644 src/snapshot-tests/__fixtures__/cli/json/device/list--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/stop--error-no-app.json (96%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/stop--success.json (92%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/test--error-compiler.json (98%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/device/test--failure.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/device/test--success.json (98%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/build--error-compiler.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/build--error-wrong-scheme.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/build--success.json (85%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/build-and-run--error-compiler.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/build-and-run--error-wrong-scheme.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/build-and-run--success.json (90%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/get-app-path--error-wrong-scheme.json (96%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/get-app-path--success.json (54%) rename src/snapshot-tests/__fixtures__/{json/project-discovery => cli/json/macos}/get-macos-bundle-id--error-missing-app.json (94%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/macos/get-macos-bundle-id--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/launch--error-invalid-app.json (94%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/launch--success.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/stop--error-no-app.json (94%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/stop--success.json (92%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/test--error-compiler.json (98%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/test--error-wrong-scheme.json (98%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/test--failure.json (87%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/macos/test--success.json (98%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/project-discovery/discover-projs--error-invalid-root.json (96%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/project-discovery/discover-projs--success.json (82%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/project-discovery/get-app-bundle-id--error-missing-app.json (94%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-app-bundle-id--success.json rename src/snapshot-tests/__fixtures__/{json/macos => cli/json/project-discovery}/get-macos-bundle-id--error-missing-app.json (94%) rename src/snapshot-tests/__fixtures__/{json/project-discovery/get-app-bundle-id--success.json => cli/json/project-discovery/get-macos-bundle-id--success.json} (50%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/project-discovery/list-schemes--error-invalid-workspace.json (94%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/project-discovery/list-schemes--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/project-discovery/show-build-settings--error-wrong-scheme.json (96%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/project-discovery/show-build-settings--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/project-scaffolding/scaffold-ios--error-existing.json (95%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-ios--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/project-scaffolding/scaffold-macos--error-existing.json (95%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-macos--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/boot--error-invalid-id.json (94%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/simulator-management/boot--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/erase--error-invalid-id.json (94%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/erase--success.json (91%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/simulator-management/list--success.json create mode 100644 src/snapshot-tests/__fixtures__/cli/json/simulator-management/open--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/reset-location--error-invalid-simulator.json (94%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/reset-location--success.json (92%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/set-appearance--error-invalid-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/set-appearance--success.json (92%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/set-location--error-invalid-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/set-location--success.json (93%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/statusbar--error-invalid-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/statusbar--success.json (92%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/toggle-connect-hardware-keyboard--success.json (92%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/toggle-software-keyboard--error-invalid-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator-management/toggle-software-keyboard--success.json (92%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/build--error-compiler.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/build--error-wrong-scheme.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/build--success.json (78%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/build-and-run--error-compiler.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/build-and-run--error-wrong-scheme.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/build-and-run--success.json (89%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/get-app-path--error-wrong-scheme.json (96%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/simulator/get-app-path--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/install--error-invalid-app.json (96%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/simulator/install--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/launch-app--error-not-installed.json (95%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/simulator/launch-app--success.json create mode 100644 src/snapshot-tests/__fixtures__/cli/json/simulator/list--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/screenshot--error-invalid-simulator.json (94%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/screenshot--success.json (93%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/stop--error-no-app.json (96%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/stop--success.json (93%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/test--error-compiler.json (98%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/test--error-wrong-scheme.json (97%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/simulator/test--failure.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/simulator/test--success.json (98%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/build--error-bad-path.json (96%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/build--success.json (96%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/clean--error-bad-path.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/clean--success.json (93%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/list--no-processes.json (88%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/list--success.json (93%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/run--error-bad-executable.json (96%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/run--success.json (72%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/stop--error-no-process.json (94%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/test--error-bad-path.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/test--failure.json (73%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/swift-package/test--success.json (97%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/button--error-no-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/button--success.json (92%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/gesture--error-no-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/gesture--success.json (92%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/key-press--error-no-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/key-press--success.json (92%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/key-sequence--error-no-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/key-sequence--success.json (93%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/long-press--error-no-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/long-press--success.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/snapshot-ui--error-no-simulator.json (94%) create mode 100644 src/snapshot-tests/__fixtures__/cli/json/ui-automation/snapshot-ui--success.json rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/swipe--error-no-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/swipe--success.json (96%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/tap--error-no-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/tap--success.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/touch--error-no-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/touch--success.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/type-text--error-no-simulator.json (95%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/ui-automation/type-text--success.json (91%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/utilities/clean--error-wrong-scheme.json (96%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/utilities/clean--success.json (94%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/xcode-ide/documentation-search--success.json (100%) rename src/snapshot-tests/__fixtures__/{ => cli}/json/xcode-ide/list-tools--success.json (100%) delete mode 100644 src/snapshot-tests/__fixtures__/cli/macos/get-macos-bundle-id--success.txt delete mode 100644 src/snapshot-tests/__fixtures__/cli/project-discovery/get-app-bundle-id--success.txt delete mode 100644 src/snapshot-tests/__fixtures__/cli/project-discovery/get-macos-bundle-id--success.txt delete mode 100644 src/snapshot-tests/__fixtures__/cli/project-discovery/list-schemes--success.txt rename src/snapshot-tests/__fixtures__/cli/{ => text}/coverage/get-coverage-report--error-invalid-bundle.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/coverage/get-coverage-report--success.txt (83%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/coverage/get-file-coverage--error-invalid-bundle.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/coverage/get-file-coverage--success.txt (95%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/add-breakpoint--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/add-breakpoint--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/attach--error-no-process.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/attach--success-continue.txt (84%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/attach--success.txt (84%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/continue--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/continue--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/detach--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/detach--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/lldb-command--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/lldb-command--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/remove-breakpoint--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/remove-breakpoint--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/stack--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/stack--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/variables--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/debugging/variables--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/build--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/build--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/build--success.txt (95%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/build-and-run--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/build-and-run--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/build-and-run--success.txt (90%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/get-app-path--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/get-app-path--success.txt (60%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/install--error-invalid-app.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/install--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/launch--error-invalid-bundle.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/launch--success.txt (64%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/list--success.txt (89%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/stop--error-no-app.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/stop--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/test--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/test--failure.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/device/test--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/build--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/build--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/build--success.txt (96%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/build-and-run--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/build-and-run--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/build-and-run--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/get-app-path--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/get-app-path--success.txt (54%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/get-macos-bundle-id--error-missing-app.txt (100%) create mode 100644 src/snapshot-tests/__fixtures__/cli/text/macos/get-macos-bundle-id--success.txt rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/launch--error-invalid-app.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/launch--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/stop--error-no-app.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/stop--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/test--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/test--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/test--failure.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/macos/test--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/project-discovery/discover-projs--error-invalid-root.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/project-discovery/discover-projs--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/project-discovery/get-app-bundle-id--error-missing-app.txt (100%) create mode 100644 src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-app-bundle-id--success.txt rename src/snapshot-tests/__fixtures__/cli/{ => text}/project-discovery/get-macos-bundle-id--error-missing-app.txt (100%) create mode 100644 src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-macos-bundle-id--success.txt rename src/snapshot-tests/__fixtures__/cli/{ => text}/project-discovery/list-schemes--error-invalid-workspace.txt (100%) create mode 100644 src/snapshot-tests/__fixtures__/cli/text/project-discovery/list-schemes--success.txt rename src/snapshot-tests/__fixtures__/cli/{ => text}/project-discovery/show-build-settings--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/project-discovery/show-build-settings--success.txt (99%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/project-scaffolding/scaffold-ios--error-existing.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/project-scaffolding/scaffold-ios--success.txt (63%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/project-scaffolding/scaffold-macos--error-existing.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/project-scaffolding/scaffold-macos--success.txt (60%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/boot--error-invalid-id.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/boot--success.txt (77%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/erase--error-invalid-id.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/erase--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{simulator => text/simulator-management}/list--success.txt (82%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/open--success.txt (70%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/reset-location--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/reset-location--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/set-appearance--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/set-appearance--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/set-location--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/set-location--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/statusbar--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/statusbar--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/toggle-connect-hardware-keyboard--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/toggle-software-keyboard--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator-management/toggle-software-keyboard--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/build--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/build--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/build--success.txt (84%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/build-and-run--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/build-and-run--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/build-and-run--success.txt (96%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/get-app-path--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/get-app-path--success.txt (57%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/install--error-invalid-app.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/install--success.txt (88%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/launch-app--error-not-installed.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/launch-app--success.txt (91%) rename src/snapshot-tests/__fixtures__/cli/{simulator-management => text/simulator}/list--success.txt (82%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/screenshot--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/screenshot--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/stop--error-no-app.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/stop--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/test--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/test--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/test--failure.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/simulator/test--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/build--error-bad-path.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/build--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/clean--error-bad-path.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/clean--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/list--no-processes.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/list--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/run--error-bad-executable.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/run--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/stop--error-no-process.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/test--error-bad-path.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/test--failure.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/swift-package/test--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/button--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/button--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/gesture--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/gesture--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/key-press--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/key-press--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/key-sequence--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/key-sequence--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/long-press--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/long-press--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/snapshot-ui--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/snapshot-ui--success.txt (99%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/swipe--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/swipe--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/tap--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/tap--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/touch--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/touch--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/type-text--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/ui-automation/type-text--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/utilities/clean--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/utilities/clean--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/xcode-ide/documentation-search--success.txt (100%) rename src/snapshot-tests/__fixtures__/cli/{ => text}/xcode-ide/list-tools--success.txt (100%) delete mode 100644 src/snapshot-tests/__fixtures__/json/device/get-app-path--success.json delete mode 100644 src/snapshot-tests/__fixtures__/json/device/test--failure.json delete mode 100644 src/snapshot-tests/__fixtures__/json/project-discovery/list-schemes--success.json delete mode 100644 src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-ios--success.json delete mode 100644 src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-macos--success.json delete mode 100644 src/snapshot-tests/__fixtures__/json/simulator-management/open--error-launch-services-timeout.json delete mode 100644 src/snapshot-tests/__fixtures__/json/simulator/get-app-path--success.json delete mode 100644 src/snapshot-tests/__fixtures__/json/simulator/test--failure.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/coverage/get-coverage-report--error-invalid-bundle.json rename src/snapshot-tests/__fixtures__/{ => mcp}/json/coverage/get-coverage-report--success.json (78%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/coverage/get-file-coverage--error-invalid-bundle.json rename src/snapshot-tests/__fixtures__/{ => mcp}/json/coverage/get-file-coverage--success.json (94%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/add-breakpoint--error-no-session.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/add-breakpoint--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/attach--error-no-process.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/attach--success-continue.json rename src/snapshot-tests/__fixtures__/{ => mcp}/json/debugging/attach--success.json (53%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/continue--error-no-session.json rename src/snapshot-tests/__fixtures__/{json/debugging/attach--success-continue.json => mcp/json/debugging/continue--success.json} (65%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/detach--error-no-session.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/detach--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/lldb-command--error-no-session.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/lldb-command--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/remove-breakpoint--error-no-session.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/remove-breakpoint--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/stack--error-no-session.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/stack--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/variables--error-no-session.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/debugging/variables--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/build--error-compiler.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/build--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/build--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--error-compiler.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/get-app-path--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/get-app-path--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/install--error-invalid-app.json rename src/snapshot-tests/__fixtures__/{json/simulator => mcp/json/device}/install--success.json (79%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/launch--error-invalid-bundle.json rename src/snapshot-tests/__fixtures__/{ => mcp}/json/device/launch--success.json (72%) rename src/snapshot-tests/__fixtures__/{ => mcp}/json/device/list--success.json (79%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/stop--error-no-app.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/stop--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/test--error-compiler.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/test--failure.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/device/test--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/build--error-compiler.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/build--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/build--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--error-compiler.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/get-app-path--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/get-app-path--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/get-macos-bundle-id--error-missing-app.json rename src/snapshot-tests/__fixtures__/{ => mcp}/json/macos/get-macos-bundle-id--success.json (52%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/launch--error-invalid-app.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/launch--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/stop--error-no-app.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/stop--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/test--error-compiler.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/test--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/test--failure.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/macos/test--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-discovery/discover-projs--error-invalid-root.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-discovery/discover-projs--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-app-bundle-id--error-missing-app.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-app-bundle-id--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-macos-bundle-id--error-missing-app.json rename src/snapshot-tests/__fixtures__/{ => mcp}/json/project-discovery/get-macos-bundle-id--success.json (52%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-discovery/list-schemes--error-invalid-workspace.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-discovery/list-schemes--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-discovery/show-build-settings--error-wrong-scheme.json rename src/snapshot-tests/__fixtures__/{ => mcp}/json/project-discovery/show-build-settings--success.json (99%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-ios--error-existing.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-ios--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-macos--error-existing.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-macos--success.json rename src/snapshot-tests/__fixtures__/{ => mcp}/json/session-management/session-clear-defaults--success.json (96%) rename src/snapshot-tests/__fixtures__/{ => mcp}/json/session-management/session-set-defaults--scheme.json (96%) rename src/snapshot-tests/__fixtures__/{ => mcp}/json/session-management/session-set-defaults--success.json (96%) rename src/snapshot-tests/__fixtures__/{ => mcp}/json/session-management/session-show-defaults--empty.json (96%) rename src/snapshot-tests/__fixtures__/{ => mcp}/json/session-management/session-show-defaults--success.json (98%) rename src/snapshot-tests/__fixtures__/{ => mcp}/json/session-management/session-sync-xcode-defaults--success.json (98%) rename src/snapshot-tests/__fixtures__/{ => mcp}/json/session-management/session-use-defaults-profile--persist-success.json (89%) rename src/snapshot-tests/__fixtures__/{ => mcp}/json/session-management/session-use-defaults-profile--success.json (88%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/boot--error-invalid-id.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/boot--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/erase--error-invalid-id.json rename src/snapshot-tests/__fixtures__/{json/simulator-management/boot--success.json => mcp/json/simulator-management/erase--success.json} (84%) rename src/snapshot-tests/__fixtures__/{ => mcp}/json/simulator-management/list--success.json (84%) rename src/snapshot-tests/__fixtures__/{ => mcp}/json/simulator-management/open--success.json (58%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/reset-location--error-invalid-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/reset-location--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-appearance--error-invalid-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-appearance--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-location--error-invalid-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-location--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/statusbar--error-invalid-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/statusbar--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-connect-hardware-keyboard--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-software-keyboard--error-invalid-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-software-keyboard--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/build--error-compiler.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/build--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/build--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--error-compiler.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/get-app-path--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/get-app-path--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/install--error-invalid-app.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/install--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/launch-app--error-not-installed.json rename src/snapshot-tests/__fixtures__/{ => mcp}/json/simulator/launch-app--success.json (75%) rename src/snapshot-tests/__fixtures__/{ => mcp}/json/simulator/list--success.json (84%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/screenshot--error-invalid-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/screenshot--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/stop--error-no-app.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/stop--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/test--error-compiler.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/test--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/test--failure.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/simulator/test--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/build--error-bad-path.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/build--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/clean--error-bad-path.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/clean--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/list--no-processes.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/list--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/run--error-bad-executable.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/run--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/stop--error-no-process.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--error-bad-path.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--failure.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/button--error-no-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/button--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/gesture--error-no-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/gesture--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-press--error-no-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-press--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-sequence--error-no-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-sequence--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/long-press--error-no-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/long-press--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/snapshot-ui--error-no-simulator.json rename src/snapshot-tests/__fixtures__/{ => mcp}/json/ui-automation/snapshot-ui--success.json (98%) create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/swipe--error-no-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/swipe--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/tap--error-no-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/tap--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/touch--error-no-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/touch--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/type-text--error-no-simulator.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/ui-automation/type-text--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/utilities/clean--error-wrong-scheme.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/utilities/clean--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/documentation-search--success.json create mode 100644 src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/list-tools--success.json rename src/snapshot-tests/__fixtures__/mcp/{ => text}/coverage/get-coverage-report--error-invalid-bundle.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/coverage/get-coverage-report--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/coverage/get-file-coverage--error-invalid-bundle.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/coverage/get-file-coverage--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/add-breakpoint--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/add-breakpoint--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/attach--error-no-process.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/attach--success-continue.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/attach--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/continue--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/continue--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/detach--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/detach--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/lldb-command--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/lldb-command--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/remove-breakpoint--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/remove-breakpoint--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/stack--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/stack--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/variables--error-no-session.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/debugging/variables--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/build--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/build--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/build--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/build-and-run--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/build-and-run--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/build-and-run--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/get-app-path--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/get-app-path--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/install--error-invalid-app.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/install--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/launch--error-invalid-bundle.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/launch--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/list--success.txt (97%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/stop--error-no-app.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/stop--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/test--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/test--failure.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/device/test--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/build--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/build--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/build--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/build-and-run--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/build-and-run--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/build-and-run--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/get-app-path--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/get-app-path--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/get-macos-bundle-id--error-missing-app.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/get-macos-bundle-id--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/launch--error-invalid-app.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/launch--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/stop--error-no-app.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/stop--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/test--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/test--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/test--failure.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/macos/test--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-discovery/discover-projs--error-invalid-root.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-discovery/discover-projs--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-discovery/get-app-bundle-id--error-missing-app.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-discovery/get-app-bundle-id--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-discovery/get-macos-bundle-id--error-missing-app.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-discovery/get-macos-bundle-id--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-discovery/list-schemes--error-invalid-workspace.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-discovery/list-schemes--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-discovery/show-build-settings--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-discovery/show-build-settings--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-scaffolding/scaffold-ios--error-existing.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-scaffolding/scaffold-ios--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-scaffolding/scaffold-macos--error-existing.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/project-scaffolding/scaffold-macos--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/resources/devices--success.txt (97%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/resources/doctor--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/resources/session-status--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/resources/simulators--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/session-management/session-clear-defaults--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/session-management/session-set-defaults--scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/session-management/session-set-defaults--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/session-management/session-show-defaults--empty.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/session-management/session-show-defaults--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/session-management/session-sync-xcode-defaults--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/session-management/session-use-defaults-profile--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/boot--error-invalid-id.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/boot--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/erase--error-invalid-id.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/erase--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/list--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/open--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/reset-location--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/reset-location--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/set-appearance--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/set-appearance--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/set-location--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/set-location--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/statusbar--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/statusbar--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/toggle-connect-hardware-keyboard--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/toggle-software-keyboard--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator-management/toggle-software-keyboard--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/build--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/build--error-missing-params.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/build--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/build--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/build-and-run--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/build-and-run--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/build-and-run--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/get-app-path--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/get-app-path--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/install--error-invalid-app.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/install--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/launch-app--error-not-installed.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/launch-app--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/list--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/screenshot--error-invalid-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/screenshot--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/stop--error-no-app.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/stop--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/test--error-compiler.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/test--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/test--failure.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/simulator/test--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/build--error-bad-path.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/build--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/clean--error-bad-path.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/clean--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/list--no-processes.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/list--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/run--error-bad-executable.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/run--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/stop--error-no-process.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/test--error-bad-path.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/test--failure.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/swift-package/test--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/button--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/button--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/gesture--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/gesture--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/key-press--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/key-press--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/key-sequence--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/key-sequence--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/long-press--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/long-press--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/snapshot-ui--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/snapshot-ui--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/swipe--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/swipe--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/tap--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/tap--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/touch--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/touch--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/type-text--error-no-simulator.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/ui-automation/type-text--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/utilities/clean--error-wrong-scheme.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/utilities/clean--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/xcode-ide/documentation-search--success.txt (100%) rename src/snapshot-tests/__fixtures__/mcp/{ => text}/xcode-ide/list-tools--success.txt (100%) create mode 100644 src/snapshot-tests/__tests__/cli-json-fixture-parity.snapshot.test.ts create mode 100644 src/snapshot-tests/__tests__/json-harness-error-state.test.ts rename src/snapshot-tests/__tests__/{json-fixture-parity.snapshot.test.ts => mcp-json-fixture-parity.snapshot.test.ts} (64%) create mode 100644 src/snapshot-tests/__tests__/output-parsers.test.ts diff --git a/package.json b/package.json index 70c1fad7a..c058ebbe1 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "test:schema-fixtures": "vitest run --config vitest.snapshot.config.ts src/snapshot-tests/__tests__/json-fixture-schema.test.ts", "test:snapshot": "npm run build && node build/cli.js daemon stop 2>/dev/null; vitest run --config vitest.snapshot.config.ts", "test:snapshots": "npm run test:snapshot", - "test:snapshot:device": "npm run build && node build/cli.js daemon stop 2>/dev/null; vitest run --config vitest.snapshot.config.ts src/snapshot-tests/__tests__/device.snapshot.test.ts", + "test:snapshot:device": "npm run build && node build/cli.js daemon stop 2>/dev/null; vitest run --config vitest.snapshot.config.ts src/snapshot-tests/__tests__/device.snapshot.test.ts src/snapshot-tests/__tests__/cli-json-fixture-parity.snapshot.test.ts src/snapshot-tests/__tests__/mcp-json-fixture-parity.snapshot.test.ts -t 'device workflow'", "test:snapshot:update": "npm run build && node build/cli.js daemon stop 2>/dev/null; UPDATE_SNAPSHOTS=1 vitest run --config vitest.snapshot.config.ts", "test:snapshots:update": "npm run test:snapshot:update", "test:smoke": "npm run build && vitest run --config vitest.smoke.config.ts", diff --git a/src/snapshot-tests/__fixtures__/json/coverage/get-coverage-report--error-invalid-bundle.json b/src/snapshot-tests/__fixtures__/cli/json/coverage/get-coverage-report--error-invalid-bundle.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/coverage/get-coverage-report--error-invalid-bundle.json rename to src/snapshot-tests/__fixtures__/cli/json/coverage/get-coverage-report--error-invalid-bundle.json index ad0470a59..ea482fdd5 100644 --- a/src/snapshot-tests/__fixtures__/json/coverage/get-coverage-report--error-invalid-bundle.json +++ b/src/snapshot-tests/__fixtures__/cli/json/coverage/get-coverage-report--error-invalid-bundle.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.coverage-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to get coverage report.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/coverage/get-coverage-report--success.json b/src/snapshot-tests/__fixtures__/cli/json/coverage/get-coverage-report--success.json new file mode 100644 index 000000000..587947ba3 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/coverage/get-coverage-report--success.json @@ -0,0 +1,30 @@ +{ + "schema": "xcodebuildmcp.output.coverage-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "coveragePct": 94.9, + "coveredLines": 371, + "executableLines": 391 + }, + "coverageScope": "report", + "artifacts": { + "xcresultPath": "/TestResults.xcresult", + "target": "CalculatorAppTests" + }, + "targets": [ + { + "name": "CalculatorAppTests.xctest", + "coveragePct": 94.9, + "coveredLines": 371, + "executableLines": 391 + } + ] + }, + "nextSteps": [ + "View file-level coverage: xcodebuildmcp coverage get-file-coverage --xcresult-path /TestResults.xcresult" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/coverage/get-file-coverage--error-invalid-bundle.json b/src/snapshot-tests/__fixtures__/cli/json/coverage/get-file-coverage--error-invalid-bundle.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/coverage/get-file-coverage--error-invalid-bundle.json rename to src/snapshot-tests/__fixtures__/cli/json/coverage/get-file-coverage--error-invalid-bundle.json index 3f429e6d9..99520064a 100644 --- a/src/snapshot-tests/__fixtures__/json/coverage/get-file-coverage--error-invalid-bundle.json +++ b/src/snapshot-tests/__fixtures__/cli/json/coverage/get-file-coverage--error-invalid-bundle.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.coverage-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to get file coverage.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/coverage/get-file-coverage--success.json b/src/snapshot-tests/__fixtures__/cli/json/coverage/get-file-coverage--success.json new file mode 100644 index 000000000..ecc52c88c --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/coverage/get-file-coverage--success.json @@ -0,0 +1,103 @@ +{ + "schema": "xcodebuildmcp.output.coverage-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "coveragePct": 83.1, + "coveredLines": 157, + "executableLines": 189 + }, + "coverageScope": "file", + "artifacts": { + "xcresultPath": "/TestResults.xcresult", + "file": "CalculatorService.swift", + "sourceFilePath": "/example_projects/iOS_Calculator/CalculatorAppPackage/Sources/CalculatorAppFeature/CalculatorService.swift" + }, + "functions": { + "notCovered": [ + { + "line": 159, + "name": "CalculatorService.deleteLastDigit()", + "coveredLines": 0, + "executableLines": 16 + }, + { + "line": 58, + "name": "implicit closure #2 in CalculatorService.inputNumber(_:)", + "coveredLines": 0, + "executableLines": 1 + }, + { + "line": 98, + "name": "implicit closure #3 in CalculatorService.calculate()", + "coveredLines": 0, + "executableLines": 1 + }, + { + "line": 99, + "name": "implicit closure #4 in CalculatorService.calculate()", + "coveredLines": 0, + "executableLines": 1 + }, + { + "line": 162, + "name": "implicit closure #1 in CalculatorService.deleteLastDigit()", + "coveredLines": 0, + "executableLines": 1 + }, + { + "line": 172, + "name": "implicit closure #2 in CalculatorService.deleteLastDigit()", + "coveredLines": 0, + "executableLines": 1 + }, + { + "line": 214, + "name": "implicit closure #4 in CalculatorService.formatNumber(_:)", + "coveredLines": 0, + "executableLines": 1 + } + ], + "partialCoverage": [ + { + "line": 184, + "name": "CalculatorService.updateExpressionDisplay()", + "coveragePct": 80, + "coveredLines": 8, + "executableLines": 10 + }, + { + "line": 195, + "name": "CalculatorService.formatNumber(_:)", + "coveragePct": 85.7, + "coveredLines": 18, + "executableLines": 21 + }, + { + "line": 93, + "name": "CalculatorService.calculate()", + "coveragePct": 89.5, + "coveredLines": 34, + "executableLines": 38 + }, + { + "line": 63, + "name": "CalculatorService.inputDecimal()", + "coveragePct": 92.9, + "coveredLines": 13, + "executableLines": 14 + } + ], + "fullCoverageCount": 28, + "notCoveredFunctionCount": 7, + "notCoveredLineCount": 22, + "partialCoverageFunctionCount": 4 + } + }, + "nextSteps": [ + "View overall coverage: xcodebuildmcp coverage get-coverage-report --xcresult-path /TestResults.xcresult" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/debugging/add-breakpoint--error-no-session.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/add-breakpoint--error-no-session.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/debugging/add-breakpoint--error-no-session.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/add-breakpoint--error-no-session.json index 439fb0068..fe7fe8912 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/add-breakpoint--error-no-session.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/add-breakpoint--error-no-session.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-breakpoint-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to add breakpoint.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/add-breakpoint--success.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/add-breakpoint--success.json similarity index 91% rename from src/snapshot-tests/__fixtures__/json/debugging/add-breakpoint--success.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/add-breakpoint--success.json index da8962abf..8f715e077 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/add-breakpoint--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/add-breakpoint--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-breakpoint-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/attach--error-no-process.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/attach--error-no-process.json similarity index 93% rename from src/snapshot-tests/__fixtures__/json/debugging/attach--error-no-process.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/attach--error-no-process.json index fee47c69d..f58a8e8dd 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/attach--error-no-process.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/attach--error-no-process.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-session-action", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to attach debugger.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/debugging/attach--success-continue.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/attach--success-continue.json new file mode 100644 index 000000000..5cbc1a7b5 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/attach--success-continue.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.debug-session-action", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "action": "attach", + "session": { + "debugSessionId": "", + "connectionState": "attached", + "executionState": "running" + }, + "artifacts": { + "simulatorId": "", + "processId": 99999 + } + }, + "nextSteps": [ + "Add a breakpoint: xcodebuildmcp debugging add-breakpoint --debug-session-id --file ... --line 123", + "Continue execution: xcodebuildmcp debugging continue --debug-session-id ", + "Show call stack: xcodebuildmcp debugging stack --debug-session-id " + ] +} diff --git a/src/snapshot-tests/__fixtures__/cli/json/debugging/attach--success.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/attach--success.json new file mode 100644 index 000000000..648232446 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/attach--success.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.debug-session-action", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "action": "attach", + "session": { + "debugSessionId": "", + "connectionState": "attached", + "executionState": "paused" + }, + "artifacts": { + "simulatorId": "", + "processId": 99999 + } + }, + "nextSteps": [ + "Add a breakpoint: xcodebuildmcp debugging add-breakpoint --debug-session-id --file ... --line 123", + "Continue execution: xcodebuildmcp debugging continue --debug-session-id ", + "Show call stack: xcodebuildmcp debugging stack --debug-session-id " + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/debugging/continue--error-no-session.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/continue--error-no-session.json similarity index 93% rename from src/snapshot-tests/__fixtures__/json/debugging/continue--error-no-session.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/continue--error-no-session.json index ac0bdce8d..03f1a220f 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/continue--error-no-session.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/continue--error-no-session.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-session-action", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to resume debugger.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/continue--success.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/continue--success.json similarity index 91% rename from src/snapshot-tests/__fixtures__/json/debugging/continue--success.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/continue--success.json index 516b6e95e..fd757cdb0 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/continue--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/continue--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-session-action", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/detach--error-no-session.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/detach--error-no-session.json similarity index 93% rename from src/snapshot-tests/__fixtures__/json/debugging/detach--error-no-session.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/detach--error-no-session.json index a6583e43b..ec6f0afe4 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/detach--error-no-session.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/detach--error-no-session.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-session-action", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to detach debugger.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/detach--success.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/detach--success.json similarity index 90% rename from src/snapshot-tests/__fixtures__/json/debugging/detach--success.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/detach--success.json index 752f3772b..d7b3feace 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/detach--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/detach--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-session-action", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/lldb-command--error-no-session.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/lldb-command--error-no-session.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/debugging/lldb-command--error-no-session.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/lldb-command--error-no-session.json index ccd2e6779..5d3c99e3e 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/lldb-command--error-no-session.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/lldb-command--error-no-session.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-command-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to run LLDB command.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/lldb-command--success.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/lldb-command--success.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/debugging/lldb-command--success.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/lldb-command--success.json index 4f02e93b4..404fe080a 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/lldb-command--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/lldb-command--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-command-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/remove-breakpoint--error-no-session.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/remove-breakpoint--error-no-session.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/debugging/remove-breakpoint--error-no-session.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/remove-breakpoint--error-no-session.json index 36464ac89..826302cdb 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/remove-breakpoint--error-no-session.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/remove-breakpoint--error-no-session.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-breakpoint-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to remove breakpoint.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/remove-breakpoint--success.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/remove-breakpoint--success.json similarity index 88% rename from src/snapshot-tests/__fixtures__/json/debugging/remove-breakpoint--success.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/remove-breakpoint--success.json index 8b795c75b..147ae8dbf 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/remove-breakpoint--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/remove-breakpoint--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-breakpoint-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/stack--error-no-session.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/stack--error-no-session.json similarity index 92% rename from src/snapshot-tests/__fixtures__/json/debugging/stack--error-no-session.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/stack--error-no-session.json index 88761df67..5832685a2 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/stack--error-no-session.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/stack--error-no-session.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-stack-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to get stack.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/stack--success.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/stack--success.json similarity index 99% rename from src/snapshot-tests/__fixtures__/json/debugging/stack--success.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/stack--success.json index 607bca46d..70eee683f 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/stack--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/stack--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-stack-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/variables--error-no-session.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/variables--error-no-session.json similarity index 93% rename from src/snapshot-tests/__fixtures__/json/debugging/variables--error-no-session.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/variables--error-no-session.json index 7a62091f7..baf311d84 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/variables--error-no-session.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/variables--error-no-session.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-variables-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to get variables.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/debugging/variables--success.json b/src/snapshot-tests/__fixtures__/cli/json/debugging/variables--success.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/debugging/variables--success.json rename to src/snapshot-tests/__fixtures__/cli/json/debugging/variables--success.json index 06d6ac7af..2025f5fd1 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/variables--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/debugging/variables--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-variables-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/device/build--error-compiler.json b/src/snapshot-tests/__fixtures__/cli/json/device/build--error-compiler.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/device/build--error-compiler.json rename to src/snapshot-tests/__fixtures__/cli/json/device/build--error-compiler.json index 553c9a60b..2713f592f 100644 --- a/src/snapshot-tests/__fixtures__/json/device/build--error-compiler.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/build--error-compiler.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/device/build--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/device/build--error-wrong-scheme.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/device/build--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/device/build--error-wrong-scheme.json index 90651be36..dbc1d4175 100644 --- a/src/snapshot-tests/__fixtures__/json/device/build--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/build--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/device/build--success.json b/src/snapshot-tests/__fixtures__/cli/json/device/build--success.json similarity index 84% rename from src/snapshot-tests/__fixtures__/json/device/build--success.json rename to src/snapshot-tests/__fixtures__/cli/json/device/build--success.json index 32a27debe..f4e221ecb 100644 --- a/src/snapshot-tests/__fixtures__/json/device/build--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/build--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -24,5 +24,8 @@ "warnings": [], "errors": [] } - } + }, + "nextSteps": [ + "Get built device app path: xcodebuildmcp device get-app-path --scheme CalculatorApp" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/device/build-and-run--error-compiler.json b/src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--error-compiler.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/device/build-and-run--error-compiler.json rename to src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--error-compiler.json index eb4e6eaee..c4ddb1575 100644 --- a/src/snapshot-tests/__fixtures__/json/device/build-and-run--error-compiler.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--error-compiler.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-run-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/device/build-and-run--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--error-wrong-scheme.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/device/build-and-run--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--error-wrong-scheme.json index df2f3da04..7249899ca 100644 --- a/src/snapshot-tests/__fixtures__/json/device/build-and-run--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-run-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/device/build-and-run--success.json b/src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--success.json similarity index 88% rename from src/snapshot-tests/__fixtures__/json/device/build-and-run--success.json rename to src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--success.json index dfe0d6712..9170ce9d7 100644 --- a/src/snapshot-tests/__fixtures__/json/device/build-and-run--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-run-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -29,5 +29,8 @@ "warnings": [], "errors": [] } - } + }, + "nextSteps": [ + "Stop app on device: xcodebuildmcp device stop --device-id --process-id 30015" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/device/get-app-path--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/device/get-app-path--error-wrong-scheme.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/device/get-app-path--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/device/get-app-path--error-wrong-scheme.json index 0683de94d..75a3a6c60 100644 --- a/src/snapshot-tests/__fixtures__/json/device/get-app-path--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/get-app-path--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.app-path", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Query failed.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/device/get-app-path--success.json b/src/snapshot-tests/__fixtures__/cli/json/device/get-app-path--success.json new file mode 100644 index 000000000..2ad03d5b5 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/device/get-app-path--success.json @@ -0,0 +1,26 @@ +{ + "schema": "xcodebuildmcp.output.app-path", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "request": { + "scheme": "CalculatorApp", + "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", + "configuration": "Debug", + "platform": "iOS" + }, + "summary": { + "status": "SUCCEEDED", + "target": "device" + }, + "artifacts": { + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app" + } + }, + "nextSteps": [ + "Get bundle ID: xcodebuildmcp device get-app-bundle-id --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app", + "Install app on device: xcodebuildmcp device install --device-id DEVICE_UDID --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app", + "Launch app on device: xcodebuildmcp device launch --device-id DEVICE_UDID --bundle-id BUNDLE_ID" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/device/install--error-invalid-app.json b/src/snapshot-tests/__fixtures__/cli/json/device/install--error-invalid-app.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/device/install--error-invalid-app.json rename to src/snapshot-tests/__fixtures__/cli/json/device/install--error-invalid-app.json index 47384e46f..8f1c231ad 100644 --- a/src/snapshot-tests/__fixtures__/json/device/install--error-invalid-app.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/install--error-invalid-app.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.install-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to install app.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/device/install--success.json b/src/snapshot-tests/__fixtures__/cli/json/device/install--success.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/device/install--success.json rename to src/snapshot-tests/__fixtures__/cli/json/device/install--success.json index 1735ba24f..69372529c 100644 --- a/src/snapshot-tests/__fixtures__/json/device/install--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/install--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.install-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/device/launch--error-invalid-bundle.json b/src/snapshot-tests/__fixtures__/cli/json/device/launch--error-invalid-bundle.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/device/launch--error-invalid-bundle.json rename to src/snapshot-tests/__fixtures__/cli/json/device/launch--error-invalid-bundle.json index 042a4a4cb..f7e17416b 100644 --- a/src/snapshot-tests/__fixtures__/json/device/launch--error-invalid-bundle.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/launch--error-invalid-bundle.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.launch-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to launch app.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/device/launch--success.json b/src/snapshot-tests/__fixtures__/cli/json/device/launch--success.json new file mode 100644 index 000000000..579fa1edd --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/device/launch--success.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.launch-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "artifacts": { + "deviceId": "", + "bundleId": "io.sentry.calculatorapp", + "processId": 99999 + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + }, + "nextSteps": [ + "Stop the app: xcodebuildmcp device stop --device-id --process-id 30016" + ] +} diff --git a/src/snapshot-tests/__fixtures__/cli/json/device/list--success.json b/src/snapshot-tests/__fixtures__/cli/json/device/list--success.json new file mode 100644 index 000000000..7afe3306d --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/device/list--success.json @@ -0,0 +1,47 @@ +{ + "schema": "xcodebuildmcp.output.device-list", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "devices": [ + { + "name": "Cameron’s iPhone 16 Pro Max", + "deviceId": "", + "platform": "iOS", + "state": "connected", + "isAvailable": true, + "osVersion": "26.4.2" + }, + { + "name": "iPhone", + "deviceId": "", + "platform": "iOS", + "state": "disconnected", + "isAvailable": false, + "osVersion": "26.1" + }, + { + "name": "Cameron’s Apple Watch", + "deviceId": "", + "platform": "watchOS", + "state": "disconnected", + "isAvailable": false, + "osVersion": "10.6.1" + }, + { + "name": "Cameron’s Apple Watch", + "deviceId": "", + "platform": "watchOS", + "state": "connected", + "isAvailable": true, + "osVersion": "26.3" + } + ] + }, + "nextSteps": [ + "Build for device: xcodebuildmcp device build --scheme YOUR_SCHEME", + "Run tests on device: xcodebuildmcp device test", + "Get app path: xcodebuildmcp device get-app-path" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/device/stop--error-no-app.json b/src/snapshot-tests/__fixtures__/cli/json/device/stop--error-no-app.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/device/stop--error-no-app.json rename to src/snapshot-tests/__fixtures__/cli/json/device/stop--error-no-app.json index f13d4aa1f..00632b8c7 100644 --- a/src/snapshot-tests/__fixtures__/json/device/stop--error-no-app.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/stop--error-no-app.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.stop-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to stop app.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/device/stop--success.json b/src/snapshot-tests/__fixtures__/cli/json/device/stop--success.json similarity index 92% rename from src/snapshot-tests/__fixtures__/json/device/stop--success.json rename to src/snapshot-tests/__fixtures__/cli/json/device/stop--success.json index 2dbc47914..012df1912 100644 --- a/src/snapshot-tests/__fixtures__/json/device/stop--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/stop--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.stop-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/device/test--error-compiler.json b/src/snapshot-tests/__fixtures__/cli/json/device/test--error-compiler.json similarity index 98% rename from src/snapshot-tests/__fixtures__/json/device/test--error-compiler.json rename to src/snapshot-tests/__fixtures__/cli/json/device/test--error-compiler.json index 40d15f446..be5d20863 100644 --- a/src/snapshot-tests/__fixtures__/json/device/test--error-compiler.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/test--error-compiler.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Tests failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/device/test--failure.json b/src/snapshot-tests/__fixtures__/cli/json/device/test--failure.json new file mode 100644 index 000000000..3d943d75c --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/device/test--failure.json @@ -0,0 +1,79 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "request": { + "scheme": "CalculatorApp", + "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", + "derivedDataPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-", + "configuration": "Debug", + "platform": "iOS", + "deviceId": "", + "target": "device", + "onlyTesting": [], + "skipTesting": [] + }, + "summary": { + "status": "FAILED", + "durationMs": 1234, + "counts": { + "passed": 21, + "failed": 2, + "skipped": 0 + }, + "target": "device" + }, + "artifacts": { + "deviceId": "", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_device__pid.log", + "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_device__pid.xcresult" + }, + "tests": { + "discovered": { + "total": 57, + "items": [ + "CalculatorAppFeatureTests/CalculatorBasicTests/testClear", + "CalculatorAppFeatureTests/CalculatorBasicTests/testInitialState", + "CalculatorAppFeatureTests/CalculatorBasicTests/testIntentionalFailure", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testChainCalculations", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testComplexCalculation", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testExpressionDisplay" + ] + } + }, + "diagnostics": { + "warnings": [], + "errors": [], + "testFailures": [ + { + "suite": "CalculatorAppTests", + "test": "testCalculatorServiceFailure", + "message": "XCTAssertEqual failed: (\"0\") is not equal to (\"999\") - This test should fail - display should be 0, not 999", + "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:52" + }, + { + "suite": "IntentionalFailureTests", + "test": "test", + "message": "XCTAssertTrue failed - This test should fail to verify error reporting", + "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:286" + } + ] + }, + "testCases": [ + { + "suite": "CalculatorAppTests", + "test": "testCalculatorServiceFailure", + "status": "failed", + "durationMs": 0 + }, + { + "suite": "IntentionalFailureTests", + "test": "test", + "status": "failed", + "durationMs": 0 + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/json/device/test--success.json b/src/snapshot-tests/__fixtures__/cli/json/device/test--success.json similarity index 98% rename from src/snapshot-tests/__fixtures__/json/device/test--success.json rename to src/snapshot-tests/__fixtures__/cli/json/device/test--success.json index 2c00bdbc6..fa8687bb8 100644 --- a/src/snapshot-tests/__fixtures__/json/device/test--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/test--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/build--error-compiler.json b/src/snapshot-tests/__fixtures__/cli/json/macos/build--error-compiler.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/macos/build--error-compiler.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/build--error-compiler.json index 8c0963566..5d0b0e411 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/build--error-compiler.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/build--error-compiler.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/build--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/macos/build--error-wrong-scheme.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/macos/build--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/build--error-wrong-scheme.json index 9136bf8b1..923b347af 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/build--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/build--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/build--success.json b/src/snapshot-tests/__fixtures__/cli/json/macos/build--success.json similarity index 85% rename from src/snapshot-tests/__fixtures__/json/macos/build--success.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/build--success.json index 3b2153926..32d13aff1 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/build--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/build--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -25,5 +25,8 @@ "warnings": [], "errors": [] } - } + }, + "nextSteps": [ + "Get built macOS app path: xcodebuildmcp macos get-app-path --scheme MCPTest" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/macos/build-and-run--error-compiler.json b/src/snapshot-tests/__fixtures__/cli/json/macos/build-and-run--error-compiler.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/macos/build-and-run--error-compiler.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/build-and-run--error-compiler.json index 9cb2ca2cf..7ab611eab 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/build-and-run--error-compiler.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/build-and-run--error-compiler.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-run-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/build-and-run--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/macos/build-and-run--error-wrong-scheme.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/macos/build-and-run--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/build-and-run--error-wrong-scheme.json index 4941fad3a..6c0e76acd 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/build-and-run--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/build-and-run--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-run-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/build-and-run--success.json b/src/snapshot-tests/__fixtures__/cli/json/macos/build-and-run--success.json similarity index 90% rename from src/snapshot-tests/__fixtures__/json/macos/build-and-run--success.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/build-and-run--success.json index f9766f75f..42c291daf 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/build-and-run--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/build-and-run--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-run-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -31,5 +31,8 @@ "warnings": [], "errors": [] } - } + }, + "nextSteps": [ + "Interact with the launched app in the foreground" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/macos/get-app-path--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/macos/get-app-path--error-wrong-scheme.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/macos/get-app-path--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/get-app-path--error-wrong-scheme.json index c80900bd9..6fffee19b 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/get-app-path--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/get-app-path--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.app-path", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Query failed.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/get-app-path--success.json b/src/snapshot-tests/__fixtures__/cli/json/macos/get-app-path--success.json similarity index 54% rename from src/snapshot-tests/__fixtures__/json/macos/get-app-path--success.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/get-app-path--success.json index 9872ebc07..184f86869 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/get-app-path--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/get-app-path--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.app-path", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -17,5 +17,9 @@ "artifacts": { "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app" } - } + }, + "nextSteps": [ + "Get bundle ID: xcodebuildmcp macos get-macos-bundle-id --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app", + "Launch app: xcodebuildmcp macos launch --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/project-discovery/get-macos-bundle-id--error-missing-app.json b/src/snapshot-tests/__fixtures__/cli/json/macos/get-macos-bundle-id--error-missing-app.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/project-discovery/get-macos-bundle-id--error-missing-app.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/get-macos-bundle-id--error-missing-app.json index 81b500698..590082ed6 100644 --- a/src/snapshot-tests/__fixtures__/json/project-discovery/get-macos-bundle-id--error-missing-app.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/get-macos-bundle-id--error-missing-app.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.bundle-id", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to get macOS bundle ID.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/macos/get-macos-bundle-id--success.json b/src/snapshot-tests/__fixtures__/cli/json/macos/get-macos-bundle-id--success.json new file mode 100644 index 000000000..732510748 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/get-macos-bundle-id--success.json @@ -0,0 +1,16 @@ +{ + "schema": "xcodebuildmcp.output.bundle-id", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "artifacts": { + "appPath": "/BundleTest.app", + "bundleId": "com.test.snapshot-macos" + } + }, + "nextSteps": [ + "Launch the app: xcodebuildmcp macos launch --app-path /BundleTest.app", + "Build again: xcodebuildmcp macos build --scheme SCHEME_NAME" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/macos/launch--error-invalid-app.json b/src/snapshot-tests/__fixtures__/cli/json/macos/launch--error-invalid-app.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/macos/launch--error-invalid-app.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/launch--error-invalid-app.json index a05f17988..842a91408 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/launch--error-invalid-app.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/launch--error-invalid-app.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.launch-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to launch macOS app.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/launch--success.json b/src/snapshot-tests/__fixtures__/cli/json/macos/launch--success.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/macos/launch--success.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/launch--success.json index 8150d1cd1..05656efca 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/launch--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/launch--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.launch-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/stop--error-no-app.json b/src/snapshot-tests/__fixtures__/cli/json/macos/stop--error-no-app.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/macos/stop--error-no-app.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/stop--error-no-app.json index b2f0e1267..83416c890 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/stop--error-no-app.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/stop--error-no-app.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.stop-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to stop macOS app.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/stop--success.json b/src/snapshot-tests/__fixtures__/cli/json/macos/stop--success.json similarity index 92% rename from src/snapshot-tests/__fixtures__/json/macos/stop--success.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/stop--success.json index 263381fb9..7c3ed4c45 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/stop--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/stop--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.stop-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/test--error-compiler.json b/src/snapshot-tests/__fixtures__/cli/json/macos/test--error-compiler.json similarity index 98% rename from src/snapshot-tests/__fixtures__/json/macos/test--error-compiler.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/test--error-compiler.json index 6daee8b40..6fdabe48c 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/test--error-compiler.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/test--error-compiler.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Tests failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/test--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/macos/test--error-wrong-scheme.json similarity index 98% rename from src/snapshot-tests/__fixtures__/json/macos/test--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/test--error-wrong-scheme.json index 17eb6d3c5..a3a436aee 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/test--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/test--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Tests failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/macos/test--failure.json b/src/snapshot-tests/__fixtures__/cli/json/macos/test--failure.json similarity index 87% rename from src/snapshot-tests/__fixtures__/json/macos/test--failure.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/test--failure.json index 4c7f4e982..0f0e5083c 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/test--failure.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/test--failure.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Tests failed", "data": { @@ -57,24 +57,12 @@ ] }, "testCases": [ - { - "suite": "MCPTestsXCTests", - "test": "testAppNameIsCorrect()", - "status": "passed", - "durationMs": 0 - }, { "suite": "MCPTestsXCTests", "test": "testDeliberateFailure()", "status": "failed", "durationMs": 0 }, - { - "suite": "MCPTestTests", - "test": "appNameIsCorrect()", - "status": "passed", - "durationMs": 0 - }, { "suite": "MCPTestTests", "test": "deliberateFailure()", diff --git a/src/snapshot-tests/__fixtures__/json/macos/test--success.json b/src/snapshot-tests/__fixtures__/cli/json/macos/test--success.json similarity index 98% rename from src/snapshot-tests/__fixtures__/json/macos/test--success.json rename to src/snapshot-tests/__fixtures__/cli/json/macos/test--success.json index 262236eb3..b09d39b4d 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/test--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/macos/test--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/project-discovery/discover-projs--error-invalid-root.json b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/discover-projs--error-invalid-root.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/project-discovery/discover-projs--error-invalid-root.json rename to src/snapshot-tests/__fixtures__/cli/json/project-discovery/discover-projs--error-invalid-root.json index 0d99c667c..c84487eec 100644 --- a/src/snapshot-tests/__fixtures__/json/project-discovery/discover-projs--error-invalid-root.json +++ b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/discover-projs--error-invalid-root.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.project-list", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to discover projects.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/project-discovery/discover-projs--success.json b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/discover-projs--success.json similarity index 82% rename from src/snapshot-tests/__fixtures__/json/project-discovery/discover-projs--success.json rename to src/snapshot-tests/__fixtures__/cli/json/project-discovery/discover-projs--success.json index c180017dd..90c082a97 100644 --- a/src/snapshot-tests/__fixtures__/json/project-discovery/discover-projs--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/discover-projs--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.project-list", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -24,5 +24,8 @@ "path": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" } ] - } + }, + "nextSteps": [ + "Build and run once defaults are set: xcodebuildmcp simulator build-and-run" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/project-discovery/get-app-bundle-id--error-missing-app.json b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-app-bundle-id--error-missing-app.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/project-discovery/get-app-bundle-id--error-missing-app.json rename to src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-app-bundle-id--error-missing-app.json index ca58cdc6a..df28e89f6 100644 --- a/src/snapshot-tests/__fixtures__/json/project-discovery/get-app-bundle-id--error-missing-app.json +++ b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-app-bundle-id--error-missing-app.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.bundle-id", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to get bundle ID.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-app-bundle-id--success.json b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-app-bundle-id--success.json new file mode 100644 index 000000000..f4be4fdab --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-app-bundle-id--success.json @@ -0,0 +1,18 @@ +{ + "schema": "xcodebuildmcp.output.bundle-id", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "artifacts": { + "appPath": "/BundleTest.app", + "bundleId": "com.test.snapshot" + } + }, + "nextSteps": [ + "Install on simulator: xcodebuildmcp simulator install --simulator-id SIMULATOR_UUID --app-path /BundleTest.app", + "Launch on simulator: xcodebuildmcp simulator launch-app --simulator-id SIMULATOR_UUID --bundle-id com.test.snapshot", + "Install on device: xcodebuildmcp device install --device-id DEVICE_UDID --app-path /BundleTest.app", + "Launch on device: xcodebuildmcp device launch --device-id DEVICE_UDID --bundle-id com.test.snapshot" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/macos/get-macos-bundle-id--error-missing-app.json b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-macos-bundle-id--error-missing-app.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/macos/get-macos-bundle-id--error-missing-app.json rename to src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-macos-bundle-id--error-missing-app.json index 81b500698..590082ed6 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/get-macos-bundle-id--error-missing-app.json +++ b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-macos-bundle-id--error-missing-app.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.bundle-id", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to get macOS bundle ID.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/project-discovery/get-app-bundle-id--success.json b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-macos-bundle-id--success.json similarity index 50% rename from src/snapshot-tests/__fixtures__/json/project-discovery/get-app-bundle-id--success.json rename to src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-macos-bundle-id--success.json index 125a0b2f9..97115741d 100644 --- a/src/snapshot-tests/__fixtures__/json/project-discovery/get-app-bundle-id--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/get-macos-bundle-id--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.bundle-id", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -8,5 +8,9 @@ "appPath": "/BundleTest.app", "bundleId": "com.test.snapshot" } - } + }, + "nextSteps": [ + "Launch the app: xcodebuildmcp macos launch --app-path /BundleTest.app", + "Build again: xcodebuildmcp macos build --scheme SCHEME_NAME" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/project-discovery/list-schemes--error-invalid-workspace.json b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/list-schemes--error-invalid-workspace.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/project-discovery/list-schemes--error-invalid-workspace.json rename to src/snapshot-tests/__fixtures__/cli/json/project-discovery/list-schemes--error-invalid-workspace.json index 8fd679a52..c61e6b5b6 100644 --- a/src/snapshot-tests/__fixtures__/json/project-discovery/list-schemes--error-invalid-workspace.json +++ b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/list-schemes--error-invalid-workspace.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.scheme-list", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to list schemes.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/project-discovery/list-schemes--success.json b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/list-schemes--success.json new file mode 100644 index 000000000..8361a9ce4 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/list-schemes--success.json @@ -0,0 +1,21 @@ +{ + "schema": "xcodebuildmcp.output.scheme-list", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "artifacts": { + "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" + }, + "schemes": [ + "CalculatorApp", + "CalculatorAppFeature" + ] + }, + "nextSteps": [ + "Build for macOS: xcodebuildmcp macos build --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp", + "Build and run on iOS Simulator (default for run intent): xcodebuildmcp simulator build-and-run --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp --simulator-name 'iPhone 17'", + "Build for iOS Simulator (compile-only): xcodebuildmcp simulator build --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp --simulator-name 'iPhone 17'", + "Show build settings: xcodebuildmcp device show-build-settings --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/project-discovery/show-build-settings--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/show-build-settings--error-wrong-scheme.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/project-discovery/show-build-settings--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/project-discovery/show-build-settings--error-wrong-scheme.json index 7326e40dd..830b4ed4b 100644 --- a/src/snapshot-tests/__fixtures__/json/project-discovery/show-build-settings--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/show-build-settings--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-settings", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to show build settings.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/project-discovery/show-build-settings--success.json b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/show-build-settings--success.json new file mode 100644 index 000000000..83963d529 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/show-build-settings--success.json @@ -0,0 +1,2431 @@ +{ + "schema": "xcodebuildmcp.output.build-settings", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "artifacts": { + "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", + "scheme": "CalculatorApp" + }, + "entries": [ + { + "key": "Build settings for action build and target CalculatorApp:", + "value": "" + }, + { + "key": "ACTION", + "value": "build" + }, + { + "key": "AD_HOC_CODE_SIGNING_ALLOWED", + "value": "NO" + }, + { + "key": "AGGREGATE_TRACKED_DOMAINS", + "value": "YES" + }, + { + "key": "ALLOW_BUILD_REQUEST_OVERRIDES", + "value": "NO" + }, + { + "key": "ALLOW_TARGET_PLATFORM_SPECIALIZATION", + "value": "NO" + }, + { + "key": "ALTERNATE_GROUP", + "value": "staff" + }, + { + "key": "ALTERNATE_MODE", + "value": "u+w,go-w,a+rX" + }, + { + "key": "ALTERNATE_OWNER", + "value": "cameroncooke" + }, + { + "key": "ALTERNATIVE_DISTRIBUTION_WEB", + "value": "NO" + }, + { + "key": "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", + "value": "NO" + }, + { + "key": "ALWAYS_SEARCH_USER_PATHS", + "value": "NO" + }, + { + "key": "ALWAYS_USE_SEPARATE_HEADERMAPS", + "value": "NO" + }, + { + "key": "APPLICATION_EXTENSION_API_ONLY", + "value": "NO" + }, + { + "key": "APPLY_RULES_IN_COPY_FILES", + "value": "NO" + }, + { + "key": "APPLY_RULES_IN_COPY_HEADERS", + "value": "NO" + }, + { + "key": "APP_SHORTCUTS_ENABLE_FLEXIBLE_MATCHING", + "value": "YES" + }, + { + "key": "ARCHS", + "value": "arm64" + }, + { + "key": "ARCHS_BASE", + "value": "arm64" + }, + { + "key": "ARCHS_STANDARD", + "value": "arm64" + }, + { + "key": "ARCHS_STANDARD_32_64_BIT", + "value": "armv7 arm64" + }, + { + "key": "ARCHS_STANDARD_32_BIT", + "value": "armv7" + }, + { + "key": "ARCHS_STANDARD_64_BIT", + "value": "arm64" + }, + { + "key": "ARCHS_STANDARD_INCLUDING_64_BIT", + "value": "arm64" + }, + { + "key": "ARCHS_UNIVERSAL_IPHONE_OS", + "value": "armv7 arm64" + }, + { + "key": "ASSETCATALOG_COMPILER_APPICON_NAME", + "value": "AppIcon" + }, + { + "key": "ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS", + "value": "YES" + }, + { + "key": "ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME", + "value": "AccentColor" + }, + { + "key": "ASSETCATALOG_FILTER_FOR_DEVICE_MODEL", + "value": "MacFamily20,1" + }, + { + "key": "ASSETCATALOG_FILTER_FOR_DEVICE_OS_VERSION", + "value": "26.3" + }, + { + "key": "ASSETCATALOG_FILTER_FOR_THINNING_DEVICE_CONFIGURATION", + "value": "MacFamily20,1" + }, + { + "key": "AUTOMATICALLY_MERGE_DEPENDENCIES", + "value": "NO" + }, + { + "key": "AUTOMATION_APPLE_EVENTS", + "value": "NO" + }, + { + "key": "AVAILABLE_PLATFORMS", + "value": "android appletvos appletvsimulator driverkit freebsd iphoneos iphonesimulator linux macosx none openbsd qnx watchos watchsimulator webassembly xros xrsimulator" + }, + { + "key": "BUILD_ACTIVE_RESOURCES_ONLY", + "value": "YES" + }, + { + "key": "BUILD_COMPONENTS", + "value": "headers build" + }, + { + "key": "BUILD_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products" + }, + { + "key": "BUILD_LIBRARY_FOR_DISTRIBUTION", + "value": "NO" + }, + { + "key": "BUILD_ONLY_KNOWN_LOCALIZATIONS", + "value": "NO" + }, + { + "key": "BUILD_ROOT", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products" + }, + { + "key": "BUILD_STYLE", + "value": "" + }, + { + "key": "BUILD_VARIANTS", + "value": "normal" + }, + { + "key": "BUILT_PRODUCTS_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos" + }, + { + "key": "BUNDLE_CONTENTS_FOLDER_PATH_deep", + "value": "Contents/" + }, + { + "key": "BUNDLE_EXECUTABLE_FOLDER_NAME_deep", + "value": "MacOS" + }, + { + "key": "BUNDLE_EXTENSIONS_FOLDER_PATH", + "value": "Extensions" + }, + { + "key": "BUNDLE_FORMAT", + "value": "shallow" + }, + { + "key": "BUNDLE_FRAMEWORKS_FOLDER_PATH", + "value": "Frameworks" + }, + { + "key": "BUNDLE_PLUGINS_FOLDER_PATH", + "value": "PlugIns" + }, + { + "key": "BUNDLE_PRIVATE_HEADERS_FOLDER_PATH", + "value": "PrivateHeaders" + }, + { + "key": "BUNDLE_PUBLIC_HEADERS_FOLDER_PATH", + "value": "Headers" + }, + { + "key": "CACHE_ROOT", + "value": "/var/folders/_t/2njffz894t57qpp76v1sw__h0000gn/C/com.apple.DeveloperTools/26.4-17E192/Xcode" + }, + { + "key": "CCHROOT", + "value": "/var/folders/_t/2njffz894t57qpp76v1sw__h0000gn/C/com.apple.DeveloperTools/26.4-17E192/Xcode" + }, + { + "key": "CHMOD", + "value": "/bin/chmod" + }, + { + "key": "CHOWN", + "value": "chown" + }, + { + "key": "CLANG_ANALYZER_NONNULL", + "value": "YES" + }, + { + "key": "CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION", + "value": "YES_AGGRESSIVE" + }, + { + "key": "CLANG_CACHE_FINE_GRAINED_OUTPUTS", + "value": "YES" + }, + { + "key": "CLANG_COVERAGE_MAPPING", + "value": "YES" + }, + { + "key": "CLANG_CXX_LANGUAGE_STANDARD", + "value": "gnu++20" + }, + { + "key": "CLANG_ENABLE_EXPLICIT_MODULES", + "value": "YES" + }, + { + "key": "CLANG_ENABLE_MODULES", + "value": "YES" + }, + { + "key": "CLANG_ENABLE_OBJC_ARC", + "value": "YES" + }, + { + "key": "CLANG_ENABLE_OBJC_WEAK", + "value": "YES" + }, + { + "key": "CLANG_MODULES_BUILD_SESSION_FILE", + "value": "/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation" + }, + { + "key": "CLANG_PROFILE_DATA_DIRECTORY", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/ProfileData" + }, + { + "key": "CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING", + "value": "YES" + }, + { + "key": "CLANG_WARN_BOOL_CONVERSION", + "value": "YES" + }, + { + "key": "CLANG_WARN_COMMA", + "value": "YES" + }, + { + "key": "CLANG_WARN_CONSTANT_CONVERSION", + "value": "YES" + }, + { + "key": "CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS", + "value": "YES" + }, + { + "key": "CLANG_WARN_DIRECT_OBJC_ISA_USAGE", + "value": "YES_ERROR" + }, + { + "key": "CLANG_WARN_DOCUMENTATION_COMMENTS", + "value": "YES" + }, + { + "key": "CLANG_WARN_EMPTY_BODY", + "value": "YES" + }, + { + "key": "CLANG_WARN_ENUM_CONVERSION", + "value": "YES" + }, + { + "key": "CLANG_WARN_INFINITE_RECURSION", + "value": "YES" + }, + { + "key": "CLANG_WARN_INT_CONVERSION", + "value": "YES" + }, + { + "key": "CLANG_WARN_NON_LITERAL_NULL_CONVERSION", + "value": "YES" + }, + { + "key": "CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF", + "value": "YES" + }, + { + "key": "CLANG_WARN_OBJC_LITERAL_CONVERSION", + "value": "YES" + }, + { + "key": "CLANG_WARN_OBJC_ROOT_CLASS", + "value": "YES_ERROR" + }, + { + "key": "CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER", + "value": "YES" + }, + { + "key": "CLANG_WARN_RANGE_LOOP_ANALYSIS", + "value": "YES" + }, + { + "key": "CLANG_WARN_STRICT_PROTOTYPES", + "value": "YES" + }, + { + "key": "CLANG_WARN_SUSPICIOUS_MOVE", + "value": "YES" + }, + { + "key": "CLANG_WARN_UNGUARDED_AVAILABILITY", + "value": "YES_AGGRESSIVE" + }, + { + "key": "CLANG_WARN_UNREACHABLE_CODE", + "value": "YES" + }, + { + "key": "CLANG_WARN__DUPLICATE_METHOD_MATCH", + "value": "YES" + }, + { + "key": "CLASS_FILE_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/JavaClasses" + }, + { + "key": "CLEAN_PRECOMPS", + "value": "YES" + }, + { + "key": "CLONE_HEADERS", + "value": "NO" + }, + { + "key": "CODESIGNING_FOLDER_PATH", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app" + }, + { + "key": "CODE_SIGNING_ALLOWED", + "value": "YES" + }, + { + "key": "CODE_SIGNING_REQUIRED", + "value": "YES" + }, + { + "key": "CODE_SIGN_CONTEXT_CLASS", + "value": "XCiPhoneOSCodeSignContext" + }, + { + "key": "CODE_SIGN_IDENTITY", + "value": "Apple Development" + }, + { + "key": "CODE_SIGN_INJECT_BASE_ENTITLEMENTS", + "value": "YES" + }, + { + "key": "CODE_SIGN_STYLE", + "value": "Automatic" + }, + { + "key": "COLOR_DIAGNOSTICS", + "value": "NO" + }, + { + "key": "COMBINE_HIDPI_IMAGES", + "value": "NO" + }, + { + "key": "COMPILATION_CACHE_CAS_PATH", + "value": "/Library/Developer/Xcode/DerivedData/CompilationCache.noindex" + }, + { + "key": "COMPILATION_CACHE_KEEP_CAS_DIRECTORY", + "value": "YES" + }, + { + "key": "COMPILER_INDEX_STORE_ENABLE", + "value": "Default" + }, + { + "key": "COMPOSITE_SDK_DIRS", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CompositeSDKs" + }, + { + "key": "COMPRESS_PNG_FILES", + "value": "YES" + }, + { + "key": "CONFIGURATION", + "value": "Debug" + }, + { + "key": "CONFIGURATION_BUILD_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos" + }, + { + "key": "CONFIGURATION_TEMP_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos" + }, + { + "key": "CONTENTS_FOLDER_PATH", + "value": "CalculatorApp.app" + }, + { + "key": "CONTENTS_FOLDER_PATH_SHALLOW_BUNDLE_NO", + "value": "CalculatorApp.app/Contents" + }, + { + "key": "CONTENTS_FOLDER_PATH_SHALLOW_BUNDLE_YES", + "value": "CalculatorApp.app" + }, + { + "key": "COPYING_PRESERVES_HFS_DATA", + "value": "NO" + }, + { + "key": "COPY_HEADERS_RUN_UNIFDEF", + "value": "NO" + }, + { + "key": "COPY_PHASE_STRIP", + "value": "NO" + }, + { + "key": "CORRESPONDING_SIMULATOR_PLATFORM_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform" + }, + { + "key": "CORRESPONDING_SIMULATOR_PLATFORM_NAME", + "value": "iphonesimulator" + }, + { + "key": "CORRESPONDING_SIMULATOR_SDK_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.4.sdk" + }, + { + "key": "CORRESPONDING_SIMULATOR_SDK_NAME", + "value": "iphonesimulator26.4" + }, + { + "key": "CP", + "value": "/bin/cp" + }, + { + "key": "CREATE_INFOPLIST_SECTION_IN_BINARY", + "value": "NO" + }, + { + "key": "CURRENT_ARCH", + "value": "undefined_arch" + }, + { + "key": "CURRENT_PROJECT_VERSION", + "value": "1" + }, + { + "key": "CURRENT_VARIANT", + "value": "normal" + }, + { + "key": "DEAD_CODE_STRIPPING", + "value": "YES" + }, + { + "key": "DEBUGGING_SYMBOLS", + "value": "YES" + }, + { + "key": "DEBUG_INFORMATION_FORMAT", + "value": "dwarf" + }, + { + "key": "DEBUG_INFORMATION_VERSION", + "value": "compiler-default" + }, + { + "key": "DEFAULT_COMPILER", + "value": "com.apple.compilers.llvm.clang.1_0" + }, + { + "key": "DEFAULT_DEXT_INSTALL_PATH", + "value": "/System/Library/DriverExtensions" + }, + { + "key": "DEFAULT_KEXT_INSTALL_PATH", + "value": "/System/Library/Extensions" + }, + { + "key": "DEFINES_MODULE", + "value": "NO" + }, + { + "key": "DEPLOYMENT_LOCATION", + "value": "NO" + }, + { + "key": "DEPLOYMENT_POSTPROCESSING", + "value": "NO" + }, + { + "key": "DEPLOYMENT_TARGET_SETTING_NAME", + "value": "IPHONEOS_DEPLOYMENT_TARGET" + }, + { + "key": "DEPLOYMENT_TARGET_SUGGESTED_VALUES", + "value": "12.0 12.1 12.2 12.3 12.4 13.0 13.1 13.2 13.3 13.4 13.5 13.6 14.0 14.1 14.2 14.3 14.4 14.5 14.6 14.7 15.0 15.1 15.2 15.3 15.4 15.5 15.6 16.0 16.1 16.2 16.3 16.4 16.5 16.6 17.0 17.1 17.2 17.3 17.4 17.5 17.6 18.0 18.1 18.2 18.3 18.4 18.5 18.6 26.0 26.2 26.3 26.4" + }, + { + "key": "DERIVED_FILES_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/DerivedSources" + }, + { + "key": "DERIVED_FILE_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/DerivedSources" + }, + { + "key": "DERIVED_SOURCES_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/DerivedSources" + }, + { + "key": "DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER", + "value": "NO" + }, + { + "key": "DEVELOPER_APPLICATIONS_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications" + }, + { + "key": "DEVELOPER_BIN_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr/bin" + }, + { + "key": "DEVELOPER_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer" + }, + { + "key": "DEVELOPER_FRAMEWORKS_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library/Frameworks" + }, + { + "key": "DEVELOPER_FRAMEWORKS_DIR_QUOTED", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library/Frameworks" + }, + { + "key": "DEVELOPER_LIBRARY_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library" + }, + { + "key": "DEVELOPER_SDK_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" + }, + { + "key": "DEVELOPER_TOOLS_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Tools" + }, + { + "key": "DEVELOPER_USR_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr" + }, + { + "key": "DEVELOPMENT_LANGUAGE", + "value": "en" + }, + { + "key": "DEVELOPMENT_TEAM", + "value": "BR6WD3M6ZD" + }, + { + "key": "DIAGNOSE_MISSING_TARGET_DEPENDENCIES", + "value": "YES" + }, + { + "key": "DIFF", + "value": "/usr/bin/diff" + }, + { + "key": "DOCUMENTATION_FOLDER_PATH", + "value": "CalculatorApp.app/en.lproj/Documentation" + }, + { + "key": "DONT_GENERATE_INFOPLIST_FILE", + "value": "NO" + }, + { + "key": "DRIVERKIT_DEPLOYMENT_TARGET", + "value": "25.4" + }, + { + "key": "DSTROOT", + "value": "/tmp/CalculatorApp.dst" + }, + { + "key": "DT_TOOLCHAIN_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" + }, + { + "key": "DUMP_DEPENDENCIES", + "value": "NO" + }, + { + "key": "DUMP_DEPENDENCIES_OUTPUT_PATH", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/CalculatorApp-BuildDependencyInfo.json" + }, + { + "key": "DWARF_DSYM_FILE_NAME", + "value": "CalculatorApp.app.dSYM" + }, + { + "key": "DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT", + "value": "NO" + }, + { + "key": "DWARF_DSYM_FOLDER_PATH", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos" + }, + { + "key": "DYNAMIC_LIBRARY_EXTENSION", + "value": "dylib" + }, + { + "key": "EAGER_COMPILATION_ALLOW_SCRIPTS", + "value": "YES" + }, + { + "key": "EAGER_LINKING", + "value": "NO" + }, + { + "key": "EFFECTIVE_PLATFORM_NAME", + "value": "-iphoneos" + }, + { + "key": "EFFECTIVE_SWIFT_VERSION", + "value": "5" + }, + { + "key": "EMBEDDED_CONTENT_CONTAINS_SWIFT", + "value": "NO" + }, + { + "key": "EMBEDDED_PROFILE_NAME", + "value": "embedded.mobileprovision" + }, + { + "key": "EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE", + "value": "NO" + }, + { + "key": "ENABLE_APP_SANDBOX", + "value": "NO" + }, + { + "key": "ENABLE_CODE_COVERAGE", + "value": "YES" + }, + { + "key": "ENABLE_COHORT_ARCHS", + "value": "NO" + }, + { + "key": "ENABLE_CPLUSPLUS_BOUNDS_SAFE_BUFFERS", + "value": "NO" + }, + { + "key": "ENABLE_C_BOUNDS_SAFETY", + "value": "NO" + }, + { + "key": "ENABLE_DEBUG_DYLIB", + "value": "YES" + }, + { + "key": "ENABLE_DEFAULT_HEADER_SEARCH_PATHS", + "value": "YES" + }, + { + "key": "ENABLE_DEFAULT_SEARCH_PATHS", + "value": "YES" + }, + { + "key": "ENABLE_ENHANCED_SECURITY", + "value": "NO" + }, + { + "key": "ENABLE_HARDENED_RUNTIME", + "value": "NO" + }, + { + "key": "ENABLE_HEADER_DEPENDENCIES", + "value": "YES" + }, + { + "key": "ENABLE_INCOMING_NETWORK_CONNECTIONS", + "value": "NO" + }, + { + "key": "ENABLE_ON_DEMAND_RESOURCES", + "value": "YES" + }, + { + "key": "ENABLE_OUTGOING_NETWORK_CONNECTIONS", + "value": "NO" + }, + { + "key": "ENABLE_POINTER_AUTHENTICATION", + "value": "NO" + }, + { + "key": "ENABLE_PREVIEWS", + "value": "YES" + }, + { + "key": "ENABLE_RESOURCE_ACCESS_AUDIO_INPUT", + "value": "NO" + }, + { + "key": "ENABLE_RESOURCE_ACCESS_BLUETOOTH", + "value": "NO" + }, + { + "key": "ENABLE_RESOURCE_ACCESS_CALENDARS", + "value": "NO" + }, + { + "key": "ENABLE_RESOURCE_ACCESS_CAMERA", + "value": "NO" + }, + { + "key": "ENABLE_RESOURCE_ACCESS_CONTACTS", + "value": "NO" + }, + { + "key": "ENABLE_RESOURCE_ACCESS_LOCATION", + "value": "NO" + }, + { + "key": "ENABLE_RESOURCE_ACCESS_PHOTO_LIBRARY", + "value": "NO" + }, + { + "key": "ENABLE_RESOURCE_ACCESS_PRINTING", + "value": "NO" + }, + { + "key": "ENABLE_RESOURCE_ACCESS_USB", + "value": "NO" + }, + { + "key": "ENABLE_SDK_IMPORTS", + "value": "NO" + }, + { + "key": "ENABLE_SECURITY_COMPILER_WARNINGS", + "value": "NO" + }, + { + "key": "ENABLE_STRICT_OBJC_MSGSEND", + "value": "YES" + }, + { + "key": "ENABLE_TESTABILITY", + "value": "YES" + }, + { + "key": "ENABLE_TESTING_SEARCH_PATHS", + "value": "NO" + }, + { + "key": "ENABLE_THREAD_SANITIZER", + "value": "NO" + }, + { + "key": "ENABLE_USER_SCRIPT_SANDBOXING", + "value": "YES" + }, + { + "key": "ENFORCE_VALID_ARCHS", + "value": "YES" + }, + { + "key": "ENTITLEMENTS_ALLOWED", + "value": "YES" + }, + { + "key": "ENTITLEMENTS_DESTINATION", + "value": "Signature" + }, + { + "key": "ENTITLEMENTS_REQUIRED", + "value": "NO" + }, + { + "key": "EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS", + "value": ".DS_Store .svn .git .hg CVS" + }, + { + "key": "EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES", + "value": "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj" + }, + { + "key": "EXECUTABLES_FOLDER_PATH", + "value": "CalculatorApp.app/Executables" + }, + { + "key": "EXECUTABLE_FOLDER_PATH", + "value": "CalculatorApp.app" + }, + { + "key": "EXECUTABLE_FOLDER_PATH_SHALLOW_BUNDLE_NO", + "value": "CalculatorApp.app/MacOS" + }, + { + "key": "EXECUTABLE_FOLDER_PATH_SHALLOW_BUNDLE_YES", + "value": "CalculatorApp.app" + }, + { + "key": "EXECUTABLE_NAME", + "value": "CalculatorApp" + }, + { + "key": "EXECUTABLE_PATH", + "value": "CalculatorApp.app/CalculatorApp" + }, + { + "key": "EXTENSIONS_FOLDER_PATH", + "value": "CalculatorApp.app/Extensions" + }, + { + "key": "FILE_LIST", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects/LinkFileList" + }, + { + "key": "FIXED_FILES_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/FixedFiles" + }, + { + "key": "FRAMEWORKS_FOLDER_PATH", + "value": "CalculatorApp.app/Frameworks" + }, + { + "key": "FRAMEWORK_FLAG_PREFIX", + "value": "-framework" + }, + { + "key": "FRAMEWORK_SEARCH_PATHS", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos" + }, + { + "key": "FRAMEWORK_VERSION", + "value": "A" + }, + { + "key": "FULL_PRODUCT_NAME", + "value": "CalculatorApp.app" + }, + { + "key": "FUSE_BUILD_PHASES", + "value": "YES" + }, + { + "key": "FUSE_BUILD_SCRIPT_PHASES", + "value": "NO" + }, + { + "key": "GCC3_VERSION", + "value": "3.3" + }, + { + "key": "GCC_C_LANGUAGE_STANDARD", + "value": "gnu17" + }, + { + "key": "GCC_DYNAMIC_NO_PIC", + "value": "NO" + }, + { + "key": "GCC_INLINES_ARE_PRIVATE_EXTERN", + "value": "YES" + }, + { + "key": "GCC_NO_COMMON_BLOCKS", + "value": "YES" + }, + { + "key": "GCC_OPTIMIZATION_LEVEL", + "value": "0" + }, + { + "key": "GCC_PFE_FILE_C_DIALECTS", + "value": "c objective-c c++ objective-c++" + }, + { + "key": "GCC_PREPROCESSOR_DEFINITIONS", + "value": "DEBUG=1" + }, + { + "key": "GCC_SYMBOLS_PRIVATE_EXTERN", + "value": "NO" + }, + { + "key": "GCC_THUMB_SUPPORT", + "value": "YES" + }, + { + "key": "GCC_TREAT_WARNINGS_AS_ERRORS", + "value": "NO" + }, + { + "key": "GCC_VERSION", + "value": "com.apple.compilers.llvm.clang.1_0" + }, + { + "key": "GCC_VERSION_IDENTIFIER", + "value": "com_apple_compilers_llvm_clang_1_0" + }, + { + "key": "GCC_WARN_64_TO_32_BIT_CONVERSION", + "value": "YES" + }, + { + "key": "GCC_WARN_ABOUT_RETURN_TYPE", + "value": "YES_ERROR" + }, + { + "key": "GCC_WARN_UNDECLARED_SELECTOR", + "value": "YES" + }, + { + "key": "GCC_WARN_UNINITIALIZED_AUTOS", + "value": "YES_AGGRESSIVE" + }, + { + "key": "GCC_WARN_UNUSED_FUNCTION", + "value": "YES" + }, + { + "key": "GCC_WARN_UNUSED_VARIABLE", + "value": "YES" + }, + { + "key": "GENERATED_MODULEMAP_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos" + }, + { + "key": "GENERATE_INFOPLIST_FILE", + "value": "YES" + }, + { + "key": "GENERATE_INTERMEDIATE_TEXT_BASED_STUBS", + "value": "YES" + }, + { + "key": "GENERATE_PKGINFO_FILE", + "value": "YES" + }, + { + "key": "GENERATE_PRELINK_OBJECT_FILE", + "value": "NO" + }, + { + "key": "GENERATE_PROFILING_CODE", + "value": "NO" + }, + { + "key": "GENERATE_TEXT_BASED_STUBS", + "value": "NO" + }, + { + "key": "GID", + "value": "20" + }, + { + "key": "GROUP", + "value": "staff" + }, + { + "key": "HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT", + "value": "YES" + }, + { + "key": "HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES", + "value": "YES" + }, + { + "key": "HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_TARGETS_NOT_BEING_BUILT", + "value": "YES" + }, + { + "key": "HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS", + "value": "YES" + }, + { + "key": "HEADERMAP_INCLUDES_PROJECT_HEADERS", + "value": "YES" + }, + { + "key": "HEADERMAP_USES_FRAMEWORK_PREFIX_ENTRIES", + "value": "YES" + }, + { + "key": "HEADERMAP_USES_VFS", + "value": "NO" + }, + { + "key": "HEADER_SEARCH_PATHS", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/include" + }, + { + "key": "HOME", + "value": "" + }, + { + "key": "HOST_ARCH", + "value": "arm64" + }, + { + "key": "HOST_PLATFORM", + "value": "macosx" + }, + { + "key": "ICONV", + "value": "/usr/bin/iconv" + }, + { + "key": "IMPLICIT_DEPENDENCY_DOMAIN", + "value": "default" + }, + { + "key": "INDEX_STORE_COMPRESS", + "value": "NO" + }, + { + "key": "INDEX_STORE_ONLY_PROJECT_FILES", + "value": "NO" + }, + { + "key": "INFOPLIST_ENABLE_CFBUNDLEICONS_MERGE", + "value": "YES" + }, + { + "key": "INFOPLIST_EXPAND_BUILD_SETTINGS", + "value": "YES" + }, + { + "key": "INFOPLIST_KEY_CFBundleDisplayName", + "value": "Calculator" + }, + { + "key": "INFOPLIST_KEY_UIApplicationSceneManifest_Generation", + "value": "YES" + }, + { + "key": "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents", + "value": "YES" + }, + { + "key": "INFOPLIST_KEY_UILaunchScreen_Generation", + "value": "YES" + }, + { + "key": "INFOPLIST_KEY_UISupportedInterfaceOrientations", + "value": "UIInterfaceOrientationLandscapeRight UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationPortrait" + }, + { + "key": "INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad", + "value": "UIInterfaceOrientationLandscapeRight UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown" + }, + { + "key": "INFOPLIST_OUTPUT_FORMAT", + "value": "binary" + }, + { + "key": "INFOPLIST_PATH", + "value": "CalculatorApp.app/Info.plist" + }, + { + "key": "INFOPLIST_PREPROCESS", + "value": "NO" + }, + { + "key": "INFOSTRINGS_PATH", + "value": "CalculatorApp.app/en.lproj/InfoPlist.strings" + }, + { + "key": "INLINE_PRIVATE_FRAMEWORKS", + "value": "NO" + }, + { + "key": "INSTALLAPI_IGNORE_SKIP_INSTALL", + "value": "YES" + }, + { + "key": "INSTALLHDRS_COPY_PHASE", + "value": "NO" + }, + { + "key": "INSTALLHDRS_SCRIPT_PHASE", + "value": "NO" + }, + { + "key": "INSTALL_DIR", + "value": "/tmp/CalculatorApp.dst/Applications" + }, + { + "key": "INSTALL_GROUP", + "value": "staff" + }, + { + "key": "INSTALL_MODE_FLAG", + "value": "u+w,go-w,a+rX" + }, + { + "key": "INSTALL_OWNER", + "value": "cameroncooke" + }, + { + "key": "INSTALL_PATH", + "value": "/Applications" + }, + { + "key": "INSTALL_ROOT", + "value": "/tmp/CalculatorApp.dst" + }, + { + "key": "IPHONEOS_DEPLOYMENT_TARGET", + "value": "17.0" + }, + { + "key": "IS_UNOPTIMIZED_BUILD", + "value": "YES" + }, + { + "key": "JAVAC_DEFAULT_FLAGS", + "value": "-J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8" + }, + { + "key": "JAVA_APP_STUB", + "value": "/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub" + }, + { + "key": "JAVA_ARCHIVE_CLASSES", + "value": "YES" + }, + { + "key": "JAVA_ARCHIVE_TYPE", + "value": "JAR" + }, + { + "key": "JAVA_COMPILER", + "value": "/usr/bin/javac" + }, + { + "key": "JAVA_FOLDER_PATH", + "value": "CalculatorApp.app/Java" + }, + { + "key": "JAVA_FRAMEWORK_RESOURCES_DIRS", + "value": "Resources" + }, + { + "key": "JAVA_JAR_FLAGS", + "value": "cv" + }, + { + "key": "JAVA_SOURCE_SUBDIR", + "value": "." + }, + { + "key": "JAVA_USE_DEPENDENCIES", + "value": "YES" + }, + { + "key": "JAVA_ZIP_FLAGS", + "value": "-urg" + }, + { + "key": "JIKES_DEFAULT_FLAGS", + "value": "+E +OLDCSO" + }, + { + "key": "KASAN_CFLAGS_CLASSIC", + "value": "-DKASAN=1 -DKASAN_CLASSIC=1 -fsanitize=address -mllvm -asan-globals-live-support -mllvm -asan-force-dynamic-shadow" + }, + { + "key": "KASAN_CFLAGS_TBI", + "value": "-DKASAN=1 -DKASAN_TBI=1 -fsanitize=kernel-hwaddress -mllvm -hwasan-recover=0 -mllvm -hwasan-instrument-atomics=0 -mllvm -hwasan-instrument-stack=1 -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-instrument-with-calls=1 -mllvm -hwasan-use-short-granules=0 -mllvm -hwasan-memory-access-callback-prefix=__asan_" + }, + { + "key": "KASAN_DEFAULT_CFLAGS", + "value": "-DKASAN=1 -DKASAN_CLASSIC=1 -fsanitize=address -mllvm -asan-globals-live-support -mllvm -asan-force-dynamic-shadow" + }, + { + "key": "KEEP_PRIVATE_EXTERNS", + "value": "NO" + }, + { + "key": "LD_DEPENDENCY_INFO_FILE", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/undefined_arch/CalculatorApp_dependency_info.dat" + }, + { + "key": "LD_EXPORT_GLOBAL_SYMBOLS", + "value": "YES" + }, + { + "key": "LD_EXPORT_SYMBOLS", + "value": "YES" + }, + { + "key": "LD_GENERATE_MAP_FILE", + "value": "NO" + }, + { + "key": "LD_MAP_FILE_PATH", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/CalculatorApp-LinkMap-normal-undefined_arch.txt" + }, + { + "key": "LD_NO_PIE", + "value": "NO" + }, + { + "key": "LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER", + "value": "YES" + }, + { + "key": "LD_RUNPATH_SEARCH_PATHS", + "value": "@executable_path/Frameworks" + }, + { + "key": "LD_RUNPATH_SEARCH_PATHS_YES", + "value": "@loader_path/../Frameworks" + }, + { + "key": "LD_SHARED_CACHE_ELIGIBLE", + "value": "Automatic" + }, + { + "key": "LD_WARN_DUPLICATE_LIBRARIES", + "value": "NO" + }, + { + "key": "LD_WARN_UNUSED_DYLIBS", + "value": "NO" + }, + { + "key": "LEGACY_DEVELOPER_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer" + }, + { + "key": "LEX", + "value": "lex" + }, + { + "key": "LIBRARY_DEXT_INSTALL_PATH", + "value": "/Library/DriverExtensions" + }, + { + "key": "LIBRARY_FLAG_NOSPACE", + "value": "YES" + }, + { + "key": "LIBRARY_FLAG_PREFIX", + "value": "-l" + }, + { + "key": "LIBRARY_KEXT_INSTALL_PATH", + "value": "/Library/Extensions" + }, + { + "key": "LIBRARY_SEARCH_PATHS", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos" + }, + { + "key": "LINKER_DISPLAYS_MANGLED_NAMES", + "value": "NO" + }, + { + "key": "LINK_FILE_LIST_normal_arm64", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/arm64/CalculatorApp.LinkFileList" + }, + { + "key": "LINK_OBJC_RUNTIME", + "value": "YES" + }, + { + "key": "LINK_WITH_STANDARD_LIBRARIES", + "value": "YES" + }, + { + "key": "LLVM_TARGET_TRIPLE_OS_VERSION", + "value": "ios17.0" + }, + { + "key": "LLVM_TARGET_TRIPLE_VENDOR", + "value": "apple" + }, + { + "key": "LM_AUX_CONST_METADATA_LIST_PATH_normal_arm64", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/arm64/CalculatorApp.SwiftConstValuesFileList" + }, + { + "key": "LOCALIZATION_EXPORT_SUPPORTED", + "value": "YES" + }, + { + "key": "LOCALIZATION_PREFERS_STRING_CATALOGS", + "value": "YES" + }, + { + "key": "LOCALIZED_RESOURCES_FOLDER_PATH", + "value": "CalculatorApp.app/en.lproj" + }, + { + "key": "LOCALIZED_STRING_CODE_COMMENTS", + "value": "NO" + }, + { + "key": "LOCALIZED_STRING_MACRO_NAMES", + "value": "NSLocalizedString CFCopyLocalizedString" + }, + { + "key": "LOCALIZED_STRING_SWIFTUI_SUPPORT", + "value": "YES" + }, + { + "key": "LOCAL_ADMIN_APPS_DIR", + "value": "/Applications/Utilities" + }, + { + "key": "LOCAL_APPS_DIR", + "value": "/Applications" + }, + { + "key": "LOCAL_DEVELOPER_DIR", + "value": "/Library/Developer" + }, + { + "key": "LOCAL_LIBRARY_DIR", + "value": "/Library" + }, + { + "key": "LOCROOT", + "value": "/example_projects/iOS_Calculator" + }, + { + "key": "LOCSYMROOT", + "value": "/example_projects/iOS_Calculator" + }, + { + "key": "MACH_O_TYPE", + "value": "mh_execute" + }, + { + "key": "MACOSX_DEPLOYMENT_TARGET", + "value": "26.4" + }, + { + "key": "MAC_OS_X_PRODUCT_BUILD_VERSION", + "value": "25D2128" + }, + { + "key": "MAC_OS_X_VERSION_ACTUAL", + "value": "260301" + }, + { + "key": "MAC_OS_X_VERSION_MAJOR", + "value": "260000" + }, + { + "key": "MAC_OS_X_VERSION_MINOR", + "value": "260300" + }, + { + "key": "MAKE_MERGEABLE", + "value": "NO" + }, + { + "key": "MARKETING_VERSION", + "value": "1.0" + }, + { + "key": "MERGEABLE_LIBRARY", + "value": "NO" + }, + { + "key": "MERGED_BINARY_TYPE", + "value": "none" + }, + { + "key": "MERGE_LINKED_LIBRARIES", + "value": "NO" + }, + { + "key": "METAL_LIBRARY_FILE_BASE", + "value": "default" + }, + { + "key": "METAL_LIBRARY_OUTPUT_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app" + }, + { + "key": "MODULES_FOLDER_PATH", + "value": "CalculatorApp.app/Modules" + }, + { + "key": "MODULE_CACHE_DIR", + "value": "/Library/Developer/Xcode/DerivedData/ModuleCache.noindex" + }, + { + "key": "MTL_ENABLE_DEBUG_INFO", + "value": "INCLUDE_SOURCE" + }, + { + "key": "MTL_FAST_MATH", + "value": "YES" + }, + { + "key": "NATIVE_ARCH", + "value": "arm64" + }, + { + "key": "NATIVE_ARCH_32_BIT", + "value": "arm" + }, + { + "key": "NATIVE_ARCH_64_BIT", + "value": "arm64" + }, + { + "key": "NATIVE_ARCH_ACTUAL", + "value": "arm64" + }, + { + "key": "NO_COMMON", + "value": "YES" + }, + { + "key": "OBJECT_FILE_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects" + }, + { + "key": "OBJECT_FILE_DIR_normal", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal" + }, + { + "key": "OBJROOT", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex" + }, + { + "key": "ONLY_ACTIVE_ARCH", + "value": "YES" + }, + { + "key": "OS", + "value": "MACOS" + }, + { + "key": "OSAC", + "value": "/usr/bin/osacompile" + }, + { + "key": "PACKAGE_TYPE", + "value": "com.apple.package-type.wrapper.application" + }, + { + "key": "PASCAL_STRINGS", + "value": "YES" + }, + { + "key": "PATH", + "value": "" + }, + { + "key": "PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES", + "value": "/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode-26.4.0.app/Contents/Developer/Headers /Applications/Xcode-26.4.0.app/Contents/Developer/SDKs /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms" + }, + { + "key": "PBDEVELOPMENTPLIST_PATH", + "value": "CalculatorApp.app/pbdevelopment.plist" + }, + { + "key": "PER_ARCH_MODULE_FILE_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/undefined_arch" + }, + { + "key": "PER_ARCH_OBJECT_FILE_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/undefined_arch" + }, + { + "key": "PER_VARIANT_OBJECT_FILE_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal" + }, + { + "key": "PKGINFO_FILE_PATH", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/PkgInfo" + }, + { + "key": "PKGINFO_PATH", + "value": "CalculatorApp.app/PkgInfo" + }, + { + "key": "PLATFORM_DEVELOPER_APPLICATIONS_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications" + }, + { + "key": "PLATFORM_DEVELOPER_BIN_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin" + }, + { + "key": "PLATFORM_DEVELOPER_LIBRARY_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library" + }, + { + "key": "PLATFORM_DEVELOPER_SDK_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs" + }, + { + "key": "PLATFORM_DEVELOPER_TOOLS_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Tools" + }, + { + "key": "PLATFORM_DEVELOPER_USR_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr" + }, + { + "key": "PLATFORM_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform" + }, + { + "key": "PLATFORM_DISPLAY_NAME", + "value": "iOS" + }, + { + "key": "PLATFORM_FAMILY_NAME", + "value": "iOS" + }, + { + "key": "PLATFORM_NAME", + "value": "iphoneos" + }, + { + "key": "PLATFORM_PREFERRED_ARCH", + "value": "arm64" + }, + { + "key": "PLATFORM_PRODUCT_BUILD_VERSION", + "value": "23E237" + }, + { + "key": "PLATFORM_REQUIRES_SWIFT_AUTOLINK_EXTRACT", + "value": "NO" + }, + { + "key": "PLATFORM_REQUIRES_SWIFT_MODULEWRAP", + "value": "NO" + }, + { + "key": "PLATFORM_USES_DSYMS", + "value": "YES" + }, + { + "key": "PLIST_FILE_OUTPUT_FORMAT", + "value": "binary" + }, + { + "key": "PLUGINS_FOLDER_PATH", + "value": "CalculatorApp.app/PlugIns" + }, + { + "key": "PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR", + "value": "YES" + }, + { + "key": "PRECOMP_DESTINATION_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/PrefixHeaders" + }, + { + "key": "PRIVATE_HEADERS_FOLDER_PATH", + "value": "CalculatorApp.app/PrivateHeaders" + }, + { + "key": "PROCESSED_INFOPLIST_PATH", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/undefined_arch/Processed-Info.plist" + }, + { + "key": "PRODUCT_BUNDLE_IDENTIFIER", + "value": "io.sentry.calculatorapp" + }, + { + "key": "PRODUCT_BUNDLE_PACKAGE_TYPE", + "value": "APPL" + }, + { + "key": "PRODUCT_DISPLAY_NAME", + "value": "Calculator" + }, + { + "key": "PRODUCT_MODULE_NAME", + "value": "CalculatorApp" + }, + { + "key": "PRODUCT_NAME", + "value": "CalculatorApp" + }, + { + "key": "PRODUCT_SETTINGS_PATH", + "value": "" + }, + { + "key": "PRODUCT_TYPE", + "value": "com.apple.product-type.application" + }, + { + "key": "PROFILING_CODE", + "value": "NO" + }, + { + "key": "PROJECT", + "value": "CalculatorApp" + }, + { + "key": "PROJECT_DERIVED_FILE_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/DerivedSources" + }, + { + "key": "PROJECT_DIR", + "value": "/example_projects/iOS_Calculator" + }, + { + "key": "PROJECT_FILE_PATH", + "value": "/example_projects/iOS_Calculator/CalculatorApp.xcodeproj" + }, + { + "key": "PROJECT_GUID", + "value": "5f13bb9ad2ee840212986da3cd4b87b0" + }, + { + "key": "PROJECT_NAME", + "value": "CalculatorApp" + }, + { + "key": "PROJECT_TEMP_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build" + }, + { + "key": "PROJECT_TEMP_ROOT", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex" + }, + { + "key": "PROVISIONING_PROFILE_REQUIRED", + "value": "YES" + }, + { + "key": "PROVISIONING_PROFILE_REQUIRED_YES_YES", + "value": "YES" + }, + { + "key": "PROVISIONING_PROFILE_SUPPORTED", + "value": "YES" + }, + { + "key": "PUBLIC_HEADERS_FOLDER_PATH", + "value": "CalculatorApp.app/Headers" + }, + { + "key": "RECOMMENDED_IPHONEOS_DEPLOYMENT_TARGET", + "value": "15.0" + }, + { + "key": "RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS", + "value": "YES" + }, + { + "key": "REMOVE_CVS_FROM_RESOURCES", + "value": "YES" + }, + { + "key": "REMOVE_GIT_FROM_RESOURCES", + "value": "YES" + }, + { + "key": "REMOVE_HEADERS_FROM_EMBEDDED_BUNDLES", + "value": "YES" + }, + { + "key": "REMOVE_HG_FROM_RESOURCES", + "value": "YES" + }, + { + "key": "REMOVE_STATIC_EXECUTABLES_FROM_EMBEDDED_BUNDLES", + "value": "YES" + }, + { + "key": "REMOVE_SVN_FROM_RESOURCES", + "value": "YES" + }, + { + "key": "RESCHEDULE_INDEPENDENT_HEADERS_PHASES", + "value": "YES" + }, + { + "key": "REZ_COLLECTOR_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/ResourceManagerResources" + }, + { + "key": "REZ_OBJECTS_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/ResourceManagerResources/Objects" + }, + { + "key": "REZ_SEARCH_PATHS", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos" + }, + { + "key": "RPATH_ORIGIN", + "value": "@loader_path" + }, + { + "key": "RUNTIME_EXCEPTION_ALLOW_DYLD_ENVIRONMENT_VARIABLES", + "value": "NO" + }, + { + "key": "RUNTIME_EXCEPTION_ALLOW_JIT", + "value": "NO" + }, + { + "key": "RUNTIME_EXCEPTION_ALLOW_UNSIGNED_EXECUTABLE_MEMORY", + "value": "NO" + }, + { + "key": "RUNTIME_EXCEPTION_DEBUGGING_TOOL", + "value": "NO" + }, + { + "key": "RUNTIME_EXCEPTION_DISABLE_EXECUTABLE_PAGE_PROTECTION", + "value": "NO" + }, + { + "key": "RUNTIME_EXCEPTION_DISABLE_LIBRARY_VALIDATION", + "value": "NO" + }, + { + "key": "SCANNING_PCM_KEEP_CACHE_DIRECTORY", + "value": "YES" + }, + { + "key": "SCAN_ALL_SOURCE_FILES_FOR_INCLUDES", + "value": "NO" + }, + { + "key": "SCRIPTS_FOLDER_PATH", + "value": "CalculatorApp.app/Scripts" + }, + { + "key": "SDKROOT", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + }, + { + "key": "SDK_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + }, + { + "key": "SDK_DIR_iphoneos", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + }, + { + "key": "SDK_DIR_iphoneos26_4", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + }, + { + "key": "SDK_NAME", + "value": "iphoneos26.4" + }, + { + "key": "SDK_NAMES", + "value": "iphoneos26.4" + }, + { + "key": "SDK_PRODUCT_BUILD_VERSION", + "value": "23E237" + }, + { + "key": "SDK_STAT_CACHE_DIR", + "value": "/Library/Developer/Xcode/DerivedData" + }, + { + "key": "SDK_STAT_CACHE_ENABLE", + "value": "YES" + }, + { + "key": "SDK_STAT_CACHE_PATH", + "value": "/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos26.4-23E237-c1e9a37d8fcda5dee89abd67dc927a23.sdkstatcache" + }, + { + "key": "SDK_VERSION", + "value": "26.4" + }, + { + "key": "SDK_VERSION_ACTUAL", + "value": "260400" + }, + { + "key": "SDK_VERSION_MAJOR", + "value": "260000" + }, + { + "key": "SDK_VERSION_MINOR", + "value": "260400" + }, + { + "key": "SED", + "value": "/usr/bin/sed" + }, + { + "key": "SEPARATE_STRIP", + "value": "NO" + }, + { + "key": "SEPARATE_SYMBOL_EDIT", + "value": "NO" + }, + { + "key": "SET_DIR_MODE_OWNER_GROUP", + "value": "YES" + }, + { + "key": "SET_FILE_MODE_OWNER_GROUP", + "value": "NO" + }, + { + "key": "SHALLOW_BUNDLE", + "value": "YES" + }, + { + "key": "SHALLOW_BUNDLE_TRIPLE", + "value": "ios" + }, + { + "key": "SHALLOW_BUNDLE_ios_macabi", + "value": "NO" + }, + { + "key": "SHALLOW_BUNDLE_macos", + "value": "NO" + }, + { + "key": "SHARED_DERIVED_FILE_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/DerivedSources" + }, + { + "key": "SHARED_FRAMEWORKS_FOLDER_PATH", + "value": "CalculatorApp.app/SharedFrameworks" + }, + { + "key": "SHARED_PRECOMPS_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/PrecompiledHeaders" + }, + { + "key": "SHARED_SUPPORT_FOLDER_PATH", + "value": "CalculatorApp.app/SharedSupport" + }, + { + "key": "SKIP_INSTALL", + "value": "NO" + }, + { + "key": "SKIP_MERGEABLE_LIBRARY_BUNDLE_HOOK", + "value": "NO" + }, + { + "key": "SOURCE_ROOT", + "value": "/example_projects/iOS_Calculator" + }, + { + "key": "SRCROOT", + "value": "/example_projects/iOS_Calculator" + }, + { + "key": "STRINGSDATA_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/undefined_arch" + }, + { + "key": "STRINGSDATA_ROOT", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build" + }, + { + "key": "STRINGS_FILE_INFOPLIST_RENAME", + "value": "YES" + }, + { + "key": "STRINGS_FILE_OUTPUT_ENCODING", + "value": "binary" + }, + { + "key": "STRING_CATALOG_GENERATE_SYMBOLS", + "value": "NO" + }, + { + "key": "STRIP_BITCODE_FROM_COPIED_FILES", + "value": "YES" + }, + { + "key": "STRIP_INSTALLED_PRODUCT", + "value": "NO" + }, + { + "key": "STRIP_STYLE", + "value": "all" + }, + { + "key": "STRIP_SWIFT_SYMBOLS", + "value": "YES" + }, + { + "key": "SUPPORTED_DEVICE_FAMILIES", + "value": "1,2" + }, + { + "key": "SUPPORTED_PLATFORMS", + "value": "iphoneos iphonesimulator" + }, + { + "key": "SUPPORTS_MACCATALYST", + "value": "NO" + }, + { + "key": "SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD", + "value": "YES" + }, + { + "key": "SUPPORTS_ON_DEMAND_RESOURCES", + "value": "YES" + }, + { + "key": "SUPPORTS_TEXT_BASED_API", + "value": "NO" + }, + { + "key": "SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD", + "value": "YES" + }, + { + "key": "SUPPRESS_WARNINGS", + "value": "NO" + }, + { + "key": "SWIFT_ACTIVE_COMPILATION_CONDITIONS", + "value": "DEBUG" + }, + { + "key": "SWIFT_EMIT_CONST_VALUE_PROTOCOLS", + "value": "AnyResolverProviding AppEntity AppEnum AppExtension AppIntent AppIntentsPackage AppShortcutProviding AppShortcutsProvider AppUnionValue AppUnionValueCasesProviding DynamicOptionsProvider EntityQuery ExtensionPointDefining IntentValueQuery Resolver TransientEntity _AssistantIntentsProvider _GenerativeFunctionExtractable _IntentValueRepresentable" + }, + { + "key": "SWIFT_EMIT_LOC_STRINGS", + "value": "YES" + }, + { + "key": "SWIFT_ENABLE_EXPLICIT_MODULES", + "value": "YES" + }, + { + "key": "SWIFT_OPTIMIZATION_LEVEL", + "value": "-Onone" + }, + { + "key": "SWIFT_PLATFORM_TARGET_PREFIX", + "value": "ios" + }, + { + "key": "SWIFT_RESPONSE_FILE_PATH_normal_arm64", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/arm64/CalculatorApp.SwiftFileList" + }, + { + "key": "SWIFT_VERSION", + "value": "5.0" + }, + { + "key": "SYMROOT", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products" + }, + { + "key": "SYSTEM_ADMIN_APPS_DIR", + "value": "/Applications/Utilities" + }, + { + "key": "SYSTEM_APPS_DIR", + "value": "/Applications" + }, + { + "key": "SYSTEM_CORE_SERVICES_DIR", + "value": "/System/Library/CoreServices" + }, + { + "key": "SYSTEM_DEMOS_DIR", + "value": "/Applications/Extras" + }, + { + "key": "SYSTEM_DEVELOPER_APPS_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications" + }, + { + "key": "SYSTEM_DEVELOPER_BIN_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr/bin" + }, + { + "key": "SYSTEM_DEVELOPER_DEMOS_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Utilities/Built Examples" + }, + { + "key": "SYSTEM_DEVELOPER_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer" + }, + { + "key": "SYSTEM_DEVELOPER_DOC_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library" + }, + { + "key": "SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Graphics Tools" + }, + { + "key": "SYSTEM_DEVELOPER_JAVA_TOOLS_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Java Tools" + }, + { + "key": "SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Performance Tools" + }, + { + "key": "SYSTEM_DEVELOPER_RELEASENOTES_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/releasenotes" + }, + { + "key": "SYSTEM_DEVELOPER_TOOLS", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Tools" + }, + { + "key": "SYSTEM_DEVELOPER_TOOLS_DOC_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools" + }, + { + "key": "SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools" + }, + { + "key": "SYSTEM_DEVELOPER_USR_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr" + }, + { + "key": "SYSTEM_DEVELOPER_UTILITIES_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Utilities" + }, + { + "key": "SYSTEM_DEXT_INSTALL_PATH", + "value": "/System/Library/DriverExtensions" + }, + { + "key": "SYSTEM_DOCUMENTATION_DIR", + "value": "/Library/Documentation" + }, + { + "key": "SYSTEM_EXTENSIONS_FOLDER_PATH", + "value": "CalculatorApp.app/SystemExtensions" + }, + { + "key": "SYSTEM_EXTENSIONS_FOLDER_PATH_SHALLOW_BUNDLE_NO", + "value": "CalculatorApp.app/Library/SystemExtensions" + }, + { + "key": "SYSTEM_EXTENSIONS_FOLDER_PATH_SHALLOW_BUNDLE_YES", + "value": "CalculatorApp.app/SystemExtensions" + }, + { + "key": "SYSTEM_KEXT_INSTALL_PATH", + "value": "/System/Library/Extensions" + }, + { + "key": "SYSTEM_LIBRARY_DIR", + "value": "/System/Library" + }, + { + "key": "TAPI_DEMANGLE", + "value": "YES" + }, + { + "key": "TAPI_ENABLE_PROJECT_HEADERS", + "value": "NO" + }, + { + "key": "TAPI_LANGUAGE", + "value": "objective-c" + }, + { + "key": "TAPI_LANGUAGE_STANDARD", + "value": "compiler-default" + }, + { + "key": "TAPI_USE_SRCROOT", + "value": "YES" + }, + { + "key": "TAPI_VERIFY_MODE", + "value": "Pedantic" + }, + { + "key": "TARGETED_DEVICE_FAMILY", + "value": "1,2" + }, + { + "key": "TARGETNAME", + "value": "CalculatorApp" + }, + { + "key": "TARGET_BUILD_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos" + }, + { + "key": "TARGET_DEVICE_IDENTIFIER", + "value": "" + }, + { + "key": "TARGET_DEVICE_MODEL", + "value": "Mac16,8" + }, + { + "key": "TARGET_DEVICE_OS_VERSION", + "value": "26.3.1" + }, + { + "key": "TARGET_DEVICE_PLATFORM_NAME", + "value": "macosx" + }, + { + "key": "TARGET_NAME", + "value": "CalculatorApp" + }, + { + "key": "TARGET_TEMP_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build" + }, + { + "key": "TEMP_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build" + }, + { + "key": "TEMP_FILES_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build" + }, + { + "key": "TEMP_FILE_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build" + }, + { + "key": "TEMP_ROOT", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex" + }, + { + "key": "TEMP_SANDBOX_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/TemporaryTaskSandboxes" + }, + { + "key": "TEST_FRAMEWORK_SEARCH_PATHS", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk/Developer/Library/Frameworks" + }, + { + "key": "TEST_LIBRARY_SEARCH_PATHS", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib" + }, + { + "key": "TOOLCHAINS", + "value": "com.apple.dt.toolchain.XcodeDefault" + }, + { + "key": "TOOLCHAIN_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" + }, + { + "key": "TREAT_MISSING_BASELINES_AS_TEST_FAILURES", + "value": "NO" + }, + { + "key": "TREAT_MISSING_SCRIPT_PHASE_OUTPUTS_AS_ERRORS", + "value": "NO" + }, + { + "key": "TVOS_DEPLOYMENT_TARGET", + "value": "26.4" + }, + { + "key": "UID", + "value": "501" + }, + { + "key": "UNINSTALLED_PRODUCTS_DIR", + "value": "/Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/UninstalledProducts" + }, + { + "key": "UNLOCALIZED_RESOURCES_FOLDER_PATH", + "value": "CalculatorApp.app" + }, + { + "key": "UNLOCALIZED_RESOURCES_FOLDER_PATH_SHALLOW_BUNDLE_NO", + "value": "CalculatorApp.app/Resources" + }, + { + "key": "UNLOCALIZED_RESOURCES_FOLDER_PATH_SHALLOW_BUNDLE_YES", + "value": "CalculatorApp.app" + }, + { + "key": "UNSTRIPPED_PRODUCT", + "value": "NO" + }, + { + "key": "USER", + "value": "cameroncooke" + }, + { + "key": "USER_APPS_DIR", + "value": "/Applications" + }, + { + "key": "USER_LIBRARY_DIR", + "value": "/Library" + }, + { + "key": "USE_DYNAMIC_NO_PIC", + "value": "YES" + }, + { + "key": "USE_HEADERMAP", + "value": "YES" + }, + { + "key": "USE_HEADER_SYMLINKS", + "value": "NO" + }, + { + "key": "VALIDATE_DEVELOPMENT_ASSET_PATHS", + "value": "YES_ERROR" + }, + { + "key": "VALIDATE_PRODUCT", + "value": "NO" + }, + { + "key": "VALID_ARCHS", + "value": "arm64 arm64e armv7 armv7s" + }, + { + "key": "VERBOSE_PBXCP", + "value": "NO" + }, + { + "key": "VERSIONPLIST_PATH", + "value": "CalculatorApp.app/version.plist" + }, + { + "key": "VERSION_INFO_BUILDER", + "value": "cameroncooke" + }, + { + "key": "VERSION_INFO_FILE", + "value": "CalculatorApp_vers.c" + }, + { + "key": "VERSION_INFO_STRING", + "value": "\"@(#)PROGRAM:CalculatorApp PROJECT:CalculatorApp-1\"" + }, + { + "key": "WATCHOS_DEPLOYMENT_TARGET", + "value": "26.4" + }, + { + "key": "WORKSPACE_DIR", + "value": "/example_projects/iOS_Calculator" + }, + { + "key": "WRAPPER_EXTENSION", + "value": "app" + }, + { + "key": "WRAPPER_NAME", + "value": "CalculatorApp.app" + }, + { + "key": "WRAPPER_SUFFIX", + "value": ".app" + }, + { + "key": "WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES", + "value": "NO" + }, + { + "key": "XCODE_APP_SUPPORT_DIR", + "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library/Xcode" + }, + { + "key": "XCODE_PRODUCT_BUILD_VERSION", + "value": "17E192" + }, + { + "key": "XCODE_VERSION_ACTUAL", + "value": "2640" + }, + { + "key": "XCODE_VERSION_MAJOR", + "value": "2600" + }, + { + "key": "XCODE_VERSION_MINOR", + "value": "2640" + }, + { + "key": "XPCSERVICES_FOLDER_PATH", + "value": "CalculatorApp.app/XPCServices" + }, + { + "key": "XROS_DEPLOYMENT_TARGET", + "value": "26.4" + }, + { + "key": "YACC", + "value": "yacc" + }, + { + "key": "_DISCOVER_COMMAND_LINE_LINKER_INPUTS", + "value": "YES" + }, + { + "key": "_DISCOVER_COMMAND_LINE_LINKER_INPUTS_INCLUDE_WL", + "value": "YES" + }, + { + "key": "_LD_MULTIARCH", + "value": "YES" + }, + { + "key": "_WRAPPER_CONTENTS_DIR_SHALLOW_BUNDLE_NO", + "value": "/Contents" + }, + { + "key": "_WRAPPER_PARENT_PATH_SHALLOW_BUNDLE_NO", + "value": "/.." + }, + { + "key": "_WRAPPER_RESOURCES_DIR_SHALLOW_BUNDLE_NO", + "value": "/Resources" + }, + { + "key": "__DIAGNOSE_DEPRECATED_ARCHS", + "value": "YES" + }, + { + "key": "__IS_NOT_MACOS", + "value": "YES" + }, + { + "key": "__IS_NOT_MACOS_macosx", + "value": "NO" + }, + { + "key": "__IS_NOT_SIMULATOR", + "value": "YES" + }, + { + "key": "__IS_NOT_SIMULATOR_simulator", + "value": "NO" + }, + { + "key": "__ORIGINAL_SDK_DEFINED_LLVM_TARGET_TRIPLE_SYS", + "value": "ios" + }, + { + "key": "arch", + "value": "undefined_arch" + }, + { + "key": "variant", + "value": "normal" + } + ] + }, + "nextSteps": [ + "Build for macOS: xcodebuildmcp macos build --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp", + "Build for iOS Simulator: xcodebuildmcp simulator build --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp --simulator-name 'iPhone 17'", + "List schemes: xcodebuildmcp device list-schemes --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-ios--error-existing.json b/src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-ios--error-existing.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-ios--error-existing.json rename to src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-ios--error-existing.json index fd37913a9..4a3c9d9de 100644 --- a/src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-ios--error-existing.json +++ b/src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-ios--error-existing.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.scaffold-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to scaffold project.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-ios--success.json b/src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-ios--success.json new file mode 100644 index 000000000..ced5e6731 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-ios--success.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.scaffold-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "platform": "iOS" + }, + "artifacts": { + "projectName": "SnapshotTestApp", + "outputPath": "/ios", + "workspacePath": "/ios/SnapshotTestApp.xcworkspace" + } + }, + "nextSteps": [ + "Important: Before working on the project make sure to read the README.md file in the workspace root directory.", + "Build for simulator: xcodebuildmcp simulator build --workspace-path /ios/SnapshotTestApp.xcworkspace --scheme SnapshotTestApp --simulator-name 'iPhone 17'", + "Build and run on simulator: xcodebuildmcp simulator build-and-run --workspace-path /ios/SnapshotTestApp.xcworkspace --scheme SnapshotTestApp --simulator-name 'iPhone 17'" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-macos--error-existing.json b/src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-macos--error-existing.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-macos--error-existing.json rename to src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-macos--error-existing.json index e131a9cee..17f17754f 100644 --- a/src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-macos--error-existing.json +++ b/src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-macos--error-existing.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.scaffold-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to scaffold project.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-macos--success.json b/src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-macos--success.json new file mode 100644 index 000000000..33870b096 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/project-scaffolding/scaffold-macos--success.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.scaffold-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "platform": "macOS" + }, + "artifacts": { + "projectName": "SnapshotTestMacApp", + "outputPath": "/macos", + "workspacePath": "/macos/SnapshotTestMacApp.xcworkspace" + } + }, + "nextSteps": [ + "Important: Before working on the project make sure to read the README.md file in the workspace root directory.", + "Build for macOS: xcodebuildmcp macos build --workspace-path /macos/SnapshotTestMacApp.xcworkspace --scheme SnapshotTestMacApp", + "Build & Run on macOS: xcodebuildmcp macos build-and-run --workspace-path /macos/SnapshotTestMacApp.xcworkspace --scheme SnapshotTestMacApp" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/boot--error-invalid-id.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/boot--error-invalid-id.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/simulator-management/boot--error-invalid-id.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/boot--error-invalid-id.json index 7d5bd52f8..63f3bcfe3 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/boot--error-invalid-id.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/boot--error-invalid-id.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Boot simulator operation failed.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/simulator-management/boot--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/boot--success.json new file mode 100644 index 000000000..e9b971c8f --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/boot--success.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "boot" + }, + "artifacts": { + "simulatorId": "" + } + }, + "nextSteps": [ + "Open the Simulator app (makes it visible): xcodebuildmcp simulator-management open", + "Install an app: xcodebuildmcp simulator install --simulator-id --app-path PATH_TO_YOUR_APP", + "Launch an app: xcodebuildmcp simulator launch-app --simulator-id --bundle-id YOUR_APP_BUNDLE_ID" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/erase--error-invalid-id.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/erase--error-invalid-id.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/simulator-management/erase--error-invalid-id.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/erase--error-invalid-id.json index 544694c52..8f59ba610 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/erase--error-invalid-id.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/erase--error-invalid-id.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to erase simulator.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/erase--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/erase--success.json similarity index 91% rename from src/snapshot-tests/__fixtures__/json/simulator-management/erase--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/erase--success.json index 969951cb7..9606b859e 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/erase--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/erase--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/simulator-management/list--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/list--success.json new file mode 100644 index 000000000..16a7780a2 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/list--success.json @@ -0,0 +1,93 @@ +{ + "schema": "xcodebuildmcp.output.simulator-list", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "simulators": [ + { + "name": "iPhone 17 Pro", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPhone 17 Pro Max", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPhone 17e", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPhone Air", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPhone 17", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad Pro 13-inch (M5)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad Pro 11-inch (M5)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad mini (A17 Pro)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad Air 13-inch (M4)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad Air 11-inch (M4)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad (A16)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + } + ] + }, + "nextSteps": [ + "Boot a simulator: xcodebuildmcp simulator-management boot --simulator-id UUID_FROM_ABOVE", + "Open the simulator UI: xcodebuildmcp simulator-management open", + "Build for simulator: xcodebuildmcp simulator build --scheme YOUR_SCHEME --simulator-id UUID_FROM_ABOVE", + "Get app path: xcodebuildmcp simulator get-app-path --scheme YOUR_SCHEME --platform 'iOS Simulator' --simulator-id UUID_FROM_ABOVE" + ] +} diff --git a/src/snapshot-tests/__fixtures__/cli/json/simulator-management/open--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/open--success.json new file mode 100644 index 000000000..f2d372b5c --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/open--success.json @@ -0,0 +1,17 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "open" + } + }, + "nextSteps": [ + "Boot a simulator for manual workflows: xcodebuildmcp simulator-management boot --simulator-id UUID_FROM_LIST_SIMS" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/reset-location--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/reset-location--error-invalid-simulator.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/simulator-management/reset-location--error-invalid-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/reset-location--error-invalid-simulator.json index a262e53dd..9a64158aa 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/reset-location--error-invalid-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/reset-location--error-invalid-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to reset simulator location.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/reset-location--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/reset-location--success.json similarity index 92% rename from src/snapshot-tests/__fixtures__/json/simulator-management/reset-location--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/reset-location--success.json index 7c99e5bd2..eded272fe 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/reset-location--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/reset-location--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/set-appearance--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-appearance--error-invalid-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/simulator-management/set-appearance--error-invalid-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-appearance--error-invalid-simulator.json index 2dc5c0421..633d3ebc2 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/set-appearance--error-invalid-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-appearance--error-invalid-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to set simulator appearance.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/set-appearance--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-appearance--success.json similarity index 92% rename from src/snapshot-tests/__fixtures__/json/simulator-management/set-appearance--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-appearance--success.json index 4b3817f07..8adae9e09 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/set-appearance--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-appearance--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/set-location--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-location--error-invalid-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/simulator-management/set-location--error-invalid-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-location--error-invalid-simulator.json index 32933ea32..4cfae5223 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/set-location--error-invalid-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-location--error-invalid-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to set simulator location.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/set-location--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-location--success.json similarity index 93% rename from src/snapshot-tests/__fixtures__/json/simulator-management/set-location--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-location--success.json index 78f12d438..935138689 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/set-location--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/set-location--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/statusbar--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/statusbar--error-invalid-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/simulator-management/statusbar--error-invalid-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/statusbar--error-invalid-simulator.json index 1db9b3b4e..3c3bb7f1c 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/statusbar--error-invalid-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/statusbar--error-invalid-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to set status bar.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/statusbar--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/statusbar--success.json similarity index 92% rename from src/snapshot-tests/__fixtures__/json/simulator-management/statusbar--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/statusbar--success.json index 137b409a1..00a1aaae3 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/statusbar--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/statusbar--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.json index 0c5c21762..4e3c85068 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to toggle hardware keyboard.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/toggle-connect-hardware-keyboard--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-connect-hardware-keyboard--success.json similarity index 92% rename from src/snapshot-tests/__fixtures__/json/simulator-management/toggle-connect-hardware-keyboard--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-connect-hardware-keyboard--success.json index 1d77a0881..01c903587 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/toggle-connect-hardware-keyboard--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-connect-hardware-keyboard--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/toggle-software-keyboard--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-software-keyboard--error-invalid-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/simulator-management/toggle-software-keyboard--error-invalid-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-software-keyboard--error-invalid-simulator.json index 28316ab00..c6d2da9aa 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/toggle-software-keyboard--error-invalid-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-software-keyboard--error-invalid-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to toggle software keyboard.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/toggle-software-keyboard--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-software-keyboard--success.json similarity index 92% rename from src/snapshot-tests/__fixtures__/json/simulator-management/toggle-software-keyboard--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-software-keyboard--success.json index ad964dcca..0970db6df 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/toggle-software-keyboard--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator-management/toggle-software-keyboard--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator/build--error-compiler.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/build--error-compiler.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/simulator/build--error-compiler.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/build--error-compiler.json index 70293cf21..d86866109 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/build--error-compiler.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/build--error-compiler.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator/build--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/build--error-wrong-scheme.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/simulator/build--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/build--error-wrong-scheme.json index ce485dba7..cb912b99e 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/build--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/build--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator/build--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/build--success.json similarity index 78% rename from src/snapshot-tests/__fixtures__/json/simulator/build--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/build--success.json index 6e8b82eab..a4d7bbeb2 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/build--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/build--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -24,5 +24,8 @@ "warnings": [], "errors": [] } - } + }, + "nextSteps": [ + "Get built app path in simulator derived data: xcodebuildmcp simulator get-app-path --simulator-name 'iPhone 17' --scheme CalculatorApp --platform 'iOS Simulator'" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/simulator/build-and-run--error-compiler.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/build-and-run--error-compiler.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/simulator/build-and-run--error-compiler.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/build-and-run--error-compiler.json index e65165d46..437ba453d 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/build-and-run--error-compiler.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/build-and-run--error-compiler.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-run-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator/build-and-run--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/build-and-run--error-wrong-scheme.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/simulator/build-and-run--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/build-and-run--error-wrong-scheme.json index 902c92816..4398d22e0 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/build-and-run--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/build-and-run--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-run-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator/build-and-run--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/build-and-run--success.json similarity index 89% rename from src/snapshot-tests/__fixtures__/json/simulator/build-and-run--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/build-and-run--success.json index 3b0476dca..b11f85670 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/build-and-run--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/build-and-run--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-run-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -30,5 +30,8 @@ "warnings": [], "errors": [] } - } + }, + "nextSteps": [ + "Stop app in simulator: xcodebuildmcp simulator stop --simulator-id --bundle-id io.sentry.calculatorapp" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/simulator/get-app-path--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/get-app-path--error-wrong-scheme.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/simulator/get-app-path--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/get-app-path--error-wrong-scheme.json index 0018f95c9..f0c0c75bb 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/get-app-path--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/get-app-path--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.app-path", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to get app path.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/simulator/get-app-path--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/get-app-path--success.json new file mode 100644 index 000000000..653452222 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/get-app-path--success.json @@ -0,0 +1,29 @@ +{ + "schema": "xcodebuildmcp.output.app-path", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "request": { + "scheme": "CalculatorApp", + "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", + "configuration": "Debug", + "platform": "iOS Simulator", + "simulator": "iPhone 17" + }, + "summary": { + "status": "SUCCEEDED", + "target": "simulator", + "durationMs": 1234 + }, + "artifacts": { + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app" + } + }, + "nextSteps": [ + "Get bundle ID: xcodebuildmcp device get-app-bundle-id --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app", + "Boot simulator: xcodebuildmcp simulator-management boot --simulator-id SIMULATOR_UUID", + "Install app: xcodebuildmcp simulator install --simulator-id SIMULATOR_UUID --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app", + "Launch app: xcodebuildmcp simulator launch-app --simulator-id SIMULATOR_UUID --bundle-id BUNDLE_ID" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/simulator/install--error-invalid-app.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/install--error-invalid-app.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/simulator/install--error-invalid-app.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/install--error-invalid-app.json index b262a3f98..f00fa27d3 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/install--error-invalid-app.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/install--error-invalid-app.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.install-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to install app.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/simulator/install--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/install--success.json new file mode 100644 index 000000000..c49b7a564 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/install--success.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.install-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "artifacts": { + "simulatorId": "", + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + }, + "nextSteps": [ + "Open the Simulator app: xcodebuildmcp simulator-management open", + "Launch the app: xcodebuildmcp simulator launch-app --simulator-id --bundle-id io.sentry.calculatorapp" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/simulator/launch-app--error-not-installed.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/launch-app--error-not-installed.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/simulator/launch-app--error-not-installed.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/launch-app--error-not-installed.json index 05633e4df..5ce0565e3 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/launch-app--error-not-installed.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/launch-app--error-not-installed.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.launch-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to launch app.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/simulator/launch-app--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/launch-app--success.json new file mode 100644 index 000000000..99ae9f688 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/launch-app--success.json @@ -0,0 +1,26 @@ +{ + "schema": "xcodebuildmcp.output.launch-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "artifacts": { + "simulatorId": "", + "bundleId": "io.sentry.calculatorapp", + "processId": 99999, + "runtimeLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/io.sentry.calculatorapp__pid.log", + "osLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/io.sentry.calculatorapp_oslog__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + }, + "nextSteps": [ + "Open Simulator app to see it: xcodebuildmcp simulator-management open", + "Stop app in simulator: xcodebuildmcp simulator stop --simulator-id --bundle-id io.sentry.calculatorapp" + ] +} diff --git a/src/snapshot-tests/__fixtures__/cli/json/simulator/list--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/list--success.json new file mode 100644 index 000000000..16a7780a2 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/list--success.json @@ -0,0 +1,93 @@ +{ + "schema": "xcodebuildmcp.output.simulator-list", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "simulators": [ + { + "name": "iPhone 17 Pro", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPhone 17 Pro Max", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPhone 17e", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPhone Air", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPhone 17", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad Pro 13-inch (M5)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad Pro 11-inch (M5)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad mini (A17 Pro)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad Air 13-inch (M4)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad Air 11-inch (M4)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + }, + { + "name": "iPad (A16)", + "simulatorId": "", + "state": "", + "isAvailable": true, + "runtime": "iOS 26.4" + } + ] + }, + "nextSteps": [ + "Boot a simulator: xcodebuildmcp simulator-management boot --simulator-id UUID_FROM_ABOVE", + "Open the simulator UI: xcodebuildmcp simulator-management open", + "Build for simulator: xcodebuildmcp simulator build --scheme YOUR_SCHEME --simulator-id UUID_FROM_ABOVE", + "Get app path: xcodebuildmcp simulator get-app-path --scheme YOUR_SCHEME --platform 'iOS Simulator' --simulator-id UUID_FROM_ABOVE" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/simulator/screenshot--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/screenshot--error-invalid-simulator.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/simulator/screenshot--error-invalid-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/screenshot--error-invalid-simulator.json index 51349f9ca..dfe05470b 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/screenshot--error-invalid-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/screenshot--error-invalid-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.capture-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to capture screenshot.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator/screenshot--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/screenshot--success.json similarity index 93% rename from src/snapshot-tests/__fixtures__/json/simulator/screenshot--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/screenshot--success.json index 4a997444d..9c30073d0 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/screenshot--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/screenshot--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.capture-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator/stop--error-no-app.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/stop--error-no-app.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/simulator/stop--error-no-app.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/stop--error-no-app.json index 40eb51765..c9fb458a5 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/stop--error-no-app.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/stop--error-no-app.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.stop-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to stop app.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator/stop--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/stop--success.json similarity index 93% rename from src/snapshot-tests/__fixtures__/json/simulator/stop--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/stop--success.json index a5cd4addb..f29c060ec 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/stop--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/stop--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.stop-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator/test--error-compiler.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/test--error-compiler.json similarity index 98% rename from src/snapshot-tests/__fixtures__/json/simulator/test--error-compiler.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/test--error-compiler.json index 8bd844e75..98648c37e 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/test--error-compiler.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/test--error-compiler.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Tests failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/simulator/test--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/test--error-wrong-scheme.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/simulator/test--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/test--error-wrong-scheme.json index 5545ce84e..b4ffc4ae7 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/test--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/test--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Tests failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/simulator/test--failure.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/test--failure.json new file mode 100644 index 000000000..982276a22 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/test--failure.json @@ -0,0 +1,88 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "request": { + "scheme": "CalculatorApp", + "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", + "derivedDataPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-", + "configuration": "Debug", + "platform": "iOS Simulator", + "simulatorName": "iPhone 17", + "onlyTesting": [], + "skipTesting": [] + }, + "summary": { + "status": "FAILED", + "durationMs": 1234, + "counts": { + "passed": 54, + "failed": 3, + "skipped": 0 + }, + "target": "simulator" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_sim__pid.log", + "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_sim__pid.xcresult" + }, + "tests": { + "discovered": { + "total": 57, + "items": [ + "CalculatorAppFeatureTests/CalculatorBasicTests/testClear", + "CalculatorAppFeatureTests/CalculatorBasicTests/testInitialState", + "CalculatorAppFeatureTests/CalculatorBasicTests/testIntentionalFailure", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testChainCalculations", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testComplexCalculation", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testExpressionDisplay" + ] + } + }, + "diagnostics": { + "warnings": [], + "errors": [], + "testFailures": [ + { + "suite": "(Unknown Suite)", + "test": "This test should fail to verify error reporting", + "message": "Expectation failed: (calculator.display → \"0\") == \"999\"\n// This test is designed to fail to test error reporting\nThis should fail - display should be 0, not 999", + "location": "CalculatorServiceTests.swift:37" + }, + { + "suite": "CalculatorAppTests", + "test": "testCalculatorServiceFailure", + "message": "XCTAssertEqual failed: (\"0\") is not equal to (\"999\") - This test should fail - display should be 0, not 999", + "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:52" + }, + { + "suite": "IntentionalFailureTests", + "test": "test", + "message": "XCTAssertTrue failed - This test should fail to verify error reporting", + "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:286" + } + ] + }, + "testCases": [ + { + "test": "This test should fail to verify error reporting", + "status": "failed", + "durationMs": 0 + }, + { + "suite": "CalculatorAppTests", + "test": "testCalculatorServiceFailure", + "status": "failed", + "durationMs": 0 + }, + { + "suite": "IntentionalFailureTests", + "test": "test", + "status": "failed", + "durationMs": 0 + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/json/simulator/test--success.json b/src/snapshot-tests/__fixtures__/cli/json/simulator/test--success.json similarity index 98% rename from src/snapshot-tests/__fixtures__/json/simulator/test--success.json rename to src/snapshot-tests/__fixtures__/cli/json/simulator/test--success.json index e6b0d7b01..68d45018e 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/test--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/simulator/test--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/build--error-bad-path.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/build--error-bad-path.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/swift-package/build--error-bad-path.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/build--error-bad-path.json index 63e725313..67daafb8c 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/build--error-bad-path.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/build--error-bad-path.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/build--success.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/build--success.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/swift-package/build--success.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/build--success.json index 9cf857f1c..d993cf664 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/build--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/build--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/clean--error-bad-path.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/clean--error-bad-path.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/swift-package/clean--error-bad-path.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/clean--error-bad-path.json index 9194e4d6f..7f29e308a 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/clean--error-bad-path.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/clean--error-bad-path.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Swift package clean failed.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/clean--success.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/clean--success.json similarity index 93% rename from src/snapshot-tests/__fixtures__/json/swift-package/clean--success.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/clean--success.json index abf6c6590..75b69af0e 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/clean--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/clean--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/list--no-processes.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/list--no-processes.json similarity index 88% rename from src/snapshot-tests/__fixtures__/json/swift-package/list--no-processes.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/list--no-processes.json index 3e568e518..d3129737f 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/list--no-processes.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/list--no-processes.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.process-list", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/list--success.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/list--success.json similarity index 93% rename from src/snapshot-tests/__fixtures__/json/swift-package/list--success.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/list--success.json index a985d7c35..82f194fc5 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/list--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/list--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.process-list", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/run--error-bad-executable.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/run--error-bad-executable.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/swift-package/run--error-bad-executable.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/run--error-bad-executable.json index ef0789c1f..48b7983e7 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/run--error-bad-executable.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/run--error-bad-executable.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-run-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Build failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/run--success.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/run--success.json similarity index 72% rename from src/snapshot-tests/__fixtures__/json/swift-package/run--success.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/run--success.json index bf84bf4b2..38a74537f 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/run--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/run--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-run-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -26,14 +26,14 @@ ], "stderr": [ "Building for debugging...", - "[0/6] Write sources", - "[1/6] Write spm-entitlement.plist", - "[2/6] Write swift-version--6988338F2F200930.txt", - "[4/8] Emitting module spm", - "[5/8] Compiling spm main.swift", - "[5/8] Write Objects.LinkFileList", - "[6/8] Linking spm", - "[7/8] Applying spm", + "[] Applying spm", + "[] Compiling spm main.swift", + "[] Emitting module spm", + "[] Linking spm", + "[] Write Objects.LinkFileList", + "[] Write sources", + "[] Write spm-entitlement.plist", + "[] Write swift-version--6988338F2F200930.txt", "Build of product 'spm' complete! ()" ] }, diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/stop--error-no-process.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/stop--error-no-process.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/swift-package/stop--error-no-process.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/stop--error-no-process.json index 6724f5a66..1107beade 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/stop--error-no-process.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/stop--error-no-process.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.stop-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Swift package stop failed.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/test--error-bad-path.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/test--error-bad-path.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/swift-package/test--error-bad-path.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/test--error-bad-path.json index 9d83b726e..5c87db045 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/test--error-bad-path.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/test--error-bad-path.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Tests failed", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/test--failure.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/test--failure.json similarity index 73% rename from src/snapshot-tests/__fixtures__/json/swift-package/test--failure.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/test--failure.json index 124f91289..e060a3b35 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/test--failure.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/test--failure.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Tests failed", "data": { @@ -42,31 +42,6 @@ ] }, "testCases": [ - { - "test": "Array operations", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Basic math operations", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Basic truth assertions", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Optional handling", - "status": "passed", - "durationMs": 0 - }, - { - "test": "String operations", - "status": "passed", - "durationMs": 0 - }, { "test": "test", "status": "failed", diff --git a/src/snapshot-tests/__fixtures__/json/swift-package/test--success.json b/src/snapshot-tests/__fixtures__/cli/json/swift-package/test--success.json similarity index 97% rename from src/snapshot-tests/__fixtures__/json/swift-package/test--success.json rename to src/snapshot-tests/__fixtures__/cli/json/swift-package/test--success.json index 2bdba97e0..2cb30d890 100644 --- a/src/snapshot-tests/__fixtures__/json/swift-package/test--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/swift-package/test--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/button--error-no-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/button--error-no-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/button--error-no-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/button--error-no-simulator.json index 1318557a0..4eb88bfb3 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/button--error-no-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/button--error-no-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to press button 'home'.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/button--success.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/button--success.json similarity index 92% rename from src/snapshot-tests/__fixtures__/json/ui-automation/button--success.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/button--success.json index 6d617298b..7df9f68e4 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/button--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/button--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/gesture--error-no-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/gesture--error-no-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/gesture--error-no-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/gesture--error-no-simulator.json index 5f778f391..d83e0ab6e 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/gesture--error-no-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/gesture--error-no-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to execute gesture 'scroll-down'.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/gesture--success.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/gesture--success.json similarity index 92% rename from src/snapshot-tests/__fixtures__/json/ui-automation/gesture--success.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/gesture--success.json index a35585b83..39cb6883a 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/gesture--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/gesture--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/key-press--error-no-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-press--error-no-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/key-press--error-no-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-press--error-no-simulator.json index 309758ecf..27466bd7b 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/key-press--error-no-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-press--error-no-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to simulate key press (code: 4).", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/key-press--success.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-press--success.json similarity index 92% rename from src/snapshot-tests/__fixtures__/json/ui-automation/key-press--success.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-press--success.json index a0b984d98..bbfc05f0e 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/key-press--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-press--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/key-sequence--error-no-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-sequence--error-no-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/key-sequence--error-no-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-sequence--error-no-simulator.json index 882217c5b..81e0e2fdc 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/key-sequence--error-no-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-sequence--error-no-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to execute key sequence.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/key-sequence--success.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-sequence--success.json similarity index 93% rename from src/snapshot-tests/__fixtures__/json/ui-automation/key-sequence--success.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-sequence--success.json index 82632eecb..4ef507f23 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/key-sequence--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/key-sequence--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/long-press--error-no-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/long-press--error-no-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/long-press--error-no-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/long-press--error-no-simulator.json index 433768d2c..b75c46872 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/long-press--error-no-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/long-press--error-no-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to simulate long press at (100, 400).", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/long-press--success.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/long-press--success.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/long-press--success.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/long-press--success.json index fa9c812f7..32a7bd325 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/long-press--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/long-press--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/snapshot-ui--error-no-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/snapshot-ui--error-no-simulator.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/ui-automation/snapshot-ui--error-no-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/snapshot-ui--error-no-simulator.json index cabc3e10e..4e803b712 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/snapshot-ui--error-no-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/snapshot-ui--error-no-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.capture-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to get accessibility hierarchy.", "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/ui-automation/snapshot-ui--success.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/snapshot-ui--success.json new file mode 100644 index 000000000..fad33897c --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/snapshot-ui--success.json @@ -0,0 +1,508 @@ +{ + "schema": "xcodebuildmcp.output.capture-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "artifacts": { + "simulatorId": "" + }, + "capture": { + "type": "ui-hierarchy", + "uiHierarchy": [ + { + "AXFrame": "{{0, 0}, {402, 874}}", + "AXUniqueId": null, + "frame": { + "y": 0, + "x": 0, + "width": 402, + "height": 874 + }, + "role_description": "application", + "AXLabel": "Calculator", + "content_required": false, + "type": "Application", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXApplication", + "children": [ + { + "AXFrame": "{{344, 250.5}, {34, 67}}", + "AXUniqueId": null, + "frame": { + "y": 250.5, + "x": 344, + "width": 34, + "height": 67 + }, + "role_description": "text", + "AXLabel": "0", + "content_required": false, + "type": "StaticText", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXStaticText", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{19.5, 357.5}, {82.7, 81}}", + "AXUniqueId": null, + "frame": { + "y": 357.5, + "x": 19.5, + "width": 82.7, + "height": 81 + }, + "role_description": "button", + "AXLabel": "C", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{113.2, 357.5}, {82.3, 81}}", + "AXUniqueId": null, + "frame": { + "y": 357.5, + "x": 113.2, + "width": 82.3, + "height": 81 + }, + "role_description": "button", + "AXLabel": "±", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{206.5, 357.5}, {82.7, 81}}", + "AXUniqueId": null, + "frame": { + "y": 357.5, + "x": 206.5, + "width": 82.7, + "height": 81 + }, + "role_description": "button", + "AXLabel": "%", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{300.2, 357.5}, {82.3, 81}}", + "AXUniqueId": null, + "frame": { + "y": 357.5, + "x": 300.2, + "width": 82.3, + "height": 81 + }, + "role_description": "button", + "AXLabel": "÷", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{19.5, 449.5}, {82.7, 81}}", + "AXUniqueId": null, + "frame": { + "y": 449.5, + "x": 19.5, + "width": 82.7, + "height": 81 + }, + "role_description": "button", + "AXLabel": "7", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{113.2, 449.5}, {82.3, 81}}", + "AXUniqueId": null, + "frame": { + "y": 449.5, + "x": 113.2, + "width": 82.3, + "height": 81 + }, + "role_description": "button", + "AXLabel": "8", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{206.5, 449.5}, {82.7, 81}}", + "AXUniqueId": null, + "frame": { + "y": 449.5, + "x": 206.5, + "width": 82.7, + "height": 81 + }, + "role_description": "button", + "AXLabel": "9", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{300.2, 449.5}, {82.3, 81}}", + "AXUniqueId": null, + "frame": { + "y": 449.5, + "x": 300.2, + "width": 82.3, + "height": 81 + }, + "role_description": "button", + "AXLabel": "×", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{19.5, 541.5}, {82.7, 81}}", + "AXUniqueId": null, + "frame": { + "y": 541.5, + "x": 19.5, + "width": 82.7, + "height": 81 + }, + "role_description": "button", + "AXLabel": "4", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{113.2, 541.5}, {82.3, 81}}", + "AXUniqueId": null, + "frame": { + "y": 541.5, + "x": 113.2, + "width": 82.3, + "height": 81 + }, + "role_description": "button", + "AXLabel": "5", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{206.5, 541.5}, {82.7, 81}}", + "AXUniqueId": null, + "frame": { + "y": 541.5, + "x": 206.5, + "width": 82.7, + "height": 81 + }, + "role_description": "button", + "AXLabel": "6", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{300.2, 541.5}, {82.3, 81}}", + "AXUniqueId": null, + "frame": { + "y": 541.5, + "x": 300.2, + "width": 82.3, + "height": 81 + }, + "role_description": "button", + "AXLabel": "-", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{19.5, 633.5}, {82.7, 81}}", + "AXUniqueId": null, + "frame": { + "y": 633.5, + "x": 19.5, + "width": 82.7, + "height": 81 + }, + "role_description": "button", + "AXLabel": "1", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{113.2, 633.5}, {82.3, 81}}", + "AXUniqueId": null, + "frame": { + "y": 633.5, + "x": 113.2, + "width": 82.3, + "height": 81 + }, + "role_description": "button", + "AXLabel": "2", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{206.5, 633.5}, {82.7, 81}}", + "AXUniqueId": null, + "frame": { + "y": 633.5, + "x": 206.5, + "width": 82.7, + "height": 81 + }, + "role_description": "button", + "AXLabel": "3", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{300.2, 633.5}, {82.3, 81}}", + "AXUniqueId": null, + "frame": { + "y": 633.5, + "x": 300.2, + "width": 82.3, + "height": 81 + }, + "role_description": "button", + "AXLabel": "+", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{113.2, 725.5}, {82.3, 81}}", + "AXUniqueId": null, + "frame": { + "y": 725.5, + "x": 113.2, + "width": 82.3, + "height": 81 + }, + "role_description": "button", + "AXLabel": "0", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{206.5, 725.5}, {82.7, 81}}", + "AXUniqueId": null, + "frame": { + "y": 725.5, + "x": 206.5, + "width": 82.7, + "height": 81 + }, + "role_description": "button", + "AXLabel": ".", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + }, + { + "AXFrame": "{{300.2, 725.5}, {82.3, 81}}", + "AXUniqueId": null, + "frame": { + "y": 725.5, + "x": 300.2, + "width": 82.3, + "height": 81 + }, + "role_description": "button", + "AXLabel": "=", + "content_required": false, + "type": "Button", + "title": null, + "help": null, + "custom_actions": [], + "AXValue": null, + "enabled": true, + "role": "AXButton", + "children": [], + "subrole": null, + "pid": 99999 + } + ], + "subrole": null, + "pid": 99999 + } + ] + } + }, + "nextSteps": [ + "Refresh after layout changes: xcodebuildmcp simulator snapshot-ui --simulator-id ", + "Tap on element: xcodebuildmcp ui-automation tap --simulator-id --x 0 --y 0", + "Take screenshot for verification: xcodebuildmcp simulator screenshot --simulator-id " + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/swipe--error-no-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/swipe--error-no-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/swipe--error-no-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/swipe--error-no-simulator.json index d610d58b3..6968362b0 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/swipe--error-no-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/swipe--error-no-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to simulate swipe.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/swipe--success.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/swipe--success.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/ui-automation/swipe--success.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/swipe--success.json index 65fe3640a..d3a04cc16 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/swipe--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/swipe--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/tap--error-no-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/tap--error-no-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/tap--error-no-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/tap--error-no-simulator.json index 7c22bc9f3..00556fe82 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/tap--error-no-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/tap--error-no-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to simulate tap at (100, 100).", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/tap--success.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/tap--success.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/tap--success.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/tap--success.json index 6792acf87..fa6e9978e 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/tap--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/tap--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/touch--error-no-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/touch--error-no-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/touch--error-no-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/touch--error-no-simulator.json index bf72ea709..4cbcc83fb 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/touch--error-no-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/touch--error-no-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to execute touch event.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/touch--success.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/touch--success.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/touch--success.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/touch--success.json index 30f6a0db4..0e708ad44 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/touch--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/touch--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/type-text--error-no-simulator.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/type-text--error-no-simulator.json similarity index 95% rename from src/snapshot-tests/__fixtures__/json/ui-automation/type-text--error-no-simulator.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/type-text--error-no-simulator.json index bf1e185a1..30d9ab14d 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/type-text--error-no-simulator.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/type-text--error-no-simulator.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Failed to simulate text typing.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/type-text--success.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/type-text--success.json similarity index 91% rename from src/snapshot-tests/__fixtures__/json/ui-automation/type-text--success.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/type-text--success.json index 4e9ddb72d..a2686f68c 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/type-text--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/type-text--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.ui-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/utilities/clean--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/cli/json/utilities/clean--error-wrong-scheme.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/utilities/clean--error-wrong-scheme.json rename to src/snapshot-tests/__fixtures__/cli/json/utilities/clean--error-wrong-scheme.json index 5aefc7e19..1385e9ba4 100644 --- a/src/snapshot-tests/__fixtures__/json/utilities/clean--error-wrong-scheme.json +++ b/src/snapshot-tests/__fixtures__/cli/json/utilities/clean--error-wrong-scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": true, "error": "Clean failed.", "data": { diff --git a/src/snapshot-tests/__fixtures__/json/utilities/clean--success.json b/src/snapshot-tests/__fixtures__/cli/json/utilities/clean--success.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/utilities/clean--success.json rename to src/snapshot-tests/__fixtures__/cli/json/utilities/clean--success.json index b258ecdb4..05ccfeda8 100644 --- a/src/snapshot-tests/__fixtures__/json/utilities/clean--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/utilities/clean--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/xcode-ide/documentation-search--success.json b/src/snapshot-tests/__fixtures__/cli/json/xcode-ide/documentation-search--success.json similarity index 100% rename from src/snapshot-tests/__fixtures__/json/xcode-ide/documentation-search--success.json rename to src/snapshot-tests/__fixtures__/cli/json/xcode-ide/documentation-search--success.json diff --git a/src/snapshot-tests/__fixtures__/json/xcode-ide/list-tools--success.json b/src/snapshot-tests/__fixtures__/cli/json/xcode-ide/list-tools--success.json similarity index 100% rename from src/snapshot-tests/__fixtures__/json/xcode-ide/list-tools--success.json rename to src/snapshot-tests/__fixtures__/cli/json/xcode-ide/list-tools--success.json diff --git a/src/snapshot-tests/__fixtures__/cli/macos/get-macos-bundle-id--success.txt b/src/snapshot-tests/__fixtures__/cli/macos/get-macos-bundle-id--success.txt deleted file mode 100644 index e1c8112e5..000000000 --- a/src/snapshot-tests/__fixtures__/cli/macos/get-macos-bundle-id--success.txt +++ /dev/null @@ -1,11 +0,0 @@ - -🔍 Get macOS Bundle ID - - App: /BundleTest.app - -✅ Bundle ID - └ com.test.snapshot-macos - -Next steps: -1. Launch the app: xcodebuildmcp macos launch --app-path "/BundleTest.app" -2. Build again: xcodebuildmcp macos build --scheme "SCHEME_NAME" diff --git a/src/snapshot-tests/__fixtures__/cli/project-discovery/get-app-bundle-id--success.txt b/src/snapshot-tests/__fixtures__/cli/project-discovery/get-app-bundle-id--success.txt deleted file mode 100644 index f090f0825..000000000 --- a/src/snapshot-tests/__fixtures__/cli/project-discovery/get-app-bundle-id--success.txt +++ /dev/null @@ -1,13 +0,0 @@ - -🔍 Get Bundle ID - - App: /BundleTest.app - -✅ Bundle ID - └ com.test.snapshot - -Next steps: -1. Install on simulator: xcodebuildmcp simulator install --simulator-id "SIMULATOR_UUID" --app-path "/BundleTest.app" -2. Launch on simulator: xcodebuildmcp simulator launch-app --simulator-id "SIMULATOR_UUID" --bundle-id "com.test.snapshot" -3. Install on device: xcodebuildmcp device install --device-id "DEVICE_UDID" --app-path "/BundleTest.app" -4. Launch on device: xcodebuildmcp device launch --device-id "DEVICE_UDID" --bundle-id "com.test.snapshot" diff --git a/src/snapshot-tests/__fixtures__/cli/project-discovery/get-macos-bundle-id--success.txt b/src/snapshot-tests/__fixtures__/cli/project-discovery/get-macos-bundle-id--success.txt deleted file mode 100644 index 7a9e8b59e..000000000 --- a/src/snapshot-tests/__fixtures__/cli/project-discovery/get-macos-bundle-id--success.txt +++ /dev/null @@ -1,11 +0,0 @@ - -🔍 Get macOS Bundle ID - - App: /BundleTest.app - -✅ Bundle ID - └ com.test.snapshot - -Next steps: -1. Launch the app: xcodebuildmcp macos launch --app-path "/BundleTest.app" -2. Build again: xcodebuildmcp macos build --scheme "SCHEME_NAME" diff --git a/src/snapshot-tests/__fixtures__/cli/project-discovery/list-schemes--success.txt b/src/snapshot-tests/__fixtures__/cli/project-discovery/list-schemes--success.txt deleted file mode 100644 index 5321bdc26..000000000 --- a/src/snapshot-tests/__fixtures__/cli/project-discovery/list-schemes--success.txt +++ /dev/null @@ -1,16 +0,0 @@ - -🔍 List Schemes - - Workspace: example_projects/iOS_Calculator/CalculatorApp.xcworkspace - -✅ Found 2 schemes - -Schemes: - CalculatorApp - CalculatorAppFeature - -Next steps: -1. Build for macOS: xcodebuildmcp macos build --workspace-path "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" --scheme "CalculatorApp" -2. Build and run on iOS Simulator (default for run intent): xcodebuildmcp simulator build-and-run --workspace-path "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" --scheme "CalculatorApp" --simulator-name "iPhone 17" -3. Build for iOS Simulator (compile-only): xcodebuildmcp simulator build --workspace-path "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" --scheme "CalculatorApp" --simulator-name "iPhone 17" -4. Show build settings: xcodebuildmcp device show-build-settings --workspace-path "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" --scheme "CalculatorApp" diff --git a/src/snapshot-tests/__fixtures__/cli/coverage/get-coverage-report--error-invalid-bundle.txt b/src/snapshot-tests/__fixtures__/cli/text/coverage/get-coverage-report--error-invalid-bundle.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/coverage/get-coverage-report--error-invalid-bundle.txt rename to src/snapshot-tests/__fixtures__/cli/text/coverage/get-coverage-report--error-invalid-bundle.txt diff --git a/src/snapshot-tests/__fixtures__/cli/coverage/get-coverage-report--success.txt b/src/snapshot-tests/__fixtures__/cli/text/coverage/get-coverage-report--success.txt similarity index 83% rename from src/snapshot-tests/__fixtures__/cli/coverage/get-coverage-report--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/coverage/get-coverage-report--success.txt index fbfc98150..07df5e959 100644 --- a/src/snapshot-tests/__fixtures__/cli/coverage/get-coverage-report--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/coverage/get-coverage-report--success.txt @@ -10,4 +10,4 @@ Targets CalculatorAppTests.xctest: 94.9% (371/391 lines) Next steps: -1. View file-level coverage: xcodebuildmcp coverage get-file-coverage --xcresult-path "/TestResults.xcresult" +1. View file-level coverage: xcodebuildmcp coverage get-file-coverage --xcresult-path /TestResults.xcresult diff --git a/src/snapshot-tests/__fixtures__/cli/coverage/get-file-coverage--error-invalid-bundle.txt b/src/snapshot-tests/__fixtures__/cli/text/coverage/get-file-coverage--error-invalid-bundle.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/coverage/get-file-coverage--error-invalid-bundle.txt rename to src/snapshot-tests/__fixtures__/cli/text/coverage/get-file-coverage--error-invalid-bundle.txt diff --git a/src/snapshot-tests/__fixtures__/cli/coverage/get-file-coverage--success.txt b/src/snapshot-tests/__fixtures__/cli/text/coverage/get-file-coverage--success.txt similarity index 95% rename from src/snapshot-tests/__fixtures__/cli/coverage/get-file-coverage--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/coverage/get-file-coverage--success.txt index 18f185fc1..b6e55da8b 100644 --- a/src/snapshot-tests/__fixtures__/cli/coverage/get-file-coverage--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/coverage/get-file-coverage--success.txt @@ -26,4 +26,4 @@ File: example_projects/iOS_Calculator/CalculatorAppPackage/Sources/CalculatorApp 🟢 Full Coverage (28 functions) -- all at 100% Next steps: -1. View overall coverage: xcodebuildmcp coverage get-coverage-report --xcresult-path "/TestResults.xcresult" +1. View overall coverage: xcodebuildmcp coverage get-coverage-report --xcresult-path /TestResults.xcresult diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/add-breakpoint--error-no-session.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/add-breakpoint--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/add-breakpoint--error-no-session.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/add-breakpoint--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/add-breakpoint--success.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/add-breakpoint--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/add-breakpoint--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/add-breakpoint--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/attach--error-no-process.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/attach--error-no-process.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/attach--error-no-process.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/attach--error-no-process.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/attach--success-continue.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/attach--success-continue.txt similarity index 84% rename from src/snapshot-tests/__fixtures__/cli/debugging/attach--success-continue.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/attach--success-continue.txt index c3d9682fd..6a6026154 100644 --- a/src/snapshot-tests/__fixtures__/cli/debugging/attach--success-continue.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/debugging/attach--success-continue.txt @@ -7,6 +7,6 @@ └ Execution: Execution is running. App is responsive to UI interaction. Next steps: -1. Add a breakpoint: xcodebuildmcp debugging add-breakpoint --debug-session-id "" --file "..." --line "123" -2. Continue execution: xcodebuildmcp debugging continue --debug-session-id "" -3. Show call stack: xcodebuildmcp debugging stack --debug-session-id "" +1. Add a breakpoint: xcodebuildmcp debugging add-breakpoint --debug-session-id --file ... --line 123 +2. Continue execution: xcodebuildmcp debugging continue --debug-session-id +3. Show call stack: xcodebuildmcp debugging stack --debug-session-id diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/attach--success.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/attach--success.txt similarity index 84% rename from src/snapshot-tests/__fixtures__/cli/debugging/attach--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/attach--success.txt index 18563ca0c..1207a87c0 100644 --- a/src/snapshot-tests/__fixtures__/cli/debugging/attach--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/debugging/attach--success.txt @@ -7,6 +7,6 @@ └ Execution: Execution is paused. Use debug_continue to resume before UI automation. Next steps: -1. Add a breakpoint: xcodebuildmcp debugging add-breakpoint --debug-session-id "" --file "..." --line "123" -2. Continue execution: xcodebuildmcp debugging continue --debug-session-id "" -3. Show call stack: xcodebuildmcp debugging stack --debug-session-id "" +1. Add a breakpoint: xcodebuildmcp debugging add-breakpoint --debug-session-id --file ... --line 123 +2. Continue execution: xcodebuildmcp debugging continue --debug-session-id +3. Show call stack: xcodebuildmcp debugging stack --debug-session-id diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/continue--error-no-session.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/continue--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/continue--error-no-session.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/continue--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/continue--success.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/continue--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/continue--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/continue--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/detach--error-no-session.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/detach--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/detach--error-no-session.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/detach--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/detach--success.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/detach--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/detach--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/detach--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/lldb-command--error-no-session.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/lldb-command--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/lldb-command--error-no-session.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/lldb-command--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/lldb-command--success.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/lldb-command--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/lldb-command--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/lldb-command--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/remove-breakpoint--error-no-session.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/remove-breakpoint--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/remove-breakpoint--error-no-session.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/remove-breakpoint--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/remove-breakpoint--success.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/remove-breakpoint--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/remove-breakpoint--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/remove-breakpoint--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/stack--error-no-session.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/stack--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/stack--error-no-session.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/stack--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/stack--success.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/stack--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/stack--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/stack--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/variables--error-no-session.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/variables--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/variables--error-no-session.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/variables--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/cli/debugging/variables--success.txt b/src/snapshot-tests/__fixtures__/cli/text/debugging/variables--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/debugging/variables--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/debugging/variables--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/build--error-compiler.txt b/src/snapshot-tests/__fixtures__/cli/text/device/build--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/build--error-compiler.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/build--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/build--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/device/build--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/build--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/build--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/build--success.txt b/src/snapshot-tests/__fixtures__/cli/text/device/build--success.txt similarity index 95% rename from src/snapshot-tests/__fixtures__/cli/device/build--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/build--success.txt index 4dc9c62e2..17613ffd6 100644 --- a/src/snapshot-tests/__fixtures__/cli/device/build--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/device/build--success.txt @@ -12,4 +12,4 @@ └ Build Logs: ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_device__pid.log Next steps: -1. Get built device app path: xcodebuildmcp device get-app-path --scheme "CalculatorApp" +1. Get built device app path: xcodebuildmcp device get-app-path --scheme CalculatorApp diff --git a/src/snapshot-tests/__fixtures__/cli/device/build-and-run--error-compiler.txt b/src/snapshot-tests/__fixtures__/cli/text/device/build-and-run--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/build-and-run--error-compiler.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/build-and-run--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/build-and-run--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/device/build-and-run--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/build-and-run--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/build-and-run--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/build-and-run--success.txt b/src/snapshot-tests/__fixtures__/cli/text/device/build-and-run--success.txt similarity index 90% rename from src/snapshot-tests/__fixtures__/cli/device/build-and-run--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/build-and-run--success.txt index 71835a264..77ad24e8e 100644 --- a/src/snapshot-tests/__fixtures__/cli/device/build-and-run--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/device/build-and-run--success.txt @@ -23,4 +23,4 @@ └ Build Logs: ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_device__pid.log Next steps: -1. Stop app on device: xcodebuildmcp device stop --device-id "" --process-id "" +1. Stop app on device: xcodebuildmcp device stop --device-id --process-id 31269 diff --git a/src/snapshot-tests/__fixtures__/cli/device/get-app-path--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/device/get-app-path--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/get-app-path--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/get-app-path--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/get-app-path--success.txt b/src/snapshot-tests/__fixtures__/cli/text/device/get-app-path--success.txt similarity index 60% rename from src/snapshot-tests/__fixtures__/cli/device/get-app-path--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/get-app-path--success.txt index c5eb3418a..a6e0241c6 100644 --- a/src/snapshot-tests/__fixtures__/cli/device/get-app-path--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/device/get-app-path--success.txt @@ -11,6 +11,6 @@ └ App Path: ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app Next steps: -1. Get bundle ID: xcodebuildmcp device get-app-bundle-id --app-path "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app" -2. Install app on device: xcodebuildmcp device install --device-id "DEVICE_UDID" --app-path "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app" -3. Launch app on device: xcodebuildmcp device launch --device-id "DEVICE_UDID" --bundle-id "BUNDLE_ID" +1. Get bundle ID: xcodebuildmcp device get-app-bundle-id --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app +2. Install app on device: xcodebuildmcp device install --device-id DEVICE_UDID --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app +3. Launch app on device: xcodebuildmcp device launch --device-id DEVICE_UDID --bundle-id BUNDLE_ID diff --git a/src/snapshot-tests/__fixtures__/cli/device/install--error-invalid-app.txt b/src/snapshot-tests/__fixtures__/cli/text/device/install--error-invalid-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/install--error-invalid-app.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/install--error-invalid-app.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/install--success.txt b/src/snapshot-tests/__fixtures__/cli/text/device/install--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/install--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/install--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/launch--error-invalid-bundle.txt b/src/snapshot-tests/__fixtures__/cli/text/device/launch--error-invalid-bundle.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/launch--error-invalid-bundle.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/launch--error-invalid-bundle.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/launch--success.txt b/src/snapshot-tests/__fixtures__/cli/text/device/launch--success.txt similarity index 64% rename from src/snapshot-tests/__fixtures__/cli/device/launch--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/launch--success.txt index a5f7ff46f..2ecef7345 100644 --- a/src/snapshot-tests/__fixtures__/cli/device/launch--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/device/launch--success.txt @@ -8,4 +8,4 @@ └ Process ID: Next steps: -1. Stop the app: xcodebuildmcp device stop --device-id "" --process-id "" +1. Stop the app: xcodebuildmcp device stop --device-id --process-id 31270 diff --git a/src/snapshot-tests/__fixtures__/cli/device/list--success.txt b/src/snapshot-tests/__fixtures__/cli/text/device/list--success.txt similarity index 89% rename from src/snapshot-tests/__fixtures__/cli/device/list--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/list--success.txt index 4862500d3..dfd2c44b2 100644 --- a/src/snapshot-tests/__fixtures__/cli/device/list--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/device/list--success.txt @@ -4,7 +4,7 @@ iOS Devices: 📱 [] Cameron’s iPhone 16 Pro Max - OS: 26.3.1 (a) + OS: 26.4.2 UDID: 📱 [] iPhone @@ -29,6 +29,6 @@ Hints Before running build/run/test/UI automation tools, set the desired device identifier in session defaults. Next steps: -1. Build for device: xcodebuildmcp device build --scheme "YOUR_SCHEME" +1. Build for device: xcodebuildmcp device build --scheme YOUR_SCHEME 2. Run tests on device: xcodebuildmcp device test 3. Get app path: xcodebuildmcp device get-app-path diff --git a/src/snapshot-tests/__fixtures__/cli/device/stop--error-no-app.txt b/src/snapshot-tests/__fixtures__/cli/text/device/stop--error-no-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/stop--error-no-app.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/stop--error-no-app.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/stop--success.txt b/src/snapshot-tests/__fixtures__/cli/text/device/stop--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/stop--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/stop--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/test--error-compiler.txt b/src/snapshot-tests/__fixtures__/cli/text/device/test--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/test--error-compiler.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/test--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/test--failure.txt b/src/snapshot-tests/__fixtures__/cli/text/device/test--failure.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/test--failure.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/test--failure.txt diff --git a/src/snapshot-tests/__fixtures__/cli/device/test--success.txt b/src/snapshot-tests/__fixtures__/cli/text/device/test--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/device/test--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/device/test--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/build--error-compiler.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/build--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/build--error-compiler.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/build--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/build--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/build--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/build--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/build--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/build--success.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/build--success.txt similarity index 96% rename from src/snapshot-tests/__fixtures__/cli/macos/build--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/build--success.txt index 7bee545a3..3d74d0c2c 100644 --- a/src/snapshot-tests/__fixtures__/cli/macos/build--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/macos/build--success.txt @@ -13,4 +13,4 @@ └ Build Logs: ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_macos__pid.log Next steps: -1. Get built macOS app path: xcodebuildmcp macos get-app-path --scheme "MCPTest" +1. Get built macOS app path: xcodebuildmcp macos get-app-path --scheme MCPTest diff --git a/src/snapshot-tests/__fixtures__/cli/macos/build-and-run--error-compiler.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/build-and-run--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/build-and-run--error-compiler.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/build-and-run--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/build-and-run--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/build-and-run--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/build-and-run--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/build-and-run--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/build-and-run--success.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/build-and-run--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/build-and-run--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/build-and-run--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/get-app-path--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/get-app-path--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/get-app-path--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/get-app-path--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/get-app-path--success.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/get-app-path--success.txt similarity index 54% rename from src/snapshot-tests/__fixtures__/cli/macos/get-app-path--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/get-app-path--success.txt index dd45771fc..8a94fdea4 100644 --- a/src/snapshot-tests/__fixtures__/cli/macos/get-app-path--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/macos/get-app-path--success.txt @@ -11,5 +11,5 @@ └ App Path: ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app Next steps: -1. Get bundle ID: xcodebuildmcp macos get-macos-bundle-id --app-path "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app" -2. Launch app: xcodebuildmcp macos launch --app-path "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app" +1. Get bundle ID: xcodebuildmcp macos get-macos-bundle-id --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app +2. Launch app: xcodebuildmcp macos launch --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app diff --git a/src/snapshot-tests/__fixtures__/cli/macos/get-macos-bundle-id--error-missing-app.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/get-macos-bundle-id--error-missing-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/get-macos-bundle-id--error-missing-app.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/get-macos-bundle-id--error-missing-app.txt diff --git a/src/snapshot-tests/__fixtures__/cli/text/macos/get-macos-bundle-id--success.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/get-macos-bundle-id--success.txt new file mode 100644 index 000000000..89a406377 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/text/macos/get-macos-bundle-id--success.txt @@ -0,0 +1,11 @@ + +🔍 Get macOS Bundle ID + + App: /BundleTest.app + +✅ Bundle ID + └ com.test.snapshot-macos + +Next steps: +1. Launch the app: xcodebuildmcp macos launch --app-path /BundleTest.app +2. Build again: xcodebuildmcp macos build --scheme SCHEME_NAME diff --git a/src/snapshot-tests/__fixtures__/cli/macos/launch--error-invalid-app.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/launch--error-invalid-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/launch--error-invalid-app.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/launch--error-invalid-app.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/launch--success.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/launch--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/launch--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/launch--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/stop--error-no-app.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/stop--error-no-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/stop--error-no-app.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/stop--error-no-app.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/stop--success.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/stop--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/stop--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/stop--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/test--error-compiler.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/test--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/test--error-compiler.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/test--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/test--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/test--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/test--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/test--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/test--failure.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/test--failure.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/test--failure.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/test--failure.txt diff --git a/src/snapshot-tests/__fixtures__/cli/macos/test--success.txt b/src/snapshot-tests/__fixtures__/cli/text/macos/test--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/macos/test--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/macos/test--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/project-discovery/discover-projs--error-invalid-root.txt b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/discover-projs--error-invalid-root.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/project-discovery/discover-projs--error-invalid-root.txt rename to src/snapshot-tests/__fixtures__/cli/text/project-discovery/discover-projs--error-invalid-root.txt diff --git a/src/snapshot-tests/__fixtures__/cli/project-discovery/discover-projs--success.txt b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/discover-projs--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/project-discovery/discover-projs--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/project-discovery/discover-projs--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/project-discovery/get-app-bundle-id--error-missing-app.txt b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-app-bundle-id--error-missing-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/project-discovery/get-app-bundle-id--error-missing-app.txt rename to src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-app-bundle-id--error-missing-app.txt diff --git a/src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-app-bundle-id--success.txt b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-app-bundle-id--success.txt new file mode 100644 index 000000000..99954fff0 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-app-bundle-id--success.txt @@ -0,0 +1,13 @@ + +🔍 Get Bundle ID + + App: /BundleTest.app + +✅ Bundle ID + └ com.test.snapshot + +Next steps: +1. Install on simulator: xcodebuildmcp simulator install --simulator-id SIMULATOR_UUID --app-path /BundleTest.app +2. Launch on simulator: xcodebuildmcp simulator launch-app --simulator-id SIMULATOR_UUID --bundle-id com.test.snapshot +3. Install on device: xcodebuildmcp device install --device-id DEVICE_UDID --app-path /BundleTest.app +4. Launch on device: xcodebuildmcp device launch --device-id DEVICE_UDID --bundle-id com.test.snapshot diff --git a/src/snapshot-tests/__fixtures__/cli/project-discovery/get-macos-bundle-id--error-missing-app.txt b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-macos-bundle-id--error-missing-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/project-discovery/get-macos-bundle-id--error-missing-app.txt rename to src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-macos-bundle-id--error-missing-app.txt diff --git a/src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-macos-bundle-id--success.txt b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-macos-bundle-id--success.txt new file mode 100644 index 000000000..b5d24b240 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/get-macos-bundle-id--success.txt @@ -0,0 +1,11 @@ + +🔍 Get macOS Bundle ID + + App: /BundleTest.app + +✅ Bundle ID + └ com.test.snapshot + +Next steps: +1. Launch the app: xcodebuildmcp macos launch --app-path /BundleTest.app +2. Build again: xcodebuildmcp macos build --scheme SCHEME_NAME diff --git a/src/snapshot-tests/__fixtures__/cli/project-discovery/list-schemes--error-invalid-workspace.txt b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/list-schemes--error-invalid-workspace.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/project-discovery/list-schemes--error-invalid-workspace.txt rename to src/snapshot-tests/__fixtures__/cli/text/project-discovery/list-schemes--error-invalid-workspace.txt diff --git a/src/snapshot-tests/__fixtures__/cli/text/project-discovery/list-schemes--success.txt b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/list-schemes--success.txt new file mode 100644 index 000000000..e2279721e --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/list-schemes--success.txt @@ -0,0 +1,16 @@ + +🔍 List Schemes + + Workspace: example_projects/iOS_Calculator/CalculatorApp.xcworkspace + +✅ Found 2 schemes + +Schemes: + CalculatorApp + CalculatorAppFeature + +Next steps: +1. Build for macOS: xcodebuildmcp macos build --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp +2. Build and run on iOS Simulator (default for run intent): xcodebuildmcp simulator build-and-run --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp --simulator-name 'iPhone 17' +3. Build for iOS Simulator (compile-only): xcodebuildmcp simulator build --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp --simulator-name 'iPhone 17' +4. Show build settings: xcodebuildmcp device show-build-settings --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp diff --git a/src/snapshot-tests/__fixtures__/cli/project-discovery/show-build-settings--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/show-build-settings--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/project-discovery/show-build-settings--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/project-discovery/show-build-settings--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/project-discovery/show-build-settings--success.txt b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/show-build-settings--success.txt similarity index 99% rename from src/snapshot-tests/__fixtures__/cli/project-discovery/show-build-settings--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/project-discovery/show-build-settings--success.txt index 6a58f3fcf..07b542f7f 100644 --- a/src/snapshot-tests/__fixtures__/cli/project-discovery/show-build-settings--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/show-build-settings--success.txt @@ -612,6 +612,6 @@ Settings variant = normal Next steps: -1. Build for macOS: xcodebuildmcp macos build --workspace-path "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" --scheme "CalculatorApp" -2. Build for iOS Simulator: xcodebuildmcp simulator build --workspace-path "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" --scheme "CalculatorApp" --simulator-name "iPhone 17" -3. List schemes: xcodebuildmcp device list-schemes --workspace-path "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" +1. Build for macOS: xcodebuildmcp macos build --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp +2. Build for iOS Simulator: xcodebuildmcp simulator build --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace --scheme CalculatorApp --simulator-name 'iPhone 17' +3. List schemes: xcodebuildmcp device list-schemes --workspace-path example_projects/iOS_Calculator/CalculatorApp.xcworkspace diff --git a/src/snapshot-tests/__fixtures__/cli/project-scaffolding/scaffold-ios--error-existing.txt b/src/snapshot-tests/__fixtures__/cli/text/project-scaffolding/scaffold-ios--error-existing.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/project-scaffolding/scaffold-ios--error-existing.txt rename to src/snapshot-tests/__fixtures__/cli/text/project-scaffolding/scaffold-ios--error-existing.txt diff --git a/src/snapshot-tests/__fixtures__/cli/project-scaffolding/scaffold-ios--success.txt b/src/snapshot-tests/__fixtures__/cli/text/project-scaffolding/scaffold-ios--success.txt similarity index 63% rename from src/snapshot-tests/__fixtures__/cli/project-scaffolding/scaffold-ios--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/project-scaffolding/scaffold-ios--success.txt index 8c3867883..15559dac2 100644 --- a/src/snapshot-tests/__fixtures__/cli/project-scaffolding/scaffold-ios--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/project-scaffolding/scaffold-ios--success.txt @@ -10,5 +10,5 @@ Next steps: 1. Important: Before working on the project make sure to read the README.md file in the workspace root directory. -2. Build for simulator: xcodebuildmcp simulator build --workspace-path "/ios/SnapshotTestApp.xcworkspace" --scheme "SnapshotTestApp" --simulator-name "iPhone 17" -3. Build and run on simulator: xcodebuildmcp simulator build-and-run --workspace-path "/ios/SnapshotTestApp.xcworkspace" --scheme "SnapshotTestApp" --simulator-name "iPhone 17" +2. Build for simulator: xcodebuildmcp simulator build --workspace-path /ios/SnapshotTestApp.xcworkspace --scheme SnapshotTestApp --simulator-name 'iPhone 17' +3. Build and run on simulator: xcodebuildmcp simulator build-and-run --workspace-path /ios/SnapshotTestApp.xcworkspace --scheme SnapshotTestApp --simulator-name 'iPhone 17' diff --git a/src/snapshot-tests/__fixtures__/cli/project-scaffolding/scaffold-macos--error-existing.txt b/src/snapshot-tests/__fixtures__/cli/text/project-scaffolding/scaffold-macos--error-existing.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/project-scaffolding/scaffold-macos--error-existing.txt rename to src/snapshot-tests/__fixtures__/cli/text/project-scaffolding/scaffold-macos--error-existing.txt diff --git a/src/snapshot-tests/__fixtures__/cli/project-scaffolding/scaffold-macos--success.txt b/src/snapshot-tests/__fixtures__/cli/text/project-scaffolding/scaffold-macos--success.txt similarity index 60% rename from src/snapshot-tests/__fixtures__/cli/project-scaffolding/scaffold-macos--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/project-scaffolding/scaffold-macos--success.txt index ae87b7585..16c749e88 100644 --- a/src/snapshot-tests/__fixtures__/cli/project-scaffolding/scaffold-macos--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/project-scaffolding/scaffold-macos--success.txt @@ -10,5 +10,5 @@ Next steps: 1. Important: Before working on the project make sure to read the README.md file in the workspace root directory. -2. Build for macOS: xcodebuildmcp macos build --workspace-path "/macos/SnapshotTestMacApp.xcworkspace" --scheme "SnapshotTestMacApp" -3. Build & Run on macOS: xcodebuildmcp macos build-and-run --workspace-path "/macos/SnapshotTestMacApp.xcworkspace" --scheme "SnapshotTestMacApp" +2. Build for macOS: xcodebuildmcp macos build --workspace-path /macos/SnapshotTestMacApp.xcworkspace --scheme SnapshotTestMacApp +3. Build & Run on macOS: xcodebuildmcp macos build-and-run --workspace-path /macos/SnapshotTestMacApp.xcworkspace --scheme SnapshotTestMacApp diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/boot--error-invalid-id.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/boot--error-invalid-id.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/boot--error-invalid-id.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/boot--error-invalid-id.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/boot--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/boot--success.txt similarity index 77% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/boot--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/boot--success.txt index 8b053d01d..c5c2d84e4 100644 --- a/src/snapshot-tests/__fixtures__/cli/simulator-management/boot--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/boot--success.txt @@ -7,5 +7,5 @@ Next steps: 1. Open the Simulator app (makes it visible): xcodebuildmcp simulator-management open -2. Install an app: xcodebuildmcp simulator install --simulator-id "" --app-path "PATH_TO_YOUR_APP" -3. Launch an app: xcodebuildmcp simulator launch-app --simulator-id "" --bundle-id "YOUR_APP_BUNDLE_ID" +2. Install an app: xcodebuildmcp simulator install --simulator-id --app-path PATH_TO_YOUR_APP +3. Launch an app: xcodebuildmcp simulator launch-app --simulator-id --bundle-id YOUR_APP_BUNDLE_ID diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/erase--error-invalid-id.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/erase--error-invalid-id.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/erase--error-invalid-id.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/erase--error-invalid-id.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/erase--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/erase--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/erase--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/erase--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/list--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/list--success.txt similarity index 82% rename from src/snapshot-tests/__fixtures__/cli/simulator/list--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/list--success.txt index 829679678..256c3b077 100644 --- a/src/snapshot-tests/__fixtures__/cli/simulator/list--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/list--success.txt @@ -46,7 +46,7 @@ Hints Before running boot/build/run tools, set the desired simulator identifier in session defaults. Next steps: -1. Boot a simulator: xcodebuildmcp simulator-management boot --simulator-id "UUID_FROM_ABOVE" +1. Boot a simulator: xcodebuildmcp simulator-management boot --simulator-id UUID_FROM_ABOVE 2. Open the simulator UI: xcodebuildmcp simulator-management open -3. Build for simulator: xcodebuildmcp simulator build --scheme "YOUR_SCHEME" --simulator-id "UUID_FROM_ABOVE" -4. Get app path: xcodebuildmcp simulator get-app-path --scheme "YOUR_SCHEME" --platform "iOS Simulator" --simulator-id "UUID_FROM_ABOVE" +3. Build for simulator: xcodebuildmcp simulator build --scheme YOUR_SCHEME --simulator-id UUID_FROM_ABOVE +4. Get app path: xcodebuildmcp simulator get-app-path --scheme YOUR_SCHEME --platform 'iOS Simulator' --simulator-id UUID_FROM_ABOVE diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/open--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/open--success.txt similarity index 70% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/open--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/open--success.txt index 3402e3738..3a7b4d5e1 100644 --- a/src/snapshot-tests/__fixtures__/cli/simulator-management/open--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/open--success.txt @@ -4,4 +4,4 @@ ✅ Simulator opened successfully Next steps: -1. Boot a simulator for manual workflows: xcodebuildmcp simulator-management boot --simulator-id "UUID_FROM_LIST_SIMS" +1. Boot a simulator for manual workflows: xcodebuildmcp simulator-management boot --simulator-id UUID_FROM_LIST_SIMS diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/reset-location--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/reset-location--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/reset-location--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/reset-location--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/reset-location--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/reset-location--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/reset-location--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/reset-location--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/set-appearance--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/set-appearance--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/set-appearance--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/set-appearance--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/set-appearance--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/set-appearance--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/set-appearance--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/set-appearance--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/set-location--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/set-location--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/set-location--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/set-location--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/set-location--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/set-location--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/set-location--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/set-location--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/statusbar--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/statusbar--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/statusbar--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/statusbar--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/statusbar--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/statusbar--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/statusbar--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/statusbar--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/toggle-connect-hardware-keyboard--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/toggle-connect-hardware-keyboard--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/toggle-connect-hardware-keyboard--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/toggle-connect-hardware-keyboard--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/toggle-software-keyboard--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/toggle-software-keyboard--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/toggle-software-keyboard--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/toggle-software-keyboard--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/toggle-software-keyboard--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator-management/toggle-software-keyboard--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/toggle-software-keyboard--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator-management/toggle-software-keyboard--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/build--error-compiler.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/build--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/build--error-compiler.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/build--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/build--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/build--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/build--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/build--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/build--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/build--success.txt similarity index 84% rename from src/snapshot-tests/__fixtures__/cli/simulator/build--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/build--success.txt index 77b2b0efc..7395ba47e 100644 --- a/src/snapshot-tests/__fixtures__/cli/simulator/build--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/simulator/build--success.txt @@ -13,4 +13,4 @@ └ Build Logs: ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_sim__pid.log Next steps: -1. Get built app path in simulator derived data: xcodebuildmcp simulator get-app-path --simulator-name "iPhone 17" --scheme "CalculatorApp" --platform "iOS Simulator" +1. Get built app path in simulator derived data: xcodebuildmcp simulator get-app-path --simulator-name 'iPhone 17' --scheme CalculatorApp --platform 'iOS Simulator' diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/build-and-run--error-compiler.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/build-and-run--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/build-and-run--error-compiler.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/build-and-run--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/build-and-run--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/build-and-run--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/build-and-run--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/build-and-run--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/build-and-run--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/build-and-run--success.txt similarity index 96% rename from src/snapshot-tests/__fixtures__/cli/simulator/build-and-run--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/build-and-run--success.txt index db9bccbbf..97674114a 100644 --- a/src/snapshot-tests/__fixtures__/cli/simulator/build-and-run--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/simulator/build-and-run--success.txt @@ -27,4 +27,4 @@ └ OSLog: ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/io.sentry.calculatorapp_oslog__pid.log Next steps: -1. Stop app in simulator: xcodebuildmcp simulator stop --simulator-id "" --bundle-id "io.sentry.calculatorapp" +1. Stop app in simulator: xcodebuildmcp simulator stop --simulator-id --bundle-id io.sentry.calculatorapp diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/get-app-path--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/get-app-path--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/get-app-path--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/get-app-path--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/get-app-path--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/get-app-path--success.txt similarity index 57% rename from src/snapshot-tests/__fixtures__/cli/simulator/get-app-path--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/get-app-path--success.txt index 05af71f91..0c1ecca16 100644 --- a/src/snapshot-tests/__fixtures__/cli/simulator/get-app-path--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/simulator/get-app-path--success.txt @@ -12,7 +12,7 @@ └ App Path: ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app Next steps: -1. Get bundle ID: xcodebuildmcp device get-app-bundle-id --app-path "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app" -2. Boot simulator: xcodebuildmcp simulator-management boot --simulator-id "SIMULATOR_UUID" -3. Install app: xcodebuildmcp simulator install --simulator-id "SIMULATOR_UUID" --app-path "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app" -4. Launch app: xcodebuildmcp simulator launch-app --simulator-id "SIMULATOR_UUID" --bundle-id "BUNDLE_ID" +1. Get bundle ID: xcodebuildmcp device get-app-bundle-id --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app +2. Boot simulator: xcodebuildmcp simulator-management boot --simulator-id SIMULATOR_UUID +3. Install app: xcodebuildmcp simulator install --simulator-id SIMULATOR_UUID --app-path ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app +4. Launch app: xcodebuildmcp simulator launch-app --simulator-id SIMULATOR_UUID --bundle-id BUNDLE_ID diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/install--error-invalid-app.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/install--error-invalid-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/install--error-invalid-app.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/install--error-invalid-app.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/install--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/install--success.txt similarity index 88% rename from src/snapshot-tests/__fixtures__/cli/simulator/install--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/install--success.txt index 30600dc2f..ac0c02683 100644 --- a/src/snapshot-tests/__fixtures__/cli/simulator/install--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/simulator/install--success.txt @@ -8,4 +8,4 @@ Next steps: 1. Open the Simulator app: xcodebuildmcp simulator-management open -2. Launch the app: xcodebuildmcp simulator launch-app --simulator-id "" --bundle-id "io.sentry.calculatorapp" +2. Launch the app: xcodebuildmcp simulator launch-app --simulator-id --bundle-id io.sentry.calculatorapp diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/launch-app--error-not-installed.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/launch-app--error-not-installed.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/launch-app--error-not-installed.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/launch-app--error-not-installed.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/launch-app--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/launch-app--success.txt similarity index 91% rename from src/snapshot-tests/__fixtures__/cli/simulator/launch-app--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/launch-app--success.txt index f55796ce7..815f9fba5 100644 --- a/src/snapshot-tests/__fixtures__/cli/simulator/launch-app--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/simulator/launch-app--success.txt @@ -12,4 +12,4 @@ Next steps: 1. Open Simulator app to see it: xcodebuildmcp simulator-management open -2. Stop app in simulator: xcodebuildmcp simulator stop --simulator-id "" --bundle-id "io.sentry.calculatorapp" +2. Stop app in simulator: xcodebuildmcp simulator stop --simulator-id --bundle-id io.sentry.calculatorapp diff --git a/src/snapshot-tests/__fixtures__/cli/simulator-management/list--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/list--success.txt similarity index 82% rename from src/snapshot-tests/__fixtures__/cli/simulator-management/list--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/list--success.txt index 829679678..256c3b077 100644 --- a/src/snapshot-tests/__fixtures__/cli/simulator-management/list--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/simulator/list--success.txt @@ -46,7 +46,7 @@ Hints Before running boot/build/run tools, set the desired simulator identifier in session defaults. Next steps: -1. Boot a simulator: xcodebuildmcp simulator-management boot --simulator-id "UUID_FROM_ABOVE" +1. Boot a simulator: xcodebuildmcp simulator-management boot --simulator-id UUID_FROM_ABOVE 2. Open the simulator UI: xcodebuildmcp simulator-management open -3. Build for simulator: xcodebuildmcp simulator build --scheme "YOUR_SCHEME" --simulator-id "UUID_FROM_ABOVE" -4. Get app path: xcodebuildmcp simulator get-app-path --scheme "YOUR_SCHEME" --platform "iOS Simulator" --simulator-id "UUID_FROM_ABOVE" +3. Build for simulator: xcodebuildmcp simulator build --scheme YOUR_SCHEME --simulator-id UUID_FROM_ABOVE +4. Get app path: xcodebuildmcp simulator get-app-path --scheme YOUR_SCHEME --platform 'iOS Simulator' --simulator-id UUID_FROM_ABOVE diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/screenshot--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/screenshot--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/screenshot--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/screenshot--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/screenshot--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/screenshot--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/screenshot--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/screenshot--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/stop--error-no-app.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/stop--error-no-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/stop--error-no-app.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/stop--error-no-app.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/stop--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/stop--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/stop--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/stop--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/test--error-compiler.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/test--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/test--error-compiler.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/test--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/test--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/test--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/test--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/test--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/test--failure.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/test--failure.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/test--failure.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/test--failure.txt diff --git a/src/snapshot-tests/__fixtures__/cli/simulator/test--success.txt b/src/snapshot-tests/__fixtures__/cli/text/simulator/test--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/simulator/test--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/simulator/test--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/build--error-bad-path.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/build--error-bad-path.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/build--error-bad-path.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/build--error-bad-path.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/build--success.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/build--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/build--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/build--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/clean--error-bad-path.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/clean--error-bad-path.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/clean--error-bad-path.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/clean--error-bad-path.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/clean--success.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/clean--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/clean--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/clean--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/list--no-processes.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/list--no-processes.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/list--no-processes.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/list--no-processes.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/list--success.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/list--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/list--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/list--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/run--error-bad-executable.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/run--error-bad-executable.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/run--error-bad-executable.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/run--error-bad-executable.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/run--success.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/run--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/run--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/run--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/stop--error-no-process.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/stop--error-no-process.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/stop--error-no-process.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/stop--error-no-process.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/test--error-bad-path.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/test--error-bad-path.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/test--error-bad-path.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/test--error-bad-path.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/test--failure.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/test--failure.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/test--failure.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/test--failure.txt diff --git a/src/snapshot-tests/__fixtures__/cli/swift-package/test--success.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/test--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/swift-package/test--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/swift-package/test--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/button--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/button--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/button--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/button--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/button--success.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/button--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/button--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/button--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/gesture--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/gesture--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/gesture--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/gesture--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/gesture--success.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/gesture--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/gesture--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/gesture--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/key-press--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/key-press--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/key-press--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/key-press--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/key-press--success.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/key-press--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/key-press--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/key-press--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/key-sequence--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/key-sequence--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/key-sequence--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/key-sequence--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/key-sequence--success.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/key-sequence--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/key-sequence--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/key-sequence--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/long-press--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/long-press--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/long-press--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/long-press--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/long-press--success.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/long-press--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/long-press--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/long-press--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/snapshot-ui--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/snapshot-ui--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/snapshot-ui--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/snapshot-ui--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/snapshot-ui--success.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/snapshot-ui--success.txt similarity index 99% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/snapshot-ui--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/snapshot-ui--success.txt index 4e62b4e39..412aea1fd 100644 --- a/src/snapshot-tests/__fixtures__/cli/ui-automation/snapshot-ui--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/snapshot-ui--success.txt @@ -583,6 +583,6 @@ Tips ✅ Accessibility hierarchy retrieved successfully. Next steps: -1. Refresh after layout changes: xcodebuildmcp simulator snapshot-ui --simulator-id "" -2. Tap on element: xcodebuildmcp ui-automation tap --simulator-id "" --x "0" --y "0" -3. Take screenshot for verification: xcodebuildmcp simulator screenshot --simulator-id "" +1. Refresh after layout changes: xcodebuildmcp simulator snapshot-ui --simulator-id +2. Tap on element: xcodebuildmcp ui-automation tap --simulator-id --x 0 --y 0 +3. Take screenshot for verification: xcodebuildmcp simulator screenshot --simulator-id diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/swipe--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/swipe--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/swipe--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/swipe--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/swipe--success.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/swipe--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/swipe--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/swipe--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/tap--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/tap--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/tap--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/tap--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/tap--success.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/tap--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/tap--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/tap--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/touch--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/touch--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/touch--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/touch--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/touch--success.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/touch--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/touch--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/touch--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/type-text--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/type-text--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/type-text--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/type-text--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/cli/ui-automation/type-text--success.txt b/src/snapshot-tests/__fixtures__/cli/text/ui-automation/type-text--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/ui-automation/type-text--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/ui-automation/type-text--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/utilities/clean--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/cli/text/utilities/clean--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/utilities/clean--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/cli/text/utilities/clean--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/cli/utilities/clean--success.txt b/src/snapshot-tests/__fixtures__/cli/text/utilities/clean--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/utilities/clean--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/utilities/clean--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/xcode-ide/documentation-search--success.txt b/src/snapshot-tests/__fixtures__/cli/text/xcode-ide/documentation-search--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/xcode-ide/documentation-search--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/xcode-ide/documentation-search--success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/xcode-ide/list-tools--success.txt b/src/snapshot-tests/__fixtures__/cli/text/xcode-ide/list-tools--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/cli/xcode-ide/list-tools--success.txt rename to src/snapshot-tests/__fixtures__/cli/text/xcode-ide/list-tools--success.txt diff --git a/src/snapshot-tests/__fixtures__/json/device/get-app-path--success.json b/src/snapshot-tests/__fixtures__/json/device/get-app-path--success.json deleted file mode 100644 index 8b7417280..000000000 --- a/src/snapshot-tests/__fixtures__/json/device/get-app-path--success.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "schema": "xcodebuildmcp.output.app-path", - "schemaVersion": "1", - "didError": false, - "error": null, - "data": { - "request": { - "scheme": "CalculatorApp", - "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", - "configuration": "Debug", - "platform": "iOS" - }, - "summary": { - "status": "SUCCEEDED", - "target": "device" - }, - "artifacts": { - "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app" - } - } -} diff --git a/src/snapshot-tests/__fixtures__/json/device/test--failure.json b/src/snapshot-tests/__fixtures__/json/device/test--failure.json deleted file mode 100644 index 09f5698cf..000000000 --- a/src/snapshot-tests/__fixtures__/json/device/test--failure.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", - "didError": true, - "error": "Tests failed", - "data": { - "request": { - "scheme": "CalculatorApp", - "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", - "derivedDataPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-", - "configuration": "Debug", - "platform": "iOS", - "deviceId": "", - "target": "device", - "onlyTesting": [], - "skipTesting": [] - }, - "summary": { - "status": "FAILED", - "durationMs": 1234, - "counts": { - "passed": 21, - "failed": 2, - "skipped": 0 - }, - "target": "device" - }, - "artifacts": { - "deviceId": "", - "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_device__pid.log", - "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_device__pid.xcresult" - }, - "tests": { - "discovered": { - "total": 57, - "items": [ - "CalculatorAppFeatureTests/CalculatorBasicTests/testClear", - "CalculatorAppFeatureTests/CalculatorBasicTests/testInitialState", - "CalculatorAppFeatureTests/CalculatorBasicTests/testIntentionalFailure", - "CalculatorAppFeatureTests/CalculatorIntegrationTests/testChainCalculations", - "CalculatorAppFeatureTests/CalculatorIntegrationTests/testComplexCalculation", - "CalculatorAppFeatureTests/CalculatorIntegrationTests/testExpressionDisplay" - ] - } - }, - "diagnostics": { - "warnings": [], - "errors": [], - "testFailures": [ - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceFailure", - "message": "XCTAssertEqual failed: (\"0\") is not equal to (\"999\") - This test should fail - display should be 0, not 999", - "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:52" - }, - { - "suite": "IntentionalFailureTests", - "test": "test", - "message": "XCTAssertTrue failed - This test should fail to verify error reporting", - "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:286" - } - ] - }, - "testCases": [ - { - "suite": "CalculatorAppTests", - "test": "testAddition", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testAppLaunch", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculationPerformance", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorOperationsEnum", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceBasicOperation", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceChainedOperations", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceClear", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceCreation", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceFailure", - "status": "failed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServicePublicInterface", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServicePublicProperties", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testComplexCalculationWorkflow", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testContentViewInitialization", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testDivisionByZero", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testLargeNumberInputPerformance", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testLargeNumbers", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testMultipleDecimalPointsHandling", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testPercentageCalculation", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testRepeatedEquals", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testSignToggle", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testStateConsistencyAfterOperations", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testStateConsistencyWithDecimalNumbers", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "IntentionalFailureTests", - "test": "test", - "status": "failed", - "durationMs": 0 - } - ] - } -} diff --git a/src/snapshot-tests/__fixtures__/json/project-discovery/list-schemes--success.json b/src/snapshot-tests/__fixtures__/json/project-discovery/list-schemes--success.json deleted file mode 100644 index 186ccd487..000000000 --- a/src/snapshot-tests/__fixtures__/json/project-discovery/list-schemes--success.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "schema": "xcodebuildmcp.output.scheme-list", - "schemaVersion": "1", - "didError": false, - "error": null, - "data": { - "artifacts": { - "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" - }, - "schemes": [ - "CalculatorApp", - "CalculatorAppFeature" - ] - } -} diff --git a/src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-ios--success.json b/src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-ios--success.json deleted file mode 100644 index e5fc0c7c6..000000000 --- a/src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-ios--success.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "schema": "xcodebuildmcp.output.scaffold-result", - "schemaVersion": "1", - "didError": false, - "error": null, - "data": { - "summary": { - "status": "SUCCEEDED", - "platform": "iOS" - }, - "artifacts": { - "projectName": "SnapshotTestApp", - "outputPath": "/ios", - "workspacePath": "/ios/SnapshotTestApp.xcworkspace" - } - } -} diff --git a/src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-macos--success.json b/src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-macos--success.json deleted file mode 100644 index 533cb7f2f..000000000 --- a/src/snapshot-tests/__fixtures__/json/project-scaffolding/scaffold-macos--success.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "schema": "xcodebuildmcp.output.scaffold-result", - "schemaVersion": "1", - "didError": false, - "error": null, - "data": { - "summary": { - "status": "SUCCEEDED", - "platform": "macOS" - }, - "artifacts": { - "projectName": "SnapshotTestMacApp", - "outputPath": "/macos", - "workspacePath": "/macos/SnapshotTestMacApp.xcworkspace" - } - } -} diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/open--error-launch-services-timeout.json b/src/snapshot-tests/__fixtures__/json/simulator-management/open--error-launch-services-timeout.json deleted file mode 100644 index f0207ab5c..000000000 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/open--error-launch-services-timeout.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", - "didError": true, - "error": "Open simulator operation failed.", - "data": { - "summary": { - "status": "FAILED" - }, - "action": { - "type": "open" - }, - "diagnostics": { - "warnings": [], - "errors": [ - { - "message": "_LSOpenURLsWithCompletionHandler() failed for the application /Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Simulator.app with error -1712." - } - ] - } - } -} diff --git a/src/snapshot-tests/__fixtures__/json/simulator/get-app-path--success.json b/src/snapshot-tests/__fixtures__/json/simulator/get-app-path--success.json deleted file mode 100644 index 19883c403..000000000 --- a/src/snapshot-tests/__fixtures__/json/simulator/get-app-path--success.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "schema": "xcodebuildmcp.output.app-path", - "schemaVersion": "1", - "didError": false, - "error": null, - "data": { - "request": { - "scheme": "CalculatorApp", - "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", - "configuration": "Debug", - "platform": "iOS Simulator", - "simulator": "iPhone 17" - }, - "summary": { - "status": "SUCCEEDED", - "target": "simulator", - "durationMs": 1234 - }, - "artifacts": { - "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app" - } - } -} diff --git a/src/snapshot-tests/__fixtures__/json/simulator/test--failure.json b/src/snapshot-tests/__fixtures__/json/simulator/test--failure.json deleted file mode 100644 index da4d5cdec..000000000 --- a/src/snapshot-tests/__fixtures__/json/simulator/test--failure.json +++ /dev/null @@ -1,379 +0,0 @@ -{ - "schema": "xcodebuildmcp.output.test-result", - "schemaVersion": "1", - "didError": true, - "error": "Tests failed", - "data": { - "request": { - "scheme": "CalculatorApp", - "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", - "derivedDataPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-", - "configuration": "Debug", - "platform": "iOS Simulator", - "simulatorName": "iPhone 17", - "onlyTesting": [], - "skipTesting": [] - }, - "summary": { - "status": "FAILED", - "durationMs": 1234, - "counts": { - "passed": 54, - "failed": 3, - "skipped": 0 - }, - "target": "simulator" - }, - "artifacts": { - "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_sim__pid.log", - "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_sim__pid.xcresult" - }, - "tests": { - "discovered": { - "total": 57, - "items": [ - "CalculatorAppFeatureTests/CalculatorBasicTests/testClear", - "CalculatorAppFeatureTests/CalculatorBasicTests/testInitialState", - "CalculatorAppFeatureTests/CalculatorBasicTests/testIntentionalFailure", - "CalculatorAppFeatureTests/CalculatorIntegrationTests/testChainCalculations", - "CalculatorAppFeatureTests/CalculatorIntegrationTests/testComplexCalculation", - "CalculatorAppFeatureTests/CalculatorIntegrationTests/testExpressionDisplay" - ] - } - }, - "diagnostics": { - "warnings": [], - "errors": [], - "testFailures": [ - { - "suite": "(Unknown Suite)", - "test": "This test should fail to verify error reporting", - "message": "Expectation failed: (calculator.display → \"0\") == \"999\"\n// This test is designed to fail to test error reporting\nThis should fail - display should be 0, not 999", - "location": "CalculatorServiceTests.swift:37" - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceFailure", - "message": "XCTAssertEqual failed: (\"0\") is not equal to (\"999\") - This test should fail - display should be 0, not 999", - "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:52" - }, - { - "suite": "IntentionalFailureTests", - "test": "test", - "message": "XCTAssertTrue failed - This test should fail to verify error reporting", - "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:286" - } - ] - }, - "testCases": [ - { - "test": "Adding decimal numbers", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Adding multiple digit numbers", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Adding single digit numbers", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Addition operation", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Calculate without setting operation", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Calculator handles invalid input gracefully", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Calculator initializes with correct default values", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Calculator state after multiple clears", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Chain calculations", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Clear function resets calculator to initial state", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Clear input through handler", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Complex calculation sequence", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Decimal input through handler", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Decimal operations precision", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Decimal point at start creates 0.", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Division by zero returns zero", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Division operation", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Expression display updates correctly", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Large number error handling", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Multiple decimal points should be ignored", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Multiple equals presses", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Multiplication operation", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Number input through handler", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Operation input through handler", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Percentage calculation", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Repetitive equals press repeats last operation", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Setting operation without previous number", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Simple addition calculation", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Subtraction operation", - "status": "passed", - "durationMs": 0 - }, - { - "test": "This test should fail to verify error reporting", - "status": "failed", - "durationMs": 0 - }, - { - "test": "Toggle sign on negative number", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Toggle sign on positive number", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Toggle sign on zero has no effect", - "status": "passed", - "durationMs": 0 - }, - { - "test": "Very small decimal numbers", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testAddition", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testAppLaunch", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculationPerformance", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorOperationsEnum", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceBasicOperation", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceChainedOperations", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceClear", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceCreation", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServiceFailure", - "status": "failed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServicePublicInterface", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testCalculatorServicePublicProperties", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testComplexCalculationWorkflow", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testContentViewInitialization", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testDivisionByZero", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testLargeNumberInputPerformance", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testLargeNumbers", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testMultipleDecimalPointsHandling", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testPercentageCalculation", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testRepeatedEquals", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testSignToggle", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testStateConsistencyAfterOperations", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "CalculatorAppTests", - "test": "testStateConsistencyWithDecimalNumbers", - "status": "passed", - "durationMs": 0 - }, - { - "suite": "IntentionalFailureTests", - "test": "test", - "status": "failed", - "durationMs": 0 - } - ] - } -} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/coverage/get-coverage-report--error-invalid-bundle.json b/src/snapshot-tests/__fixtures__/mcp/json/coverage/get-coverage-report--error-invalid-bundle.json new file mode 100644 index 000000000..ea482fdd5 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/coverage/get-coverage-report--error-invalid-bundle.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.coverage-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to get coverage report.", + "data": { + "summary": { + "status": "FAILED" + }, + "coverageScope": "report", + "artifacts": { + "xcresultPath": "/invalid.xcresult" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Error Domain=XCCovErrorDomain Code=0 \"Failed to load result bundle\" UserInfo={NSLocalizedDescription=Failed to load result bundle, NSUnderlyingError= {Error Domain=XCResultStorage.ResultBundleFactory.Error Code=0 \"Failed to create a new result bundle reader, underlying error: Info.plist at /invalid.xcresult/Info.plist does not exist, the result bundle might be corrupted or the provided path is not a result bundle\"}}" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/json/coverage/get-coverage-report--success.json b/src/snapshot-tests/__fixtures__/mcp/json/coverage/get-coverage-report--success.json similarity index 78% rename from src/snapshot-tests/__fixtures__/json/coverage/get-coverage-report--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/coverage/get-coverage-report--success.json index 37b58e8ad..252f93984 100644 --- a/src/snapshot-tests/__fixtures__/json/coverage/get-coverage-report--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/coverage/get-coverage-report--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.coverage-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -23,5 +23,8 @@ "executableLines": 391 } ] - } + }, + "nextSteps": [ + "View file-level coverage: get_file_coverage({ xcresultPath: \"/TestResults.xcresult\" })" + ] } diff --git a/src/snapshot-tests/__fixtures__/mcp/json/coverage/get-file-coverage--error-invalid-bundle.json b/src/snapshot-tests/__fixtures__/mcp/json/coverage/get-file-coverage--error-invalid-bundle.json new file mode 100644 index 000000000..99520064a --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/coverage/get-file-coverage--error-invalid-bundle.json @@ -0,0 +1,24 @@ +{ + "schema": "xcodebuildmcp.output.coverage-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to get file coverage.", + "data": { + "summary": { + "status": "FAILED" + }, + "coverageScope": "file", + "artifacts": { + "xcresultPath": "/invalid.xcresult", + "file": "SomeFile.swift" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Error Domain=XCCovErrorDomain Code=0 \"Failed to load result bundle\" UserInfo={NSLocalizedDescription=Failed to load result bundle, NSUnderlyingError= {Error Domain=XCResultStorage.ResultBundleFactory.Error Code=0 \"Failed to create a new result bundle reader, underlying error: Info.plist at /invalid.xcresult/Info.plist does not exist, the result bundle might be corrupted or the provided path is not a result bundle\"}}" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/json/coverage/get-file-coverage--success.json b/src/snapshot-tests/__fixtures__/mcp/json/coverage/get-file-coverage--success.json similarity index 94% rename from src/snapshot-tests/__fixtures__/json/coverage/get-file-coverage--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/coverage/get-file-coverage--success.json index 7ce3bc17b..6f28c40cc 100644 --- a/src/snapshot-tests/__fixtures__/json/coverage/get-file-coverage--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/coverage/get-file-coverage--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.coverage-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -96,5 +96,8 @@ "notCoveredLineCount": 22, "partialCoverageFunctionCount": 4 } - } + }, + "nextSteps": [ + "View overall coverage: get_coverage_report({ xcresultPath: \"/TestResults.xcresult\" })" + ] } diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/add-breakpoint--error-no-session.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/add-breakpoint--error-no-session.json new file mode 100644 index 000000000..fe7fe8912 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/add-breakpoint--error-no-session.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.debug-breakpoint-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to add breakpoint.", + "data": { + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "No active debug session. Provide debugSessionId or attach first." + } + ] + }, + "action": "add", + "breakpoint": { + "kind": "file-line", + "file": "ContentView.swift", + "line": 42 + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/add-breakpoint--success.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/add-breakpoint--success.json new file mode 100644 index 000000000..8f715e077 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/add-breakpoint--success.json @@ -0,0 +1,15 @@ +{ + "schema": "xcodebuildmcp.output.debug-breakpoint-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "action": "add", + "breakpoint": { + "breakpointId": 1, + "kind": "file-line", + "file": "ContentView.swift", + "line": 42 + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/attach--error-no-process.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/attach--error-no-process.json new file mode 100644 index 000000000..f58a8e8dd --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/attach--error-no-process.json @@ -0,0 +1,20 @@ +{ + "schema": "xcodebuildmcp.output.debug-session-action", + "schemaVersion": "2", + "didError": true, + "error": "Failed to attach debugger.", + "data": { + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Invalid device: " + } + ] + }, + "action": "attach", + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/attach--success-continue.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/attach--success-continue.json new file mode 100644 index 000000000..14e107af3 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/attach--success-continue.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.debug-session-action", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "action": "attach", + "session": { + "debugSessionId": "", + "connectionState": "attached", + "executionState": "running" + }, + "artifacts": { + "simulatorId": "", + "processId": 99999 + } + }, + "nextSteps": [ + "Add a breakpoint: debug_breakpoint_add({ debugSessionId: \"\", file: \"...\", line: 123 })", + "Continue execution: debug_continue({ debugSessionId: \"\" })", + "Show call stack: debug_stack({ debugSessionId: \"\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/debugging/attach--success.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/attach--success.json similarity index 53% rename from src/snapshot-tests/__fixtures__/json/debugging/attach--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/debugging/attach--success.json index 10ba7af4f..46d01b62c 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/attach--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/attach--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.debug-session-action", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -14,5 +14,10 @@ "simulatorId": "", "processId": 99999 } - } + }, + "nextSteps": [ + "Add a breakpoint: debug_breakpoint_add({ debugSessionId: \"\", file: \"...\", line: 123 })", + "Continue execution: debug_continue({ debugSessionId: \"\" })", + "Show call stack: debug_stack({ debugSessionId: \"\" })" + ] } diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/continue--error-no-session.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/continue--error-no-session.json new file mode 100644 index 000000000..03f1a220f --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/continue--error-no-session.json @@ -0,0 +1,17 @@ +{ + "schema": "xcodebuildmcp.output.debug-session-action", + "schemaVersion": "2", + "didError": true, + "error": "Failed to resume debugger.", + "data": { + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "No active debug session. Provide debugSessionId or attach first." + } + ] + }, + "action": "continue" + } +} diff --git a/src/snapshot-tests/__fixtures__/json/debugging/attach--success-continue.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/continue--success.json similarity index 65% rename from src/snapshot-tests/__fixtures__/json/debugging/attach--success-continue.json rename to src/snapshot-tests/__fixtures__/mcp/json/debugging/continue--success.json index 9649852c2..fd757cdb0 100644 --- a/src/snapshot-tests/__fixtures__/json/debugging/attach--success-continue.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/continue--success.json @@ -1,18 +1,14 @@ { "schema": "xcodebuildmcp.output.debug-session-action", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { - "action": "attach", + "action": "continue", "session": { "debugSessionId": "", "connectionState": "attached", "executionState": "running" - }, - "artifacts": { - "simulatorId": "", - "processId": 99999 } } } diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/detach--error-no-session.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/detach--error-no-session.json new file mode 100644 index 000000000..ec6f0afe4 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/detach--error-no-session.json @@ -0,0 +1,17 @@ +{ + "schema": "xcodebuildmcp.output.debug-session-action", + "schemaVersion": "2", + "didError": true, + "error": "Failed to detach debugger.", + "data": { + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "No active debug session. Provide debugSessionId or attach first." + } + ] + }, + "action": "detach" + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/detach--success.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/detach--success.json new file mode 100644 index 000000000..d7b3feace --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/detach--success.json @@ -0,0 +1,13 @@ +{ + "schema": "xcodebuildmcp.output.debug-session-action", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "action": "detach", + "session": { + "debugSessionId": "", + "connectionState": "detached" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/lldb-command--error-no-session.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/lldb-command--error-no-session.json new file mode 100644 index 000000000..5d3c99e3e --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/lldb-command--error-no-session.json @@ -0,0 +1,18 @@ +{ + "schema": "xcodebuildmcp.output.debug-command-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to run LLDB command.", + "data": { + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "No active debug session. Provide debugSessionId or attach first." + } + ] + }, + "command": "breakpoint list", + "outputLines": [] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/lldb-command--success.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/lldb-command--success.json new file mode 100644 index 000000000..404fe080a --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/lldb-command--success.json @@ -0,0 +1,17 @@ +{ + "schema": "xcodebuildmcp.output.debug-command-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "command": "breakpoint list", + "outputLines": [ + "Current breakpoints:", + "1: file = 'ContentView.swift', line = 42, exact_match = 0, locations = ", + " Names:", + " dap", + "", + " 1.1: where = CalculatorApp.debug.dylib`closure #1 in closure #1 in closure #1 in ContentView.body.getter + 1428 at ContentView.swift:42:31, address = , resolved, hit count = 0" + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/remove-breakpoint--error-no-session.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/remove-breakpoint--error-no-session.json new file mode 100644 index 000000000..826302cdb --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/remove-breakpoint--error-no-session.json @@ -0,0 +1,20 @@ +{ + "schema": "xcodebuildmcp.output.debug-breakpoint-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to remove breakpoint.", + "data": { + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "No active debug session. Provide debugSessionId or attach first." + } + ] + }, + "action": "remove", + "breakpoint": { + "breakpointId": 1 + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/remove-breakpoint--success.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/remove-breakpoint--success.json new file mode 100644 index 000000000..147ae8dbf --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/remove-breakpoint--success.json @@ -0,0 +1,12 @@ +{ + "schema": "xcodebuildmcp.output.debug-breakpoint-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "action": "remove", + "breakpoint": { + "breakpointId": 1 + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/stack--error-no-session.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/stack--error-no-session.json new file mode 100644 index 000000000..5832685a2 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/stack--error-no-session.json @@ -0,0 +1,16 @@ +{ + "schema": "xcodebuildmcp.output.debug-stack-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to get stack.", + "data": { + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "No active debug session. Provide debugSessionId or attach first." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/stack--success.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/stack--success.json new file mode 100644 index 000000000..70eee683f --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/stack--success.json @@ -0,0 +1,102 @@ +{ + "schema": "xcodebuildmcp.output.debug-stack-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "threads": [ + { + "threadId": 1, + "name": "Thread 1", + "truncated": false, + "frames": [ + { + "index": 0, + "symbol": "mach_msg2_trap", + "displayLocation": "/usr/lib/system/libsystem_kernel.dylib`mach_msg2_trap:" + }, + { + "index": 1, + "symbol": "mach_msg2_internal", + "displayLocation": "/usr/lib/system/libsystem_kernel.dylib`mach_msg2_internal:" + }, + { + "index": 2, + "symbol": "mach_msg_overwrite", + "displayLocation": "/usr/lib/system/libsystem_kernel.dylib`mach_msg_overwrite:" + }, + { + "index": 3, + "symbol": "mach_msg", + "displayLocation": "/usr/lib/system/libsystem_kernel.dylib`mach_msg:" + }, + { + "index": 4, + "symbol": "", + "displayLocation": ":1" + }, + { + "index": 5, + "symbol": "", + "displayLocation": ":1" + }, + { + "index": 6, + "symbol": "", + "displayLocation": ":1" + }, + { + "index": 7, + "symbol": "", + "displayLocation": ":1" + }, + { + "index": 8, + "symbol": "", + "displayLocation": ":1" + }, + { + "index": 9, + "symbol": "", + "displayLocation": ":1" + }, + { + "index": 10, + "symbol": "", + "displayLocation": ":1" + }, + { + "index": 11, + "symbol": "", + "displayLocation": ":1" + }, + { + "index": 12, + "symbol": "", + "displayLocation": ":1" + }, + { + "index": 13, + "symbol": "static CalculatorApp.$main()", + "displayLocation": "/Library/Developer/CoreSimulator/Devices//data/Containers/Bundle/Application//CalculatorApp.app/CalculatorApp.debug.dylib`static CalculatorApp.CalculatorApp.$main() -> ():" + }, + { + "index": 14, + "symbol": "main", + "displayLocation": "/Library/Developer/CoreSimulator/Devices//data/Containers/Bundle/Application//CalculatorApp.app/CalculatorApp.debug.dylib`main:" + }, + { + "index": 15, + "symbol": "start_sim", + "displayLocation": "/Library/Developer/CoreSimulator/Volumes/iOS_23E244/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 26.4.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim`start_sim:" + }, + { + "index": 16, + "symbol": "start", + "displayLocation": "/usr/lib/dyld`start:" + } + ] + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/variables--error-no-session.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/variables--error-no-session.json new file mode 100644 index 000000000..baf311d84 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/variables--error-no-session.json @@ -0,0 +1,16 @@ +{ + "schema": "xcodebuildmcp.output.debug-variables-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to get variables.", + "data": { + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "No active debug session. Provide debugSessionId or attach first." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/debugging/variables--success.json b/src/snapshot-tests/__fixtures__/mcp/json/debugging/variables--success.json new file mode 100644 index 000000000..2025f5fd1 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/debugging/variables--success.json @@ -0,0 +1,40 @@ +{ + "schema": "xcodebuildmcp.output.debug-variables-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "scopes": { + "locals": { + "variables": [] + }, + "globals": { + "variables": [] + }, + "registers": { + "groups": [ + { + "name": "General Purpose Registers", + "variables": [] + }, + { + "name": "Floating Point Registers", + "variables": [] + }, + { + "name": "Exception State Registers", + "variables": [] + }, + { + "name": "Scalable Vector Extension Registers", + "variables": [] + }, + { + "name": "Scalable Matrix Extension Registers", + "variables": [] + } + ] + } + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/build--error-compiler.json b/src/snapshot-tests/__fixtures__/mcp/json/device/build--error-compiler.json new file mode 100644 index 000000000..df6c7eafd --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/build--error-compiler.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "device" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_device__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "cannot convert value of type 'String' to specified type 'Int'", + "location": "/example_projects/iOS_Calculator/CalculatorApp/CalculatorApp.swift:33" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/build--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/device/build--error-wrong-scheme.json new file mode 100644 index 000000000..0799e0040 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/build--error-wrong-scheme.json @@ -0,0 +1,24 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "device" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_device__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The workspace named \"CalculatorApp\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the workspace." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/build--success.json b/src/snapshot-tests/__fixtures__/mcp/json/device/build--success.json new file mode 100644 index 000000000..c29c38cff --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/build--success.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "target": "device" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_device__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + }, + "nextSteps": [ + "Get built device app path: get_device_app_path({ scheme: \"CalculatorApp\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--error-compiler.json b/src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--error-compiler.json new file mode 100644 index 000000000..584c06234 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--error-compiler.json @@ -0,0 +1,26 @@ +{ + "schema": "xcodebuildmcp.output.build-run-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "device" + }, + "artifacts": { + "deviceId": "", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_device__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "cannot convert value of type 'String' to specified type 'Int'", + "location": "/example_projects/iOS_Calculator/CalculatorApp/CalculatorApp.swift:33" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--error-wrong-scheme.json new file mode 100644 index 000000000..b530a0e0c --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--error-wrong-scheme.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.build-run-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "device" + }, + "artifacts": { + "deviceId": "", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_device__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The workspace named \"CalculatorApp\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the workspace." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--success.json b/src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--success.json new file mode 100644 index 000000000..4c208d7d5 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/build-and-run--success.json @@ -0,0 +1,27 @@ +{ + "schema": "xcodebuildmcp.output.build-run-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "target": "device" + }, + "artifacts": { + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app", + "bundleId": "io.sentry.calculatorapp", + "processId": 99999, + "deviceId": "", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_device__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + }, + "nextSteps": [ + "Stop app on device: stop_app_device({ deviceId: \"\", processId: })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/get-app-path--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/device/get-app-path--error-wrong-scheme.json new file mode 100644 index 000000000..7c0123dee --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/get-app-path--error-wrong-scheme.json @@ -0,0 +1,20 @@ +{ + "schema": "xcodebuildmcp.output.app-path", + "schemaVersion": "2", + "didError": true, + "error": "Query failed.", + "data": { + "summary": { + "status": "FAILED", + "target": "device" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The workspace named \"CalculatorApp\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the workspace." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/get-app-path--success.json b/src/snapshot-tests/__fixtures__/mcp/json/device/get-app-path--success.json new file mode 100644 index 000000000..1d4dcfa20 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/get-app-path--success.json @@ -0,0 +1,20 @@ +{ + "schema": "xcodebuildmcp.output.app-path", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "target": "device" + }, + "artifacts": { + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app" + } + }, + "nextSteps": [ + "Get bundle ID: get_app_bundle_id({ appPath: \"~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app\" })", + "Install app on device: install_app_device({ deviceId: \"DEVICE_UDID\", appPath: \"~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app\" })", + "Launch app on device: launch_app_device({ deviceId: \"DEVICE_UDID\", bundleId: \"BUNDLE_ID\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/install--error-invalid-app.json b/src/snapshot-tests/__fixtures__/mcp/json/device/install--error-invalid-app.json new file mode 100644 index 000000000..8f1c231ad --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/install--error-invalid-app.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.install-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to install app.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "deviceId": "", + "appPath": "/tmp/nonexistent.app" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Failed to load provisioning paramter list due to error: Error Domain=com.apple.dt.CoreDeviceError Code=1002 \"No provider was found.\" UserInfo={NSLocalizedDescription=No provider was found.}.\n`devicectl manage create` may support a reduced set of arguments.\nERROR: The specified device was not found. (Name: ) (com.apple.dt.CoreDeviceError error 1000 (0x3E8))\n DeviceName = " + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/json/simulator/install--success.json b/src/snapshot-tests/__fixtures__/mcp/json/device/install--success.json similarity index 79% rename from src/snapshot-tests/__fixtures__/json/simulator/install--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/device/install--success.json index 6d757dcde..69372529c 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/install--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/install--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.install-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -8,8 +8,8 @@ "status": "SUCCEEDED" }, "artifacts": { - "simulatorId": "", - "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app" + "deviceId": "", + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos/CalculatorApp.app" }, "diagnostics": { "warnings": [], diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/launch--error-invalid-bundle.json b/src/snapshot-tests/__fixtures__/mcp/json/device/launch--error-invalid-bundle.json new file mode 100644 index 000000000..f7e17416b --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/launch--error-invalid-bundle.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.launch-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to launch app.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "deviceId": "", + "bundleId": "com.nonexistent.app" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Failed to load provisioning paramter list due to error: Error Domain=com.apple.dt.CoreDeviceError Code=1002 \"No provider was found.\" UserInfo={NSLocalizedDescription=No provider was found.}.\n`devicectl manage create` may support a reduced set of arguments.\nERROR: The specified device was not found. (Name: ) (com.apple.dt.CoreDeviceError error 1000 (0x3E8))\n DeviceName = " + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/json/device/launch--success.json b/src/snapshot-tests/__fixtures__/mcp/json/device/launch--success.json similarity index 72% rename from src/snapshot-tests/__fixtures__/json/device/launch--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/device/launch--success.json index 780cb4314..bf3192a6b 100644 --- a/src/snapshot-tests/__fixtures__/json/device/launch--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/launch--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.launch-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -16,5 +16,8 @@ "warnings": [], "errors": [] } - } + }, + "nextSteps": [ + "Stop the app: stop_app_device({ deviceId: \"\", processId: })" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/device/list--success.json b/src/snapshot-tests/__fixtures__/mcp/json/device/list--success.json similarity index 79% rename from src/snapshot-tests/__fixtures__/json/device/list--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/device/list--success.json index c3f5402c7..fb5f7b05c 100644 --- a/src/snapshot-tests/__fixtures__/json/device/list--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/list--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.device-list", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -11,7 +11,7 @@ "platform": "iOS", "state": "connected", "isAvailable": true, - "osVersion": "26.3.1 (a)" + "osVersion": "26.4.2" }, { "name": "iPhone", @@ -38,5 +38,10 @@ "osVersion": "26.3" } ] - } + }, + "nextSteps": [ + "Build for device: build_device({ scheme: \"YOUR_SCHEME\" })", + "Run tests on device: test_device()", + "Get app path: get_device_app_path()" + ] } diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/stop--error-no-app.json b/src/snapshot-tests/__fixtures__/mcp/json/device/stop--error-no-app.json new file mode 100644 index 000000000..00632b8c7 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/stop--error-no-app.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.stop-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to stop app.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "deviceId": "", + "processId": 99999 + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Failed to load provisioning paramter list due to error: Error Domain=com.apple.dt.CoreDeviceError Code=1002 \"No provider was found.\" UserInfo={NSLocalizedDescription=No provider was found.}.\n`devicectl manage create` may support a reduced set of arguments.\nERROR: The specified device was not found. (Name: ) (com.apple.dt.CoreDeviceError error 1000 (0x3E8))\n DeviceName = " + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/stop--success.json b/src/snapshot-tests/__fixtures__/mcp/json/device/stop--success.json new file mode 100644 index 000000000..012df1912 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/stop--success.json @@ -0,0 +1,19 @@ +{ + "schema": "xcodebuildmcp.output.stop-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "artifacts": { + "deviceId": "", + "processId": 99999 + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/test--error-compiler.json b/src/snapshot-tests/__fixtures__/mcp/json/device/test--error-compiler.json new file mode 100644 index 000000000..1a2283fbc --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/test--error-compiler.json @@ -0,0 +1,44 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "counts": { + "passed": 0, + "failed": 0, + "skipped": 0 + }, + "target": "device" + }, + "artifacts": { + "deviceId": "", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_device__pid.log", + "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_device__pid.xcresult" + }, + "tests": { + "selected": [ + "CalculatorAppTests/CalculatorAppTests/testAddition" + ], + "discovered": { + "total": 1, + "items": [ + "CalculatorAppTests/CalculatorAppTests/testAddition" + ] + } + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "cannot convert value of type 'String' to specified type 'Int'", + "location": "/example_projects/iOS_Calculator/CalculatorApp/CalculatorApp.swift:33" + } + ], + "testFailures": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/test--failure.json b/src/snapshot-tests/__fixtures__/mcp/json/device/test--failure.json new file mode 100644 index 000000000..4ba8d6390 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/test--failure.json @@ -0,0 +1,68 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "counts": { + "passed": 21, + "failed": 2, + "skipped": 0 + }, + "target": "device" + }, + "artifacts": { + "deviceId": "", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_device__pid.log", + "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_device__pid.xcresult" + }, + "tests": { + "discovered": { + "total": 57, + "items": [ + "CalculatorAppFeatureTests/CalculatorBasicTests/testClear", + "CalculatorAppFeatureTests/CalculatorBasicTests/testInitialState", + "CalculatorAppFeatureTests/CalculatorBasicTests/testIntentionalFailure", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testChainCalculations", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testComplexCalculation", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testExpressionDisplay" + ] + } + }, + "diagnostics": { + "warnings": [], + "errors": [], + "testFailures": [ + { + "suite": "CalculatorAppTests", + "test": "testCalculatorServiceFailure", + "message": "XCTAssertEqual failed: (\"0\") is not equal to (\"999\") - This test should fail - display should be 0, not 999", + "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:52" + }, + { + "suite": "IntentionalFailureTests", + "test": "test", + "message": "XCTAssertTrue failed - This test should fail to verify error reporting", + "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:286" + } + ] + }, + "testCases": [ + { + "suite": "CalculatorAppTests", + "test": "testCalculatorServiceFailure", + "status": "failed", + "durationMs": 0 + }, + { + "suite": "IntentionalFailureTests", + "test": "test", + "status": "failed", + "durationMs": 0 + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/test--success.json b/src/snapshot-tests/__fixtures__/mcp/json/device/test--success.json new file mode 100644 index 000000000..9f2267bd5 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/test--success.json @@ -0,0 +1,47 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "counts": { + "passed": 1, + "failed": 0, + "skipped": 0 + }, + "target": "device" + }, + "artifacts": { + "deviceId": "", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_device__pid.log", + "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_device__pid.xcresult" + }, + "tests": { + "selected": [ + "CalculatorAppTests/CalculatorAppTests/testAddition" + ], + "discovered": { + "total": 1, + "items": [ + "CalculatorAppTests/CalculatorAppTests/testAddition" + ] + } + }, + "diagnostics": { + "warnings": [], + "errors": [], + "testFailures": [] + }, + "testCases": [ + { + "suite": "CalculatorAppTests", + "test": "testAddition", + "status": "passed", + "durationMs": 0 + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/build--error-compiler.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/build--error-compiler.json new file mode 100644 index 000000000..056b18fa3 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/build--error-compiler.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "macos" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_macos__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "cannot convert value of type 'String' to specified type 'Int'", + "location": "/example_projects/macOS/MCPTest/MCPTestApp.swift:20" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/build--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/build--error-wrong-scheme.json new file mode 100644 index 000000000..8d4556828 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/build--error-wrong-scheme.json @@ -0,0 +1,24 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "macos" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_macos__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The project named \"MCPTest\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the project." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/build--success.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/build--success.json new file mode 100644 index 000000000..5e7318280 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/build--success.json @@ -0,0 +1,24 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "target": "macos" + }, + "artifacts": { + "bundleId": "io.sentry.MCPTest.macOS", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_macos__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + }, + "nextSteps": [ + "Get built macOS app path: get_mac_app_path({ scheme: \"MCPTest\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--error-compiler.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--error-compiler.json new file mode 100644 index 000000000..d235c431c --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--error-compiler.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.build-run-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "macos" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_macos__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "cannot convert value of type 'String' to specified type 'Int'", + "location": "/example_projects/macOS/MCPTest/MCPTestApp.swift:20" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--error-wrong-scheme.json new file mode 100644 index 000000000..c7e31541f --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--error-wrong-scheme.json @@ -0,0 +1,24 @@ +{ + "schema": "xcodebuildmcp.output.build-run-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "macos" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_macos__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The project named \"MCPTest\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the project." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--success.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--success.json new file mode 100644 index 000000000..acdb2a357 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/build-and-run--success.json @@ -0,0 +1,30 @@ +{ + "schema": "xcodebuildmcp.output.build-run-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "target": "macos" + }, + "artifacts": { + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app", + "bundleId": "io.sentry.MCPTest.macOS", + "processId": 99999, + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_macos__pid.log" + }, + "output": { + "stdout": [], + "stderr": [] + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + }, + "nextSteps": [ + "Interact with the launched app in the foreground" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/get-app-path--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/get-app-path--error-wrong-scheme.json new file mode 100644 index 000000000..dd5c4918b --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/get-app-path--error-wrong-scheme.json @@ -0,0 +1,20 @@ +{ + "schema": "xcodebuildmcp.output.app-path", + "schemaVersion": "2", + "didError": true, + "error": "Query failed.", + "data": { + "summary": { + "status": "FAILED", + "target": "macos" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The project named \"MCPTest\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the project." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/get-app-path--success.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/get-app-path--success.json new file mode 100644 index 000000000..f369cfed6 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/get-app-path--success.json @@ -0,0 +1,19 @@ +{ + "schema": "xcodebuildmcp.output.app-path", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "target": "macos" + }, + "artifacts": { + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app" + } + }, + "nextSteps": [ + "Get bundle ID: get_mac_bundle_id({ appPath: \"~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app\" })", + "Launch app: launch_mac_app({ appPath: \"~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/get-macos-bundle-id--error-missing-app.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/get-macos-bundle-id--error-missing-app.json new file mode 100644 index 000000000..590082ed6 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/get-macos-bundle-id--error-missing-app.json @@ -0,0 +1,19 @@ +{ + "schema": "xcodebuildmcp.output.bundle-id", + "schemaVersion": "2", + "didError": true, + "error": "Failed to get macOS bundle ID.", + "data": { + "artifacts": { + "appPath": "/nonexistent/path/Fake.app" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "File not found: '/nonexistent/path/Fake.app'. Please check the path and try again." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/json/macos/get-macos-bundle-id--success.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/get-macos-bundle-id--success.json similarity index 52% rename from src/snapshot-tests/__fixtures__/json/macos/get-macos-bundle-id--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/macos/get-macos-bundle-id--success.json index ffe86063c..9bdd06ad6 100644 --- a/src/snapshot-tests/__fixtures__/json/macos/get-macos-bundle-id--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/get-macos-bundle-id--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.bundle-id", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -8,5 +8,9 @@ "appPath": "/BundleTest.app", "bundleId": "com.test.snapshot-macos" } - } + }, + "nextSteps": [ + "Launch the app: launch_mac_app({ appPath: \"/BundleTest.app\" })", + "Build again: build_macos({ scheme: \"SCHEME_NAME\" })" + ] } diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/launch--error-invalid-app.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/launch--error-invalid-app.json new file mode 100644 index 000000000..842a91408 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/launch--error-invalid-app.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.launch-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to launch macOS app.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "appPath": "/NonExistent.app" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "File not found: '/NonExistent.app'. Please check the path and try again." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/launch--success.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/launch--success.json new file mode 100644 index 000000000..05656efca --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/launch--success.json @@ -0,0 +1,20 @@ +{ + "schema": "xcodebuildmcp.output.launch-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "artifacts": { + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/MCPTest-/Build/Products/Debug/MCPTest.app", + "bundleId": "io.sentry.MCPTest.macOS", + "processId": 99999 + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/stop--error-no-app.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/stop--error-no-app.json new file mode 100644 index 000000000..83416c890 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/stop--error-no-app.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.stop-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to stop macOS app.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "processId": 99999, + "appName": "PID 999999" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "kill: 999999: No such process" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/stop--success.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/stop--success.json new file mode 100644 index 000000000..7c3ed4c45 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/stop--success.json @@ -0,0 +1,18 @@ +{ + "schema": "xcodebuildmcp.output.stop-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "artifacts": { + "appName": "MCPTest" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/test--error-compiler.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/test--error-compiler.json new file mode 100644 index 000000000..78c2aa7cd --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/test--error-compiler.json @@ -0,0 +1,45 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "counts": { + "passed": 0, + "failed": 0, + "skipped": 0 + }, + "target": "macos" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_macos__pid.log", + "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_macos__pid.xcresult" + }, + "tests": { + "selected": [ + "MCPTestTests/MCPTestTests/appNameIsCorrect", + "MCPTestTests/MCPTestsXCTests/testAppNameIsCorrect" + ], + "discovered": { + "total": 2, + "items": [ + "MCPTestTests/MCPTestTests/appNameIsCorrect", + "MCPTestTests/MCPTestsXCTests/testAppNameIsCorrect" + ] + } + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "cannot convert value of type 'String' to specified type 'Int'", + "location": "/example_projects/macOS/MCPTest/MCPTestApp.swift:20" + } + ], + "testFailures": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/test--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/test--error-wrong-scheme.json new file mode 100644 index 000000000..46da0089b --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/test--error-wrong-scheme.json @@ -0,0 +1,31 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "counts": { + "passed": 0, + "failed": 0, + "skipped": 0 + }, + "target": "macos" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_macos__pid.log", + "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_macos__pid.xcresult" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The project named \"MCPTest\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the project." + } + ], + "testFailures": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/test--failure.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/test--failure.json new file mode 100644 index 000000000..8db733c47 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/test--failure.json @@ -0,0 +1,65 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "counts": { + "passed": 2, + "failed": 2, + "skipped": 0 + }, + "target": "macos" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_macos__pid.log", + "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_macos__pid.xcresult" + }, + "tests": { + "discovered": { + "total": 4, + "items": [ + "MCPTestTests/MCPTestTests/appNameIsCorrect", + "MCPTestTests/MCPTestTests/deliberateFailure", + "MCPTestTests/MCPTestsXCTests/testAppNameIsCorrect", + "MCPTestTests/MCPTestsXCTests/testDeliberateFailure" + ] + } + }, + "diagnostics": { + "warnings": [], + "errors": [], + "testFailures": [ + { + "suite": "MCPTestsXCTests", + "test": "testDeliberateFailure()", + "message": "XCTAssertTrue failed - This test is designed to fail for snapshot testing", + "location": "MCPTestsXCTests.swift:11" + }, + { + "suite": "MCPTestTests", + "test": "deliberateFailure()", + "message": "Expectation failed: 1 == 2: This test is designed to fail for snapshot testing", + "location": "MCPTestTests.swift:11" + } + ] + }, + "testCases": [ + { + "suite": "MCPTestsXCTests", + "test": "testDeliberateFailure()", + "status": "failed", + "durationMs": 0 + }, + { + "suite": "MCPTestTests", + "test": "deliberateFailure()", + "status": "failed", + "durationMs": 0 + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/macos/test--success.json b/src/snapshot-tests/__fixtures__/mcp/json/macos/test--success.json new file mode 100644 index 000000000..031d4f8d0 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/macos/test--success.json @@ -0,0 +1,54 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "counts": { + "passed": 2, + "failed": 0, + "skipped": 0 + }, + "target": "macos" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_macos__pid.log", + "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_macos__pid.xcresult" + }, + "tests": { + "selected": [ + "MCPTestTests/MCPTestTests/appNameIsCorrect", + "MCPTestTests/MCPTestsXCTests/testAppNameIsCorrect" + ], + "discovered": { + "total": 2, + "items": [ + "MCPTestTests/MCPTestTests/appNameIsCorrect", + "MCPTestTests/MCPTestsXCTests/testAppNameIsCorrect" + ] + } + }, + "diagnostics": { + "warnings": [], + "errors": [], + "testFailures": [] + }, + "testCases": [ + { + "suite": "MCPTestsXCTests", + "test": "testAppNameIsCorrect()", + "status": "passed", + "durationMs": 0 + }, + { + "suite": "MCPTestTests", + "test": "appNameIsCorrect()", + "status": "passed", + "durationMs": 0 + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/discover-projs--error-invalid-root.json b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/discover-projs--error-invalid-root.json new file mode 100644 index 000000000..c84487eec --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/discover-projs--error-invalid-root.json @@ -0,0 +1,26 @@ +{ + "schema": "xcodebuildmcp.output.project-list", + "schemaVersion": "2", + "didError": true, + "error": "Failed to discover projects.", + "data": { + "summary": { + "status": "FAILED", + "maxDepth": 3 + }, + "artifacts": { + "workspaceRoot": "/nonexistent/path/Fake.app", + "scanPath": "/nonexistent/path" + }, + "projects": [], + "workspaces": [], + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Failed to access scan path: /nonexistent/path. Error: ENOENT: no such file or directory, stat '/nonexistent/path'" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/discover-projs--success.json b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/discover-projs--success.json new file mode 100644 index 000000000..77ed3c40a --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/discover-projs--success.json @@ -0,0 +1,32 @@ +{ + "schema": "xcodebuildmcp.output.project-list", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "projectCount": 1, + "workspaceCount": 1, + "maxDepth": 3 + }, + "artifacts": { + "workspaceRoot": "/example_projects/iOS_Calculator", + "scanPath": "example_projects/iOS_Calculator" + }, + "projects": [ + { + "path": "example_projects/iOS_Calculator/CalculatorApp.xcodeproj" + } + ], + "workspaces": [ + { + "path": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" + } + ] + }, + "nextSteps": [ + "Save discovered project/workspace as session defaults: session_set_defaults()", + "Build and run once defaults are set: build_run_sim()" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-app-bundle-id--error-missing-app.json b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-app-bundle-id--error-missing-app.json new file mode 100644 index 000000000..df28e89f6 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-app-bundle-id--error-missing-app.json @@ -0,0 +1,19 @@ +{ + "schema": "xcodebuildmcp.output.bundle-id", + "schemaVersion": "2", + "didError": true, + "error": "Failed to get bundle ID.", + "data": { + "artifacts": { + "appPath": "/nonexistent/path/Fake.app" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "File not found: '/nonexistent/path/Fake.app'. Please check the path and try again." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-app-bundle-id--success.json b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-app-bundle-id--success.json new file mode 100644 index 000000000..091f021be --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-app-bundle-id--success.json @@ -0,0 +1,18 @@ +{ + "schema": "xcodebuildmcp.output.bundle-id", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "artifacts": { + "appPath": "/BundleTest.app", + "bundleId": "com.test.snapshot" + } + }, + "nextSteps": [ + "Install on simulator: install_app_sim({ simulatorId: \"SIMULATOR_UUID\", appPath: \"/BundleTest.app\" })", + "Launch on simulator: launch_app_sim({ simulatorId: \"SIMULATOR_UUID\", bundleId: \"com.test.snapshot\" })", + "Install on device: install_app_device({ deviceId: \"DEVICE_UDID\", appPath: \"/BundleTest.app\" })", + "Launch on device: launch_app_device({ deviceId: \"DEVICE_UDID\", bundleId: \"com.test.snapshot\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-macos-bundle-id--error-missing-app.json b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-macos-bundle-id--error-missing-app.json new file mode 100644 index 000000000..590082ed6 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-macos-bundle-id--error-missing-app.json @@ -0,0 +1,19 @@ +{ + "schema": "xcodebuildmcp.output.bundle-id", + "schemaVersion": "2", + "didError": true, + "error": "Failed to get macOS bundle ID.", + "data": { + "artifacts": { + "appPath": "/nonexistent/path/Fake.app" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "File not found: '/nonexistent/path/Fake.app'. Please check the path and try again." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/json/project-discovery/get-macos-bundle-id--success.json b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-macos-bundle-id--success.json similarity index 52% rename from src/snapshot-tests/__fixtures__/json/project-discovery/get-macos-bundle-id--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-macos-bundle-id--success.json index 125a0b2f9..071c70171 100644 --- a/src/snapshot-tests/__fixtures__/json/project-discovery/get-macos-bundle-id--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/get-macos-bundle-id--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.bundle-id", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -8,5 +8,9 @@ "appPath": "/BundleTest.app", "bundleId": "com.test.snapshot" } - } + }, + "nextSteps": [ + "Launch the app: launch_mac_app({ appPath: \"/BundleTest.app\" })", + "Build again: build_macos({ scheme: \"SCHEME_NAME\" })" + ] } diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/list-schemes--error-invalid-workspace.json b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/list-schemes--error-invalid-workspace.json new file mode 100644 index 000000000..c61e6b5b6 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/list-schemes--error-invalid-workspace.json @@ -0,0 +1,20 @@ +{ + "schema": "xcodebuildmcp.output.scheme-list", + "schemaVersion": "2", + "didError": true, + "error": "Failed to list schemes.", + "data": { + "artifacts": { + "workspacePath": "/nonexistent/path/Fake.xcworkspace" + }, + "schemes": [], + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "'/nonexistent/path/Fake.xcworkspace' does not exist." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/list-schemes--success.json b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/list-schemes--success.json new file mode 100644 index 000000000..3e0e30405 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/list-schemes--success.json @@ -0,0 +1,21 @@ +{ + "schema": "xcodebuildmcp.output.scheme-list", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "artifacts": { + "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace" + }, + "schemes": [ + "CalculatorApp", + "CalculatorAppFeature" + ] + }, + "nextSteps": [ + "Build for macOS: build_macos({ workspacePath: \"example_projects/iOS_Calculator/CalculatorApp.xcworkspace\", scheme: \"CalculatorApp\" })", + "Build and run on iOS Simulator (default for run intent): build_run_sim({ workspacePath: \"example_projects/iOS_Calculator/CalculatorApp.xcworkspace\", scheme: \"CalculatorApp\", simulatorName: \"iPhone 17\" })", + "Build for iOS Simulator (compile-only): build_sim({ workspacePath: \"example_projects/iOS_Calculator/CalculatorApp.xcworkspace\", scheme: \"CalculatorApp\", simulatorName: \"iPhone 17\" })", + "Show build settings: show_build_settings({ workspacePath: \"example_projects/iOS_Calculator/CalculatorApp.xcworkspace\", scheme: \"CalculatorApp\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/show-build-settings--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/show-build-settings--error-wrong-scheme.json new file mode 100644 index 000000000..830b4ed4b --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/show-build-settings--error-wrong-scheme.json @@ -0,0 +1,21 @@ +{ + "schema": "xcodebuildmcp.output.build-settings", + "schemaVersion": "2", + "didError": true, + "error": "Failed to show build settings.", + "data": { + "artifacts": { + "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", + "scheme": "NONEXISTENT" + }, + "entries": [], + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The workspace named \"CalculatorApp\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the workspace." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/json/project-discovery/show-build-settings--success.json b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/show-build-settings--success.json similarity index 99% rename from src/snapshot-tests/__fixtures__/json/project-discovery/show-build-settings--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/project-discovery/show-build-settings--success.json index c7a67f6a0..11c12084b 100644 --- a/src/snapshot-tests/__fixtures__/json/project-discovery/show-build-settings--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/show-build-settings--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.build-settings", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -2422,5 +2422,10 @@ "value": "normal" } ] - } + }, + "nextSteps": [ + "Build for macOS: build_macos({ workspacePath: \"example_projects/iOS_Calculator/CalculatorApp.xcworkspace\", scheme: \"CalculatorApp\" })", + "Build for iOS Simulator: build_sim({ workspacePath: \"example_projects/iOS_Calculator/CalculatorApp.xcworkspace\", scheme: \"CalculatorApp\", simulatorName: \"iPhone 17\" })", + "List schemes: list_schemes({ workspacePath: \"example_projects/iOS_Calculator/CalculatorApp.xcworkspace\" })" + ] } diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-ios--error-existing.json b/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-ios--error-existing.json new file mode 100644 index 000000000..4a3c9d9de --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-ios--error-existing.json @@ -0,0 +1,24 @@ +{ + "schema": "xcodebuildmcp.output.scaffold-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to scaffold project.", + "data": { + "summary": { + "status": "FAILED", + "platform": "iOS" + }, + "artifacts": { + "projectName": "SnapshotTestApp", + "outputPath": "/ios-existing" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Xcode project files already exist in /ios-existing" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-ios--success.json b/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-ios--success.json new file mode 100644 index 000000000..79ca4342d --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-ios--success.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.scaffold-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "platform": "iOS" + }, + "artifacts": { + "projectName": "SnapshotTestApp", + "outputPath": "/ios", + "workspacePath": "/ios/SnapshotTestApp.xcworkspace" + } + }, + "nextSteps": [ + "Important: Before working on the project make sure to read the README.md file in the workspace root directory.", + "Build for simulator: build_sim({ workspacePath: \"/ios/SnapshotTestApp.xcworkspace\", scheme: \"SnapshotTestApp\", simulatorName: \"iPhone 17\" })", + "Build and run on simulator: build_run_sim({ workspacePath: \"/ios/SnapshotTestApp.xcworkspace\", scheme: \"SnapshotTestApp\", simulatorName: \"iPhone 17\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-macos--error-existing.json b/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-macos--error-existing.json new file mode 100644 index 000000000..17f17754f --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-macos--error-existing.json @@ -0,0 +1,24 @@ +{ + "schema": "xcodebuildmcp.output.scaffold-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to scaffold project.", + "data": { + "summary": { + "status": "FAILED", + "platform": "macOS" + }, + "artifacts": { + "projectName": "SnapshotTestMacApp", + "outputPath": "/macos-existing" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Xcode project files already exist in /macos-existing" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-macos--success.json b/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-macos--success.json new file mode 100644 index 000000000..dce9bb7a1 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-scaffolding/scaffold-macos--success.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.scaffold-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "platform": "macOS" + }, + "artifacts": { + "projectName": "SnapshotTestMacApp", + "outputPath": "/macos", + "workspacePath": "/macos/SnapshotTestMacApp.xcworkspace" + } + }, + "nextSteps": [ + "Important: Before working on the project make sure to read the README.md file in the workspace root directory.", + "Build for macOS: build_macos({ workspacePath: \"/macos/SnapshotTestMacApp.xcworkspace\", scheme: \"SnapshotTestMacApp\" })", + "Build & Run on macOS: build_run_macos({ workspacePath: \"/macos/SnapshotTestMacApp.xcworkspace\", scheme: \"SnapshotTestMacApp\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/json/session-management/session-clear-defaults--success.json b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-clear-defaults--success.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/session-management/session-clear-defaults--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/session-management/session-clear-defaults--success.json index 8737fde6a..6723b2e64 100644 --- a/src/snapshot-tests/__fixtures__/json/session-management/session-clear-defaults--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-clear-defaults--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.session-defaults", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/session-management/session-set-defaults--scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-set-defaults--scheme.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/session-management/session-set-defaults--scheme.json rename to src/snapshot-tests/__fixtures__/mcp/json/session-management/session-set-defaults--scheme.json index 5e3508a05..f3edab992 100644 --- a/src/snapshot-tests/__fixtures__/json/session-management/session-set-defaults--scheme.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-set-defaults--scheme.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.session-defaults", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/session-management/session-set-defaults--success.json b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-set-defaults--success.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/session-management/session-set-defaults--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/session-management/session-set-defaults--success.json index f33b1b081..39125735e 100644 --- a/src/snapshot-tests/__fixtures__/json/session-management/session-set-defaults--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-set-defaults--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.session-defaults", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/session-management/session-show-defaults--empty.json b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-show-defaults--empty.json similarity index 96% rename from src/snapshot-tests/__fixtures__/json/session-management/session-show-defaults--empty.json rename to src/snapshot-tests/__fixtures__/mcp/json/session-management/session-show-defaults--empty.json index 7c59741d1..283e872c3 100644 --- a/src/snapshot-tests/__fixtures__/json/session-management/session-show-defaults--empty.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-show-defaults--empty.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.session-defaults", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/session-management/session-show-defaults--success.json b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-show-defaults--success.json similarity index 98% rename from src/snapshot-tests/__fixtures__/json/session-management/session-show-defaults--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/session-management/session-show-defaults--success.json index c0fdc3fe2..1984cb7bf 100644 --- a/src/snapshot-tests/__fixtures__/json/session-management/session-show-defaults--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-show-defaults--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.session-defaults", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/session-management/session-sync-xcode-defaults--success.json b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-sync-xcode-defaults--success.json similarity index 98% rename from src/snapshot-tests/__fixtures__/json/session-management/session-sync-xcode-defaults--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/session-management/session-sync-xcode-defaults--success.json index 05a1a6196..10aaf1581 100644 --- a/src/snapshot-tests/__fixtures__/json/session-management/session-sync-xcode-defaults--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-sync-xcode-defaults--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.session-defaults", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/session-management/session-use-defaults-profile--persist-success.json b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-use-defaults-profile--persist-success.json similarity index 89% rename from src/snapshot-tests/__fixtures__/json/session-management/session-use-defaults-profile--persist-success.json rename to src/snapshot-tests/__fixtures__/mcp/json/session-management/session-use-defaults-profile--persist-success.json index 0ba2023a3..2563a3eef 100644 --- a/src/snapshot-tests/__fixtures__/json/session-management/session-use-defaults-profile--persist-success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-use-defaults-profile--persist-success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.session-profile", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/json/session-management/session-use-defaults-profile--success.json b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-use-defaults-profile--success.json similarity index 88% rename from src/snapshot-tests/__fixtures__/json/session-management/session-use-defaults-profile--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/session-management/session-use-defaults-profile--success.json index d38c34e39..6c8cab37a 100644 --- a/src/snapshot-tests/__fixtures__/json/session-management/session-use-defaults-profile--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/session-management/session-use-defaults-profile--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.session-profile", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/boot--error-invalid-id.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/boot--error-invalid-id.json new file mode 100644 index 000000000..63f3bcfe3 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/boot--error-invalid-id.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Boot simulator operation failed.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "boot" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Invalid device or device pair: " + } + ] + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/boot--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/boot--success.json new file mode 100644 index 000000000..666a11642 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/boot--success.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "boot" + }, + "artifacts": { + "simulatorId": "" + } + }, + "nextSteps": [ + "Open the Simulator app (makes it visible): open_sim()", + "Install an app: install_app_sim({ simulatorId: \"\", appPath: \"PATH_TO_YOUR_APP\" })", + "Launch an app: launch_app_sim({ simulatorId: \"\", bundleId: \"YOUR_APP_BUNDLE_ID\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/erase--error-invalid-id.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/erase--error-invalid-id.json new file mode 100644 index 000000000..8f59ba610 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/erase--error-invalid-id.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to erase simulator.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "erase" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Invalid device: " + } + ] + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/boot--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/erase--success.json similarity index 84% rename from src/snapshot-tests/__fixtures__/json/simulator-management/boot--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/simulator-management/erase--success.json index 81734db60..9606b859e 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/boot--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/erase--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -8,7 +8,7 @@ "status": "SUCCEEDED" }, "action": { - "type": "boot" + "type": "erase" }, "artifacts": { "simulatorId": "" diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/list--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/list--success.json similarity index 84% rename from src/snapshot-tests/__fixtures__/json/simulator-management/list--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/simulator-management/list--success.json index 521fcfb0f..b7533d966 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/list--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/list--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-list", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -83,5 +83,11 @@ "runtime": "iOS 26.4" } ] - } + }, + "nextSteps": [ + "Boot a simulator: boot_sim({ simulatorId: \"UUID_FROM_ABOVE\" })", + "Open the simulator UI: open_sim()", + "Build for simulator: build_sim({ scheme: \"YOUR_SCHEME\", simulatorId: \"UUID_FROM_ABOVE\" })", + "Get app path: get_sim_app_path({ scheme: \"YOUR_SCHEME\", platform: \"iOS Simulator\", simulatorId: \"UUID_FROM_ABOVE\" })" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/simulator-management/open--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/open--success.json similarity index 58% rename from src/snapshot-tests/__fixtures__/json/simulator-management/open--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/simulator-management/open--success.json index 32cd45830..9574a0937 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator-management/open--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/open--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-action-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -10,5 +10,8 @@ "action": { "type": "open" } - } + }, + "nextSteps": [ + "Boot a simulator for manual workflows: boot_sim({ simulatorId: \"UUID_FROM_LIST_SIMS\" })" + ] } diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/reset-location--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/reset-location--error-invalid-simulator.json new file mode 100644 index 000000000..9a64158aa --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/reset-location--error-invalid-simulator.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to reset simulator location.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "reset-location" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Invalid device: " + } + ] + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/reset-location--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/reset-location--success.json new file mode 100644 index 000000000..eded272fe --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/reset-location--success.json @@ -0,0 +1,17 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "reset-location" + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-appearance--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-appearance--error-invalid-simulator.json new file mode 100644 index 000000000..633d3ebc2 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-appearance--error-invalid-simulator.json @@ -0,0 +1,26 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to set simulator appearance.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "set-appearance", + "appearance": "dark" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Invalid device: " + } + ] + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-appearance--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-appearance--success.json new file mode 100644 index 000000000..8adae9e09 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-appearance--success.json @@ -0,0 +1,18 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "set-appearance", + "appearance": "dark" + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-location--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-location--error-invalid-simulator.json new file mode 100644 index 000000000..4cfae5223 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-location--error-invalid-simulator.json @@ -0,0 +1,29 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to set simulator location.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "set-location", + "coordinates": { + "latitude": 37.7749, + "longitude": -122.4194 + } + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Invalid device: " + } + ] + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-location--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-location--success.json new file mode 100644 index 000000000..935138689 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/set-location--success.json @@ -0,0 +1,21 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "set-location", + "coordinates": { + "latitude": 37.7749, + "longitude": -122.4194 + } + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/statusbar--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/statusbar--error-invalid-simulator.json new file mode 100644 index 000000000..3c3bb7f1c --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/statusbar--error-invalid-simulator.json @@ -0,0 +1,26 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to set status bar.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "statusbar", + "dataNetwork": "wifi" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Invalid device: " + } + ] + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/statusbar--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/statusbar--success.json new file mode 100644 index 000000000..00a1aaae3 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/statusbar--success.json @@ -0,0 +1,18 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "statusbar", + "dataNetwork": "wifi" + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.json new file mode 100644 index 000000000..4e3c85068 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to toggle hardware keyboard.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "toggle-connect-hardware-keyboard" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Simulator not found. Use list_sims to see available simulators." + } + ] + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-connect-hardware-keyboard--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-connect-hardware-keyboard--success.json new file mode 100644 index 000000000..01c903587 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-connect-hardware-keyboard--success.json @@ -0,0 +1,17 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "toggle-connect-hardware-keyboard" + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-software-keyboard--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-software-keyboard--error-invalid-simulator.json new file mode 100644 index 000000000..c6d2da9aa --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-software-keyboard--error-invalid-simulator.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to toggle software keyboard.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "toggle-software-keyboard" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Simulator not found. Use list_sims to see available simulators." + } + ] + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-software-keyboard--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-software-keyboard--success.json new file mode 100644 index 000000000..0970db6df --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator-management/toggle-software-keyboard--success.json @@ -0,0 +1,17 @@ +{ + "schema": "xcodebuildmcp.output.simulator-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "toggle-software-keyboard" + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/build--error-compiler.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build--error-compiler.json new file mode 100644 index 000000000..19d7929c4 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build--error-compiler.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "simulator" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_sim__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "cannot convert value of type 'String' to specified type 'Int'", + "location": "/example_projects/iOS_Calculator/CalculatorApp/CalculatorApp.swift:33" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/build--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build--error-wrong-scheme.json new file mode 100644 index 000000000..c0c6d8f27 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build--error-wrong-scheme.json @@ -0,0 +1,24 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "simulator" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_sim__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The workspace named \"CalculatorApp\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the workspace." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/build--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build--success.json new file mode 100644 index 000000000..79e2ad1cf --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build--success.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "target": "simulator" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_sim__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + }, + "nextSteps": [ + "Get built app path in simulator derived data: get_sim_app_path({ simulatorName: \"iPhone 17\", scheme: \"CalculatorApp\", platform: \"iOS Simulator\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--error-compiler.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--error-compiler.json new file mode 100644 index 000000000..c9d9b9601 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--error-compiler.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.build-run-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "simulator" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_sim__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "cannot convert value of type 'String' to specified type 'Int'", + "location": "/example_projects/iOS_Calculator/CalculatorApp/CalculatorApp.swift:33" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--error-wrong-scheme.json new file mode 100644 index 000000000..e838595d8 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--error-wrong-scheme.json @@ -0,0 +1,24 @@ +{ + "schema": "xcodebuildmcp.output.build-run-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "simulator" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_sim__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The workspace named \"CalculatorApp\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the workspace." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--success.json new file mode 100644 index 000000000..9479c0fac --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/build-and-run--success.json @@ -0,0 +1,29 @@ +{ + "schema": "xcodebuildmcp.output.build-run-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "target": "simulator" + }, + "artifacts": { + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app", + "bundleId": "io.sentry.calculatorapp", + "processId": 99999, + "simulatorId": "", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_sim__pid.log", + "runtimeLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/io.sentry.calculatorapp__pid.log", + "osLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/io.sentry.calculatorapp_oslog__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + }, + "nextSteps": [ + "Stop app in simulator: stop_app_sim({ simulatorId: \"\", bundleId: \"io.sentry.calculatorapp\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/get-app-path--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/get-app-path--error-wrong-scheme.json new file mode 100644 index 000000000..17afbf29a --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/get-app-path--error-wrong-scheme.json @@ -0,0 +1,20 @@ +{ + "schema": "xcodebuildmcp.output.app-path", + "schemaVersion": "2", + "didError": true, + "error": "Failed to get app path.", + "data": { + "summary": { + "status": "FAILED", + "target": "simulator" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The workspace named \"CalculatorApp\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the workspace." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/get-app-path--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/get-app-path--success.json new file mode 100644 index 000000000..166c39ed8 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/get-app-path--success.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.app-path", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "target": "simulator", + "durationMs": 1234 + }, + "artifacts": { + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app" + } + }, + "nextSteps": [ + "Get bundle ID: get_app_bundle_id({ appPath: \"~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app\" })", + "Boot simulator: boot_sim({ simulatorId: \"SIMULATOR_UUID\" })", + "Install app: install_app_sim({ simulatorId: \"SIMULATOR_UUID\", appPath: \"~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app\" })", + "Launch app: launch_app_sim({ simulatorId: \"SIMULATOR_UUID\", bundleId: \"BUNDLE_ID\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/install--error-invalid-app.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/install--error-invalid-app.json new file mode 100644 index 000000000..f00fa27d3 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/install--error-invalid-app.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.install-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to install app.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "simulatorId": "", + "appPath": "/NotAnApp.app" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "An error was encountered processing the command (domain=IXErrorDomain, code=13):\nSimulator device failed to install the application.\nMissing bundle ID.\nUnderlying error (domain=IXErrorDomain, code=13):\n\tFailed to get bundle ID from /NotAnApp.app\n\tMissing bundle ID." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/install--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/install--success.json new file mode 100644 index 000000000..357863899 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/install--success.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.install-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "artifacts": { + "simulatorId": "", + "appPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/DerivedData/CalculatorApp-/Build/Products/Debug-iphonesimulator/CalculatorApp.app" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + }, + "nextSteps": [ + "Open the Simulator app: open_sim()", + "Launch the app: launch_app_sim({ simulatorId: \"\", bundleId: \"io.sentry.calculatorapp\" })" + ] +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/launch-app--error-not-installed.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/launch-app--error-not-installed.json new file mode 100644 index 000000000..5ce0565e3 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/launch-app--error-not-installed.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.launch-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to launch app.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "simulatorId": "", + "bundleId": "com.nonexistent.app" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "App is not installed on the simulator. Please use install_app_sim before launching. Workflow: build -> install -> launch." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/json/simulator/launch-app--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/launch-app--success.json similarity index 75% rename from src/snapshot-tests/__fixtures__/json/simulator/launch-app--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/simulator/launch-app--success.json index a423c45e3..6d864eea0 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/launch-app--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/launch-app--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.launch-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -18,5 +18,9 @@ "warnings": [], "errors": [] } - } + }, + "nextSteps": [ + "Open Simulator app to see it: open_sim()", + "Stop app in simulator: stop_app_sim({ simulatorId: \"\", bundleId: \"io.sentry.calculatorapp\" })" + ] } diff --git a/src/snapshot-tests/__fixtures__/json/simulator/list--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/list--success.json similarity index 84% rename from src/snapshot-tests/__fixtures__/json/simulator/list--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/simulator/list--success.json index 521fcfb0f..b7533d966 100644 --- a/src/snapshot-tests/__fixtures__/json/simulator/list--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/list--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.simulator-list", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -83,5 +83,11 @@ "runtime": "iOS 26.4" } ] - } + }, + "nextSteps": [ + "Boot a simulator: boot_sim({ simulatorId: \"UUID_FROM_ABOVE\" })", + "Open the simulator UI: open_sim()", + "Build for simulator: build_sim({ scheme: \"YOUR_SCHEME\", simulatorId: \"UUID_FROM_ABOVE\" })", + "Get app path: get_sim_app_path({ scheme: \"YOUR_SCHEME\", platform: \"iOS Simulator\", simulatorId: \"UUID_FROM_ABOVE\" })" + ] } diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/screenshot--error-invalid-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/screenshot--error-invalid-simulator.json new file mode 100644 index 000000000..dfe05470b --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/screenshot--error-invalid-simulator.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.capture-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to capture screenshot.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "Failed to capture screenshot: Invalid device: " + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/screenshot--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/screenshot--success.json new file mode 100644 index 000000000..9c30073d0 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/screenshot--success.json @@ -0,0 +1,20 @@ +{ + "schema": "xcodebuildmcp.output.capture-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "artifacts": { + "simulatorId": "", + "screenshotPath": "" + }, + "capture": { + "format": "image/jpeg", + "width": 368, + "height": 800 + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/stop--error-no-app.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/stop--error-no-app.json new file mode 100644 index 000000000..c9fb458a5 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/stop--error-no-app.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.stop-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to stop app.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "simulatorId": "", + "bundleId": "com.nonexistent.app" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):\nSimulator device failed to terminate com.nonexistent.app.\nfound nothing to terminate\nUnderlying error (domain=NSPOSIXErrorDomain, code=3):\n\tThe request to terminate \"com.nonexistent.app\" failed. found nothing to terminate\n\tfound nothing to terminate" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/stop--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/stop--success.json new file mode 100644 index 000000000..f29c060ec --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/stop--success.json @@ -0,0 +1,19 @@ +{ + "schema": "xcodebuildmcp.output.stop-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "artifacts": { + "simulatorId": "", + "bundleId": "io.sentry.calculatorapp" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--error-compiler.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--error-compiler.json new file mode 100644 index 000000000..8bc0b483f --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--error-compiler.json @@ -0,0 +1,37 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "simulator" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_sim__pid.log" + }, + "tests": { + "selected": [ + "CalculatorAppTests/CalculatorAppTests/testAddition" + ], + "discovered": { + "total": 1, + "items": [ + "CalculatorAppTests/CalculatorAppTests/testAddition" + ] + } + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "cannot convert value of type 'String' to specified type 'Int'", + "location": "/example_projects/iOS_Calculator/CalculatorApp/CalculatorApp.swift:33" + } + ], + "testFailures": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--error-wrong-scheme.json new file mode 100644 index 000000000..8658e3ec8 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--error-wrong-scheme.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "simulator" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_sim__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "The workspace named \"CalculatorApp\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the workspace." + } + ], + "testFailures": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--failure.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--failure.json new file mode 100644 index 000000000..100b6c7ef --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--failure.json @@ -0,0 +1,78 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "counts": { + "passed": 54, + "failed": 3, + "skipped": 0 + }, + "target": "simulator" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_sim__pid.log", + "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_sim__pid.xcresult" + }, + "tests": { + "discovered": { + "total": 57, + "items": [ + "CalculatorAppFeatureTests/CalculatorBasicTests/testClear", + "CalculatorAppFeatureTests/CalculatorBasicTests/testInitialState", + "CalculatorAppFeatureTests/CalculatorBasicTests/testIntentionalFailure", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testChainCalculations", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testComplexCalculation", + "CalculatorAppFeatureTests/CalculatorIntegrationTests/testExpressionDisplay" + ] + } + }, + "diagnostics": { + "warnings": [], + "errors": [], + "testFailures": [ + { + "suite": "(Unknown Suite)", + "test": "This test should fail to verify error reporting", + "message": "Expectation failed: (calculator.display → \"0\") == \"999\"\n// This test is designed to fail to test error reporting\nThis should fail - display should be 0, not 999", + "location": "CalculatorServiceTests.swift:37" + }, + { + "suite": "CalculatorAppTests", + "test": "testCalculatorServiceFailure", + "message": "XCTAssertEqual failed: (\"0\") is not equal to (\"999\") - This test should fail - display should be 0, not 999", + "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:52" + }, + { + "suite": "IntentionalFailureTests", + "test": "test", + "message": "XCTAssertTrue failed - This test should fail to verify error reporting", + "location": "/example_projects/iOS_Calculator/CalculatorAppTests/CalculatorAppTests.swift:286" + } + ] + }, + "testCases": [ + { + "test": "This test should fail to verify error reporting", + "status": "failed", + "durationMs": 0 + }, + { + "suite": "CalculatorAppTests", + "test": "testCalculatorServiceFailure", + "status": "failed", + "durationMs": 0 + }, + { + "suite": "IntentionalFailureTests", + "test": "test", + "status": "failed", + "durationMs": 0 + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--success.json b/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--success.json new file mode 100644 index 000000000..5dabc5eb5 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/simulator/test--success.json @@ -0,0 +1,46 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "counts": { + "passed": 1, + "failed": 0, + "skipped": 0 + }, + "target": "simulator" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/test_sim__pid.log", + "xcresultPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/result-bundles/test_sim__pid.xcresult" + }, + "tests": { + "selected": [ + "CalculatorAppTests/CalculatorAppTests/testAddition" + ], + "discovered": { + "total": 1, + "items": [ + "CalculatorAppTests/CalculatorAppTests/testAddition" + ] + } + }, + "diagnostics": { + "warnings": [], + "errors": [], + "testFailures": [] + }, + "testCases": [ + { + "suite": "CalculatorAppTests", + "test": "testAddition", + "status": "passed", + "durationMs": 0 + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/build--error-bad-path.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/build--error-bad-path.json new file mode 100644 index 000000000..e4f833083 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/build--error-bad-path.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "swift-package" + }, + "artifacts": { + "packagePath": "/example_projects/NONEXISTENT", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_spm__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "chdir error: No such file or directory (2): /example_projects/NONEXISTENT" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/build--success.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/build--success.json new file mode 100644 index 000000000..09e013315 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/build--success.json @@ -0,0 +1,21 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "target": "swift-package" + }, + "artifacts": { + "packagePath": "/example_projects/spm", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_spm__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/clean--error-bad-path.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/clean--error-bad-path.json new file mode 100644 index 000000000..7f29e308a --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/clean--error-bad-path.json @@ -0,0 +1,23 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": true, + "error": "Swift package clean failed.", + "data": { + "summary": { + "status": "FAILED", + "target": "swift-package" + }, + "artifacts": { + "packagePath": "/example_projects/NONEXISTENT" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "chdir error: No such file or directory (2): /example_projects/NONEXISTENT" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/clean--success.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/clean--success.json new file mode 100644 index 000000000..75b69af0e --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/clean--success.json @@ -0,0 +1,19 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "target": "swift-package" + }, + "artifacts": { + "packagePath": "/example_projects/spm" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/list--no-processes.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/list--no-processes.json new file mode 100644 index 000000000..d3129737f --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/list--no-processes.json @@ -0,0 +1,12 @@ +{ + "schema": "xcodebuildmcp.output.process-list", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "runningProcessCount": 0 + }, + "processes": [] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/list--success.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/list--success.json new file mode 100644 index 000000000..82f194fc5 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/list--success.json @@ -0,0 +1,21 @@ +{ + "schema": "xcodebuildmcp.output.process-list", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "runningProcessCount": 1 + }, + "processes": [ + { + "name": "spm", + "processId": 99999, + "uptimeSeconds": 3600, + "artifacts": { + "packagePath": "/example_projects/spm" + } + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/run--error-bad-executable.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/run--error-bad-executable.json new file mode 100644 index 000000000..6f3b6f6db --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/run--error-bad-executable.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.build-run-result", + "schemaVersion": "2", + "didError": true, + "error": "Build failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "swift-package" + }, + "artifacts": { + "packagePath": "/example_projects/spm", + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_spm__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "no executable product named 'nonexistent-executable'" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/run--success.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/run--success.json new file mode 100644 index 000000000..92c76ab25 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/run--success.json @@ -0,0 +1,40 @@ +{ + "schema": "xcodebuildmcp.output.build-run-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "target": "swift-package" + }, + "artifacts": { + "packagePath": "/example_projects/spm", + "executablePath": "/example_projects/spm/.build/arm64-apple-macosx/debug/spm", + "processId": 99999, + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_spm__pid.log" + }, + "output": { + "stdout": [ + "Hello, world!" + ], + "stderr": [ + "Building for debugging...", + "[] Applying spm", + "[] Compiling spm main.swift", + "[] Emitting module spm", + "[] Linking spm", + "[] Write Objects.LinkFileList", + "[] Write sources", + "[] Write spm-entitlement.plist", + "[] Write swift-version--6988338F2F200930.txt", + "Build of product 'spm' complete! ()" + ] + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/stop--error-no-process.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/stop--error-no-process.json new file mode 100644 index 000000000..1107beade --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/stop--error-no-process.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.stop-result", + "schemaVersion": "2", + "didError": true, + "error": "Swift package stop failed.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "processId": 99999 + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "No running process found with PID 999999. Use swift_package_list to check active processes." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--error-bad-path.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--error-bad-path.json new file mode 100644 index 000000000..b9453a24a --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--error-bad-path.json @@ -0,0 +1,26 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "target": "swift-package" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/swift_package_test__pid.log", + "packagePath": "/example_projects/NONEXISTENT" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "chdir error: No such file or directory (2): /example_projects/NONEXISTENT" + } + ], + "testFailures": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--failure.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--failure.json new file mode 100644 index 000000000..8b68f052a --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--failure.json @@ -0,0 +1,52 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": true, + "error": "Tests failed", + "data": { + "summary": { + "status": "FAILED", + "durationMs": 1234, + "counts": { + "passed": 5, + "failed": 2, + "skipped": 0 + }, + "target": "swift-package" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/swift_package_test__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [], + "testFailures": [ + { + "suite": "CalculatorAppTests", + "test": "testCalculatorServiceFailure", + "message": "XCTAssertEqual failed: (\"0\") is not equal to (\"999\") - This test should fail - display should be 0, not 999", + "location": "/example_projects/spm/Tests/TestLibTests/SimpleTests.swift:49" + }, + { + "suite": "(Unknown Suite)", + "test": "test", + "message": "Expectation failed: Bool(false)\nTest failed", + "location": "SimpleTests.swift:57" + } + ] + }, + "testCases": [ + { + "test": "test", + "status": "failed", + "durationMs": 0 + }, + { + "suite": "CalculatorAppTests", + "test": "testCalculatorServiceFailure", + "status": "failed", + "durationMs": 0 + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--success.json b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--success.json new file mode 100644 index 000000000..6e493923d --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/test--success.json @@ -0,0 +1,33 @@ +{ + "schema": "xcodebuildmcp.output.test-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED", + "durationMs": 1234, + "counts": { + "passed": 1, + "failed": 0, + "skipped": 0 + }, + "target": "swift-package" + }, + "artifacts": { + "buildLogPath": "~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/swift_package_test__pid.log" + }, + "diagnostics": { + "warnings": [], + "errors": [], + "testFailures": [] + }, + "testCases": [ + { + "test": "Basic truth assertions", + "status": "passed", + "durationMs": 0 + } + ] + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/button--error-no-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/button--error-no-simulator.json new file mode 100644 index 000000000..4eb88bfb3 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/button--error-no-simulator.json @@ -0,0 +1,26 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to press button 'home'.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "button", + "button": "home" + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "CLIError(errorDescription: \"Simulator with UDID not found in set.\")" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/button--success.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/button--success.json new file mode 100644 index 000000000..7df9f68e4 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/button--success.json @@ -0,0 +1,18 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "button", + "button": "home" + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/gesture--error-no-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/gesture--error-no-simulator.json new file mode 100644 index 000000000..d83e0ab6e --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/gesture--error-no-simulator.json @@ -0,0 +1,26 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to execute gesture 'scroll-down'.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "gesture", + "gesture": "scroll-down" + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "CLIError(errorDescription: \"Simulator with UDID not found in set.\")" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/gesture--success.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/gesture--success.json new file mode 100644 index 000000000..39cb6883a --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/gesture--success.json @@ -0,0 +1,18 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "gesture", + "gesture": "scroll-down" + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-press--error-no-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-press--error-no-simulator.json new file mode 100644 index 000000000..27466bd7b --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-press--error-no-simulator.json @@ -0,0 +1,26 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to simulate key press (code: 4).", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "key-press", + "keyCode": 4 + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "CLIError(errorDescription: \"Simulator with UDID not found in set.\")" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-press--success.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-press--success.json new file mode 100644 index 000000000..bbfc05f0e --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-press--success.json @@ -0,0 +1,18 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "key-press", + "keyCode": 4 + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-sequence--error-no-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-sequence--error-no-simulator.json new file mode 100644 index 000000000..81e0e2fdc --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-sequence--error-no-simulator.json @@ -0,0 +1,30 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to execute key sequence.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "key-sequence", + "keyCodes": [ + 4, + 5, + 6 + ] + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "CLIError(errorDescription: \"Simulator with UDID not found in set.\")" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-sequence--success.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-sequence--success.json new file mode 100644 index 000000000..4ef507f23 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/key-sequence--success.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "key-sequence", + "keyCodes": [ + 4, + 5, + 6 + ] + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/long-press--error-no-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/long-press--error-no-simulator.json new file mode 100644 index 000000000..b75c46872 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/long-press--error-no-simulator.json @@ -0,0 +1,28 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to simulate long press at (100, 400).", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "long-press", + "x": 100, + "y": 400, + "durationMs": 500 + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "CLIError(errorDescription: \"Simulator with UDID not found in set.\")" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/long-press--success.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/long-press--success.json new file mode 100644 index 000000000..32a7bd325 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/long-press--success.json @@ -0,0 +1,28 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "long-press", + "x": 100, + "y": 400, + "durationMs": 500 + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [ + { + "message": "snapshot_ui has not been called yet. Consider using snapshot_ui for precise coordinates instead of guessing from screenshots." + } + ], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/snapshot-ui--error-no-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/snapshot-ui--error-no-simulator.json new file mode 100644 index 000000000..4e803b712 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/snapshot-ui--error-no-simulator.json @@ -0,0 +1,22 @@ +{ + "schema": "xcodebuildmcp.output.capture-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to get accessibility hierarchy.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "CLIError(errorDescription: \"Simulator with UDID not found in set.\")" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/json/ui-automation/snapshot-ui--success.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/snapshot-ui--success.json similarity index 98% rename from src/snapshot-tests/__fixtures__/json/ui-automation/snapshot-ui--success.json rename to src/snapshot-tests/__fixtures__/mcp/json/ui-automation/snapshot-ui--success.json index 4c80f145d..4b4de4898 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/snapshot-ui--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/snapshot-ui--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.capture-result", - "schemaVersion": "1", + "schemaVersion": "2", "didError": false, "error": null, "data": { @@ -499,5 +499,10 @@ } ] } - } + }, + "nextSteps": [ + "Refresh after layout changes: snapshot_ui({ simulatorId: \"\" })", + "Tap on element: tap({ simulatorId: \"\", x: 0, y: 0 })", + "Take screenshot for verification: screenshot({ simulatorId: \"\" })" + ] } diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/swipe--error-no-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/swipe--error-no-simulator.json new file mode 100644 index 000000000..6968362b0 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/swipe--error-no-simulator.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to simulate swipe.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "swipe" + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "CLIError(errorDescription: \"Simulator with UDID not found in set.\")" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/swipe--success.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/swipe--success.json new file mode 100644 index 000000000..d3a04cc16 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/swipe--success.json @@ -0,0 +1,33 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "swipe", + "from": { + "x": 200, + "y": 400 + }, + "to": { + "x": 200, + "y": 200 + } + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [ + { + "message": "snapshot_ui has not been called yet. Consider using snapshot_ui for precise coordinates instead of guessing from screenshots." + } + ], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/tap--error-no-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/tap--error-no-simulator.json new file mode 100644 index 000000000..00556fe82 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/tap--error-no-simulator.json @@ -0,0 +1,27 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to simulate tap at (100, 100).", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "tap", + "x": 100, + "y": 100 + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "CLIError(errorDescription: \"Simulator with UDID not found in set.\")" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/tap--success.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/tap--success.json new file mode 100644 index 000000000..fa6e9978e --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/tap--success.json @@ -0,0 +1,27 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "tap", + "x": 100, + "y": 400 + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [ + { + "message": "snapshot_ui has not been called yet. Consider using snapshot_ui for precise coordinates instead of guessing from screenshots." + } + ], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/touch--error-no-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/touch--error-no-simulator.json new file mode 100644 index 000000000..4cbcc83fb --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/touch--error-no-simulator.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to execute touch event.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "touch" + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "CLIError(errorDescription: \"Simulator with UDID not found in set.\")" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/touch--success.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/touch--success.json new file mode 100644 index 000000000..0e708ad44 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/touch--success.json @@ -0,0 +1,28 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "touch", + "event": "touch down+up", + "x": 100, + "y": 400 + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [ + { + "message": "snapshot_ui has not been called yet. Consider using snapshot_ui for precise coordinates instead of guessing from screenshots." + } + ], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/type-text--error-no-simulator.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/type-text--error-no-simulator.json new file mode 100644 index 000000000..30d9ab14d --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/type-text--error-no-simulator.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": true, + "error": "Failed to simulate text typing.", + "data": { + "summary": { + "status": "FAILED" + }, + "action": { + "type": "type-text" + }, + "artifacts": { + "simulatorId": "" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "CLIError(errorDescription: \"Simulator with UDID not found in set.\")" + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/type-text--success.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/type-text--success.json new file mode 100644 index 000000000..a2686f68c --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/type-text--success.json @@ -0,0 +1,17 @@ +{ + "schema": "xcodebuildmcp.output.ui-action-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "action": { + "type": "type-text" + }, + "artifacts": { + "simulatorId": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/utilities/clean--error-wrong-scheme.json b/src/snapshot-tests/__fixtures__/mcp/json/utilities/clean--error-wrong-scheme.json new file mode 100644 index 000000000..1385e9ba4 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/utilities/clean--error-wrong-scheme.json @@ -0,0 +1,25 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": true, + "error": "Clean failed.", + "data": { + "summary": { + "status": "FAILED" + }, + "artifacts": { + "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", + "scheme": "NONEXISTENT", + "configuration": "Debug", + "platform": "iOS" + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "xcodebuild: error: The workspace named \"CalculatorApp\" does not contain a scheme named \"NONEXISTENT\". The \"-list\" option can be used to find the names of the schemes in the workspace." + } + ] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/utilities/clean--success.json b/src/snapshot-tests/__fixtures__/mcp/json/utilities/clean--success.json new file mode 100644 index 000000000..05ccfeda8 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/utilities/clean--success.json @@ -0,0 +1,21 @@ +{ + "schema": "xcodebuildmcp.output.build-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "summary": { + "status": "SUCCEEDED" + }, + "artifacts": { + "workspacePath": "example_projects/iOS_Calculator/CalculatorApp.xcworkspace", + "scheme": "CalculatorApp", + "configuration": "Debug", + "platform": "iOS" + }, + "diagnostics": { + "warnings": [], + "errors": [] + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/documentation-search--success.json b/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/documentation-search--success.json new file mode 100644 index 000000000..48d791f32 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/documentation-search--success.json @@ -0,0 +1,14 @@ +{ + "schema": "xcodebuildmcp.output.xcode-bridge-call-result", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "remoteTool": "DocumentationSearch", + "succeeded": true, + "content": [], + "artifacts": { + "rawResponseJsonPath": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/list-tools--success.json b/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/list-tools--success.json new file mode 100644 index 000000000..f73bf9ba8 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/list-tools--success.json @@ -0,0 +1,12 @@ +{ + "schema": "xcodebuildmcp.output.xcode-bridge-tool-list", + "schemaVersion": "2", + "didError": false, + "error": null, + "data": { + "toolCount": 99999, + "artifacts": { + "rawResponseJsonPath": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/coverage/get-coverage-report--error-invalid-bundle.txt b/src/snapshot-tests/__fixtures__/mcp/text/coverage/get-coverage-report--error-invalid-bundle.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/coverage/get-coverage-report--error-invalid-bundle.txt rename to src/snapshot-tests/__fixtures__/mcp/text/coverage/get-coverage-report--error-invalid-bundle.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/coverage/get-coverage-report--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/coverage/get-coverage-report--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/coverage/get-coverage-report--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/coverage/get-coverage-report--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/coverage/get-file-coverage--error-invalid-bundle.txt b/src/snapshot-tests/__fixtures__/mcp/text/coverage/get-file-coverage--error-invalid-bundle.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/coverage/get-file-coverage--error-invalid-bundle.txt rename to src/snapshot-tests/__fixtures__/mcp/text/coverage/get-file-coverage--error-invalid-bundle.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/coverage/get-file-coverage--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/coverage/get-file-coverage--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/coverage/get-file-coverage--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/coverage/get-file-coverage--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/add-breakpoint--error-no-session.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/add-breakpoint--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/add-breakpoint--error-no-session.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/add-breakpoint--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/add-breakpoint--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/add-breakpoint--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/add-breakpoint--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/add-breakpoint--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/attach--error-no-process.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/attach--error-no-process.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/attach--error-no-process.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/attach--error-no-process.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/attach--success-continue.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/attach--success-continue.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/attach--success-continue.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/attach--success-continue.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/attach--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/attach--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/attach--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/attach--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/continue--error-no-session.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/continue--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/continue--error-no-session.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/continue--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/continue--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/continue--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/continue--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/continue--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/detach--error-no-session.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/detach--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/detach--error-no-session.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/detach--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/detach--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/detach--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/detach--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/detach--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/lldb-command--error-no-session.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/lldb-command--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/lldb-command--error-no-session.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/lldb-command--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/lldb-command--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/lldb-command--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/lldb-command--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/lldb-command--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/remove-breakpoint--error-no-session.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/remove-breakpoint--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/remove-breakpoint--error-no-session.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/remove-breakpoint--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/remove-breakpoint--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/remove-breakpoint--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/remove-breakpoint--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/remove-breakpoint--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/stack--error-no-session.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/stack--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/stack--error-no-session.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/stack--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/stack--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/stack--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/stack--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/stack--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/variables--error-no-session.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/variables--error-no-session.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/variables--error-no-session.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/variables--error-no-session.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/debugging/variables--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/debugging/variables--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/debugging/variables--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/debugging/variables--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/build--error-compiler.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/build--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/build--error-compiler.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/build--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/build--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/build--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/build--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/build--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/build--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/build--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/build--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/build--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/build-and-run--error-compiler.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/build-and-run--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/build-and-run--error-compiler.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/build-and-run--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/build-and-run--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/build-and-run--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/build-and-run--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/build-and-run--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/build-and-run--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/build-and-run--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/build-and-run--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/build-and-run--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/get-app-path--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/get-app-path--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/get-app-path--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/get-app-path--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/get-app-path--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/get-app-path--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/get-app-path--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/get-app-path--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/install--error-invalid-app.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/install--error-invalid-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/install--error-invalid-app.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/install--error-invalid-app.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/install--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/install--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/install--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/install--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/launch--error-invalid-bundle.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/launch--error-invalid-bundle.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/launch--error-invalid-bundle.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/launch--error-invalid-bundle.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/launch--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/launch--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/launch--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/launch--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/list--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/list--success.txt similarity index 97% rename from src/snapshot-tests/__fixtures__/mcp/device/list--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/list--success.txt index 1405e93f0..2e094c099 100644 --- a/src/snapshot-tests/__fixtures__/mcp/device/list--success.txt +++ b/src/snapshot-tests/__fixtures__/mcp/text/device/list--success.txt @@ -4,7 +4,7 @@ iOS Devices: 📱 [] Cameron’s iPhone 16 Pro Max - OS: 26.3.1 (a) + OS: 26.4.2 UDID: 📱 [] iPhone diff --git a/src/snapshot-tests/__fixtures__/mcp/device/stop--error-no-app.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/stop--error-no-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/stop--error-no-app.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/stop--error-no-app.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/stop--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/stop--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/stop--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/stop--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/test--error-compiler.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/test--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/test--error-compiler.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/test--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/test--failure.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/test--failure.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/test--failure.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/test--failure.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/device/test--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/test--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/device/test--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/device/test--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/build--error-compiler.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/build--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/build--error-compiler.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/build--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/build--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/build--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/build--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/build--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/build--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/build--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/build--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/build--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/build-and-run--error-compiler.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/build-and-run--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/build-and-run--error-compiler.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/build-and-run--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/build-and-run--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/build-and-run--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/build-and-run--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/build-and-run--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/build-and-run--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/build-and-run--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/build-and-run--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/build-and-run--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/get-app-path--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/get-app-path--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/get-app-path--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/get-app-path--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/get-app-path--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/get-app-path--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/get-app-path--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/get-app-path--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/get-macos-bundle-id--error-missing-app.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/get-macos-bundle-id--error-missing-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/get-macos-bundle-id--error-missing-app.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/get-macos-bundle-id--error-missing-app.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/get-macos-bundle-id--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/get-macos-bundle-id--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/get-macos-bundle-id--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/get-macos-bundle-id--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/launch--error-invalid-app.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/launch--error-invalid-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/launch--error-invalid-app.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/launch--error-invalid-app.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/launch--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/launch--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/launch--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/launch--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/stop--error-no-app.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/stop--error-no-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/stop--error-no-app.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/stop--error-no-app.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/stop--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/stop--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/stop--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/stop--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/test--error-compiler.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/test--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/test--error-compiler.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/test--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/test--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/test--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/test--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/test--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/test--failure.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/test--failure.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/test--failure.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/test--failure.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/macos/test--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/macos/test--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/macos/test--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/macos/test--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-discovery/discover-projs--error-invalid-root.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/discover-projs--error-invalid-root.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-discovery/discover-projs--error-invalid-root.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-discovery/discover-projs--error-invalid-root.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-discovery/discover-projs--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/discover-projs--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-discovery/discover-projs--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-discovery/discover-projs--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-discovery/get-app-bundle-id--error-missing-app.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-app-bundle-id--error-missing-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-discovery/get-app-bundle-id--error-missing-app.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-app-bundle-id--error-missing-app.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-discovery/get-app-bundle-id--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-app-bundle-id--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-discovery/get-app-bundle-id--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-app-bundle-id--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-discovery/get-macos-bundle-id--error-missing-app.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-macos-bundle-id--error-missing-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-discovery/get-macos-bundle-id--error-missing-app.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-macos-bundle-id--error-missing-app.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-discovery/get-macos-bundle-id--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-macos-bundle-id--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-discovery/get-macos-bundle-id--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-discovery/get-macos-bundle-id--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-discovery/list-schemes--error-invalid-workspace.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/list-schemes--error-invalid-workspace.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-discovery/list-schemes--error-invalid-workspace.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-discovery/list-schemes--error-invalid-workspace.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-discovery/list-schemes--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/list-schemes--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-discovery/list-schemes--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-discovery/list-schemes--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-discovery/show-build-settings--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/show-build-settings--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-discovery/show-build-settings--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-discovery/show-build-settings--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-discovery/show-build-settings--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/show-build-settings--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-discovery/show-build-settings--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-discovery/show-build-settings--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-scaffolding/scaffold-ios--error-existing.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-scaffolding/scaffold-ios--error-existing.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-scaffolding/scaffold-ios--error-existing.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-scaffolding/scaffold-ios--error-existing.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-scaffolding/scaffold-ios--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-scaffolding/scaffold-ios--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-scaffolding/scaffold-ios--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-scaffolding/scaffold-ios--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-scaffolding/scaffold-macos--error-existing.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-scaffolding/scaffold-macos--error-existing.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-scaffolding/scaffold-macos--error-existing.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-scaffolding/scaffold-macos--error-existing.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/project-scaffolding/scaffold-macos--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-scaffolding/scaffold-macos--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/project-scaffolding/scaffold-macos--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/project-scaffolding/scaffold-macos--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/resources/devices--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/resources/devices--success.txt similarity index 97% rename from src/snapshot-tests/__fixtures__/mcp/resources/devices--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/resources/devices--success.txt index 578860e97..04e5cac43 100644 --- a/src/snapshot-tests/__fixtures__/mcp/resources/devices--success.txt +++ b/src/snapshot-tests/__fixtures__/mcp/text/resources/devices--success.txt @@ -4,7 +4,7 @@ iOS Devices: 📱 [] Cameron’s iPhone 16 Pro Max - OS: 26.3.1 (a) + OS: 26.4.2 UDID: 📱 [] iPhone diff --git a/src/snapshot-tests/__fixtures__/mcp/resources/doctor--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/resources/doctor--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/resources/doctor--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/resources/doctor--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/resources/session-status--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/resources/session-status--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/resources/session-status--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/resources/session-status--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/resources/simulators--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/resources/simulators--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/resources/simulators--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/resources/simulators--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/session-management/session-clear-defaults--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/session-management/session-clear-defaults--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/session-management/session-clear-defaults--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/session-management/session-clear-defaults--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/session-management/session-set-defaults--scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/session-management/session-set-defaults--scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/session-management/session-set-defaults--scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/session-management/session-set-defaults--scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/session-management/session-set-defaults--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/session-management/session-set-defaults--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/session-management/session-set-defaults--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/session-management/session-set-defaults--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/session-management/session-show-defaults--empty.txt b/src/snapshot-tests/__fixtures__/mcp/text/session-management/session-show-defaults--empty.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/session-management/session-show-defaults--empty.txt rename to src/snapshot-tests/__fixtures__/mcp/text/session-management/session-show-defaults--empty.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/session-management/session-show-defaults--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/session-management/session-show-defaults--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/session-management/session-show-defaults--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/session-management/session-show-defaults--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/session-management/session-sync-xcode-defaults--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/session-management/session-sync-xcode-defaults--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/session-management/session-sync-xcode-defaults--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/session-management/session-sync-xcode-defaults--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/session-management/session-use-defaults-profile--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/session-management/session-use-defaults-profile--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/session-management/session-use-defaults-profile--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/session-management/session-use-defaults-profile--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/boot--error-invalid-id.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/boot--error-invalid-id.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/boot--error-invalid-id.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/boot--error-invalid-id.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/boot--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/boot--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/boot--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/boot--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/erase--error-invalid-id.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/erase--error-invalid-id.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/erase--error-invalid-id.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/erase--error-invalid-id.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/erase--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/erase--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/erase--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/erase--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/list--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/list--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/list--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/list--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/open--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/open--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/open--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/open--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/reset-location--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/reset-location--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/reset-location--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/reset-location--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/reset-location--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/reset-location--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/reset-location--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/reset-location--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/set-appearance--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/set-appearance--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/set-appearance--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/set-appearance--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/set-appearance--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/set-appearance--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/set-appearance--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/set-appearance--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/set-location--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/set-location--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/set-location--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/set-location--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/set-location--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/set-location--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/set-location--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/set-location--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/statusbar--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/statusbar--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/statusbar--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/statusbar--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/statusbar--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/statusbar--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/statusbar--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/statusbar--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/toggle-connect-hardware-keyboard--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/toggle-connect-hardware-keyboard--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/toggle-connect-hardware-keyboard--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/toggle-connect-hardware-keyboard--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/toggle-connect-hardware-keyboard--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/toggle-software-keyboard--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/toggle-software-keyboard--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/toggle-software-keyboard--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/toggle-software-keyboard--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator-management/toggle-software-keyboard--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator-management/toggle-software-keyboard--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator-management/toggle-software-keyboard--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator-management/toggle-software-keyboard--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/build--error-compiler.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/build--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/build--error-compiler.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/build--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/build--error-missing-params.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/build--error-missing-params.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/build--error-missing-params.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/build--error-missing-params.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/build--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/build--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/build--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/build--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/build--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/build--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/build--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/build--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/build-and-run--error-compiler.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/build-and-run--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/build-and-run--error-compiler.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/build-and-run--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/build-and-run--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/build-and-run--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/build-and-run--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/build-and-run--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/build-and-run--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/build-and-run--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/build-and-run--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/build-and-run--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/get-app-path--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/get-app-path--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/get-app-path--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/get-app-path--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/get-app-path--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/get-app-path--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/get-app-path--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/get-app-path--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/install--error-invalid-app.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/install--error-invalid-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/install--error-invalid-app.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/install--error-invalid-app.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/install--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/install--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/install--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/install--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/launch-app--error-not-installed.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/launch-app--error-not-installed.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/launch-app--error-not-installed.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/launch-app--error-not-installed.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/launch-app--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/launch-app--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/launch-app--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/launch-app--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/list--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/list--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/list--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/list--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/screenshot--error-invalid-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/screenshot--error-invalid-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/screenshot--error-invalid-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/screenshot--error-invalid-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/screenshot--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/screenshot--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/screenshot--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/screenshot--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/stop--error-no-app.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/stop--error-no-app.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/stop--error-no-app.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/stop--error-no-app.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/stop--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/stop--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/stop--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/stop--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/test--error-compiler.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/test--error-compiler.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/test--error-compiler.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/test--error-compiler.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/test--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/test--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/test--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/test--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/test--failure.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/test--failure.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/test--failure.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/test--failure.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/simulator/test--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/simulator/test--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/simulator/test--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/simulator/test--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/build--error-bad-path.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/build--error-bad-path.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/build--error-bad-path.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/build--error-bad-path.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/build--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/build--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/build--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/build--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/clean--error-bad-path.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/clean--error-bad-path.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/clean--error-bad-path.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/clean--error-bad-path.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/clean--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/clean--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/clean--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/clean--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/list--no-processes.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/list--no-processes.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/list--no-processes.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/list--no-processes.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/list--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/list--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/list--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/list--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/run--error-bad-executable.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/run--error-bad-executable.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/run--error-bad-executable.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/run--error-bad-executable.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/run--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/run--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/run--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/run--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/stop--error-no-process.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/stop--error-no-process.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/stop--error-no-process.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/stop--error-no-process.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/test--error-bad-path.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/test--error-bad-path.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/test--error-bad-path.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/test--error-bad-path.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/test--failure.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/test--failure.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/test--failure.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/test--failure.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/test--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/test--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/swift-package/test--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/swift-package/test--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/button--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/button--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/button--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/button--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/button--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/button--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/button--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/button--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/gesture--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/gesture--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/gesture--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/gesture--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/gesture--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/gesture--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/gesture--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/gesture--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/key-press--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/key-press--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/key-press--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/key-press--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/key-press--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/key-press--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/key-press--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/key-press--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/key-sequence--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/key-sequence--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/key-sequence--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/key-sequence--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/key-sequence--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/key-sequence--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/key-sequence--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/key-sequence--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/long-press--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/long-press--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/long-press--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/long-press--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/long-press--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/long-press--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/long-press--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/long-press--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/snapshot-ui--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/snapshot-ui--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/snapshot-ui--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/snapshot-ui--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/snapshot-ui--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/snapshot-ui--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/snapshot-ui--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/snapshot-ui--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/swipe--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/swipe--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/swipe--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/swipe--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/swipe--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/swipe--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/swipe--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/swipe--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/tap--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/tap--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/tap--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/tap--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/tap--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/tap--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/tap--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/tap--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/touch--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/touch--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/touch--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/touch--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/touch--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/touch--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/touch--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/touch--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/type-text--error-no-simulator.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/type-text--error-no-simulator.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/type-text--error-no-simulator.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/type-text--error-no-simulator.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/ui-automation/type-text--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/ui-automation/type-text--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/ui-automation/type-text--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/ui-automation/type-text--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/utilities/clean--error-wrong-scheme.txt b/src/snapshot-tests/__fixtures__/mcp/text/utilities/clean--error-wrong-scheme.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/utilities/clean--error-wrong-scheme.txt rename to src/snapshot-tests/__fixtures__/mcp/text/utilities/clean--error-wrong-scheme.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/utilities/clean--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/utilities/clean--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/utilities/clean--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/utilities/clean--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/xcode-ide/documentation-search--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/xcode-ide/documentation-search--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/xcode-ide/documentation-search--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/xcode-ide/documentation-search--success.txt diff --git a/src/snapshot-tests/__fixtures__/mcp/xcode-ide/list-tools--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/xcode-ide/list-tools--success.txt similarity index 100% rename from src/snapshot-tests/__fixtures__/mcp/xcode-ide/list-tools--success.txt rename to src/snapshot-tests/__fixtures__/mcp/text/xcode-ide/list-tools--success.txt diff --git a/src/snapshot-tests/__tests__/cli-json-fixture-parity.snapshot.test.ts b/src/snapshot-tests/__tests__/cli-json-fixture-parity.snapshot.test.ts new file mode 100644 index 000000000..98730adf9 --- /dev/null +++ b/src/snapshot-tests/__tests__/cli-json-fixture-parity.snapshot.test.ts @@ -0,0 +1,23 @@ +import { registerCoverageSnapshotSuite } from '../suites/coverage-suite.ts'; +import { registerDebuggingSnapshotSuite } from '../suites/debugging-suite.ts'; +import { registerDeviceSnapshotSuite } from '../suites/device-suite.ts'; +import { registerMacosSnapshotSuite } from '../suites/macos-suite.ts'; +import { registerProjectDiscoverySnapshotSuite } from '../suites/project-discovery-suite.ts'; +import { registerProjectScaffoldingSnapshotSuite } from '../suites/project-scaffolding-suite.ts'; +import { registerSimulatorManagementSnapshotSuite } from '../suites/simulator-management-suite.ts'; +import { registerSimulatorSnapshotSuite } from '../suites/simulator-suite.ts'; +import { registerSwiftPackageSnapshotSuite } from '../suites/swift-package-suite.ts'; +import { registerUiAutomationSnapshotSuite } from '../suites/ui-automation-suite.ts'; +import { registerUtilitiesSnapshotSuite } from '../suites/utilities-suite.ts'; + +registerCoverageSnapshotSuite('cli/json'); +registerDebuggingSnapshotSuite('cli/json'); +registerDeviceSnapshotSuite('cli/json'); +registerMacosSnapshotSuite('cli/json'); +registerProjectDiscoverySnapshotSuite('cli/json'); +registerProjectScaffoldingSnapshotSuite('cli/json'); +registerSimulatorManagementSnapshotSuite('cli/json'); +registerSimulatorSnapshotSuite('cli/json'); +registerSwiftPackageSnapshotSuite('cli/json'); +registerUiAutomationSnapshotSuite('cli/json'); +registerUtilitiesSnapshotSuite('cli/json'); diff --git a/src/snapshot-tests/__tests__/coverage.snapshot.test.ts b/src/snapshot-tests/__tests__/coverage.snapshot.test.ts index 89c7c9a9a..2598a5604 100644 --- a/src/snapshot-tests/__tests__/coverage.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/coverage.snapshot.test.ts @@ -1,4 +1,4 @@ import { registerCoverageSnapshotSuite } from '../suites/coverage-suite.ts'; -registerCoverageSnapshotSuite('cli'); -registerCoverageSnapshotSuite('mcp'); +registerCoverageSnapshotSuite('cli/text'); +registerCoverageSnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/debugging.snapshot.test.ts b/src/snapshot-tests/__tests__/debugging.snapshot.test.ts index c76eeba4f..69d665c03 100644 --- a/src/snapshot-tests/__tests__/debugging.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/debugging.snapshot.test.ts @@ -1,4 +1,4 @@ import { registerDebuggingSnapshotSuite } from '../suites/debugging-suite.ts'; -registerDebuggingSnapshotSuite('cli'); -registerDebuggingSnapshotSuite('mcp'); +registerDebuggingSnapshotSuite('cli/text'); +registerDebuggingSnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/device.snapshot.test.ts b/src/snapshot-tests/__tests__/device.snapshot.test.ts index 859e6943b..ab4a78bcc 100644 --- a/src/snapshot-tests/__tests__/device.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/device.snapshot.test.ts @@ -1,4 +1,4 @@ import { registerDeviceSnapshotSuite } from '../suites/device-suite.ts'; -registerDeviceSnapshotSuite('cli'); -registerDeviceSnapshotSuite('mcp'); +registerDeviceSnapshotSuite('cli/text'); +registerDeviceSnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/fixture-io.test.ts b/src/snapshot-tests/__tests__/fixture-io.test.ts index 170d5f7c0..cce46a848 100644 --- a/src/snapshot-tests/__tests__/fixture-io.test.ts +++ b/src/snapshot-tests/__tests__/fixture-io.test.ts @@ -1,17 +1,40 @@ import fs from 'node:fs'; import path from 'node:path'; import { afterEach, describe, expect, it } from 'vitest'; -import { expectMatchesFixture } from '../fixture-io.ts'; +import { expectMatchesFixture, fixturePathFor } from '../fixture-io.ts'; const workflow = '__fixture_diff_test__'; const scenario = 'block-diff'; -const fixtureDir = path.resolve(process.cwd(), 'src/snapshot-tests/__fixtures__/cli', workflow); +const fixtureDir = path.resolve( + process.cwd(), + 'src/snapshot-tests/__fixtures__/cli/text', + workflow, +); const fixturePath = path.join(fixtureDir, `${scenario}.txt`); afterEach(() => { fs.rmSync(fixtureDir, { recursive: true, force: true }); }); +describe('fixture path routing', () => { + it.each([ + ['cli/text', 'cli/text/example/build--success.txt'], + ['cli/json', 'cli/json/example/build--success.json'], + ['mcp/text', 'mcp/text/example/build--success.txt'], + ['mcp/json', 'mcp/json/example/build--success.json'], + ] as const)('routes %s fixtures through transport and format directories', (runtime, suffix) => { + const fixturePath = fixturePathFor({ + runtime, + workflow: 'example', + scenario: 'build--success', + }); + + expect( + fixturePath.split(path.sep).join('/').endsWith(`src/snapshot-tests/__fixtures__/${suffix}`), + ).toBe(true); + }); +}); + describe('fixture diff formatting', () => { it('groups consecutive changed lines as one removal block followed by one addition block', () => { fs.mkdirSync(fixtureDir, { recursive: true }); @@ -24,7 +47,7 @@ describe('fixture diff formatting', () => { expect(() => { expectMatchesFixture( ['before', 'new one', 'new two', 'new three', 'after'].join('\n'), - { runtime: 'cli', workflow, scenario }, + { runtime: 'cli/text', workflow, scenario }, { allowUpdate: false }, ); }).toThrowError( @@ -39,7 +62,7 @@ describe('fixture diff formatting', () => { expect(() => { expectMatchesFixture( ['before', 'same', 'after'].join('\n'), - { runtime: 'cli', workflow, scenario }, + { runtime: 'cli/text', workflow, scenario }, { allowUpdate: false }, ); }).toThrowError(/-\s+3 same\n-\s+4 same/); @@ -52,7 +75,7 @@ describe('fixture diff formatting', () => { expect(() => { expectMatchesFixture( ['before', 'same', 'same', 'same', 'after'].join('\n'), - { runtime: 'cli', workflow, scenario }, + { runtime: 'cli/text', workflow, scenario }, { allowUpdate: false }, ); }).toThrowError(/\+\s+3 same\n\+\s+4 same/); diff --git a/src/snapshot-tests/__tests__/json-fixture-schema.test.ts b/src/snapshot-tests/__tests__/json-fixture-schema.test.ts index 0b7a1e99d..eebf9f358 100644 --- a/src/snapshot-tests/__tests__/json-fixture-schema.test.ts +++ b/src/snapshot-tests/__tests__/json-fixture-schema.test.ts @@ -3,15 +3,46 @@ import { createStructuredFixtureSchemaValidator } from '../json-schema-validatio const validator = createStructuredFixtureSchemaValidator(); +function isRecord(value: unknown): value is Record { + return typeof value === 'object' && value !== null && !Array.isArray(value); +} + +function fixtureHasRequest(relativePath: string): boolean { + const fixture = validator.fixtures.find((candidate) => candidate.relativePath === relativePath); + if (!fixture) { + throw new Error(`Missing JSON fixture: ${relativePath}`); + } + + return isRecord(fixture.envelope.data) && Object.hasOwn(fixture.envelope.data, 'request'); +} + describe('structured JSON fixture schemas', () => { - it('discovers JSON fixtures', () => { + it('discovers JSON fixtures from transport/format buckets', () => { expect(validator.fixtures.length).toBeGreaterThan(0); + expect(validator.fixtures.some((fixture) => fixture.relativePath.startsWith('cli/json/'))).toBe( + true, + ); + expect(validator.fixtures.some((fixture) => fixture.relativePath.startsWith('mcp/json/'))).toBe( + true, + ); + expect( + validator.fixtures.every( + (fixture) => + fixture.relativePath.startsWith('cli/json/') || + fixture.relativePath.startsWith('mcp/json/'), + ), + ).toBe(true); }); it('compiles all schema documents', () => { expect(() => validator.compileAllSchemas()).not.toThrow(); }); + it('covers normal and minimal request-bearing fixture variants', () => { + expect(fixtureHasRequest('cli/json/simulator/build--success.json')).toBe(true); + expect(fixtureHasRequest('mcp/json/simulator/build--success.json')).toBe(false); + }); + it.each(validator.fixtures.map((fixture) => [fixture.relativePath, fixture] as const))( 'validates %s', (_relativePath, fixture) => { diff --git a/src/snapshot-tests/__tests__/json-harness-error-state.test.ts b/src/snapshot-tests/__tests__/json-harness-error-state.test.ts new file mode 100644 index 000000000..9ce8521e8 --- /dev/null +++ b/src/snapshot-tests/__tests__/json-harness-error-state.test.ts @@ -0,0 +1,48 @@ +import { describe, expect, it } from 'vitest'; +import { resolveCliJsonSnapshotErrorState } from '../harness.ts'; +import { resolveMcpSnapshotErrorState } from '../mcp-harness.ts'; +import type { StructuredOutputEnvelope } from '../../types/structured-output.ts'; + +const successEnvelope: StructuredOutputEnvelope = { + schema: 'xcodebuildmcp.output.error', + schemaVersion: '1', + didError: false, + error: null, + data: null, +}; + +const errorEnvelope: StructuredOutputEnvelope = { + ...successEnvelope, + didError: true, + error: 'Failed', +}; + +describe('JSON snapshot harness error state', () => { + it('uses CLI process status and envelope.didError when they agree', () => { + expect(resolveCliJsonSnapshotErrorState(0, successEnvelope, 'tool')).toBe(false); + expect(resolveCliJsonSnapshotErrorState(1, errorEnvelope, 'tool')).toBe(true); + }); + + it('rejects CLI process status and envelope.didError disagreement', () => { + expect(() => resolveCliJsonSnapshotErrorState(1, successEnvelope, 'tool')).toThrow( + 'CLI process exit status (1) disagrees with envelope.didError (false)', + ); + expect(() => resolveCliJsonSnapshotErrorState(0, errorEnvelope, 'tool')).toThrow( + 'CLI process exit status (0) disagrees with envelope.didError (true)', + ); + }); + + it('uses MCP transport isError and structuredContent.didError when they agree', () => { + expect(resolveMcpSnapshotErrorState(false, false, 'tool')).toBe(false); + expect(resolveMcpSnapshotErrorState(true, true, 'tool')).toBe(true); + }); + + it('rejects MCP transport isError and structuredContent.didError disagreement', () => { + expect(() => resolveMcpSnapshotErrorState(true, false, 'tool')).toThrow( + 'MCP result.isError (true) disagrees with structuredContent.didError (false)', + ); + expect(() => resolveMcpSnapshotErrorState(false, true, 'tool')).toThrow( + 'MCP result.isError (false) disagrees with structuredContent.didError (true)', + ); + }); +}); diff --git a/src/snapshot-tests/__tests__/json-normalize.test.ts b/src/snapshot-tests/__tests__/json-normalize.test.ts index 4c5e9dc55..49f06e29c 100644 --- a/src/snapshot-tests/__tests__/json-normalize.test.ts +++ b/src/snapshot-tests/__tests__/json-normalize.test.ts @@ -3,7 +3,7 @@ import type { StructuredOutputEnvelope } from '../../types/structured-output.ts' import { normalizeStructuredEnvelope } from '../json-normalize.ts'; describe('normalizeStructuredEnvelope', () => { - it('keeps suite-less simulator test cases while normalizing volatile durations', () => { + it('keeps only failing test cases for failed result snapshots', () => { const envelope: StructuredOutputEnvelope = { schema: 'xcodebuildmcp.output.test-result', schemaVersion: '1', @@ -26,11 +26,7 @@ describe('normalizeStructuredEnvelope', () => { error: 'Tests failed', data: { summary: { target: 'simulator' }, - testCases: [ - { test: 'Swift Testing failure', status: 'failed', durationMs: 0 }, - { test: 'Volatile Swift Testing pass', status: 'passed', durationMs: 0 }, - { suite: 'XCTestSuite', test: 'testStablePass', status: 'passed', durationMs: 0 }, - ], + testCases: [{ test: 'Swift Testing failure', status: 'failed', durationMs: 0 }], }, }); }); @@ -77,6 +73,42 @@ describe('normalizeStructuredEnvelope', () => { }); }); + it('normalizes and sorts SwiftPM build progress lines in stderr arrays', () => { + const envelope: StructuredOutputEnvelope = { + schema: 'xcodebuildmcp.output.build-run-result', + schemaVersion: '1', + didError: false, + error: null, + data: { + output: { + stderr: [ + 'Building for debugging...', + '[5/8] Emitting module spm', + '[4/8] Compiling spm main.swift', + "Build of product 'spm' complete! (0.42s)", + ], + }, + }, + }; + + expect(normalizeStructuredEnvelope(envelope)).toEqual({ + schema: 'xcodebuildmcp.output.build-run-result', + schemaVersion: '1', + didError: false, + error: null, + data: { + output: { + stderr: [ + 'Building for debugging...', + '[] Compiling spm main.swift', + '[] Emitting module spm', + "Build of product 'spm' complete! ()", + ], + }, + }, + }); + }); + it('normalizes volatile build settings PATH entry values without dropping the entry', () => { const envelope: StructuredOutputEnvelope = { schema: 'xcodebuildmcp.output.build-settings', diff --git a/src/snapshot-tests/__tests__/macos.snapshot.test.ts b/src/snapshot-tests/__tests__/macos.snapshot.test.ts index 6e2a00515..9dc7d5b78 100644 --- a/src/snapshot-tests/__tests__/macos.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/macos.snapshot.test.ts @@ -1,4 +1,4 @@ import { registerMacosSnapshotSuite } from '../suites/macos-suite.ts'; -registerMacosSnapshotSuite('cli'); -registerMacosSnapshotSuite('mcp'); +registerMacosSnapshotSuite('cli/text'); +registerMacosSnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/json-fixture-parity.snapshot.test.ts b/src/snapshot-tests/__tests__/mcp-json-fixture-parity.snapshot.test.ts similarity index 64% rename from src/snapshot-tests/__tests__/json-fixture-parity.snapshot.test.ts rename to src/snapshot-tests/__tests__/mcp-json-fixture-parity.snapshot.test.ts index 94e466d18..a30beb28a 100644 --- a/src/snapshot-tests/__tests__/json-fixture-parity.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/mcp-json-fixture-parity.snapshot.test.ts @@ -11,15 +11,15 @@ import { registerSwiftPackageSnapshotSuite } from '../suites/swift-package-suite import { registerUiAutomationSnapshotSuite } from '../suites/ui-automation-suite.ts'; import { registerUtilitiesSnapshotSuite } from '../suites/utilities-suite.ts'; -registerCoverageSnapshotSuite('json'); -registerDebuggingSnapshotSuite('json'); -registerDeviceSnapshotSuite('json'); -registerMacosSnapshotSuite('json'); -registerProjectDiscoverySnapshotSuite('json'); -registerProjectScaffoldingSnapshotSuite('json'); -registerSessionManagementSnapshotSuite('json'); -registerSimulatorManagementSnapshotSuite('json'); -registerSimulatorSnapshotSuite('json'); -registerSwiftPackageSnapshotSuite('json'); -registerUiAutomationSnapshotSuite('json'); -registerUtilitiesSnapshotSuite('json'); +registerCoverageSnapshotSuite('mcp/json'); +registerDebuggingSnapshotSuite('mcp/json'); +registerDeviceSnapshotSuite('mcp/json'); +registerMacosSnapshotSuite('mcp/json'); +registerProjectDiscoverySnapshotSuite('mcp/json'); +registerProjectScaffoldingSnapshotSuite('mcp/json'); +registerSessionManagementSnapshotSuite('mcp/json'); +registerSimulatorManagementSnapshotSuite('mcp/json'); +registerSimulatorSnapshotSuite('mcp/json'); +registerSwiftPackageSnapshotSuite('mcp/json'); +registerUiAutomationSnapshotSuite('mcp/json'); +registerUtilitiesSnapshotSuite('mcp/json'); diff --git a/src/snapshot-tests/__tests__/output-parsers.test.ts b/src/snapshot-tests/__tests__/output-parsers.test.ts new file mode 100644 index 000000000..47fa8550d --- /dev/null +++ b/src/snapshot-tests/__tests__/output-parsers.test.ts @@ -0,0 +1,23 @@ +import { describe, expect, it } from 'vitest'; +import { + extractAppPathFromSnapshotOutput, + extractProcessIdFromSnapshotOutput, +} from '../output-parsers.ts'; + +describe('snapshot output parsers', () => { + it.each([ + ['double-quoted', '--app-path "/tmp/My App.app"', '/tmp/My App.app'], + ['single-quoted', "--app-path '/tmp/My App.app'", '/tmp/My App.app'], + ['unquoted', '--app-path /tmp/App.app', '/tmp/App.app'], + ])('extracts %s CLI app path next-step args', (_label, output, expected) => { + expect(extractAppPathFromSnapshotOutput(output)).toBe(expected); + }); + + it.each([ + ['double-quoted', '--process-id "12345"'], + ['single-quoted', "--process-id '12345'"], + ['unquoted', '--process-id 12345'], + ])('extracts %s CLI process-id next-step args', (_label, output) => { + expect(extractProcessIdFromSnapshotOutput(output)).toBe(12345); + }); +}); diff --git a/src/snapshot-tests/__tests__/project-discovery.snapshot.test.ts b/src/snapshot-tests/__tests__/project-discovery.snapshot.test.ts index c9667d55f..31e548d25 100644 --- a/src/snapshot-tests/__tests__/project-discovery.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/project-discovery.snapshot.test.ts @@ -1,4 +1,4 @@ import { registerProjectDiscoverySnapshotSuite } from '../suites/project-discovery-suite.ts'; -registerProjectDiscoverySnapshotSuite('cli'); -registerProjectDiscoverySnapshotSuite('mcp'); +registerProjectDiscoverySnapshotSuite('cli/text'); +registerProjectDiscoverySnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/project-scaffolding.snapshot.test.ts b/src/snapshot-tests/__tests__/project-scaffolding.snapshot.test.ts index b8f97b7a6..f282cf2b3 100644 --- a/src/snapshot-tests/__tests__/project-scaffolding.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/project-scaffolding.snapshot.test.ts @@ -1,4 +1,4 @@ import { registerProjectScaffoldingSnapshotSuite } from '../suites/project-scaffolding-suite.ts'; -registerProjectScaffoldingSnapshotSuite('cli'); -registerProjectScaffoldingSnapshotSuite('mcp'); +registerProjectScaffoldingSnapshotSuite('cli/text'); +registerProjectScaffoldingSnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/session-management.snapshot.test.ts b/src/snapshot-tests/__tests__/session-management.snapshot.test.ts index c727a803e..b05e7510b 100644 --- a/src/snapshot-tests/__tests__/session-management.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/session-management.snapshot.test.ts @@ -1,3 +1,3 @@ import { registerSessionManagementSnapshotSuite } from '../suites/session-management-suite.ts'; -registerSessionManagementSnapshotSuite('mcp'); +registerSessionManagementSnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/simulator-management.snapshot.test.ts b/src/snapshot-tests/__tests__/simulator-management.snapshot.test.ts index 7c1125cb9..297c004f2 100644 --- a/src/snapshot-tests/__tests__/simulator-management.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/simulator-management.snapshot.test.ts @@ -1,4 +1,4 @@ import { registerSimulatorManagementSnapshotSuite } from '../suites/simulator-management-suite.ts'; -registerSimulatorManagementSnapshotSuite('cli'); -registerSimulatorManagementSnapshotSuite('mcp'); +registerSimulatorManagementSnapshotSuite('cli/text'); +registerSimulatorManagementSnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/simulator.snapshot.test.ts b/src/snapshot-tests/__tests__/simulator.snapshot.test.ts index b5a4b13ae..1d9bf2fdc 100644 --- a/src/snapshot-tests/__tests__/simulator.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/simulator.snapshot.test.ts @@ -1,4 +1,4 @@ import { registerSimulatorSnapshotSuite } from '../suites/simulator-suite.ts'; -registerSimulatorSnapshotSuite('cli'); -registerSimulatorSnapshotSuite('mcp'); +registerSimulatorSnapshotSuite('cli/text'); +registerSimulatorSnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/swift-package.snapshot.test.ts b/src/snapshot-tests/__tests__/swift-package.snapshot.test.ts index 98639ad4e..6f5dfff23 100644 --- a/src/snapshot-tests/__tests__/swift-package.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/swift-package.snapshot.test.ts @@ -1,4 +1,4 @@ import { registerSwiftPackageSnapshotSuite } from '../suites/swift-package-suite.ts'; -registerSwiftPackageSnapshotSuite('cli'); -registerSwiftPackageSnapshotSuite('mcp'); +registerSwiftPackageSnapshotSuite('cli/text'); +registerSwiftPackageSnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/ui-automation.snapshot.test.ts b/src/snapshot-tests/__tests__/ui-automation.snapshot.test.ts index e974ebbeb..ac940815f 100644 --- a/src/snapshot-tests/__tests__/ui-automation.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/ui-automation.snapshot.test.ts @@ -1,4 +1,4 @@ import { registerUiAutomationSnapshotSuite } from '../suites/ui-automation-suite.ts'; -registerUiAutomationSnapshotSuite('cli'); -registerUiAutomationSnapshotSuite('mcp'); +registerUiAutomationSnapshotSuite('cli/text'); +registerUiAutomationSnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/utilities.snapshot.test.ts b/src/snapshot-tests/__tests__/utilities.snapshot.test.ts index c2ade4f3e..2d87c7005 100644 --- a/src/snapshot-tests/__tests__/utilities.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/utilities.snapshot.test.ts @@ -1,4 +1,4 @@ import { registerUtilitiesSnapshotSuite } from '../suites/utilities-suite.ts'; -registerUtilitiesSnapshotSuite('cli'); -registerUtilitiesSnapshotSuite('mcp'); +registerUtilitiesSnapshotSuite('cli/text'); +registerUtilitiesSnapshotSuite('mcp/text'); diff --git a/src/snapshot-tests/__tests__/xcode-ide.snapshot.test.ts b/src/snapshot-tests/__tests__/xcode-ide.snapshot.test.ts index 3fdbcae22..4f39a2126 100644 --- a/src/snapshot-tests/__tests__/xcode-ide.snapshot.test.ts +++ b/src/snapshot-tests/__tests__/xcode-ide.snapshot.test.ts @@ -1,5 +1,6 @@ import { registerXcodeIdeSnapshotSuite } from '../suites/xcode-ide-suite.ts'; -registerXcodeIdeSnapshotSuite('cli'); -registerXcodeIdeSnapshotSuite('mcp'); -registerXcodeIdeSnapshotSuite('json'); +registerXcodeIdeSnapshotSuite('cli/text'); +registerXcodeIdeSnapshotSuite('cli/json'); +registerXcodeIdeSnapshotSuite('mcp/text'); +registerXcodeIdeSnapshotSuite('mcp/json'); diff --git a/src/snapshot-tests/contracts.ts b/src/snapshot-tests/contracts.ts index afe30ed95..852e91afa 100644 --- a/src/snapshot-tests/contracts.ts +++ b/src/snapshot-tests/contracts.ts @@ -1,6 +1,42 @@ import type { StructuredOutputEnvelope } from '../types/structured-output.ts'; -export type SnapshotRuntime = 'cli' | 'mcp' | 'json'; +export type SnapshotTransport = 'cli' | 'mcp'; +export type SnapshotFormat = 'text' | 'json'; +export type SnapshotRuntime = 'cli/text' | 'cli/json' | 'mcp/text' | 'mcp/json'; + +export function snapshotRuntimeTransport(runtime: SnapshotRuntime): SnapshotTransport { + switch (runtime) { + case 'cli/text': + case 'cli/json': + return 'cli'; + case 'mcp/text': + case 'mcp/json': + return 'mcp'; + } +} + +export function snapshotRuntimeFormat(runtime: SnapshotRuntime): SnapshotFormat { + switch (runtime) { + case 'cli/text': + case 'mcp/text': + return 'text'; + case 'cli/json': + case 'mcp/json': + return 'json'; + } +} + +export function isCliSnapshotRuntime(runtime: SnapshotRuntime): boolean { + return snapshotRuntimeTransport(runtime) === 'cli'; +} + +export function isMcpSnapshotRuntime(runtime: SnapshotRuntime): boolean { + return snapshotRuntimeTransport(runtime) === 'mcp'; +} + +export function isJsonSnapshotRuntime(runtime: SnapshotRuntime): boolean { + return snapshotRuntimeFormat(runtime) === 'json'; +} export interface FixtureKey { runtime: SnapshotRuntime; diff --git a/src/snapshot-tests/fixture-io.ts b/src/snapshot-tests/fixture-io.ts index be2ba854d..2776e27b4 100644 --- a/src/snapshot-tests/fixture-io.ts +++ b/src/snapshot-tests/fixture-io.ts @@ -1,6 +1,11 @@ import fs from 'node:fs'; import path from 'node:path'; -import type { FixtureKey, SnapshotRuntime } from './contracts.ts'; +import { + snapshotRuntimeFormat, + snapshotRuntimeTransport, + type FixtureKey, + type SnapshotRuntime, +} from './contracts.ts'; const FIXTURES_DIR = path.resolve(process.cwd(), 'src/snapshot-tests/__fixtures__'); @@ -17,11 +22,11 @@ function shouldUpdateSnapshots(options?: FixtureMatchOptions): boolean { } export function fixturePathFor(key: FixtureKey): string { - if (key.runtime === 'json') { - return path.join(FIXTURES_DIR, 'json', key.workflow, `${key.scenario}.json`); - } + const transport = snapshotRuntimeTransport(key.runtime); + const format = snapshotRuntimeFormat(key.runtime); + const extension = format === 'json' ? 'json' : 'txt'; - return path.join(FIXTURES_DIR, key.runtime, key.workflow, `${key.scenario}.txt`); + return path.join(FIXTURES_DIR, transport, format, key.workflow, `${key.scenario}.${extension}`); } function findCommonPrefixLength(left: string, right: string): number { diff --git a/src/snapshot-tests/harness.ts b/src/snapshot-tests/harness.ts index e55f250d7..474569c77 100644 --- a/src/snapshot-tests/harness.ts +++ b/src/snapshot-tests/harness.ts @@ -1,6 +1,7 @@ import { spawnSync, execSync } from 'node:child_process'; import path from 'node:path'; import { randomUUID } from 'node:crypto'; +import { formatStructuredEnvelopeFixture } from './json-normalize.ts'; import { normalizeSnapshotOutput } from './normalize.ts'; import type { SnapshotResult, WorkflowSnapshotHarness } from './contracts.ts'; import { resolveSnapshotToolManifest } from './tool-manifest-resolver.ts'; @@ -55,6 +56,33 @@ function runSnapshotCli( }); } +function parseStructuredEnvelope( + stdout: string, + label: string, +): NonNullable { + try { + return JSON.parse(stdout) as NonNullable; + } catch (error) { + const message = error instanceof Error ? error.message : String(error); + throw new Error(`Failed to parse CLI JSON output for ${label}: ${message}`); + } +} + +export function resolveCliJsonSnapshotErrorState( + status: number | null, + envelope: NonNullable, + label: string, +): boolean { + const processDidError = status !== 0; + if (processDidError !== envelope.didError) { + throw new Error( + `${label}: CLI process exit status (${status ?? 'null'}) disagrees with envelope.didError (${envelope.didError}).`, + ); + } + + return processDidError || envelope.didError; +} + export async function createSnapshotHarness( options: CreateSnapshotHarnessOptions = {}, ): Promise { @@ -89,6 +117,46 @@ export async function createSnapshotHarness( return { invoke, cleanup }; } +export async function createCliJsonSnapshotHarness( + options: CreateSnapshotHarnessOptions = {}, +): Promise { + async function invoke( + workflow: string, + cliToolName: string, + args: Record, + ): Promise { + const resolved = resolveSnapshotToolManifest(workflow, cliToolName); + + if (!resolved) { + throw new Error(`Tool '${cliToolName}' not found in workflow '${workflow}'`); + } + + if (resolved.isMcpOnly) { + throw new Error(`Tool '${cliToolName}' in workflow '${workflow}' is not CLI-available`); + } + + const result = runSnapshotCli(workflow, cliToolName, args, 'json', options); + const stdout = + typeof result.stdout === 'string' ? result.stdout : (result.stdout?.toString('utf8') ?? ''); + const envelope = parseStructuredEnvelope(stdout, `${workflow}/${cliToolName}`); + + return { + text: formatStructuredEnvelopeFixture(envelope), + rawText: stdout, + isError: resolveCliJsonSnapshotErrorState( + result.status, + envelope, + `${workflow}/${cliToolName}`, + ), + structuredEnvelope: envelope, + }; + } + + async function cleanup(): Promise {} + + return { invoke, cleanup }; +} + type SimulatorState = 'Booted' | 'Shutdown'; type SimctlAvailableDevice = { udid: string; name: string; state: string }; diff --git a/src/snapshot-tests/json-harness.ts b/src/snapshot-tests/json-harness.ts index 635b7bb75..9c529ac8e 100644 --- a/src/snapshot-tests/json-harness.ts +++ b/src/snapshot-tests/json-harness.ts @@ -2,7 +2,7 @@ import { formatStructuredEnvelopeFixture } from './json-normalize.ts'; import type { SnapshotResult, WorkflowSnapshotHarness } from './contracts.ts'; import { createMcpSnapshotHarness, type CreateMcpSnapshotHarnessOptions } from './mcp-harness.ts'; -export async function createJsonSnapshotHarness( +export async function createMcpJsonSnapshotHarness( opts: CreateMcpSnapshotHarnessOptions = {}, ): Promise { const harness = await createMcpSnapshotHarness(opts); @@ -21,7 +21,7 @@ export async function createJsonSnapshotHarness( return { text: formatStructuredEnvelopeFixture(envelope), rawText: result.rawText, - isError: envelope.didError, + isError: result.isError || envelope.didError, structuredEnvelope: envelope, }; } diff --git a/src/snapshot-tests/json-normalize.ts b/src/snapshot-tests/json-normalize.ts index bd7694274..6800e94f0 100644 --- a/src/snapshot-tests/json-normalize.ts +++ b/src/snapshot-tests/json-normalize.ts @@ -6,9 +6,14 @@ function isRecord(value: unknown): value is Record { } function normalizeString(value: string, key?: string, path: string[] = []): string { + const parentKey = path.at(-2); const normalized = normalizeSnapshotOutput(value.replace(/\u00A0/g, ' ')); let result = normalized.endsWith('\n') ? normalized.slice(0, -1) : normalized; + if (parentKey === 'stderr') { + result = result.replace(/^\[\d+\/\d+\] /, '[] '); + } + if (key === 'rawResponseJsonPath') { return ''; } @@ -62,6 +67,50 @@ function isBuildSettingsPathEntry(value: Record, path: string[] return path.includes('entries') && value.key === 'PATH' && typeof value.value === 'string'; } +function isNormalizedTestCase( + value: unknown, +): value is { status?: unknown; suite?: string; test?: string } { + return isRecord(value) && typeof value.status === 'string'; +} + +function testCaseSortKey(item: unknown): string { + const record = item as { suite?: string; test?: string }; + return `${record.suite ?? ''}|${record.test ?? ''}`; +} + +function normalizeTestCases(items: unknown[]): unknown[] { + const sorted = [...items].sort((a, b) => testCaseSortKey(a).localeCompare(testCaseSortKey(b))); + + const hasFailures = sorted.some((item) => isNormalizedTestCase(item) && item.status === 'failed'); + return hasFailures + ? sorted.filter((item) => isNormalizedTestCase(item) && item.status === 'failed') + : sorted; +} + +function normalizeStderrLines(items: unknown[]): unknown[] { + const normalized: unknown[] = []; + let stepRun: string[] = []; + + const flushStepRun = (): void => { + if (stepRun.length === 0) return; + normalized.push(...stepRun.sort((left, right) => left.localeCompare(right))); + stepRun = []; + }; + + for (const item of items) { + if (typeof item === 'string' && item.startsWith('[] ')) { + stepRun.push(item); + continue; + } + + flushStepRun(); + normalized.push(item); + } + + flushStepRun(); + return normalized; +} + function normalizeValue(value: unknown, path: string[] = []): unknown { const key = path.at(-1); @@ -75,12 +124,11 @@ function normalizeValue(value: unknown, path: string[] = []): unknown { if (Array.isArray(value)) { const normalized = value.map((item, index) => normalizeValue(item, [...path, String(index)])); - if (path.at(-1) === 'testCases') { - return [...normalized].sort((a, b) => { - const ka = `${(a as { suite?: string }).suite ?? ''}|${(a as { test?: string }).test ?? ''}`; - const kb = `${(b as { suite?: string }).suite ?? ''}|${(b as { test?: string }).test ?? ''}`; - return ka.localeCompare(kb); - }); + if (key === 'testCases') { + return normalizeTestCases(normalized); + } + if (key === 'stderr') { + return normalizeStderrLines(normalized); } return normalized; } diff --git a/src/snapshot-tests/json-schema-validation.ts b/src/snapshot-tests/json-schema-validation.ts index bffd6ebc3..2ada3a008 100644 --- a/src/snapshot-tests/json-schema-validation.ts +++ b/src/snapshot-tests/json-schema-validation.ts @@ -4,7 +4,8 @@ import { Ajv2020 } from 'ajv/dist/2020.js'; import type { ErrorObject, ValidateFunction } from 'ajv'; import { globSync } from 'glob'; -const FIXTURE_ROOT = path.resolve(process.cwd(), 'src/snapshot-tests/__fixtures__/json'); +const FIXTURE_ROOT = path.resolve(process.cwd(), 'src/snapshot-tests/__fixtures__'); +const JSON_FIXTURE_BUCKETS = ['cli/json', 'mcp/json'] as const; const SCHEMA_ROOT = path.resolve(process.cwd(), 'schemas/structured-output'); const SCHEMA_PATTERN = /^xcodebuildmcp\.output\.[a-z0-9-]+$/; const SCHEMA_VERSION_PATTERN = /^[0-9]+$/; @@ -124,18 +125,30 @@ function discoverSchemaDocuments(): DiscoveredSchemaDocument[] { }); } -function discoverJsonFixtures(knownSchemaPaths: Set): DiscoveredJsonFixture[] { - const relativePaths = globSync('**/*.json', { - cwd: FIXTURE_ROOT, - nodir: true, - }).sort(); +function discoverJsonFixturePaths(): Array<{ absolutePath: string; relativePath: string }> { + return JSON_FIXTURE_BUCKETS.flatMap((bucket) => { + const bucketRoot = path.join(FIXTURE_ROOT, bucket); + if (!fs.existsSync(bucketRoot)) { + return []; + } - return relativePaths.map((relativePath) => { - const absolutePath = path.join(FIXTURE_ROOT, relativePath); - const repoRelativePath = toRelative(absolutePath); - const parsed = readJsonDocument(absolutePath, `fixture ${repoRelativePath}`); - const envelope = assertBootstrapEnvelope(parsed, repoRelativePath); - assertValidSchemaRoute(envelope, repoRelativePath); + return globSync('**/*.json', { + cwd: bucketRoot, + nodir: true, + }) + .sort() + .map((bucketRelativePath) => ({ + absolutePath: path.join(bucketRoot, bucketRelativePath), + relativePath: path.join(bucket, bucketRelativePath).split(path.sep).join('/'), + })); + }).sort((left, right) => left.relativePath.localeCompare(right.relativePath)); +} + +function discoverJsonFixtures(knownSchemaPaths: Set): DiscoveredJsonFixture[] { + return discoverJsonFixturePaths().map(({ absolutePath, relativePath }) => { + const parsed = readJsonDocument(absolutePath, `fixture ${relativePath}`); + const envelope = assertBootstrapEnvelope(parsed, relativePath); + assertValidSchemaRoute(envelope, relativePath); const schemaPath = path.join( SCHEMA_ROOT, @@ -145,13 +158,13 @@ function discoverJsonFixtures(knownSchemaPaths: Set): DiscoveredJsonFixt if (!knownSchemaPaths.has(schemaPath)) { throw new Error( - `${repoRelativePath}: declared schema ${envelope.schema}@${envelope.schemaVersion} maps to missing schema file ${toRelative(schemaPath)}.`, + `${relativePath}: declared schema ${envelope.schema}@${envelope.schemaVersion} maps to missing schema file ${toRelative(schemaPath)}.`, ); } return { absolutePath, - relativePath: relativePath.split(path.sep).join('/'), + relativePath, envelope, schemaPath, }; @@ -228,10 +241,7 @@ export function createStructuredFixtureSchemaValidator(): StructuredFixtureSchem }, validateFixture(fixture: DiscoveredJsonFixture): void { const validate = validatorForSchemaPath(fixture.schemaPath); - const parsed = readJsonDocument( - fixture.absolutePath, - `fixture ${toRelative(fixture.absolutePath)}`, - ); + const parsed = readJsonDocument(fixture.absolutePath, `fixture ${fixture.relativePath}`); if (validate(parsed)) { return; diff --git a/src/snapshot-tests/mcp-harness.ts b/src/snapshot-tests/mcp-harness.ts index ca1cdcd45..3de30dd51 100644 --- a/src/snapshot-tests/mcp-harness.ts +++ b/src/snapshot-tests/mcp-harness.ts @@ -86,6 +86,21 @@ function createSnapshotHarnessEnv(overrides: Record): Record { @@ -112,8 +127,11 @@ export async function createMcpSnapshotHarness( const rawText = extractSnapshotTextContent(result); const text = normalizeSnapshotOutput(rawText); const structuredEnvelope = extractStructuredEnvelope(result); - const isError = - structuredEnvelope?.didError ?? (result as { isError?: boolean }).isError ?? false; + const isError = resolveMcpSnapshotErrorState( + (result as { isError?: boolean }).isError, + structuredEnvelope?.didError, + name, + ); return { text, rawText, isError, structuredEnvelope }; } diff --git a/src/snapshot-tests/output-parsers.ts b/src/snapshot-tests/output-parsers.ts index e03a6875b..7f5f335c0 100644 --- a/src/snapshot-tests/output-parsers.ts +++ b/src/snapshot-tests/output-parsers.ts @@ -1,3 +1,4 @@ +import type { SnapshotResult } from './contracts.ts'; import { expandHomePrefix } from '../utils/path.ts'; export interface SnapshotSimulatorEntry { @@ -10,44 +11,77 @@ export function expandSnapshotPath(pathValue: string): string { return expandHomePrefix(pathValue); } -export function extractAppPathFromSnapshotOutput(output: string): string { - const detailMatch = output.match(/App Path:\s+(.+\.app)$/m); - if (detailMatch?.[1]) { - return expandSnapshotPath(detailMatch[1].trim()); +function isRecord(value: unknown): value is Record { + return typeof value === 'object' && value !== null && !Array.isArray(value); +} + +function getStructuredArtifact(result: SnapshotResult, key: string): unknown { + const data = result.structuredEnvelope?.data; + if (!isRecord(data) || !isRecord(data.artifacts)) { + return undefined; } + return data.artifacts[key]; +} - const mcpArgMatch = output.match(/appPath:\s*"([^"]+\.app)"/); - if (mcpArgMatch?.[1]) { - return expandSnapshotPath(mcpArgMatch[1]); +function firstMatchGroup(output: string, patterns: RegExp[]): string | undefined { + for (const pattern of patterns) { + const match = output.match(pattern); + const group = match?.slice(1).find(Boolean); + if (group) return group; } + return undefined; +} - const cliArgMatch = output.match(/--app-path\s+"([^"]+\.app)"/); - if (cliArgMatch?.[1]) { - return expandSnapshotPath(cliArgMatch[1]); +export function extractAppPathFromSnapshotOutput(output: string): string { + const appPath = firstMatchGroup(output, [ + /App Path:\s+(.+\.app)$/m, + /appPath:\s*"([^"]+\.app)"/, + /--app-path\s+(?:"([^"]+\.app)"|'([^']+\.app)'|(\S+\.app))/, + ]); + if (appPath) { + return expandSnapshotPath(appPath.trim()); } throw new Error('Could not extract app path from snapshot output.'); } -export function extractProcessIdFromSnapshotOutput(output: string): number { - const detailMatch = output.match(/Process ID:\s+(\d+)/); - if (detailMatch?.[1]) { - return Number(detailMatch[1]); +export function extractAppPathFromSnapshotResult(result: SnapshotResult): string { + const appPath = getStructuredArtifact(result, 'appPath'); + if (typeof appPath === 'string') { + return expandSnapshotPath(appPath); } - const mcpArgMatch = output.match(/processId:\s*(\d+)/); - if (mcpArgMatch?.[1]) { - return Number(mcpArgMatch[1]); - } + return extractAppPathFromSnapshotOutput(result.rawText); +} - const cliArgMatch = output.match(/--process-id\s+"(\d+)"/); - if (cliArgMatch?.[1]) { - return Number(cliArgMatch[1]); +export function extractProcessIdFromSnapshotOutput(output: string): number { + const processId = firstMatchGroup(output, [ + /Process ID:\s+(\d+)/, + /processId:\s*(\d+)/, + /--process-id\s+(?:"(\d+)"|'(\d+)'|(\d+))/, + ]); + if (processId) { + return Number(processId); } throw new Error('Could not extract process ID from snapshot output.'); } +export function extractProcessIdFromSnapshotResult(result: SnapshotResult): number { + const processId = getStructuredArtifact(result, 'processId'); + if (typeof processId === 'number') { + return processId; + } + if (typeof processId === 'string') { + const parsedProcessId = Number(processId); + if (Number.isFinite(parsedProcessId)) { + return parsedProcessId; + } + } + + return extractProcessIdFromSnapshotOutput(result.rawText); +} + export function parseSimulatorListOutput(output: string): SnapshotSimulatorEntry[] { const simulators: SnapshotSimulatorEntry[] = []; const lines = output.split('\n'); diff --git a/src/snapshot-tests/suites/debugging-suite.ts b/src/snapshot-tests/suites/debugging-suite.ts index 4de27a5f6..81ee38678 100644 --- a/src/snapshot-tests/suites/debugging-suite.ts +++ b/src/snapshot-tests/suites/debugging-suite.ts @@ -1,7 +1,11 @@ import { describe, it, expect, beforeAll, afterAll, vi } from 'vitest'; import { execSync } from 'node:child_process'; import { ensureSimulatorBooted } from '../harness.ts'; -import type { SnapshotRuntime, WorkflowSnapshotHarness } from '../contracts.ts'; +import { + isJsonSnapshotRuntime, + type SnapshotRuntime, + type WorkflowSnapshotHarness, +} from '../contracts.ts'; import { createHarnessForRuntime, createWorkflowFixtureMatcher } from './helpers.ts'; const WORKSPACE = 'example_projects/iOS_Calculator/CalculatorApp.xcworkspace'; @@ -50,7 +54,7 @@ export function registerDebuggingSnapshotSuite(runtime: SnapshotRuntime): void { const { text, isError } = await harness.invoke( 'debugging', 'add-breakpoint', - runtime === 'json' + isJsonSnapshotRuntime(runtime) ? { file: 'ContentView.swift', line: 42, @@ -74,7 +78,7 @@ export function registerDebuggingSnapshotSuite(runtime: SnapshotRuntime): void { it('lldb-command - error no session', async () => { const { text, isError } = await harness.invoke('debugging', 'lldb-command', { - command: runtime === 'json' ? 'breakpoint list' : 'bt', + command: isJsonSnapshotRuntime(runtime) ? 'breakpoint list' : 'bt', }); expect(isError).toBe(true); expectFixture(text, 'lldb-command--error-no-session'); diff --git a/src/snapshot-tests/suites/device-suite.ts b/src/snapshot-tests/suites/device-suite.ts index cc73b60f7..575017aaa 100644 --- a/src/snapshot-tests/suites/device-suite.ts +++ b/src/snapshot-tests/suites/device-suite.ts @@ -2,8 +2,8 @@ import { describe, it, expect, beforeAll, afterAll, vi } from 'vitest'; import type { SnapshotRuntime, WorkflowSnapshotHarness } from '../contracts.ts'; import { isDeviceAvailable } from '../device-availability.ts'; import { - extractAppPathFromSnapshotOutput, - extractProcessIdFromSnapshotOutput, + extractAppPathFromSnapshotResult, + extractProcessIdFromSnapshotResult, } from '../output-parsers.ts'; import { compilerErrorExtraArgs, @@ -174,7 +174,7 @@ export function registerDeviceSnapshotSuite(runtime: SnapshotRuntime): void { }); expect(appPathResult.isError).toBe(false); - const appPath = extractAppPathFromSnapshotOutput(appPathResult.rawText); + const appPath = extractAppPathFromSnapshotResult(appPathResult); const { text, isError } = await harness.invoke('device', 'install', { deviceId: DEVICE_ID, @@ -204,7 +204,7 @@ export function registerDeviceSnapshotSuite(runtime: SnapshotRuntime): void { }); expect(launchResult.isError).toBe(false); - const pid = extractProcessIdFromSnapshotOutput(launchResult.rawText); + const pid = extractProcessIdFromSnapshotResult(launchResult); expect(pid).toBeGreaterThan(0); await new Promise((resolve) => setTimeout(resolve, 2000)); diff --git a/src/snapshot-tests/suites/helpers.ts b/src/snapshot-tests/suites/helpers.ts index 8244c77f0..87a38755f 100644 --- a/src/snapshot-tests/suites/helpers.ts +++ b/src/snapshot-tests/suites/helpers.ts @@ -1,7 +1,11 @@ import type { SnapshotRuntime, WorkflowSnapshotHarness } from '../contracts.ts'; import { createFixtureMatcher, type FixtureMatchOptions } from '../fixture-io.ts'; -import { createSnapshotHarness, type CreateSnapshotHarnessOptions } from '../harness.ts'; -import { createJsonSnapshotHarness } from '../json-harness.ts'; +import { + createCliJsonSnapshotHarness, + createSnapshotHarness, + type CreateSnapshotHarnessOptions, +} from '../harness.ts'; +import { createMcpJsonSnapshotHarness } from '../json-harness.ts'; import { createMcpSnapshotHarness, type CreateMcpSnapshotHarnessOptions } from '../mcp-harness.ts'; const COMPILER_ERROR_EXTRA_ARGS = ['OTHER_SWIFT_FLAGS=$(inherited) -D SNAPSHOT_COMPILER_ERROR']; @@ -14,15 +18,16 @@ export function createHarnessForRuntime( runtime: SnapshotRuntime, options: CreateHarnessForRuntimeOptions = {}, ): Promise { - if (runtime === 'mcp') { - return createMcpSnapshotHarness(options); + switch (runtime) { + case 'cli/text': + return createSnapshotHarness(options); + case 'cli/json': + return createCliJsonSnapshotHarness(options); + case 'mcp/text': + return createMcpSnapshotHarness(options); + case 'mcp/json': + return createMcpJsonSnapshotHarness(options); } - - if (runtime === 'json') { - return createJsonSnapshotHarness(options); - } - - return createSnapshotHarness(options); } export interface WorkflowFixtureMatcherOptions extends FixtureMatchOptions { diff --git a/src/snapshot-tests/suites/macos-suite.ts b/src/snapshot-tests/suites/macos-suite.ts index ac6fe1ab1..406f6240f 100644 --- a/src/snapshot-tests/suites/macos-suite.ts +++ b/src/snapshot-tests/suites/macos-suite.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; import type { SnapshotRuntime, WorkflowSnapshotHarness } from '../contracts.ts'; -import { extractAppPathFromSnapshotOutput } from '../output-parsers.ts'; +import { extractAppPathFromSnapshotResult } from '../output-parsers.ts'; import { compilerErrorExtraArgs, createHarnessForRuntime, @@ -192,7 +192,7 @@ export function registerMacosSnapshotSuite(runtime: SnapshotRuntime): void { }); expect(appPathResult.isError).toBe(false); - const appPath = extractAppPathFromSnapshotOutput(appPathResult.rawText); + const appPath = extractAppPathFromSnapshotResult(appPathResult); const { text, isError } = await harness.invoke('macos', 'launch', { appPath, @@ -220,7 +220,7 @@ export function registerMacosSnapshotSuite(runtime: SnapshotRuntime): void { }); expect(appPathResult.isError).toBe(false); - const appPath = extractAppPathFromSnapshotOutput(appPathResult.rawText); + const appPath = extractAppPathFromSnapshotResult(appPathResult); await harness.invoke('macos', 'launch', { appPath }); diff --git a/src/snapshot-tests/suites/resources-suite.ts b/src/snapshot-tests/suites/resources-suite.ts index 91d2a6bd4..41093be4d 100644 --- a/src/snapshot-tests/suites/resources-suite.ts +++ b/src/snapshot-tests/suites/resources-suite.ts @@ -3,7 +3,7 @@ import { invokeResource } from '../resource-harness.ts'; import { createWorkflowFixtureMatcher } from './helpers.ts'; import { ensureSimulatorBooted } from '../harness.ts'; export function registerResourcesSnapshotSuite(): void { - const expectFixture = createWorkflowFixtureMatcher('mcp', 'resources'); + const expectFixture = createWorkflowFixtureMatcher('mcp/text', 'resources'); describe('mcp resources', () => { beforeAll(async () => { diff --git a/src/snapshot-tests/suites/session-management-suite.ts b/src/snapshot-tests/suites/session-management-suite.ts index 7982b0388..890537338 100644 --- a/src/snapshot-tests/suites/session-management-suite.ts +++ b/src/snapshot-tests/suites/session-management-suite.ts @@ -1,5 +1,10 @@ import { describe, it, expect, beforeAll, beforeEach, afterAll } from 'vitest'; -import type { SnapshotRuntime, WorkflowSnapshotHarness } from '../contracts.ts'; +import { + isJsonSnapshotRuntime, + isMcpSnapshotRuntime, + type SnapshotRuntime, + type WorkflowSnapshotHarness, +} from '../contracts.ts'; import { createHarnessForRuntime, createWorkflowFixtureMatcher } from './helpers.ts'; const WORKSPACE = 'example_projects/iOS_Calculator/CalculatorApp.xcworkspace'; @@ -35,7 +40,7 @@ export function registerSessionManagementSnapshotSuite(runtime: SnapshotRuntime) describe('shared snapshots', () => { beforeEach(async () => { - if (runtime === 'json') { + if (isJsonSnapshotRuntime(runtime)) { await harness.invoke('session-management', 'clear-defaults', { all: true }); return; } @@ -57,7 +62,7 @@ export function registerSessionManagementSnapshotSuite(runtime: SnapshotRuntime) describe('session-show-defaults', () => { it('success', async () => { - if (runtime === 'json') { + if (isJsonSnapshotRuntime(runtime)) { await seedSessionDefaults(); } @@ -69,7 +74,7 @@ export function registerSessionManagementSnapshotSuite(runtime: SnapshotRuntime) describe('session-clear-defaults', () => { it('success', async () => { - if (runtime === 'json') { + if (isJsonSnapshotRuntime(runtime)) { await harness.invoke('session-management', 'set-defaults', { workspacePath: WORKSPACE, scheme: 'CalculatorApp', @@ -88,7 +93,7 @@ export function registerSessionManagementSnapshotSuite(runtime: SnapshotRuntime) describe('session-use-defaults-profile', () => { it('success', async () => { - if (runtime === 'json') { + if (isJsonSnapshotRuntime(runtime)) { await seedSessionDefaults(); } @@ -102,7 +107,7 @@ export function registerSessionManagementSnapshotSuite(runtime: SnapshotRuntime) describe('session-sync-xcode-defaults', () => { it('success', async () => { - if (runtime === 'json') { + if (isJsonSnapshotRuntime(runtime)) { await seedSessionDefaults(); await harness.invoke('project-discovery', 'show-build-settings', { workspacePath: WORKSPACE, @@ -117,7 +122,7 @@ export function registerSessionManagementSnapshotSuite(runtime: SnapshotRuntime) }); }); - if (runtime !== 'cli') { + if (isMcpSnapshotRuntime(runtime)) { describe('mcp-only extras', () => { beforeEach(async () => { await harness.invoke('session-management', 'clear-defaults', { all: true }); @@ -136,6 +141,27 @@ export function registerSessionManagementSnapshotSuite(runtime: SnapshotRuntime) expect(isError).toBe(false); expectFixture(text, 'session-set-defaults--scheme'); }); + + it('session-use-defaults-profile -- persist success', async () => { + await harness.invoke('session-management', 'set-defaults', { + profile: 'MyCustomProfile', + createIfNotExists: true, + workspacePath: WORKSPACE, + scheme: 'CalculatorApp', + }); + await harness.invoke('session-management', 'use-defaults-profile', { global: true }); + + const { text, isError } = await harness.invoke( + 'session-management', + 'use-defaults-profile', + { + profile: 'MyCustomProfile', + persist: true, + }, + ); + expect(isError).toBe(false); + expectFixture(text, 'session-use-defaults-profile--persist-success'); + }); }); } }); diff --git a/src/snapshot-tests/suites/simulator-suite.ts b/src/snapshot-tests/suites/simulator-suite.ts index c083f8bc1..42d468550 100644 --- a/src/snapshot-tests/suites/simulator-suite.ts +++ b/src/snapshot-tests/suites/simulator-suite.ts @@ -3,8 +3,13 @@ import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; import { ensureSimulatorBooted } from '../harness.ts'; -import type { SnapshotRuntime, WorkflowSnapshotHarness } from '../contracts.ts'; -import { extractAppPathFromSnapshotOutput } from '../output-parsers.ts'; +import { + isJsonSnapshotRuntime, + isMcpSnapshotRuntime, + type SnapshotRuntime, + type WorkflowSnapshotHarness, +} from '../contracts.ts'; +import { extractAppPathFromSnapshotResult } from '../output-parsers.ts'; import { compilerErrorExtraArgs, createHarnessForRuntime, @@ -248,7 +253,7 @@ export function registerSimulatorSnapshotSuite(runtime: SnapshotRuntime): void { }); expect(appPathResult.isError).toBe(false); - const appPath = extractAppPathFromSnapshotOutput(appPathResult.rawText); + const appPath = extractAppPathFromSnapshotResult(appPathResult); const { text, isError } = await harness.invoke('simulator', 'install', { simulatorId: simulatorUdid, @@ -370,7 +375,7 @@ export function registerSimulatorSnapshotSuite(runtime: SnapshotRuntime): void { ); }); - if (runtime !== 'cli') { + if (isMcpSnapshotRuntime(runtime)) { describe('mcp-only extras', () => { beforeEach(async () => { await harness.invoke('session-management', 'clear-defaults', { all: true }); @@ -380,7 +385,7 @@ export function registerSimulatorSnapshotSuite(runtime: SnapshotRuntime): void { // validates and hydrates arguments differently. This makes the empty-args build failure // a transport-specific MCP snapshot rather than a shared CLI/MCP parity case. it('build -- error missing params', async () => { - if (runtime === 'json') { + if (isJsonSnapshotRuntime(runtime)) { await expect(harness.invoke('simulator', 'build', {})).rejects.toThrow( 'Structured output missing for simulator/build', ); diff --git a/src/snapshot-tests/suites/swift-package-suite.ts b/src/snapshot-tests/suites/swift-package-suite.ts index 99abeee5b..1dbdb9b10 100644 --- a/src/snapshot-tests/suites/swift-package-suite.ts +++ b/src/snapshot-tests/suites/swift-package-suite.ts @@ -1,7 +1,8 @@ +import { execSync } from 'node:child_process'; import { describe, it, expect, beforeAll, afterAll, vi } from 'vitest'; import { clearAllProcesses } from '../../mcp/tools/swift-package/active-processes.ts'; import type { SnapshotRuntime, WorkflowSnapshotHarness } from '../contracts.ts'; -import { createJsonSnapshotHarness } from '../json-harness.ts'; +import { createMcpJsonSnapshotHarness } from '../json-harness.ts'; import { createHarnessForRuntime, createWorkflowFixtureMatcher } from './helpers.ts'; const PACKAGE_PATH = 'example_projects/spm'; @@ -13,7 +14,7 @@ export function registerSwiftPackageSnapshotSuite(runtime: SnapshotRuntime): voi let harness: WorkflowSnapshotHarness; async function stopAllRunningSwiftPackageProcesses(): Promise { - const jsonHarness = await createJsonSnapshotHarness(); + const jsonHarness = await createMcpJsonSnapshotHarness(); try { while (true) { @@ -39,7 +40,6 @@ export function registerSwiftPackageSnapshotSuite(runtime: SnapshotRuntime): voi async function resetSwiftPackageState(): Promise { try { - const { execSync } = await import('node:child_process'); execSync('node build/cli.js daemon stop 2>/dev/null || true', { encoding: 'utf8', cwd: process.cwd(), diff --git a/src/snapshot-tests/suites/xcode-ide-suite.ts b/src/snapshot-tests/suites/xcode-ide-suite.ts index 0de1bf03a..200174d73 100644 --- a/src/snapshot-tests/suites/xcode-ide-suite.ts +++ b/src/snapshot-tests/suites/xcode-ide-suite.ts @@ -3,7 +3,12 @@ import { mkdtempSync, readFileSync, rmSync } from 'node:fs'; import { homedir, tmpdir } from 'node:os'; import { isAbsolute, join } from 'node:path'; import { describe, it, expect, beforeAll, afterAll } from 'vitest'; -import type { SnapshotResult, SnapshotRuntime, WorkflowSnapshotHarness } from '../contracts.ts'; +import { + isCliSnapshotRuntime, + type SnapshotResult, + type SnapshotRuntime, + type WorkflowSnapshotHarness, +} from '../contracts.ts'; import { getSnapshotHarnessEnv } from '../harness.ts'; import { isXcodeIdeBridgeAvailable } from '../xcode-ide-availability.ts'; import { createHarnessForRuntime, createWorkflowFixtureMatcher } from './helpers.ts'; @@ -97,7 +102,7 @@ export function registerXcodeIdeSnapshotSuite(runtime: SnapshotRuntime): void { let documentationSearchReady = false; beforeAll(async () => { - if (runtime === 'cli') { + if (isCliSnapshotRuntime(runtime)) { tempDir = mkdtempSync(join(tmpdir(), 'xcodebuildmcp-xcode-ide-snapshot-')); socketPath = join(tempDir, 'daemon.sock'); daemonEnv = { @@ -138,7 +143,7 @@ export function registerXcodeIdeSnapshotSuite(runtime: SnapshotRuntime): void { afterAll(async () => { await harness.cleanup(); - if (runtime === 'cli') { + if (isCliSnapshotRuntime(runtime)) { try { execFileSync('node', [CLI_PATH, '--socket', socketPath, 'daemon', 'stop'], { env: getSnapshotHarnessEnv(daemonEnv), From ae9ee12237608e225afbb4432b4ee905926648b7 Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Sat, 16 May 2026 09:24:54 +0100 Subject: [PATCH 03/24] docs(changelog): Document next-step response updates Record the runtime response and snapshot coverage changes in the unreleased changelog. Co-Authored-By: OpenAI Codex --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da19ad9b6..876877a4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Added + +- Added `nextSteps` hint lines to MCP `structuredContent` and CLI `--output json` envelopes so agents can consume follow-up actions without scraping text. CLI JSON renders shell command lines; MCP structured content renders MCP tool-call hints. + ## [2.5.2] ### Changed From 392767dd8a617712d796784fdd15b9424926b513 Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Sat, 16 May 2026 09:32:42 +0100 Subject: [PATCH 04/24] fix(responses): Respect MCP minimal render defaults Use the runtime option as the default text output style only when callers do not pass an explicit output style. This keeps MCP resource rendering minimal while still allowing CLI callers to opt into minimal output. Co-Authored-By: OpenAI Codex --- .../__tests__/text-render-parity.test.ts | 59 ++++++++++--------- src/rendering/render.ts | 2 +- 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/src/rendering/__tests__/text-render-parity.test.ts b/src/rendering/__tests__/text-render-parity.test.ts index 1caaf03a4..49a0c81c2 100644 --- a/src/rendering/__tests__/text-render-parity.test.ts +++ b/src/rendering/__tests__/text-render-parity.test.ts @@ -341,37 +341,42 @@ describe('text render parity', () => { }); it('omits header frontmatter for minimal style text transcripts', () => { - const output = renderTranscript( - { - items: [], - structuredOutput: { - schema: 'xcodebuildmcp.output.build-run-result', - schemaVersion: '1.0.0', - result: { - kind: 'build-run-result', - request: { - scheme: 'MyApp', - projectPath: '/tmp/MyApp.xcodeproj', - configuration: 'Debug', - platform: 'iOS Simulator', - }, - didError: false, - error: null, - summary: { status: 'SUCCEEDED', durationMs: 5000 }, - artifacts: { appPath: '/tmp/build/MyApp.app', buildLogPath: '/tmp/build.log' }, - diagnostics: { warnings: [], errors: [] }, + const input = { + items: [], + structuredOutput: { + schema: 'xcodebuildmcp.output.build-run-result', + schemaVersion: '1.0.0', + result: { + kind: 'build-run-result' as const, + request: { + scheme: 'MyApp', + projectPath: '/tmp/MyApp.xcodeproj', + configuration: 'Debug', + platform: 'iOS Simulator', }, + didError: false, + error: null, + summary: { status: 'SUCCEEDED' as const, durationMs: 5000 }, + artifacts: { appPath: '/tmp/build/MyApp.app', buildLogPath: '/tmp/build.log' }, + diagnostics: { warnings: [], errors: [] }, }, }, - 'text', - { outputStyle: 'minimal' }, - ); + }; + + const output = renderTranscript(input, 'text', { outputStyle: 'minimal' }); + const mcpDefaultOutput = renderTranscript(input, 'text', { runtime: 'mcp' }); + const cliOverrideOutput = renderTranscript(input, 'text', { + runtime: 'cli', + outputStyle: 'minimal', + }); - expect(output).toContain('🚀 Build & Run'); - expect(output).not.toContain('Scheme: MyApp'); - expect(output).not.toContain('Project: /tmp/MyApp.xcodeproj'); - expect(output).not.toContain('Configuration: Debug'); - expect(output).toContain('✅ Build succeeded. (⏱️ 5.0s)'); + for (const rendered of [output, mcpDefaultOutput, cliOverrideOutput]) { + expect(rendered).toContain('🚀 Build & Run'); + expect(rendered).not.toContain('Scheme: MyApp'); + expect(rendered).not.toContain('Project: /tmp/MyApp.xcodeproj'); + expect(rendered).not.toContain('Configuration: Debug'); + expect(rendered).toContain('✅ Build succeeded. (⏱️ 5.0s)'); + } }); it('defaults minimal style text transcripts to tree artifact paths unless explicitly overridden', () => { diff --git a/src/rendering/render.ts b/src/rendering/render.ts index 4ce03de0d..2b0d6fded 100644 --- a/src/rendering/render.ts +++ b/src/rendering/render.ts @@ -100,7 +100,7 @@ function createRenderHooks( const suppressWarnings = sessionStore.get('suppressWarnings'); const config = getConfig(); const showTestTiming = config.showTestTiming; - const outputStyle = options.outputStyle ?? 'normal'; + const outputStyle = options.outputStyle ?? (options.runtime === 'mcp' ? 'minimal' : 'normal'); const filePathRenderStyle = resolveFilePathRenderStyle({ explicit: options.filePathRenderStyle, configured: config.filePathRenderStyle, From 34fd3c774110e31b996f676959d3fc84f0000e32 Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Sat, 16 May 2026 09:41:03 +0100 Subject: [PATCH 05/24] test(snapshot): Avoid filtering device snapshot tests Run the device snapshot file separately from the JSON parity files so the package script does not rely on a global Vitest name filter for every file. Keep the device workflow filter scoped to the parity files where it selects only the device suites. Co-Authored-By: OpenAI Codex --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c058ebbe1..e93d9a3e9 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "test:schema-fixtures": "vitest run --config vitest.snapshot.config.ts src/snapshot-tests/__tests__/json-fixture-schema.test.ts", "test:snapshot": "npm run build && node build/cli.js daemon stop 2>/dev/null; vitest run --config vitest.snapshot.config.ts", "test:snapshots": "npm run test:snapshot", - "test:snapshot:device": "npm run build && node build/cli.js daemon stop 2>/dev/null; vitest run --config vitest.snapshot.config.ts src/snapshot-tests/__tests__/device.snapshot.test.ts src/snapshot-tests/__tests__/cli-json-fixture-parity.snapshot.test.ts src/snapshot-tests/__tests__/mcp-json-fixture-parity.snapshot.test.ts -t 'device workflow'", + "test:snapshot:device": "npm run build && node build/cli.js daemon stop 2>/dev/null; vitest run --config vitest.snapshot.config.ts src/snapshot-tests/__tests__/device.snapshot.test.ts && vitest run --config vitest.snapshot.config.ts src/snapshot-tests/__tests__/cli-json-fixture-parity.snapshot.test.ts src/snapshot-tests/__tests__/mcp-json-fixture-parity.snapshot.test.ts -t 'device workflow'", "test:snapshot:update": "npm run build && node build/cli.js daemon stop 2>/dev/null; UPDATE_SNAPSHOTS=1 vitest run --config vitest.snapshot.config.ts", "test:snapshots:update": "npm run test:snapshot:update", "test:smoke": "npm run build && vitest run --config vitest.smoke.config.ts", From 95e8168833cc638e5f381b7c57c69006b4ccd763 Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Sat, 16 May 2026 14:41:57 +0100 Subject: [PATCH 06/24] fix(responses): Preserve configured rendering details Respect configured file path rendering before applying runtime verbosity defaults. Append next steps to an existing text content item even when a later non-text item is present, so mixed-content responses do not silently drop guidance. Co-Authored-By: OpenAI Codex --- .../__tests__/file-path-render-style.test.ts | 28 +++++++++++++ src/utils/file-path-render-style.ts | 5 +-- .../__tests__/next-steps-renderer.test.ts | 42 ++++++++++++++++++- src/utils/responses/next-steps-renderer.ts | 22 +++++++++- 4 files changed, 90 insertions(+), 7 deletions(-) create mode 100644 src/utils/__tests__/file-path-render-style.test.ts diff --git a/src/utils/__tests__/file-path-render-style.test.ts b/src/utils/__tests__/file-path-render-style.test.ts new file mode 100644 index 000000000..c8f944d92 --- /dev/null +++ b/src/utils/__tests__/file-path-render-style.test.ts @@ -0,0 +1,28 @@ +import { describe, expect, it } from 'vitest'; +import { resolveFilePathRenderStyle } from '../file-path-render-style.ts'; + +describe('resolveFilePathRenderStyle', () => { + it('uses explicit render style before configured and output-style defaults', () => { + expect( + resolveFilePathRenderStyle({ + explicit: 'tree', + configured: 'list', + outputStyle: 'normal', + }), + ).toBe('tree'); + }); + + it('uses configured render style before minimal output-style defaults', () => { + expect( + resolveFilePathRenderStyle({ + configured: 'list', + outputStyle: 'minimal', + }), + ).toBe('list'); + }); + + it('defaults minimal output to tree and normal output to list', () => { + expect(resolveFilePathRenderStyle({ outputStyle: 'minimal' })).toBe('tree'); + expect(resolveFilePathRenderStyle({ outputStyle: 'normal' })).toBe('list'); + }); +}); diff --git a/src/utils/file-path-render-style.ts b/src/utils/file-path-render-style.ts index 7a12fcb74..66b30dd35 100644 --- a/src/utils/file-path-render-style.ts +++ b/src/utils/file-path-render-style.ts @@ -11,9 +11,6 @@ export function resolveFilePathRenderStyle(options: { outputStyle?: OutputStyle; }): FilePathRenderStyle { return ( - options.explicit ?? - (options.outputStyle === 'minimal' ? 'tree' : undefined) ?? - options.configured ?? - 'list' + options.explicit ?? options.configured ?? (options.outputStyle === 'minimal' ? 'tree' : 'list') ); } diff --git a/src/utils/responses/__tests__/next-steps-renderer.test.ts b/src/utils/responses/__tests__/next-steps-renderer.test.ts index fb4707337..402646b8a 100644 --- a/src/utils/responses/__tests__/next-steps-renderer.test.ts +++ b/src/utils/responses/__tests__/next-steps-renderer.test.ts @@ -1,5 +1,9 @@ import { describe, it, expect } from 'vitest'; -import { renderNextStep, renderNextStepsSection } from '../next-steps-renderer.ts'; +import { + processToolResponse, + renderNextStep, + renderNextStepsSection, +} from '../next-steps-renderer.ts'; import type { NextStep } from '../../../types/common.ts'; describe('next-steps-renderer', () => { @@ -191,6 +195,42 @@ describe('next-steps-renderer', () => { }); }); + describe('processToolResponse', () => { + it('appends next steps to the last text content item even when a non-text item follows', () => { + const result = processToolResponse( + { + content: [ + { type: 'text', text: 'Initial text' }, + { type: 'image', data: 'base64', mimeType: 'image/png' }, + ], + nextSteps: [{ tool: 'open_sim', label: 'Open Simulator' }], + }, + 'mcp', + ); + + expect(result.content).toEqual([ + { type: 'text', text: 'Initial text\n\nNext steps:\n1. Open Simulator: open_sim()' }, + { type: 'image', data: 'base64', mimeType: 'image/png' }, + ]); + expect(result).not.toHaveProperty('nextSteps'); + }); + + it('adds a new text item when no text content exists', () => { + const result = processToolResponse( + { + content: [{ type: 'image', data: 'base64', mimeType: 'image/png' }], + nextSteps: [{ tool: 'open_sim', label: 'Open Simulator' }], + }, + 'mcp', + ); + + expect(result.content).toEqual([ + { type: 'image', data: 'base64', mimeType: 'image/png' }, + { type: 'text', text: 'Next steps:\n1. Open Simulator: open_sim()' }, + ]); + }); + }); + describe('renderNextStepsSection', () => { it('should return empty string for empty steps', () => { const result = renderNextStepsSection([], 'cli'); diff --git a/src/utils/responses/next-steps-renderer.ts b/src/utils/responses/next-steps-renderer.ts index 83961c3ce..b68255533 100644 --- a/src/utils/responses/next-steps-renderer.ts +++ b/src/utils/responses/next-steps-renderer.ts @@ -34,8 +34,26 @@ export function processToolResponse(response: ToolResponse, runtime: RuntimeKind ...lastItem, text: lastItem.text + '\n\n' + nextStepsSection, }; - } else if (!processedContent.some((item) => item.type === 'text') && nextStepsSection) { - processedContent.push({ type: 'text', text: nextStepsSection.trim() }); + } else { + let textItemIndex = -1; + for (let index = processedContent.length - 1; index >= 0; index -= 1) { + if (processedContent[index]?.type === 'text') { + textItemIndex = index; + break; + } + } + + if (textItemIndex >= 0) { + const textItem = processedContent[textItemIndex]; + if (textItem?.type === 'text') { + processedContent[textItemIndex] = { + ...textItem, + text: textItem.text + '\n\n' + nextStepsSection, + }; + } + } else if (nextStepsSection) { + processedContent.push({ type: 'text', text: nextStepsSection.trim() }); + } } return { ...rest, content: processedContent }; From 63e8dcf8bd0c1815053bcc4380889e2541408b56 Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Sat, 16 May 2026 14:42:07 +0100 Subject: [PATCH 07/24] fix(xcode-ide): Align daemon bridge schema version Return the current xcode bridge call-result schema version from daemon routed invocations and update the JSON fixtures that exercise that contract. Co-Authored-By: OpenAI Codex --- src/daemon/__tests__/tool-invoke-streaming.test.ts | 2 +- src/daemon/daemon-server.ts | 2 +- .../cli/json/xcode-ide/documentation-search--success.json | 2 +- .../__fixtures__/cli/json/xcode-ide/list-tools--success.json | 2 +- .../mcp/json/xcode-ide/documentation-search--success.json | 2 +- .../__fixtures__/mcp/json/xcode-ide/list-tools--success.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/daemon/__tests__/tool-invoke-streaming.test.ts b/src/daemon/__tests__/tool-invoke-streaming.test.ts index 7566b0c74..780a545b7 100644 --- a/src/daemon/__tests__/tool-invoke-streaming.test.ts +++ b/src/daemon/__tests__/tool-invoke-streaming.test.ts @@ -246,7 +246,7 @@ describe('daemon tool.invoke streaming', () => { expect(result.isError).toBe(true); expect(result.structuredOutput).toEqual({ schema: 'xcodebuildmcp.output.xcode-bridge-call-result', - schemaVersion: '2', + schemaVersion: '3', result: { kind: 'xcode-bridge-call-result', remoteTool: 'FailingRemote', diff --git a/src/daemon/daemon-server.ts b/src/daemon/daemon-server.ts index 4e350acee..b9c81869f 100644 --- a/src/daemon/daemon-server.ts +++ b/src/daemon/daemon-server.ts @@ -56,7 +56,7 @@ function bridgeResultToDaemonResult( return { structuredOutput: { schema: 'xcodebuildmcp.output.xcode-bridge-call-result', - schemaVersion: '2', + schemaVersion: '3', result, }, isError: result.didError, diff --git a/src/snapshot-tests/__fixtures__/cli/json/xcode-ide/documentation-search--success.json b/src/snapshot-tests/__fixtures__/cli/json/xcode-ide/documentation-search--success.json index 48d791f32..f7f7a3295 100644 --- a/src/snapshot-tests/__fixtures__/cli/json/xcode-ide/documentation-search--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/xcode-ide/documentation-search--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.xcode-bridge-call-result", - "schemaVersion": "2", + "schemaVersion": "3", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/cli/json/xcode-ide/list-tools--success.json b/src/snapshot-tests/__fixtures__/cli/json/xcode-ide/list-tools--success.json index f73bf9ba8..3409ca048 100644 --- a/src/snapshot-tests/__fixtures__/cli/json/xcode-ide/list-tools--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/xcode-ide/list-tools--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.xcode-bridge-tool-list", - "schemaVersion": "2", + "schemaVersion": "3", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/documentation-search--success.json b/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/documentation-search--success.json index 48d791f32..f7f7a3295 100644 --- a/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/documentation-search--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/documentation-search--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.xcode-bridge-call-result", - "schemaVersion": "2", + "schemaVersion": "3", "didError": false, "error": null, "data": { diff --git a/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/list-tools--success.json b/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/list-tools--success.json index f73bf9ba8..3409ca048 100644 --- a/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/list-tools--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/xcode-ide/list-tools--success.json @@ -1,6 +1,6 @@ { "schema": "xcodebuildmcp.output.xcode-bridge-tool-list", - "schemaVersion": "2", + "schemaVersion": "3", "didError": false, "error": null, "data": { From 0a873b1e4df05b9cca7a6779c86ac800e8c5737b Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Sat, 16 May 2026 14:42:21 +0100 Subject: [PATCH 08/24] test(snapshot): Normalize volatile runtime fixture values Cover additional CLI and MCP snapshot surfaces by normalizing volatile process, device, Xcode, cache, and user values. Add the missing MCP text fixture for session profile persistence so the runtime mode matrix stays complete. Co-Authored-By: OpenAI Codex --- .../json/device/build-and-run--success.json | 2 +- .../cli/json/device/launch--success.json | 2 +- .../cli/json/device/list--success.json | 8 +- .../show-build-settings--success.json | 110 +++++++++--------- .../text/device/build-and-run--success.txt | 2 +- .../cli/text/device/launch--success.txt | 2 +- .../cli/text/device/list--success.txt | 8 +- .../show-build-settings--success.txt | 100 ++++++++-------- .../mcp/json/device/list--success.json | 8 +- .../show-build-settings--success.json | 110 +++++++++--------- .../mcp/text/device/list--success.txt | 8 +- .../show-build-settings--success.txt | 100 ++++++++-------- .../mcp/text/resources/devices--success.txt | 8 +- ...-use-defaults-profile--persist-success.txt | 7 ++ .../__tests__/json-normalize.test.ts | 46 ++++++++ .../__tests__/normalize.test.ts | 26 +++++ src/snapshot-tests/json-normalize.ts | 43 ++++++- src/snapshot-tests/normalize.ts | 24 +++- 18 files changed, 374 insertions(+), 240 deletions(-) create mode 100644 src/snapshot-tests/__fixtures__/mcp/text/session-management/session-use-defaults-profile--persist-success.txt diff --git a/src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--success.json b/src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--success.json index 9170ce9d7..a2dcd967b 100644 --- a/src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/build-and-run--success.json @@ -31,6 +31,6 @@ } }, "nextSteps": [ - "Stop app on device: xcodebuildmcp device stop --device-id --process-id 30015" + "Stop app on device: xcodebuildmcp device stop --device-id --process-id " ] } diff --git a/src/snapshot-tests/__fixtures__/cli/json/device/launch--success.json b/src/snapshot-tests/__fixtures__/cli/json/device/launch--success.json index 579fa1edd..a9a6df89d 100644 --- a/src/snapshot-tests/__fixtures__/cli/json/device/launch--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/launch--success.json @@ -18,6 +18,6 @@ } }, "nextSteps": [ - "Stop the app: xcodebuildmcp device stop --device-id --process-id 30016" + "Stop the app: xcodebuildmcp device stop --device-id --process-id " ] } diff --git a/src/snapshot-tests/__fixtures__/cli/json/device/list--success.json b/src/snapshot-tests/__fixtures__/cli/json/device/list--success.json index 7afe3306d..dec53ae83 100644 --- a/src/snapshot-tests/__fixtures__/cli/json/device/list--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/device/list--success.json @@ -11,7 +11,7 @@ "platform": "iOS", "state": "connected", "isAvailable": true, - "osVersion": "26.4.2" + "osVersion": "" }, { "name": "iPhone", @@ -19,7 +19,7 @@ "platform": "iOS", "state": "disconnected", "isAvailable": false, - "osVersion": "26.1" + "osVersion": "" }, { "name": "Cameron’s Apple Watch", @@ -27,7 +27,7 @@ "platform": "watchOS", "state": "disconnected", "isAvailable": false, - "osVersion": "10.6.1" + "osVersion": "" }, { "name": "Cameron’s Apple Watch", @@ -35,7 +35,7 @@ "platform": "watchOS", "state": "connected", "isAvailable": true, - "osVersion": "26.3" + "osVersion": "" } ] }, diff --git a/src/snapshot-tests/__fixtures__/cli/json/project-discovery/show-build-settings--success.json b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/show-build-settings--success.json index 83963d529..7a0a28f36 100644 --- a/src/snapshot-tests/__fixtures__/cli/json/project-discovery/show-build-settings--success.json +++ b/src/snapshot-tests/__fixtures__/cli/json/project-discovery/show-build-settings--success.json @@ -43,7 +43,7 @@ }, { "key": "ALTERNATE_OWNER", - "value": "cameroncooke" + "value": "" }, { "key": "ALTERNATIVE_DISTRIBUTION_WEB", @@ -123,11 +123,11 @@ }, { "key": "ASSETCATALOG_FILTER_FOR_DEVICE_MODEL", - "value": "MacFamily20,1" + "value": "" }, { "key": "ASSETCATALOG_FILTER_FOR_DEVICE_OS_VERSION", - "value": "26.3" + "value": "" }, { "key": "ASSETCATALOG_FILTER_FOR_THINNING_DEVICE_CONFIGURATION", @@ -215,11 +215,11 @@ }, { "key": "CACHE_ROOT", - "value": "/var/folders/_t/2njffz894t57qpp76v1sw__h0000gn/C/com.apple.DeveloperTools/26.4-17E192/Xcode" + "value": "" }, { "key": "CCHROOT", - "value": "/var/folders/_t/2njffz894t57qpp76v1sw__h0000gn/C/com.apple.DeveloperTools/26.4-17E192/Xcode" + "value": "" }, { "key": "CHMOD", @@ -467,7 +467,7 @@ }, { "key": "CORRESPONDING_SIMULATOR_PLATFORM_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneSimulator.platform" }, { "key": "CORRESPONDING_SIMULATOR_PLATFORM_NAME", @@ -475,7 +475,7 @@ }, { "key": "CORRESPONDING_SIMULATOR_SDK_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.4.sdk" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.4.sdk" }, { "key": "CORRESPONDING_SIMULATOR_SDK_NAME", @@ -567,39 +567,39 @@ }, { "key": "DEVELOPER_APPLICATIONS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications" }, { "key": "DEVELOPER_BIN_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr/bin" + "value": "/Applications/Xcode-.app/Contents/Developer/usr/bin" }, { "key": "DEVELOPER_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer" + "value": "/Applications/Xcode-.app/Contents/Developer" }, { "key": "DEVELOPER_FRAMEWORKS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library/Frameworks" + "value": "/Applications/Xcode-.app/Contents/Developer/Library/Frameworks" }, { "key": "DEVELOPER_FRAMEWORKS_DIR_QUOTED", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library/Frameworks" + "value": "/Applications/Xcode-.app/Contents/Developer/Library/Frameworks" }, { "key": "DEVELOPER_LIBRARY_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library" + "value": "/Applications/Xcode-.app/Contents/Developer/Library" }, { "key": "DEVELOPER_SDK_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" }, { "key": "DEVELOPER_TOOLS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Tools" }, { "key": "DEVELOPER_USR_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr" + "value": "/Applications/Xcode-.app/Contents/Developer/usr" }, { "key": "DEVELOPMENT_LANGUAGE", @@ -635,7 +635,7 @@ }, { "key": "DT_TOOLCHAIN_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" + "value": "/Applications/Xcode-.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" }, { "key": "DUMP_DEPENDENCIES", @@ -1155,7 +1155,7 @@ }, { "key": "INSTALL_OWNER", - "value": "cameroncooke" + "value": "" }, { "key": "INSTALL_PATH", @@ -1287,7 +1287,7 @@ }, { "key": "LEGACY_DEVELOPER_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer" + "value": "/Applications/Xcode-.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer" }, { "key": "LEX", @@ -1515,7 +1515,7 @@ }, { "key": "PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES", - "value": "/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode-26.4.0.app/Contents/Developer/Headers /Applications/Xcode-26.4.0.app/Contents/Developer/SDKs /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms" + "value": "/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode-.app/Contents/Developer/Headers /Applications/Xcode-.app/Contents/Developer/SDKs /Applications/Xcode-.app/Contents/Developer/Platforms" }, { "key": "PBDEVELOPMENTPLIST_PATH", @@ -1543,31 +1543,31 @@ }, { "key": "PLATFORM_DEVELOPER_APPLICATIONS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications" }, { "key": "PLATFORM_DEVELOPER_BIN_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin" }, { "key": "PLATFORM_DEVELOPER_LIBRARY_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library" }, { "key": "PLATFORM_DEVELOPER_SDK_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs" }, { "key": "PLATFORM_DEVELOPER_TOOLS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Tools" }, { "key": "PLATFORM_DEVELOPER_USR_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr" }, { "key": "PLATFORM_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform" }, { "key": "PLATFORM_DISPLAY_NAME", @@ -1795,19 +1795,19 @@ }, { "key": "SDKROOT", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" }, { "key": "SDK_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" }, { "key": "SDK_DIR_iphoneos", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" }, { "key": "SDK_DIR_iphoneos26_4", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" }, { "key": "SDK_NAME", @@ -1831,7 +1831,7 @@ }, { "key": "SDK_STAT_CACHE_PATH", - "value": "/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos26.4-23E237-c1e9a37d8fcda5dee89abd67dc927a23.sdkstatcache" + "value": "" }, { "key": "SDK_VERSION", @@ -2039,59 +2039,59 @@ }, { "key": "SYSTEM_DEVELOPER_APPS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications" }, { "key": "SYSTEM_DEVELOPER_BIN_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr/bin" + "value": "/Applications/Xcode-.app/Contents/Developer/usr/bin" }, { "key": "SYSTEM_DEVELOPER_DEMOS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Utilities/Built Examples" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications/Utilities/Built Examples" }, { "key": "SYSTEM_DEVELOPER_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer" + "value": "/Applications/Xcode-.app/Contents/Developer" }, { "key": "SYSTEM_DEVELOPER_DOC_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library" + "value": "/Applications/Xcode-.app/Contents/Developer/ADC Reference Library" }, { "key": "SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Graphics Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications/Graphics Tools" }, { "key": "SYSTEM_DEVELOPER_JAVA_TOOLS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Java Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications/Java Tools" }, { "key": "SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Performance Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications/Performance Tools" }, { "key": "SYSTEM_DEVELOPER_RELEASENOTES_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/releasenotes" + "value": "/Applications/Xcode-.app/Contents/Developer/ADC Reference Library/releasenotes" }, { "key": "SYSTEM_DEVELOPER_TOOLS", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Tools" }, { "key": "SYSTEM_DEVELOPER_TOOLS_DOC_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools" + "value": "/Applications/Xcode-.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools" }, { "key": "SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools" + "value": "/Applications/Xcode-.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools" }, { "key": "SYSTEM_DEVELOPER_USR_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr" + "value": "/Applications/Xcode-.app/Contents/Developer/usr" }, { "key": "SYSTEM_DEVELOPER_UTILITIES_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Utilities" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications/Utilities" }, { "key": "SYSTEM_DEXT_INSTALL_PATH", @@ -2163,11 +2163,11 @@ }, { "key": "TARGET_DEVICE_MODEL", - "value": "Mac16,8" + "value": "" }, { "key": "TARGET_DEVICE_OS_VERSION", - "value": "26.3.1" + "value": "" }, { "key": "TARGET_DEVICE_PLATFORM_NAME", @@ -2203,11 +2203,11 @@ }, { "key": "TEST_FRAMEWORK_SEARCH_PATHS", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk/Developer/Library/Frameworks" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk/Developer/Library/Frameworks" }, { "key": "TEST_LIBRARY_SEARCH_PATHS", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib" }, { "key": "TOOLCHAINS", @@ -2215,7 +2215,7 @@ }, { "key": "TOOLCHAIN_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" + "value": "/Applications/Xcode-.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" }, { "key": "TREAT_MISSING_BASELINES_AS_TEST_FAILURES", @@ -2231,7 +2231,7 @@ }, { "key": "UID", - "value": "501" + "value": "" }, { "key": "UNINSTALLED_PRODUCTS_DIR", @@ -2255,7 +2255,7 @@ }, { "key": "USER", - "value": "cameroncooke" + "value": "" }, { "key": "USER_APPS_DIR", @@ -2299,7 +2299,7 @@ }, { "key": "VERSION_INFO_BUILDER", - "value": "cameroncooke" + "value": "" }, { "key": "VERSION_INFO_FILE", @@ -2335,7 +2335,7 @@ }, { "key": "XCODE_APP_SUPPORT_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library/Xcode" + "value": "/Applications/Xcode-.app/Contents/Developer/Library/Xcode" }, { "key": "XCODE_PRODUCT_BUILD_VERSION", diff --git a/src/snapshot-tests/__fixtures__/cli/text/device/build-and-run--success.txt b/src/snapshot-tests/__fixtures__/cli/text/device/build-and-run--success.txt index 77ad24e8e..64e22805e 100644 --- a/src/snapshot-tests/__fixtures__/cli/text/device/build-and-run--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/device/build-and-run--success.txt @@ -23,4 +23,4 @@ └ Build Logs: ~/Library/Developer/XcodeBuildMCP/workspaces/XcodeBuildMCP-/logs/build_run_device__pid.log Next steps: -1. Stop app on device: xcodebuildmcp device stop --device-id --process-id 31269 +1. Stop app on device: xcodebuildmcp device stop --device-id --process-id diff --git a/src/snapshot-tests/__fixtures__/cli/text/device/launch--success.txt b/src/snapshot-tests/__fixtures__/cli/text/device/launch--success.txt index 2ecef7345..f1366bc66 100644 --- a/src/snapshot-tests/__fixtures__/cli/text/device/launch--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/device/launch--success.txt @@ -8,4 +8,4 @@ └ Process ID: Next steps: -1. Stop the app: xcodebuildmcp device stop --device-id --process-id 31270 +1. Stop the app: xcodebuildmcp device stop --device-id --process-id diff --git a/src/snapshot-tests/__fixtures__/cli/text/device/list--success.txt b/src/snapshot-tests/__fixtures__/cli/text/device/list--success.txt index dfd2c44b2..1c3292ba1 100644 --- a/src/snapshot-tests/__fixtures__/cli/text/device/list--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/device/list--success.txt @@ -4,21 +4,21 @@ iOS Devices: 📱 [] Cameron’s iPhone 16 Pro Max - OS: 26.4.2 + OS: UDID: 📱 [] iPhone - OS: 26.1 + OS: UDID: watchOS Devices: ⌚️ [] Cameron’s Apple Watch - OS: 10.6.1 + OS: UDID: ⌚️ [] Cameron’s Apple Watch - OS: 26.3 + OS: UDID: ✅ 4 physical devices discovered (2 iOS, 2 watchOS). diff --git a/src/snapshot-tests/__fixtures__/cli/text/project-discovery/show-build-settings--success.txt b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/show-build-settings--success.txt index 07b542f7f..f19b61292 100644 --- a/src/snapshot-tests/__fixtures__/cli/text/project-discovery/show-build-settings--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/project-discovery/show-build-settings--success.txt @@ -35,8 +35,8 @@ Settings ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor - ASSETCATALOG_FILTER_FOR_DEVICE_MODEL = MacFamily20,1 - ASSETCATALOG_FILTER_FOR_DEVICE_OS_VERSION = 26.3 + ASSETCATALOG_FILTER_FOR_DEVICE_MODEL = + ASSETCATALOG_FILTER_FOR_DEVICE_OS_VERSION = ASSETCATALOG_FILTER_FOR_THINNING_DEVICE_CONFIGURATION = MacFamily20,1 AUTOMATICALLY_MERGE_DEPENDENCIES = NO AUTOMATION_APPLE_EVENTS = NO @@ -58,8 +58,8 @@ Settings BUNDLE_PLUGINS_FOLDER_PATH = PlugIns BUNDLE_PRIVATE_HEADERS_FOLDER_PATH = PrivateHeaders BUNDLE_PUBLIC_HEADERS_FOLDER_PATH = Headers - CACHE_ROOT = /var/folders/_t/2njffz894t57qpp76v1sw__h0000gn/C/com.apple.DeveloperTools/26.4-17E192/Xcode - CCHROOT = /var/folders/_t/2njffz894t57qpp76v1sw__h0000gn/C/com.apple.DeveloperTools/26.4-17E192/Xcode + CACHE_ROOT = + CCHROOT = CHMOD = /bin/chmod CHOWN = chown CLANG_ANALYZER_NONNULL = YES @@ -121,9 +121,9 @@ Settings COPYING_PRESERVES_HFS_DATA = NO COPY_HEADERS_RUN_UNIFDEF = NO COPY_PHASE_STRIP = NO - CORRESPONDING_SIMULATOR_PLATFORM_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform + CORRESPONDING_SIMULATOR_PLATFORM_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneSimulator.platform CORRESPONDING_SIMULATOR_PLATFORM_NAME = iphonesimulator - CORRESPONDING_SIMULATOR_SDK_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.4.sdk + CORRESPONDING_SIMULATOR_SDK_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.4.sdk CORRESPONDING_SIMULATOR_SDK_NAME = iphonesimulator26.4 CP = /bin/cp CREATE_INFOPLIST_SECTION_IN_BINARY = NO @@ -146,15 +146,15 @@ Settings DERIVED_FILE_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/DerivedSources DERIVED_SOURCES_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/DerivedSources DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = NO - DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications - DEVELOPER_BIN_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/usr/bin - DEVELOPER_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer - DEVELOPER_FRAMEWORKS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Library/Frameworks - DEVELOPER_FRAMEWORKS_DIR_QUOTED = /Applications/Xcode-26.4.0.app/Contents/Developer/Library/Frameworks - DEVELOPER_LIBRARY_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Library - DEVELOPER_SDK_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs - DEVELOPER_TOOLS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Tools - DEVELOPER_USR_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/usr + DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications + DEVELOPER_BIN_DIR = /Applications/Xcode-.app/Contents/Developer/usr/bin + DEVELOPER_DIR = /Applications/Xcode-.app/Contents/Developer + DEVELOPER_FRAMEWORKS_DIR = /Applications/Xcode-.app/Contents/Developer/Library/Frameworks + DEVELOPER_FRAMEWORKS_DIR_QUOTED = /Applications/Xcode-.app/Contents/Developer/Library/Frameworks + DEVELOPER_LIBRARY_DIR = /Applications/Xcode-.app/Contents/Developer/Library + DEVELOPER_SDK_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs + DEVELOPER_TOOLS_DIR = /Applications/Xcode-.app/Contents/Developer/Tools + DEVELOPER_USR_DIR = /Applications/Xcode-.app/Contents/Developer/usr DEVELOPMENT_LANGUAGE = en DEVELOPMENT_TEAM = BR6WD3M6ZD DIAGNOSE_MISSING_TARGET_DEPENDENCIES = YES @@ -163,7 +163,7 @@ Settings DONT_GENERATE_INFOPLIST_FILE = NO DRIVERKIT_DEPLOYMENT_TARGET = 25.4 DSTROOT = /tmp/CalculatorApp.dst - DT_TOOLCHAIN_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain + DT_TOOLCHAIN_DIR = /Applications/Xcode-.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain DUMP_DEPENDENCIES = NO DUMP_DEPENDENCIES_OUTPUT_PATH = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/CalculatorApp-BuildDependencyInfo.json DWARF_DSYM_FILE_NAME = CalculatorApp.app.dSYM @@ -326,7 +326,7 @@ Settings LD_SHARED_CACHE_ELIGIBLE = Automatic LD_WARN_DUPLICATE_LIBRARIES = NO LD_WARN_UNUSED_DYLIBS = NO - LEGACY_DEVELOPER_DIR = /Applications/Xcode-26.4.0.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer + LEGACY_DEVELOPER_DIR = /Applications/Xcode-.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer LEX = lex LIBRARY_DEXT_INSTALL_PATH = /Library/DriverExtensions LIBRARY_FLAG_NOSPACE = YES @@ -383,20 +383,20 @@ Settings PACKAGE_TYPE = com.apple.package-type.wrapper.application PASCAL_STRINGS = YES PATH = - PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES = /usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode-26.4.0.app/Contents/Developer/Headers /Applications/Xcode-26.4.0.app/Contents/Developer/SDKs /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms + PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES = /usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode-.app/Contents/Developer/Headers /Applications/Xcode-.app/Contents/Developer/SDKs /Applications/Xcode-.app/Contents/Developer/Platforms PBDEVELOPMENTPLIST_PATH = CalculatorApp.app/pbdevelopment.plist PER_ARCH_MODULE_FILE_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/undefined_arch PER_ARCH_OBJECT_FILE_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/undefined_arch PER_VARIANT_OBJECT_FILE_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal PKGINFO_FILE_PATH = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/PkgInfo PKGINFO_PATH = CalculatorApp.app/PkgInfo - PLATFORM_DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications - PLATFORM_DEVELOPER_BIN_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin - PLATFORM_DEVELOPER_LIBRARY_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library - PLATFORM_DEVELOPER_SDK_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs - PLATFORM_DEVELOPER_TOOLS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Tools - PLATFORM_DEVELOPER_USR_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr - PLATFORM_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform + PLATFORM_DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications + PLATFORM_DEVELOPER_BIN_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin + PLATFORM_DEVELOPER_LIBRARY_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library + PLATFORM_DEVELOPER_SDK_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs + PLATFORM_DEVELOPER_TOOLS_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Tools + PLATFORM_DEVELOPER_USR_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr + PLATFORM_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform PLATFORM_DISPLAY_NAME = iOS PLATFORM_FAMILY_NAME = iOS PLATFORM_NAME = iphoneos @@ -453,16 +453,16 @@ Settings SCANNING_PCM_KEEP_CACHE_DIRECTORY = YES SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO SCRIPTS_FOLDER_PATH = CalculatorApp.app/Scripts - SDKROOT = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk - SDK_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk - SDK_DIR_iphoneos = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk - SDK_DIR_iphoneos26_4 = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk + SDKROOT = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk + SDK_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk + SDK_DIR_iphoneos = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk + SDK_DIR_iphoneos26_4 = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk SDK_NAME = iphoneos26.4 SDK_NAMES = iphoneos26.4 SDK_PRODUCT_BUILD_VERSION = 23E237 SDK_STAT_CACHE_DIR = /Library/Developer/Xcode/DerivedData SDK_STAT_CACHE_ENABLE = YES - SDK_STAT_CACHE_PATH = /Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos26.4-23E237-c1e9a37d8fcda5dee89abd67dc927a23.sdkstatcache + SDK_STAT_CACHE_PATH = SDK_VERSION = 26.4 SDK_VERSION_ACTUAL = 260400 SDK_VERSION_MAJOR = 260000 @@ -514,20 +514,20 @@ Settings SYSTEM_APPS_DIR = /Applications SYSTEM_CORE_SERVICES_DIR = /System/Library/CoreServices SYSTEM_DEMOS_DIR = /Applications/Extras - SYSTEM_DEVELOPER_APPS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications - SYSTEM_DEVELOPER_BIN_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/usr/bin - SYSTEM_DEVELOPER_DEMOS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Utilities/Built Examples - SYSTEM_DEVELOPER_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer - SYSTEM_DEVELOPER_DOC_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library - SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Graphics Tools - SYSTEM_DEVELOPER_JAVA_TOOLS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Java Tools - SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Performance Tools - SYSTEM_DEVELOPER_RELEASENOTES_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/releasenotes - SYSTEM_DEVELOPER_TOOLS = /Applications/Xcode-26.4.0.app/Contents/Developer/Tools - SYSTEM_DEVELOPER_TOOLS_DOC_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools - SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools - SYSTEM_DEVELOPER_USR_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/usr - SYSTEM_DEVELOPER_UTILITIES_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Utilities + SYSTEM_DEVELOPER_APPS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications + SYSTEM_DEVELOPER_BIN_DIR = /Applications/Xcode-.app/Contents/Developer/usr/bin + SYSTEM_DEVELOPER_DEMOS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications/Utilities/Built Examples + SYSTEM_DEVELOPER_DIR = /Applications/Xcode-.app/Contents/Developer + SYSTEM_DEVELOPER_DOC_DIR = /Applications/Xcode-.app/Contents/Developer/ADC Reference Library + SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications/Graphics Tools + SYSTEM_DEVELOPER_JAVA_TOOLS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications/Java Tools + SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications/Performance Tools + SYSTEM_DEVELOPER_RELEASENOTES_DIR = /Applications/Xcode-.app/Contents/Developer/ADC Reference Library/releasenotes + SYSTEM_DEVELOPER_TOOLS = /Applications/Xcode-.app/Contents/Developer/Tools + SYSTEM_DEVELOPER_TOOLS_DOC_DIR = /Applications/Xcode-.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools + SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR = /Applications/Xcode-.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools + SYSTEM_DEVELOPER_USR_DIR = /Applications/Xcode-.app/Contents/Developer/usr + SYSTEM_DEVELOPER_UTILITIES_DIR = /Applications/Xcode-.app/Contents/Developer/Applications/Utilities SYSTEM_DEXT_INSTALL_PATH = /System/Library/DriverExtensions SYSTEM_DOCUMENTATION_DIR = /Library/Documentation SYSTEM_EXTENSIONS_FOLDER_PATH = CalculatorApp.app/SystemExtensions @@ -545,8 +545,8 @@ Settings TARGETNAME = CalculatorApp TARGET_BUILD_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos TARGET_DEVICE_IDENTIFIER = - TARGET_DEVICE_MODEL = Mac16,8 - TARGET_DEVICE_OS_VERSION = 26.3.1 + TARGET_DEVICE_MODEL = + TARGET_DEVICE_OS_VERSION = TARGET_DEVICE_PLATFORM_NAME = macosx TARGET_NAME = CalculatorApp TARGET_TEMP_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build @@ -555,10 +555,10 @@ Settings TEMP_FILE_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build TEMP_ROOT = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex TEMP_SANDBOX_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/TemporaryTaskSandboxes - TEST_FRAMEWORK_SEARCH_PATHS = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk/Developer/Library/Frameworks - TEST_LIBRARY_SEARCH_PATHS = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib + TEST_FRAMEWORK_SEARCH_PATHS = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk/Developer/Library/Frameworks + TEST_LIBRARY_SEARCH_PATHS = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault - TOOLCHAIN_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain + TOOLCHAIN_DIR = /Applications/Xcode-.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain TREAT_MISSING_BASELINES_AS_TEST_FAILURES = NO TREAT_MISSING_SCRIPT_PHASE_OUTPUTS_AS_ERRORS = NO TVOS_DEPLOYMENT_TARGET = 26.4 @@ -588,7 +588,7 @@ Settings WRAPPER_NAME = CalculatorApp.app WRAPPER_SUFFIX = .app WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES = NO - XCODE_APP_SUPPORT_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Library/Xcode + XCODE_APP_SUPPORT_DIR = /Applications/Xcode-.app/Contents/Developer/Library/Xcode XCODE_PRODUCT_BUILD_VERSION = 17E192 XCODE_VERSION_ACTUAL = 2640 XCODE_VERSION_MAJOR = 2600 diff --git a/src/snapshot-tests/__fixtures__/mcp/json/device/list--success.json b/src/snapshot-tests/__fixtures__/mcp/json/device/list--success.json index fb5f7b05c..456f53efe 100644 --- a/src/snapshot-tests/__fixtures__/mcp/json/device/list--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/device/list--success.json @@ -11,7 +11,7 @@ "platform": "iOS", "state": "connected", "isAvailable": true, - "osVersion": "26.4.2" + "osVersion": "" }, { "name": "iPhone", @@ -19,7 +19,7 @@ "platform": "iOS", "state": "disconnected", "isAvailable": false, - "osVersion": "26.1" + "osVersion": "" }, { "name": "Cameron’s Apple Watch", @@ -27,7 +27,7 @@ "platform": "watchOS", "state": "disconnected", "isAvailable": false, - "osVersion": "10.6.1" + "osVersion": "" }, { "name": "Cameron’s Apple Watch", @@ -35,7 +35,7 @@ "platform": "watchOS", "state": "connected", "isAvailable": true, - "osVersion": "26.3" + "osVersion": "" } ] }, diff --git a/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/show-build-settings--success.json b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/show-build-settings--success.json index 11c12084b..096bc9f68 100644 --- a/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/show-build-settings--success.json +++ b/src/snapshot-tests/__fixtures__/mcp/json/project-discovery/show-build-settings--success.json @@ -43,7 +43,7 @@ }, { "key": "ALTERNATE_OWNER", - "value": "cameroncooke" + "value": "" }, { "key": "ALTERNATIVE_DISTRIBUTION_WEB", @@ -123,11 +123,11 @@ }, { "key": "ASSETCATALOG_FILTER_FOR_DEVICE_MODEL", - "value": "MacFamily20,1" + "value": "" }, { "key": "ASSETCATALOG_FILTER_FOR_DEVICE_OS_VERSION", - "value": "26.3" + "value": "" }, { "key": "ASSETCATALOG_FILTER_FOR_THINNING_DEVICE_CONFIGURATION", @@ -215,11 +215,11 @@ }, { "key": "CACHE_ROOT", - "value": "/var/folders/_t/2njffz894t57qpp76v1sw__h0000gn/C/com.apple.DeveloperTools/26.4-17E192/Xcode" + "value": "" }, { "key": "CCHROOT", - "value": "/var/folders/_t/2njffz894t57qpp76v1sw__h0000gn/C/com.apple.DeveloperTools/26.4-17E192/Xcode" + "value": "" }, { "key": "CHMOD", @@ -467,7 +467,7 @@ }, { "key": "CORRESPONDING_SIMULATOR_PLATFORM_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneSimulator.platform" }, { "key": "CORRESPONDING_SIMULATOR_PLATFORM_NAME", @@ -475,7 +475,7 @@ }, { "key": "CORRESPONDING_SIMULATOR_SDK_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.4.sdk" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.4.sdk" }, { "key": "CORRESPONDING_SIMULATOR_SDK_NAME", @@ -567,39 +567,39 @@ }, { "key": "DEVELOPER_APPLICATIONS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications" }, { "key": "DEVELOPER_BIN_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr/bin" + "value": "/Applications/Xcode-.app/Contents/Developer/usr/bin" }, { "key": "DEVELOPER_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer" + "value": "/Applications/Xcode-.app/Contents/Developer" }, { "key": "DEVELOPER_FRAMEWORKS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library/Frameworks" + "value": "/Applications/Xcode-.app/Contents/Developer/Library/Frameworks" }, { "key": "DEVELOPER_FRAMEWORKS_DIR_QUOTED", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library/Frameworks" + "value": "/Applications/Xcode-.app/Contents/Developer/Library/Frameworks" }, { "key": "DEVELOPER_LIBRARY_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library" + "value": "/Applications/Xcode-.app/Contents/Developer/Library" }, { "key": "DEVELOPER_SDK_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" }, { "key": "DEVELOPER_TOOLS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Tools" }, { "key": "DEVELOPER_USR_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr" + "value": "/Applications/Xcode-.app/Contents/Developer/usr" }, { "key": "DEVELOPMENT_LANGUAGE", @@ -635,7 +635,7 @@ }, { "key": "DT_TOOLCHAIN_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" + "value": "/Applications/Xcode-.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" }, { "key": "DUMP_DEPENDENCIES", @@ -1155,7 +1155,7 @@ }, { "key": "INSTALL_OWNER", - "value": "cameroncooke" + "value": "" }, { "key": "INSTALL_PATH", @@ -1287,7 +1287,7 @@ }, { "key": "LEGACY_DEVELOPER_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer" + "value": "/Applications/Xcode-.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer" }, { "key": "LEX", @@ -1515,7 +1515,7 @@ }, { "key": "PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES", - "value": "/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode-26.4.0.app/Contents/Developer/Headers /Applications/Xcode-26.4.0.app/Contents/Developer/SDKs /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms" + "value": "/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode-.app/Contents/Developer/Headers /Applications/Xcode-.app/Contents/Developer/SDKs /Applications/Xcode-.app/Contents/Developer/Platforms" }, { "key": "PBDEVELOPMENTPLIST_PATH", @@ -1543,31 +1543,31 @@ }, { "key": "PLATFORM_DEVELOPER_APPLICATIONS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications" }, { "key": "PLATFORM_DEVELOPER_BIN_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin" }, { "key": "PLATFORM_DEVELOPER_LIBRARY_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library" }, { "key": "PLATFORM_DEVELOPER_SDK_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs" }, { "key": "PLATFORM_DEVELOPER_TOOLS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Tools" }, { "key": "PLATFORM_DEVELOPER_USR_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr" }, { "key": "PLATFORM_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform" }, { "key": "PLATFORM_DISPLAY_NAME", @@ -1795,19 +1795,19 @@ }, { "key": "SDKROOT", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" }, { "key": "SDK_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" }, { "key": "SDK_DIR_iphoneos", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" }, { "key": "SDK_DIR_iphoneos26_4", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" }, { "key": "SDK_NAME", @@ -1831,7 +1831,7 @@ }, { "key": "SDK_STAT_CACHE_PATH", - "value": "/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos26.4-23E237-c1e9a37d8fcda5dee89abd67dc927a23.sdkstatcache" + "value": "" }, { "key": "SDK_VERSION", @@ -2039,59 +2039,59 @@ }, { "key": "SYSTEM_DEVELOPER_APPS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications" }, { "key": "SYSTEM_DEVELOPER_BIN_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr/bin" + "value": "/Applications/Xcode-.app/Contents/Developer/usr/bin" }, { "key": "SYSTEM_DEVELOPER_DEMOS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Utilities/Built Examples" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications/Utilities/Built Examples" }, { "key": "SYSTEM_DEVELOPER_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer" + "value": "/Applications/Xcode-.app/Contents/Developer" }, { "key": "SYSTEM_DEVELOPER_DOC_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library" + "value": "/Applications/Xcode-.app/Contents/Developer/ADC Reference Library" }, { "key": "SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Graphics Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications/Graphics Tools" }, { "key": "SYSTEM_DEVELOPER_JAVA_TOOLS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Java Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications/Java Tools" }, { "key": "SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Performance Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications/Performance Tools" }, { "key": "SYSTEM_DEVELOPER_RELEASENOTES_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/releasenotes" + "value": "/Applications/Xcode-.app/Contents/Developer/ADC Reference Library/releasenotes" }, { "key": "SYSTEM_DEVELOPER_TOOLS", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Tools" + "value": "/Applications/Xcode-.app/Contents/Developer/Tools" }, { "key": "SYSTEM_DEVELOPER_TOOLS_DOC_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools" + "value": "/Applications/Xcode-.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools" }, { "key": "SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools" + "value": "/Applications/Xcode-.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools" }, { "key": "SYSTEM_DEVELOPER_USR_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/usr" + "value": "/Applications/Xcode-.app/Contents/Developer/usr" }, { "key": "SYSTEM_DEVELOPER_UTILITIES_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Utilities" + "value": "/Applications/Xcode-.app/Contents/Developer/Applications/Utilities" }, { "key": "SYSTEM_DEXT_INSTALL_PATH", @@ -2163,11 +2163,11 @@ }, { "key": "TARGET_DEVICE_MODEL", - "value": "Mac16,8" + "value": "" }, { "key": "TARGET_DEVICE_OS_VERSION", - "value": "26.3.1" + "value": "" }, { "key": "TARGET_DEVICE_PLATFORM_NAME", @@ -2203,11 +2203,11 @@ }, { "key": "TEST_FRAMEWORK_SEARCH_PATHS", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk/Developer/Library/Frameworks" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk/Developer/Library/Frameworks" }, { "key": "TEST_LIBRARY_SEARCH_PATHS", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib" + "value": "/Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib" }, { "key": "TOOLCHAINS", @@ -2215,7 +2215,7 @@ }, { "key": "TOOLCHAIN_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" + "value": "/Applications/Xcode-.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" }, { "key": "TREAT_MISSING_BASELINES_AS_TEST_FAILURES", @@ -2231,7 +2231,7 @@ }, { "key": "UID", - "value": "501" + "value": "" }, { "key": "UNINSTALLED_PRODUCTS_DIR", @@ -2255,7 +2255,7 @@ }, { "key": "USER", - "value": "cameroncooke" + "value": "" }, { "key": "USER_APPS_DIR", @@ -2299,7 +2299,7 @@ }, { "key": "VERSION_INFO_BUILDER", - "value": "cameroncooke" + "value": "" }, { "key": "VERSION_INFO_FILE", @@ -2335,7 +2335,7 @@ }, { "key": "XCODE_APP_SUPPORT_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Library/Xcode" + "value": "/Applications/Xcode-.app/Contents/Developer/Library/Xcode" }, { "key": "XCODE_PRODUCT_BUILD_VERSION", diff --git a/src/snapshot-tests/__fixtures__/mcp/text/device/list--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/device/list--success.txt index 2e094c099..56ea9ee42 100644 --- a/src/snapshot-tests/__fixtures__/mcp/text/device/list--success.txt +++ b/src/snapshot-tests/__fixtures__/mcp/text/device/list--success.txt @@ -4,21 +4,21 @@ iOS Devices: 📱 [] Cameron’s iPhone 16 Pro Max - OS: 26.4.2 + OS: UDID: 📱 [] iPhone - OS: 26.1 + OS: UDID: watchOS Devices: ⌚️ [] Cameron’s Apple Watch - OS: 10.6.1 + OS: UDID: ⌚️ [] Cameron’s Apple Watch - OS: 26.3 + OS: UDID: ✅ 4 physical devices discovered (2 iOS, 2 watchOS). diff --git a/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/show-build-settings--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/show-build-settings--success.txt index 13d5cb6b7..732741b9a 100644 --- a/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/show-build-settings--success.txt +++ b/src/snapshot-tests/__fixtures__/mcp/text/project-discovery/show-build-settings--success.txt @@ -32,8 +32,8 @@ Settings ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor - ASSETCATALOG_FILTER_FOR_DEVICE_MODEL = MacFamily20,1 - ASSETCATALOG_FILTER_FOR_DEVICE_OS_VERSION = 26.3 + ASSETCATALOG_FILTER_FOR_DEVICE_MODEL = + ASSETCATALOG_FILTER_FOR_DEVICE_OS_VERSION = ASSETCATALOG_FILTER_FOR_THINNING_DEVICE_CONFIGURATION = MacFamily20,1 AUTOMATICALLY_MERGE_DEPENDENCIES = NO AUTOMATION_APPLE_EVENTS = NO @@ -55,8 +55,8 @@ Settings BUNDLE_PLUGINS_FOLDER_PATH = PlugIns BUNDLE_PRIVATE_HEADERS_FOLDER_PATH = PrivateHeaders BUNDLE_PUBLIC_HEADERS_FOLDER_PATH = Headers - CACHE_ROOT = /var/folders/_t/2njffz894t57qpp76v1sw__h0000gn/C/com.apple.DeveloperTools/26.4-17E192/Xcode - CCHROOT = /var/folders/_t/2njffz894t57qpp76v1sw__h0000gn/C/com.apple.DeveloperTools/26.4-17E192/Xcode + CACHE_ROOT = + CCHROOT = CHMOD = /bin/chmod CHOWN = chown CLANG_ANALYZER_NONNULL = YES @@ -118,9 +118,9 @@ Settings COPYING_PRESERVES_HFS_DATA = NO COPY_HEADERS_RUN_UNIFDEF = NO COPY_PHASE_STRIP = NO - CORRESPONDING_SIMULATOR_PLATFORM_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform + CORRESPONDING_SIMULATOR_PLATFORM_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneSimulator.platform CORRESPONDING_SIMULATOR_PLATFORM_NAME = iphonesimulator - CORRESPONDING_SIMULATOR_SDK_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.4.sdk + CORRESPONDING_SIMULATOR_SDK_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.4.sdk CORRESPONDING_SIMULATOR_SDK_NAME = iphonesimulator26.4 CP = /bin/cp CREATE_INFOPLIST_SECTION_IN_BINARY = NO @@ -143,15 +143,15 @@ Settings DERIVED_FILE_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/DerivedSources DERIVED_SOURCES_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/DerivedSources DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = NO - DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications - DEVELOPER_BIN_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/usr/bin - DEVELOPER_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer - DEVELOPER_FRAMEWORKS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Library/Frameworks - DEVELOPER_FRAMEWORKS_DIR_QUOTED = /Applications/Xcode-26.4.0.app/Contents/Developer/Library/Frameworks - DEVELOPER_LIBRARY_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Library - DEVELOPER_SDK_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs - DEVELOPER_TOOLS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Tools - DEVELOPER_USR_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/usr + DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications + DEVELOPER_BIN_DIR = /Applications/Xcode-.app/Contents/Developer/usr/bin + DEVELOPER_DIR = /Applications/Xcode-.app/Contents/Developer + DEVELOPER_FRAMEWORKS_DIR = /Applications/Xcode-.app/Contents/Developer/Library/Frameworks + DEVELOPER_FRAMEWORKS_DIR_QUOTED = /Applications/Xcode-.app/Contents/Developer/Library/Frameworks + DEVELOPER_LIBRARY_DIR = /Applications/Xcode-.app/Contents/Developer/Library + DEVELOPER_SDK_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs + DEVELOPER_TOOLS_DIR = /Applications/Xcode-.app/Contents/Developer/Tools + DEVELOPER_USR_DIR = /Applications/Xcode-.app/Contents/Developer/usr DEVELOPMENT_LANGUAGE = en DEVELOPMENT_TEAM = BR6WD3M6ZD DIAGNOSE_MISSING_TARGET_DEPENDENCIES = YES @@ -160,7 +160,7 @@ Settings DONT_GENERATE_INFOPLIST_FILE = NO DRIVERKIT_DEPLOYMENT_TARGET = 25.4 DSTROOT = /tmp/CalculatorApp.dst - DT_TOOLCHAIN_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain + DT_TOOLCHAIN_DIR = /Applications/Xcode-.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain DUMP_DEPENDENCIES = NO DUMP_DEPENDENCIES_OUTPUT_PATH = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/CalculatorApp-BuildDependencyInfo.json DWARF_DSYM_FILE_NAME = CalculatorApp.app.dSYM @@ -323,7 +323,7 @@ Settings LD_SHARED_CACHE_ELIGIBLE = Automatic LD_WARN_DUPLICATE_LIBRARIES = NO LD_WARN_UNUSED_DYLIBS = NO - LEGACY_DEVELOPER_DIR = /Applications/Xcode-26.4.0.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer + LEGACY_DEVELOPER_DIR = /Applications/Xcode-.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer LEX = lex LIBRARY_DEXT_INSTALL_PATH = /Library/DriverExtensions LIBRARY_FLAG_NOSPACE = YES @@ -380,20 +380,20 @@ Settings PACKAGE_TYPE = com.apple.package-type.wrapper.application PASCAL_STRINGS = YES PATH = - PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES = /usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode-26.4.0.app/Contents/Developer/Headers /Applications/Xcode-26.4.0.app/Contents/Developer/SDKs /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms + PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES = /usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode-.app/Contents/Developer/Headers /Applications/Xcode-.app/Contents/Developer/SDKs /Applications/Xcode-.app/Contents/Developer/Platforms PBDEVELOPMENTPLIST_PATH = CalculatorApp.app/pbdevelopment.plist PER_ARCH_MODULE_FILE_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/undefined_arch PER_ARCH_OBJECT_FILE_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal/undefined_arch PER_VARIANT_OBJECT_FILE_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/Objects-normal PKGINFO_FILE_PATH = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build/PkgInfo PKGINFO_PATH = CalculatorApp.app/PkgInfo - PLATFORM_DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications - PLATFORM_DEVELOPER_BIN_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin - PLATFORM_DEVELOPER_LIBRARY_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library - PLATFORM_DEVELOPER_SDK_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs - PLATFORM_DEVELOPER_TOOLS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Tools - PLATFORM_DEVELOPER_USR_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr - PLATFORM_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform + PLATFORM_DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications + PLATFORM_DEVELOPER_BIN_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin + PLATFORM_DEVELOPER_LIBRARY_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library + PLATFORM_DEVELOPER_SDK_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs + PLATFORM_DEVELOPER_TOOLS_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Tools + PLATFORM_DEVELOPER_USR_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr + PLATFORM_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform PLATFORM_DISPLAY_NAME = iOS PLATFORM_FAMILY_NAME = iOS PLATFORM_NAME = iphoneos @@ -450,16 +450,16 @@ Settings SCANNING_PCM_KEEP_CACHE_DIRECTORY = YES SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO SCRIPTS_FOLDER_PATH = CalculatorApp.app/Scripts - SDKROOT = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk - SDK_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk - SDK_DIR_iphoneos = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk - SDK_DIR_iphoneos26_4 = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk + SDKROOT = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk + SDK_DIR = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk + SDK_DIR_iphoneos = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk + SDK_DIR_iphoneos26_4 = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk SDK_NAME = iphoneos26.4 SDK_NAMES = iphoneos26.4 SDK_PRODUCT_BUILD_VERSION = 23E237 SDK_STAT_CACHE_DIR = /Library/Developer/Xcode/DerivedData SDK_STAT_CACHE_ENABLE = YES - SDK_STAT_CACHE_PATH = /Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos26.4-23E237-c1e9a37d8fcda5dee89abd67dc927a23.sdkstatcache + SDK_STAT_CACHE_PATH = SDK_VERSION = 26.4 SDK_VERSION_ACTUAL = 260400 SDK_VERSION_MAJOR = 260000 @@ -511,20 +511,20 @@ Settings SYSTEM_APPS_DIR = /Applications SYSTEM_CORE_SERVICES_DIR = /System/Library/CoreServices SYSTEM_DEMOS_DIR = /Applications/Extras - SYSTEM_DEVELOPER_APPS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications - SYSTEM_DEVELOPER_BIN_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/usr/bin - SYSTEM_DEVELOPER_DEMOS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Utilities/Built Examples - SYSTEM_DEVELOPER_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer - SYSTEM_DEVELOPER_DOC_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library - SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Graphics Tools - SYSTEM_DEVELOPER_JAVA_TOOLS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Java Tools - SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Performance Tools - SYSTEM_DEVELOPER_RELEASENOTES_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/releasenotes - SYSTEM_DEVELOPER_TOOLS = /Applications/Xcode-26.4.0.app/Contents/Developer/Tools - SYSTEM_DEVELOPER_TOOLS_DOC_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools - SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools - SYSTEM_DEVELOPER_USR_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/usr - SYSTEM_DEVELOPER_UTILITIES_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications/Utilities + SYSTEM_DEVELOPER_APPS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications + SYSTEM_DEVELOPER_BIN_DIR = /Applications/Xcode-.app/Contents/Developer/usr/bin + SYSTEM_DEVELOPER_DEMOS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications/Utilities/Built Examples + SYSTEM_DEVELOPER_DIR = /Applications/Xcode-.app/Contents/Developer + SYSTEM_DEVELOPER_DOC_DIR = /Applications/Xcode-.app/Contents/Developer/ADC Reference Library + SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications/Graphics Tools + SYSTEM_DEVELOPER_JAVA_TOOLS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications/Java Tools + SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications/Performance Tools + SYSTEM_DEVELOPER_RELEASENOTES_DIR = /Applications/Xcode-.app/Contents/Developer/ADC Reference Library/releasenotes + SYSTEM_DEVELOPER_TOOLS = /Applications/Xcode-.app/Contents/Developer/Tools + SYSTEM_DEVELOPER_TOOLS_DOC_DIR = /Applications/Xcode-.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools + SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR = /Applications/Xcode-.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools + SYSTEM_DEVELOPER_USR_DIR = /Applications/Xcode-.app/Contents/Developer/usr + SYSTEM_DEVELOPER_UTILITIES_DIR = /Applications/Xcode-.app/Contents/Developer/Applications/Utilities SYSTEM_DEXT_INSTALL_PATH = /System/Library/DriverExtensions SYSTEM_DOCUMENTATION_DIR = /Library/Documentation SYSTEM_EXTENSIONS_FOLDER_PATH = CalculatorApp.app/SystemExtensions @@ -542,8 +542,8 @@ Settings TARGETNAME = CalculatorApp TARGET_BUILD_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Products/Debug-iphoneos TARGET_DEVICE_IDENTIFIER = - TARGET_DEVICE_MODEL = Mac16,8 - TARGET_DEVICE_OS_VERSION = 26.3.1 + TARGET_DEVICE_MODEL = + TARGET_DEVICE_OS_VERSION = TARGET_DEVICE_PLATFORM_NAME = macosx TARGET_NAME = CalculatorApp TARGET_TEMP_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build @@ -552,10 +552,10 @@ Settings TEMP_FILE_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/CalculatorApp.build/Debug-iphoneos/CalculatorApp.build TEMP_ROOT = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex TEMP_SANDBOX_DIR = /Library/Developer/Xcode/DerivedData/CalculatorApp-/Build/Intermediates.noindex/TemporaryTaskSandboxes - TEST_FRAMEWORK_SEARCH_PATHS = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk/Developer/Library/Frameworks - TEST_LIBRARY_SEARCH_PATHS = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib + TEST_FRAMEWORK_SEARCH_PATHS = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk/Developer/Library/Frameworks + TEST_LIBRARY_SEARCH_PATHS = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault - TOOLCHAIN_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain + TOOLCHAIN_DIR = /Applications/Xcode-.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain TREAT_MISSING_BASELINES_AS_TEST_FAILURES = NO TREAT_MISSING_SCRIPT_PHASE_OUTPUTS_AS_ERRORS = NO TVOS_DEPLOYMENT_TARGET = 26.4 @@ -585,7 +585,7 @@ Settings WRAPPER_NAME = CalculatorApp.app WRAPPER_SUFFIX = .app WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES = NO - XCODE_APP_SUPPORT_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Library/Xcode + XCODE_APP_SUPPORT_DIR = /Applications/Xcode-.app/Contents/Developer/Library/Xcode XCODE_PRODUCT_BUILD_VERSION = 17E192 XCODE_VERSION_ACTUAL = 2640 XCODE_VERSION_MAJOR = 2600 diff --git a/src/snapshot-tests/__fixtures__/mcp/text/resources/devices--success.txt b/src/snapshot-tests/__fixtures__/mcp/text/resources/devices--success.txt index 04e5cac43..9eca0fb95 100644 --- a/src/snapshot-tests/__fixtures__/mcp/text/resources/devices--success.txt +++ b/src/snapshot-tests/__fixtures__/mcp/text/resources/devices--success.txt @@ -4,21 +4,21 @@ iOS Devices: 📱 [] Cameron’s iPhone 16 Pro Max - OS: 26.4.2 + OS: UDID: 📱 [] iPhone - OS: 26.1 + OS: UDID: watchOS Devices: ⌚️ [] Cameron’s Apple Watch - OS: 10.6.1 + OS: UDID: ⌚️ [] Cameron’s Apple Watch - OS: 26.3 + OS: UDID: ✅ 4 physical devices discovered (2 iOS, 2 watchOS). diff --git a/src/snapshot-tests/__fixtures__/mcp/text/session-management/session-use-defaults-profile--persist-success.txt b/src/snapshot-tests/__fixtures__/mcp/text/session-management/session-use-defaults-profile--persist-success.txt new file mode 100644 index 000000000..bf10197fd --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/text/session-management/session-use-defaults-profile--persist-success.txt @@ -0,0 +1,7 @@ + +⚙️ Use Defaults Profile + +Notices + Persisted active profile selection. + +✅ Activated profile (MyCustomProfile profile) diff --git a/src/snapshot-tests/__tests__/json-normalize.test.ts b/src/snapshot-tests/__tests__/json-normalize.test.ts index 49f06e29c..1447f3102 100644 --- a/src/snapshot-tests/__tests__/json-normalize.test.ts +++ b/src/snapshot-tests/__tests__/json-normalize.test.ts @@ -109,6 +109,52 @@ describe('normalizeStructuredEnvelope', () => { }); }); + it('normalizes volatile build settings entry values without dropping entries', () => { + const envelope: StructuredOutputEnvelope = { + schema: 'xcodebuildmcp.output.build-settings', + schemaVersion: '1', + didError: false, + error: null, + data: { + entries: [ + { key: 'ALTERNATE_OWNER', value: 'cameroncooke' }, + { key: 'CACHE_ROOT', value: '/var/folders/hash/C/com.apple.DeveloperTools/26.4/Xcode' }, + { key: 'TARGET_DEVICE_MODEL', value: 'iPhone17,2' }, + { key: 'TARGET_DEVICE_OS_VERSION', value: '26.4.2' }, + { + key: 'PLATFORM_DEVELOPER_APPLICATIONS_DIR', + value: '/Applications/Xcode-26.4.0.app/Contents/Developer/Applications', + }, + { + key: 'SDK_STAT_CACHE_PATH', + value: + '/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos26.4-23E237-c1e9.sdkstatcache', + }, + ], + }, + }; + + expect(normalizeStructuredEnvelope(envelope)).toEqual({ + schema: 'xcodebuildmcp.output.build-settings', + schemaVersion: '1', + didError: false, + error: null, + data: { + entries: [ + { key: 'ALTERNATE_OWNER', value: '' }, + { key: 'CACHE_ROOT', value: '' }, + { key: 'TARGET_DEVICE_MODEL', value: '' }, + { key: 'TARGET_DEVICE_OS_VERSION', value: '' }, + { + key: 'PLATFORM_DEVELOPER_APPLICATIONS_DIR', + value: '/Applications/Xcode-.app/Contents/Developer/Applications', + }, + { key: 'SDK_STAT_CACHE_PATH', value: '' }, + ], + }, + }); + }); + it('normalizes volatile build settings PATH entry values without dropping the entry', () => { const envelope: StructuredOutputEnvelope = { schema: 'xcodebuildmcp.output.build-settings', diff --git a/src/snapshot-tests/__tests__/normalize.test.ts b/src/snapshot-tests/__tests__/normalize.test.ts index ff2773c66..4451248a0 100644 --- a/src/snapshot-tests/__tests__/normalize.test.ts +++ b/src/snapshot-tests/__tests__/normalize.test.ts @@ -10,6 +10,32 @@ function progressBlock(total: number, failed: number): string { } describe('normalizeSnapshotOutput', () => { + it('normalizes volatile device and build-settings values', () => { + expect( + normalizeSnapshotOutput( + [ + '1. Stop app: xcodebuildmcp device stop --device-id --process-id 12345', + 'Device: iPhone, OS: 26.4.2 (a)', + ' TARGET_DEVICE_MODEL = iPhone17,2', + ' TARGET_DEVICE_OS_VERSION = 26.4.2', + ' CACHE_ROOT = /var/folders/ab/cache/com.apple.DeveloperTools/26.4-17E192/Xcode', + ' SDK_STAT_CACHE_PATH = /Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos26.4-23E237-c1e9.sdkstatcache', + ' PLATFORM_DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications', + ].join('\n') + '\n', + ), + ).toBe( + [ + '1. Stop app: xcodebuildmcp device stop --device-id --process-id ', + 'Device: iPhone, OS: ', + ' TARGET_DEVICE_MODEL = ', + ' TARGET_DEVICE_OS_VERSION = ', + ' CACHE_ROOT = ', + ' SDK_STAT_CACHE_PATH = ', + ' PLATFORM_DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications', + ].join('\n') + '\n', + ); + }); + it('preserves display-formatted home paths while normalizing workspace hashes', () => { expect( normalizeSnapshotOutput( diff --git a/src/snapshot-tests/json-normalize.ts b/src/snapshot-tests/json-normalize.ts index 6800e94f0..76398e00f 100644 --- a/src/snapshot-tests/json-normalize.ts +++ b/src/snapshot-tests/json-normalize.ts @@ -34,6 +34,10 @@ function normalizeString(value: string, key?: string, path: string[] = []): stri return ''; } + if (key === 'osVersion' && path.includes('devices')) { + return ''; + } + return result; } @@ -63,8 +67,39 @@ function normalizeNumber(path: string[], key: string | undefined, value: number) } } -function isBuildSettingsPathEntry(value: Record, path: string[]): boolean { - return path.includes('entries') && value.key === 'PATH' && typeof value.value === 'string'; +function isBuildSettingsEntry(value: Record, path: string[]): boolean { + return ( + path.includes('entries') && typeof value.key === 'string' && typeof value.value === 'string' + ); +} + +function normalizeBuildSettingsEntryValue(key: string, value: string): string { + switch (key) { + case 'PATH': + return ''; + case 'ALTERNATE_OWNER': + case 'INSTALL_OWNER': + case 'USER': + case 'VERSION_INFO_BUILDER': + return ''; + case 'UID': + return ''; + case 'CACHE_ROOT': + case 'CCHROOT': + return ''; + case 'SDK_STAT_CACHE_PATH': + return ''; + case 'TARGET_DEVICE_MODEL': + case 'ASSETCATALOG_FILTER_FOR_DEVICE_MODEL': + return ''; + case 'TARGET_DEVICE_OS_VERSION': + case 'ASSETCATALOG_FILTER_FOR_DEVICE_OS_VERSION': + return ''; + default: { + const normalized = normalizeSnapshotOutput(value.replace(/\u00A0/g, ' ')); + return normalized.endsWith('\n') ? normalized.slice(0, -1) : normalized; + } + } } function isNormalizedTestCase( @@ -136,8 +171,8 @@ function normalizeValue(value: unknown, path: string[] = []): unknown { if (isRecord(value)) { const normalizedEntries = Object.entries(value).map(([entryKey, entryValue]) => [ entryKey, - isBuildSettingsPathEntry(value, path) && entryKey === 'value' - ? '' + isBuildSettingsEntry(value, path) && entryKey === 'value' + ? normalizeBuildSettingsEntryValue(String(value.key), String(value.value)) : normalizeValue(entryValue, [...path, entryKey]), ]); diff --git a/src/snapshot-tests/normalize.ts b/src/snapshot-tests/normalize.ts index 4630aab5c..86debbcb0 100644 --- a/src/snapshot-tests/normalize.ts +++ b/src/snapshot-tests/normalize.ts @@ -16,7 +16,7 @@ const HELPER_PID_FILENAME_SUFFIX_REGEX = const PID_JSON_REGEX = /"pid"\s*:\s*\d+/g; const PROCESS_ID_REGEX = /Process ID: \d+/g; const PROCESS_INLINE_PID_REGEX = /process \d+/g; -const CLI_PROCESS_ID_ARG_REGEX = /--process-id "\d+"/g; +const CLI_PROCESS_ID_ARG_REGEX = /--process-id (["']?)\d+\1/g; const MCP_PROCESS_ID_ARG_REGEX = /(processId:\s*)\d+/g; const THREAD_ID_REGEX = /Thread \d{5,}/g; const HEX_ADDRESS_REGEX = /0x[0-9a-fA-F]{8,}/g; @@ -38,6 +38,14 @@ const UPTIME_REGEX = /Uptime: \d+s/g; const RESULT_BUNDLE_LINE_REGEX = /\S+\[\d+:\d+\] Writing error result bundle to \S+/g; const DEVICE_TRANSPORT_TYPE_REGEX = /\b(wired|localNetwork)\b/g; const TARGET_DEVICE_IDENTIFIER_REGEX = /(TARGET_DEVICE_IDENTIFIER = )([0-9A-Fa-f]{24,40})/g; +const TARGET_DEVICE_MODEL_REGEX = + /((?:TARGET_DEVICE_MODEL|ASSETCATALOG_FILTER_FOR_DEVICE_MODEL) = ).+$/gm; +const TARGET_DEVICE_OS_VERSION_REGEX = + /((?:TARGET_DEVICE_OS_VERSION|ASSETCATALOG_FILTER_FOR_DEVICE_OS_VERSION) = ).+$/gm; +const DEVICE_OS_VERSION_LINE_REGEX = /(\bOS: )\d+(?:\.\d+)*(?:\s*\([^)]*\))?/g; +const XCODE_APPLICATION_PATH_REGEX = /\/Applications\/Xcode[^/\s]+\.app/g; +const XCODE_CACHE_ROOT_REGEX = /((?:CACHE_ROOT|CCHROOT) = ).+$/gm; +const SDK_STAT_CACHE_PATH_REGEX = /(SDK_STAT_CACHE_PATH = ).+$/gm; const CODEX_ARG0_PATH_REGEX = /\/\.codex\/tmp\/arg0\/codex-arg0[A-Za-z0-9]+/g; const CODEX_WORKTREE_NODE_MODULES_REGEX = /\/\.codex\/worktrees\/[^/:]+\/node_modules\/\.bin/g; @@ -165,7 +173,10 @@ export function normalizeSnapshotOutput(text: string): string { normalized = normalized.replace(PID_JSON_REGEX, '"pid" : '); normalized = normalized.replace(PROCESS_ID_REGEX, 'Process ID: '); normalized = normalized.replace(PROCESS_INLINE_PID_REGEX, 'process '); - normalized = normalized.replace(CLI_PROCESS_ID_ARG_REGEX, '--process-id ""'); + normalized = normalized.replace( + CLI_PROCESS_ID_ARG_REGEX, + (_match: string, quote: string) => `--process-id ${quote}${quote}`, + ); normalized = normalized.replace(MCP_PROCESS_ID_ARG_REGEX, '$1'); normalized = normalized.replace(UPTIME_REGEX, 'Uptime: '); @@ -189,6 +200,15 @@ export function normalizeSnapshotOutput(text: string): string { normalized = normalized.replace(TEST_SUMMARY_COUNTS_REGEX, '(, '); normalized = normalized.replace(TARGET_DEVICE_IDENTIFIER_REGEX, '$1'); + normalized = normalized.replace(TARGET_DEVICE_MODEL_REGEX, '$1'); + normalized = normalized.replace(TARGET_DEVICE_OS_VERSION_REGEX, '$1'); + normalized = normalized.replace(DEVICE_OS_VERSION_LINE_REGEX, '$1'); + normalized = normalized.replace( + XCODE_APPLICATION_PATH_REGEX, + '/Applications/Xcode-.app', + ); + normalized = normalized.replace(XCODE_CACHE_ROOT_REGEX, '$1'); + normalized = normalized.replace(SDK_STAT_CACHE_PATH_REGEX, '$1'); normalized = normalized.replace(BUILD_SETTINGS_PATH_REGEX, '$1'); normalized = normalized.replace(CODEX_ARG0_PATH_REGEX, '/.codex/tmp/arg0/codex-arg0'); normalized = normalized.replace(ACQUIRED_USAGE_ASSERTION_TIME_REGEX, '$1