react-native-mcp-kit 4.3.0 → 4.4.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/dist/bin/ios-hid +0 -0
- package/dist/server/helpers.d.ts +17 -6
- package/dist/server/helpers.d.ts.map +1 -1
- package/dist/server/helpers.js +86 -14
- package/dist/server/helpers.js.map +1 -1
- package/dist/server/instructions.d.ts +1 -1
- package/dist/server/instructions.d.ts.map +1 -1
- package/dist/server/instructions.js +13 -7
- package/dist/server/instructions.js.map +1 -1
- package/dist/server/tools/assert.d.ts.map +1 -1
- package/dist/server/tools/assert.js +13 -6
- package/dist/server/tools/assert.js.map +1 -1
- package/dist/server/tools/call.js +3 -3
- package/dist/server/tools/call.js.map +1 -1
- package/dist/server/tools/describeTool.js +3 -3
- package/dist/server/tools/describeTool.js.map +1 -1
- package/dist/server/tools/listTools.js +3 -3
- package/dist/server/tools/listTools.js.map +1 -1
- package/dist/server/tools/waitUntil.d.ts.map +1 -1
- package/dist/server/tools/waitUntil.js +13 -6
- package/dist/server/tools/waitUntil.js.map +1 -1
- package/package.json +1 -1
package/dist/bin/ios-hid
CHANGED
|
Binary file
|
package/dist/server/helpers.d.ts
CHANGED
|
@@ -65,13 +65,24 @@ export type ClientIdsParse = {
|
|
|
65
65
|
ok: false;
|
|
66
66
|
};
|
|
67
67
|
/**
|
|
68
|
-
* Normalises the `clientId` arg accepted by every public tool.
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
68
|
+
* Normalises the `clientId` arg accepted by every public tool.
|
|
69
|
+
*
|
|
70
|
+
* Forms:
|
|
71
|
+
* undefined / null — auto-resolve to the single connected client.
|
|
72
|
+
* "ios-1" — literal single-client target (image content passes
|
|
73
|
+
* through, single-shape response).
|
|
74
|
+
* "/^ios/" — regex against connected client IDs; always returns
|
|
75
|
+
* the broadcast envelope (even if matched count is 1).
|
|
76
|
+
* ["ios-1","..."] — array form: literals and regex strings can be mixed.
|
|
77
|
+
* Regex entries are expanded against `bridge.listClients()`
|
|
78
|
+
* and unioned with literals before dedup.
|
|
79
|
+
*
|
|
80
|
+
* Errors when an array entry is non-string / array is empty / a regex matches
|
|
81
|
+
* zero connected clients. Literals that aren't connected are NOT pre-validated
|
|
82
|
+
* here — they fall through to dispatchTool which reports a per-client error,
|
|
83
|
+
* matching the broadcast "not fail-fast" semantics.
|
|
73
84
|
*/
|
|
74
|
-
export declare const parseClientIds: (raw: unknown) => ClientIdsParse;
|
|
85
|
+
export declare const parseClientIds: (raw: unknown, bridge: Bridge) => ClientIdsParse;
|
|
75
86
|
export interface BroadcastDispatch {
|
|
76
87
|
clientId: string;
|
|
77
88
|
result: DispatchResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/server/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAErE,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAE7E,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAA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,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;CACxB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,YACvB,iBAAiB,EAAE,gBACd,CAAC,MAAM,EAAE,OAAO,KAAK,KAAK,CAAC,WAAW,GAAG,YAAY,CAAC,KACnE,KAAK,CAAC,WAAW,GAAG,YAAY,CAgDlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,QACnB,OAAO,KACX;IAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,KAAK,CAAA;CAkB1E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,UAAW,OAAO,KAAG,MAW7C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,UAAW,SAAS,KAAG,MASpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,WACnB,WAAW,gBACL,MAAM,KACnB,mBAAmB,GAAG,IA4BxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,WAAY,WAAW,KAAG,SAAS,EAuC9D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,WAAY,OAAO,KAAG,KAAK,CAAC,WAAW,GAAG,YAAY,CAQ9E,CAAC"}
|
package/dist/server/helpers.js
CHANGED
|
@@ -8,31 +8,82 @@ const jsonError = (msg) => {
|
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
exports.jsonError = jsonError;
|
|
11
|
+
// Same `/body/flags` literal recogniser used by logBox.parsePattern — keep the
|
|
12
|
+
// vocabulary in sync so an agent that knows the form from fiber_tree hook
|
|
13
|
+
// filters can use it here too.
|
|
14
|
+
const REGEX_LITERAL = /^\/(.+)\/([gimsuy]*)$/;
|
|
15
|
+
const tryParseRegex = (raw) => {
|
|
16
|
+
const m = raw.match(REGEX_LITERAL);
|
|
17
|
+
if (!m)
|
|
18
|
+
return null;
|
|
19
|
+
try {
|
|
20
|
+
return new RegExp(m[1], m[2]);
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
return { error: `Invalid regex in clientId "${raw}": ${err.message}` };
|
|
24
|
+
}
|
|
25
|
+
};
|
|
11
26
|
/**
|
|
12
|
-
* Normalises the `clientId` arg accepted by every public tool.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
27
|
+
* Normalises the `clientId` arg accepted by every public tool.
|
|
28
|
+
*
|
|
29
|
+
* Forms:
|
|
30
|
+
* undefined / null — auto-resolve to the single connected client.
|
|
31
|
+
* "ios-1" — literal single-client target (image content passes
|
|
32
|
+
* through, single-shape response).
|
|
33
|
+
* "/^ios/" — regex against connected client IDs; always returns
|
|
34
|
+
* the broadcast envelope (even if matched count is 1).
|
|
35
|
+
* ["ios-1","..."] — array form: literals and regex strings can be mixed.
|
|
36
|
+
* Regex entries are expanded against `bridge.listClients()`
|
|
37
|
+
* and unioned with literals before dedup.
|
|
38
|
+
*
|
|
39
|
+
* Errors when an array entry is non-string / array is empty / a regex matches
|
|
40
|
+
* zero connected clients. Literals that aren't connected are NOT pre-validated
|
|
41
|
+
* here — they fall through to dispatchTool which reports a per-client error,
|
|
42
|
+
* matching the broadcast "not fail-fast" semantics.
|
|
17
43
|
*/
|
|
18
|
-
const parseClientIds = (raw) => {
|
|
44
|
+
const parseClientIds = (raw, bridge) => {
|
|
19
45
|
if (raw === undefined || raw === null)
|
|
20
46
|
return { clientId: undefined, mode: 'single', ok: true };
|
|
21
|
-
if (typeof raw === 'string')
|
|
22
|
-
|
|
47
|
+
if (typeof raw === 'string') {
|
|
48
|
+
const re = tryParseRegex(raw);
|
|
49
|
+
if (re === null)
|
|
50
|
+
return { clientId: raw, mode: 'single', ok: true };
|
|
51
|
+
if ('error' in re)
|
|
52
|
+
return { error: re.error, ok: false };
|
|
53
|
+
const ids = expandRegex(re, bridge);
|
|
54
|
+
if (ids.length === 0) {
|
|
55
|
+
return { error: `Pattern "${raw}" matched no connected clients.`, ok: false };
|
|
56
|
+
}
|
|
57
|
+
return { ids, mode: 'broadcast', ok: true };
|
|
58
|
+
}
|
|
23
59
|
if (Array.isArray(raw)) {
|
|
24
60
|
if (raw.length === 0) {
|
|
25
61
|
return { error: 'clientId array must contain at least one entry.', ok: false };
|
|
26
62
|
}
|
|
27
63
|
const seen = new Set();
|
|
28
64
|
const ids = [];
|
|
29
|
-
for (const
|
|
30
|
-
if (typeof
|
|
65
|
+
for (const entry of raw) {
|
|
66
|
+
if (typeof entry !== 'string') {
|
|
31
67
|
return { error: 'clientId array must contain strings only.', ok: false };
|
|
32
68
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
69
|
+
const re = tryParseRegex(entry);
|
|
70
|
+
if (re && 'error' in re)
|
|
71
|
+
return { error: re.error, ok: false };
|
|
72
|
+
if (re instanceof RegExp) {
|
|
73
|
+
const matched = expandRegex(re, bridge);
|
|
74
|
+
if (matched.length === 0) {
|
|
75
|
+
return { error: `Pattern "${entry}" matched no connected clients.`, ok: false };
|
|
76
|
+
}
|
|
77
|
+
for (const id of matched) {
|
|
78
|
+
if (!seen.has(id)) {
|
|
79
|
+
seen.add(id);
|
|
80
|
+
ids.push(id);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else if (!seen.has(entry)) {
|
|
85
|
+
seen.add(entry);
|
|
86
|
+
ids.push(entry);
|
|
36
87
|
}
|
|
37
88
|
}
|
|
38
89
|
return { ids, mode: 'broadcast', ok: true };
|
|
@@ -40,6 +91,16 @@ const parseClientIds = (raw) => {
|
|
|
40
91
|
return { error: 'clientId must be a string or an array of strings.', ok: false };
|
|
41
92
|
};
|
|
42
93
|
exports.parseClientIds = parseClientIds;
|
|
94
|
+
const expandRegex = (re, bridge) => {
|
|
95
|
+
return bridge
|
|
96
|
+
.listClients()
|
|
97
|
+
.filter((c) => {
|
|
98
|
+
return re.test(c.id);
|
|
99
|
+
})
|
|
100
|
+
.map((c) => {
|
|
101
|
+
return c.id;
|
|
102
|
+
});
|
|
103
|
+
};
|
|
43
104
|
/**
|
|
44
105
|
* Detects an MCP image-content payload (the shape host__screenshot returns)
|
|
45
106
|
* without re-running formatResult. Used to pick the broadcast aggregation
|
|
@@ -66,10 +127,16 @@ const buildBroadcastContent = (results, formatResult) => {
|
|
|
66
127
|
const hasImage = results.some(({ result }) => {
|
|
67
128
|
return result.ok && isImageResult(result.result);
|
|
68
129
|
});
|
|
130
|
+
const okCount = results.reduce((n, { result }) => {
|
|
131
|
+
return n + (result.ok ? 1 : 0);
|
|
132
|
+
}, 0);
|
|
133
|
+
const failedCount = results.length - okCount;
|
|
69
134
|
if (!hasImage) {
|
|
70
135
|
return [
|
|
71
136
|
{
|
|
72
137
|
text: JSON.stringify({
|
|
138
|
+
failedCount,
|
|
139
|
+
okCount,
|
|
73
140
|
results: results.map(({ clientId, result }) => {
|
|
74
141
|
if (result.ok)
|
|
75
142
|
return { clientId, ok: true, result: result.result };
|
|
@@ -80,7 +147,12 @@ const buildBroadcastContent = (results, formatResult) => {
|
|
|
80
147
|
},
|
|
81
148
|
];
|
|
82
149
|
}
|
|
83
|
-
const blocks = [
|
|
150
|
+
const blocks = [
|
|
151
|
+
{
|
|
152
|
+
text: `Broadcast: ${okCount} ok, ${failedCount} failed (${results.length} clients).`,
|
|
153
|
+
type: 'text',
|
|
154
|
+
},
|
|
155
|
+
];
|
|
84
156
|
for (const { clientId, result } of results) {
|
|
85
157
|
blocks.push({ text: `## ${clientId}`, type: 'text' });
|
|
86
158
|
if (result.ok) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/server/helpers.ts"],"names":[],"mappings":";;;AAAA,gDAAqD;AAmD9C,MAAM,SAAS,GAAG,CAAC,GAAW,EAA8B,EAAE;IACnE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K,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC7F,OAAO,MAA2C,CAAC;QACrD,CAAC;IACH,CAAC;IACD,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,CAAC,CAAC;AAC5E,CAAC,CAAC;AARW,QAAA,YAAY,gBAQvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const BASE_INSTRUCTIONS = "You are connected to a running React Native app via the react-native-mcp-kit bridge.\n\nMultiple React Native apps can connect simultaneously \u2014 each is identified by a short ID like \"ios-1\", \"android-1\", or \"client-1\". Use `connection_status` or `list_tools` to see which clients are connected and their IDs, platforms, and labels.\n\n## How to interact\n\n1. Use `connection_status` to check which clients are connected.\n2. Use `list_tools` to browse all available tool names and short descriptions. The response is compact \u2014 modules that are structurally identical across multiple clients are deduplicated into a single entry with a `clientIds` array, and input schemas are omitted. Narrow the listing with `{ module }` or `{ clientId }`, or pass `{ compact: true }` to drop module-level descriptions.\n3. Use `describe_tool` with `{ tool, clientId? }` to fetch the full input schema of a specific tool before calling it. Required when you need to know the argument shape. Host tools are resolved directly (no clientId needed). For in-app tools, omit `clientId` to auto-pick; specify it only when multiple clients have the same tool with different schemas.\n4. Use `call` to invoke any tool with format: module__method (e.g. navigation__navigate). When more than one client is connected, specify `clientId`. When exactly one client is connected, `clientId` is optional \u2014 it's auto-picked. `args` accepts either a plain object or a JSON string \u2014 prefer objects to avoid quote escaping.\n5. Use `wait_until` to poll any tool until a predicate over its result holds (or timeout). Replaces \"screenshot in a loop + sleep\" for state-level waits (\"wait for network to idle\", \"wait for state key X to become Y\"). Predicate supports compound forms: { all: [...] } (AND), { any: [...] } (OR), { not: predicate }.\n6. For UI-level waits (\"wait for a screen to appear\", \"wait for a spinner to disappear\") use `fiber_tree__query` with `waitFor: { until: \"appear\" | \"disappear\", timeout?, interval?, stable? }` \u2014 it polls the same query with cache bypassed until the target state holds. `stable: <ms>` requires continuous presence/absence for that many ms to ignore transient matches during screen transitions.\n7. Use `assert` for a single-shot checkpoint after actions \u2014 same predicate vocabulary as wait_until, returns { pass, actual, expected?, result? }. Natural pair: do action \u2192 wait_until / fiber_tree waitFor \u2192 assert.\n\n### Broadcast \u2014 same call on several clients\n\n`call`, `wait_until` and `assert` accept `clientId` as either a string or an array of strings. A string keeps the single-client shape (image content passes through). An array dispatches the same invocation to every listed client in parallel \u2014 useful for iOS\u2194Android parity, A/B device runs, or asserting a state across all attached apps in one round-trip.\n\n `call({ clientId: [\"ios-1\", \"android-1\"], tool: \"host__screenshot\" })` \u2014 two screenshots in one response\n `wait_until({ clientId: [\"ios-1\", \"android-1\"], tool: \"navigation__get_current_route\", predicate: { op: \"equals\", path: \"name\", value: \"CART\" } })` \u2014 wait until both clients land on CART\n `assert({ clientId: [\"ios-1\", \"android-1\"], tool: \"fiber_tree__query\", args: { mcpId: \"checkout:button:submit\" }, predicate: { op: \"exists\" } })` \u2014 the same fiber exists on both platforms\n\nBroadcast result shapes:\n `call` \u2014 when every per-client result is text, you get one JSON envelope `{ results: [{ clientId, ok, result | error }, ...] }`. When any result is an image (screenshot), per-client `## <clientId>` text headers are interleaved with each client's blocks so each image stays paired with its source.\n `wait_until` \u2014 `{ ok, perClient: [{ clientId, ok, attempts, elapsedMs, matched? | lastResult, lastError?, reason? }, ...] }`; overall `ok` is true only if every client matched within the shared timeout.\n `assert` \u2014 `{ pass, perClient: [{ clientId, pass, actual?, expected?, op?, path?, message?, result?, error? }, ...] }`; overall `pass` is true only when every client passed.\n\n`list_tools` and `describe_tool` also accept an array `clientId` \u2014 there it narrows the considered client set (filter / canonicalisation pool) rather than triggering a broadcast.\n8. Use `host__tap_fiber` to collapse \"fiber_tree__query \u2192 host__tap at bounds\" into one call. Pass fiber_tree steps; if exactly one fiber matches, its center is tapped. Ambiguous match returns the candidate list so you can add `index` or narrow the chain.\n\nSome tools run inline on the MCP server host (e.g. `host__screenshot`, `host__list_devices`, `host__launch_app`, `host__terminate_app`, `host__restart_app`, `metro__reload`, `metro__symbolicate`) and work even when no React Native client is connected. They use xcrun simctl / adb on the dev machine. When `clientId` is provided, host tools use that client's platform/label/deviceId as hints to resolve the target device; otherwise they prefer the device of the single connected client, falling back to the single booted sim / online device. `launch_app`, `terminate_app`, and `restart_app` accept an `appId` arg (iOS bundle ID / Android package name); omit it to reuse the target client's registered `bundleId` from its connection metadata.\n\n## Driving the UI \u2014 pick the right tool\n1. **`host__tap_fiber` with `steps: [...]`** \u2014 the canonical way to simulate a user tap. One call locates the fiber via fiber_tree__query and taps its center through the real OS gesture pipeline, so Pressable feedback, gesture responders, and hit-test logic all run. Ambiguous matches return a candidate list so you can add `index` or narrow `steps`. This is what you want whenever the user asks to simulate a tap / press / button click.\n2. **`fiber_tree__query` with `select: [\"mcpId\",\"name\",\"bounds\"]` + `host__tap`** when you want to inspect a match set before committing \u2014 e.g. verify bounds, or skim candidates before picking one. `props` is opt-in on `select` to keep responses small.\n3. **`fiber_tree__call`** for non-gesture callbacks or imperative ref methods. Pass `prop` to call a callback prop (`{ prop: 'onPress' }`) or `method` to call a native-ref method (`{ method: 'focus' }`). Good when the component is off-screen / virtualised, when a scroll-handler parent swallows taps, or when you're driving focus / blur / measure / scrollTo via the native ref. For simulating a user tap, prefer tap_fiber (above).\n4. **`host__screenshot` + manual coordinate estimation + `host__tap`** ONLY for non-React surfaces: system permission dialogs, native alerts, the on-screen keyboard, WebView content, native splash. These have no fiber and no bounds. Pair with `region: { x, y, width, height }` to screenshot just the area you're inspecting \u2014 vision-token cheap.\n\nGesture tools: `host__tap` / `host__long_press` / `host__swipe` / `host__drag` / `host__type_text` / `host__type_text_batch` / `host__press_key` work on both platforms with no external daemons: Android via `adb shell input`, iOS via a bundled `ios-hid` binary that injects HID events directly into iOS Simulator through SimulatorKit.\n\nStack traces: `errors__get_errors` and `log_box__get_logs` return parsed `stackFrames` you can pass straight into `metro__symbolicate` to resolve bundled frames back to source paths via Metro.\n\n## Consolidated tools \u2014 verb + arg, not verb-per-action\n\nEvery module exposes one verb per concept rather than one tool per variant. Reach for the listing tool with a filter arg, not a tool named after the filter:\n\n- **console** \u2014 `get_logs({ level? })` for all levels (no per-level shortcuts).\n- **errors** \u2014 `get_errors({ fatal? })` covers fatal-only too.\n- **network** \u2014 `get_requests({ status?, method?, url? })` covers errors / pending / URL filter.\n- **log_box** \u2014 `clear({ level? })` (warn / error / syntax / all); `set_installed({ enabled })` toggles install/uninstall.\n- **navigation** \u2014 `navigate({ mode: 'reuse' | 'push' | 'replace' })` covers navigate/push/replace; `pop({ to: <number> | <screenName> | 'top' })` covers pop / pop_to / pop_to_top; `get_current_route({ withState? })` covers the route-state read too.\n- **query** (reactQuery) \u2014 `mutate({ action: 'invalidate' | 'refetch' | 'remove' | 'reset', key? })` covers all four cache mutations.\n- **device** \u2014 `info({ select?: [...] })` aggregates platform / dimensions / pixelRatio / appearance / appState / accessibility / keyboard / initialUrl / dev / identity / app / battery / memoryStorage. `open_url({ dryRun? })` covers the canOpenURL check too.\n- **fiber_tree** \u2014 `query` (all inspection: mcpId / name / testID / props / hooks / bounds / refMethods / children) and `call({ prop? | method? })` (callback prop OR native-ref method) \u2014 two tools cover everything fibers offer.\n\n## Path-based drill into heavy responses\n\nAll listing tools that return heavy JSON (console / network / errors / storage / reactQuery / log_box / navigation / metro events / fiber_tree) accept the standard `path` / `depth` / `maxBytes` projection args. Heavy nested values collapse to compact `${...}`-keyed markers; primitives stay raw. Drill into a specific subtree via the same tool with `path` \u2014 no separate by-id fetcher.\n\n `network__get_requests({ path: '[-1:][0].response.body' })` \u2014 last request's body\n `network__get_requests({ path: '[-1:][0].response.body', depth: 8 })` \u2014 fully expanded\n `console__get_logs({ path: '[-3:][0].args[1]' })` \u2014 second arg of the third-from-last log\n `storage__get_item({ key: 'session', path: 'value.user.email' })` \u2014 drill into a stored value\n `query__get_data({ key: '[\"users\"]', path: 'data.email' })` \u2014 drill into cached data\n\nPath syntax (JS-style):\n `.key` or `[\"key.with.dots\"]` \u2014 object key access\n `[N]` \u2014 index (numeric for arrays, Nth char for strings, Nth key in insertion order for objects)\n `[start:end]` / `[start:]` / `[:end]` \u2014 slice (Python/jq-style; negative indices count from end). Works on arrays, strings, and objects (key slice). After array slice, chained `.key` maps over each element; `[N]` picks one.\n\nPath drilling to a string scalar applies `previewCap` as usual \u2014 long leaves still wrap in a `${str}` marker. To get a raw substring, end the path with a slice: `stack[0:500]` returns the first 500 chars verbatim (slice = explicit truncation request, previewCap bypassed). Default `previewCap` is 250; override per call via `previewCap: <N>`.\n\n`depth` (default per tool, max 8) controls how many container levels are walked before collapsing to a marker. Bump `depth` for an exploratory survey, use `path` for a targeted drill. `maxBytes` (default 50KB) caps the total response size \u2014 overflow is replaced with a single `${str}` marker carrying the original byte count + a preview.\n\nFor `fiber_tree__query`, heavy fields (`props`, `hooks`) take projection knobs per-field via `select` so the rest of the response stays raw:\n `select: [{ props: { path: \"style\", depth: 2 } }]` \u2014 drill into props.style 2 levels deep\n `select: [{ props: { path: \"data[0:5]\" } }]` \u2014 slice path: take first 5 items of props.data\n `select: [{ hooks: { kinds: [\"State\"], names: [\"isLoading\"], withValues: true, depth: 2 } }]` \u2014 filter + project hook values\n `select: [{ children: 5 }]` \u2014 light-only recursive tree walker (5 levels deep); use `scope: \"root\"` as the first step to dump the whole tree. props/hooks not supported inside; sub-children past treeDepth surface as `${arr}: N`.\n\nHook filters: `kinds` (State/Effect/Memo/Ref/Custom/...), `names` (exact or `/regex/flags`), `withValues` (adds resolved values), `expansionDepth` (caps custom-hook recursion), `format: \"tree\"` (nested children vs flat `via` chains). Each hook entry carries `{ kind, name, hook?, via?, expanded? }`. Sensitive names (password, token, jwt, secret, credential, apiKey, authorization, Pin suffix) are auto-redacted; configure via `fiberTreeModule({ redactHookNames, additionalRedactHookNames })`.\n\nMarker format: `{ \"${obj}\": N }` for collapsed objects (N keys), `{ \"${arr}\": N }` for arrays (N items), `{ \"${fun}\": \"name\" }` for functions, `{ \"${str}\": { len, preview } }` for long strings (>`previewCap`, default 250), `{ \"${Date}\": \"iso\" }` for Date, `{ \"${Err}\": { name, msg } }` for Error, `{ \"${RegExp}\": \"/.../i\" }` for RegExp, `{ \"${map}\": N }` / `{ \"${set}\": N }` for Map/Set sizes, `{ \"${cyc}\": true }` for cycles, `{ \"${ref}\": { mcpId, name } }` for fiber/native refs, `{ \"${cls}\": { name, len } }` for class instances, `{ \"${truncated}\": { total, slice } }` first key/item when a container is wider than the cap (30 keys for objects, 50 items for arrays).\n";
|
|
1
|
+
export declare const BASE_INSTRUCTIONS = "You are connected to a running React Native app via the react-native-mcp-kit bridge.\n\nMultiple React Native apps can connect simultaneously \u2014 each is identified by a short ID like \"ios-1\", \"android-1\", or \"client-1\". Use `connection_status` or `list_tools` to see which clients are connected and their IDs, platforms, and labels.\n\n## How to interact\n\n1. Use `connection_status` to check which clients are connected.\n2. Use `list_tools` to browse all available tool names and short descriptions. The response is compact \u2014 modules that are structurally identical across multiple clients are deduplicated into a single entry with a `clientIds` array, and input schemas are omitted. Narrow the listing with `{ module }` or `{ clientId }`, or pass `{ compact: true }` to drop module-level descriptions.\n3. Use `describe_tool` with `{ tool, clientId? }` to fetch the full input schema of a specific tool before calling it. Required when you need to know the argument shape. Host tools are resolved directly (no clientId needed). For in-app tools, omit `clientId` to auto-pick; specify it only when multiple clients have the same tool with different schemas.\n4. Use `call` to invoke any tool with format: module__method (e.g. navigation__navigate). When more than one client is connected, specify `clientId`. When exactly one client is connected, `clientId` is optional \u2014 it's auto-picked. `args` accepts either a plain object or a JSON string \u2014 prefer objects to avoid quote escaping.\n5. Use `wait_until` to poll any tool until a predicate over its result holds (or timeout). Replaces \"screenshot in a loop + sleep\" for state-level waits (\"wait for network to idle\", \"wait for state key X to become Y\"). Predicate supports compound forms: { all: [...] } (AND), { any: [...] } (OR), { not: predicate }.\n6. For UI-level waits (\"wait for a screen to appear\", \"wait for a spinner to disappear\") use `fiber_tree__query` with `waitFor: { until: \"appear\" | \"disappear\", timeout?, interval?, stable? }` \u2014 it polls the same query with cache bypassed until the target state holds. `stable: <ms>` requires continuous presence/absence for that many ms to ignore transient matches during screen transitions.\n7. Use `assert` for a single-shot checkpoint after actions \u2014 same predicate vocabulary as wait_until, returns { pass, actual, expected?, result? }. Natural pair: do action \u2192 wait_until / fiber_tree waitFor \u2192 assert.\n\n### Broadcast \u2014 same call on several clients\n\n`call`, `wait_until` and `assert` accept `clientId` as a string, a `/body/flags` regex literal, or an array (literals and regex mixed). A plain string keeps the single-client shape (image content passes through). Regex and array forms switch into broadcast mode \u2014 every matching connected client is dispatched in parallel. Same regex slash form as fiber_tree hook filters and log_box ignore patterns.\n\n `call({ clientId: [\"ios-1\", \"android-1\"], tool: \"host__screenshot\" })` \u2014 two screenshots in one response\n `call({ clientId: \"/^ios/\", tool: \"host__screenshot\" })` \u2014 broadcast to every connected iOS client\n `wait_until({ clientId: [\"ios-1\", \"android-1\"], tool: \"navigation__get_current_route\", predicate: { op: \"equals\", path: \"name\", value: \"CART\" } })` \u2014 wait until both clients land on CART\n `assert({ clientId: \"/./\", tool: \"fiber_tree__query\", args: { mcpId: \"checkout:button:submit\" }, predicate: { op: \"exists\" } })` \u2014 the same fiber exists on every connected client\n\nBroadcast result shapes (each carries top-level counters so you can pick out failures without scanning per-client):\n `call` \u2014 text-only: `{ okCount, failedCount, results: [{ clientId, ok, result | error }, ...] }`. Image results: a summary text block `Broadcast: N ok, M failed (T clients).` precedes per-client `## <clientId>` headers + blocks.\n `wait_until` \u2014 `{ ok, okCount, failedCount, perClient: [{ clientId, ok, attempts, elapsedMs, matched? | lastResult, lastError?, reason? }, ...] }`; overall `ok` is true only if every client matched within the shared timeout.\n `assert` \u2014 `{ pass, passedCount, failedCount, perClient: [{ clientId, pass, actual?, expected?, op?, path?, message?, result?, error? }, ...] }`; overall `pass` is true only when every client passed.\n\n`list_tools` and `describe_tool` accept the same regex / array forms \u2014 there they narrow the considered client set (filter / canonicalisation pool) rather than triggering a broadcast.\n\nRegex form details:\n \u2022 A leading `/` plus a trailing `/<flags>` switches the string into regex mode. Flags from `[gimsuy]`. Anything else is treated as a literal client ID.\n \u2022 Pattern is matched against connected client IDs (`ios-1`, `android-2`, \u2026). `\"/./\"` matches every connected client; `\"/^ios/\"` only iOS; `\"/-1$/\"` only the first client per platform.\n \u2022 Pattern that matches zero connected clients returns an error up front \u2014 broadcasting to nobody is almost always a mistake. Literals that are unconnected still fall through to the per-client error in the broadcast envelope (matches the not-fail-fast contract).\n8. Use `host__tap_fiber` to collapse \"fiber_tree__query \u2192 host__tap at bounds\" into one call. Pass fiber_tree steps; if exactly one fiber matches, its center is tapped. Ambiguous match returns the candidate list so you can add `index` or narrow the chain.\n\nSome tools run inline on the MCP server host (e.g. `host__screenshot`, `host__list_devices`, `host__launch_app`, `host__terminate_app`, `host__restart_app`, `metro__reload`, `metro__symbolicate`) and work even when no React Native client is connected. They use xcrun simctl / adb on the dev machine. When `clientId` is provided, host tools use that client's platform/label/deviceId as hints to resolve the target device; otherwise they prefer the device of the single connected client, falling back to the single booted sim / online device. `launch_app`, `terminate_app`, and `restart_app` accept an `appId` arg (iOS bundle ID / Android package name); omit it to reuse the target client's registered `bundleId` from its connection metadata.\n\n## Driving the UI \u2014 pick the right tool\n1. **`host__tap_fiber` with `steps: [...]`** \u2014 the canonical way to simulate a user tap. One call locates the fiber via fiber_tree__query and taps its center through the real OS gesture pipeline, so Pressable feedback, gesture responders, and hit-test logic all run. Ambiguous matches return a candidate list so you can add `index` or narrow `steps`. This is what you want whenever the user asks to simulate a tap / press / button click.\n2. **`fiber_tree__query` with `select: [\"mcpId\",\"name\",\"bounds\"]` + `host__tap`** when you want to inspect a match set before committing \u2014 e.g. verify bounds, or skim candidates before picking one. `props` is opt-in on `select` to keep responses small.\n3. **`fiber_tree__call`** for non-gesture callbacks or imperative ref methods. Pass `prop` to call a callback prop (`{ prop: 'onPress' }`) or `method` to call a native-ref method (`{ method: 'focus' }`). Good when the component is off-screen / virtualised, when a scroll-handler parent swallows taps, or when you're driving focus / blur / measure / scrollTo via the native ref. For simulating a user tap, prefer tap_fiber (above).\n4. **`host__screenshot` + manual coordinate estimation + `host__tap`** ONLY for non-React surfaces: system permission dialogs, native alerts, the on-screen keyboard, WebView content, native splash. These have no fiber and no bounds. Pair with `region: { x, y, width, height }` to screenshot just the area you're inspecting \u2014 vision-token cheap.\n\nGesture tools: `host__tap` / `host__long_press` / `host__swipe` / `host__drag` / `host__type_text` / `host__type_text_batch` / `host__press_key` work on both platforms with no external daemons: Android via `adb shell input`, iOS via a bundled `ios-hid` binary that injects HID events directly into iOS Simulator through SimulatorKit.\n\nStack traces: `errors__get_errors` and `log_box__get_logs` return parsed `stackFrames` you can pass straight into `metro__symbolicate` to resolve bundled frames back to source paths via Metro.\n\n## Consolidated tools \u2014 verb + arg, not verb-per-action\n\nEvery module exposes one verb per concept rather than one tool per variant. Reach for the listing tool with a filter arg, not a tool named after the filter:\n\n- **console** \u2014 `get_logs({ level? })` for all levels (no per-level shortcuts).\n- **errors** \u2014 `get_errors({ fatal? })` covers fatal-only too.\n- **network** \u2014 `get_requests({ status?, method?, url? })` covers errors / pending / URL filter.\n- **log_box** \u2014 `clear({ level? })` (warn / error / syntax / all); `set_installed({ enabled })` toggles install/uninstall.\n- **navigation** \u2014 `navigate({ mode: 'reuse' | 'push' | 'replace' })` covers navigate/push/replace; `pop({ to: <number> | <screenName> | 'top' })` covers pop / pop_to / pop_to_top; `get_current_route({ withState? })` covers the route-state read too.\n- **query** (reactQuery) \u2014 `mutate({ action: 'invalidate' | 'refetch' | 'remove' | 'reset', key? })` covers all four cache mutations.\n- **device** \u2014 `info({ select?: [...] })` aggregates platform / dimensions / pixelRatio / appearance / appState / accessibility / keyboard / initialUrl / dev / identity / app / battery / memoryStorage. `open_url({ dryRun? })` covers the canOpenURL check too.\n- **fiber_tree** \u2014 `query` (all inspection: mcpId / name / testID / props / hooks / bounds / refMethods / children) and `call({ prop? | method? })` (callback prop OR native-ref method) \u2014 two tools cover everything fibers offer.\n\n## Path-based drill into heavy responses\n\nAll listing tools that return heavy JSON (console / network / errors / storage / reactQuery / log_box / navigation / metro events / fiber_tree) accept the standard `path` / `depth` / `maxBytes` projection args. Heavy nested values collapse to compact `${...}`-keyed markers; primitives stay raw. Drill into a specific subtree via the same tool with `path` \u2014 no separate by-id fetcher.\n\n `network__get_requests({ path: '[-1:][0].response.body' })` \u2014 last request's body\n `network__get_requests({ path: '[-1:][0].response.body', depth: 8 })` \u2014 fully expanded\n `console__get_logs({ path: '[-3:][0].args[1]' })` \u2014 second arg of the third-from-last log\n `storage__get_item({ key: 'session', path: 'value.user.email' })` \u2014 drill into a stored value\n `query__get_data({ key: '[\"users\"]', path: 'data.email' })` \u2014 drill into cached data\n\nPath syntax (JS-style):\n `.key` or `[\"key.with.dots\"]` \u2014 object key access\n `[N]` \u2014 index (numeric for arrays, Nth char for strings, Nth key in insertion order for objects)\n `[start:end]` / `[start:]` / `[:end]` \u2014 slice (Python/jq-style; negative indices count from end). Works on arrays, strings, and objects (key slice). After array slice, chained `.key` maps over each element; `[N]` picks one.\n\nPath drilling to a string scalar applies `previewCap` as usual \u2014 long leaves still wrap in a `${str}` marker. To get a raw substring, end the path with a slice: `stack[0:500]` returns the first 500 chars verbatim (slice = explicit truncation request, previewCap bypassed). Default `previewCap` is 250; override per call via `previewCap: <N>`.\n\n`depth` (default per tool, max 8) controls how many container levels are walked before collapsing to a marker. Bump `depth` for an exploratory survey, use `path` for a targeted drill. `maxBytes` (default 50KB) caps the total response size \u2014 overflow is replaced with a single `${str}` marker carrying the original byte count + a preview.\n\nFor `fiber_tree__query`, heavy fields (`props`, `hooks`) take projection knobs per-field via `select` so the rest of the response stays raw:\n `select: [{ props: { path: \"style\", depth: 2 } }]` \u2014 drill into props.style 2 levels deep\n `select: [{ props: { path: \"data[0:5]\" } }]` \u2014 slice path: take first 5 items of props.data\n `select: [{ hooks: { kinds: [\"State\"], names: [\"isLoading\"], withValues: true, depth: 2 } }]` \u2014 filter + project hook values\n `select: [{ children: 5 }]` \u2014 light-only recursive tree walker (5 levels deep); use `scope: \"root\"` as the first step to dump the whole tree. props/hooks not supported inside; sub-children past treeDepth surface as `${arr}: N`.\n\nHook filters: `kinds` (State/Effect/Memo/Ref/Custom/...), `names` (exact or `/regex/flags`), `withValues` (adds resolved values), `expansionDepth` (caps custom-hook recursion), `format: \"tree\"` (nested children vs flat `via` chains). Each hook entry carries `{ kind, name, hook?, via?, expanded? }`. Sensitive names (password, token, jwt, secret, credential, apiKey, authorization, Pin suffix) are auto-redacted; configure via `fiberTreeModule({ redactHookNames, additionalRedactHookNames })`.\n\nMarker format: `{ \"${obj}\": N }` for collapsed objects (N keys), `{ \"${arr}\": N }` for arrays (N items), `{ \"${fun}\": \"name\" }` for functions, `{ \"${str}\": { len, preview } }` for long strings (>`previewCap`, default 250), `{ \"${Date}\": \"iso\" }` for Date, `{ \"${Err}\": { name, msg } }` for Error, `{ \"${RegExp}\": \"/.../i\" }` for RegExp, `{ \"${map}\": N }` / `{ \"${set}\": N }` for Map/Set sizes, `{ \"${cyc}\": true }` for cycles, `{ \"${ref}\": { mcpId, name } }` for fiber/native refs, `{ \"${cls}\": { name, len } }` for class instances, `{ \"${truncated}\": { total, slice } }` first key/item when a container is wider than the cap (30 keys for objects, 50 items for arrays).\n";
|
|
2
2
|
//# sourceMappingURL=instructions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/server/instructions.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/server/instructions.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,ylbAyF7B,CAAC"}
|
|
@@ -18,18 +18,24 @@ Multiple React Native apps can connect simultaneously — each is identified by
|
|
|
18
18
|
|
|
19
19
|
### Broadcast — same call on several clients
|
|
20
20
|
|
|
21
|
-
\`call\`, \`wait_until\` and \`assert\` accept \`clientId\` as
|
|
21
|
+
\`call\`, \`wait_until\` and \`assert\` accept \`clientId\` as a string, a \`/body/flags\` regex literal, or an array (literals and regex mixed). A plain string keeps the single-client shape (image content passes through). Regex and array forms switch into broadcast mode — every matching connected client is dispatched in parallel. Same regex slash form as fiber_tree hook filters and log_box ignore patterns.
|
|
22
22
|
|
|
23
23
|
\`call({ clientId: ["ios-1", "android-1"], tool: "host${protocol_1.MODULE_SEPARATOR}screenshot" })\` — two screenshots in one response
|
|
24
|
+
\`call({ clientId: "/^ios/", tool: "host${protocol_1.MODULE_SEPARATOR}screenshot" })\` — broadcast to every connected iOS client
|
|
24
25
|
\`wait_until({ clientId: ["ios-1", "android-1"], tool: "navigation${protocol_1.MODULE_SEPARATOR}get_current_route", predicate: { op: "equals", path: "name", value: "CART" } })\` — wait until both clients land on CART
|
|
25
|
-
\`assert({ clientId:
|
|
26
|
+
\`assert({ clientId: "/./", tool: "fiber_tree${protocol_1.MODULE_SEPARATOR}query", args: { mcpId: "checkout:button:submit" }, predicate: { op: "exists" } })\` — the same fiber exists on every connected client
|
|
26
27
|
|
|
27
|
-
Broadcast result shapes:
|
|
28
|
-
\`call\` —
|
|
29
|
-
\`wait_until\` — \`{ ok, perClient: [{ clientId, ok, attempts, elapsedMs, matched? | lastResult, lastError?, reason? }, ...] }\`; overall \`ok\` is true only if every client matched within the shared timeout.
|
|
30
|
-
\`assert\` — \`{ pass, perClient: [{ clientId, pass, actual?, expected?, op?, path?, message?, result?, error? }, ...] }\`; overall \`pass\` is true only when every client passed.
|
|
28
|
+
Broadcast result shapes (each carries top-level counters so you can pick out failures without scanning per-client):
|
|
29
|
+
\`call\` — text-only: \`{ okCount, failedCount, results: [{ clientId, ok, result | error }, ...] }\`. Image results: a summary text block \`Broadcast: N ok, M failed (T clients).\` precedes per-client \`## <clientId>\` headers + blocks.
|
|
30
|
+
\`wait_until\` — \`{ ok, okCount, failedCount, perClient: [{ clientId, ok, attempts, elapsedMs, matched? | lastResult, lastError?, reason? }, ...] }\`; overall \`ok\` is true only if every client matched within the shared timeout.
|
|
31
|
+
\`assert\` — \`{ pass, passedCount, failedCount, perClient: [{ clientId, pass, actual?, expected?, op?, path?, message?, result?, error? }, ...] }\`; overall \`pass\` is true only when every client passed.
|
|
31
32
|
|
|
32
|
-
\`list_tools\` and \`describe_tool\`
|
|
33
|
+
\`list_tools\` and \`describe_tool\` accept the same regex / array forms — there they narrow the considered client set (filter / canonicalisation pool) rather than triggering a broadcast.
|
|
34
|
+
|
|
35
|
+
Regex form details:
|
|
36
|
+
• A leading \`/\` plus a trailing \`/<flags>\` switches the string into regex mode. Flags from \`[gimsuy]\`. Anything else is treated as a literal client ID.
|
|
37
|
+
• Pattern is matched against connected client IDs (\`ios-1\`, \`android-2\`, …). \`"/./"\` matches every connected client; \`"/^ios/"\` only iOS; \`"/-1$/"\` only the first client per platform.
|
|
38
|
+
• Pattern that matches zero connected clients returns an error up front — broadcasting to nobody is almost always a mistake. Literals that are unconnected still fall through to the per-client error in the broadcast envelope (matches the not-fail-fast contract).
|
|
33
39
|
8. Use \`host${protocol_1.MODULE_SEPARATOR}tap_fiber\` to collapse "fiber_tree__query → host__tap at bounds" into one call. Pass fiber_tree steps; if exactly one fiber matches, its center is tapped. Ambiguous match returns the candidate list so you can add \`index\` or narrow the chain.
|
|
34
40
|
|
|
35
41
|
Some tools run inline on the MCP server host (e.g. \`host${protocol_1.MODULE_SEPARATOR}screenshot\`, \`host${protocol_1.MODULE_SEPARATOR}list_devices\`, \`host${protocol_1.MODULE_SEPARATOR}launch_app\`, \`host${protocol_1.MODULE_SEPARATOR}terminate_app\`, \`host${protocol_1.MODULE_SEPARATOR}restart_app\`, \`metro${protocol_1.MODULE_SEPARATOR}reload\`, \`metro${protocol_1.MODULE_SEPARATOR}symbolicate\`) and work even when no React Native client is connected. They use xcrun simctl / adb on the dev machine. When \`clientId\` is provided, host tools use that client's platform/label/deviceId as hints to resolve the target device; otherwise they prefer the device of the single connected client, falling back to the single booted sim / online device. \`launch_app\`, \`terminate_app\`, and \`restart_app\` accept an \`appId\` arg (iOS bundle ID / Android package name); omit it to reuse the target client's registered \`bundleId\` from its connection metadata.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/server/instructions.ts"],"names":[],"mappings":";;;AAAA,gDAAqD;AAExC,QAAA,iBAAiB,GAAG;;;;;;;;;wDASuB,2BAAgB,0BAA0B,2BAAgB;;2GAEP,2BAAgB;;;;;;;0DAOjE,2BAAgB;
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/server/instructions.ts"],"names":[],"mappings":";;;AAAA,gDAAqD;AAExC,QAAA,iBAAiB,GAAG;;;;;;;;;wDASuB,2BAAgB,0BAA0B,2BAAgB;;2GAEP,2BAAgB;;;;;;;0DAOjE,2BAAgB;4CAC9B,2BAAgB;sEACU,2BAAgB;iDACrC,2BAAgB;;;;;;;;;;;;;eAalD,2BAAgB;;2DAE4B,2BAAgB,uBAAuB,2BAAgB,yBAAyB,2BAAgB,uBAAuB,2BAAgB,0BAA0B,2BAAgB,yBAAyB,2BAAgB,oBAAoB,2BAAgB;;;aAG5S,2BAAgB;mBACV,2BAAgB,8DAA8D,2BAAgB;mBAC9F,2BAAgB;aACtB,2BAAgB,uDAAuD,2BAAgB;;uBAE7E,2BAAgB,iBAAiB,2BAAgB,wBAAwB,2BAAgB,mBAAmB,2BAAgB,kBAAkB,2BAAgB,uBAAuB,2BAAgB,6BAA6B,2BAAgB;;wBAEjP,2BAAgB,6BAA6B,2BAAgB,8EAA8E,2BAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ClL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../src/server/tools/assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AA4C1B,eAAO,MAAM,kBAAkB,QAAS,SAAS,OAAO,aAAa,KAAG,
|
|
1
|
+
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../src/server/tools/assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AA4C1B,eAAO,MAAM,kBAAkB,QAAS,SAAS,OAAO,aAAa,KAAG,IA0FvE,CAAC"}
|
|
@@ -55,7 +55,7 @@ Useful after wait_until as a checkpoint — the pair reads "do action → wait
|
|
|
55
55
|
clientId: zod_1.z
|
|
56
56
|
.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())])
|
|
57
57
|
.optional()
|
|
58
|
-
.describe('Target client ID(s). String asserts on one client; array
|
|
58
|
+
.describe('Target client ID(s). String asserts on one client; `/body/flags` literal ("/^ios/") expands to every matching connected client; array mixes literals and regex strings. Broadcast forms run the assertion on each matched client in parallel. Same auto-resolution semantics as `call`.'),
|
|
59
59
|
message: zod_1.z
|
|
60
60
|
.string()
|
|
61
61
|
.optional()
|
|
@@ -71,7 +71,7 @@ Useful after wait_until as a checkpoint — the pair reads "do action → wait
|
|
|
71
71
|
const parsedArgs = (0, helpers_1.parseCallArgs)(args);
|
|
72
72
|
if (!parsedArgs.ok)
|
|
73
73
|
return (0, helpers_1.jsonError)(parsedArgs.error);
|
|
74
|
-
const clients = (0, helpers_1.parseClientIds)(clientId);
|
|
74
|
+
const clients = (0, helpers_1.parseClientIds)(clientId, ctx.bridge);
|
|
75
75
|
if (!clients.ok)
|
|
76
76
|
return (0, helpers_1.jsonError)(clients.error);
|
|
77
77
|
const pred = predicate;
|
|
@@ -91,11 +91,18 @@ Useful after wait_until as a checkpoint — the pair reads "do action → wait
|
|
|
91
91
|
const entry = evaluate(dispatch, pred, isLeaf, leafPath, leafValue, leafOp, message);
|
|
92
92
|
return { clientId: id, ...entry };
|
|
93
93
|
}));
|
|
94
|
-
const
|
|
95
|
-
return entry.pass === true;
|
|
96
|
-
});
|
|
94
|
+
const passedCount = perClient.reduce((n, entry) => {
|
|
95
|
+
return n + (entry.pass === true ? 1 : 0);
|
|
96
|
+
}, 0);
|
|
97
|
+
const failedCount = perClient.length - passedCount;
|
|
98
|
+
const pass = failedCount === 0;
|
|
97
99
|
return {
|
|
98
|
-
content: [
|
|
100
|
+
content: [
|
|
101
|
+
{
|
|
102
|
+
text: JSON.stringify({ failedCount, pass, passedCount, perClient }, null, 2),
|
|
103
|
+
type: 'text',
|
|
104
|
+
},
|
|
105
|
+
],
|
|
99
106
|
};
|
|
100
107
|
});
|
|
101
108
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../../../src/server/tools/assert.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AAExB,8CAM0B;AAC1B,kDAM4B;AAC5B,gDAAqD;AAOrD,MAAM,QAAQ,GAAG,CACf,QAAwB,EACxB,IAAe,EACf,MAAe,EACf,QAA4B,EAC5B,SAAkB,EAClB,MAA0B,EAC1B,OAA2B,EACZ,EAAE;IACjB,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,OAAO,GAAkB,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACtE,IAAI,OAAO;YAAE,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;QACvC,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,MAAM,IAAI,GAAG,IAAA,yBAAa,EAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAClD,MAAM,OAAO,GAAkB,EAAE,IAAI,EAAE,CAAC;IACxC,IAAI,MAAM;QAAE,OAAO,CAAC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EAAE,GAAG,KAAK,EAAE,CAAC;QACpC,CAAC,CAAC,CACH,CAAC;QACF,MAAM,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;YAChD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC,EAAE,CAAC,CAAC,CAAC;QACN,MAAM,WAAW,GAAG,SAAS,CAAC,MAAM,GAAG,WAAW,CAAC;QACnD,MAAM,IAAI,GAAG,WAAW,KAAK,CAAC,CAAC;QAC/B,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;oBAC5E,IAAI,EAAE,MAAe;iBACtB;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AA1FW,QAAA,kBAAkB,sBA0F7B"}
|
|
@@ -10,7 +10,7 @@ const registerCallTool = (mcp, ctx) => {
|
|
|
10
10
|
openWorldHint: true,
|
|
11
11
|
title: 'Call Tool',
|
|
12
12
|
},
|
|
13
|
-
description: 'Call a tool registered by a React Native app client. Use list_tools first to see available tools. When multiple clients are connected, specify clientId; otherwise it is auto-picked. Pass `
|
|
13
|
+
description: 'Call a tool registered by a React Native app client. Use list_tools first to see available tools. When multiple clients are connected, specify clientId; otherwise it is auto-picked. Pass an array (`["ios-1", "android-1"]`) or a `/regex/flags` literal (`"/^ios/"`) to broadcast the same call to several clients in parallel — useful for iOS↔Android parity checks. `args` accepts either a plain object or a JSON string — objects are preferred to avoid escaping quotes.',
|
|
14
14
|
inputSchema: {
|
|
15
15
|
args: zod_1.z
|
|
16
16
|
.union([zod_1.z.string(), zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())])
|
|
@@ -19,7 +19,7 @@ const registerCallTool = (mcp, ctx) => {
|
|
|
19
19
|
clientId: zod_1.z
|
|
20
20
|
.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())])
|
|
21
21
|
.optional()
|
|
22
|
-
.describe('Target client ID(s).
|
|
22
|
+
.describe('Target client ID(s). Plain string ("ios-1") selects one client. `/body/flags` literal ("/^ios/") matches connected IDs by regex and broadcasts to every match. Array ([ "ios-1", "/^android/" ]) accepts literals and regex strings mixed — entries are unioned and dedup\'d. Optional when exactly one client is connected.'),
|
|
23
23
|
tool: zod_1.z
|
|
24
24
|
.string()
|
|
25
25
|
.describe(`Tool name in format "module${protocol_1.MODULE_SEPARATOR}method" (e.g. "navigation${protocol_1.MODULE_SEPARATOR}navigate")`),
|
|
@@ -28,7 +28,7 @@ const registerCallTool = (mcp, ctx) => {
|
|
|
28
28
|
const parsed = (0, helpers_1.parseCallArgs)(args);
|
|
29
29
|
if (!parsed.ok)
|
|
30
30
|
return (0, helpers_1.jsonError)(parsed.error);
|
|
31
|
-
const clients = (0, helpers_1.parseClientIds)(clientId);
|
|
31
|
+
const clients = (0, helpers_1.parseClientIds)(clientId, ctx.bridge);
|
|
32
32
|
if (!clients.ok)
|
|
33
33
|
return (0, helpers_1.jsonError)(clients.error);
|
|
34
34
|
if (clients.mode === 'single') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../../src/server/tools/call.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AAExB,8CAO0B;AAC1B,gDAAqD;AAE9C,MAAM,gBAAgB,GAAG,CAAC,GAAc,EAAE,GAAkB,EAAQ,EAAE;IAC3E,GAAG,CAAC,YAAY,CACd,MAAM,EACN;QACE,WAAW,EAAE;YACX,aAAa,EAAE,IAAI;YACnB,KAAK,EAAE,WAAW;SACnB;QACD,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../../src/server/tools/call.ts"],"names":[],"m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EjD,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC7E,IAAI,CAAC,QAAQ,CAAC,EAAE;gBAAE,OAAO,IAAA,mBAAS,EAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YACnD,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACxD,CAAC;QAED,MAAM,OAAO,GAAwB,MAAM,OAAO,CAAC,GAAG,CACpD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;YAC3B,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC7D,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;QAClC,CAAC,CAAC,CACH,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,IAAA,+BAAqB,EAAC,OAAO,EAAE,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;IACvE,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AApDW,QAAA,gBAAgB,oBAoD3B"}
|
|
@@ -10,18 +10,18 @@ const registerDescribeToolTool = (mcp, ctx) => {
|
|
|
10
10
|
readOnlyHint: true,
|
|
11
11
|
title: 'Describe Tool',
|
|
12
12
|
},
|
|
13
|
-
description: 'Fetch the full description and input schema for a single tool. Use this after list_tools to learn how to construct arguments for a tool before calling it. For host tools, clientId is ignored. For in-app tools, omit clientId to auto-pick the shared descriptor;
|
|
13
|
+
description: 'Fetch the full description and input schema for a single tool. Use this after list_tools to learn how to construct arguments for a tool before calling it. For host tools, clientId is ignored. For in-app tools, omit clientId to auto-pick the shared descriptor; pass a literal string to pin to one client, a `/body/flags` regex to narrow the canonicalisation pool to matching IDs, or an array (literals and regex mixed) for an explicit subset.',
|
|
14
14
|
inputSchema: {
|
|
15
15
|
clientId: zod_1.z
|
|
16
16
|
.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())])
|
|
17
17
|
.optional()
|
|
18
|
-
.describe('Target client(s) for in-app tools. String pins to one client; array
|
|
18
|
+
.describe('Target client(s) for in-app tools. String pins to one client; `/body/flags` regex or array narrow the canonicalisation pool to matching IDs. Ignored for host tools.'),
|
|
19
19
|
tool: zod_1.z
|
|
20
20
|
.string()
|
|
21
21
|
.describe(`Full tool name in the format "module${protocol_1.MODULE_SEPARATOR}method" (e.g. "navigation${protocol_1.MODULE_SEPARATOR}navigate", "host${protocol_1.MODULE_SEPARATOR}screenshot").`),
|
|
22
22
|
},
|
|
23
23
|
}, async ({ clientId, tool }) => {
|
|
24
|
-
const parsedClient = (0, helpers_1.parseClientIds)(clientId);
|
|
24
|
+
const parsedClient = (0, helpers_1.parseClientIds)(clientId, ctx.bridge);
|
|
25
25
|
if (!parsedClient.ok)
|
|
26
26
|
return (0, helpers_1.jsonError)(parsedClient.error);
|
|
27
27
|
// 1. Host tool path — resolved via hostToolMap, clientId is ignored
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describeTool.js","sourceRoot":"","sources":["../../../src/server/tools/describeTool.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AAExB,8CAO0B;AAC1B,gDAAqD;AAE9C,MAAM,wBAAwB,GAAG,CAAC,GAAc,EAAE,GAAkB,EAAQ,EAAE;IACnF,GAAG,CAAC,YAAY,CACd,eAAe,EACf;QACE,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,KAAK,EAAE,eAAe;SACvB;QACD,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"describeTool.js","sourceRoot":"","sources":["../../../src/server/tools/describeTool.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AAExB,8CAO0B;AA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AC;QAED,MAAM,UAAU,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;aACrC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;YACrB,OAAO,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,OAAO,IAAA,mBAAS,EACd,SAAS,IAAI,wDAAwD,UAAU,qBAAqB,CACrG,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AAhLW,QAAA,wBAAwB,4BAgLnC"}
|
|
@@ -10,12 +10,12 @@ const registerListToolsTool = (mcp, ctx) => {
|
|
|
10
10
|
readOnlyHint: true,
|
|
11
11
|
title: 'List Tools',
|
|
12
12
|
},
|
|
13
|
-
description: 'Browse available tools with compact (schema-free) descriptions. Modules with identical shape across multiple clients are deduplicated into a single entry with a clientIds array. Use describe_tool to fetch the full input schema for a specific tool before calling it. Pass `module` to narrow to one module, `clientId` to narrow to one client (string)
|
|
13
|
+
description: 'Browse available tools with compact (schema-free) descriptions. Modules with identical shape across multiple clients are deduplicated into a single entry with a clientIds array. Use describe_tool to fetch the full input schema for a specific tool before calling it. Pass `module` to narrow to one module, `clientId` to narrow to one client (string), several clients (array), or by regex (`"/^ios/"`), `compact: true` to drop long module-level descriptions.',
|
|
14
14
|
inputSchema: {
|
|
15
15
|
clientId: zod_1.z
|
|
16
16
|
.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())])
|
|
17
17
|
.optional()
|
|
18
|
-
.describe('Narrow listing to a single client (string) or several clients (array). Omit for all connected clients.'),
|
|
18
|
+
.describe('Narrow listing to a single client (string), a `/body/flags` regex over IDs, or several clients (array of literals and/or regex strings). Omit for all connected clients.'),
|
|
19
19
|
compact: zod_1.z
|
|
20
20
|
.boolean()
|
|
21
21
|
.optional()
|
|
@@ -26,7 +26,7 @@ const registerListToolsTool = (mcp, ctx) => {
|
|
|
26
26
|
.describe('Narrow listing to a single module name (e.g. "fiber_tree", "host"). Omit for all.'),
|
|
27
27
|
},
|
|
28
28
|
}, async ({ clientId, compact, module }) => {
|
|
29
|
-
const filter = (0, helpers_1.parseClientIds)(clientId);
|
|
29
|
+
const filter = (0, helpers_1.parseClientIds)(clientId, ctx.bridge);
|
|
30
30
|
if (!filter.ok)
|
|
31
31
|
return (0, helpers_1.jsonError)(filter.error);
|
|
32
32
|
const allClients = ctx.bridge.listClients();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listTools.js","sourceRoot":"","sources":["../../../src/server/tools/listTools.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AAExB,8CAM0B;AAC1B,gDAAqD;AAE9C,MAAM,qBAAqB,GAAG,CAAC,GAAc,EAAE,GAAkB,EAAQ,EAAE;IAChF,GAAG,CAAC,YAAY,CACd,YAAY,EACZ;QACE,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,KAAK,EAAE,YAAY;SACpB;QACD,WAAW,EACT
|
|
1
|
+
{"version":3,"file":"listTools.js","sourceRoot":"","sources":["../../../src/server/tools/listTools.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AAExB,8CAM0B;AAC1B,gDAAqD;AAE9C,MAAM,qBAAqB,GAAG,CAAC,GAAc,EAAE,GAAkB,EAAQ,EAAE;IAChF,GAAG,CAAC,YAAY,CACd,YAAY,EACZ;QACE,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,KAAK,EAAE,YAAY;SACpB;QACD,WAAW,EACT,0cAA0c;QAC5c,WAAW,EAAE;YACX,QAAQ,EAAE,OAAC;iBACR,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;iBACxC,QAAQ,EAAE;iBACV,QAAQ,CACP,0KAA0K,CAC3K;YACH,OAAO,EAAE,OAAC;iBACP,OAAO,EAAE;iBACT,QAAQ,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;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AAjIW,QAAA,qBAAqB,yBAiIhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waitUntil.d.ts","sourceRoot":"","sources":["../../../src/server/tools/waitUntil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAwEhG,eAAO,MAAM,qBAAqB,QAAS,SAAS,OAAO,aAAa,KAAG,
|
|
1
|
+
{"version":3,"file":"waitUntil.d.ts","sourceRoot":"","sources":["../../../src/server/tools/waitUntil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAwEhG,eAAO,MAAM,qBAAqB,QAAS,SAAS,OAAO,aAAa,KAAG,IAuJ1E,CAAC"}
|
|
@@ -88,7 +88,7 @@ RETURNS
|
|
|
88
88
|
clientId: zod_1.z
|
|
89
89
|
.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())])
|
|
90
90
|
.optional()
|
|
91
|
-
.describe('Target client ID(s). String polls one client; array
|
|
91
|
+
.describe('Target client ID(s). String polls one client; `/body/flags` literal ("/^ios/") expands to every matching connected client; array mixes literals and regex strings. Broadcast forms poll each matched client in parallel under the shared timeoutMs and report per-client outcomes. Same auto-resolution semantics as `call`.'),
|
|
92
92
|
intervalMs: zod_1.z
|
|
93
93
|
.number()
|
|
94
94
|
.optional()
|
|
@@ -108,7 +108,7 @@ RETURNS
|
|
|
108
108
|
const parsedArgs = (0, helpers_1.parseCallArgs)(args);
|
|
109
109
|
if (!parsedArgs.ok)
|
|
110
110
|
return (0, helpers_1.jsonError)(parsedArgs.error);
|
|
111
|
-
const clients = (0, helpers_1.parseClientIds)(clientId);
|
|
111
|
+
const clients = (0, helpers_1.parseClientIds)(clientId, ctx.bridge);
|
|
112
112
|
if (!clients.ok)
|
|
113
113
|
return (0, helpers_1.jsonError)(clients.error);
|
|
114
114
|
const pred = predicate;
|
|
@@ -157,11 +157,18 @@ RETURNS
|
|
|
157
157
|
}
|
|
158
158
|
return entry;
|
|
159
159
|
}));
|
|
160
|
-
const
|
|
161
|
-
return entry.ok === true;
|
|
162
|
-
});
|
|
160
|
+
const okCount = perClient.reduce((n, entry) => {
|
|
161
|
+
return n + (entry.ok === true ? 1 : 0);
|
|
162
|
+
}, 0);
|
|
163
|
+
const failedCount = perClient.length - okCount;
|
|
164
|
+
const ok = failedCount === 0;
|
|
163
165
|
return {
|
|
164
|
-
content: [
|
|
166
|
+
content: [
|
|
167
|
+
{
|
|
168
|
+
text: JSON.stringify({ failedCount, ok, okCount, perClient }, null, 2),
|
|
169
|
+
type: 'text',
|
|
170
|
+
},
|
|
171
|
+
],
|
|
165
172
|
};
|
|
166
173
|
});
|
|
167
174
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waitUntil.js","sourceRoot":"","sources":["../../../src/server/tools/waitUntil.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AAExB,8CAAgG;AAChG,kDAM4B;AAC5B,gDAAqD;AAYrD,MAAM,aAAa,GAAG,KAAK,EACzB,GAAkB,EAClB,IAAY,EACZ,IAA6B,EAC7B,QAA4B,EAC5B,IAAe,EACf,MAAe,EACf,QAA4B,EAC5B,OAAe,EACf,QAAgB,EACM,EAAE;IACxB,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC3B,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,UAAmB,CAAC;IACxB,IAAI,SAA6B,CAAC;IAElC,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,GAAG,OAAO,EAAE,CAAC;QACtC,QAAQ,IAAI,CAAC,CAAC;QACd,MAAM,QAAQ,GAAG,MAAM,GAAG,CA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,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzC,CAAC,EAAE,CAAC,CAAC,CAAC;QACN,MAAM,WAAW,GAAG,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC;QAC/C,MAAM,EAAE,GAAG,WAAW,KAAK,CAAC,CAAC;QAC7B,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;oBACtE,IAAI,EAAE,MAAe;iBACtB;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AAvJW,QAAA,qBAAqB,yBAuJhC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-mcp-kit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "MCP server for React Native — drive, inspect, and debug running RN apps from AI agents via the real OS gesture pipeline",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Aliaksei Pranko",
|