Skip to content

fix(runtime): Preserve daemon next-step params in CLI hints#259

Open
cameroncooke wants to merge 3 commits intomainfrom
XcodeBuildMCP-build-run-device
Open

fix(runtime): Preserve daemon next-step params in CLI hints#259
cameroncooke wants to merge 3 commits intomainfrom
XcodeBuildMCP-build-run-device

Conversation

@cameroncooke
Copy link
Collaborator

@cameroncooke cameroncooke commented Mar 4, 2026

Add first-class physical-device build-and-run support and align next-step behavior across CLI/daemon flows.

This PR introduces the new device build-and-run tool end-to-end (manifest wiring, implementation, tests, and smoke coverage) so users can build, install, and launch on real devices in one command. It also extracts shared app metadata/build-settings helpers used by device flows (build-settings resolution and bundle ID extraction), and updates related device/simulator tool paths and docs to reflect the expanded workflow.

While validating device log-capture flows, we found a runtime inconsistency: daemon-routed responses could lose dynamic next-step values when CLI post-processing reapplied templates. This PR fixes that by preserving daemon-provided next-step params while keeping direct invocation template behavior unchanged.

Alternative considered: disable template application globally. I did not take that path because it would regress direct invocation behavior and existing manifest-driven next steps. The implemented change narrows behavior only where daemon responses have already been post-processed.

Additional context for review:

  • This is a combined branch with both the canonical new device build-and-run feature work and the daemon next-step preservation fix.
  • Test/docs updates are included for the same reason (manifest + CLI surface + smoke + runtime regression coverage).

@cameroncooke cameroncooke force-pushed the XcodeBuildMCP-build-run-device branch from e2490e9 to 4a9f845 Compare March 4, 2026 12:56
Introduce a first-class device build-and-run flow that builds, installs,
and launches in one step for physical devices.

Add shared build-settings and bundle-id helpers to keep app path and bundle
resolution consistent across device and discovery tools, and update manifests,
CLI docs, tests, and smoke coverage for the new command surface.
Skip manifest template re-application for daemon-routed responses.

Daemon-invoked tools are already post-processed before returning to CLI. A
second template merge in CLI could overwrite concrete dynamic params such as
logSessionId, producing incomplete follow-up command hints.
@cameroncooke cameroncooke force-pushed the XcodeBuildMCP-build-run-device branch from 4a9f845 to ef833ed Compare March 4, 2026 13:04
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 4, 2026

Open in StackBlitz

npm i https://pkg.pr.new/xcodebuildmcp@259

commit: 85e43c9

@cameroncooke cameroncooke marked this pull request as ready for review March 4, 2026 13:08
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Extract device platform string-to-enum mapping into a shared helper used by
build_run_device and get_device_app_path.

This removes duplicated mapping logic while preserving existing behavior and
keeps device tool platform handling consistent in one place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant