react-native-mcp-kit 1.0.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/LICENSE +21 -0
- package/README.md +868 -0
- package/dist/babel/index.d.ts +3 -0
- package/dist/babel/index.d.ts.map +1 -0
- package/dist/babel/index.js +11 -0
- package/dist/babel/index.js.map +1 -0
- package/dist/babel/stripPlugin.d.ts +5 -0
- package/dist/babel/stripPlugin.d.ts.map +1 -0
- package/dist/babel/stripPlugin.js +100 -0
- package/dist/babel/stripPlugin.js.map +1 -0
- package/dist/babel/testIdPlugin.d.ts +5 -0
- package/dist/babel/testIdPlugin.d.ts.map +1 -0
- package/dist/babel/testIdPlugin.js +69 -0
- package/dist/babel/testIdPlugin.js.map +1 -0
- package/dist/client/contexts/McpContext/McpContext.d.ts +3 -0
- package/dist/client/contexts/McpContext/McpContext.d.ts.map +1 -0
- package/dist/client/contexts/McpContext/McpContext.js +6 -0
- package/dist/client/contexts/McpContext/McpContext.js.map +1 -0
- package/dist/client/contexts/McpContext/McpProvider.d.ts +3 -0
- package/dist/client/contexts/McpContext/McpProvider.d.ts.map +1 -0
- package/dist/client/contexts/McpContext/McpProvider.js +28 -0
- package/dist/client/contexts/McpContext/McpProvider.js.map +1 -0
- package/dist/client/contexts/McpContext/index.d.ts +4 -0
- package/dist/client/contexts/McpContext/index.d.ts.map +1 -0
- package/dist/client/contexts/McpContext/index.js +8 -0
- package/dist/client/contexts/McpContext/index.js.map +1 -0
- package/dist/client/contexts/McpContext/types.d.ts +12 -0
- package/dist/client/contexts/McpContext/types.d.ts.map +1 -0
- package/dist/client/contexts/McpContext/types.js +3 -0
- package/dist/client/contexts/McpContext/types.js.map +1 -0
- package/dist/client/contexts/McpTreeContext/McpTracker.d.ts +10 -0
- package/dist/client/contexts/McpTreeContext/McpTracker.d.ts.map +1 -0
- package/dist/client/contexts/McpTreeContext/McpTracker.js +101 -0
- package/dist/client/contexts/McpTreeContext/McpTracker.js.map +1 -0
- package/dist/client/contexts/McpTreeContext/McpTreeContext.d.ts +2 -0
- package/dist/client/contexts/McpTreeContext/McpTreeContext.d.ts.map +1 -0
- package/dist/client/contexts/McpTreeContext/McpTreeContext.js +6 -0
- package/dist/client/contexts/McpTreeContext/McpTreeContext.js.map +1 -0
- package/dist/client/contexts/McpTreeContext/McpTreeRegistry.d.ts +16 -0
- package/dist/client/contexts/McpTreeContext/McpTreeRegistry.d.ts.map +1 -0
- package/dist/client/contexts/McpTreeContext/McpTreeRegistry.js +96 -0
- package/dist/client/contexts/McpTreeContext/McpTreeRegistry.js.map +1 -0
- package/dist/client/contexts/McpTreeContext/index.d.ts +5 -0
- package/dist/client/contexts/McpTreeContext/index.d.ts.map +1 -0
- package/dist/client/contexts/McpTreeContext/index.js +10 -0
- package/dist/client/contexts/McpTreeContext/index.js.map +1 -0
- package/dist/client/contexts/McpTreeContext/types.d.ts +14 -0
- package/dist/client/contexts/McpTreeContext/types.d.ts.map +1 -0
- package/dist/client/contexts/McpTreeContext/types.js +3 -0
- package/dist/client/contexts/McpTreeContext/types.js.map +1 -0
- package/dist/client/core/McpClient.d.ts +25 -0
- package/dist/client/core/McpClient.d.ts.map +1 -0
- package/dist/client/core/McpClient.js +183 -0
- package/dist/client/core/McpClient.js.map +1 -0
- package/dist/client/hooks/useMcpModule.d.ts +4 -0
- package/dist/client/hooks/useMcpModule.d.ts.map +1 -0
- package/dist/client/hooks/useMcpModule.js +17 -0
- package/dist/client/hooks/useMcpModule.js.map +1 -0
- package/dist/client/hooks/useMcpState.d.ts +3 -0
- package/dist/client/hooks/useMcpState.d.ts.map +1 -0
- package/dist/client/hooks/useMcpState.js +20 -0
- package/dist/client/hooks/useMcpState.js.map +1 -0
- package/dist/client/hooks/useMcpTool.d.ts +4 -0
- package/dist/client/hooks/useMcpTool.d.ts.map +1 -0
- package/dist/client/hooks/useMcpTool.js +20 -0
- package/dist/client/hooks/useMcpTool.js.map +1 -0
- package/dist/client/index.d.ts +8 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +15 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/models/types.d.ts +12 -0
- package/dist/client/models/types.d.ts.map +1 -0
- package/dist/client/models/types.js +3 -0
- package/dist/client/models/types.js.map +1 -0
- package/dist/client/utils/connection.d.ts +17 -0
- package/dist/client/utils/connection.d.ts.map +1 -0
- package/dist/client/utils/connection.js +71 -0
- package/dist/client/utils/connection.js.map +1 -0
- package/dist/client/utils/moduleRunner.d.ts +13 -0
- package/dist/client/utils/moduleRunner.d.ts.map +1 -0
- package/dist/client/utils/moduleRunner.js +59 -0
- package/dist/client/utils/moduleRunner.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/alert/alert.d.ts +3 -0
- package/dist/modules/alert/alert.d.ts.map +1 -0
- package/dist/modules/alert/alert.js +50 -0
- package/dist/modules/alert/alert.js.map +1 -0
- package/dist/modules/alert/index.d.ts +2 -0
- package/dist/modules/alert/index.d.ts.map +1 -0
- package/dist/modules/alert/index.js +6 -0
- package/dist/modules/alert/index.js.map +1 -0
- package/dist/modules/components/components.d.ts +8 -0
- package/dist/modules/components/components.d.ts.map +1 -0
- package/dist/modules/components/components.js +315 -0
- package/dist/modules/components/components.js.map +1 -0
- package/dist/modules/components/index.d.ts +3 -0
- package/dist/modules/components/index.d.ts.map +1 -0
- package/dist/modules/components/index.js +6 -0
- package/dist/modules/components/index.js.map +1 -0
- package/dist/modules/components/types.d.ts +18 -0
- package/dist/modules/components/types.d.ts.map +1 -0
- package/dist/modules/components/types.js +3 -0
- package/dist/modules/components/types.js.map +1 -0
- package/dist/modules/components/utils.d.ts +18 -0
- package/dist/modules/components/utils.d.ts.map +1 -0
- package/dist/modules/components/utils.js +386 -0
- package/dist/modules/components/utils.js.map +1 -0
- package/dist/modules/console/console.d.ts +4 -0
- package/dist/modules/console/console.d.ts.map +1 -0
- package/dist/modules/console/console.js +176 -0
- package/dist/modules/console/console.js.map +1 -0
- package/dist/modules/console/index.d.ts +3 -0
- package/dist/modules/console/index.d.ts.map +1 -0
- package/dist/modules/console/index.js +6 -0
- package/dist/modules/console/index.js.map +1 -0
- package/dist/modules/console/types.d.ts +13 -0
- package/dist/modules/console/types.d.ts.map +1 -0
- package/dist/modules/console/types.js +3 -0
- package/dist/modules/console/types.js.map +1 -0
- package/dist/modules/device/device.d.ts +3 -0
- package/dist/modules/device/device.d.ts.map +1 -0
- package/dist/modules/device/device.js +182 -0
- package/dist/modules/device/device.js.map +1 -0
- package/dist/modules/device/index.d.ts +3 -0
- package/dist/modules/device/index.d.ts.map +1 -0
- package/dist/modules/device/index.js +6 -0
- package/dist/modules/device/index.js.map +1 -0
- package/dist/modules/device/types.d.ts +24 -0
- package/dist/modules/device/types.d.ts.map +1 -0
- package/dist/modules/device/types.js +3 -0
- package/dist/modules/device/types.js.map +1 -0
- package/dist/modules/errors/errors.d.ts +4 -0
- package/dist/modules/errors/errors.d.ts.map +1 -0
- package/dist/modules/errors/errors.js +133 -0
- package/dist/modules/errors/errors.js.map +1 -0
- package/dist/modules/errors/index.d.ts +3 -0
- package/dist/modules/errors/index.d.ts.map +1 -0
- package/dist/modules/errors/index.js +6 -0
- package/dist/modules/errors/index.js.map +1 -0
- package/dist/modules/errors/types.d.ts +12 -0
- package/dist/modules/errors/types.d.ts.map +1 -0
- package/dist/modules/errors/types.js +3 -0
- package/dist/modules/errors/types.js.map +1 -0
- package/dist/modules/fiberTree/fiberTree.d.ts +8 -0
- package/dist/modules/fiberTree/fiberTree.d.ts.map +1 -0
- package/dist/modules/fiberTree/fiberTree.js +337 -0
- package/dist/modules/fiberTree/fiberTree.js.map +1 -0
- package/dist/modules/fiberTree/index.d.ts +3 -0
- package/dist/modules/fiberTree/index.d.ts.map +1 -0
- package/dist/modules/fiberTree/index.js +6 -0
- package/dist/modules/fiberTree/index.js.map +1 -0
- package/dist/modules/fiberTree/types.d.ts +18 -0
- package/dist/modules/fiberTree/types.d.ts.map +1 -0
- package/dist/modules/fiberTree/types.js +3 -0
- package/dist/modules/fiberTree/types.js.map +1 -0
- package/dist/modules/fiberTree/utils.d.ts +18 -0
- package/dist/modules/fiberTree/utils.d.ts.map +1 -0
- package/dist/modules/fiberTree/utils.js +386 -0
- package/dist/modules/fiberTree/utils.js.map +1 -0
- package/dist/modules/i18next/i18next.d.ts +4 -0
- package/dist/modules/i18next/i18next.d.ts.map +1 -0
- package/dist/modules/i18next/i18next.js +133 -0
- package/dist/modules/i18next/i18next.js.map +1 -0
- package/dist/modules/i18next/index.d.ts +3 -0
- package/dist/modules/i18next/index.d.ts.map +1 -0
- package/dist/modules/i18next/index.js +6 -0
- package/dist/modules/i18next/index.js.map +1 -0
- package/dist/modules/i18next/types.d.ts +12 -0
- package/dist/modules/i18next/types.d.ts.map +1 -0
- package/dist/modules/i18next/types.js +3 -0
- package/dist/modules/i18next/types.js.map +1 -0
- package/dist/modules/index.d.ts +12 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/index.js +26 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/navigation/index.d.ts +3 -0
- package/dist/modules/navigation/index.d.ts.map +1 -0
- package/dist/modules/navigation/index.js +6 -0
- package/dist/modules/navigation/index.js.map +1 -0
- package/dist/modules/navigation/navigation.d.ts +4 -0
- package/dist/modules/navigation/navigation.d.ts.map +1 -0
- package/dist/modules/navigation/navigation.js +240 -0
- package/dist/modules/navigation/navigation.js.map +1 -0
- package/dist/modules/navigation/types.d.ts +34 -0
- package/dist/modules/navigation/types.d.ts.map +1 -0
- package/dist/modules/navigation/types.js +3 -0
- package/dist/modules/navigation/types.js.map +1 -0
- package/dist/modules/network/index.d.ts +3 -0
- package/dist/modules/network/index.d.ts.map +1 -0
- package/dist/modules/network/index.js +6 -0
- package/dist/modules/network/index.js.map +1 -0
- package/dist/modules/network/network.d.ts +4 -0
- package/dist/modules/network/network.d.ts.map +1 -0
- package/dist/modules/network/network.js +276 -0
- package/dist/modules/network/network.js.map +1 -0
- package/dist/modules/network/types.d.ts +26 -0
- package/dist/modules/network/types.d.ts.map +1 -0
- package/dist/modules/network/types.js +3 -0
- package/dist/modules/network/types.js.map +1 -0
- package/dist/modules/reactQuery/index.d.ts +3 -0
- package/dist/modules/reactQuery/index.d.ts.map +1 -0
- package/dist/modules/reactQuery/index.js +6 -0
- package/dist/modules/reactQuery/index.js.map +1 -0
- package/dist/modules/reactQuery/reactQuery.d.ts +4 -0
- package/dist/modules/reactQuery/reactQuery.d.ts.map +1 -0
- package/dist/modules/reactQuery/reactQuery.js +160 -0
- package/dist/modules/reactQuery/reactQuery.js.map +1 -0
- package/dist/modules/reactQuery/types.d.ts +29 -0
- package/dist/modules/reactQuery/types.d.ts.map +1 -0
- package/dist/modules/reactQuery/types.js +3 -0
- package/dist/modules/reactQuery/types.js.map +1 -0
- package/dist/modules/screenshot/index.d.ts +3 -0
- package/dist/modules/screenshot/index.d.ts.map +1 -0
- package/dist/modules/screenshot/index.js +6 -0
- package/dist/modules/screenshot/index.js.map +1 -0
- package/dist/modules/screenshot/screenshot.d.ts +4 -0
- package/dist/modules/screenshot/screenshot.d.ts.map +1 -0
- package/dist/modules/screenshot/screenshot.js +89 -0
- package/dist/modules/screenshot/screenshot.js.map +1 -0
- package/dist/modules/screenshot/types.d.ts +5 -0
- package/dist/modules/screenshot/types.d.ts.map +1 -0
- package/dist/modules/screenshot/types.js +3 -0
- package/dist/modules/screenshot/types.js.map +1 -0
- package/dist/modules/storage/index.d.ts +3 -0
- package/dist/modules/storage/index.d.ts.map +1 -0
- package/dist/modules/storage/index.js +6 -0
- package/dist/modules/storage/index.js.map +1 -0
- package/dist/modules/storage/storage.d.ts +4 -0
- package/dist/modules/storage/storage.d.ts.map +1 -0
- package/dist/modules/storage/storage.js +124 -0
- package/dist/modules/storage/storage.js.map +1 -0
- package/dist/modules/storage/types.d.ts +11 -0
- package/dist/modules/storage/types.d.ts.map +1 -0
- package/dist/modules/storage/types.js +3 -0
- package/dist/modules/storage/types.js.map +1 -0
- package/dist/modules/tree/index.d.ts +2 -0
- package/dist/modules/tree/index.d.ts.map +1 -0
- package/dist/modules/tree/index.js +6 -0
- package/dist/modules/tree/index.js.map +1 -0
- package/dist/modules/tree/tree.d.ts +3 -0
- package/dist/modules/tree/tree.d.ts.map +1 -0
- package/dist/modules/tree/tree.js +274 -0
- package/dist/modules/tree/tree.js.map +1 -0
- package/dist/server/bridge.d.ts +24 -0
- package/dist/server/bridge.d.ts.map +1 -0
- package/dist/server/bridge.js +152 -0
- package/dist/server/bridge.js.map +1 -0
- package/dist/server/cli.d.ts +3 -0
- package/dist/server/cli.d.ts.map +1 -0
- package/dist/server/cli.js +17 -0
- package/dist/server/cli.js.map +1 -0
- package/dist/server/index.d.ts +4 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +30 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/mcpServer.d.ts +19 -0
- package/dist/server/mcpServer.d.ts.map +1 -0
- package/dist/server/mcpServer.js +303 -0
- package/dist/server/mcpServer.js.map +1 -0
- package/dist/server/types.d.ts +12 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/types.js +3 -0
- package/dist/server/types.js.map +1 -0
- package/dist/shared/protocol.d.ts +54 -0
- package/dist/shared/protocol.d.ts.map +1 -0
- package/dist/shared/protocol.js +8 -0
- package/dist/shared/protocol.js.map +1 -0
- package/package.json +95 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deviceModule = void 0;
|
|
4
|
+
const deviceModule = () => {
|
|
5
|
+
// Lazy require to avoid importing react-native on server side
|
|
6
|
+
const getRN = () => {
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
|
|
8
|
+
return require('react-native');
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
description: 'Device info, app state, keyboard, linking, accessibility, reload, vibration.',
|
|
12
|
+
name: 'device',
|
|
13
|
+
tools: {
|
|
14
|
+
// === Linking ===
|
|
15
|
+
can_open_url: {
|
|
16
|
+
description: 'Check if a URL can be opened by an installed app',
|
|
17
|
+
handler: async (args) => {
|
|
18
|
+
const { Linking } = getRN();
|
|
19
|
+
const canOpen = await Linking.canOpenURL(args.url);
|
|
20
|
+
return { canOpen, url: args.url };
|
|
21
|
+
},
|
|
22
|
+
inputSchema: {
|
|
23
|
+
url: { description: 'URL to check', type: 'string' },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
// === Keyboard ===
|
|
27
|
+
dismiss_keyboard: {
|
|
28
|
+
description: 'Dismiss the currently visible keyboard',
|
|
29
|
+
handler: () => {
|
|
30
|
+
const { Keyboard } = getRN();
|
|
31
|
+
Keyboard.dismiss();
|
|
32
|
+
return { success: true };
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
// === Accessibility ===
|
|
36
|
+
get_accessibility_info: {
|
|
37
|
+
description: 'Get accessibility settings (screen reader, reduce motion, bold text, etc.)',
|
|
38
|
+
handler: async () => {
|
|
39
|
+
const { AccessibilityInfo } = getRN();
|
|
40
|
+
const [isScreenReaderEnabled, isReduceMotionEnabled] = await Promise.all([
|
|
41
|
+
AccessibilityInfo.isScreenReaderEnabled(),
|
|
42
|
+
AccessibilityInfo.isReduceMotionEnabled(),
|
|
43
|
+
]);
|
|
44
|
+
return {
|
|
45
|
+
isReduceMotionEnabled,
|
|
46
|
+
isScreenReaderEnabled,
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
// === App State ===
|
|
51
|
+
get_app_state: {
|
|
52
|
+
description: 'Get current app state (active, background, inactive)',
|
|
53
|
+
handler: () => {
|
|
54
|
+
const { AppState } = getRN();
|
|
55
|
+
return { state: AppState.currentState };
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
// === Appearance ===
|
|
59
|
+
get_appearance: {
|
|
60
|
+
description: 'Get current color scheme (light, dark, or null)',
|
|
61
|
+
handler: () => {
|
|
62
|
+
const { Appearance } = getRN();
|
|
63
|
+
return { colorScheme: Appearance.getColorScheme() };
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
// === Device Info ===
|
|
67
|
+
get_device_info: {
|
|
68
|
+
description: 'Get comprehensive device info: platform, OS version, dimensions, pixel ratio, appearance',
|
|
69
|
+
handler: () => {
|
|
70
|
+
const { Appearance, Dimensions, PixelRatio, Platform } = getRN();
|
|
71
|
+
return {
|
|
72
|
+
appearance: Appearance.getColorScheme(),
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
74
|
+
dev: Boolean(globalThis.__DEV__),
|
|
75
|
+
dimensions: {
|
|
76
|
+
screen: Dimensions.get('screen'),
|
|
77
|
+
window: Dimensions.get('window'),
|
|
78
|
+
},
|
|
79
|
+
pixelRatio: PixelRatio.get(),
|
|
80
|
+
platform: {
|
|
81
|
+
constants: Platform.constants,
|
|
82
|
+
os: Platform.OS,
|
|
83
|
+
version: Platform.Version,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
get_dimensions: {
|
|
89
|
+
description: 'Get screen and window dimensions (width, height, scale, fontScale)',
|
|
90
|
+
handler: () => {
|
|
91
|
+
const { Dimensions } = getRN();
|
|
92
|
+
return {
|
|
93
|
+
screen: Dimensions.get('screen'),
|
|
94
|
+
window: Dimensions.get('window'),
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
get_initial_url: {
|
|
99
|
+
description: 'Get the URL that launched the app (deep link)',
|
|
100
|
+
handler: async () => {
|
|
101
|
+
const { Linking } = getRN();
|
|
102
|
+
const url = await Linking.getInitialURL();
|
|
103
|
+
return { url };
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
get_keyboard_state: {
|
|
107
|
+
description: 'Check if keyboard is currently visible and get its metrics',
|
|
108
|
+
handler: () => {
|
|
109
|
+
const { Keyboard } = getRN();
|
|
110
|
+
return {
|
|
111
|
+
isVisible: Keyboard.isVisible(),
|
|
112
|
+
metrics: Keyboard.metrics(),
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
get_pixel_ratio: {
|
|
117
|
+
description: 'Get device pixel density and font scale',
|
|
118
|
+
handler: () => {
|
|
119
|
+
const { PixelRatio } = getRN();
|
|
120
|
+
return {
|
|
121
|
+
fontScale: PixelRatio.getFontScale(),
|
|
122
|
+
pixelRatio: PixelRatio.get(),
|
|
123
|
+
};
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
get_platform: {
|
|
127
|
+
description: 'Get platform info (OS, version, constants including model, brand, manufacturer on Android)',
|
|
128
|
+
handler: () => {
|
|
129
|
+
const { Platform } = getRN();
|
|
130
|
+
return {
|
|
131
|
+
constants: Platform.constants,
|
|
132
|
+
os: Platform.OS,
|
|
133
|
+
version: Platform.Version,
|
|
134
|
+
};
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
open_settings: {
|
|
138
|
+
description: 'Open the app settings page in device settings',
|
|
139
|
+
handler: async () => {
|
|
140
|
+
const { Linking } = getRN();
|
|
141
|
+
await Linking.openSettings();
|
|
142
|
+
return { success: true };
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
open_url: {
|
|
146
|
+
description: 'Open a URL with the appropriate installed app (browser, maps, phone, etc.)',
|
|
147
|
+
handler: async (args) => {
|
|
148
|
+
const { Linking } = getRN();
|
|
149
|
+
await Linking.openURL(args.url);
|
|
150
|
+
return { success: true, url: args.url };
|
|
151
|
+
},
|
|
152
|
+
inputSchema: {
|
|
153
|
+
url: { description: 'URL to open', type: 'string' },
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
// === App Control ===
|
|
157
|
+
reload: {
|
|
158
|
+
description: 'Reload the app (dev mode only, like pressing R in Metro)',
|
|
159
|
+
handler: () => {
|
|
160
|
+
const { DevSettings } = getRN();
|
|
161
|
+
DevSettings.reload();
|
|
162
|
+
return { success: true };
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
// === Vibration ===
|
|
166
|
+
vibrate: {
|
|
167
|
+
description: 'Vibrate the device',
|
|
168
|
+
handler: (args) => {
|
|
169
|
+
const { Vibration } = getRN();
|
|
170
|
+
const duration = args.duration || 400;
|
|
171
|
+
Vibration.vibrate(duration);
|
|
172
|
+
return { success: true };
|
|
173
|
+
},
|
|
174
|
+
inputSchema: {
|
|
175
|
+
duration: { description: 'Vibration duration in ms (default: 400)', type: 'number' },
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
exports.deviceModule = deviceModule;
|
|
182
|
+
//# sourceMappingURL=device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../src/modules/device/device.ts"],"names":[],"mappings":";;;AAEO,MAAM,YAAY,GAAG,GAAc,EAAE;IAC1C,8DAA8D;IAC9D,MAAM,KAAK,GAAG,GAAG,EAAE;QACjB,qGAAqG;QACrG,OAAO,OAAO,CAAC,cAAc,CAAC,CAAC;IACjC,CAAC,CAAC;IAEF,OAAO;QACL,WAAW,EAAE,8EAA8E;QAC3F,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE;YACL,kBAAkB;YAClB,YAAY,EAAE;gBACZ,WAAW,EAAE,kDAAkD;gBAC/D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;oBACtB,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC;oBAC5B,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAa,CAAC,CAAC;oBAC7D,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;gBACpC,CAAC;gBACD,WAAW,EAAE;oBACX,GAAG,EA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
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deviceModule = void 0;
|
|
4
|
+
var device_1 = require("./device");
|
|
5
|
+
Object.defineProperty(exports, "deviceModule", { enumerable: true, get: function () { return device_1.deviceModule; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/device/index.ts"],"names":[],"mappings":";;;AAAA,mCAAwC;AAA/B,sGAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface DeviceInfo {
|
|
2
|
+
appearance: string | null;
|
|
3
|
+
dimensions: {
|
|
4
|
+
screen: {
|
|
5
|
+
fontScale: number;
|
|
6
|
+
height: number;
|
|
7
|
+
scale: number;
|
|
8
|
+
width: number;
|
|
9
|
+
};
|
|
10
|
+
window: {
|
|
11
|
+
fontScale: number;
|
|
12
|
+
height: number;
|
|
13
|
+
scale: number;
|
|
14
|
+
width: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
pixelRatio: number;
|
|
18
|
+
platform: {
|
|
19
|
+
constants: Record<string, unknown>;
|
|
20
|
+
os: string;
|
|
21
|
+
version: number | string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/device/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE;QACV,MAAM,EAAE;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QAC5E,MAAM,EAAE;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAC7E,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACnC,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;KAC1B,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/device/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/modules/errors/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAqC,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAItF,eAAO,MAAM,YAAY,aAAc,mBAAmB,KAAG,SAqI5D,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.errorsModule = void 0;
|
|
4
|
+
const DEFAULT_MAX_ENTRIES = 50;
|
|
5
|
+
const errorsModule = (options) => {
|
|
6
|
+
const maxEntries = options?.maxEntries ?? DEFAULT_MAX_ENTRIES;
|
|
7
|
+
const buffer = [];
|
|
8
|
+
const addEntry = (entry) => {
|
|
9
|
+
// Deduplicate by message + timestamp proximity (within 100ms)
|
|
10
|
+
const lastEntry = buffer[buffer.length - 1];
|
|
11
|
+
if (lastEntry && lastEntry.message === entry.message) {
|
|
12
|
+
const timeDiff = new Date(entry.timestamp).getTime() - new Date(lastEntry.timestamp).getTime();
|
|
13
|
+
if (Math.abs(timeDiff) < 100)
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
buffer.push(entry);
|
|
17
|
+
if (buffer.length > maxEntries) {
|
|
18
|
+
buffer.splice(0, buffer.length - maxEntries);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
// 1. Intercept ErrorUtils global handler (catches fatal JS errors)
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
|
+
const ErrorUtilsGlobal = global.ErrorUtils;
|
|
24
|
+
if (ErrorUtilsGlobal) {
|
|
25
|
+
const originalHandler = ErrorUtilsGlobal.getGlobalHandler();
|
|
26
|
+
ErrorUtilsGlobal.setGlobalHandler((error, isFatal) => {
|
|
27
|
+
const source = error.message?.includes('in promise') ? 'promise' : 'global';
|
|
28
|
+
addEntry({
|
|
29
|
+
isFatal,
|
|
30
|
+
message: error.message,
|
|
31
|
+
source,
|
|
32
|
+
stack: error.stack,
|
|
33
|
+
timestamp: new Date().toISOString(),
|
|
34
|
+
});
|
|
35
|
+
if (originalHandler) {
|
|
36
|
+
originalHandler(error, isFatal);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
// 2. Intercept console.error to catch promise rejections reported by RN
|
|
41
|
+
const originalConsoleError = console.error;
|
|
42
|
+
console.error = (...args) => {
|
|
43
|
+
const firstArg = args[0];
|
|
44
|
+
// RN reports unhandled promise rejections as console.error with an Error object
|
|
45
|
+
if (firstArg && typeof firstArg === 'object' && 'message' in firstArg) {
|
|
46
|
+
const error = firstArg;
|
|
47
|
+
if (error.message?.includes('in promise')) {
|
|
48
|
+
addEntry({
|
|
49
|
+
isFatal: false,
|
|
50
|
+
message: error.message,
|
|
51
|
+
source: 'promise',
|
|
52
|
+
stack: error.stack,
|
|
53
|
+
timestamp: new Date().toISOString(),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
originalConsoleError.apply(console, args);
|
|
58
|
+
};
|
|
59
|
+
return {
|
|
60
|
+
description: 'Captured unhandled JS errors and promise rejections with stack traces.',
|
|
61
|
+
name: 'errors',
|
|
62
|
+
tools: {
|
|
63
|
+
clear_errors: {
|
|
64
|
+
description: 'Clear all captured errors from the buffer',
|
|
65
|
+
handler: () => {
|
|
66
|
+
buffer.length = 0;
|
|
67
|
+
return { success: true };
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
get_errors: {
|
|
71
|
+
description: 'Get all captured unhandled errors and promise rejections',
|
|
72
|
+
handler: (args) => {
|
|
73
|
+
let result = [...buffer];
|
|
74
|
+
if (args.source) {
|
|
75
|
+
result = result.filter((e) => {
|
|
76
|
+
return e.source === args.source;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (typeof args.fatal === 'boolean') {
|
|
80
|
+
result = result.filter((e) => {
|
|
81
|
+
return e.isFatal === args.fatal;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
if (args.limit) {
|
|
85
|
+
result = result.slice(-args.limit);
|
|
86
|
+
}
|
|
87
|
+
return result;
|
|
88
|
+
},
|
|
89
|
+
inputSchema: {
|
|
90
|
+
fatal: { description: 'Filter by fatal flag (true/false)', type: 'boolean' },
|
|
91
|
+
limit: { description: 'Max number of entries to return', type: 'number' },
|
|
92
|
+
source: { description: 'Filter by source (global, promise)', type: 'string' },
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
get_fatal: {
|
|
96
|
+
description: 'Get only fatal errors',
|
|
97
|
+
handler: (args) => {
|
|
98
|
+
let result = buffer.filter((e) => {
|
|
99
|
+
return e.isFatal;
|
|
100
|
+
});
|
|
101
|
+
if (args.limit) {
|
|
102
|
+
result = result.slice(-args.limit);
|
|
103
|
+
}
|
|
104
|
+
return result;
|
|
105
|
+
},
|
|
106
|
+
inputSchema: {
|
|
107
|
+
limit: { description: 'Max number of entries to return', type: 'number' },
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
get_stats: {
|
|
111
|
+
description: 'Get error statistics (total, by source, fatal count)',
|
|
112
|
+
handler: () => {
|
|
113
|
+
return {
|
|
114
|
+
bySource: {
|
|
115
|
+
global: buffer.filter((e) => {
|
|
116
|
+
return e.source === 'global';
|
|
117
|
+
}).length,
|
|
118
|
+
promise: buffer.filter((e) => {
|
|
119
|
+
return e.source === 'promise';
|
|
120
|
+
}).length,
|
|
121
|
+
},
|
|
122
|
+
fatal: buffer.filter((e) => {
|
|
123
|
+
return e.isFatal;
|
|
124
|
+
}).length,
|
|
125
|
+
total: buffer.length,
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
exports.errorsModule = errorsModule;
|
|
133
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/modules/errors/errors.ts"],"names":[],"mappings":";;;AAIA,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAExB,MAAM,YAAY,GAAG,CAAC,OAA6B,EAAa,EAAE;IACvE,MAAM,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,mBAAmB,CAAC;IAC9D,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,MAAM,QAAQ,GAAG,CAAC,KAAiB,EAAE,EAAE;QACrC,8DAA8D;QAC9D,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC5C,IAAI,SAAS,IAAI,SAAS,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;YACrD,MAAM,QAAQ,GACZ,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC;YAChF,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,GAAG;gBAAE,OAAO;QACvC,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,KAAK,CAA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CAC3B,OAAO,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC;4BAChC,CAAC,CAAC,CAAC,MAAM;yBACV;wBACD,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;4BACzB,OAAO,CAAC,CAAC,OAAO,CAAC;wBACnB,CAAC,CAAC,CAAC,MAAM;wBACT,KAAK,EAAE,MAAM,CAAC,MAAM;qBACrB,CAAC;gBACJ,CAAC;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AArIW,QAAA,YAAY,gBAqIvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.errorsModule = void 0;
|
|
4
|
+
var errors_1 = require("./errors");
|
|
5
|
+
Object.defineProperty(exports, "errorsModule", { enumerable: true, get: function () { return errors_1.errorsModule; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/errors/index.ts"],"names":[],"mappings":";;;AAAA,mCAAwC;AAA/B,sGAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ErrorSource = 'global' | 'promise';
|
|
2
|
+
export interface ErrorEntry {
|
|
3
|
+
isFatal: boolean;
|
|
4
|
+
message: string;
|
|
5
|
+
source: ErrorSource;
|
|
6
|
+
timestamp: string;
|
|
7
|
+
stack?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ErrorsModuleOptions {
|
|
10
|
+
maxEntries?: number;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/errors/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE/C,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/errors/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { type McpModule } from '../../client/models/types';
|
|
3
|
+
interface FiberTreeModuleOptions {
|
|
4
|
+
rootRef?: RefObject<unknown>;
|
|
5
|
+
}
|
|
6
|
+
export declare const fiberTreeModule: (options?: FiberTreeModuleOptions) => McpModule;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=fiberTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiberTree.d.ts","sourceRoot":"","sources":["../../../src/modules/fiberTree/fiberTree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAmCvD,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,eAAe,aAAc,sBAAsB,KAAG,SAuUlE,CAAC"}
|