Skip to content

v4.5.0

Choose a tag to compare

@pranko17 pranko17 released this 30 May 02:23
· 37 commits to main since this release

Agent-driven RN debugging gets a Redux module, smarter connection lifecycle, a jest mock, and a full pass over the agent-facing prompts.

✨ Added

  • redux module — inspect and drive a Redux store from the agent. redux__get_state returns the full state tree through the shared projection (path / depth / maxBytes — drill into a slice, or depth: 1 for a slice-name overview); redux__dispatch takes an action as a JSON-object string. Opt in with <McpProvider store={store}>; the structural StoreLike adapter fits Redux Toolkit or vanilla Redux.

  • App lifecycle status in connection_status — every client now reports a status (active / background / inactive), pushed from React Native's AppState. A new disconnected array surfaces recently-closed clients for the reconnect window (now 1 hour, up from 10 min) with an expiresInMs countdown — so a backgrounded or closed app is no longer a misleading "still connected" ghost.

  • Revive a closed app by clientId — the host device resolver falls back to a disconnected (ghost) client, so OS-level host tools (launch_app / restart_app / screenshot / tap) reach a recently-closed app on its device by clientId — relaunch a crashed/closed app without knowing its udid.

  • registerModule returns a disposer, and useMcpModule now unregisters its module on unmount (it previously leaked past unmount). Also adds public unregisterModule / unregisterModules.

  • Jest mock — react-native-mcp-kit/jest: a no-op, fully type-compliant stub of the whole public API so consumers' unit tests never load the real client (no WebSocket, no react-native require). Wire it with:

    jest.mock('react-native-mcp-kit', () => require('react-native-mcp-kit/jest'));

🔧 Changed / Fixed

  • Full review of the agent-facing tool + instruction text — correctness fixes (log_box clear/fatal semantics, i18n search scoping, network redact-header list, wait_until / assert broadcast return shapes, fiber_tree hook-entry shape, connection_status fields) plus tightening across the board (net shorter).
  • host__tap_fiber no longer declares clientId in its own input schema — clientId is resolved at the wrapper level, matching every other tool.
  • The new app_state client→server message is additive — no PROTOCOL_VERSION bump; older servers simply ignore it.

Full changelog: v4.4.1...v4.5.0