You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plugin: 0.22.0 → 0.23.0
MCP server (cdp-bridge): 0.17.0 → 0.18.0
Eight bugs fixed (B110-B118), one new MCP tool (cdp_native_errors), major
performance wins on Android. All validated live through a full 8-phase
rn-feature-dev run in workspace (Priority filter row on Tasks screen).
Highlights
- B118/D637: Android `cdp_interact` p95 went from 5343ms (timeout) to 45ms —
120× faster, zero false-negative timeouts. Whole Android flow: 16.11s →
7.2s (−55%).
- B114/D642: new `cdp_native_errors` MCP tool reads `simctl log` / `adb
logcat`. Fills the gap when native-module errors fire before __RN_AGENT
injects. `cdp_status` auto-hints at it on suspicious state.
- B111/D635: `cdp_connect` now accepts `targetId` + `bundleId` filters to
disambiguate zombie Expo Go host pages from real app targets.
- B112/D641: `device_snapshot action=open attachOnly=true` skips app launch
when app is already running — saves ~12s and avoids bundle-race cascades.
- B116/D639: `inferPlatforms` cross-checks `simctl listapps` + `adb pm list`;
flags same-bundle-on-both with `ambiguousPlatform: true`.
- B117/D638: `device_screenshot` accepts `platform` + inherits from CDP
target. Session-bound dispatch routes correctly to the right device.
- B115/D640: `cdp_nav_graph` flat-call fix for nested tab dispatch.
- B113/D636: `device_screenshot` stopped sending the unsupported `--format`
flag; uses `--out <path>` explicitly.
- B110/D630: MCP server version read from package.json at module load;
sync-versions.sh guards against hardcoded literals in src/.
Refactors
- cdp/connect.ts, cdp/helper-expr.ts, cdp/recovery.ts extracted — CDPClient
facade shrunk further; every module now has a typed Context interface.
- cdp/state.ts setter-based ResettableState interface replaces unsafe cast.
- utils.ts freshness probe cached 2s per connectionGeneration.
- RingBuffer gains optional indexKey for O(1) getByKey.
- ResultEnvelope has optional structured ToolErrorCode.
Test count: 158 → 249 (+91 this release cycle).
Docs updated: README.md, CHANGELOG.md, docs-site/src/content/docs/changelog.md.
Decisions D630-D642 logged in workspace docs/DECISIONS.md.
Copy file name to clipboardExpand all lines: .claude-plugin/marketplace.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
{
10
10
"name": "rn-dev-agent",
11
11
"description": "AI agent that fully tests React Native features on simulator/emulator — navigates the app, verifies UI, walks user flows, and confirms internal state.",
Copy file name to clipboardExpand all lines: .claude-plugin/plugin.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "rn-dev-agent",
3
-
"version": "0.22.0",
3
+
"version": "0.23.0",
4
4
"description": "AI agent that fully tests React Native features on simulator/emulator — navigates the app, verifies UI, walks user flows, and confirms internal state.",
Copy file name to clipboardExpand all lines: CHANGELOG.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,44 @@ All notable changes to rn-dev-agent will be documented in this file.
4
4
5
5
Format follows [Keep a Changelog](https://keepachangelog.com/).
6
6
7
+
## [0.23.0] — 2026-04-16
8
+
9
+
Major session of correctness and performance fixes surfaced by end-to-end benchmarks and a live feature-dev run. MCP server bumped to 0.18.0.
10
+
11
+
### Added
12
+
-**`cdp_native_errors` MCP tool** — reads `xcrun simctl log show` on iOS / `adb logcat -d` on Android, parses known native-module / bundle-fetch / FATAL EXCEPTION patterns, dedupes by message body. Fills the gap when `cdp_error_log` / `cdp_console_log` stay empty because native errors fired before `__RN_AGENT` injected. `cdp_status` also emits a suspicion hint pointing at this tool when `connected && !helpersInjected && !hasRedBox && errorCount === 0` (B114/D642).
13
+
-**`targetId` + `bundleId` filters on `cdp_connect`** — disambiguate zombie Expo Go host pages from real app targets (B111/D635).
14
+
-**`attachOnly: true` on `device_snapshot`** — skip app launch when it's already running; verifies via `xcrun simctl spawn booted launchctl list` / `adb shell pidof`. Prevents the ~12s app-restart cascade. Exported `isAppRunning(platform, bundleId, probes?)` helper (B112/D641).
15
+
-**Platform-aware CDP timeouts** — `defaultTimeout(platform)` and `timeoutForMethod(method, platform)` apply a 2× Android multiplier via a single constant `ANDROID_MULTIPLIER`. `CDPClient` routes `Runtime.evaluate` paths through it using `this._connectedTarget?.platform`. iOS unchanged (B118/D637).
16
+
-**`platform` param on `device_screenshot`** — inherits from `client.connectedTarget?.platform` or accepts explicit override. When no active session is open, the wrapper appends `--platform <p>` to agent-device CLI args. Session-bound dispatch remains the canonical path (B117/D638, partial — upstream agent-device CLI ignores `--platform` without a session; workaround via open session).
17
+
-**`simctl listapps` cross-check in platform inference** — `cdp/discovery.ts::inferPlatforms` now reads both `adb shell pm list packages` AND `xcrun simctl listapps booted`; targets installed on both platforms are flagged with `ambiguousPlatform: true`. Readers are injectable for unit testing (B116/D639).
18
+
-**Tab-dispatch fix for `cdp_nav_graph`** — `buildTabNavigateArgs(tab, screen, params)` emits the flat `ref.navigate(tab, params)` when target === tab, nested form when they differ. Prevents self-referential `navigate('TasksTab', { screen: 'TasksTab' })` that left RN stuck on the old tab (B115/D640).
19
+
20
+
### Fixed
21
+
-**B110: MCP server reports stale version** — server version now read from `package.json` at module load; `sync-versions.sh` gained a regex guard against hardcoded `version:` literals in src/ (D630).
-**Freshness probe caching** — 2s TTL per `connectionGeneration`, WeakMap-keyed. Saves 30-150ms per back-to-back tool call by skipping redundant `__RN_AGENT.__v` round-trips (D631).
24
+
-**Structured error codes on `ResultEnvelope`** — `ToolErrorCode` union (`STALE_TARGET`, `HELPERS_STALE`, `RECONNECT_TIMEOUT`, `NOT_CONNECTED`, `HELPERS_NOT_INJECTED`). Agents can branch on `code` instead of regex on error text. Back-compat preserved (D634).
25
+
-**Extracted `cdp/recovery.ts`** — `probeFreshness()` + `recoverFromStaleTarget()` moved out of `utils.ts`. Replaced error-string matching for stale detection with the `__RN_AGENT.__v` probe as the primary signal (D633).
26
+
-**`RingBuffer` requestId index** — optional `indexKey` extractor builds a parallel `Map<key, item>`; `getByKey(id)` is O(1). Swapped 5 call sites (`event-handlers.ts` ×4, `tools/network-body.ts` ×1) from `findLast` → `getByKey` (D632).
27
+
28
+
### Refactors
29
+
-**CDP module extraction continued** — `cdp/connect.ts` (213 lines), `cdp/helper-expr.ts`, `cdp/recovery.ts` (99 lines). CDPClient facade shrunk further; every module now has a typed Context interface instead of reaching into the facade directly.
30
+
-**`cdp/state.ts` setter-based `ResettableState` interface** — replaces `as unknown as CDPResettableState` cast. Renaming a private field on `CDPClient` now produces a real TypeScript error.
31
+
32
+
### Benchmarks validated live
33
+
34
+
Cross-platform benchmark (Task Power User flow + Priority Filter Row feature):
Copy file name to clipboardExpand all lines: README.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
A [Claude Code](https://docs.anthropic.com/en/docs/claude-code) plugin that turns Claude into a React Native development partner. It explores your codebase, designs architecture, implements features, then **verifies everything live on the simulator** — reading the component tree, store state, and navigation stack through Chrome DevTools Protocol.
-**`cdp_native_errors`** — surfaces `simctl log`/`adb logcat` entries for errors that fire before `__RN_AGENT` injects (missing native modules, bundle-fetch failures, FATAL EXCEPTIONs). `cdp_status` hints at it automatically when JS-layer signals are blank.
117
+
-**Multi-device correctness** — `cdp_connect` accepts `targetId`/`bundleId` filters to disambiguate zombie Expo Go pages; `inferPlatforms` cross-checks `simctl listapps` and `adb pm list`; `device_screenshot` accepts `platform` and inherits from the connected CDP target.
118
+
-**Android speed parity** — platform-aware CDP timeouts (2× on Android emulator) eliminate `typeText` false-negatives; real Android flow went from **16.1s/3 fails to 7.2s/0 fails** in the same benchmark.
119
+
-**`device_snapshot attachOnly: true`** — skip app launch when already running, saving the ~12s restart cascade.
120
+
-**91 new unit tests** (158 → 249) locking in the extracted `cdp/*` modules, platform filters, and native-error parsers.
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/changelog.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,54 @@ All notable changes to rn-dev-agent will be documented in this file.
9
9
10
10
Format follows [Keep a Changelog](https://keepachangelog.com/).
11
11
12
+
## [0.23.0] — 2026-04-16
13
+
14
+
Major session of correctness and performance fixes surfaced by end-to-end benchmarks and a live feature-dev run. MCP server bumped to 0.18.0.
15
+
16
+
### Added
17
+
-**`cdp_native_errors` MCP tool** — reads `xcrun simctl log show` on iOS / `adb logcat -d` on Android, parses known native-module / bundle-fetch / FATAL EXCEPTION patterns, dedupes by message body. Fills the gap when `cdp_error_log` / `cdp_console_log` stay empty because native errors fired before `__RN_AGENT` injected. `cdp_status` also emits a suspicion hint pointing at this tool when `connected && !helpersInjected && !hasRedBox && errorCount === 0` (B114/D642).
18
+
-**`targetId` + `bundleId` filters on `cdp_connect`** — disambiguate zombie Expo Go host pages from real app targets (B111/D635).
19
+
-**`attachOnly: true` on `device_snapshot`** — skip app launch when it's already running; verifies via `xcrun simctl spawn booted launchctl list` / `adb shell pidof`. Prevents the ~12s app-restart cascade (B112/D641).
20
+
-**Platform-aware CDP timeouts** — `defaultTimeout(platform)` and `timeoutForMethod(method, platform)` apply a 2× Android multiplier. iOS unchanged (B118/D637).
21
+
-**`platform` param on `device_screenshot`** — inherits from `client.connectedTarget?.platform` or accepts explicit override. When a device session is open, session-bound dispatch routes correctly (B117/D638).
22
+
-**`simctl listapps` cross-check in platform inference** — `inferPlatforms` reads both `adb shell pm list packages` AND `xcrun simctl listapps booted`; targets on both platforms are flagged with `ambiguousPlatform: true` (B116/D639).
23
+
-**Tab-dispatch fix for `cdp_nav_graph`** — `buildTabNavigateArgs` emits the flat `ref.navigate(tab, params)` when target === tab, nested form when they differ (B115/D640).
24
+
25
+
### Fixed
26
+
-**B110: MCP server reports stale version** — server version now read from `package.json` at module load; `sync-versions.sh` guards against hardcoded `version:` literals (D630).
-**Freshness probe caching** — 2s TTL per `connectionGeneration`, WeakMap-keyed. Saves 30-150ms per back-to-back tool call (D631).
29
+
-**Structured error codes on `ResultEnvelope`** — `ToolErrorCode` union lets agents branch on `code` instead of regex on error text (D634).
30
+
-**Extracted `cdp/recovery.ts`** — `probeFreshness()` + `recoverFromStaleTarget()` moved out of `utils.ts`. Replaced error-string matching with the `__RN_AGENT.__v` probe (D633).
31
+
-**`RingBuffer` requestId index** — `getByKey(id)` is O(1); swapped 5 call sites from `findLast` → `getByKey` (D632).
32
+
33
+
### Benchmarks validated live
34
+
35
+
Cross-platform benchmark (Task Power User flow + Priority Filter Row feature):
0 commit comments