@nbakka/mcp-appium 1.0.13 → 1.0.15
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/package.json +1 -1
- package/src/lib/server.js +6 -9
package/package.json
CHANGED
package/src/lib/server.js
CHANGED
|
@@ -110,23 +110,19 @@ server.tool(
|
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
112
|
|
|
113
|
-
// Open Deep Link
|
|
113
|
+
// Open Deep Link
|
|
114
114
|
server.tool(
|
|
115
115
|
"open_deep_link",
|
|
116
116
|
"Open deep link on device",
|
|
117
117
|
{
|
|
118
118
|
deepLink: z.string(),
|
|
119
|
-
packageName: z.string(),
|
|
120
119
|
},
|
|
121
|
-
async ({ deepLink
|
|
120
|
+
async ({ deepLink }) => {
|
|
122
121
|
if (!state.sessionId) return { content: [{ type: "text", text: "No active session" }] };
|
|
123
122
|
try {
|
|
124
|
-
await axios.post(`${APPIUM_URL}/session/${state.sessionId}/
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
intentAction: "android.intent.action.VIEW",
|
|
128
|
-
intentCategory: "android.intent.category.DEFAULT",
|
|
129
|
-
optionalIntentArguments: ["-d", deepLink],
|
|
123
|
+
await axios.post(`${APPIUM_URL}/session/${state.sessionId}/execute/shell`, {
|
|
124
|
+
command: 'am',
|
|
125
|
+
args: ['start', '-a', 'android.intent.action.VIEW', '-d', deepLink],
|
|
130
126
|
});
|
|
131
127
|
return { content: [{ type: "text", text: `Deep link opened: ${deepLink}` }] };
|
|
132
128
|
} catch (e) {
|
|
@@ -138,6 +134,7 @@ server.tool(
|
|
|
138
134
|
|
|
139
135
|
|
|
140
136
|
|
|
137
|
+
|
|
141
138
|
// Close Session tool
|
|
142
139
|
server.tool(
|
|
143
140
|
"close_session",
|