feat: enable physical device for iOS profiling#38
Conversation
…to @stachbial/ios-profiler-for-physical-device
|
I would much prefer a single tool that lists both devices and simulators, then CLEARLY labels which device is a simulator and which is a physical device. Then the agent should have it CLEARLY explained what are the limitations & reasons for using a simulator over a device and vice versa. Unless there are arguments against this approach, my arguments are:
|
I hear you, that was my initial thought actually. Then I thought: due to the fact that most of Argent's features are heavily bound to simserver, querying the physical devices all the time would seem redundant and steering it with just a flag - harder to grasp for the agent. The standalone tool is rather easier to distinguish in such use case. |
…to @stachbial/ios-profiler-for-physical-device
…bial/ios-profiler-for-physical-device
Eventually, a unified |
…er-for-physical-device # Conflicts: # packages/skills/skills/argent-simulator-interact/SKILL.md # packages/ui/src/api/client.ts
latekvo
left a comment
There was a problem hiding this comment.
Nice. Probably also adjust the title to reflect what's being done in this PR.
@latekvo Yep It looks like You reviewed a different PR, probably a a stale diff in your cache 👀 |
…bial/ios-profiler-for-physical-device
…er-for-physical-device # Conflicts: # README.md # packages/skills/skills/argent-react-native-app-workflow/SKILL.md # packages/tool-server/src/tools/simulator/list-simulators.ts # packages/tool-server/src/utils/setup-registry.ts
Three independent bugs in the Android-path code that reviewers repro'd: 1. uiautomator entity decoder double-decoded. The decoder ran numeric references as one replace pass, then each of the five named entities as its own pass. An ampersand decoded in the first pass fed straight into the second: `&lt;` (correct XML encoding of the literal string `<`) collapsed to `<`, violating XML 1.0 §4.6. Replaced with a single regex alternation so every match is consumed once. 2. `launch-app` Android path used two different launch mechanisms — a blocking `am start -W` when the caller passed an `activity`, and a fire-and-forget `monkey … LAUNCHER 1` when they didn't. The monkey path returned as soon as the intent was injected, leaving a window where describe/tap raced a still-forking process. Unified on `am start -W` by resolving the default activity up-front via `cmd package resolve-activity --brief`. Also replaced the brittle `/Error|Exception/ && !/Status: ok/` matcher with a positive match on `Status: ok` — the old regex false-succeeded on `Status: null` (activity threw in onCreate) and would have false-failed if Android ever dropped the `Status:` banner from a release that keeps benign strings like `Activity: com.example.ErrorReportingActivity` in the output. 3. `describe` Android path shell-chained cleanup with `&&`, so a failing `uiautomator dump` (keyguard, MFA flap, secure overlay) short-circuited before `rm -f` ever ran and leaked a file per attempt under /data/local/tmp. One-char fix: trailing `; rm -f` instead of `&& rm -f`. Regression tests added for all three: `&lt;` / `&lt;` / `&amp;` stay literal, `am start` success/failure permutations, and a shell-string assertion pinning the `;` before `rm -f`.

list-simulatorstolist-deviceswhich behaves as previously with optional arg that triggersxcrun devicectl list ....run