doer-agent 0.7.1 → 0.7.3
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/mobile-mcp-server.js +28 -0
- package/package.json +3 -3
|
@@ -112,6 +112,17 @@ async function showMobileConfirmation(args) {
|
|
|
112
112
|
notificationId: args.notificationId,
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
+
async function runMobileCommand(args) {
|
|
116
|
+
const config = getConfig();
|
|
117
|
+
const resolvedDeviceId = await resolveDeviceId(args.deviceId);
|
|
118
|
+
return await postJson(`/api/users/${encodeURIComponent(config.userId)}/agents/${encodeURIComponent(config.agentId)}/mobile-agents/${encodeURIComponent(resolvedDeviceId)}/run-command`, {
|
|
119
|
+
command: args.command,
|
|
120
|
+
cwd: args.cwd,
|
|
121
|
+
env: args.env,
|
|
122
|
+
timeoutMs: args.timeoutMs,
|
|
123
|
+
maxOutputBytes: args.maxOutputBytes,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
115
126
|
async function getMobileLogs(args) {
|
|
116
127
|
const config = getConfig();
|
|
117
128
|
const resolvedDeviceId = await resolveDeviceId(args.deviceId);
|
|
@@ -327,6 +338,23 @@ async function main() {
|
|
|
327
338
|
structuredContent: result,
|
|
328
339
|
};
|
|
329
340
|
});
|
|
341
|
+
server.registerTool("mobile_run_shell_command", {
|
|
342
|
+
description: "Run a shell command on an Android mobile agent using the app sandbox permissions. This is not root; command output is size-limited and timed out.",
|
|
343
|
+
inputSchema: {
|
|
344
|
+
deviceId: z.string().optional().describe("Mobile device id. Defaults to the first registered mobile agent."),
|
|
345
|
+
command: z.string().min(1).describe("Shell command passed to /system/bin/sh -c on the device."),
|
|
346
|
+
cwd: z.string().nullable().optional().describe("Optional working directory on the Android device. Defaults to the app process default directory."),
|
|
347
|
+
env: z.record(z.string(), z.string()).optional().describe("Optional environment variables for the command."),
|
|
348
|
+
timeoutMs: z.number().int().min(1000).max(60000).optional().describe("Command timeout in milliseconds. Defaults to 10000."),
|
|
349
|
+
maxOutputBytes: z.number().int().min(1024).max(65536).optional().describe("Maximum bytes to capture per stdout/stderr stream. Defaults to 16384."),
|
|
350
|
+
},
|
|
351
|
+
}, async ({ deviceId, command, cwd, env, timeoutMs, maxOutputBytes }) => {
|
|
352
|
+
const result = await runMobileCommand({ deviceId, command, cwd, env, timeoutMs, maxOutputBytes });
|
|
353
|
+
return {
|
|
354
|
+
content: [{ type: "text", text: formatJson(result) }],
|
|
355
|
+
structuredContent: result,
|
|
356
|
+
};
|
|
357
|
+
});
|
|
330
358
|
server.registerTool("mobile_search_confirmation_logs", {
|
|
331
359
|
description: "Return recent confirmation request/response/dismissed events stored in mobile logs.",
|
|
332
360
|
inputSchema: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doer-agent",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Reverse-polling agent runtime for doer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/agent.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
28
|
-
"@openai/codex": "^0.
|
|
29
|
-
"@openai/codex-sdk": "^0.
|
|
28
|
+
"@openai/codex": "^0.133.0",
|
|
29
|
+
"@openai/codex-sdk": "^0.133.0",
|
|
30
30
|
"nats": "^2.29.3",
|
|
31
31
|
"tar": "^7.5.15"
|
|
32
32
|
},
|