react-native-mcp-kit 2.1.0 → 2.2.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 +20 -11
- 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 +6 -3
- package/dist/client/contexts/McpContext/McpProvider.js.map +1 -1
- package/dist/modules/alert/alert.d.ts.map +1 -1
- package/dist/modules/alert/alert.js +6 -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 +18 -13
- package/dist/modules/console/console.js.map +1 -1
- package/dist/modules/device/device.d.ts.map +1 -1
- package/dist/modules/device/device.js +23 -27
- 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 +92 -11
- package/dist/modules/errors/errors.js.map +1 -1
- package/dist/modules/errors/types.d.ts +8 -0
- package/dist/modules/errors/types.d.ts.map +1 -1
- package/dist/modules/fiberTree/fiberTree.d.ts +4 -0
- package/dist/modules/fiberTree/fiberTree.d.ts.map +1 -1
- package/dist/modules/fiberTree/fiberTree.js +353 -114
- package/dist/modules/fiberTree/fiberTree.js.map +1 -1
- package/dist/modules/fiberTree/index.d.ts +1 -0
- package/dist/modules/fiberTree/index.d.ts.map +1 -1
- package/dist/modules/fiberTree/index.js +14 -1
- package/dist/modules/fiberTree/index.js.map +1 -1
- package/dist/modules/fiberTree/types.d.ts +40 -0
- package/dist/modules/fiberTree/types.d.ts.map +1 -1
- package/dist/modules/fiberTree/utils.d.ts +13 -0
- package/dist/modules/fiberTree/utils.d.ts.map +1 -1
- package/dist/modules/fiberTree/utils.js +195 -23
- package/dist/modules/fiberTree/utils.js.map +1 -1
- package/dist/modules/i18next/i18next.d.ts.map +1 -1
- package/dist/modules/i18next/i18next.js +30 -16
- package/dist/modules/i18next/i18next.js.map +1 -1
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +3 -1
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/logBox/index.d.ts +2 -0
- package/dist/modules/logBox/index.d.ts.map +1 -0
- package/dist/modules/logBox/index.js +6 -0
- package/dist/modules/logBox/index.js.map +1 -0
- package/dist/modules/logBox/logBox.d.ts +3 -0
- package/dist/modules/logBox/logBox.d.ts.map +1 -0
- package/dist/modules/logBox/logBox.js +234 -0
- package/dist/modules/logBox/logBox.js.map +1 -0
- package/dist/modules/navigation/navigation.d.ts.map +1 -1
- package/dist/modules/navigation/navigation.js +130 -42
- 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 +262 -67
- package/dist/modules/network/network.js.map +1 -1
- package/dist/modules/network/types.d.ts +35 -3
- 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 +25 -15
- 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 +23 -16
- package/dist/modules/storage/storage.js.map +1 -1
- package/dist/server/host/hostModule.d.ts.map +1 -1
- package/dist/server/host/hostModule.js +19 -1
- package/dist/server/host/hostModule.js.map +1 -1
- package/dist/server/host/tools/capture.d.ts.map +1 -1
- package/dist/server/host/tools/capture.js +111 -28
- package/dist/server/host/tools/capture.js.map +1 -1
- package/dist/server/host/tools/devices.js +1 -1
- package/dist/server/host/tools/devices.js.map +1 -1
- package/dist/server/host/tools/input.d.ts +3 -0
- package/dist/server/host/tools/input.d.ts.map +1 -1
- package/dist/server/host/tools/input.js +197 -5
- package/dist/server/host/tools/input.js.map +1 -1
- package/dist/server/host/tools/lifecycle.d.ts.map +1 -1
- package/dist/server/host/tools/lifecycle.js +5 -4
- package/dist/server/host/tools/lifecycle.js.map +1 -1
- package/dist/server/host/tools/symbolicate.d.ts +3 -0
- package/dist/server/host/tools/symbolicate.d.ts.map +1 -0
- package/dist/server/host/tools/symbolicate.js +199 -0
- package/dist/server/host/tools/symbolicate.js.map +1 -0
- package/dist/server/host/tools/tapFiber.d.ts +3 -0
- package/dist/server/host/tools/tapFiber.d.ts.map +1 -0
- package/dist/server/host/tools/tapFiber.js +89 -0
- package/dist/server/host/tools/tapFiber.js.map +1 -0
- package/dist/server/host/types.d.ts +14 -0
- package/dist/server/host/types.d.ts.map +1 -1
- package/dist/server/mcpServer.d.ts +6 -0
- package/dist/server/mcpServer.d.ts.map +1 -1
- package/dist/server/mcpServer.js +440 -93
- package/dist/server/mcpServer.js.map +1 -1
- package/package.json +1 -1
|
@@ -28,11 +28,15 @@ const reactQueryModule = (queryClient) => {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
return {
|
|
31
|
-
description:
|
|
31
|
+
description: `React Query cache inspection + mutation.
|
|
32
|
+
|
|
33
|
+
Query keys are passed as JSON strings to preserve array structure — e.g.
|
|
34
|
+
'["users","list"]' or '"users"'. Omit \`key\` on invalidate / refetch /
|
|
35
|
+
remove / reset to target every cached query at once.`,
|
|
32
36
|
name: 'query',
|
|
33
37
|
tools: {
|
|
34
38
|
get_data: {
|
|
35
|
-
description: '
|
|
39
|
+
description: 'Cached data for one query by exact key.',
|
|
36
40
|
handler: (args) => {
|
|
37
41
|
const key = parseKey(args.key);
|
|
38
42
|
const queries = getAllQueries();
|
|
@@ -54,13 +58,14 @@ const reactQueryModule = (queryClient) => {
|
|
|
54
58
|
},
|
|
55
59
|
inputSchema: {
|
|
56
60
|
key: {
|
|
57
|
-
description: 'Query key
|
|
61
|
+
description: 'Query key (JSON string).',
|
|
62
|
+
examples: ['["users"]', '["users","list"]', '"users"'],
|
|
58
63
|
type: 'string',
|
|
59
64
|
},
|
|
60
65
|
},
|
|
61
66
|
},
|
|
62
67
|
get_queries: {
|
|
63
|
-
description: 'List
|
|
68
|
+
description: 'List cached queries (status/fetchStatus/timestamps, no data).',
|
|
64
69
|
handler: (args) => {
|
|
65
70
|
let queries = getAllQueries();
|
|
66
71
|
if (args.status) {
|
|
@@ -77,15 +82,16 @@ const reactQueryModule = (queryClient) => {
|
|
|
77
82
|
return queries.map(serializeQuery);
|
|
78
83
|
},
|
|
79
84
|
inputSchema: {
|
|
80
|
-
key: { description: '
|
|
85
|
+
key: { description: 'Substring filter on the serialized key.', type: 'string' },
|
|
81
86
|
status: {
|
|
82
|
-
description: 'Filter by status
|
|
87
|
+
description: 'Filter by status.',
|
|
88
|
+
examples: ['pending', 'error', 'success'],
|
|
83
89
|
type: 'string',
|
|
84
90
|
},
|
|
85
91
|
},
|
|
86
92
|
},
|
|
87
93
|
get_stats: {
|
|
88
|
-
description: '
|
|
94
|
+
description: 'Cache counts — total, by status, by fetchStatus.',
|
|
89
95
|
handler: () => {
|
|
90
96
|
const queries = getAllQueries();
|
|
91
97
|
const byStatus = {};
|
|
@@ -98,7 +104,7 @@ const reactQueryModule = (queryClient) => {
|
|
|
98
104
|
},
|
|
99
105
|
},
|
|
100
106
|
invalidate: {
|
|
101
|
-
description: '
|
|
107
|
+
description: 'Mark queries stale (will refetch on next use). Omit key for all.',
|
|
102
108
|
handler: async (args) => {
|
|
103
109
|
const filters = args.key ? { queryKey: parseKey(args.key) } : undefined;
|
|
104
110
|
await queryClient.invalidateQueries(filters);
|
|
@@ -106,13 +112,14 @@ const reactQueryModule = (queryClient) => {
|
|
|
106
112
|
},
|
|
107
113
|
inputSchema: {
|
|
108
114
|
key: {
|
|
109
|
-
description: 'Query key
|
|
115
|
+
description: 'Query key (JSON string). Omit to invalidate all.',
|
|
116
|
+
examples: ['["users"]'],
|
|
110
117
|
type: 'string',
|
|
111
118
|
},
|
|
112
119
|
},
|
|
113
120
|
},
|
|
114
121
|
refetch: {
|
|
115
|
-
description: 'Refetch queries immediately.
|
|
122
|
+
description: 'Refetch queries immediately. Omit key for all.',
|
|
116
123
|
handler: async (args) => {
|
|
117
124
|
const filters = args.key ? { queryKey: parseKey(args.key) } : undefined;
|
|
118
125
|
await queryClient.refetchQueries(filters);
|
|
@@ -120,13 +127,14 @@ const reactQueryModule = (queryClient) => {
|
|
|
120
127
|
},
|
|
121
128
|
inputSchema: {
|
|
122
129
|
key: {
|
|
123
|
-
description: 'Query key
|
|
130
|
+
description: 'Query key (JSON string). Omit to refetch all.',
|
|
131
|
+
examples: ['["users"]'],
|
|
124
132
|
type: 'string',
|
|
125
133
|
},
|
|
126
134
|
},
|
|
127
135
|
},
|
|
128
136
|
remove: {
|
|
129
|
-
description: 'Remove queries from cache entirely.
|
|
137
|
+
description: 'Remove queries from cache entirely. Omit key for all.',
|
|
130
138
|
handler: (args) => {
|
|
131
139
|
const filters = args.key ? { queryKey: parseKey(args.key) } : undefined;
|
|
132
140
|
queryClient.removeQueries(filters);
|
|
@@ -134,13 +142,14 @@ const reactQueryModule = (queryClient) => {
|
|
|
134
142
|
},
|
|
135
143
|
inputSchema: {
|
|
136
144
|
key: {
|
|
137
|
-
description: 'Query key
|
|
145
|
+
description: 'Query key (JSON string). Omit to remove all.',
|
|
146
|
+
examples: ['["users"]'],
|
|
138
147
|
type: 'string',
|
|
139
148
|
},
|
|
140
149
|
},
|
|
141
150
|
},
|
|
142
151
|
reset: {
|
|
143
|
-
description: 'Reset queries to initial state (clears data
|
|
152
|
+
description: 'Reset queries to initial state (clears data + error). Omit key for all.',
|
|
144
153
|
handler: async (args) => {
|
|
145
154
|
const filters = args.key ? { queryKey: parseKey(args.key) } : undefined;
|
|
146
155
|
await queryClient.resetQueries(filters);
|
|
@@ -148,7 +157,8 @@ const reactQueryModule = (queryClient) => {
|
|
|
148
157
|
},
|
|
149
158
|
inputSchema: {
|
|
150
159
|
key: {
|
|
151
|
-
description: 'Query key
|
|
160
|
+
description: 'Query key (JSON string). Omit to reset all.',
|
|
161
|
+
examples: ['["users"]'],
|
|
152
162
|
type: 'string',
|
|
153
163
|
},
|
|
154
164
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactQuery.js","sourceRoot":"","sources":["../../../src/modules/reactQuery/reactQuery.ts"],"names":[],"mappings":";;;AAIA,MAAM,cAAc,GAAG,CAAC,KAWvB,EAAE,EAAE;IACH,OAAO;QACL,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa;YACtC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,WAAW,EAAE;YACnD,CAAC,CAAC,IAAI;QACR,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW;QACpC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS;QACvC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS;QACzC,IAAI,EAAE,KAAK,CAAC,SAAS;QACrB,GAAG,EAAE,KAAK,CAAC,QAAQ;QACnB,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM;KAC3B,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,gBAAgB,GAAG,CAAC,WAA4B,EAAa,EAAE;IAC1E,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,OAAO,WAAW,CAAC,aAAa,EAAE,CAAC,MAAM,EAAE,CAAC;IAC9C,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAa,EAAE;QAC7C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAClC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACnD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,MAAM,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACL,WAAW,
|
|
1
|
+
{"version":3,"file":"reactQuery.js","sourceRoot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file":"storage.d.ts","sourceRoot":"","sources":["../../../src/modules/storage/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,SAAS,CAAC;AAWjE,eAAO,MAAM,aAAa,gBAAiB,YAAY,EAAE,KAAG,
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/modules/storage/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,SAAS,CAAC;AAWjE,eAAO,MAAM,aAAa,gBAAiB,YAAY,EAAE,KAAG,SA4G3D,CAAC"}
|
|
@@ -20,11 +20,18 @@ const storageModule = (...storages) => {
|
|
|
20
20
|
})?.adapter ?? null);
|
|
21
21
|
};
|
|
22
22
|
return {
|
|
23
|
-
description:
|
|
23
|
+
description: `Multi-storage key-value inspection.
|
|
24
|
+
|
|
25
|
+
Each registered storage has a name and an adapter (MMKV / AsyncStorage /
|
|
26
|
+
custom). Only \`get\` is required on the adapter; \`set\` / \`delete\` /
|
|
27
|
+
\`getAllKeys\` are optional — the corresponding tools return an
|
|
28
|
+
"unsupported" error when absent. Values are JSON-parsed on read when
|
|
29
|
+
possible. The \`storage\` argument picks a named store; omit to target
|
|
30
|
+
the first-registered one.`,
|
|
24
31
|
name: 'storage',
|
|
25
32
|
tools: {
|
|
26
33
|
delete_item: {
|
|
27
|
-
description: 'Delete a key
|
|
34
|
+
description: 'Delete a key.',
|
|
28
35
|
handler: async (args) => {
|
|
29
36
|
const storage = getStorage(args.storage);
|
|
30
37
|
if (!storage)
|
|
@@ -35,12 +42,12 @@ const storageModule = (...storages) => {
|
|
|
35
42
|
return { key: args.key, success: true };
|
|
36
43
|
},
|
|
37
44
|
inputSchema: {
|
|
38
|
-
key: { description: 'Key to delete', type: 'string' },
|
|
39
|
-
storage: { description: 'Storage name (
|
|
45
|
+
key: { description: 'Key to delete.', type: 'string' },
|
|
46
|
+
storage: { description: 'Storage name (default: first).', type: 'string' },
|
|
40
47
|
},
|
|
41
48
|
},
|
|
42
49
|
get_all: {
|
|
43
|
-
description: '
|
|
50
|
+
description: 'All key-value pairs; values JSON-parsed when possible.',
|
|
44
51
|
handler: async (args) => {
|
|
45
52
|
const storage = getStorage(args.storage);
|
|
46
53
|
if (!storage)
|
|
@@ -55,11 +62,11 @@ const storageModule = (...storages) => {
|
|
|
55
62
|
return entries;
|
|
56
63
|
},
|
|
57
64
|
inputSchema: {
|
|
58
|
-
storage: { description: 'Storage name (
|
|
65
|
+
storage: { description: 'Storage name (default: first).', type: 'string' },
|
|
59
66
|
},
|
|
60
67
|
},
|
|
61
68
|
get_item: {
|
|
62
|
-
description: '
|
|
69
|
+
description: 'Value for one key; JSON-parsed when possible.',
|
|
63
70
|
handler: async (args) => {
|
|
64
71
|
const storage = getStorage(args.storage);
|
|
65
72
|
if (!storage)
|
|
@@ -68,12 +75,12 @@ const storageModule = (...storages) => {
|
|
|
68
75
|
return { key: args.key, value: tryParseJson(value) };
|
|
69
76
|
},
|
|
70
77
|
inputSchema: {
|
|
71
|
-
key: { description: 'Key to read', type: 'string' },
|
|
72
|
-
storage: { description: 'Storage name (
|
|
78
|
+
key: { description: 'Key to read.', type: 'string' },
|
|
79
|
+
storage: { description: 'Storage name (default: first).', type: 'string' },
|
|
73
80
|
},
|
|
74
81
|
},
|
|
75
82
|
list_keys: {
|
|
76
|
-
description: '
|
|
83
|
+
description: 'All keys in a storage.',
|
|
77
84
|
handler: async (args) => {
|
|
78
85
|
const storage = getStorage(args.storage);
|
|
79
86
|
if (!storage)
|
|
@@ -83,11 +90,11 @@ const storageModule = (...storages) => {
|
|
|
83
90
|
return { keys: await storage.getAllKeys() };
|
|
84
91
|
},
|
|
85
92
|
inputSchema: {
|
|
86
|
-
storage: { description: 'Storage name (
|
|
93
|
+
storage: { description: 'Storage name (default: first).', type: 'string' },
|
|
87
94
|
},
|
|
88
95
|
},
|
|
89
96
|
list_storages: {
|
|
90
|
-
description: '
|
|
97
|
+
description: 'Registered storages with key counts.',
|
|
91
98
|
handler: async () => {
|
|
92
99
|
const result = [];
|
|
93
100
|
for (const s of storages) {
|
|
@@ -100,7 +107,7 @@ const storageModule = (...storages) => {
|
|
|
100
107
|
},
|
|
101
108
|
},
|
|
102
109
|
set_item: {
|
|
103
|
-
description: '
|
|
110
|
+
description: 'Write a value. Objects/arrays are stringified as JSON.',
|
|
104
111
|
handler: async (args) => {
|
|
105
112
|
const storage = getStorage(args.storage);
|
|
106
113
|
if (!storage)
|
|
@@ -112,9 +119,9 @@ const storageModule = (...storages) => {
|
|
|
112
119
|
return { key: args.key, success: true };
|
|
113
120
|
},
|
|
114
121
|
inputSchema: {
|
|
115
|
-
key: { description: 'Key to set', type: 'string' },
|
|
116
|
-
storage: { description: 'Storage name (
|
|
117
|
-
value: { description: 'Value
|
|
122
|
+
key: { description: 'Key to set.', type: 'string' },
|
|
123
|
+
storage: { description: 'Storage name (default: first).', type: 'string' },
|
|
124
|
+
value: { description: 'Value (string or JSON-serializable).', type: 'string' },
|
|
118
125
|
},
|
|
119
126
|
},
|
|
120
127
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/modules/storage/storage.ts"],"names":[],"mappings":";;;AAIA,MAAM,YAAY,GAAG,CAAC,KAAgC,EAAW,EAAE;IACjE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5D,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAEK,MAAM,aAAa,GAAG,CAAC,GAAG,QAAwB,EAAa,EAAE;IACtE,MA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,WAAW,EAAE;oBACX,GAAG,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACnD,OAAO,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC1E,KAAK,EAAE,EAAE,WAAW,EAAE,sCAAsC,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC/E;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AA5GW,QAAA,aAAa,iBA4GxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostModule.d.ts","sourceRoot":"","sources":["../../../src/server/host/hostModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"hostModule.d.ts","sourceRoot":"","sources":["../../../src/server/host/hostModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAerD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,UAAU,WAAY,aAAa,KAAG,UAgClD,CAAC"}
|
|
@@ -5,20 +5,38 @@ const capture_1 = require("./tools/capture");
|
|
|
5
5
|
const devices_1 = require("./tools/devices");
|
|
6
6
|
const input_1 = require("./tools/input");
|
|
7
7
|
const lifecycle_1 = require("./tools/lifecycle");
|
|
8
|
+
const symbolicate_1 = require("./tools/symbolicate");
|
|
9
|
+
const tapFiber_1 = require("./tools/tapFiber");
|
|
8
10
|
const hostModule = (runner) => {
|
|
9
11
|
return {
|
|
10
|
-
description:
|
|
12
|
+
description: `OS-level device control executed on the MCP server host. Works even when the React Native app is hung, disconnected, or not yet installed.
|
|
13
|
+
|
|
14
|
+
BACKENDS
|
|
15
|
+
iOS input (tap / swipe / type_text / press_key) goes through the bundled
|
|
16
|
+
ios-hid binary — HID injection into iOS Simulator via SimulatorKit. No
|
|
17
|
+
WebDriverAgent, no idb, no Appium server.
|
|
18
|
+
Android input / screenshots go through adb (input / screencap / monkey
|
|
19
|
+
/ am force-stop).
|
|
20
|
+
|
|
21
|
+
COORDINATES
|
|
22
|
+
All (x, y) / (x1, y1, x2, y2) are in PHYSICAL pixels, top-left origin.
|
|
23
|
+
They match fiber_tree bounds.centerX/centerY — feed them directly.`,
|
|
11
24
|
name: 'host',
|
|
12
25
|
tools: {
|
|
26
|
+
drag: (0, input_1.dragTool)(runner),
|
|
13
27
|
launch_app: (0, lifecycle_1.launchAppTool)(runner),
|
|
14
28
|
list_devices: (0, devices_1.listDevicesTool)(runner),
|
|
29
|
+
long_press: (0, input_1.longPressTool)(runner),
|
|
15
30
|
press_key: (0, input_1.pressKeyTool)(runner),
|
|
16
31
|
restart_app: (0, lifecycle_1.restartAppTool)(runner),
|
|
17
32
|
screenshot: (0, capture_1.screenshotTool)(runner),
|
|
18
33
|
swipe: (0, input_1.swipeTool)(runner),
|
|
34
|
+
symbolicate: (0, symbolicate_1.symbolicateTool)(),
|
|
19
35
|
tap: (0, input_1.tapTool)(runner),
|
|
36
|
+
tap_fiber: (0, tapFiber_1.tapFiberTool)(),
|
|
20
37
|
terminate_app: (0, lifecycle_1.terminateAppTool)(runner),
|
|
21
38
|
type_text: (0, input_1.typeTextTool)(runner),
|
|
39
|
+
type_text_batch: (0, input_1.typeTextBatchTool)(runner),
|
|
22
40
|
},
|
|
23
41
|
};
|
|
24
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostModule.js","sourceRoot":"","sources":["../../../src/server/host/hostModule.ts"],"names":[],"mappings":";;;AACA,6CAAiD;AACjD,6CAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"hostModule.js","sourceRoot":"","sources":["../../../src/server/host/hostModule.ts"],"names":[],"mappings":";;;AACA,6CAAiD;AACjD,6CAAkD;AAClD,yCAQuB;AACvB,iDAAoF;AACpF,qDAAsD;AACtD,+CAAgD;AAGzC,MAAM,UAAU,GAAG,CAAC,MAAqB,EAAc,EAAE;IAC9D,OAAO;QACL,WAAW,EAAE;;;;;;;;;;;qEAWoD;QACjE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE;YACL,IAAI,EAAE,IAAA,gBAAQ,EAAC,MAAM,CAAC;YACtB,UAAU,EAAE,IAAA,yBAAa,EAAC,MAAM,CAAC;YACjC,YAAY,EAAE,IAAA,yBAAe,EAAC,MAAM,CAAC;YACrC,UAAU,EAAE,IAAA,qBAAa,EAAC,MAAM,CAAC;YACjC,SAAS,EAAE,IAAA,oBAAY,EAAC,MAAM,CAAC;YAC/B,WAAW,EAAE,IAAA,0BAAc,EAAC,MAAM,CAAC;YACnC,UAAU,EAAE,IAAA,wBAAc,EAAC,MAAM,CAAC;YAClC,KAAK,EAAE,IAAA,iBAAS,EAAC,MAAM,CAAC;YACxB,WAAW,EAAE,IAAA,6BAAe,GAAE;YAC9B,GAAG,EAAE,IAAA,eAAO,EAAC,MAAM,CAAC;YACpB,SAAS,EAAE,IAAA,uBAAY,GAAE;YACzB,aAAa,EAAE,IAAA,4BAAgB,EAAC,MAAM,CAAC;YACvC,SAAS,EAAE,IAAA,oBAAY,EAAC,MAAM,CAAC;YAC/B,eAAe,EAAE,IAAA,yBAAiB,EAAC,MAAM,CAAC;SAC3C;KACF,CAAC;AACJ,CAAC,CAAC;AAhCW,QAAA,UAAU,cAgCrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../../src/server/host/tools/capture.ts"],"names":[],"mappings":"AASA,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,QAAA,MAAM,qBAAqB,QAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../../src/server/host/tools/capture.ts"],"names":[],"mappings":"AASA,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,QAAA,MAAM,qBAAqB,QAAS,CAAC;AA0PrC,eAAO,MAAM,cAAc,WAAY,aAAa,KAAG,eAyCtD,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -14,7 +14,7 @@ const helpers_1 = require("../../../server/host/helpers");
|
|
|
14
14
|
const processRunner_1 = require("../../../server/host/processRunner");
|
|
15
15
|
const SCREENSHOT_TIMEOUT_MS = 15_000;
|
|
16
16
|
exports.SCREENSHOT_TIMEOUT_MS = SCREENSHOT_TIMEOUT_MS;
|
|
17
|
-
const SCREENSHOT_DEFAULT_WIDTH =
|
|
17
|
+
const SCREENSHOT_DEFAULT_WIDTH = 280;
|
|
18
18
|
const SCREENSHOT_MIN_WIDTH = 64;
|
|
19
19
|
const SCREENSHOT_MAX_WIDTH = 1568;
|
|
20
20
|
const WEBP_QUALITY = 80;
|
|
@@ -24,18 +24,97 @@ const clampWidth = (value) => {
|
|
|
24
24
|
}
|
|
25
25
|
return Math.max(SCREENSHOT_MIN_WIDTH, Math.min(SCREENSHOT_MAX_WIDTH, Math.floor(value)));
|
|
26
26
|
};
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const parseRegion = (raw) => {
|
|
28
|
+
if (raw === undefined || raw === null)
|
|
29
|
+
return null;
|
|
30
|
+
if (typeof raw !== 'object' || Array.isArray(raw)) {
|
|
31
|
+
return { error: 'region must be an object { x, y, width, height }.' };
|
|
32
|
+
}
|
|
33
|
+
const r = raw;
|
|
34
|
+
const x = Number(r.x);
|
|
35
|
+
const y = Number(r.y);
|
|
36
|
+
const width = Number(r.width);
|
|
37
|
+
const height = Number(r.height);
|
|
38
|
+
if (!Number.isFinite(x) ||
|
|
39
|
+
!Number.isFinite(y) ||
|
|
40
|
+
!Number.isFinite(width) ||
|
|
41
|
+
!Number.isFinite(height)) {
|
|
42
|
+
return { error: 'region.x / y / width / height must all be finite numbers.' };
|
|
43
|
+
}
|
|
44
|
+
if (width <= 0 || height <= 0) {
|
|
45
|
+
return { error: 'region.width and region.height must be positive.' };
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
height: Math.floor(height),
|
|
49
|
+
width: Math.floor(width),
|
|
50
|
+
x: Math.max(0, Math.floor(x)),
|
|
51
|
+
y: Math.max(0, Math.floor(y)),
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
const resizeScreenshot = async (input, targetWidth, region) => {
|
|
55
|
+
const pipeline = (0, sharp_1.default)(input);
|
|
56
|
+
const meta = await pipeline.metadata();
|
|
57
|
+
const origW = meta.width ?? 0;
|
|
58
|
+
const origH = meta.height ?? 0;
|
|
59
|
+
let appliedRegion;
|
|
60
|
+
let stage = pipeline;
|
|
61
|
+
if (region && origW > 0 && origH > 0) {
|
|
62
|
+
// Clip region to the actual image bounds so agents can pass fiber
|
|
63
|
+
// bounds without guarding the edges.
|
|
64
|
+
const left = Math.min(region.x, origW - 1);
|
|
65
|
+
const top = Math.min(region.y, origH - 1);
|
|
66
|
+
const w = Math.min(region.width, origW - left);
|
|
67
|
+
const h = Math.min(region.height, origH - top);
|
|
68
|
+
if (w > 0 && h > 0) {
|
|
69
|
+
stage = pipeline.extract({ height: h, left, top, width: w });
|
|
70
|
+
appliedRegion = { height: h, width: w, x: left, y: top };
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const { data, info } = await stage
|
|
29
74
|
.resize({ width: targetWidth, withoutEnlargement: true })
|
|
30
75
|
.webp({ quality: WEBP_QUALITY })
|
|
31
|
-
.toBuffer();
|
|
76
|
+
.toBuffer({ resolveWithObject: true });
|
|
77
|
+
return {
|
|
78
|
+
buffer: data,
|
|
79
|
+
height: info.height,
|
|
80
|
+
originalHeight: origH || undefined,
|
|
81
|
+
originalWidth: origW || undefined,
|
|
82
|
+
region: appliedRegion,
|
|
83
|
+
width: info.width,
|
|
84
|
+
};
|
|
32
85
|
};
|
|
33
86
|
const hashBuffer = (buf) => {
|
|
34
87
|
return (0, node_crypto_1.createHash)('sha256').update(buf).digest('hex');
|
|
35
88
|
};
|
|
36
89
|
// Per-device cache for screenshot diff
|
|
37
90
|
const lastScreenshotHash = new Map();
|
|
38
|
-
const
|
|
91
|
+
const buildResponse = (resized) => {
|
|
92
|
+
// `scale` = image-to-source ratio. When a region was cropped it's the
|
|
93
|
+
// image/region ratio; otherwise it's image/full-screen. Agents use it for
|
|
94
|
+
// pixel-back-to-device math.
|
|
95
|
+
const sourceWidth = resized.region?.width ?? resized.originalWidth;
|
|
96
|
+
const meta = {
|
|
97
|
+
bytes: resized.buffer.length,
|
|
98
|
+
height: resized.height,
|
|
99
|
+
originalHeight: resized.originalHeight,
|
|
100
|
+
originalWidth: resized.originalWidth,
|
|
101
|
+
region: resized.region,
|
|
102
|
+
scale: sourceWidth ? Number((resized.width / sourceWidth).toFixed(3)) : undefined,
|
|
103
|
+
width: resized.width,
|
|
104
|
+
};
|
|
105
|
+
return [
|
|
106
|
+
{
|
|
107
|
+
data: resized.buffer.toString('base64'),
|
|
108
|
+
mimeType: 'image/webp',
|
|
109
|
+
type: 'image',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
text: JSON.stringify(meta),
|
|
113
|
+
type: 'text',
|
|
114
|
+
},
|
|
115
|
+
];
|
|
116
|
+
};
|
|
117
|
+
const captureIos = async (udid, runner, width, region) => {
|
|
39
118
|
const tmpPath = (0, node_path_1.join)((0, node_os_1.tmpdir)(), `rnmcp-ios-${(0, node_crypto_1.randomUUID)()}.png`);
|
|
40
119
|
try {
|
|
41
120
|
const proc = await runner('xcrun', ['simctl', 'io', udid, 'screenshot', tmpPath], {
|
|
@@ -50,19 +129,13 @@ const captureIos = async (udid, runner, width) => {
|
|
|
50
129
|
};
|
|
51
130
|
}
|
|
52
131
|
const raw = await (0, promises_1.readFile)(tmpPath);
|
|
53
|
-
const resized = await resizeScreenshot(raw, width);
|
|
54
|
-
const hash = hashBuffer(resized);
|
|
132
|
+
const resized = await resizeScreenshot(raw, width, region);
|
|
133
|
+
const hash = hashBuffer(resized.buffer);
|
|
55
134
|
if (lastScreenshotHash.get(udid) === hash) {
|
|
56
135
|
return { message: 'Screenshot unchanged since last capture.', unchanged: true };
|
|
57
136
|
}
|
|
58
137
|
lastScreenshotHash.set(udid, hash);
|
|
59
|
-
return
|
|
60
|
-
{
|
|
61
|
-
data: resized.toString('base64'),
|
|
62
|
-
mimeType: 'image/webp',
|
|
63
|
-
type: 'image',
|
|
64
|
-
},
|
|
65
|
-
];
|
|
138
|
+
return buildResponse(resized);
|
|
66
139
|
}
|
|
67
140
|
catch (err) {
|
|
68
141
|
if (err instanceof processRunner_1.ProcessNotFoundError) {
|
|
@@ -78,7 +151,7 @@ const captureIos = async (udid, runner, width) => {
|
|
|
78
151
|
});
|
|
79
152
|
}
|
|
80
153
|
};
|
|
81
|
-
const captureAndroid = async (serial, runner, width) => {
|
|
154
|
+
const captureAndroid = async (serial, runner, width, region) => {
|
|
82
155
|
try {
|
|
83
156
|
const proc = await runner('adb', ['-s', serial, 'exec-out', 'screencap', '-p'], {
|
|
84
157
|
timeoutMs: SCREENSHOT_TIMEOUT_MS,
|
|
@@ -94,19 +167,13 @@ const captureAndroid = async (serial, runner, width) => {
|
|
|
94
167
|
if (proc.stdout.length === 0) {
|
|
95
168
|
return { error: 'adb screencap returned empty output' };
|
|
96
169
|
}
|
|
97
|
-
const resized = await resizeScreenshot(proc.stdout, width);
|
|
98
|
-
const hash = hashBuffer(resized);
|
|
170
|
+
const resized = await resizeScreenshot(proc.stdout, width, region);
|
|
171
|
+
const hash = hashBuffer(resized.buffer);
|
|
99
172
|
if (lastScreenshotHash.get(serial) === hash) {
|
|
100
173
|
return { message: 'Screenshot unchanged since last capture.', unchanged: true };
|
|
101
174
|
}
|
|
102
175
|
lastScreenshotHash.set(serial, hash);
|
|
103
|
-
return
|
|
104
|
-
{
|
|
105
|
-
data: resized.toString('base64'),
|
|
106
|
-
mimeType: 'image/webp',
|
|
107
|
-
type: 'image',
|
|
108
|
-
},
|
|
109
|
-
];
|
|
176
|
+
return buildResponse(resized);
|
|
110
177
|
}
|
|
111
178
|
catch (err) {
|
|
112
179
|
if (err instanceof processRunner_1.ProcessNotFoundError) {
|
|
@@ -121,22 +188,38 @@ const captureAndroid = async (serial, runner, width) => {
|
|
|
121
188
|
};
|
|
122
189
|
const screenshotTool = (runner) => {
|
|
123
190
|
return {
|
|
124
|
-
description: `
|
|
191
|
+
description: `WebP screenshot, resized to save vision tokens. Response is [image, metadata] where metadata is JSON with { width, height, originalWidth, originalHeight, scale, bytes, region? }.
|
|
192
|
+
|
|
193
|
+
TOKEN BUDGETING
|
|
194
|
+
• Vision tokens are driven by image area. Default width ${SCREENSHOT_DEFAULT_WIDTH} gives a readable full-screen view at ~300 tokens. Bump only to read small text.
|
|
195
|
+
• Pass \`region: { x, y, width, height }\` (physical device pixels) to crop to a single element — typical tap-target shrinks to ~20-60 vision tokens. Grab the rect from fiber_tree__query bounds.
|
|
196
|
+
• { unchanged: true } is returned when the resized bytes are identical to the previous capture — cheap polling.
|
|
197
|
+
|
|
198
|
+
Use fiber_tree bounds for tap targeting; screenshots are for visual verification of what the UI looks like right now.`,
|
|
125
199
|
handler: async (args, ctx) => {
|
|
126
200
|
const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, (0, helpers_1.parseResolveOptions)(args), runner);
|
|
127
201
|
if (!resolved.ok) {
|
|
128
202
|
return { error: resolved.error };
|
|
129
203
|
}
|
|
130
204
|
const width = clampWidth(args.width);
|
|
205
|
+
const region = parseRegion(args.region);
|
|
206
|
+
if (region && 'error' in region) {
|
|
207
|
+
return { error: region.error };
|
|
208
|
+
}
|
|
131
209
|
if (resolved.device.platform === 'ios') {
|
|
132
|
-
return captureIos(resolved.device.nativeId, runner, width);
|
|
210
|
+
return captureIos(resolved.device.nativeId, runner, width, region);
|
|
133
211
|
}
|
|
134
|
-
return captureAndroid(resolved.device.nativeId, runner, width);
|
|
212
|
+
return captureAndroid(resolved.device.nativeId, runner, width, region);
|
|
135
213
|
},
|
|
136
214
|
inputSchema: {
|
|
137
215
|
platform: helpers_1.PLATFORM_ARG_SCHEMA,
|
|
216
|
+
region: {
|
|
217
|
+
description: 'Crop rectangle in original device pixels (top-left origin). Out-of-bounds values are clipped. Typical use: pass fiber_tree bounds ({ x, y, width, height }) to snapshot just one component. Omitted = full screen.',
|
|
218
|
+
examples: [{ height: 128, width: 900, x: 60, y: 200 }],
|
|
219
|
+
type: 'object',
|
|
220
|
+
},
|
|
138
221
|
width: {
|
|
139
|
-
description: `Output width in pixels
|
|
222
|
+
description: `Output width in image pixels (aspect ratio preserved, applied AFTER cropping). Default ${SCREENSHOT_DEFAULT_WIDTH}, clamped ${SCREENSHOT_MIN_WIDTH}..${SCREENSHOT_MAX_WIDTH}. Bump up only if you need to read small text.`,
|
|
140
223
|
type: 'number',
|
|
141
224
|
},
|
|
142
225
|
...helpers_1.NATIVE_ID_SCHEMA,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture.js","sourceRoot":"","sources":["../../../../src/server/host/tools/capture.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAqD;AACrD,+CAAgD;AAChD,qCAAiC;AACjC,yCAAiC;AAEjC,kDAA0B;AAE1B,iEAA6D;AAC7D,mDAAmG;AACnG,+DAAuF;AAGvF,MAAM,qBAAqB,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"capture.js","sourceRoot":"","sources":["../../../../src/server/host/tools/capture.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAqD;AACrD,+CAAgD;AAChD,qCAAiC;AACjC,yCAAiC;AAEjC,kDAA0B;AAE1B,iEAA6D;AAC7D,mDAAmG;AACnG,+DAAuF;AAGvF,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAqS5B,sDAAqB;AApS9B,MAAM,wBAAwB,GAAG,GAAG,CAAC;AACrC,MAAM,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AAC;YACrE,CAAC;YACD,OAAO,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACzE,CAAC;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,6BAAmB;YAC7B,MAAM,EAAE;gBACN,WAAW,EACT,oNAAoN;gBACtN,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;gBACtD,IAAI,EAAE,QAAQ;aACf;YACD,KAAK,EAAE;gBACL,WAAW,EAAE,0FAA0F,wBAAwB,aAAa,oBAAoB,KAAK,oBAAoB,gDAAgD;gBACzO,IAAI,EAAE,QAAQ;aACf;YACD,GAAG,0BAAgB;SACpB;QACD,OAAO,EAAE,qBAAqB;KAC/B,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,cAAc,kBAyCzB"}
|
|
@@ -5,7 +5,7 @@ const deviceResolver_1 = require("../../../server/host/deviceResolver");
|
|
|
5
5
|
const capture_1 = require("./capture");
|
|
6
6
|
const listDevicesTool = (runner) => {
|
|
7
7
|
return {
|
|
8
|
-
description: '
|
|
8
|
+
description: 'Enumerate visible iOS simulators + Android devices. Connected clients are annotated with their clientId; connected devices are listed first in each platform group.',
|
|
9
9
|
handler: async (_args, ctx) => {
|
|
10
10
|
return (0, deviceResolver_1.enrichDevicesWithClientStatus)(ctx.bridge, runner);
|
|
11
11
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devices.js","sourceRoot":"","sources":["../../../../src/server/host/tools/devices.ts"],"names":[],"mappings":";;;AAAA,iEAA6E;AAI7E,uCAAkD;AAE3C,MAAM,eAAe,GAAG,CAAC,MAAqB,EAAmB,EAAE;IACxE,OAAO;QACL,WAAW,EACT
|
|
1
|
+
{"version":3,"file":"devices.js","sourceRoot":"","sources":["../../../../src/server/host/tools/devices.ts"],"names":[],"mappings":";;;AAAA,iEAA6E;AAI7E,uCAAkD;AAE3C,MAAM,eAAe,GAAG,CAAC,MAAqB,EAAmB,EAAE;IACxE,OAAO;QACL,WAAW,EACT,qKAAqK;QACvK,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YAC5B,OAAO,IAAA,8CAA6B,EAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC3D,CAAC;QACD,WAAW,EAAE,EAAE;QACf,OAAO,EAAE,+BAAqB;KAC/B,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,eAAe,mBAU1B"}
|
|
@@ -3,5 +3,8 @@ import { type HostToolHandler } from '../../../server/host/types';
|
|
|
3
3
|
export declare const tapTool: (runner: ProcessRunner) => HostToolHandler;
|
|
4
4
|
export declare const swipeTool: (runner: ProcessRunner) => HostToolHandler;
|
|
5
5
|
export declare const typeTextTool: (runner: ProcessRunner) => HostToolHandler;
|
|
6
|
+
export declare const longPressTool: (runner: ProcessRunner) => HostToolHandler;
|
|
7
|
+
export declare const dragTool: (runner: ProcessRunner) => HostToolHandler;
|
|
8
|
+
export declare const typeTextBatchTool: (runner: ProcessRunner) => HostToolHandler;
|
|
6
9
|
export declare const pressKeyTool: (runner: ProcessRunner) => HostToolHandler;
|
|
7
10
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/server/host/tools/input.ts"],"names":[],"mappings":"AAUA,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/server/host/tools/input.ts"],"names":[],"mappings":"AAUA,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA6J3D,eAAO,MAAM,OAAO,WAAY,aAAa,KAAG,eAoC/C,CAAC;AAEF,eAAO,MAAM,SAAS,WAAY,aAAa,KAAG,eA2EjD,CAAC;AAEF,eAAO,MAAM,YAAY,WAAY,aAAa,KAAG,eA2CpD,CAAC;AASF,eAAO,MAAM,aAAa,WAAY,aAAa,KAAG,eAmDrD,CAAC;AAEF,eAAO,MAAM,QAAQ,WAAY,aAAa,KAAG,eA0EhD,CAAC;AASF,eAAO,MAAM,iBAAiB,WAAY,aAAa,KAAG,eA2FzD,CAAC;AAEF,eAAO,MAAM,YAAY,WAAY,aAAa,KAAG,eAgCpD,CAAC"}
|