diff --git a/AGENTS.md b/AGENTS.md index 3b7228dc4..11109d998 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,6 +47,7 @@ ESM TypeScript project (`type: module`). Key layers: - **NEVER use inline imports** - no `await import("./foo.js")`, no `import("pkg").Type` in type positions, no dynamic imports for types. Always use standard top-level imports. - NEVER remove or downgrade code to fix type errors from outdated dependencies; upgrade the dependency instead - Always ask before removing functionality or code that appears to be intentional +- Do not add fallback behavior by default. If required context, configuration, runtime state, or dependencies are missing, fail loudly and fix the caller/setup instead of silently switching to an alternate path. Add a fallback only when explicitly requested or when it is a documented product requirement. - Follow TypeScript best practices ## Import Conventions diff --git a/CHANGELOG.md b/CHANGELOG.md index da19ad9b6..f924cc6f7 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. Structured result schemas that include `nextSteps` now use schema version 2; existing version 1 schema files remain available for current validators. + ## [2.5.2] ### Changed diff --git a/CLAUDE.md b/CLAUDE.md index 531c6c7d6..b3304f18d 100755 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,6 +6,7 @@ - **NEVER use inline imports** - no `await import("./foo.js")`, no `import("pkg").Type` in type positions, no dynamic imports for types. Always use standard top-level imports. - NEVER remove or downgrade code to fix type errors from outdated dependencies; upgrade the dependency instead - Always ask before removing functionality or code that appears to be intentional +- Do not add fallback behavior by default. If required context, configuration, runtime state, or dependencies are missing, fail loudly and fix the caller/setup instead of silently switching to an alternate path. Add a fallback only when explicitly requested or when it is a documented product requirement. - Follow TypeScript best practices ## Commands 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..d501a8cbf 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: @@ -14,3 +14,8 @@ annotations: readOnlyHint: false destructiveHint: false openWorldHint: false +nextSteps: + - label: Stop Swift package run + toolId: swift_package_stop + priority: 1 + when: success 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/package.json b/package.json index 70c1fad7a..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", + "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", 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..7ff1cd8b4 --- /dev/null +++ b/schemas/structured-output/xcodebuildmcp.output.capture-result/2.schema.json @@ -0,0 +1,258 @@ +{ + "$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" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "video-recording" + }, + "state": { + "enum": [ + "started", + "stopped" + ] + }, + "fps": { + "type": "integer", + "minimum": 1 + }, + "outputFile": { + "type": "string" + }, + "sessionId": { + "type": "string" + } + }, + "required": [ + "type", + "state" + ] + } + ] + }, + "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..006f38257 100644 --- a/src/core/__tests__/structured-output-schema.test.ts +++ b/src/core/__tests__/structured-output-schema.test.ts @@ -127,6 +127,239 @@ 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 video recording capture payloads in the bumped capture contract', () => { + const schema = getMcpOutputSchema({ + schema: 'xcodebuildmcp.output.capture-result', + version: '2', + }); + const ajv = new Ajv2020({ allErrors: true, strict: true, validateSchema: true }); + const validate = ajv.compile(schema); + + expect( + validate({ + schema: 'xcodebuildmcp.output.capture-result', + schemaVersion: '2', + didError: false, + error: null, + data: { + summary: { status: 'SUCCEEDED' }, + artifacts: { simulatorId: 'A-SIMULATOR-ID' }, + capture: { + type: 'video-recording', + state: 'started', + fps: 30, + sessionId: 'recording-session', + }, + }, + }), + ).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 +386,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 +394,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 +409,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/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/mcp/tools/coverage/__tests__/get_coverage_report.test.ts b/src/mcp/tools/coverage/__tests__/get_coverage_report.test.ts index e3f57b026..416b8560b 100644 --- a/src/mcp/tools/coverage/__tests__/get_coverage_report.test.ts +++ b/src/mcp/tools/coverage/__tests__/get_coverage_report.test.ts @@ -11,7 +11,7 @@ import { get_coverage_reportLogic, createGetCoverageReportExecutor, } from '../get_coverage_report.ts'; -import { allText, runLogic, runToolLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, runToolLogic, callHandler} from '../../../../test-utils/test-helpers.ts'; @@ -99,7 +99,7 @@ describe('get_coverage_report', () => { __setTestCommandExecutorOverride(mockExecutor); __setTestFileSystemExecutorOverride(missingFs); - const result = await handler({ xcresultPath: '/tmp/missing.xcresult', showFiles: false }); + const result = await callHandler(handler, { xcresultPath: '/tmp/missing.xcresult', showFiles: false }); expect(result.isError).toBe(true); const text = allText(result); @@ -120,7 +120,7 @@ describe('get_coverage_report', () => { __setTestCommandExecutorOverride(mockExecutor); __setTestFileSystemExecutorOverride(existingFs); - const result = await handler({ xcresultPath: '/tmp/test.xcresult' }); + const result = await callHandler(handler, { xcresultPath: '/tmp/test.xcresult' }); expect(result.isError).toBeUndefined(); expect(commands).toHaveLength(1); diff --git a/src/mcp/tools/coverage/__tests__/get_file_coverage.test.ts b/src/mcp/tools/coverage/__tests__/get_file_coverage.test.ts index 908b1f2c5..5b0c3fbb8 100644 --- a/src/mcp/tools/coverage/__tests__/get_file_coverage.test.ts +++ b/src/mcp/tools/coverage/__tests__/get_file_coverage.test.ts @@ -15,7 +15,7 @@ import { get_file_coverageLogic, createGetFileCoverageExecutor, } from '../get_file_coverage.ts'; -import { allText, runLogic, runToolLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, runToolLogic, callHandler} from '../../../../test-utils/test-helpers.ts'; @@ -98,7 +98,7 @@ describe('get_file_coverage', () => { __setTestCommandExecutorOverride(mockExecutor); __setTestFileSystemExecutorOverride(missingFs); - const result = await handler({ + const result = await callHandler(handler, { xcresultPath: '/tmp/missing.xcresult', file: 'ViewModel.swift', showLines: false, @@ -123,7 +123,7 @@ describe('get_file_coverage', () => { __setTestCommandExecutorOverride(mockExecutor); __setTestFileSystemExecutorOverride(existingFs); - const result = await handler({ xcresultPath: '/tmp/test.xcresult', file: 'ViewModel.swift' }); + const result = await callHandler(handler, { xcresultPath: '/tmp/test.xcresult', file: 'ViewModel.swift' }); expect(result.isError).toBeUndefined(); expect(commands).toHaveLength(1); 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/__tests__/debugging-tools.test.ts b/src/mcp/tools/debugging/__tests__/debugging-tools.test.ts index 9493b8e55..331456b7e 100644 --- a/src/mcp/tools/debugging/__tests__/debugging-tools.test.ts +++ b/src/mcp/tools/debugging/__tests__/debugging-tools.test.ts @@ -50,7 +50,12 @@ import { handler as variablesHandler, debug_variablesLogic, } from '../debug_variables.ts'; -import { allText, runLogic, runToolLogic } from '../../../../test-utils/test-helpers.ts'; +import { + allText, + runLogic, + runToolLogic, + callHandler, +} from '../../../../test-utils/test-helpers.ts'; function createMockBackend(overrides: Partial = {}): DebuggerBackend { return { @@ -125,7 +130,7 @@ describe('debug_attach_sim', () => { describe('Handler Requirements', () => { it('should return error when no session defaults for simulator', async () => { - const result = await attachHandler({ + const result = await callHandler(attachHandler, { bundleId: 'com.test.app', }); @@ -143,7 +148,7 @@ describe('debug_attach_sim', () => { bundleId: 'com.default.app', }); - const result = await attachHandler({ pid: 1234 }); + const result = await callHandler(attachHandler, { pid: 1234 }); expect(result.isError).toBeFalsy(); const text = result.content[0].text; @@ -155,7 +160,7 @@ describe('debug_attach_sim', () => { __setTestDebuggerToolContextOverride(createTestContext()); sessionStore.setDefaults({ simulatorId: 'test-sim-uuid' }); - const result = await attachHandler({ + const result = await callHandler(attachHandler, { pid: 1234, bundleId: 'com.test.app', }); 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/__tests__/build_device.test.ts b/src/mcp/tools/device/__tests__/build_device.test.ts index 4e4d01757..06aee6376 100644 --- a/src/mcp/tools/device/__tests__/build_device.test.ts +++ b/src/mcp/tools/device/__tests__/build_device.test.ts @@ -2,16 +2,13 @@ import { describe, it, expect, beforeEach } from 'vitest'; import { computeScopedDerivedDataPath } from '../../../../utils/derived-data-path.ts'; import * as z from 'zod'; import { createMockExecutor } from '../../../../test-utils/mock-executors.ts'; -import { expectPendingBuildResponse, runToolLogic } from '../../../../test-utils/test-helpers.ts'; +import { + expectPendingBuildResponse, + runToolLogic, + callHandler, +} from '../../../../test-utils/test-helpers.ts'; import { schema, handler, buildDeviceLogic } from '../build_device.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; -import type { CommandExecutor } from '../../../../utils/execution/index.ts'; - -const runHandlerWithExecutor = handler as unknown as ( - args: Record, - executor: CommandExecutor, -) => Promise<{ isError?: boolean }>; - function createSpyExecutor(): { commandCalls: Array<{ args: string[]; logPrefix?: string }>; executor: ReturnType; @@ -58,7 +55,7 @@ describe('build_device plugin', () => { describe('XOR Validation', () => { it('should error when neither projectPath nor workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { scheme: 'MyScheme', }); @@ -68,7 +65,7 @@ describe('build_device plugin', () => { }); it('should error when both projectPath and workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/MyProject.xcodeproj', workspacePath: '/path/to/MyProject.xcworkspace', scheme: 'MyScheme', @@ -82,7 +79,7 @@ describe('build_device plugin', () => { describe('Parameter Validation (via Handler)', () => { it('should return Zod validation error for missing scheme', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/MyProject.xcodeproj', }); @@ -92,7 +89,7 @@ describe('build_device plugin', () => { }); it('should return Zod validation error for invalid parameter types', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: 123, // Should be string scheme: 'MyScheme', }); @@ -220,26 +217,18 @@ describe('build_device plugin', () => { scheme: 'MyScheme', }); - const result = await runHandlerWithExecutor({ platform: 'tvOS' }, spy.executor); - - expect(result.isError).toBeUndefined(); - expect(spy.commandCalls).toHaveLength(1); - expect(spy.commandCalls[0].args).toContain('generic/platform=tvOS'); - expect(spy.commandCalls[0].logPrefix).toBe('tvOS Device Build'); - }); - - it('should normalize simulator session platforms for device builds', async () => { - const spy = createSpyExecutor(); - - sessionStore.setDefaults({ - projectPath: '/path/to/MyProject.xcodeproj', - scheme: 'MyScheme', - platform: 'tvOS Simulator', - }); - - const result = await runHandlerWithExecutor({}, spy.executor); + const { result } = await runToolLogic(() => + buildDeviceLogic( + { + projectPath: '/path/to/MyProject.xcodeproj', + scheme: 'MyScheme', + platform: 'tvOS', + }, + spy.executor, + ), + ); - expect(result.isError).toBeUndefined(); + expect(result.isError()).toBe(false); expect(spy.commandCalls).toHaveLength(1); expect(spy.commandCalls[0].args).toContain('generic/platform=tvOS'); expect(spy.commandCalls[0].logPrefix).toBe('tvOS Device Build'); diff --git a/src/mcp/tools/device/__tests__/build_run_device.test.ts b/src/mcp/tools/device/__tests__/build_run_device.test.ts index 20764a79a..b7b21a5f9 100644 --- a/src/mcp/tools/device/__tests__/build_run_device.test.ts +++ b/src/mcp/tools/device/__tests__/build_run_device.test.ts @@ -5,7 +5,11 @@ import { createMockFileSystemExecutor, createMockExecutor, } from '../../../../test-utils/mock-executors.ts'; -import { runToolLogic, type MockToolHandlerResult } from '../../../../test-utils/test-helpers.ts'; +import { + runToolLogic, + type MockToolHandlerResult, + callHandler, +} from '../../../../test-utils/test-helpers.ts'; import type { CommandExecutor } from '../../../../utils/execution/index.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, build_run_deviceLogic } from '../build_run_device.ts'; @@ -50,11 +54,14 @@ describe('build_run_device tool', () => { describe('Handler Requirements', () => { it('requires scheme + deviceId and project/workspace via handler', async () => { - const missingAll = await handler({}); + const missingAll = await callHandler(handler, {}); expect(missingAll.isError).toBe(true); expect(missingAll.content[0].text).toContain('Provide scheme and deviceId'); - const missingSource = await handler({ scheme: 'MyApp', deviceId: 'DEVICE-UDID' }); + const missingSource = await callHandler(handler, { + scheme: 'MyApp', + deviceId: 'DEVICE-UDID', + }); expect(missingSource.isError).toBe(true); expect(missingSource.content[0].text).toContain('Provide a project or workspace'); }); diff --git a/src/mcp/tools/device/__tests__/get_device_app_path.test.ts b/src/mcp/tools/device/__tests__/get_device_app_path.test.ts index 38050e4eb..f1068c6a8 100644 --- a/src/mcp/tools/device/__tests__/get_device_app_path.test.ts +++ b/src/mcp/tools/device/__tests__/get_device_app_path.test.ts @@ -12,7 +12,7 @@ import { createGetDeviceAppPathExecutor, } from '../get_device_app_path.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; -import { runLogic } from '../../../../test-utils/test-helpers.ts'; +import { runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('get_device_app_path plugin', () => { beforeEach(() => { @@ -41,7 +41,7 @@ describe('get_device_app_path plugin', () => { describe('XOR Validation', () => { it('should error when neither projectPath nor workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { scheme: 'MyScheme', }); expect(result.isError).toBe(true); @@ -50,7 +50,7 @@ describe('get_device_app_path plugin', () => { }); it('should error when both projectPath and workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', workspacePath: '/path/to/workspace.xcworkspace', scheme: 'MyScheme', @@ -63,7 +63,7 @@ describe('get_device_app_path plugin', () => { describe('Handler Requirements', () => { it('should require scheme when missing', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', }); expect(result.isError).toBe(true); @@ -74,7 +74,7 @@ describe('get_device_app_path plugin', () => { it('should require project or workspace when scheme default exists', async () => { sessionStore.setDefaults({ scheme: 'MyScheme' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Provide a project or workspace'); }); diff --git a/src/mcp/tools/device/__tests__/install_app_device.test.ts b/src/mcp/tools/device/__tests__/install_app_device.test.ts index d69126739..302a0b4a8 100644 --- a/src/mcp/tools/device/__tests__/install_app_device.test.ts +++ b/src/mcp/tools/device/__tests__/install_app_device.test.ts @@ -3,7 +3,7 @@ import * as z from 'zod'; import { createMockExecutor } from '../../../../test-utils/mock-executors.ts'; import { schema, handler, install_app_deviceLogic } from '../install_app_device.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('install_app_device plugin', () => { beforeEach(() => { @@ -12,7 +12,7 @@ describe('install_app_device plugin', () => { describe('Handler Requirements', () => { it('should require deviceId when session defaults are missing', async () => { - const result = await handler({ + const result = await callHandler(handler, { appPath: '/path/to/test.app', }); diff --git a/src/mcp/tools/device/__tests__/launch_app_device.test.ts b/src/mcp/tools/device/__tests__/launch_app_device.test.ts index 9b0d1829f..20db6d4a4 100644 --- a/src/mcp/tools/device/__tests__/launch_app_device.test.ts +++ b/src/mcp/tools/device/__tests__/launch_app_device.test.ts @@ -6,7 +6,7 @@ import { } from '../../../../test-utils/mock-executors.ts'; import { schema, handler, launch_app_deviceLogic } from '../launch_app_device.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('launch_app_device plugin (device-shared)', () => { beforeEach(() => { @@ -36,7 +36,7 @@ describe('launch_app_device plugin (device-shared)', () => { describe('Handler Requirements', () => { it('should require deviceId and bundleId when not provided', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Missing required session defaults'); diff --git a/src/mcp/tools/device/__tests__/stop_app_device.test.ts b/src/mcp/tools/device/__tests__/stop_app_device.test.ts index 121907189..6dd62268b 100644 --- a/src/mcp/tools/device/__tests__/stop_app_device.test.ts +++ b/src/mcp/tools/device/__tests__/stop_app_device.test.ts @@ -3,7 +3,7 @@ import * as z from 'zod'; import { createMockExecutor } from '../../../../test-utils/mock-executors.ts'; import { schema, handler, stop_app_deviceLogic } from '../stop_app_device.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('stop_app_device plugin', () => { beforeEach(() => { @@ -27,7 +27,7 @@ describe('stop_app_device plugin', () => { describe('Handler Requirements', () => { it('should require deviceId when not provided', async () => { - const result = await handler({ processId: 12345 }); + const result = await callHandler(handler, { processId: 12345 }); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('deviceId is required'); diff --git a/src/mcp/tools/device/__tests__/test_device.test.ts b/src/mcp/tools/device/__tests__/test_device.test.ts index c41a0126e..f007bfd7e 100644 --- a/src/mcp/tools/device/__tests__/test_device.test.ts +++ b/src/mcp/tools/device/__tests__/test_device.test.ts @@ -5,7 +5,11 @@ import { createMockExecutor, createMockFileSystemExecutor, } from '../../../../test-utils/mock-executors.ts'; -import { expectPendingBuildResponse, runToolLogic } from '../../../../test-utils/test-helpers.ts'; +import { + expectPendingBuildResponse, + runToolLogic, + callHandler, +} from '../../../../test-utils/test-helpers.ts'; import { schema, handler, testDeviceLogic } from '../test_device.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; @@ -104,7 +108,7 @@ describe('test_device plugin', () => { describe('Handler Requirements', () => { it('should require scheme and device defaults', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Missing required session defaults'); @@ -114,7 +118,7 @@ describe('test_device plugin', () => { it('should require project or workspace when defaults provide scheme and device', async () => { sessionStore.setDefaults({ scheme: 'MyScheme', deviceId: 'test-device-123' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Provide a project or workspace'); @@ -123,7 +127,7 @@ describe('test_device plugin', () => { it('should reject mutually exclusive project inputs when defaults satisfy requirements', async () => { sessionStore.setDefaults({ scheme: 'MyScheme', deviceId: 'test-device-123' }); - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', workspacePath: '/path/to/workspace.xcworkspace', }); 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/macos/__tests__/build_macos.test.ts b/src/mcp/tools/macos/__tests__/build_macos.test.ts index 2b98adf40..fc7d12e2f 100644 --- a/src/mcp/tools/macos/__tests__/build_macos.test.ts +++ b/src/mcp/tools/macos/__tests__/build_macos.test.ts @@ -2,7 +2,11 @@ import { describe, it, expect, beforeEach } from 'vitest'; import { computeScopedDerivedDataPath } from '../../../../utils/derived-data-path.ts'; import * as z from 'zod'; import { createMockExecutor } from '../../../../test-utils/mock-executors.ts'; -import { expectPendingBuildResponse, runToolLogic } from '../../../../test-utils/test-helpers.ts'; +import { + expectPendingBuildResponse, + runToolLogic, + callHandler, +} from '../../../../test-utils/test-helpers.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, buildMacOSLogic } from '../build_macos.ts'; @@ -53,7 +57,7 @@ describe('build_macos plugin', () => { describe('Handler Requirements', () => { it('should require scheme when no defaults provided', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('scheme is required'); @@ -63,7 +67,7 @@ describe('build_macos plugin', () => { it('should require project or workspace once scheme default exists', async () => { sessionStore.setDefaults({ scheme: 'MyScheme' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Provide a project or workspace'); @@ -72,7 +76,7 @@ describe('build_macos plugin', () => { it('should reject when both projectPath and workspacePath provided explicitly', async () => { sessionStore.setDefaults({ scheme: 'MyScheme' }); - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', workspacePath: '/path/to/workspace.xcworkspace', }); @@ -377,13 +381,13 @@ describe('build_macos plugin', () => { describe('XOR Validation', () => { it('should error when neither projectPath nor workspacePath provided', async () => { - const result = await handler({ scheme: 'MyScheme' }); + const result = await callHandler(handler, { scheme: 'MyScheme' }); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Provide a project or workspace'); }); it('should error when both projectPath and workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', workspacePath: '/path/to/workspace.xcworkspace', scheme: 'MyScheme', diff --git a/src/mcp/tools/macos/__tests__/build_run_macos.test.ts b/src/mcp/tools/macos/__tests__/build_run_macos.test.ts index b86694463..adfa91695 100644 --- a/src/mcp/tools/macos/__tests__/build_run_macos.test.ts +++ b/src/mcp/tools/macos/__tests__/build_run_macos.test.ts @@ -2,7 +2,11 @@ import { describe, it, expect, beforeEach } from 'vitest'; import { computeScopedDerivedDataPath } from '../../../../utils/derived-data-path.ts'; import * as z from 'zod'; import { createMockExecutor, mockProcess } from '../../../../test-utils/mock-executors.ts'; -import { runToolLogic, type MockToolHandlerResult } from '../../../../test-utils/test-helpers.ts'; +import { + runToolLogic, + type MockToolHandlerResult, + callHandler, +} from '../../../../test-utils/test-helpers.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, buildRunMacOSLogic } from '../build_run_macos.ts'; @@ -45,7 +49,7 @@ describe('build_run_macos', () => { describe('Handler Requirements', () => { it('should require scheme before executing', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('scheme is required'); @@ -54,7 +58,7 @@ describe('build_run_macos', () => { it('should require project or workspace once scheme is set', async () => { sessionStore.setDefaults({ scheme: 'MyApp' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Provide a project or workspace'); @@ -63,7 +67,7 @@ describe('build_run_macos', () => { it('should fail when both project and workspace provided explicitly', async () => { sessionStore.setDefaults({ scheme: 'MyApp' }); - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', workspacePath: '/path/to/workspace.xcworkspace', }); diff --git a/src/mcp/tools/macos/__tests__/get_mac_app_path.test.ts b/src/mcp/tools/macos/__tests__/get_mac_app_path.test.ts index 139e3c88c..5bafb450a 100644 --- a/src/mcp/tools/macos/__tests__/get_mac_app_path.test.ts +++ b/src/mcp/tools/macos/__tests__/get_mac_app_path.test.ts @@ -13,7 +13,7 @@ import { get_mac_app_pathLogic, createGetMacAppPathExecutor, } from '../get_mac_app_path.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('get_mac_app_path plugin', () => { beforeEach(() => { @@ -46,7 +46,7 @@ describe('get_mac_app_path plugin', () => { describe('Handler Requirements', () => { it('should require scheme before running', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('scheme is required'); @@ -55,7 +55,7 @@ describe('get_mac_app_path plugin', () => { it('should require project or workspace when scheme default exists', async () => { sessionStore.setDefaults({ scheme: 'MyScheme' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Provide a project or workspace'); @@ -64,7 +64,7 @@ describe('get_mac_app_path plugin', () => { it('should reject when both projectPath and workspacePath provided explicitly', async () => { sessionStore.setDefaults({ scheme: 'MyScheme' }); - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', workspacePath: '/path/to/workspace.xcworkspace', }); @@ -76,7 +76,7 @@ describe('get_mac_app_path plugin', () => { describe('XOR Validation', () => { it('should error when neither projectPath nor workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { scheme: 'MyScheme', }); @@ -85,7 +85,7 @@ describe('get_mac_app_path plugin', () => { }); it('should error when both projectPath and workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', workspacePath: '/path/to/workspace.xcworkspace', scheme: 'MyScheme', @@ -361,7 +361,7 @@ describe('get_mac_app_path plugin', () => { describe('Handler Behavior (Complete Literal Returns)', () => { it('should return Zod validation error for missing scheme', async () => { - const result = await handler({ + const result = await callHandler(handler, { workspacePath: '/path/to/MyProject.xcworkspace', }); diff --git a/src/mcp/tools/macos/__tests__/test_macos.test.ts b/src/mcp/tools/macos/__tests__/test_macos.test.ts index 173282f73..84e95e950 100644 --- a/src/mcp/tools/macos/__tests__/test_macos.test.ts +++ b/src/mcp/tools/macos/__tests__/test_macos.test.ts @@ -5,7 +5,11 @@ import { createMockExecutor, createMockFileSystemExecutor, } from '../../../../test-utils/mock-executors.ts'; -import { expectPendingBuildResponse, runToolLogic } from '../../../../test-utils/test-helpers.ts'; +import { + expectPendingBuildResponse, + runToolLogic, + callHandler, +} from '../../../../test-utils/test-helpers.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, testMacosLogic } from '../test_macos.ts'; @@ -56,7 +60,7 @@ describe('test_macos plugin (unified)', () => { describe('Handler Requirements', () => { it('should require scheme before running', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('scheme is required'); @@ -65,7 +69,7 @@ describe('test_macos plugin (unified)', () => { it('should require project or workspace when scheme default exists', async () => { sessionStore.setDefaults({ scheme: 'MyScheme' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Provide a project or workspace'); @@ -74,7 +78,7 @@ describe('test_macos plugin (unified)', () => { it('should reject when both projectPath and workspacePath provided explicitly', async () => { sessionStore.setDefaults({ scheme: 'MyScheme' }); - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', workspacePath: '/path/to/workspace.xcworkspace', }); @@ -86,7 +90,7 @@ describe('test_macos plugin (unified)', () => { describe('XOR Parameter Validation', () => { it('should validate that either projectPath or workspacePath is provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { scheme: 'MyScheme', }); @@ -95,7 +99,7 @@ describe('test_macos plugin (unified)', () => { }); it('should validate that both projectPath and workspacePath cannot be provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', workspacePath: '/path/to/workspace.xcworkspace', scheme: 'MyScheme', diff --git a/src/mcp/tools/project-discovery/__tests__/get_app_bundle_id.test.ts b/src/mcp/tools/project-discovery/__tests__/get_app_bundle_id.test.ts index 13b8e3d17..1d37413d0 100644 --- a/src/mcp/tools/project-discovery/__tests__/get_app_bundle_id.test.ts +++ b/src/mcp/tools/project-discovery/__tests__/get_app_bundle_id.test.ts @@ -6,7 +6,7 @@ import { get_app_bundle_idLogic, createGetAppBundleIdExecutor, } from '../get_app_bundle_id.ts'; -import { runLogic } from '../../../../test-utils/test-helpers.ts'; +import { runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; import { createMockFileSystemExecutor, @@ -49,7 +49,7 @@ describe('get_app_bundle_id plugin', () => { describe('Handler behavior', () => { it('should return error when appPath validation fails', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Parameter validation failed'); @@ -189,7 +189,7 @@ describe('get_app_bundle_id plugin', () => { }); it('should reject non-string appPath values through the handler', async () => { - const result = await handler({ appPath: 123 }); + const result = await callHandler(handler, { appPath: 123 }); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Parameter validation failed'); diff --git a/src/mcp/tools/project-discovery/__tests__/list_schemes.test.ts b/src/mcp/tools/project-discovery/__tests__/list_schemes.test.ts index d37dc994b..f5932c29a 100644 --- a/src/mcp/tools/project-discovery/__tests__/list_schemes.test.ts +++ b/src/mcp/tools/project-discovery/__tests__/list_schemes.test.ts @@ -12,7 +12,7 @@ import { createListSchemesExecutor, } from '../list_schemes.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; -import { runLogic } from '../../../../test-utils/test-helpers.ts'; +import { runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('list_schemes plugin', () => { beforeEach(() => { @@ -322,7 +322,7 @@ describe('list_schemes plugin', () => { }); it('should handle validation when testing with missing projectPath via plugin handler', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Missing required session defaults'); expect(result.content[0].text).toContain('Provide a project or workspace'); @@ -331,14 +331,14 @@ describe('list_schemes plugin', () => { describe('XOR Validation', () => { it('should error when neither projectPath nor workspacePath provided', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Missing required session defaults'); expect(result.content[0].text).toContain('Provide a project or workspace'); }); it('should error when both projectPath and workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', workspacePath: '/path/to/workspace.xcworkspace', }); @@ -347,7 +347,7 @@ describe('list_schemes plugin', () => { }); it('should handle empty strings as undefined', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '', workspacePath: '', }); diff --git a/src/mcp/tools/project-discovery/__tests__/show_build_settings.test.ts b/src/mcp/tools/project-discovery/__tests__/show_build_settings.test.ts index 48836841b..b4aa554af 100644 --- a/src/mcp/tools/project-discovery/__tests__/show_build_settings.test.ts +++ b/src/mcp/tools/project-discovery/__tests__/show_build_settings.test.ts @@ -8,7 +8,7 @@ import { createShowBuildSettingsExecutor, } from '../show_build_settings.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('show_build_settings plugin', () => { beforeEach(() => { @@ -150,7 +150,7 @@ Build settings for action build and target MyApp: describe('XOR Validation', () => { it('should error when neither projectPath nor workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { scheme: 'MyScheme', }); @@ -160,7 +160,7 @@ Build settings for action build and target MyApp: }); it('should error when both projectPath and workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/project.xcodeproj', workspacePath: '/path/workspace.xcworkspace', scheme: 'MyScheme', @@ -173,7 +173,7 @@ Build settings for action build and target MyApp: describe('Session requirement handling', () => { it('should require scheme when not provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/MyProject.xcodeproj', } as never); @@ -185,7 +185,7 @@ Build settings for action build and target MyApp: it('should surface project/workspace requirement even with scheme default', async () => { sessionStore.setDefaults({ scheme: 'MyScheme' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Missing required session defaults'); 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/__tests__/session_clear_defaults.test.ts b/src/mcp/tools/session-management/__tests__/session_clear_defaults.test.ts index 8e5025a34..6b1f77623 100644 --- a/src/mcp/tools/session-management/__tests__/session_clear_defaults.test.ts +++ b/src/mcp/tools/session-management/__tests__/session_clear_defaults.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, sessionClearDefaultsLogic } from '../session_clear_defaults.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('session-clear-defaults tool', () => { beforeEach(() => { @@ -122,7 +122,7 @@ describe('session-clear-defaults tool', () => { }); it('should validate keys enum', async () => { - const result = (await handler({ keys: ['invalid' as any] })) as any; + const result = (await callHandler(handler, { keys: ['invalid' as any] })) as any; expect(result.isError).toBe(true); expect(allText(result)).toContain('keys'); }); diff --git a/src/mcp/tools/session-management/__tests__/session_set_defaults.test.ts b/src/mcp/tools/session-management/__tests__/session_set_defaults.test.ts index 0b7f23aa1..9718d2077 100644 --- a/src/mcp/tools/session-management/__tests__/session_set_defaults.test.ts +++ b/src/mcp/tools/session-management/__tests__/session_set_defaults.test.ts @@ -6,7 +6,7 @@ import { sessionStore } from '../../../../utils/session-store.ts'; import { createMockFileSystemExecutor } from '../../../../test-utils/mock-executors.ts'; import { schema, handler, sessionSetDefaultsLogic } from '../session_set_defaults.ts'; import type { CommandExecutor } from '../../../../utils/execution/index.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('session-set-defaults tool', () => { beforeEach(() => { @@ -80,7 +80,7 @@ describe('session-set-defaults tool', () => { }); it('should validate parameter types via Zod', async () => { - const result = await handler({ + const result = await callHandler(handler, { useLatestOS: 'yes' as unknown as boolean, }); @@ -89,7 +89,7 @@ describe('session-set-defaults tool', () => { }); it('should reject env values that are not strings', async () => { - const result = await handler({ + const result = await callHandler(handler, { env: { STAGING_ENABLED: 1 as unknown as string, }, @@ -100,7 +100,7 @@ describe('session-set-defaults tool', () => { }); it('should reject empty string defaults for required string fields', async () => { - const result = await handler({ + const result = await callHandler(handler, { scheme: '', }); diff --git a/src/mcp/tools/session-management/__tests__/session_show_defaults.test.ts b/src/mcp/tools/session-management/__tests__/session_show_defaults.test.ts index b3519db5e..3c22a5f7c 100644 --- a/src/mcp/tools/session-management/__tests__/session_show_defaults.test.ts +++ b/src/mcp/tools/session-management/__tests__/session_show_defaults.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler } from '../session_show_defaults.ts'; -import { allText } from '../../../../test-utils/test-helpers.ts'; +import { allText, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('session-show-defaults tool', () => { beforeEach(() => { @@ -28,7 +28,7 @@ describe('session-show-defaults tool', () => { sessionStore.setActiveProfile('ios'); sessionStore.setDefaults({ scheme: 'IOSScheme' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBeFalsy(); expect(allText(result)).toContain('scheme: IOSScheme'); }); 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/__tests__/set_sim_appearance.test.ts b/src/mcp/tools/simulator-management/__tests__/set_sim_appearance.test.ts index 3bb6a567f..cf1cf73ec 100644 --- a/src/mcp/tools/simulator-management/__tests__/set_sim_appearance.test.ts +++ b/src/mcp/tools/simulator-management/__tests__/set_sim_appearance.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect } from 'vitest'; import * as z from 'zod'; import { schema, handler, set_sim_appearanceLogic } from '../set_sim_appearance.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; import { createMockCommandResponse, @@ -71,7 +71,7 @@ describe('set_sim_appearance plugin', () => { }); it('should surface session default requirement when simulatorId is missing', async () => { - const result = await handler({ mode: 'dark' }); + const result = await callHandler(handler, { mode: 'dark' }); const message = result.content?.[0]?.text ?? ''; expect(message).toContain('Missing required session defaults'); 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__/boot_sim.test.ts b/src/mcp/tools/simulator/__tests__/boot_sim.test.ts index 1bc852458..5e40e5af5 100644 --- a/src/mcp/tools/simulator/__tests__/boot_sim.test.ts +++ b/src/mcp/tools/simulator/__tests__/boot_sim.test.ts @@ -6,7 +6,7 @@ import { } from '../../../../test-utils/mock-executors.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, boot_simLogic } from '../boot_sim.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('boot_sim tool', () => { beforeEach(() => { @@ -27,7 +27,7 @@ describe('boot_sim tool', () => { describe('Handler Requirements', () => { it('should require simulatorId when not provided', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); const message = result.content[0].text; diff --git a/src/mcp/tools/simulator/__tests__/build_run_sim.test.ts b/src/mcp/tools/simulator/__tests__/build_run_sim.test.ts index 6c2117315..f68c189d7 100644 --- a/src/mcp/tools/simulator/__tests__/build_run_sim.test.ts +++ b/src/mcp/tools/simulator/__tests__/build_run_sim.test.ts @@ -6,7 +6,11 @@ import { createMockCommandResponse, mockProcess, } from '../../../../test-utils/mock-executors.ts'; -import { runToolLogic, type MockToolHandlerResult } from '../../../../test-utils/test-helpers.ts'; +import { + runToolLogic, + type MockToolHandlerResult, + callHandler, +} from '../../../../test-utils/test-helpers.ts'; import type { CommandExecutor } from '../../../../utils/execution/index.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, build_run_simLogic, type SimulatorLauncher } from '../build_run_sim.ts'; @@ -712,7 +716,7 @@ describe('build_run_sim tool', () => { describe('XOR Validation', () => { it('should error when neither projectPath nor workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { scheme: 'MyScheme', simulatorName: 'iPhone 17', }); @@ -722,7 +726,7 @@ describe('build_run_sim tool', () => { }); it('should error when both projectPath and workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/project.xcodeproj', workspacePath: '/path/workspace.xcworkspace', scheme: 'MyScheme', diff --git a/src/mcp/tools/simulator/__tests__/build_sim.test.ts b/src/mcp/tools/simulator/__tests__/build_sim.test.ts index 684011d1d..ff0011fa6 100644 --- a/src/mcp/tools/simulator/__tests__/build_sim.test.ts +++ b/src/mcp/tools/simulator/__tests__/build_sim.test.ts @@ -5,7 +5,11 @@ import { createMockExecutor, createMockCommandResponse, } from '../../../../test-utils/mock-executors.ts'; -import { expectPendingBuildResponse, runToolLogic } from '../../../../test-utils/test-helpers.ts'; +import { + expectPendingBuildResponse, + runToolLogic, + callHandler, +} from '../../../../test-utils/test-helpers.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, build_simLogic } from '../build_sim.ts'; @@ -44,7 +48,7 @@ describe('build_sim tool', () => { describe('Parameter Validation', () => { it('should handle missing both projectPath and workspacePath', async () => { - const result = await handler({ + const result = await callHandler(handler, { scheme: 'MyScheme', simulatorName: 'iPhone 17', }); @@ -55,7 +59,7 @@ describe('build_sim tool', () => { }); it('should handle both projectPath and workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/path/to/project.xcodeproj', workspacePath: '/path/to/workspace', scheme: 'MyScheme', @@ -85,7 +89,7 @@ describe('build_sim tool', () => { }); it('should handle missing scheme parameter', async () => { - const result = await handler({ + const result = await callHandler(handler, { workspacePath: '/path/to/workspace', simulatorName: 'iPhone 17', }); @@ -111,7 +115,7 @@ describe('build_sim tool', () => { }); it('should handle missing both simulatorId and simulatorName', async () => { - const result = await handler({ + const result = await callHandler(handler, { workspacePath: '/path/to/workspace', scheme: 'MyScheme', }); @@ -124,7 +128,7 @@ describe('build_sim tool', () => { it('should handle both simulatorId and simulatorName provided', async () => { const mockExecutor = createMockExecutor({ success: true, output: 'Build succeeded' }); - const result = await handler({ + const result = await callHandler(handler, { workspacePath: '/path/to/workspace', scheme: 'MyScheme', simulatorId: 'ABC-123', diff --git a/src/mcp/tools/simulator/__tests__/get_sim_app_path.test.ts b/src/mcp/tools/simulator/__tests__/get_sim_app_path.test.ts index 567c8bb87..93f0c7b16 100644 --- a/src/mcp/tools/simulator/__tests__/get_sim_app_path.test.ts +++ b/src/mcp/tools/simulator/__tests__/get_sim_app_path.test.ts @@ -12,7 +12,7 @@ import { } from '../get_sim_app_path.ts'; import type { CommandExecutor } from '../../../../utils/CommandExecutor.ts'; import { XcodePlatform } from '../../../../types/common.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('get_sim_app_path tool', () => { beforeEach(() => { @@ -38,7 +38,7 @@ describe('get_sim_app_path tool', () => { describe('Handler Requirements', () => { it('should require scheme when not provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { platform: XcodePlatform.iOSSimulator, }); @@ -49,7 +49,7 @@ describe('get_sim_app_path tool', () => { it('should require project or workspace when scheme default exists', async () => { sessionStore.setDefaults({ scheme: 'MyScheme' }); - const result = await handler({ + const result = await callHandler(handler, { platform: XcodePlatform.iOSSimulator, }); @@ -63,7 +63,7 @@ describe('get_sim_app_path tool', () => { projectPath: '/path/to/project.xcodeproj', }); - const result = await handler({ + const result = await callHandler(handler, { platform: XcodePlatform.iOSSimulator, }); @@ -74,7 +74,7 @@ describe('get_sim_app_path tool', () => { it('should error when both projectPath and workspacePath provided explicitly', async () => { sessionStore.setDefaults({ scheme: 'MyScheme' }); - const result = await handler({ + const result = await callHandler(handler, { platform: XcodePlatform.iOSSimulator, projectPath: '/path/project.xcodeproj', workspacePath: '/path/workspace.xcworkspace', @@ -92,7 +92,7 @@ describe('get_sim_app_path tool', () => { workspacePath: '/path/to/workspace.xcworkspace', }); - const result = await handler({ + const result = await callHandler(handler, { platform: XcodePlatform.iOSSimulator, simulatorId: 'SIM-UUID', simulatorName: 'iPhone 17', diff --git a/src/mcp/tools/simulator/__tests__/install_app_sim.test.ts b/src/mcp/tools/simulator/__tests__/install_app_sim.test.ts index 8872f3061..21d892997 100644 --- a/src/mcp/tools/simulator/__tests__/install_app_sim.test.ts +++ b/src/mcp/tools/simulator/__tests__/install_app_sim.test.ts @@ -9,7 +9,7 @@ import { import { sessionStore } from '../../../../utils/session-store.ts'; import type { CommandExecutor } from '../../../../utils/execution/index.ts'; import { schema, handler, install_app_simLogic } from '../install_app_sim.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('install_app_sim tool', () => { beforeEach(() => { @@ -37,7 +37,7 @@ describe('install_app_sim tool', () => { describe('Handler Requirements', () => { it('should require simulatorId when not provided', async () => { - const result = await handler({ appPath: '/path/to/app.app' }); + const result = await callHandler(handler, { appPath: '/path/to/app.app' }); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Missing required session defaults'); @@ -48,7 +48,7 @@ describe('install_app_sim tool', () => { it('should validate appPath when simulatorId default exists', async () => { sessionStore.setDefaults({ simulatorId: 'SIM-UUID' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Parameter validation failed'); diff --git a/src/mcp/tools/simulator/__tests__/launch_app_sim.test.ts b/src/mcp/tools/simulator/__tests__/launch_app_sim.test.ts index 583c5ca9c..d3408553d 100644 --- a/src/mcp/tools/simulator/__tests__/launch_app_sim.test.ts +++ b/src/mcp/tools/simulator/__tests__/launch_app_sim.test.ts @@ -4,7 +4,7 @@ import { createMockExecutor } from '../../../../test-utils/mock-executors.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, launch_app_simLogic, type SimulatorLauncher } from '../launch_app_sim.ts'; import type { LaunchWithLoggingResult } from '../../../../utils/simulator-steps.ts'; -import { runLogic } from '../../../../test-utils/test-helpers.ts'; +import { runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; function createMockLauncher(overrides?: Partial): SimulatorLauncher { return async (_uuid, _bundleId, _executor, _opts?) => ({ @@ -48,7 +48,7 @@ describe('launch_app_sim tool', () => { describe('Handler Requirements', () => { it('should require simulator identifier when not provided', async () => { - const result = await handler({ bundleId: 'io.sentry.testapp' }); + const result = await callHandler(handler, { bundleId: 'io.sentry.testapp' }); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Missing required session defaults'); @@ -59,7 +59,7 @@ describe('launch_app_sim tool', () => { it('should require bundleId when simulatorId default exists', async () => { sessionStore.setDefaults({ simulatorId: 'SIM-UUID' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Missing required session defaults'); @@ -67,7 +67,7 @@ describe('launch_app_sim tool', () => { }); it('should reject when both simulatorId and simulatorName provided explicitly', async () => { - const result = await handler({ + const result = await callHandler(handler, { simulatorId: 'SIM-UUID', simulatorName: 'iPhone 17', bundleId: 'io.sentry.testapp', 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/__tests__/record_sim_video.test.ts b/src/mcp/tools/simulator/__tests__/record_sim_video.test.ts index 0e57ac9df..913c5d590 100644 --- a/src/mcp/tools/simulator/__tests__/record_sim_video.test.ts +++ b/src/mcp/tools/simulator/__tests__/record_sim_video.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect, vi, afterEach } from 'vitest'; import { schema, handler, record_sim_videoLogic } from '../record_sim_video.ts'; import { createMockFileSystemExecutor } from '../../../../test-utils/mock-executors.ts'; -import { createMockToolHandlerContext } from '../../../../test-utils/test-helpers.ts'; +import { createMockToolHandlerContext, callHandler } from '../../../../test-utils/test-helpers.ts'; const DUMMY_EXECUTOR: any = (async () => ({ success: true })) as any; // CommandExecutor stub const VALID_SIM_ID = '00000000-0000-0000-0000-000000000000'; @@ -13,7 +13,7 @@ afterEach(() => { describe('record_sim_video tool - validation', () => { it('errors when start and stop are both true (mutually exclusive)', async () => { - const res = await handler({ + const res = await callHandler(handler, { simulatorId: VALID_SIM_ID, start: true, stop: true, @@ -25,7 +25,7 @@ describe('record_sim_video tool - validation', () => { }); it('errors when stop=true but outputFile is missing', async () => { - const res = await handler({ + const res = await callHandler(handler, { simulatorId: VALID_SIM_ID, stop: true, } as any); diff --git a/src/mcp/tools/simulator/__tests__/screenshot.test.ts b/src/mcp/tools/simulator/__tests__/screenshot.test.ts index f32e80ca1..4432513e0 100644 --- a/src/mcp/tools/simulator/__tests__/screenshot.test.ts +++ b/src/mcp/tools/simulator/__tests__/screenshot.test.ts @@ -10,7 +10,7 @@ import type { CommandExecutor } from '../../../../utils/execution/index.ts'; import { SystemError } from '../../../../utils/errors.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, screenshotLogic } from '../../ui-automation/screenshot.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('screenshot plugin', () => { beforeEach(() => { @@ -310,7 +310,7 @@ describe('screenshot plugin', () => { }); it('should handle missing simulatorId via handler', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); const message = result.content[0].text; diff --git a/src/mcp/tools/simulator/__tests__/stop_app_sim.test.ts b/src/mcp/tools/simulator/__tests__/stop_app_sim.test.ts index c89893617..8dc13ef9a 100644 --- a/src/mcp/tools/simulator/__tests__/stop_app_sim.test.ts +++ b/src/mcp/tools/simulator/__tests__/stop_app_sim.test.ts @@ -13,7 +13,7 @@ import { } from '../../../../utils/log-capture/simulator-launch-oslog-sessions.ts'; import { setSimulatorLaunchOsLogRecordActiveOverrideForTests } from '../../../../utils/log-capture/simulator-launch-oslog-registry.ts'; import { schema, handler, stop_app_simLogic } from '../stop_app_sim.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; import { EventEmitter } from 'node:events'; import { mkdtempSync } from 'node:fs'; import { rm } from 'node:fs/promises'; @@ -112,7 +112,7 @@ describe('stop_app_sim tool', () => { describe('Handler Requirements', () => { it('should require simulator identifier when not provided', async () => { - const result = await handler({ bundleId: 'io.sentry.app' }); + const result = await callHandler(handler, { bundleId: 'io.sentry.app' }); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Missing required session defaults'); @@ -123,7 +123,7 @@ describe('stop_app_sim tool', () => { it('should require bundleId when simulatorId default exists', async () => { sessionStore.setDefaults({ simulatorId: 'SIM-UUID' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Missing required session defaults'); @@ -131,7 +131,7 @@ describe('stop_app_sim tool', () => { }); it('should reject mutually exclusive simulator parameters', async () => { - const result = await handler({ + const result = await callHandler(handler, { simulatorId: 'SIM-UUID', simulatorName: 'iPhone 17', bundleId: 'io.sentry.app', diff --git a/src/mcp/tools/simulator/__tests__/test_sim.test.ts b/src/mcp/tools/simulator/__tests__/test_sim.test.ts index 54df996c2..ce3d6abe9 100644 --- a/src/mcp/tools/simulator/__tests__/test_sim.test.ts +++ b/src/mcp/tools/simulator/__tests__/test_sim.test.ts @@ -6,6 +6,7 @@ import { createMockCommandResponse, createMockFileSystemExecutor, } from '../../../../test-utils/mock-executors.ts'; +import { callHandler } from '../../../../test-utils/test-helpers.ts'; describe('test_sim tool', () => { beforeEach(() => { @@ -40,7 +41,7 @@ describe('test_sim tool', () => { describe('Handler Requirements', () => { it('should require scheme when not provided', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('scheme is required'); @@ -49,7 +50,7 @@ describe('test_sim tool', () => { it('should require project or workspace when scheme default exists', async () => { sessionStore.setDefaults({ scheme: 'MyScheme' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Provide a project or workspace'); @@ -61,7 +62,7 @@ describe('test_sim tool', () => { projectPath: '/path/to/project.xcodeproj', }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(result.content[0].text).toContain('Provide simulatorId or simulatorName'); @@ -73,7 +74,7 @@ describe('test_sim tool', () => { workspacePath: '/path/to/workspace.xcworkspace', }); - const result = await handler({ + const result = await callHandler(handler, { simulatorId: 'SIM-UUID', simulatorName: 'iPhone 17', }); 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/__tests__/swift_package_run.test.ts b/src/mcp/tools/swift-package/__tests__/swift_package_run.test.ts index e3841a686..1d9e6d0a7 100644 --- a/src/mcp/tools/swift-package/__tests__/swift_package_run.test.ts +++ b/src/mcp/tools/swift-package/__tests__/swift_package_run.test.ts @@ -5,7 +5,7 @@ import { createNoopExecutor, createMockCommandResponse, } from '../../../../test-utils/mock-executors.ts'; -import { runToolLogic } from '../../../../test-utils/test-helpers.ts'; +import { runToolLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; import { schema, handler, swift_package_runLogic } from '../swift_package_run.ts'; import type { CommandExecutor } from '../../../../utils/execution/index.ts'; @@ -299,7 +299,7 @@ describe('swift_package_run plugin', () => { describe('Response Logic Testing', () => { it('should return validation error for missing packagePath', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); const text = result.content.map((c) => c.text).join('\n'); diff --git a/src/mcp/tools/swift-package/__tests__/swift_package_stop.test.ts b/src/mcp/tools/swift-package/__tests__/swift_package_stop.test.ts index d7fe32cae..5468b1967 100644 --- a/src/mcp/tools/swift-package/__tests__/swift_package_stop.test.ts +++ b/src/mcp/tools/swift-package/__tests__/swift_package_stop.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, vi } from 'vitest'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; import { schema, @@ -123,7 +123,7 @@ describe('swift_package_stop plugin', () => { }); it('returns validation error from handler', async () => { - const result = await handler({ pid: 'bad' }); + const result = await callHandler(handler, { pid: 'bad' }); expect(result.isError).toBe(true); const text = allText(result); 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/__tests__/button.test.ts b/src/mcp/tools/ui-automation/__tests__/button.test.ts index 8fb31aed6..d83851720 100644 --- a/src/mcp/tools/ui-automation/__tests__/button.test.ts +++ b/src/mcp/tools/ui-automation/__tests__/button.test.ts @@ -8,7 +8,7 @@ import { import { schema, handler, buttonLogic } from '../button.ts'; import type { CommandExecutor } from '../../../../utils/execution/index.ts'; import { AXE_NOT_AVAILABLE_MESSAGE } from '../../../../utils/axe-helpers.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('Button Plugin', () => { describe('Export Field Validation (Literal)', () => { @@ -186,7 +186,7 @@ describe('Button Plugin', () => { describe('Handler Behavior (Complete Literal Returns)', () => { it('should surface session default requirement when simulatorId is missing', async () => { - const result = await handler({ buttonType: 'home' }); + const result = await callHandler(handler, { buttonType: 'home' }); expect(result.isError).toBe(true); expect(allText(result)).toContain('Missing required session defaults'); @@ -194,7 +194,7 @@ describe('Button Plugin', () => { }); it('should return error for missing buttonType', async () => { - const result = await handler({ + const result = await callHandler(handler, { simulatorId: '12345678-1234-4234-8234-123456789012', }); @@ -206,7 +206,7 @@ describe('Button Plugin', () => { }); it('should return error for invalid simulatorId format', async () => { - const result = await handler({ + const result = await callHandler(handler, { simulatorId: 'invalid-uuid-format', buttonType: 'home', }); @@ -217,7 +217,7 @@ describe('Button Plugin', () => { }); it('should return error for invalid buttonType', async () => { - const result = await handler({ + const result = await callHandler(handler, { simulatorId: '12345678-1234-4234-8234-123456789012', buttonType: 'invalid-button', }); @@ -227,7 +227,7 @@ describe('Button Plugin', () => { }); it('should return error for negative duration', async () => { - const result = await handler({ + const result = await callHandler(handler, { simulatorId: '12345678-1234-4234-8234-123456789012', buttonType: 'home', duration: -1, diff --git a/src/mcp/tools/ui-automation/__tests__/gesture.test.ts b/src/mcp/tools/ui-automation/__tests__/gesture.test.ts index 48b5f5e59..a010bcd32 100644 --- a/src/mcp/tools/ui-automation/__tests__/gesture.test.ts +++ b/src/mcp/tools/ui-automation/__tests__/gesture.test.ts @@ -8,7 +8,7 @@ import { import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, gestureLogic } from '../gesture.ts'; import { AXE_NOT_AVAILABLE_MESSAGE } from '../../../../utils/axe-helpers.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('Gesture Plugin', () => { beforeEach(() => { @@ -50,7 +50,7 @@ describe('Gesture Plugin', () => { describe('Handler Requirements', () => { it('should require simulatorId session default when not provided', async () => { - const result = await handler({ preset: 'scroll-up' }); + const result = await callHandler(handler, { preset: 'scroll-up' }); expect(result.isError).toBe(true); const message = result.content[0].text; @@ -62,7 +62,7 @@ describe('Gesture Plugin', () => { it('should surface validation errors once simulator defaults exist', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); const message = result.content[0].text; diff --git a/src/mcp/tools/ui-automation/__tests__/key_press.test.ts b/src/mcp/tools/ui-automation/__tests__/key_press.test.ts index 96ee71648..b9d8be0ec 100644 --- a/src/mcp/tools/ui-automation/__tests__/key_press.test.ts +++ b/src/mcp/tools/ui-automation/__tests__/key_press.test.ts @@ -9,7 +9,7 @@ import { import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, key_pressLogic } from '../key_press.ts'; import { AXE_NOT_AVAILABLE_MESSAGE } from '../../../../utils/axe-helpers.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; function createDefaultMockAxeHelpers() { return { @@ -50,7 +50,7 @@ describe('Key Press Tool', () => { describe('Handler Requirements', () => { it('should require simulatorId session default when not provided', async () => { - const result = await handler({ keyCode: 40 }); + const result = await callHandler(handler, { keyCode: 40 }); expect(result.isError).toBe(true); const message = result.content[0].text; @@ -62,7 +62,7 @@ describe('Key Press Tool', () => { it('should surface validation errors once simulator default exists', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); const message = result.content[0].text; diff --git a/src/mcp/tools/ui-automation/__tests__/key_sequence.test.ts b/src/mcp/tools/ui-automation/__tests__/key_sequence.test.ts index badf86b65..9e71d84a6 100644 --- a/src/mcp/tools/ui-automation/__tests__/key_sequence.test.ts +++ b/src/mcp/tools/ui-automation/__tests__/key_sequence.test.ts @@ -8,7 +8,7 @@ import { import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, key_sequenceLogic } from '../key_sequence.ts'; import { AXE_NOT_AVAILABLE_MESSAGE } from '../../../../utils/axe-helpers.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('Key Sequence Tool', () => { beforeEach(() => { @@ -43,7 +43,7 @@ describe('Key Sequence Tool', () => { describe('Handler Requirements', () => { it('should require simulatorId session default when not provided', async () => { - const result = await handler({ keyCodes: [40] }); + const result = await callHandler(handler, { keyCodes: [40] }); expect(result.isError).toBe(true); const message = result.content[0].text; @@ -55,7 +55,7 @@ describe('Key Sequence Tool', () => { it('should surface validation errors once simulator defaults exist', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({ keyCodes: [] }); + const result = await callHandler(handler, { keyCodes: [] }); expect(result.isError).toBe(true); const message = result.content[0].text; @@ -226,7 +226,7 @@ describe('Key Sequence Tool', () => { describe('Handler Behavior (Complete Literal Returns)', () => { it('should surface session default requirement when simulatorId is missing', async () => { - const result = await handler({ keyCodes: [40] }); + const result = await callHandler(handler, { keyCodes: [40] }); expect(result.isError).toBe(true); expect(allText(result)).toContain('Missing required session defaults'); diff --git a/src/mcp/tools/ui-automation/__tests__/long_press.test.ts b/src/mcp/tools/ui-automation/__tests__/long_press.test.ts index 6afa10ce7..d6be95a7e 100644 --- a/src/mcp/tools/ui-automation/__tests__/long_press.test.ts +++ b/src/mcp/tools/ui-automation/__tests__/long_press.test.ts @@ -4,7 +4,7 @@ import { createMockExecutor, mockProcess } from '../../../../test-utils/mock-exe import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, long_pressLogic } from '../long_press.ts'; import { AXE_NOT_AVAILABLE_MESSAGE } from '../../../../utils/axe-helpers.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('Long Press Plugin', () => { beforeEach(() => { @@ -72,7 +72,7 @@ describe('Long Press Plugin', () => { describe('Handler Requirements', () => { it('should require simulatorId session default', async () => { - const result = await handler({ x: 100, y: 200, duration: 1500 }); + const result = await callHandler(handler, { x: 100, y: 200, duration: 1500 }); expect(result.isError).toBe(true); const message = result.content[0].text; @@ -84,7 +84,7 @@ describe('Long Press Plugin', () => { it('should surface validation errors once simulator default exists', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({ x: 100, y: 200, duration: 0 }); + const result = await callHandler(handler, { x: 100, y: 200, duration: 0 }); expect(result.isError).toBe(true); const message = result.content[0].text; diff --git a/src/mcp/tools/ui-automation/__tests__/screenshot.test.ts b/src/mcp/tools/ui-automation/__tests__/screenshot.test.ts index 2184eff4c..c7e62669f 100644 --- a/src/mcp/tools/ui-automation/__tests__/screenshot.test.ts +++ b/src/mcp/tools/ui-automation/__tests__/screenshot.test.ts @@ -14,7 +14,7 @@ import { detectLandscapeMode, rotateImage, } from '../screenshot.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('Screenshot Plugin', () => { beforeEach(() => { @@ -42,7 +42,7 @@ describe('Screenshot Plugin', () => { describe('Plugin Handler Validation', () => { it('should require simulatorId session default when not provided', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); const message = result.content[0].text; @@ -52,7 +52,7 @@ describe('Screenshot Plugin', () => { }); it('should validate inline simulatorId overrides', async () => { - const result = await handler({ + const result = await callHandler(handler, { simulatorId: 'invalid-uuid', }); diff --git a/src/mcp/tools/ui-automation/__tests__/snapshot_ui.test.ts b/src/mcp/tools/ui-automation/__tests__/snapshot_ui.test.ts index 682d96c7b..42a816db3 100644 --- a/src/mcp/tools/ui-automation/__tests__/snapshot_ui.test.ts +++ b/src/mcp/tools/ui-automation/__tests__/snapshot_ui.test.ts @@ -4,7 +4,7 @@ import { createMockExecutor, createNoopExecutor } from '../../../../test-utils/m import type { CommandExecutor } from '../../../../utils/execution/index.ts'; import { schema, handler, snapshot_uiLogic } from '../snapshot_ui.ts'; import { AXE_NOT_AVAILABLE_MESSAGE } from '../../../../utils/axe-helpers.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('Snapshot UI Plugin', () => { describe('Export Field Validation (Literal)', () => { @@ -27,7 +27,7 @@ describe('Snapshot UI Plugin', () => { describe('Handler Behavior (Complete Literal Returns)', () => { it('should surface session default requirement when simulatorId is missing', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); expect(allText(result)).toContain('Missing required session defaults'); @@ -36,7 +36,7 @@ describe('Snapshot UI Plugin', () => { it('should handle invalid simulatorId format via schema validation', async () => { // Test the actual handler with invalid UUID format - const result = await handler({ + const result = await callHandler(handler, { simulatorId: 'invalid-uuid-format', }); diff --git a/src/mcp/tools/ui-automation/__tests__/swipe.test.ts b/src/mcp/tools/ui-automation/__tests__/swipe.test.ts index 76a436239..5fe3fb62c 100644 --- a/src/mcp/tools/ui-automation/__tests__/swipe.test.ts +++ b/src/mcp/tools/ui-automation/__tests__/swipe.test.ts @@ -6,7 +6,7 @@ import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, type AxeHelpers, swipeLogic, type SwipeParams } from '../swipe.ts'; import { AXE_NOT_AVAILABLE_MESSAGE } from '../../../../utils/axe-helpers.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; function createMockAxeHelpers(): AxeHelpers { return { @@ -289,7 +289,7 @@ describe('Swipe Tool', () => { describe('Handler Behavior', () => { it('should return error for missing simulatorId via handler', async () => { - const result = await handler({ x1: 100, y1: 200, x2: 300, y2: 400 }); + const result = await callHandler(handler, { x1: 100, y1: 200, x2: 300, y2: 400 }); expect(result.isError).toBe(true); expect(result.content[0].type).toBe('text'); @@ -301,7 +301,7 @@ describe('Swipe Tool', () => { it('should return validation error for missing x1 once simulator default exists', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({ + const result = await callHandler(handler, { y1: 200, x2: 300, y2: 400, diff --git a/src/mcp/tools/ui-automation/__tests__/tap.test.ts b/src/mcp/tools/ui-automation/__tests__/tap.test.ts index 092cc8820..062933648 100644 --- a/src/mcp/tools/ui-automation/__tests__/tap.test.ts +++ b/src/mcp/tools/ui-automation/__tests__/tap.test.ts @@ -5,7 +5,7 @@ import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, type AxeHelpers, tapLogic } from '../tap.ts'; import { AXE_NOT_AVAILABLE_MESSAGE } from '../../../../utils/axe-helpers.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; function createMockAxeHelpers(): AxeHelpers { return { @@ -453,7 +453,7 @@ describe('Tap Plugin', () => { describe('Plugin Handler Validation', () => { it('should require simulatorId session default when not provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { x: 100, y: 200, }); @@ -468,7 +468,7 @@ describe('Tap Plugin', () => { it('should return validation error for missing x coordinate', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({ + const result = await callHandler(handler, { y: 200, }); @@ -481,7 +481,7 @@ describe('Tap Plugin', () => { it('should return validation error for missing y coordinate', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({ + const result = await callHandler(handler, { x: 100, }); @@ -494,7 +494,7 @@ describe('Tap Plugin', () => { it('should return validation error when both id and label are provided without coordinates', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({ + const result = await callHandler(handler, { id: 'loginButton', label: 'Log in', }); @@ -508,7 +508,7 @@ describe('Tap Plugin', () => { it('should return validation error for non-integer x coordinate', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({ + const result = await callHandler(handler, { x: 3.14, y: 200, }); @@ -522,7 +522,7 @@ describe('Tap Plugin', () => { it('should return validation error for non-integer y coordinate', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({ + const result = await callHandler(handler, { x: 100, y: 3.14, }); @@ -536,7 +536,7 @@ describe('Tap Plugin', () => { it('should return validation error for negative preDelay', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({ + const result = await callHandler(handler, { x: 100, y: 200, preDelay: -1, @@ -551,7 +551,7 @@ describe('Tap Plugin', () => { it('should return validation error for negative postDelay', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({ + const result = await callHandler(handler, { x: 100, y: 200, postDelay: -1, diff --git a/src/mcp/tools/ui-automation/__tests__/touch.test.ts b/src/mcp/tools/ui-automation/__tests__/touch.test.ts index fd5b1641c..2e89f730a 100644 --- a/src/mcp/tools/ui-automation/__tests__/touch.test.ts +++ b/src/mcp/tools/ui-automation/__tests__/touch.test.ts @@ -4,7 +4,7 @@ import { createMockExecutor, mockProcess } from '../../../../test-utils/mock-exe import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, touchLogic } from '../touch.ts'; import { AXE_NOT_AVAILABLE_MESSAGE } from '../../../../utils/axe-helpers.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('Touch Plugin', () => { beforeEach(() => { @@ -73,7 +73,7 @@ describe('Touch Plugin', () => { describe('Handler Requirements', () => { it('should require simulatorId session default', async () => { - const result = await handler({ + const result = await callHandler(handler, { x: 100, y: 200, down: true, @@ -89,7 +89,7 @@ describe('Touch Plugin', () => { it('should surface parameter validation errors when defaults exist', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({ + const result = await callHandler(handler, { y: 200, down: true, }); diff --git a/src/mcp/tools/ui-automation/__tests__/type_text.test.ts b/src/mcp/tools/ui-automation/__tests__/type_text.test.ts index 945ea2aea..18f481bd5 100644 --- a/src/mcp/tools/ui-automation/__tests__/type_text.test.ts +++ b/src/mcp/tools/ui-automation/__tests__/type_text.test.ts @@ -8,7 +8,7 @@ import { import { sessionStore } from '../../../../utils/session-store.ts'; import { schema, handler, type_textLogic } from '../type_text.ts'; import { AXE_NOT_AVAILABLE_MESSAGE } from '../../../../utils/axe-helpers.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; // Mock axe helpers for dependency injection function createMockAxeHelpers( @@ -75,7 +75,7 @@ describe('Type Text Tool', () => { describe('Handler Requirements', () => { it('should require simulatorId session default', async () => { - const result = await handler({ text: 'Hello' }); + const result = await callHandler(handler, { text: 'Hello' }); expect(result.isError).toBe(true); const message = result.content[0].text; @@ -87,7 +87,7 @@ describe('Type Text Tool', () => { it('should surface validation errors when defaults exist', async () => { sessionStore.setDefaults({ simulatorId: '12345678-1234-4234-8234-123456789012' }); - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); const message = result.content[0].text; 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/__tests__/clean.test.ts b/src/mcp/tools/utilities/__tests__/clean.test.ts index d4a933597..e88e8ab3e 100644 --- a/src/mcp/tools/utilities/__tests__/clean.test.ts +++ b/src/mcp/tools/utilities/__tests__/clean.test.ts @@ -7,7 +7,7 @@ import { } from '../../../../test-utils/mock-executors.ts'; import { sessionStore } from '../../../../utils/session-store.ts'; import type { CommandExecutor } from '../../../../utils/execution/index.ts'; -import { allText, runLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; describe('clean (unified) tool', () => { beforeEach(() => { @@ -34,7 +34,7 @@ describe('clean (unified) tool', () => { }); it('handler validation: error when neither projectPath nor workspacePath provided', async () => { - const result = await handler({}); + const result = await callHandler(handler, {}); expect(result.isError).toBe(true); const text = String(result.content?.[0]?.text ?? ''); expect(text).toContain('Missing required session defaults'); @@ -42,7 +42,7 @@ describe('clean (unified) tool', () => { }); it('handler validation: error when both projectPath and workspacePath provided', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/p.xcodeproj', workspacePath: '/w.xcworkspace', }); @@ -88,7 +88,7 @@ describe('clean (unified) tool', () => { }); it('handler validation: requires scheme when workspacePath is provided', async () => { - const result = await handler({ workspacePath: '/w.xcworkspace' }); + const result = await callHandler(handler, { workspacePath: '/w.xcworkspace' }); expect(result.isError).toBe(true); const text = String(result.content?.[0]?.text ?? ''); expect(text).toContain('Parameter validation failed'); @@ -161,7 +161,7 @@ describe('clean (unified) tool', () => { }); it('handler validation: rejects invalid platform values', async () => { - const result = await handler({ + const result = await callHandler(handler, { projectPath: '/p.xcodeproj', scheme: 'App', platform: 'InvalidPlatform', 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/__tests__/bridge_tools.test.ts b/src/mcp/tools/xcode-ide/__tests__/bridge_tools.test.ts index d2a92103e..af86cd869 100644 --- a/src/mcp/tools/xcode-ide/__tests__/bridge_tools.test.ts +++ b/src/mcp/tools/xcode-ide/__tests__/bridge_tools.test.ts @@ -36,14 +36,14 @@ import { xcodeToolsBridgeDisconnectLogic, } from '../xcode_tools_bridge_disconnect.ts'; import { handler as listHandler, xcodeIdeListToolsLogic } from '../xcode_ide_list_tools.ts'; -import { handler as callHandler, xcodeIdeCallToolLogic } from '../xcode_ide_call_tool.ts'; +import { handler as ideCallToolHandler, xcodeIdeCallToolLogic } from '../xcode_ide_call_tool.ts'; import { getServer } from '../../../../server/server-state.ts'; import { shutdownXcodeToolsBridge } from '../../../../integrations/xcode-tools-bridge/index.ts'; import { buildXcodeToolsBridgeStatus, getMcpBridgeAvailability, } from '../../../../integrations/xcode-tools-bridge/core.ts'; -import { allText, runToolLogic } from '../../../../test-utils/test-helpers.ts'; +import { allText, runToolLogic, callHandler } from '../../../../test-utils/test-helpers.ts'; import { setXcodeBuildMCPAppDirOverrideForTests } from '../../../../utils/log-paths.ts'; import { setRuntimeInstanceForTests } from '../../../../utils/runtime-instance.ts'; @@ -108,7 +108,7 @@ describe('xcode-ide bridge tools (standalone fallback)', () => { }); it('status handler returns bridge status without MCP server instance', async () => { - const result = await statusHandler({}); + const result = await callHandler(statusHandler, {}); const text = allText(result); expect(text).toContain('Bridge Status'); expect(text).toContain('"bridgeAvailable": true'); @@ -116,7 +116,7 @@ describe('xcode-ide bridge tools (standalone fallback)', () => { }); it('sync handler uses direct bridge client when MCP server is not initialized', async () => { - const result = await syncHandler({}); + const result = await callHandler(syncHandler, {}); const text = allText(result); expect(text).toContain('Bridge Sync'); expect(text).toContain('"total": 2'); @@ -126,7 +126,7 @@ describe('xcode-ide bridge tools (standalone fallback)', () => { }); it('disconnect handler succeeds without MCP server instance', async () => { - const result = await disconnectHandler({}); + const result = await callHandler(disconnectHandler, {}); const text = allText(result); expect(text).toContain('Bridge Disconnect'); expect(text).toContain('"connected": false'); @@ -134,7 +134,7 @@ describe('xcode-ide bridge tools (standalone fallback)', () => { }); it('list handler returns bridge tools without MCP server instance', async () => { - const result = await listHandler({ refresh: true }); + const result = await callHandler(listHandler, { refresh: true }); const text = allText(result); expect(text).toContain('Xcode IDE List Tools'); expect(text).toContain('Found 2 tool(s). Raw response saved to artifact.'); @@ -147,8 +147,8 @@ describe('xcode-ide bridge tools (standalone fallback)', () => { }); it('list handler can return cached bridge tools without reconnecting', async () => { - const refreshed = await listHandler({ refresh: true }); - const cached = await listHandler({ refresh: false }); + const refreshed = await callHandler(listHandler, { refresh: true }); + const cached = await callHandler(listHandler, { refresh: false }); expect(allText(refreshed)).toContain('Found 2 tool(s). Raw response saved to artifact.'); expect(allText(cached)).toContain('Found 2 tool(s). Raw response saved to artifact.'); @@ -158,9 +158,9 @@ describe('xcode-ide bridge tools (standalone fallback)', () => { }); it('list handler defaults to refresh only when cache is empty', async () => { - const initial = await listHandler({}); - const cached = await listHandler({}); - const forced = await listHandler({ refresh: true }); + const initial = await callHandler(listHandler, {}); + const cached = await callHandler(listHandler, {}); + const forced = await callHandler(listHandler, { refresh: true }); expect(allText(initial)).toContain('Found 2 tool(s). Raw response saved to artifact.'); expect(allText(cached)).toContain('Found 2 tool(s). Raw response saved to artifact.'); @@ -171,7 +171,10 @@ describe('xcode-ide bridge tools (standalone fallback)', () => { }); it('call handler forwards remote tool calls and writes a raw response artifact', async () => { - const result = await callHandler({ remoteTool: 'toolA', arguments: { foo: 'bar' } }); + const result = await callHandler(ideCallToolHandler, { + remoteTool: 'toolA', + arguments: { foo: 'bar' }, + }); const text = allText(result); const artifactDir = join( tempAppDir, @@ -213,7 +216,10 @@ describe('xcode-ide bridge tools (standalone fallback)', () => { isError: false, }); - const result = await callHandler({ remoteTool: 'toolA', arguments: { foo: 'bar' } }); + const result = await callHandler(ideCallToolHandler, { + remoteTool: 'toolA', + arguments: { foo: 'bar' }, + }); const text = allText(result); expect(result.isError).toBe(true); diff --git a/src/mcp/tools/xcode-ide/shared.ts b/src/mcp/tools/xcode-ide/shared.ts index ba943a82a..2c4eab647 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: string, ): 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/mcp/tools/xcode-ide/xcode_tools_bridge_disconnect.ts b/src/mcp/tools/xcode-ide/xcode_tools_bridge_disconnect.ts index e033167aa..cc3bba47c 100644 --- a/src/mcp/tools/xcode-ide/xcode_tools_bridge_disconnect.ts +++ b/src/mcp/tools/xcode-ide/xcode_tools_bridge_disconnect.ts @@ -36,6 +36,7 @@ export async function xcodeToolsBridgeDisconnectLogic(params: Params): Promise executionContext, result, 'xcodebuildmcp.output.xcode-bridge-status', + '2', ); } diff --git a/src/mcp/tools/xcode-ide/xcode_tools_bridge_sync.ts b/src/mcp/tools/xcode-ide/xcode_tools_bridge_sync.ts index a7b2ad2f8..c720fe75d 100644 --- a/src/mcp/tools/xcode-ide/xcode_tools_bridge_sync.ts +++ b/src/mcp/tools/xcode-ide/xcode_tools_bridge_sync.ts @@ -36,6 +36,7 @@ export async function xcodeToolsBridgeSyncLogic(params: Params): Promise { executionContext, result, 'xcodebuildmcp.output.xcode-bridge-sync', + '2', ); } diff --git a/src/rendering/__tests__/text-render-parity.test.ts b/src/rendering/__tests__/text-render-parity.test.ts index fbe4cac85..49a0c81c2 100644 --- a/src/rendering/__tests__/text-render-parity.test.ts +++ b/src/rendering/__tests__/text-render-parity.test.ts @@ -340,38 +340,74 @@ describe('text render parity', () => { expect(rendered).not.toContain('❌ Build failed. (⏱️ 9.9s)'); }); - it('omits header frontmatter for MCP runtime 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: [] }, + it('omits header frontmatter for minimal style text transcripts', () => { + 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', - { runtime: 'mcp' }, - ); + }; + + const output = renderTranscript(input, 'text', { outputStyle: 'minimal' }); + const mcpDefaultOutput = renderTranscript(input, 'text', { runtime: 'mcp' }); + const cliOverrideOutput = renderTranscript(input, 'text', { + runtime: 'cli', + outputStyle: 'minimal', + }); + + 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', () => { + 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(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)'); + 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', () => { @@ -621,7 +657,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..2b0d6fded 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 ?? (options.runtime === 'mcp' ? 'minimal' : '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/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 72% 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..bc3e32531 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": { @@ -11,7 +11,7 @@ " 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" + " 1.1: where = CalculatorApp.debug.dylib`closure #1 in closure #1 in closure #1 in ContentView.body.getter + at ContentView.swift:42:31, address = , resolved, hit count = 0" ] } } 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..a2dcd967b 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 " + ] } 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..a9a6df89d --- /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 " + ] +} 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..dec53ae83 --- /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": "" + }, + { + "name": "iPhone", + "deviceId": "", + "platform": "iOS", + "state": "disconnected", + "isAvailable": false, + "osVersion": "" + }, + { + "name": "Cameron’s Apple Watch", + "deviceId": "", + "platform": "watchOS", + "state": "disconnected", + "isAvailable": false, + "osVersion": "" + }, + { + "name": "Cameron’s Apple Watch", + "deviceId": "", + "platform": "watchOS", + "state": "connected", + "isAvailable": true, + "osVersion": "" + } + ] + }, + "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 75% 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..e84b56a82 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": { @@ -9,13 +9,13 @@ }, "artifacts": { "processId": 99999, - "appName": "PID 999999" + "appName": "PID " }, "diagnostics": { "warnings": [], "errors": [ { - "message": "kill: 999999: No such process" + "message": "kill: : No such process" } ] } 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..719816658 --- /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": "" + }, + { + "key": "SDK_DIR", + "value": "" + }, + { + "key": "SDK_DIR_", + "value": "" + }, + { + "key": "SDK_DIR_", + "value": "" + }, + { + "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-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/.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 67% 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..879cb8c22 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! ()" ] }, @@ -41,5 +41,8 @@ "warnings": [], "errors": [] } - } + }, + "nextSteps": [ + "Stop Swift package run: xcodebuildmcp swift-package stop" + ] } 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 69% 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..e55d6cde3 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": { @@ -14,7 +14,7 @@ "warnings": [], "errors": [ { - "message": "No running process found with PID 999999. Use swift_package_list to check active processes." + "message": "No running process found with PID . Use swift_package_list to check active processes." } ] } 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__/json/ui-automation/snapshot-ui--success.json b/src/snapshot-tests/__fixtures__/cli/json/ui-automation/snapshot-ui--success.json similarity index 77% rename from src/snapshot-tests/__fixtures__/json/ui-automation/snapshot-ui--success.json rename to src/snapshot-tests/__fixtures__/cli/json/ui-automation/snapshot-ui--success.json index 4c80f145d..9f00f8c5d 100644 --- a/src/snapshot-tests/__fixtures__/json/ui-automation/snapshot-ui--success.json +++ b/src/snapshot-tests/__fixtures__/cli/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": { @@ -16,12 +16,7 @@ { "AXFrame": "{{0, 0}, {402, 874}}", "AXUniqueId": null, - "frame": { - "y": 0, - "x": 0, - "width": 402, - "height": 874 - }, + "frame": { "x": 0, "y": 0, "width": 402, "height": 874 }, "role_description": "application", "AXLabel": "Calculator", "content_required": false, @@ -36,12 +31,7 @@ { "AXFrame": "{{344, 250.5}, {34, 67}}", "AXUniqueId": null, - "frame": { - "y": 250.5, - "x": 344, - "width": 34, - "height": 67 - }, + "frame": { "x": 344, "y": 250.5, "width": 34, "height": 67 }, "role_description": "text", "AXLabel": "0", "content_required": false, @@ -59,12 +49,7 @@ { "AXFrame": "{{19.5, 357.5}, {82.7, 81}}", "AXUniqueId": null, - "frame": { - "y": 357.5, - "x": 19.5, - "width": 82.7, - "height": 81 - }, + "frame": { "x": 19.5, "y": 357.5, "width": 82.7, "height": 81 }, "role_description": "button", "AXLabel": "C", "content_required": false, @@ -82,12 +67,7 @@ { "AXFrame": "{{113.2, 357.5}, {82.3, 81}}", "AXUniqueId": null, - "frame": { - "y": 357.5, - "x": 113.2, - "width": 82.3, - "height": 81 - }, + "frame": { "x": 113.2, "y": 357.5, "width": 82.3, "height": 81 }, "role_description": "button", "AXLabel": "±", "content_required": false, @@ -105,12 +85,7 @@ { "AXFrame": "{{206.5, 357.5}, {82.7, 81}}", "AXUniqueId": null, - "frame": { - "y": 357.5, - "x": 206.5, - "width": 82.7, - "height": 81 - }, + "frame": { "x": 206.5, "y": 357.5, "width": 82.7, "height": 81 }, "role_description": "button", "AXLabel": "%", "content_required": false, @@ -128,12 +103,7 @@ { "AXFrame": "{{300.2, 357.5}, {82.3, 81}}", "AXUniqueId": null, - "frame": { - "y": 357.5, - "x": 300.2, - "width": 82.3, - "height": 81 - }, + "frame": { "x": 300.2, "y": 357.5, "width": 82.3, "height": 81 }, "role_description": "button", "AXLabel": "÷", "content_required": false, @@ -151,12 +121,7 @@ { "AXFrame": "{{19.5, 449.5}, {82.7, 81}}", "AXUniqueId": null, - "frame": { - "y": 449.5, - "x": 19.5, - "width": 82.7, - "height": 81 - }, + "frame": { "x": 19.5, "y": 449.5, "width": 82.7, "height": 81 }, "role_description": "button", "AXLabel": "7", "content_required": false, @@ -174,12 +139,7 @@ { "AXFrame": "{{113.2, 449.5}, {82.3, 81}}", "AXUniqueId": null, - "frame": { - "y": 449.5, - "x": 113.2, - "width": 82.3, - "height": 81 - }, + "frame": { "x": 113.2, "y": 449.5, "width": 82.3, "height": 81 }, "role_description": "button", "AXLabel": "8", "content_required": false, @@ -197,12 +157,7 @@ { "AXFrame": "{{206.5, 449.5}, {82.7, 81}}", "AXUniqueId": null, - "frame": { - "y": 449.5, - "x": 206.5, - "width": 82.7, - "height": 81 - }, + "frame": { "x": 206.5, "y": 449.5, "width": 82.7, "height": 81 }, "role_description": "button", "AXLabel": "9", "content_required": false, @@ -220,12 +175,7 @@ { "AXFrame": "{{300.2, 449.5}, {82.3, 81}}", "AXUniqueId": null, - "frame": { - "y": 449.5, - "x": 300.2, - "width": 82.3, - "height": 81 - }, + "frame": { "x": 300.2, "y": 449.5, "width": 82.3, "height": 81 }, "role_description": "button", "AXLabel": "×", "content_required": false, @@ -243,12 +193,7 @@ { "AXFrame": "{{19.5, 541.5}, {82.7, 81}}", "AXUniqueId": null, - "frame": { - "y": 541.5, - "x": 19.5, - "width": 82.7, - "height": 81 - }, + "frame": { "x": 19.5, "y": 541.5, "width": 82.7, "height": 81 }, "role_description": "button", "AXLabel": "4", "content_required": false, @@ -266,12 +211,7 @@ { "AXFrame": "{{113.2, 541.5}, {82.3, 81}}", "AXUniqueId": null, - "frame": { - "y": 541.5, - "x": 113.2, - "width": 82.3, - "height": 81 - }, + "frame": { "x": 113.2, "y": 541.5, "width": 82.3, "height": 81 }, "role_description": "button", "AXLabel": "5", "content_required": false, @@ -289,12 +229,7 @@ { "AXFrame": "{{206.5, 541.5}, {82.7, 81}}", "AXUniqueId": null, - "frame": { - "y": 541.5, - "x": 206.5, - "width": 82.7, - "height": 81 - }, + "frame": { "x": 206.5, "y": 541.5, "width": 82.7, "height": 81 }, "role_description": "button", "AXLabel": "6", "content_required": false, @@ -312,12 +247,7 @@ { "AXFrame": "{{300.2, 541.5}, {82.3, 81}}", "AXUniqueId": null, - "frame": { - "y": 541.5, - "x": 300.2, - "width": 82.3, - "height": 81 - }, + "frame": { "x": 300.2, "y": 541.5, "width": 82.3, "height": 81 }, "role_description": "button", "AXLabel": "-", "content_required": false, @@ -335,12 +265,7 @@ { "AXFrame": "{{19.5, 633.5}, {82.7, 81}}", "AXUniqueId": null, - "frame": { - "y": 633.5, - "x": 19.5, - "width": 82.7, - "height": 81 - }, + "frame": { "x": 19.5, "y": 633.5, "width": 82.7, "height": 81 }, "role_description": "button", "AXLabel": "1", "content_required": false, @@ -358,12 +283,7 @@ { "AXFrame": "{{113.2, 633.5}, {82.3, 81}}", "AXUniqueId": null, - "frame": { - "y": 633.5, - "x": 113.2, - "width": 82.3, - "height": 81 - }, + "frame": { "x": 113.2, "y": 633.5, "width": 82.3, "height": 81 }, "role_description": "button", "AXLabel": "2", "content_required": false, @@ -381,12 +301,7 @@ { "AXFrame": "{{206.5, 633.5}, {82.7, 81}}", "AXUniqueId": null, - "frame": { - "y": 633.5, - "x": 206.5, - "width": 82.7, - "height": 81 - }, + "frame": { "x": 206.5, "y": 633.5, "width": 82.7, "height": 81 }, "role_description": "button", "AXLabel": "3", "content_required": false, @@ -404,12 +319,7 @@ { "AXFrame": "{{300.2, 633.5}, {82.3, 81}}", "AXUniqueId": null, - "frame": { - "y": 633.5, - "x": 300.2, - "width": 82.3, - "height": 81 - }, + "frame": { "x": 300.2, "y": 633.5, "width": 82.3, "height": 81 }, "role_description": "button", "AXLabel": "+", "content_required": false, @@ -427,12 +337,7 @@ { "AXFrame": "{{113.2, 725.5}, {82.3, 81}}", "AXUniqueId": null, - "frame": { - "y": 725.5, - "x": 113.2, - "width": 82.3, - "height": 81 - }, + "frame": { "x": 113.2, "y": 725.5, "width": 82.3, "height": 81 }, "role_description": "button", "AXLabel": "0", "content_required": false, @@ -450,12 +355,7 @@ { "AXFrame": "{{206.5, 725.5}, {82.7, 81}}", "AXUniqueId": null, - "frame": { - "y": 725.5, - "x": 206.5, - "width": 82.7, - "height": 81 - }, + "frame": { "x": 206.5, "y": 725.5, "width": 82.7, "height": 81 }, "role_description": "button", "AXLabel": ".", "content_required": false, @@ -473,12 +373,7 @@ { "AXFrame": "{{300.2, 725.5}, {82.3, 81}}", "AXUniqueId": null, - "frame": { - "y": 725.5, - "x": 300.2, - "width": 82.3, - "height": 81 - }, + "frame": { "x": 300.2, "y": 725.5, "width": 82.3, "height": 81 }, "role_description": "button", "AXLabel": "=", "content_required": false, @@ -499,5 +394,10 @@ } ] } - } + }, + "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 92% 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 index 48d791f32..f7f7a3295 100644 --- 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 @@ -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__/json/xcode-ide/list-tools--success.json b/src/snapshot-tests/__fixtures__/cli/json/xcode-ide/list-tools--success.json similarity index 90% 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 index f73bf9ba8..3409ca048 100644 --- 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 @@ -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__/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/swift-package/stop--error-no-process.txt b/src/snapshot-tests/__fixtures__/cli/swift-package/stop--error-no-process.txt deleted file mode 100644 index 4266d3c40..000000000 --- a/src/snapshot-tests/__fixtures__/cli/swift-package/stop--error-no-process.txt +++ /dev/null @@ -1,10 +0,0 @@ - -🛑 Swift Package Stop - - PID: - -Errors (1): - - ✗ No running process found with PID 999999. Use swift_package_list to check active processes. - -❌ Swift package stop failed. 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 83% 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 index 0413c89bc..1618184af 100644 --- 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 @@ -1,7 +1,7 @@ 🐛 LLDB Command - Command: bt + Command: breakpoint list Errors (1): 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 68% 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 index 08c3d66a8..94055091f 100644 --- a/src/snapshot-tests/__fixtures__/cli/debugging/lldb-command--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/debugging/lldb-command--success.txt @@ -11,4 +11,4 @@ Output: 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 + 1.1: where = CalculatorApp.debug.dylib`closure #1 in closure #1 in closure #1 in ContentView.body.getter + at ContentView.swift:42:31, address = , resolved, hit count = 0 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..64e22805e 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 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..f1366bc66 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 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 82% 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..1c3292ba1 100644 --- a/src/snapshot-tests/__fixtures__/cli/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.3.1 (a) + 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). @@ -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 54% 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 index 22a43dddc..93da8a637 100644 --- 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 @@ -1,10 +1,10 @@ 🛑 Stop macOS App - App: PID 999999 + App: PID Errors (1): - ✗ kill: 999999: No such process + ✗ kill: : No such process ❌ Failed to stop macOS app. 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 97% 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..945b7c86f 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 @@ -453,10 +453,10 @@ 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 = + SDK_DIR = + SDK_DIR_ = + SDK_DIR_ = SDK_NAME = iphoneos26.4 SDK_NAMES = iphoneos26.4 SDK_PRODUCT_BUILD_VERSION = 23E237 @@ -555,7 +555,7 @@ 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_FRAMEWORK_SEARCH_PATHS = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/.sdk/Developer/Library/Frameworks TEST_LIBRARY_SEARCH_PATHS = /Applications/Xcode-26.4.0.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 @@ -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 85% 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 index 0d2112cc5..05d8aae6b 100644 --- a/src/snapshot-tests/__fixtures__/cli/swift-package/run--success.txt +++ b/src/snapshot-tests/__fixtures__/cli/text/swift-package/run--success.txt @@ -13,3 +13,6 @@ Output Hello, world! + +Next steps: +1. Stop Swift package run: xcodebuildmcp swift-package stop diff --git a/src/snapshot-tests/__fixtures__/cli/text/swift-package/stop--error-no-process.txt b/src/snapshot-tests/__fixtures__/cli/text/swift-package/stop--error-no-process.txt new file mode 100644 index 000000000..acf396ab8 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/cli/text/swift-package/stop--error-no-process.txt @@ -0,0 +1,10 @@ + +🛑 Swift Package Stop + + PID: + +Errors (1): + + ✗ No running process found with PID . Use swift_package_list to check active processes. + +❌ Swift package stop failed. 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..bc3e32531 --- /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 + 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 70% 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..456f53efe 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": "" }, { "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,8 +35,13 @@ "platform": "watchOS", "state": "connected", "isAvailable": true, - "osVersion": "26.3" + "osVersion": "" } ] - } + }, + "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..e84b56a82 --- /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 " + }, + "diagnostics": { + "warnings": [], + "errors": [ + { + "message": "kill: : 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 98% 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..df0b8ede6 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": { @@ -1795,19 +1795,19 @@ }, { "key": "SDKROOT", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "value": "" }, { "key": "SDK_DIR", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "value": "" }, { - "key": "SDK_DIR_iphoneos", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "key": "SDK_DIR_", + "value": "" }, { - "key": "SDK_DIR_iphoneos26_4", - "value": "/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk" + "key": "SDK_DIR_", + "value": "" }, { "key": "SDK_NAME", @@ -2203,7 +2203,7 @@ }, { "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/.sdk/Developer/Library/Frameworks" }, { "key": "TEST_LIBRARY_SEARCH_PATHS", @@ -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..6611dad9d --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/swift-package/run--success.json @@ -0,0 +1,43 @@ +{ + "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": [] + } + }, + "nextSteps": [ + "Stop Swift package run: swift_package_stop()" + ] +} 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..e55d6cde3 --- /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 . 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__/mcp/json/ui-automation/snapshot-ui--success.json b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/snapshot-ui--success.json new file mode 100644 index 000000000..68cb4caaf --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/json/ui-automation/snapshot-ui--success.json @@ -0,0 +1,403 @@ +{ + "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": { "x": 0, "y": 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": { "x": 344, "y": 250.5, "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": { "x": 19.5, "y": 357.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": { "x": 113.2, "y": 357.5, "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": { "x": 206.5, "y": 357.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": { "x": 300.2, "y": 357.5, "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": { "x": 19.5, "y": 449.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": { "x": 113.2, "y": 449.5, "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": { "x": 206.5, "y": 449.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": { "x": 300.2, "y": 449.5, "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": { "x": 19.5, "y": 541.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": { "x": 113.2, "y": 541.5, "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": { "x": 206.5, "y": 541.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": { "x": 300.2, "y": 541.5, "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": { "x": 19.5, "y": 633.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": { "x": 113.2, "y": 633.5, "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": { "x": 206.5, "y": 633.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": { "x": 300.2, "y": 633.5, "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": { "x": 113.2, "y": 725.5, "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": { "x": 206.5, "y": 725.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": { "x": 300.2, "y": 725.5, "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: 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..f7f7a3295 --- /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": "3", + "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..3409ca048 --- /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": "3", + "didError": false, + "error": null, + "data": { + "toolCount": 99999, + "artifacts": { + "rawResponseJsonPath": "" + } + } +} diff --git a/src/snapshot-tests/__fixtures__/mcp/swift-package/stop--error-no-process.txt b/src/snapshot-tests/__fixtures__/mcp/swift-package/stop--error-no-process.txt deleted file mode 100644 index 8854f7123..000000000 --- a/src/snapshot-tests/__fixtures__/mcp/swift-package/stop--error-no-process.txt +++ /dev/null @@ -1,8 +0,0 @@ - -🛑 Swift Package Stop - -Errors (1): - - ✗ No running process found with PID 999999. Use swift_package_list to check active processes. - -❌ Swift package stop failed. 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 65% 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 index b0170c41d..8894bef41 100644 --- a/src/snapshot-tests/__fixtures__/mcp/debugging/lldb-command--success.txt +++ b/src/snapshot-tests/__fixtures__/mcp/text/debugging/lldb-command--success.txt @@ -9,4 +9,4 @@ Output: 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 + 1.1: where = CalculatorApp.debug.dylib`closure #1 in closure #1 in closure #1 in ContentView.body.getter + at ContentView.swift:42:31, address = , resolved, hit count = 0 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 89% 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..56ea9ee42 100644 --- a/src/snapshot-tests/__fixtures__/mcp/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.3.1 (a) + 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/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 64% 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 index 1b4234de0..4b9a9d41d 100644 --- 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 @@ -3,6 +3,6 @@ Errors (1): - ✗ kill: 999999: No such process + ✗ kill: : No such process ❌ Failed to stop macOS app. 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 97% 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 index 13d5cb6b7..5d3c68f73 100644 --- 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 @@ -450,10 +450,10 @@ 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 = + SDK_DIR = + SDK_DIR_ = + SDK_DIR_ = SDK_NAME = iphoneos26.4 SDK_NAMES = iphoneos26.4 SDK_PRODUCT_BUILD_VERSION = 23E237 @@ -552,7 +552,7 @@ 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_FRAMEWORK_SEARCH_PATHS = /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks /Applications/Xcode-.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/.sdk/Developer/Library/Frameworks TEST_LIBRARY_SEARCH_PATHS = /Applications/Xcode-26.4.0.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 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 87% 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..9eca0fb95 100644 --- a/src/snapshot-tests/__fixtures__/mcp/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.3.1 (a) + 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/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/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/__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 86% 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 index 1d5912b34..5b38814ec 100644 --- a/src/snapshot-tests/__fixtures__/mcp/swift-package/run--success.txt +++ b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/run--success.txt @@ -10,3 +10,6 @@ Output Hello, world! + +Next steps: +1. Stop Swift package run: swift_package_stop() diff --git a/src/snapshot-tests/__fixtures__/mcp/text/swift-package/stop--error-no-process.txt b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/stop--error-no-process.txt new file mode 100644 index 000000000..48657c1b6 --- /dev/null +++ b/src/snapshot-tests/__fixtures__/mcp/text/swift-package/stop--error-no-process.txt @@ -0,0 +1,8 @@ + +🛑 Swift Package Stop + +Errors (1): + + ✗ No running process found with PID . Use swift_package_list to check active processes. + +❌ Swift package stop failed. 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..17e144d33 --- /dev/null +++ b/src/snapshot-tests/__tests__/json-harness-error-state.test.ts @@ -0,0 +1,57 @@ +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 null CLI process status', () => { + expect(() => resolveCliJsonSnapshotErrorState(null, successEnvelope, 'tool')).toThrow( + 'CLI process exit status was null for tool; the process may have timed out or been killed by a signal.', + ); + }); + + 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)', + ); + expect(() => resolveMcpSnapshotErrorState(undefined, true, 'tool')).toThrow( + 'MCP result.isError (undefined) 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..0e4ecabc4 100644 --- a/src/snapshot-tests/__tests__/json-normalize.test.ts +++ b/src/snapshot-tests/__tests__/json-normalize.test.ts @@ -1,9 +1,9 @@ import { describe, expect, it } from 'vitest'; import type { StructuredOutputEnvelope } from '../../types/structured-output.ts'; -import { normalizeStructuredEnvelope } from '../json-normalize.ts'; +import { formatStructuredEnvelopeFixture, 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,130 @@ 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 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: 'ALTERNATE_GROUP', value: 'staff' }, + { key: 'CACHE_ROOT', value: '/var/folders/hash/C/com.apple.DeveloperTools/26.4/Xcode' }, + { key: 'GID', value: '20' }, + { key: 'TARGET_DEVICE_MODEL', value: 'iPhone17,2' }, + { key: 'TARGET_DEVICE_OS_VERSION', value: '26.4.2' }, + { + key: 'SDKROOT', + 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_VERSION_ACTUAL', value: '260400' }, + { key: 'SDK_PRODUCT_BUILD_VERSION', value: '23E237' }, + { key: 'MAC_OS_X_VERSION_ACTUAL', value: '260301' }, + { key: 'MAC_OS_X_PRODUCT_BUILD_VERSION', value: '25D2128' }, + { + 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: 'ALTERNATE_GROUP', value: '' }, + { key: 'CACHE_ROOT', value: '' }, + { key: 'GID', value: '' }, + { key: 'TARGET_DEVICE_MODEL', value: '' }, + { key: 'TARGET_DEVICE_OS_VERSION', value: '' }, + { key: 'SDKROOT', value: '' }, + { key: 'SDK_DIR_', value: '' }, + { key: 'SDK_NAME', value: '' }, + { key: 'SDK_VERSION_ACTUAL', value: '' }, + { key: 'SDK_PRODUCT_BUILD_VERSION', value: '' }, + { key: 'MAC_OS_X_VERSION_ACTUAL', value: '' }, + { key: 'MAC_OS_X_PRODUCT_BUILD_VERSION', value: '' }, + { + key: 'PLATFORM_DEVELOPER_APPLICATIONS_DIR', + value: '/Applications/Xcode-.app/Contents/Developer/Applications', + }, + { key: 'SDK_STAT_CACHE_PATH', value: '' }, + ], + }, + }); + }); + + it('compacts frame objects emitted with y before x', () => { + const envelope: StructuredOutputEnvelope = { + schema: 'xcodebuildmcp.output.ui-snapshot', + schemaVersion: '1', + didError: false, + error: null, + data: { + frame: { y: 2, x: 1, width: 3, height: 4 }, + }, + }; + + expect(formatStructuredEnvelopeFixture(envelope)).toContain( + '"frame": { "x": 1, "y": 2, "width": 3, "height": 4 }', + ); + }); + it('normalizes volatile build settings PATH entry values without dropping the entry', () => { const envelope: StructuredOutputEnvelope = { schema: 'xcodebuildmcp.output.build-settings', @@ -98,7 +218,7 @@ describe('normalizeStructuredEnvelope', () => { error: null, data: { entries: [ - { key: 'SDKROOT', value: 'iphoneos' }, + { key: 'SDKROOT', value: '' }, { key: 'PATH', value: '' }, ], }, 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__/normalize.test.ts b/src/snapshot-tests/__tests__/normalize.test.ts index ff2773c66..922351437 100644 --- a/src/snapshot-tests/__tests__/normalize.test.ts +++ b/src/snapshot-tests/__tests__/normalize.test.ts @@ -10,6 +10,56 @@ 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', + ' SDK_DIR_iphoneos26_4 = /Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.4.sdk', + ' MAC_OS_X_PRODUCT_BUILD_VERSION = 25D2128', + ' MAC_OS_X_VERSION_ACTUAL = 260301', + ' PLATFORM_DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-26.4.0.app/Contents/Developer/Applications', + ' XCODE_APP_SUPPORT_DIR = /Applications/Xcode.app/Contents/Developer/Library/Xcode', + ].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 = ', + ' SDK_DIR_ = ', + ' MAC_OS_X_PRODUCT_BUILD_VERSION = ', + ' MAC_OS_X_VERSION_ACTUAL = ', + ' PLATFORM_DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode-.app/Contents/Developer/Applications', + ' XCODE_APP_SUPPORT_DIR = /Applications/Xcode-.app/Contents/Developer/Library/Xcode', + ].join('\n') + '\n', + ); + }); + + it('normalizes LLDB breakpoint byte offsets', () => { + expect( + normalizeSnapshotOutput( + ' 1.1: where = App.debug.dylib`ContentView.body.getter + 1428 at ContentView.swift:42:31, address = 0x123456789, unresolved, hit count = 0\n', + ), + ).toBe( + ' 1.1: where = App.debug.dylib`ContentView.body.getter + at ContentView.swift:42:31, address = , unresolved, hit count = 0\n', + ); + }); + + it('normalizes process identifiers in string output', () => { + expect(normalizeSnapshotOutput('appName: PID 123456\nkill: 123456: No such process\n')).toBe( + 'appName: PID \nkill: : No such process\n', + ); + }); + it('preserves display-formatted home paths while normalizing workspace hashes', () => { expect( normalizeSnapshotOutput( 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..42da3036c 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,39 @@ 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 { + if (status === null) { + throw new Error( + `CLI process exit status was null for ${label}; the process may have timed out or been killed by a signal.`, + ); + } + + 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; +} + export async function createSnapshotHarness( options: CreateSnapshotHarnessOptions = {}, ): Promise { @@ -89,6 +123,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..5699bef61 100644 --- a/src/snapshot-tests/json-normalize.ts +++ b/src/snapshot-tests/json-normalize.ts @@ -5,9 +5,18 @@ function isRecord(value: unknown): value is Record { return value !== null && typeof value === 'object'; } -function normalizeString(value: string, key?: string, path: string[] = []): string { +function normalizeBaseString(value: string): string { const normalized = normalizeSnapshotOutput(value.replace(/\u00A0/g, ' ')); - let result = normalized.endsWith('\n') ? normalized.slice(0, -1) : normalized; + return normalized.endsWith('\n') ? normalized.slice(0, -1) : normalized; +} + +function normalizeString(value: string, key?: string, path: string[] = []): string { + const parentKey = path.at(-2); + let result = normalizeBaseString(value); + + if (parentKey === 'stderr') { + result = result.replace(/^\[\d+\/\d+\] /, '[] '); + } if (key === 'rawResponseJsonPath') { return ''; @@ -29,6 +38,10 @@ function normalizeString(value: string, key?: string, path: string[] = []): stri return ''; } + if (key === 'osVersion' && path.includes('devices')) { + return ''; + } + return result; } @@ -58,8 +71,115 @@ 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 normalizeBuildSettingsEntryKey(key: string): string { + if (key.startsWith('SDK_DIR_')) { + return 'SDK_DIR_'; + } + + return key; +} + +function normalizeBuildSettingsEntryValue(key: string, value: string): string { + if (key === 'SDKROOT' || key === 'SDK_DIR' || key.startsWith('SDK_DIR_')) { + return ''; + } + + switch (key) { + case 'PATH': + return ''; + case 'ALTERNATE_OWNER': + case 'INSTALL_OWNER': + case 'USER': + case 'VERSION_INFO_BUILDER': + return ''; + case 'UID': + return ''; + case 'GID': + return ''; + case 'ALTERNATE_GROUP': + case 'GROUP': + case 'INSTALL_GROUP': + return ''; + case 'CACHE_ROOT': + case 'CCHROOT': + return ''; + case 'CORRESPONDING_SIMULATOR_SDK_DIR': + return ''; + case 'CORRESPONDING_SIMULATOR_SDK_NAME': + case 'SDK_NAME': + case 'SDK_NAMES': + return ''; + case 'PLATFORM_PRODUCT_BUILD_VERSION': + case 'SDK_PRODUCT_BUILD_VERSION': + case 'MAC_OS_X_PRODUCT_BUILD_VERSION': + return ''; + case 'SDK_STAT_CACHE_PATH': + return ''; + case 'SDK_VERSION': + case 'SDK_VERSION_ACTUAL': + case 'SDK_VERSION_MAJOR': + case 'SDK_VERSION_MINOR': + case 'MAC_OS_X_VERSION_ACTUAL': + case 'MAC_OS_X_VERSION_MAJOR': + case 'MAC_OS_X_VERSION_MINOR': + 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: + return normalizeBaseString(value); + } +} + +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 failed = sorted.filter((item) => isNormalizedTestCase(item) && item.status === 'failed'); + + return failed.length > 0 ? 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 { @@ -75,23 +195,28 @@ 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; } if (isRecord(value)) { - const normalizedEntries = Object.entries(value).map(([entryKey, entryValue]) => [ - entryKey, - isBuildSettingsPathEntry(value, path) && entryKey === 'value' - ? '' - : normalizeValue(entryValue, [...path, entryKey]), - ]); + const isBuildSetting = isBuildSettingsEntry(value, path); + const normalizedEntries = Object.entries(value).map(([entryKey, entryValue]) => { + if (isBuildSetting && entryKey === 'key') { + return [entryKey, normalizeBuildSettingsEntryKey(String(entryValue))]; + } + + if (isBuildSetting && entryKey === 'value') { + return [entryKey, normalizeBuildSettingsEntryValue(String(value.key), String(value.value))]; + } + + return [entryKey, normalizeValue(entryValue, [...path, entryKey])]; + }); return Object.fromEntries(normalizedEntries); } @@ -129,10 +254,13 @@ export function normalizeStructuredEnvelope( ) as StructuredOutputEnvelope; } +const FRAME_OBJECT_REGEX = + /"frame": \{\n\s+"y": (?\d+(?:\.\d+)?),\n\s+"x": (?\d+(?:\.\d+)?),\n\s+"width": (?\d+(?:\.\d+)?),\n\s+"height": (?\d+(?:\.\d+)?)\n\s+\}/g; + function compactFrameObjects(json: string): string { return json.replace( - /"frame": \{\n\s+"x": (\d+(?:\.\d+)?),\n\s+"y": (\d+(?:\.\d+)?),\n\s+"width": (\d+(?:\.\d+)?),\n\s+"height": (\d+(?:\.\d+)?)\n\s+\}/g, - '"frame": { "x": $1, "y": $2, "width": $3, "height": $4 }', + FRAME_OBJECT_REGEX, + '"frame": { "x": $, "y": $, "width": $, "height": $ }', ); } 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..9aa927063 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/normalize.ts b/src/snapshot-tests/normalize.ts index 4630aab5c..9a4899e2a 100644 --- a/src/snapshot-tests/normalize.ts +++ b/src/snapshot-tests/normalize.ts @@ -9,6 +9,8 @@ const APPLE_DEVICE_UDID_REGEX = /[0-9A-Fa-f]{8}-[0-9A-Fa-f]{16}/g; const UUID_REGEX = /[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/g; const DURATION_REGEX = /\d+\.\d+s\b/g; const PID_NUMBER_REGEX = /(pid:\s*)\d+/gi; +const PID_NAME_REGEX = /\bPID \d+\b/g; +const KILL_PID_REGEX = /(\bkill:\s*)\d+(?=:)/g; const PID_FILENAME_SUFFIX_REGEX = /_pid\d+(?:_[0-9a-f]{8})?\.log/g; const XCRESULT_FILENAME_PID_SUFFIX_REGEX = /_pid\d+_[0-9a-f]{8}\.xcresult/g; const HELPER_PID_FILENAME_SUFFIX_REGEX = @@ -16,12 +18,13 @@ 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; const LLDB_FRAME_OFFSET_REGEX = /(`[^`\n]+):(\d+)$/gm; +const LLDB_BREAKPOINT_BYTE_OFFSET_REGEX = /\+ \d+ at /g; const LLDB_SYS_FRAME_FUNC_REGEX = /(frame #\d+: )\S+( at (?:\/usr\/lib\/|\/Library\/Developer\/CoreSimulator\/)[^`\n]*`)[^:\n]+(:)/gm; const LLDB_FRAME_NUMBER_REGEX = / frame #\d+:/g; @@ -38,6 +41,26 @@ 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 APPLE_SDK_BUNDLE_REGEX = + /\b(?:iPhoneOS|iPhoneSimulator|AppleTVOS|AppleTVSimulator|WatchOS|WatchSimulator|XROS|XRSimulator|MacOSX)\d+(?:\.\d+)*\.sdk/g; +const XCODE_CACHE_ROOT_REGEX = /((?:CACHE_ROOT|CCHROOT) = ).+$/gm; +const BUILD_SETTINGS_GROUP_REGEX = /^(\s*(?:ALTERNATE_GROUP|GROUP|INSTALL_GROUP) = ).+$/gm; +const BUILD_SETTINGS_GID_REGEX = /^(\s*GID = )\d+$/gm; +const SDK_PATH_REGEX = + /^(\s*(?:CORRESPONDING_SIMULATOR_SDK_DIR|SDKROOT|SDK_DIR(?:_[A-Za-z0-9_]+)?) = ).+$/gm; +const SDK_DIR_PLACEHOLDER_KEY_REGEX = /^(\s*)SDK_DIR_[A-Za-z0-9_]+ = $/gm; +const SDK_NAME_REGEX = /^(\s*(?:CORRESPONDING_SIMULATOR_SDK_NAME|SDK_NAMES?) = ).+$/gm; +const SDK_BUILD_VERSION_REGEX = + /^(\s*(?:PLATFORM_PRODUCT_BUILD_VERSION|SDK_PRODUCT_BUILD_VERSION|MAC_OS_X_PRODUCT_BUILD_VERSION) = ).+$/gm; +const SDK_STAT_CACHE_PATH_REGEX = /^(\s*SDK_STAT_CACHE_PATH = ).+$/gm; +const SDK_VERSION_REGEX = + /^(\s*(?:SDK_VERSION|SDK_VERSION_ACTUAL|SDK_VERSION_MAJOR|SDK_VERSION_MINOR|MAC_OS_X_VERSION_ACTUAL|MAC_OS_X_VERSION_MAJOR|MAC_OS_X_VERSION_MINOR) = ).+$/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; @@ -159,13 +182,18 @@ export function normalizeSnapshotOutput(text: string): string { normalized = normalized.replace(DEVICE_TRANSPORT_TYPE_REGEX, ''); normalized = normalized.replace(DURATION_REGEX, ''); normalized = normalized.replace(PID_NUMBER_REGEX, '$1'); + normalized = normalized.replace(PID_NAME_REGEX, 'PID '); + normalized = normalized.replace(KILL_PID_REGEX, '$1'); normalized = normalized.replace(HELPER_PID_FILENAME_SUFFIX_REGEX, '_pid.log'); normalized = normalized.replace(PID_FILENAME_SUFFIX_REGEX, '_pid.log'); normalized = normalized.replace(XCRESULT_FILENAME_PID_SUFFIX_REGEX, '_pid.xcresult'); 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: '); @@ -178,6 +206,7 @@ export function normalizeSnapshotOutput(text: string): string { normalized = normalized.replace(THREAD_ID_REGEX, 'Thread '); normalized = normalized.replace(HEX_ADDRESS_REGEX, ''); normalized = normalized.replace(LLDB_FRAME_OFFSET_REGEX, '$1:'); + normalized = normalized.replace(LLDB_BREAKPOINT_BYTE_OFFSET_REGEX, '+ at '); normalized = normalized.replace(LLDB_SYS_FRAME_FUNC_REGEX, '$1$2$3'); normalized = normalized.replace(LLDB_FRAME_NUMBER_REGEX, ' frame #:'); normalized = normalized.replace(LLDB_BREAKPOINT_LOCATIONS_REGEX, 'locations = '); @@ -189,6 +218,26 @@ 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(APPLE_SDK_BUNDLE_REGEX, '.sdk'); + normalized = normalized.replace(XCODE_CACHE_ROOT_REGEX, '$1'); + normalized = normalized.replace(BUILD_SETTINGS_GROUP_REGEX, '$1'); + normalized = normalized.replace(BUILD_SETTINGS_GID_REGEX, '$1'); + normalized = normalized.replace(SDK_PATH_REGEX, '$1'); + normalized = normalized.replace( + SDK_DIR_PLACEHOLDER_KEY_REGEX, + '$1SDK_DIR_ = ', + ); + normalized = normalized.replace(SDK_NAME_REGEX, '$1'); + normalized = normalized.replace(SDK_BUILD_VERSION_REGEX, '$1'); + normalized = normalized.replace(SDK_STAT_CACHE_PATH_REGEX, '$1'); + normalized = normalized.replace(SDK_VERSION_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