screenhand 0.5.0 → 0.5.2

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.
@@ -25,7 +25,9 @@
25
25
  "verify_ui_state": "screenshot() for visual, ui_tree(pid) for AX elements, click_text to verify text exists",
26
26
  "unlock_device": "bash: xcrun simctl spawn {udid} notifyutil -p com.apple.springboard.unlockdevice + key('shift+cmd+h')",
27
27
  "scroll_ios_list": "scroll(direction, amount) on simulator window, or drag() for precise control",
28
- "multi_device": "bash: xcrun simctl boot {udid} — can run multiple simultaneously"
28
+ "multi_device": "bash: xcrun simctl boot {udid} — can run multiple simultaneously",
29
+ "react_native_text_input": "When ui_set_value fails on React Native custom inputs (OTP, pin fields): connect to Hermes debugger via WebSocket ws://localhost:8081/inspector/debug, traverse React fiber tree via __REACT_DEVTOOLS_GLOBAL_HOOK__.getFiberRoots(1), find TextInput fibers by maxLength/onChangeText props, call onChangeText(value) directly",
30
+ "react_native_debugger": "curl http://localhost:8081/json to get WebSocket URLs for Hermes runtime. Use Runtime.evaluate to execute JS in the app context."
29
31
  }
30
32
  },
31
33
  "shortcuts": {
@@ -368,6 +370,41 @@
368
370
  "steps": [
369
371
  "drag(centerX, topY, centerX, bottomY) -- drag down from top of list"
370
372
  ]
373
+ },
374
+ "react_native_otp_fill": {
375
+ "description": "Fill OTP/PIN fields in a React Native app via Hermes debugger",
376
+ "verified": true,
377
+ "warning": "AX-based ui_set_value may report success but React Native custom inputs ignore the value. Use Hermes debugger instead.",
378
+ "steps": [
379
+ "1. Check Metro bundler: curl -s http://localhost:8081/status (must return 'packager-status:running')",
380
+ "2. Get WebSocket URL: curl -s http://localhost:8081/json → webSocketDebuggerUrl",
381
+ "3. Connect via WebSocket, enable Runtime domain",
382
+ "4. Runtime.evaluate: access __REACT_DEVTOOLS_GLOBAL_HOOK__.getFiberRoots(1) to get fiber tree root",
383
+ "5. Walk fiber tree to find TextInput fibers with maxLength=1 and onChangeText prop",
384
+ "6. Deduplicate: same onChangeText function appears on 3 fiber layers (wrapper, InternalTextInput, RCTSinglelineTextInputView) — use Set to collect unique handlers",
385
+ "7. Call each onChangeText(digit) sequentially with 300ms delays to allow React re-render",
386
+ "8. Verify via screenshot or re-traverse fiber tree to check values"
387
+ ]
388
+ },
389
+ "react_native_phone_entry": {
390
+ "description": "Enter phone number in a React Native app",
391
+ "verified": true,
392
+ "steps": [
393
+ "1. Use ui_tree(pid) to find the AXTextField with the placeholder text",
394
+ "2. ui_set_value(pid, '{placeholder_text}', '{phone_number}') — works via AX for standard TextInput",
395
+ "3. click_text(windowId, 'Continue') or ui_press to submit"
396
+ ]
397
+ },
398
+ "react_native_fiber_inspection": {
399
+ "description": "Inspect React Native component tree in Simulator",
400
+ "verified": true,
401
+ "steps": [
402
+ "1. curl http://localhost:8081/json to get debugger targets",
403
+ "2. Connect WebSocket to webSocketDebuggerUrl",
404
+ "3. Runtime.evaluate with: globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__.getFiberRoots(1).values().next().value.current",
405
+ "4. Walk fiber.child/sibling, inspect fiber.type (component name), fiber.memoizedProps (props), fiber.memoizedState (state hooks)",
406
+ "5. Call any prop callback directly (onPress, onChangeText, etc.) to trigger actions"
407
+ ]
371
408
  }
372
409
  },
373
410
  "simctl": {
@@ -449,6 +486,14 @@
449
486
  {
450
487
  "pattern": "drag/swipe gestures don't work on iOS home screen or lock screen",
451
488
  "solution": "iOS home screen swipe requires precise coordinates within the device bezel. Use simctl commands as alternatives (simctl openurl, simctl launch) instead of UI gestures."
489
+ },
490
+ {
491
+ "pattern": "ui_set_value reports success but React Native custom input (OTP, PIN) stays empty",
492
+ "solution": "React Native custom inputs (OTP boxes, PIN fields) use JS state, not native AX values. Connect to Hermes debugger at ws://localhost:8081/inspector/debug, traverse fiber tree to find TextInput components, call onChangeText(value) directly. See flow: react_native_otp_fill"
493
+ },
494
+ {
495
+ "pattern": "clicks on iOS OTP/PIN fields don't focus or type — keyboard doesn't appear",
496
+ "solution": "Custom React Native OTP components may not respond to coordinate-based clicks. Use Hermes debugger to call onChangeText directly, or try clicking the area first to trigger keyboard, then use the debugger approach for reliable text entry."
452
497
  }
453
498
  ],
454
499
  "installed_apps": {
@@ -469,7 +514,8 @@
469
514
  "Passwords": "com.apple.Passwords",
470
515
  "Watch": "com.apple.Bridge",
471
516
  "Web": "com.apple.webapp",
472
- "Xcode Previews": "com.apple.PreviewShell"
517
+ "Xcode Previews": "com.apple.PreviewShell",
518
+ "ai2humworker": "org.reactjs.native.example.ai2humworker"
473
519
  },
474
520
  "ios_settings_categories": [
475
521
  "Apple Account (sign in)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screenhand",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "mcpName": "io.github.manushi4/screenhand",
5
5
  "description": "Give AI eyes and hands on your desktop. ScreenHand is an open-source MCP server that lets Claude and other AI agents see your screen, click buttons, type text, and control any app on macOS and Windows.",
6
6
  "homepage": "https://screenhand.com",