@ceraph/react-native-mcp 0.3.2 → 0.4.5

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.
Files changed (132) hide show
  1. package/README.md +335 -68
  2. package/dist/babel-plugin/index.cjs +1 -0
  3. package/dist/babel-plugin/index.js +1 -0
  4. package/dist/cli.d.ts +3 -1
  5. package/dist/cli.js +1 -47
  6. package/dist/index.d.ts +106 -1
  7. package/dist/index.js +2 -1651
  8. package/dist/shim/async-storage-ops.d.ts +26 -0
  9. package/dist/shim/async-storage-ops.js +1 -0
  10. package/dist/shim/boot.d.ts +9 -0
  11. package/dist/shim/boot.js +1 -141
  12. package/dist/shim/camera.js +1 -62
  13. package/dist/shim/command-poll.d.ts +18 -0
  14. package/dist/shim/command-poll.js +1 -0
  15. package/dist/shim/config.js +1 -56
  16. package/dist/shim/console-capture.d.ts +16 -0
  17. package/dist/shim/console-capture.js +1 -0
  18. package/dist/shim/deep-link.js +1 -25
  19. package/dist/shim/dev-guard.js +1 -3
  20. package/dist/shim/dev-host.d.ts +1 -0
  21. package/dist/shim/dev-host.js +1 -0
  22. package/dist/shim/error-handler.js +1 -66
  23. package/dist/shim/fetch-interceptor.js +1 -93
  24. package/dist/shim/index.d.ts +3 -0
  25. package/dist/shim/index.js +1 -6
  26. package/dist/shim/keep-awake.js +1 -118
  27. package/dist/shim/network-ownership.d.ts +4 -0
  28. package/dist/shim/network-ownership.js +1 -0
  29. package/dist/shim/optimistic-observer.d.ts +29 -0
  30. package/dist/shim/optimistic-observer.js +1 -0
  31. package/dist/shim/reload.js +1 -76
  32. package/dist/shim/reset.d.ts +30 -0
  33. package/dist/shim/reset.js +1 -0
  34. package/dist/shim/signal-capture.d.ts +8 -0
  35. package/dist/shim/signal-capture.js +1 -15
  36. package/dist/shim/signal-transport.d.ts +14 -1
  37. package/dist/shim/signal-transport.js +1 -43
  38. package/dist/shim/xhr-interceptor.d.ts +39 -0
  39. package/dist/shim/xhr-interceptor.js +1 -0
  40. package/package.json +41 -15
  41. package/dist/app-lifecycle.d.ts +0 -50
  42. package/dist/app-lifecycle.js +0 -487
  43. package/dist/camera-image-writer.d.ts +0 -43
  44. package/dist/camera-image-writer.js +0 -280
  45. package/dist/camera-registry-sync.d.ts +0 -18
  46. package/dist/camera-registry-sync.js +0 -117
  47. package/dist/device-autonomy.d.ts +0 -30
  48. package/dist/device-autonomy.js +0 -117
  49. package/dist/error-parser.d.ts +0 -51
  50. package/dist/error-parser.js +0 -275
  51. package/dist/expo-manager.d.ts +0 -62
  52. package/dist/expo-manager.js +0 -447
  53. package/dist/init/ast-camera.d.ts +0 -29
  54. package/dist/init/ast-camera.js +0 -267
  55. package/dist/init/ast-layout.d.ts +0 -15
  56. package/dist/init/ast-layout.js +0 -167
  57. package/dist/init/claude-hook-constants.d.ts +0 -9
  58. package/dist/init/claude-hook-constants.js +0 -91
  59. package/dist/init/lan-ip.d.ts +0 -11
  60. package/dist/init/lan-ip.js +0 -51
  61. package/dist/init/monorepo.d.ts +0 -13
  62. package/dist/init/monorepo.js +0 -185
  63. package/dist/init/oauth.d.ts +0 -52
  64. package/dist/init/oauth.js +0 -220
  65. package/dist/init/package-manager.d.ts +0 -11
  66. package/dist/init/package-manager.js +0 -60
  67. package/dist/init/prompt.d.ts +0 -12
  68. package/dist/init/prompt.js +0 -68
  69. package/dist/init/shell-profile.d.ts +0 -22
  70. package/dist/init/shell-profile.js +0 -85
  71. package/dist/init/steps.d.ts +0 -135
  72. package/dist/init/steps.js +0 -399
  73. package/dist/init/url-scheme.d.ts +0 -42
  74. package/dist/init/url-scheme.js +0 -187
  75. package/dist/init/walkthrough.d.ts +0 -76
  76. package/dist/init/walkthrough.js +0 -340
  77. package/dist/init.d.ts +0 -8
  78. package/dist/init.js +0 -395
  79. package/dist/iproxy-manager.d.ts +0 -32
  80. package/dist/iproxy-manager.js +0 -216
  81. package/dist/mac-caffeinate.d.ts +0 -10
  82. package/dist/mac-caffeinate.js +0 -56
  83. package/dist/permission-interceptor.d.ts +0 -29
  84. package/dist/permission-interceptor.js +0 -185
  85. package/dist/prebuild-detector.d.ts +0 -19
  86. package/dist/prebuild-detector.js +0 -174
  87. package/dist/preflight.d.ts +0 -34
  88. package/dist/preflight.js +0 -847
  89. package/dist/screen.d.ts +0 -184
  90. package/dist/screen.js +0 -931
  91. package/dist/signal-listener.d.ts +0 -27
  92. package/dist/signal-listener.js +0 -135
  93. package/dist/simulator-boot.d.ts +0 -52
  94. package/dist/simulator-boot.js +0 -227
  95. package/dist/target.d.ts +0 -48
  96. package/dist/target.js +0 -267
  97. package/dist/uninstall/cli-runner.d.ts +0 -32
  98. package/dist/uninstall/cli-runner.js +0 -223
  99. package/dist/uninstall/footprint.d.ts +0 -40
  100. package/dist/uninstall/footprint.js +0 -288
  101. package/dist/uninstall/mcp-tools.d.ts +0 -14
  102. package/dist/uninstall/mcp-tools.js +0 -175
  103. package/dist/uninstall/revert-auth.d.ts +0 -22
  104. package/dist/uninstall/revert-auth.js +0 -31
  105. package/dist/uninstall/revert-boot.d.ts +0 -24
  106. package/dist/uninstall/revert-boot.js +0 -242
  107. package/dist/uninstall/revert-camera.d.ts +0 -12
  108. package/dist/uninstall/revert-camera.js +0 -199
  109. package/dist/uninstall/revert-ceraph-dir.d.ts +0 -27
  110. package/dist/uninstall/revert-ceraph-dir.js +0 -38
  111. package/dist/uninstall/revert-claude-hooks.d.ts +0 -19
  112. package/dist/uninstall/revert-claude-hooks.js +0 -191
  113. package/dist/uninstall/revert-gitignore.d.ts +0 -17
  114. package/dist/uninstall/revert-gitignore.js +0 -43
  115. package/dist/uninstall/revert-mcp-clients.d.ts +0 -57
  116. package/dist/uninstall/revert-mcp-clients.js +0 -194
  117. package/dist/uninstall/revert-package.d.ts +0 -34
  118. package/dist/uninstall/revert-package.js +0 -98
  119. package/dist/uninstall/revert-scheme.d.ts +0 -36
  120. package/dist/uninstall/revert-scheme.js +0 -139
  121. package/dist/uninstall/revert-signal-host-env.d.ts +0 -31
  122. package/dist/uninstall/revert-signal-host-env.js +0 -61
  123. package/dist/uninstall/walkthrough.d.ts +0 -80
  124. package/dist/uninstall/walkthrough.js +0 -1244
  125. package/dist/utils/atomic-write.d.ts +0 -1
  126. package/dist/utils/atomic-write.js +0 -30
  127. package/dist/wait-for-device.d.ts +0 -68
  128. package/dist/wait-for-device.js +0 -368
  129. package/dist/wda-manager.d.ts +0 -38
  130. package/dist/wda-manager.js +0 -186
  131. package/dist/wda-simulator.d.ts +0 -28
  132. package/dist/wda-simulator.js +0 -257
package/dist/screen.d.ts DELETED
@@ -1,184 +0,0 @@
1
- import { TargetResolver } from "./target.js";
2
- export interface TapResult {
3
- success: boolean;
4
- tappedAt: {
5
- x: number;
6
- y: number;
7
- };
8
- pixelRatio: number;
9
- correction: string;
10
- error?: string;
11
- }
12
- export interface ElementInfo {
13
- type: string;
14
- label: string;
15
- bounds: {
16
- x: number;
17
- y: number;
18
- width: number;
19
- height: number;
20
- };
21
- }
22
- export interface FindTapResult {
23
- success: boolean;
24
- element?: ElementInfo;
25
- tappedAt?: {
26
- x: number;
27
- y: number;
28
- };
29
- availableElements?: Array<{
30
- type: string;
31
- label: string;
32
- text: string;
33
- }>;
34
- error?: string;
35
- }
36
- export interface ElementQuery {
37
- text?: string;
38
- accessibilityLabel?: string;
39
- type?: string;
40
- index?: number;
41
- }
42
- export interface SwipeOptions {
43
- direction: "up" | "down" | "left" | "right";
44
- from?: {
45
- x: number;
46
- y: number;
47
- };
48
- distancePx?: number;
49
- durationMs?: number;
50
- coordinateSource?: "screenshot" | "device";
51
- }
52
- export interface SwipeResult {
53
- success: boolean;
54
- from: {
55
- x: number;
56
- y: number;
57
- };
58
- to: {
59
- x: number;
60
- y: number;
61
- };
62
- durationMs: number;
63
- error?: string;
64
- }
65
- export interface SimpleResult {
66
- success: boolean;
67
- error?: string;
68
- details?: Record<string, unknown>;
69
- }
70
- export interface ScreenshotResult {
71
- success: boolean;
72
- base64?: string;
73
- error?: string;
74
- }
75
- export interface SourceResult {
76
- success: boolean;
77
- source?: WDAElement;
78
- error?: string;
79
- }
80
- export interface WaitForResult {
81
- success: boolean;
82
- found: boolean;
83
- elapsedMs: number;
84
- element?: ElementInfo;
85
- error?: string;
86
- }
87
- export interface WDAElement {
88
- type?: string;
89
- label?: string;
90
- name?: string;
91
- value?: string;
92
- rect?: {
93
- x: number;
94
- y: number;
95
- width: number;
96
- height: number;
97
- };
98
- children?: WDAElement[];
99
- [key: string]: unknown;
100
- }
101
- export declare class ScreenManager {
102
- private sessionId;
103
- private pixelRatio;
104
- private targetResolver;
105
- private sessionBaseUrl;
106
- constructor(opts?: {
107
- targetResolver?: TargetResolver;
108
- });
109
- private snapshotTarget;
110
- private wdaFetchAt;
111
- private wdaFetch;
112
- isAvailable(): Promise<boolean>;
113
- ensureSession(): Promise<string>;
114
- getPixelRatio(): Promise<number>;
115
- getWindowSize(): Promise<{
116
- width: number;
117
- height: number;
118
- }>;
119
- tap(x: number, y: number, fromScreenshot?: boolean): Promise<TapResult>;
120
- findAndTap(query: ElementQuery): Promise<FindTapResult>;
121
- findElement(query: ElementQuery): Promise<{
122
- success: boolean;
123
- element?: WDAElement;
124
- matchCount?: number;
125
- error?: string;
126
- }>;
127
- swipe(opts: SwipeOptions): Promise<SwipeResult>;
128
- scrollToElement(query: ElementQuery, opts?: {
129
- maxSwipes?: number;
130
- direction?: "up" | "down";
131
- distancePx?: number;
132
- }): Promise<{
133
- success: boolean;
134
- swipes: number;
135
- element?: ElementInfo;
136
- error?: string;
137
- }>;
138
- longPress(x: number, y: number, durationMs?: number, fromScreenshot?: boolean): Promise<SimpleResult>;
139
- longPressElement(query: ElementQuery, durationMs?: number): Promise<SimpleResult & {
140
- element?: ElementInfo;
141
- }>;
142
- type(text: string, opts?: {
143
- hideKeyboardAfter?: boolean;
144
- }): Promise<SimpleResult>;
145
- clearText(query: ElementQuery): Promise<SimpleResult>;
146
- pressKey(key: "home" | "volumeUp" | "volumeDown" | "lock"): Promise<SimpleResult>;
147
- unlock(): Promise<SimpleResult>;
148
- isLocked(): Promise<boolean | null>;
149
- screenshot(): Promise<ScreenshotResult>;
150
- getSource(): Promise<SourceResult>;
151
- waitFor(query: ElementQuery, opts?: {
152
- timeoutMs?: number;
153
- pollIntervalMs?: number;
154
- disappear?: boolean;
155
- }): Promise<WaitForResult>;
156
- assertVisible(query: ElementQuery): Promise<{
157
- success: boolean;
158
- visible: boolean;
159
- element?: ElementInfo;
160
- error?: string;
161
- }>;
162
- assertNotVisible(query: ElementQuery): Promise<{
163
- success: boolean;
164
- visible: boolean;
165
- error?: string;
166
- }>;
167
- getOrientation(): Promise<string | null>;
168
- setOrientation(orientation: "portrait" | "landscape"): Promise<SimpleResult>;
169
- getActiveAppInfo(): Promise<{
170
- success: boolean;
171
- bundleId?: string;
172
- pid?: number;
173
- name?: string;
174
- error?: string;
175
- }>;
176
- activateApp(bundleId: string): Promise<SimpleResult>;
177
- openUrl(url: string): Promise<SimpleResult>;
178
- terminateAppViaWDA(bundleId: string): Promise<SimpleResult>;
179
- pingStatus(): Promise<boolean>;
180
- private searchElements;
181
- private elementMatches;
182
- private collectVisibleElements;
183
- reset(): void;
184
- }