react-native-mcp-kit 3.0.1 → 4.1.0
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 +25 -13
- package/dist/babel/testIdPlugin.d.ts.map +1 -1
- package/dist/babel/testIdPlugin.js +22 -13
- package/dist/babel/testIdPlugin.js.map +1 -1
- package/dist/bin/ios-hid +0 -0
- package/dist/client/contexts/McpContext/McpProvider.d.ts.map +1 -1
- package/dist/client/contexts/McpContext/McpProvider.js +5 -5
- package/dist/client/contexts/McpContext/McpProvider.js.map +1 -1
- package/dist/client/core/McpClient.d.ts.map +1 -1
- package/dist/client/core/McpClient.js +42 -34
- package/dist/client/core/McpClient.js.map +1 -1
- package/dist/modules/alert/alert.d.ts.map +1 -1
- package/dist/modules/alert/alert.js +2 -5
- package/dist/modules/alert/alert.js.map +1 -1
- package/dist/modules/console/console.d.ts.map +1 -1
- package/dist/modules/console/console.js +32 -107
- package/dist/modules/console/console.js.map +1 -1
- package/dist/modules/console/types.d.ts +1 -0
- package/dist/modules/console/types.d.ts.map +1 -1
- package/dist/modules/device/device.d.ts.map +1 -1
- package/dist/modules/device/device.js +224 -133
- package/dist/modules/device/device.js.map +1 -1
- package/dist/modules/errors/errors.d.ts.map +1 -1
- package/dist/modules/errors/errors.js +19 -36
- package/dist/modules/errors/errors.js.map +1 -1
- package/dist/modules/fiberTree/children.d.ts +49 -0
- package/dist/modules/fiberTree/children.d.ts.map +1 -0
- package/dist/modules/fiberTree/children.js +182 -0
- package/dist/modules/fiberTree/children.js.map +1 -0
- package/dist/modules/fiberTree/constants.d.ts +13 -0
- package/dist/modules/fiberTree/constants.d.ts.map +1 -0
- package/dist/modules/fiberTree/constants.js +24 -0
- package/dist/modules/fiberTree/constants.js.map +1 -0
- package/dist/modules/fiberTree/fiberTree.d.ts +3 -6
- package/dist/modules/fiberTree/fiberTree.d.ts.map +1 -1
- package/dist/modules/fiberTree/fiberTree.js +219 -1080
- package/dist/modules/fiberTree/fiberTree.js.map +1 -1
- package/dist/modules/fiberTree/finder.d.ts +60 -0
- package/dist/modules/fiberTree/finder.d.ts.map +1 -0
- package/dist/modules/fiberTree/finder.js +107 -0
- package/dist/modules/fiberTree/finder.js.map +1 -0
- package/dist/modules/fiberTree/hooks.d.ts +103 -0
- package/dist/modules/fiberTree/hooks.d.ts.map +1 -0
- package/dist/modules/fiberTree/hooks.js +532 -0
- package/dist/modules/fiberTree/hooks.js.map +1 -0
- package/dist/modules/fiberTree/projection.d.ts +49 -0
- package/dist/modules/fiberTree/projection.d.ts.map +1 -0
- package/dist/modules/fiberTree/projection.js +82 -0
- package/dist/modules/fiberTree/projection.js.map +1 -0
- package/dist/modules/fiberTree/query.d.ts +56 -0
- package/dist/modules/fiberTree/query.d.ts.map +1 -0
- package/dist/modules/fiberTree/query.js +151 -0
- package/dist/modules/fiberTree/query.js.map +1 -0
- package/dist/modules/fiberTree/redact.d.ts +24 -0
- package/dist/modules/fiberTree/redact.d.ts.map +1 -0
- package/dist/modules/fiberTree/redact.js +51 -0
- package/dist/modules/fiberTree/redact.js.map +1 -0
- package/dist/modules/fiberTree/types.d.ts +7 -0
- package/dist/modules/fiberTree/types.d.ts.map +1 -1
- package/dist/modules/fiberTree/utils.d.ts +8 -2
- package/dist/modules/fiberTree/utils.d.ts.map +1 -1
- package/dist/modules/fiberTree/utils.js +79 -78
- package/dist/modules/fiberTree/utils.js.map +1 -1
- package/dist/modules/fiberTree/viewport.d.ts +28 -0
- package/dist/modules/fiberTree/viewport.d.ts.map +1 -0
- package/dist/modules/fiberTree/viewport.js +50 -0
- package/dist/modules/fiberTree/viewport.js.map +1 -0
- package/dist/modules/fiberTree/waitFor.d.ts +52 -0
- package/dist/modules/fiberTree/waitFor.d.ts.map +1 -0
- package/dist/modules/fiberTree/waitFor.js +98 -0
- package/dist/modules/fiberTree/waitFor.js.map +1 -0
- package/dist/modules/logBox/logBox.d.ts.map +1 -1
- package/dist/modules/logBox/logBox.js +59 -66
- package/dist/modules/logBox/logBox.js.map +1 -1
- package/dist/modules/navigation/navigation.d.ts.map +1 -1
- package/dist/modules/navigation/navigation.js +115 -114
- package/dist/modules/navigation/navigation.js.map +1 -1
- package/dist/modules/network/network.d.ts.map +1 -1
- package/dist/modules/network/network.js +78 -197
- package/dist/modules/network/network.js.map +1 -1
- package/dist/modules/network/types.d.ts +23 -27
- package/dist/modules/network/types.d.ts.map +1 -1
- package/dist/modules/reactQuery/reactQuery.d.ts.map +1 -1
- package/dist/modules/reactQuery/reactQuery.js +46 -52
- package/dist/modules/reactQuery/reactQuery.js.map +1 -1
- package/dist/modules/storage/storage.d.ts.map +1 -1
- package/dist/modules/storage/storage.js +20 -3
- package/dist/modules/storage/storage.js.map +1 -1
- package/dist/server/bridge.d.ts +1 -0
- package/dist/server/bridge.d.ts.map +1 -1
- package/dist/server/bridge.js +1 -0
- package/dist/server/bridge.js.map +1 -1
- package/dist/server/host/coredevice/dtx.d.ts +79 -0
- package/dist/server/host/coredevice/dtx.d.ts.map +1 -0
- package/dist/server/host/coredevice/dtx.js +453 -0
- package/dist/server/host/coredevice/dtx.js.map +1 -0
- package/dist/server/host/coredevice/nska.d.ts +6 -0
- package/dist/server/host/coredevice/nska.d.ts.map +1 -0
- package/dist/server/host/coredevice/nska.js +277 -0
- package/dist/server/host/coredevice/nska.js.map +1 -0
- package/dist/server/host/coredevice/rsd.d.ts +20 -0
- package/dist/server/host/coredevice/rsd.d.ts.map +1 -0
- package/dist/server/host/coredevice/rsd.js +244 -0
- package/dist/server/host/coredevice/rsd.js.map +1 -0
- package/dist/server/host/coredevice/screenshot.d.ts +11 -0
- package/dist/server/host/coredevice/screenshot.d.ts.map +1 -0
- package/dist/server/host/coredevice/screenshot.js +84 -0
- package/dist/server/host/coredevice/screenshot.js.map +1 -0
- package/dist/server/host/coredevice/tunnel.d.ts +29 -0
- package/dist/server/host/coredevice/tunnel.d.ts.map +1 -0
- package/dist/server/host/coredevice/tunnel.js +222 -0
- package/dist/server/host/coredevice/tunnel.js.map +1 -0
- package/dist/server/host/coredevice/xpc.d.ts +21 -0
- package/dist/server/host/coredevice/xpc.d.ts.map +1 -0
- package/dist/server/host/coredevice/xpc.js +318 -0
- package/dist/server/host/coredevice/xpc.js.map +1 -0
- package/dist/server/host/deviceResolver.d.ts +8 -0
- package/dist/server/host/deviceResolver.d.ts.map +1 -1
- package/dist/server/host/deviceResolver.js +128 -62
- package/dist/server/host/deviceResolver.js.map +1 -1
- package/dist/server/host/tools/capture.d.ts.map +1 -1
- package/dist/server/host/tools/capture.js +26 -0
- package/dist/server/host/tools/capture.js.map +1 -1
- package/dist/server/host/tools/input.js +2 -2
- package/dist/server/host/tools/input.js.map +1 -1
- package/dist/server/mcpServer.d.ts.map +1 -1
- package/dist/server/mcpServer.js +44 -3
- package/dist/server/mcpServer.js.map +1 -1
- package/dist/server/metro/eventCapture.d.ts +0 -2
- package/dist/server/metro/eventCapture.d.ts.map +1 -1
- package/dist/server/metro/eventCapture.js +1 -2
- package/dist/server/metro/eventCapture.js.map +1 -1
- package/dist/server/metro/tools/events.d.ts.map +1 -1
- package/dist/server/metro/tools/events.js +11 -11
- package/dist/server/metro/tools/events.js.map +1 -1
- package/dist/shared/projection/projectValue.d.ts +90 -0
- package/dist/shared/projection/projectValue.d.ts.map +1 -0
- package/dist/shared/projection/projectValue.js +322 -0
- package/dist/shared/projection/projectValue.js.map +1 -0
- package/dist/shared/projection/redact.d.ts +31 -0
- package/dist/shared/projection/redact.d.ts.map +1 -0
- package/dist/shared/projection/redact.js +78 -0
- package/dist/shared/projection/redact.js.map +1 -0
- package/dist/shared/projection/resolvePath.d.ts +45 -0
- package/dist/shared/projection/resolvePath.d.ts.map +1 -0
- package/dist/shared/projection/resolvePath.js +211 -0
- package/dist/shared/projection/resolvePath.js.map +1 -0
- package/dist/shared/protocol.d.ts +2 -1
- package/dist/shared/protocol.d.ts.map +1 -1
- package/dist/shared/protocol.js +1 -1
- package/dist/shared/rn/core.d.ts +48 -0
- package/dist/shared/rn/core.d.ts.map +1 -0
- package/dist/shared/rn/core.js +100 -0
- package/dist/shared/rn/core.js.map +1 -0
- package/dist/shared/rn/deviceInfo.d.ts +40 -0
- package/dist/shared/rn/deviceInfo.d.ts.map +1 -0
- package/dist/shared/rn/deviceInfo.js +78 -0
- package/dist/shared/rn/deviceInfo.js.map +1 -0
- package/package.json +4 -2
- package/dist/client/hooks/useMcpState.d.ts +0 -3
- package/dist/client/hooks/useMcpState.d.ts.map +0 -1
- package/dist/client/hooks/useMcpState.js +0 -20
- package/dist/client/hooks/useMcpState.js.map +0 -1
- package/dist/server/canonicalize.d.ts +0 -8
- package/dist/server/canonicalize.d.ts.map +0 -1
- package/dist/server/canonicalize.js +0 -23
- package/dist/server/canonicalize.js.map +0 -1
- package/dist/server/host/modules/screenshot.d.ts +0 -4
- package/dist/server/host/modules/screenshot.d.ts.map +0 -1
- package/dist/server/host/modules/screenshot.js +0 -615
- package/dist/server/host/modules/screenshot.js.map +0 -1
- package/dist/server/host/tools/connectionStatus.d.ts +0 -9
- package/dist/server/host/tools/connectionStatus.d.ts.map +0 -1
- package/dist/server/host/tools/connectionStatus.js +0 -39
- package/dist/server/host/tools/connectionStatus.js.map +0 -1
- package/dist/server/host/tools/symbolicate.d.ts +0 -3
- package/dist/server/host/tools/symbolicate.d.ts.map +0 -1
- package/dist/server/host/tools/symbolicate.js +0 -209
- package/dist/server/host/tools/symbolicate.js.map +0 -1
- package/dist/server/host/wda.d.ts +0 -15
- package/dist/server/host/wda.d.ts.map +0 -1
- package/dist/server/host/wda.js +0 -100
- package/dist/server/host/wda.js.map +0 -1
- package/dist/server/inputSchemaToZod.d.ts +0 -19
- package/dist/server/inputSchemaToZod.d.ts.map +0 -1
- package/dist/server/inputSchemaToZod.js +0 -89
- package/dist/server/inputSchemaToZod.js.map +0 -1
- package/dist/server/metro/tools/openUrl.d.ts +0 -3
- package/dist/server/metro/tools/openUrl.d.ts.map +0 -1
- package/dist/server/metro/tools/openUrl.js +0 -71
- package/dist/server/metro/tools/openUrl.js.map +0 -1
- package/dist/shared/slice.d.ts +0 -16
- package/dist/shared/slice.d.ts.map +0 -1
- package/dist/shared/slice.js +0 -29
- package/dist/shared/slice.js.map +0 -1
|
@@ -1,615 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hostModule = void 0;
|
|
4
|
-
const node_crypto_1 = require("node:crypto");
|
|
5
|
-
const promises_1 = require("node:fs/promises");
|
|
6
|
-
const node_os_1 = require("node:os");
|
|
7
|
-
const node_path_1 = require("node:path");
|
|
8
|
-
const deviceResolver_1 = require("../../../server/host/deviceResolver");
|
|
9
|
-
const processRunner_1 = require("../../../server/host/processRunner");
|
|
10
|
-
const SCREENSHOT_TIMEOUT_MS = 15_000;
|
|
11
|
-
const LAUNCH_TIMEOUT_MS = 15_000;
|
|
12
|
-
const INPUT_TIMEOUT_MS = 5_000;
|
|
13
|
-
const SWIPE_DURATION_DEFAULT_MS = 300;
|
|
14
|
-
const SWIPE_DURATION_MIN_MS = 50;
|
|
15
|
-
const SWIPE_DURATION_MAX_MS = 5_000;
|
|
16
|
-
const ANDROID_KEYCODES = {
|
|
17
|
-
back: 'KEYCODE_BACK',
|
|
18
|
-
backspace: 'KEYCODE_DEL',
|
|
19
|
-
enter: 'KEYCODE_ENTER',
|
|
20
|
-
escape: 'KEYCODE_ESCAPE',
|
|
21
|
-
home: 'KEYCODE_HOME',
|
|
22
|
-
menu: 'KEYCODE_MENU',
|
|
23
|
-
power: 'KEYCODE_POWER',
|
|
24
|
-
space: 'KEYCODE_SPACE',
|
|
25
|
-
tab: 'KEYCODE_TAB',
|
|
26
|
-
volume_down: 'KEYCODE_VOLUME_DOWN',
|
|
27
|
-
volume_up: 'KEYCODE_VOLUME_UP',
|
|
28
|
-
};
|
|
29
|
-
const KEY_NAMES = Object.keys(ANDROID_KEYCODES).sort();
|
|
30
|
-
const captureIos = async (udid, runner) => {
|
|
31
|
-
const tmpPath = (0, node_path_1.join)((0, node_os_1.tmpdir)(), `rnmcp-ios-${(0, node_crypto_1.randomUUID)()}.png`);
|
|
32
|
-
try {
|
|
33
|
-
const proc = await runner('xcrun', ['simctl', 'io', udid, 'screenshot', tmpPath], {
|
|
34
|
-
timeoutMs: SCREENSHOT_TIMEOUT_MS,
|
|
35
|
-
});
|
|
36
|
-
if (proc.timedOut) {
|
|
37
|
-
return { error: `iOS screenshot timed out after ${SCREENSHOT_TIMEOUT_MS}ms` };
|
|
38
|
-
}
|
|
39
|
-
if (proc.exitCode !== 0) {
|
|
40
|
-
return {
|
|
41
|
-
error: `xcrun simctl io screenshot failed (exit ${proc.exitCode}): ${proc.stderr.toString('utf8').trim().slice(0, 500)}`,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
const buffer = await (0, promises_1.readFile)(tmpPath);
|
|
45
|
-
return [
|
|
46
|
-
{
|
|
47
|
-
data: buffer.toString('base64'),
|
|
48
|
-
mimeType: 'image/png',
|
|
49
|
-
type: 'image',
|
|
50
|
-
},
|
|
51
|
-
];
|
|
52
|
-
}
|
|
53
|
-
catch (err) {
|
|
54
|
-
if (err instanceof processRunner_1.ProcessNotFoundError) {
|
|
55
|
-
return {
|
|
56
|
-
error: 'xcrun not found. iOS screenshots require Xcode command line tools.',
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
return { error: `Failed to capture iOS screenshot: ${err.message}` };
|
|
60
|
-
}
|
|
61
|
-
finally {
|
|
62
|
-
(0, promises_1.rm)(tmpPath, { force: true }).catch(() => {
|
|
63
|
-
// best-effort cleanup
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
const captureAndroid = async (serial, runner) => {
|
|
68
|
-
try {
|
|
69
|
-
const proc = await runner('adb', ['-s', serial, 'exec-out', 'screencap', '-p'], {
|
|
70
|
-
timeoutMs: SCREENSHOT_TIMEOUT_MS,
|
|
71
|
-
});
|
|
72
|
-
if (proc.timedOut) {
|
|
73
|
-
return { error: `Android screenshot timed out after ${SCREENSHOT_TIMEOUT_MS}ms` };
|
|
74
|
-
}
|
|
75
|
-
if (proc.exitCode !== 0) {
|
|
76
|
-
return {
|
|
77
|
-
error: `adb screencap failed (exit ${proc.exitCode}): ${proc.stderr.toString('utf8').trim().slice(0, 500)}`,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
if (proc.stdout.length === 0) {
|
|
81
|
-
return { error: 'adb screencap returned empty output' };
|
|
82
|
-
}
|
|
83
|
-
return [
|
|
84
|
-
{
|
|
85
|
-
data: proc.stdout.toString('base64'),
|
|
86
|
-
mimeType: 'image/png',
|
|
87
|
-
type: 'image',
|
|
88
|
-
},
|
|
89
|
-
];
|
|
90
|
-
}
|
|
91
|
-
catch (err) {
|
|
92
|
-
if (err instanceof processRunner_1.ProcessNotFoundError) {
|
|
93
|
-
return {
|
|
94
|
-
error: 'adb not found. Android screenshots require Android platform-tools on PATH.',
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
return {
|
|
98
|
-
error: `Failed to capture Android screenshot: ${err.message}`,
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const launchIos = async (udid, bundleId, runner) => {
|
|
103
|
-
try {
|
|
104
|
-
const proc = await runner('xcrun', ['simctl', 'launch', udid, bundleId], {
|
|
105
|
-
timeoutMs: LAUNCH_TIMEOUT_MS,
|
|
106
|
-
});
|
|
107
|
-
if (proc.timedOut) {
|
|
108
|
-
return { error: `iOS launch timed out after ${LAUNCH_TIMEOUT_MS}ms` };
|
|
109
|
-
}
|
|
110
|
-
if (proc.exitCode !== 0) {
|
|
111
|
-
return {
|
|
112
|
-
error: `xcrun simctl launch failed (exit ${proc.exitCode}): ${proc.stderr.toString('utf8').trim().slice(0, 500)}`,
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
return { ok: true };
|
|
116
|
-
}
|
|
117
|
-
catch (err) {
|
|
118
|
-
if (err instanceof processRunner_1.ProcessNotFoundError) {
|
|
119
|
-
return {
|
|
120
|
-
error: 'xcrun not found. iOS launch requires Xcode command line tools.',
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
return { error: `Failed to launch iOS app: ${err.message}` };
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
const launchAndroid = async (serial, packageName, runner) => {
|
|
127
|
-
try {
|
|
128
|
-
const proc = await runner('adb', [
|
|
129
|
-
'-s',
|
|
130
|
-
serial,
|
|
131
|
-
'shell',
|
|
132
|
-
'monkey',
|
|
133
|
-
'-p',
|
|
134
|
-
packageName,
|
|
135
|
-
'-c',
|
|
136
|
-
'android.intent.category.LAUNCHER',
|
|
137
|
-
'1',
|
|
138
|
-
], { timeoutMs: LAUNCH_TIMEOUT_MS });
|
|
139
|
-
if (proc.timedOut) {
|
|
140
|
-
return { error: `Android launch timed out after ${LAUNCH_TIMEOUT_MS}ms` };
|
|
141
|
-
}
|
|
142
|
-
if (proc.exitCode !== 0) {
|
|
143
|
-
return {
|
|
144
|
-
error: `adb shell monkey failed (exit ${proc.exitCode}): ${proc.stderr.toString('utf8').trim().slice(0, 500)}`,
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
// monkey reports "No activities found to run, monkey aborted." to stdout on missing packages
|
|
148
|
-
const stdoutText = proc.stdout.toString('utf8');
|
|
149
|
-
if (stdoutText.includes('No activities found')) {
|
|
150
|
-
return {
|
|
151
|
-
error: `adb shell monkey: no launcher activity found for package '${packageName}'. Is the app installed?`,
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
return { ok: true };
|
|
155
|
-
}
|
|
156
|
-
catch (err) {
|
|
157
|
-
if (err instanceof processRunner_1.ProcessNotFoundError) {
|
|
158
|
-
return {
|
|
159
|
-
error: 'adb not found. Android launch requires Android platform-tools on PATH.',
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
return { error: `Failed to launch Android app: ${err.message}` };
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
const terminateIos = async (udid, bundleId, runner) => {
|
|
166
|
-
try {
|
|
167
|
-
const proc = await runner('xcrun', ['simctl', 'terminate', udid, bundleId], {
|
|
168
|
-
timeoutMs: LAUNCH_TIMEOUT_MS,
|
|
169
|
-
});
|
|
170
|
-
if (proc.timedOut) {
|
|
171
|
-
return { error: `iOS terminate timed out after ${LAUNCH_TIMEOUT_MS}ms` };
|
|
172
|
-
}
|
|
173
|
-
if (proc.exitCode !== 0) {
|
|
174
|
-
return {
|
|
175
|
-
error: `xcrun simctl terminate failed (exit ${proc.exitCode}): ${proc.stderr.toString('utf8').trim().slice(0, 500)}`,
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
return { ok: true };
|
|
179
|
-
}
|
|
180
|
-
catch (err) {
|
|
181
|
-
if (err instanceof processRunner_1.ProcessNotFoundError) {
|
|
182
|
-
return {
|
|
183
|
-
error: 'xcrun not found. iOS terminate requires Xcode command line tools.',
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
return { error: `Failed to terminate iOS app: ${err.message}` };
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
const terminateAndroid = async (serial, packageName, runner) => {
|
|
190
|
-
try {
|
|
191
|
-
const proc = await runner('adb', ['-s', serial, 'shell', 'am', 'force-stop', packageName], {
|
|
192
|
-
timeoutMs: LAUNCH_TIMEOUT_MS,
|
|
193
|
-
});
|
|
194
|
-
if (proc.timedOut) {
|
|
195
|
-
return { error: `Android terminate timed out after ${LAUNCH_TIMEOUT_MS}ms` };
|
|
196
|
-
}
|
|
197
|
-
// am force-stop returns exit 0 even for non-existent packages (known quirk),
|
|
198
|
-
// but we still surface any unexpected non-zero exit as an error.
|
|
199
|
-
if (proc.exitCode !== 0) {
|
|
200
|
-
return {
|
|
201
|
-
error: `adb shell am force-stop failed (exit ${proc.exitCode}): ${proc.stderr.toString('utf8').trim().slice(0, 500)}`,
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
return { ok: true };
|
|
205
|
-
}
|
|
206
|
-
catch (err) {
|
|
207
|
-
if (err instanceof processRunner_1.ProcessNotFoundError) {
|
|
208
|
-
return {
|
|
209
|
-
error: 'adb not found. Android terminate requires Android platform-tools on PATH.',
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
return { error: `Failed to terminate Android app: ${err.message}` };
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
const parsePlatformArg = (value) => {
|
|
216
|
-
return value === 'ios' || value === 'android' ? value : undefined;
|
|
217
|
-
};
|
|
218
|
-
const parseStringArg = (value) => {
|
|
219
|
-
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
220
|
-
};
|
|
221
|
-
const parseResolveOptions = (args) => {
|
|
222
|
-
return {
|
|
223
|
-
platform: parsePlatformArg(args.platform),
|
|
224
|
-
serial: parseStringArg(args.serial),
|
|
225
|
-
udid: parseStringArg(args.udid),
|
|
226
|
-
};
|
|
227
|
-
};
|
|
228
|
-
const resolveLaunchTarget = async (ctx, args, runner) => {
|
|
229
|
-
const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, parseResolveOptions(args), runner);
|
|
230
|
-
if (!resolved.ok) {
|
|
231
|
-
return { error: resolved.error, ok: false };
|
|
232
|
-
}
|
|
233
|
-
const explicitAppId = parseStringArg(args.appId);
|
|
234
|
-
const bundleId = explicitAppId ?? resolved.device.bundleId;
|
|
235
|
-
if (!bundleId) {
|
|
236
|
-
return {
|
|
237
|
-
error: "appId required. Pass it explicitly (e.g. 'by.21vek.mobile') or target a clientId whose client registered its bundleId metadata.",
|
|
238
|
-
ok: false,
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
return { bundleId, device: resolved.device, ok: true };
|
|
242
|
-
};
|
|
243
|
-
const NATIVE_ID_SCHEMA = {
|
|
244
|
-
serial: {
|
|
245
|
-
description: 'Optional explicit adb serial of the target Android device (e.g. "emulator-5554"). Highest priority — bypasses clientId and platform-based device selection. Use values from host__list_devices output.',
|
|
246
|
-
type: 'string',
|
|
247
|
-
},
|
|
248
|
-
udid: {
|
|
249
|
-
description: 'Optional explicit simctl UDID of the target iOS simulator. Highest priority — bypasses clientId and platform-based device selection. Use values from host__list_devices output.',
|
|
250
|
-
type: 'string',
|
|
251
|
-
},
|
|
252
|
-
};
|
|
253
|
-
const escapeAdbInputText = (text) => {
|
|
254
|
-
const spaced = text.replace(/\s/g, '%s');
|
|
255
|
-
return spaced.replace(/([\\'"`$&|;<>()[\]{}*?!#~])/g, '\\$1');
|
|
256
|
-
};
|
|
257
|
-
const clampSwipeDuration = (value) => {
|
|
258
|
-
if (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) {
|
|
259
|
-
return SWIPE_DURATION_DEFAULT_MS;
|
|
260
|
-
}
|
|
261
|
-
return Math.max(SWIPE_DURATION_MIN_MS, Math.min(SWIPE_DURATION_MAX_MS, Math.floor(value)));
|
|
262
|
-
};
|
|
263
|
-
const parseCoord = (value, name) => {
|
|
264
|
-
if (typeof value !== 'number' || !Number.isFinite(value) || value < 0) {
|
|
265
|
-
return { error: `'${name}' must be a non-negative finite number`, ok: false };
|
|
266
|
-
}
|
|
267
|
-
return { ok: true, value: Math.floor(value) };
|
|
268
|
-
};
|
|
269
|
-
const runAdbInput = async (serial, args, runner, action) => {
|
|
270
|
-
try {
|
|
271
|
-
const proc = await runner('adb', ['-s', serial, 'shell', 'input', ...args], {
|
|
272
|
-
timeoutMs: INPUT_TIMEOUT_MS,
|
|
273
|
-
});
|
|
274
|
-
if (proc.timedOut) {
|
|
275
|
-
return { error: `Android ${action} timed out after ${INPUT_TIMEOUT_MS}ms` };
|
|
276
|
-
}
|
|
277
|
-
if (proc.exitCode !== 0) {
|
|
278
|
-
return {
|
|
279
|
-
error: `adb shell input ${action} failed (exit ${proc.exitCode}): ${proc.stderr.toString('utf8').trim().slice(0, 500)}`,
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
return { ok: true };
|
|
283
|
-
}
|
|
284
|
-
catch (err) {
|
|
285
|
-
if (err instanceof processRunner_1.ProcessNotFoundError) {
|
|
286
|
-
return {
|
|
287
|
-
error: 'adb not found. Android host tools require Android platform-tools on PATH.',
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
return { error: `Failed to run Android ${action}: ${err.message}` };
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
const tapAndroid = (serial, x, y, runner) => {
|
|
294
|
-
return runAdbInput(serial, ['tap', String(x), String(y)], runner, 'tap');
|
|
295
|
-
};
|
|
296
|
-
const swipeAndroid = (serial, x1, y1, x2, y2, durationMs, runner) => {
|
|
297
|
-
return runAdbInput(serial, ['swipe', String(x1), String(y1), String(x2), String(y2), String(durationMs)], runner, 'swipe');
|
|
298
|
-
};
|
|
299
|
-
const typeTextAndroid = async (serial, text, submit, runner) => {
|
|
300
|
-
const escaped = escapeAdbInputText(text);
|
|
301
|
-
const typed = await runAdbInput(serial, ['text', escaped], runner, 'text');
|
|
302
|
-
if ('error' in typed) {
|
|
303
|
-
return typed;
|
|
304
|
-
}
|
|
305
|
-
if (submit) {
|
|
306
|
-
return runAdbInput(serial, ['keyevent', 'KEYCODE_ENTER'], runner, 'submit');
|
|
307
|
-
}
|
|
308
|
-
return typed;
|
|
309
|
-
};
|
|
310
|
-
const pressKeyAndroid = (serial, key, runner) => {
|
|
311
|
-
const keycode = ANDROID_KEYCODES[key];
|
|
312
|
-
if (!keycode) {
|
|
313
|
-
return Promise.resolve({
|
|
314
|
-
error: `Unknown key '${key}'. Supported: ${KEY_NAMES.join(', ')}.`,
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
return runAdbInput(serial, ['keyevent', keycode], runner, 'keyevent');
|
|
318
|
-
};
|
|
319
|
-
const iosInputNotSupported = (toolName) => {
|
|
320
|
-
return {
|
|
321
|
-
error: `${toolName} on iOS requires WebDriverAgent integration (planned follow-up commit). Use an Android target for now, or use fiber_tree__invoke on the connected client for in-app interactions.`,
|
|
322
|
-
};
|
|
323
|
-
};
|
|
324
|
-
const hostModule = (runner) => {
|
|
325
|
-
return {
|
|
326
|
-
description: 'OS-level operations that run on the MCP server host via xcrun simctl / adb. Works when the React Native app is hung, disconnected, or not installed.',
|
|
327
|
-
name: 'host',
|
|
328
|
-
tools: {
|
|
329
|
-
launch_app: {
|
|
330
|
-
description: "Launch an installed app on a booted iOS simulator (xcrun simctl launch) or Android emulator/device (adb shell monkey). Pass `appId` explicitly (iOS bundle ID or Android package name), or omit it to fall back to the target client's registered bundleId metadata. Target device resolution: explicit `udid`/`serial` > outer `clientId` > `platform` + auto-pick > bare scan. Real iOS devices are not supported.",
|
|
331
|
-
handler: async (args, ctx) => {
|
|
332
|
-
const target = await resolveLaunchTarget(ctx, args, runner);
|
|
333
|
-
if (!target.ok) {
|
|
334
|
-
return { error: target.error };
|
|
335
|
-
}
|
|
336
|
-
const result = target.device.platform === 'ios'
|
|
337
|
-
? await launchIos(target.device.nativeId, target.bundleId, runner)
|
|
338
|
-
: await launchAndroid(target.device.nativeId, target.bundleId, runner);
|
|
339
|
-
if ('error' in result) {
|
|
340
|
-
return { error: result.error };
|
|
341
|
-
}
|
|
342
|
-
const success = {
|
|
343
|
-
bundleId: target.bundleId,
|
|
344
|
-
device: target.device,
|
|
345
|
-
launched: true,
|
|
346
|
-
};
|
|
347
|
-
return success;
|
|
348
|
-
},
|
|
349
|
-
inputSchema: {
|
|
350
|
-
appId: {
|
|
351
|
-
description: 'iOS bundle ID or Android package name. Optional when targeting a connected client whose registration metadata includes bundleId.',
|
|
352
|
-
type: 'string',
|
|
353
|
-
},
|
|
354
|
-
platform: {
|
|
355
|
-
description: 'Optional platform filter: "ios" or "android". Ignored when clientId is provided on the outer call tool (the client\'s own platform is used instead).',
|
|
356
|
-
enum: ['android', 'ios'],
|
|
357
|
-
type: 'string',
|
|
358
|
-
},
|
|
359
|
-
...NATIVE_ID_SCHEMA,
|
|
360
|
-
},
|
|
361
|
-
timeout: LAUNCH_TIMEOUT_MS,
|
|
362
|
-
},
|
|
363
|
-
list_devices: {
|
|
364
|
-
description: 'List all iOS simulators (booted or not) and Android devices (online or offline) visible via xcrun simctl / adb. Each device is annotated with connected=true and a clientId when it matches a currently-connected React Native client. Connected devices appear first in each platform group.',
|
|
365
|
-
handler: async (_args, ctx) => {
|
|
366
|
-
return (0, deviceResolver_1.enrichDevicesWithClientStatus)(ctx.bridge, runner);
|
|
367
|
-
},
|
|
368
|
-
inputSchema: {},
|
|
369
|
-
timeout: SCREENSHOT_TIMEOUT_MS,
|
|
370
|
-
},
|
|
371
|
-
press_key: {
|
|
372
|
-
description: `Press a hardware/semantic key on the target device via adb shell input keyevent. Accepted key names: ${KEY_NAMES.join(', ')}. iOS support is a planned follow-up via WebDriverAgent. Target device resolution: explicit udid/serial > outer clientId > platform + auto-pick > bare scan.`,
|
|
373
|
-
handler: async (args, ctx) => {
|
|
374
|
-
const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, parseResolveOptions(args), runner);
|
|
375
|
-
if (!resolved.ok) {
|
|
376
|
-
return { error: resolved.error };
|
|
377
|
-
}
|
|
378
|
-
if (resolved.device.platform === 'ios') {
|
|
379
|
-
return iosInputNotSupported('host__press_key');
|
|
380
|
-
}
|
|
381
|
-
const key = parseStringArg(args.key);
|
|
382
|
-
if (!key) {
|
|
383
|
-
return { error: `'key' is required. Supported: ${KEY_NAMES.join(', ')}.` };
|
|
384
|
-
}
|
|
385
|
-
const result = await pressKeyAndroid(resolved.device.nativeId, key, runner);
|
|
386
|
-
if ('error' in result) {
|
|
387
|
-
return { error: result.error };
|
|
388
|
-
}
|
|
389
|
-
return { device: resolved.device, key, pressed: true };
|
|
390
|
-
},
|
|
391
|
-
inputSchema: {
|
|
392
|
-
key: {
|
|
393
|
-
description: `Semantic key name. Mapped to the target platform's native key code internally. Supported: ${KEY_NAMES.join(', ')}.`,
|
|
394
|
-
enum: KEY_NAMES,
|
|
395
|
-
type: 'string',
|
|
396
|
-
},
|
|
397
|
-
platform: {
|
|
398
|
-
description: 'Optional platform filter: "ios" or "android". Ignored when clientId is provided on the outer call tool (the client\'s own platform is used instead).',
|
|
399
|
-
enum: ['android', 'ios'],
|
|
400
|
-
type: 'string',
|
|
401
|
-
},
|
|
402
|
-
...NATIVE_ID_SCHEMA,
|
|
403
|
-
},
|
|
404
|
-
timeout: INPUT_TIMEOUT_MS,
|
|
405
|
-
},
|
|
406
|
-
screenshot: {
|
|
407
|
-
description: 'Capture a raw PNG screenshot from an iOS simulator (xcrun simctl io) or Android device (adb exec-out screencap). Target device resolution: explicit `udid`/`serial` > outer `clientId` > `platform` + auto-pick > bare scan.',
|
|
408
|
-
handler: async (args, ctx) => {
|
|
409
|
-
const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, parseResolveOptions(args), runner);
|
|
410
|
-
if (!resolved.ok) {
|
|
411
|
-
return { error: resolved.error };
|
|
412
|
-
}
|
|
413
|
-
if (resolved.device.platform === 'ios') {
|
|
414
|
-
return captureIos(resolved.device.nativeId, runner);
|
|
415
|
-
}
|
|
416
|
-
return captureAndroid(resolved.device.nativeId, runner);
|
|
417
|
-
},
|
|
418
|
-
inputSchema: {
|
|
419
|
-
platform: {
|
|
420
|
-
description: 'Optional platform filter: "ios" or "android". Ignored when clientId is provided on the outer call tool (the client\'s own platform is used instead).',
|
|
421
|
-
enum: ['android', 'ios'],
|
|
422
|
-
type: 'string',
|
|
423
|
-
},
|
|
424
|
-
...NATIVE_ID_SCHEMA,
|
|
425
|
-
},
|
|
426
|
-
timeout: SCREENSHOT_TIMEOUT_MS,
|
|
427
|
-
},
|
|
428
|
-
swipe: {
|
|
429
|
-
description: 'Swipe (or scroll) from (x1, y1) to (x2, y2) on the target device via adb shell input swipe. Coordinates are absolute pixels, top-left origin. durationMs defaults to 300 and is clamped to 50..5000. iOS support is a planned follow-up via WebDriverAgent.',
|
|
430
|
-
handler: async (args, ctx) => {
|
|
431
|
-
const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, parseResolveOptions(args), runner);
|
|
432
|
-
if (!resolved.ok) {
|
|
433
|
-
return { error: resolved.error };
|
|
434
|
-
}
|
|
435
|
-
if (resolved.device.platform === 'ios') {
|
|
436
|
-
return iosInputNotSupported('host__swipe');
|
|
437
|
-
}
|
|
438
|
-
const x1 = parseCoord(args.x1, 'x1');
|
|
439
|
-
if (!x1.ok)
|
|
440
|
-
return { error: x1.error };
|
|
441
|
-
const y1 = parseCoord(args.y1, 'y1');
|
|
442
|
-
if (!y1.ok)
|
|
443
|
-
return { error: y1.error };
|
|
444
|
-
const x2 = parseCoord(args.x2, 'x2');
|
|
445
|
-
if (!x2.ok)
|
|
446
|
-
return { error: x2.error };
|
|
447
|
-
const y2 = parseCoord(args.y2, 'y2');
|
|
448
|
-
if (!y2.ok)
|
|
449
|
-
return { error: y2.error };
|
|
450
|
-
const durationMs = clampSwipeDuration(args.durationMs);
|
|
451
|
-
const result = await swipeAndroid(resolved.device.nativeId, x1.value, y1.value, x2.value, y2.value, durationMs, runner);
|
|
452
|
-
if ('error' in result) {
|
|
453
|
-
return { error: result.error };
|
|
454
|
-
}
|
|
455
|
-
return {
|
|
456
|
-
device: resolved.device,
|
|
457
|
-
durationMs,
|
|
458
|
-
from: { x: x1.value, y: y1.value },
|
|
459
|
-
swiped: true,
|
|
460
|
-
to: { x: x2.value, y: y2.value },
|
|
461
|
-
};
|
|
462
|
-
},
|
|
463
|
-
inputSchema: {
|
|
464
|
-
durationMs: {
|
|
465
|
-
description: `Total swipe duration in milliseconds. Default ${SWIPE_DURATION_DEFAULT_MS}. Clamped to ${SWIPE_DURATION_MIN_MS}..${SWIPE_DURATION_MAX_MS}.`,
|
|
466
|
-
type: 'number',
|
|
467
|
-
},
|
|
468
|
-
platform: {
|
|
469
|
-
description: 'Optional platform filter: "ios" or "android". Ignored when clientId is provided on the outer call tool.',
|
|
470
|
-
enum: ['android', 'ios'],
|
|
471
|
-
type: 'string',
|
|
472
|
-
},
|
|
473
|
-
x1: {
|
|
474
|
-
description: 'Start x pixel coordinate (top-left origin).',
|
|
475
|
-
type: 'number',
|
|
476
|
-
},
|
|
477
|
-
x2: {
|
|
478
|
-
description: 'End x pixel coordinate (top-left origin).',
|
|
479
|
-
type: 'number',
|
|
480
|
-
},
|
|
481
|
-
y1: {
|
|
482
|
-
description: 'Start y pixel coordinate (top-left origin).',
|
|
483
|
-
type: 'number',
|
|
484
|
-
},
|
|
485
|
-
y2: {
|
|
486
|
-
description: 'End y pixel coordinate (top-left origin).',
|
|
487
|
-
type: 'number',
|
|
488
|
-
},
|
|
489
|
-
...NATIVE_ID_SCHEMA,
|
|
490
|
-
},
|
|
491
|
-
timeout: INPUT_TIMEOUT_MS + SWIPE_DURATION_MAX_MS,
|
|
492
|
-
},
|
|
493
|
-
tap: {
|
|
494
|
-
description: 'Tap at absolute pixel coordinates (x, y) on the target device via adb shell input tap. Top-left origin. iOS support is a planned follow-up via WebDriverAgent — for in-app interactions use fiber_tree__invoke instead.',
|
|
495
|
-
handler: async (args, ctx) => {
|
|
496
|
-
const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, parseResolveOptions(args), runner);
|
|
497
|
-
if (!resolved.ok) {
|
|
498
|
-
return { error: resolved.error };
|
|
499
|
-
}
|
|
500
|
-
if (resolved.device.platform === 'ios') {
|
|
501
|
-
return iosInputNotSupported('host__tap');
|
|
502
|
-
}
|
|
503
|
-
const x = parseCoord(args.x, 'x');
|
|
504
|
-
if (!x.ok)
|
|
505
|
-
return { error: x.error };
|
|
506
|
-
const y = parseCoord(args.y, 'y');
|
|
507
|
-
if (!y.ok)
|
|
508
|
-
return { error: y.error };
|
|
509
|
-
const result = await tapAndroid(resolved.device.nativeId, x.value, y.value, runner);
|
|
510
|
-
if ('error' in result) {
|
|
511
|
-
return { error: result.error };
|
|
512
|
-
}
|
|
513
|
-
return { device: resolved.device, tapped: true, x: x.value, y: y.value };
|
|
514
|
-
},
|
|
515
|
-
inputSchema: {
|
|
516
|
-
platform: {
|
|
517
|
-
description: 'Optional platform filter: "ios" or "android". Ignored when clientId is provided on the outer call tool.',
|
|
518
|
-
enum: ['android', 'ios'],
|
|
519
|
-
type: 'string',
|
|
520
|
-
},
|
|
521
|
-
x: {
|
|
522
|
-
description: 'Absolute x pixel coordinate (top-left origin).',
|
|
523
|
-
type: 'number',
|
|
524
|
-
},
|
|
525
|
-
y: {
|
|
526
|
-
description: 'Absolute y pixel coordinate (top-left origin).',
|
|
527
|
-
type: 'number',
|
|
528
|
-
},
|
|
529
|
-
...NATIVE_ID_SCHEMA,
|
|
530
|
-
},
|
|
531
|
-
timeout: INPUT_TIMEOUT_MS,
|
|
532
|
-
},
|
|
533
|
-
terminate_app: {
|
|
534
|
-
description: "Terminate (force-stop) an installed app on a booted iOS simulator (xcrun simctl terminate) or Android emulator/device (adb shell am force-stop). Pass `appId` explicitly or omit it to fall back to the target client's registered bundleId metadata. Target device resolution: explicit `udid`/`serial` > outer `clientId` > `platform` + auto-pick > bare scan. Real iOS devices are not supported.",
|
|
535
|
-
handler: async (args, ctx) => {
|
|
536
|
-
const target = await resolveLaunchTarget(ctx, args, runner);
|
|
537
|
-
if (!target.ok) {
|
|
538
|
-
return { error: target.error };
|
|
539
|
-
}
|
|
540
|
-
const result = target.device.platform === 'ios'
|
|
541
|
-
? await terminateIos(target.device.nativeId, target.bundleId, runner)
|
|
542
|
-
: await terminateAndroid(target.device.nativeId, target.bundleId, runner);
|
|
543
|
-
if ('error' in result) {
|
|
544
|
-
return { error: result.error };
|
|
545
|
-
}
|
|
546
|
-
const success = {
|
|
547
|
-
bundleId: target.bundleId,
|
|
548
|
-
device: target.device,
|
|
549
|
-
terminated: true,
|
|
550
|
-
};
|
|
551
|
-
return success;
|
|
552
|
-
},
|
|
553
|
-
inputSchema: {
|
|
554
|
-
appId: {
|
|
555
|
-
description: 'iOS bundle ID or Android package name. Optional when targeting a connected client whose registration metadata includes bundleId.',
|
|
556
|
-
type: 'string',
|
|
557
|
-
},
|
|
558
|
-
platform: {
|
|
559
|
-
description: 'Optional platform filter: "ios" or "android". Ignored when clientId is provided on the outer call tool (the client\'s own platform is used instead).',
|
|
560
|
-
enum: ['android', 'ios'],
|
|
561
|
-
type: 'string',
|
|
562
|
-
},
|
|
563
|
-
...NATIVE_ID_SCHEMA,
|
|
564
|
-
},
|
|
565
|
-
timeout: LAUNCH_TIMEOUT_MS,
|
|
566
|
-
},
|
|
567
|
-
type_text: {
|
|
568
|
-
description: 'Type text into the currently focused input field on the target device via adb shell input text. Escapes whitespace and shell metacharacters automatically. Pass submit=true to press ENTER after typing (e.g. to submit a search). iOS support is a planned follow-up via WebDriverAgent.',
|
|
569
|
-
handler: async (args, ctx) => {
|
|
570
|
-
const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, parseResolveOptions(args), runner);
|
|
571
|
-
if (!resolved.ok) {
|
|
572
|
-
return { error: resolved.error };
|
|
573
|
-
}
|
|
574
|
-
if (resolved.device.platform === 'ios') {
|
|
575
|
-
return iosInputNotSupported('host__type_text');
|
|
576
|
-
}
|
|
577
|
-
const text = typeof args.text === 'string' ? args.text : undefined;
|
|
578
|
-
if (text === undefined) {
|
|
579
|
-
return { error: "'text' is required and must be a string" };
|
|
580
|
-
}
|
|
581
|
-
const submit = args.submit === true;
|
|
582
|
-
const result = await typeTextAndroid(resolved.device.nativeId, text, submit, runner);
|
|
583
|
-
if ('error' in result) {
|
|
584
|
-
return { error: result.error };
|
|
585
|
-
}
|
|
586
|
-
return {
|
|
587
|
-
device: resolved.device,
|
|
588
|
-
length: text.length,
|
|
589
|
-
submitted: submit,
|
|
590
|
-
typed: true,
|
|
591
|
-
};
|
|
592
|
-
},
|
|
593
|
-
inputSchema: {
|
|
594
|
-
platform: {
|
|
595
|
-
description: 'Optional platform filter: "ios" or "android". Ignored when clientId is provided on the outer call tool.',
|
|
596
|
-
enum: ['android', 'ios'],
|
|
597
|
-
type: 'string',
|
|
598
|
-
},
|
|
599
|
-
submit: {
|
|
600
|
-
description: 'Press ENTER after typing (e.g. to submit a search). Default false.',
|
|
601
|
-
type: 'boolean',
|
|
602
|
-
},
|
|
603
|
-
text: {
|
|
604
|
-
description: 'Text to type into the currently focused input field. Whitespace and shell metacharacters are escaped automatically.',
|
|
605
|
-
type: 'string',
|
|
606
|
-
},
|
|
607
|
-
...NATIVE_ID_SCHEMA,
|
|
608
|
-
},
|
|
609
|
-
timeout: INPUT_TIMEOUT_MS,
|
|
610
|
-
},
|
|
611
|
-
},
|
|
612
|
-
};
|
|
613
|
-
};
|
|
614
|
-
exports.hostModule = hostModule;
|
|
615
|
-
//# sourceMappingURL=screenshot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"screenshot.js","sourceRoot":"","sources":["../../../../src/server/host/modules/screenshot.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,+CAAgD;AAChD,qCAAiC;AACjC,yCAAiC;AAEjC,iEAIsC;AACtC,+DAAuF;AAGvF,MAAM,qBAAqB,GAAG,MAAM,CAAC;AACrC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACjC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,yBAAyB,GAAG,GAAG,CAAC;AACtC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAEpC,MAAM,gBAAgB,GAA2B;IAC/C,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,aAAa;IACxB,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;IACxB,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,eAAe;IACtB,GAAG,EAAE,aAAa;IAClB,WAAW,EAAE,qBAAqB;IAClC,SAAS,EAAE,mBAAmB;CAC/B,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC;AAoCvD,MAAM,UAAU,GAAG,KAAK,EACtB,IAAY,EACZ,MAAqB,EACyB,EAAE;IAChD,MAAM,OAAO,G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W,EAAE;oBACX,QAAQ,EAAE;wBACR,WAAW,EACT,yGAAyG;wBAC3G,IAAI,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;wBACxB,IAAI,EAAE,QAAQ;qBACf;oBACD,MAAM,EAAE;wBACN,WAAW,EAAE,oEAAoE;wBACjF,IAAI,EAAE,SAAS;qBAChB;oBACD,IAAI,EAAE;wBACJ,WAAW,EACT,qHAAqH;wBACvH,IAAI,EAAE,QAAQ;qBACf;oBACD,GAAG,gBAAgB;iBACpB;gBACD,OAAO,EAAE,gBAAgB;aAC1B;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAvTW,QAAA,UAAU,cAuTrB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type HostToolHandler } from '../../../server/host/types';
|
|
2
|
-
/**
|
|
3
|
-
* Reports which RN clients are currently connected to the bridge with their
|
|
4
|
-
* platform, label, app metadata, and registered module names. Replaces the
|
|
5
|
-
* legacy top-level `connection_status` meta-tool with a first-class host tool
|
|
6
|
-
* so it shows up in the MCP catalog like any other.
|
|
7
|
-
*/
|
|
8
|
-
export declare const connectionStatusTool: () => HostToolHandler;
|
|
9
|
-
//# sourceMappingURL=connectionStatus.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connectionStatus.d.ts","sourceRoot":"","sources":["../../../../src/server/host/tools/connectionStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAAO,eA4BvC,CAAC"}
|