react-native-ai-debugger 1.0.30 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,24 +4,32 @@ An MCP (Model Context Protocol) server for AI-powered React Native debugging. En
4
4
 
5
5
  ## Features
6
6
 
7
- - Captures `console.log`, `console.warn`, `console.error` from React Native apps
8
- - **Network request tracking** - capture HTTP requests/responses with headers, timing, and status
9
- - **React component inspection** - inspect component tree, props, state/hooks, and layout styles at runtime
10
- - **Debug Web Dashboard** - browser-based UI to view logs and network requests in real-time
11
- - Supports both **Expo SDK 54+** (React Native Bridgeless) and **RN 0.70+** (Hermes)
12
- - **Auto-connect on startup** - automatically scans and connects to Metro when the server starts
13
- - **Auto-reconnection** - automatically reconnects when connection is lost (e.g., app restart)
14
- - Auto-discovers running Metro servers on common ports
15
- - Filters logs by level (log, warn, error, info, debug)
16
- - Circular buffer stores last 1000 log entries and 500 network requests
17
- - **Execute JavaScript** directly in the running app (REPL-style)
18
- - **Inspect global objects** like Apollo Client, Redux store, Expo Router
19
- - **Discover debug globals** available in the app
20
- - **Android device control** - screenshots, tap, swipe, text input, key events via ADB
21
- - **iOS simulator control** - screenshots, app management, URL handling via simctl
22
- - **iOS UI automation** - tap, swipe, text input, button presses via IDB (optional)
23
- - **Element-based UI automation** - find and wait for elements by text/label without screenshots (faster, cheaper)
24
- - **OCR-based text extraction** - extract visible text with tap-ready coordinates using OCR (works on any visible text)
7
+ ### Runtime Interaction
8
+
9
+ - **Console Log Capture** - Capture `console.log`, `warn`, `error`, `info`, `debug` with filtering and search
10
+ - **React Component Inspection** - Inspect component tree, props, state/hooks, and layout styles at runtime
11
+ - **Network Request Tracking** - Monitor HTTP requests/responses with headers, timing, and body content
12
+ - **JavaScript Execution** - Run code directly in your app (REPL-style) and inspect results
13
+ - **Global State Debugging** - Discover and inspect Apollo Client, Redux stores, Expo Router, and custom globals
14
+ - **Bundle Error Detection** - Get Metro bundler errors and compilation issues with file locations
15
+ - **Debug Web Dashboard** - Browser-based UI for real-time log and network monitoring
16
+
17
+ ### Device Control
18
+
19
+ - **iOS Simulator** - Screenshots, app management, URL handling, boot/terminate (via simctl)
20
+ - **Android Devices** - Screenshots, app install/launch, package management (via ADB)
21
+ - **UI Automation** - Tap, swipe, long press, text input, and key events on both platforms
22
+ - **Accessibility Inspection** - Query UI hierarchy to find elements by text, label, or resource ID
23
+ - **Element-Based Interaction** - Tap/wait for elements by text without screenshots (faster, cheaper)
24
+ - **OCR Text Extraction** - Extract visible text with tap-ready coordinates (works on any screen content)
25
+
26
+ ### Under the Hood
27
+
28
+ - **Auto-Discovery** - Scans Metro on ports 8081, 8082, 19000-19002 automatically
29
+ - **Smart Device Selection** - Prioritizes Bridgeless > Hermes > standard React Native targets
30
+ - **Auto-Reconnection** - Exponential backoff (up to 8 attempts) when connection drops
31
+ - **Efficient Buffering** - Circular buffers: 500 logs, 200 network requests
32
+ - **Platform Support** - Expo SDK 54+ (Bridgeless) and React Native 0.70+ (Hermes)
25
33
 
26
34
  ## Requirements
27
35
 
@@ -113,6 +121,7 @@ Requires VS Code 1.102+ with Copilot ([docs](https://code.visualstudio.com/docs/
113
121
  | `connect_metro` | Connect to a specific Metro port (use when you know the exact port) |
114
122
  | `get_apps` | List connected apps. Run `scan_metro` first if none connected |
115
123
  | `get_connection_status` | Get detailed connection health, uptime, and recent disconnects |
124
+ | `ensure_connection` | Verify/establish connection with health checks |
116
125
  | `get_logs` | Retrieve console logs (filtering, truncation, summary, TONL format) |
117
126
  | `search_logs` | Search logs for specific text (truncation, TONL format) |
118
127
  | `clear_logs` | Clear the log buffer |
@@ -136,6 +145,15 @@ Requires VS Code 1.102+ with Copilot ([docs](https://code.visualstudio.com/docs/
136
145
  | `inspect_global` | Inspect a global object to see its properties and callable methods |
137
146
  | `reload_app` | Reload the app (auto-connects if needed). Use sparingly - Fast Refresh handles most changes |
138
147
  | `get_debug_server` | Get the debug HTTP server URL for browser-based viewing |
148
+ | `restart_http_server` | Restart the debug HTTP server |
149
+
150
+ ### Bundle Tools
151
+
152
+ | Tool | Description |
153
+ | -------------------- | ------------------------------------------------------------------- |
154
+ | `get_bundle_status` | Get Metro bundler status and build state |
155
+ | `get_bundle_errors` | Get compilation errors with file locations |
156
+ | `clear_bundle_errors` | Clear the bundle error buffer |
139
157
 
140
158
  ### React Component Inspection
141
159
 
@@ -156,6 +174,7 @@ Inspect React components at specific screen coordinates - like React Native's bu
156
174
  | -------------------------- | ------------------------------------------------------------------------------ |
157
175
  | `get_inspector_selection` | **Main tool**: Get React component at coordinates. Auto-enables inspector and taps if x/y provided |
158
176
  | `toggle_element_inspector` | Manually toggle the Element Inspector overlay on/off |
177
+ | `inspect_at_point` | Inspect React component at (x,y) coordinates |
159
178
 
160
179
  **Quick Inspection (Recommended)**:
161
180
  ```
@@ -203,6 +222,9 @@ toggle_element_inspector()
203
222
  | `android_input_text` | Type text at current focus point |
204
223
  | `android_key_event` | Send key events (HOME, BACK, ENTER, etc.) |
205
224
  | `android_get_screen_size` | Get device screen resolution |
225
+ | `android_describe_all` | Get full UI accessibility tree via uiautomator |
226
+ | `android_describe_point` | Get UI element info at specific coordinates |
227
+ | `android_tap_element` | Tap element by text/contentDesc/resourceId |
206
228
  | `android_find_element` | Find element by text/contentDesc/resourceId (no screenshot) |
207
229
  | `android_wait_for_element` | Wait for element to appear (useful for screen transitions) |
208
230
 
@@ -217,6 +239,15 @@ toggle_element_inspector()
217
239
  | `ios_open_url` | Open a URL (deep links or web URLs) |
218
240
  | `ios_terminate_app` | Terminate a running app |
219
241
  | `ios_boot_simulator` | Boot a simulator by UDID |
242
+ | `ios_tap` | Tap at coordinates (requires IDB) |
243
+ | `ios_tap_element` | Tap element by accessibility label (requires IDB) |
244
+ | `ios_swipe` | Swipe gesture (requires IDB) |
245
+ | `ios_input_text` | Type text into active field (requires IDB) |
246
+ | `ios_button` | Press hardware button: HOME, LOCK, SIRI (requires IDB) |
247
+ | `ios_key_event` | Send key event by keycode (requires IDB) |
248
+ | `ios_key_sequence` | Send sequence of key events (requires IDB) |
249
+ | `ios_describe_all` | Get full accessibility tree (requires IDB) |
250
+ | `ios_describe_point` | Get element at point (requires IDB) |
220
251
  | `ios_find_element` | Find element by label/value (requires IDB, no screenshot) |
221
252
  | `ios_wait_for_element` | Wait for element to appear (requires IDB) |
222
253
 
@@ -1 +1 @@
1
- {"version":3,"file":"httpServer.d.ts","sourceRoot":"","sources":["../../src/core/httpServer.ts"],"names":[],"mappings":"AA+BA,UAAU,kBAAkB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAElD;AA40CD;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkBnG"}
1
+ {"version":3,"file":"httpServer.d.ts","sourceRoot":"","sources":["../../src/core/httpServer.ts"],"names":[],"mappings":"AAyCA,UAAU,kBAAkB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAElD;AA24ED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkBnG"}