visionclaw 0.1.187-beta.8 → 0.1.187-dev.refactor-computer-use-direct-coordinates.1
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/agent/loop.js +1 -1
- package/dist/agent/loop.js.map +1 -1
- package/dist/agent/providers/client-factory.d.ts +1 -1
- package/dist/agent/providers/client-factory.js +1 -1
- package/dist/agent/runtime-surface.d.ts +1 -1
- package/dist/agent/runtime-surface.d.ts.map +1 -1
- package/dist/agent/runtime-surface.js +35 -18
- package/dist/agent/runtime-surface.js.map +1 -1
- package/dist/agent/system-prompt.d.ts.map +1 -1
- package/dist/agent/system-prompt.js +1 -3
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/builtin-skills/macos-automation/SKILL.md +13 -10
- package/dist/onboarding/generate-wallpaper.d.ts +3 -8
- package/dist/onboarding/generate-wallpaper.d.ts.map +1 -1
- package/dist/onboarding/generate-wallpaper.js +3 -123
- package/dist/onboarding/generate-wallpaper.js.map +1 -1
- package/dist/tools/computer-use.d.ts +56 -6
- package/dist/tools/computer-use.d.ts.map +1 -1
- package/dist/tools/computer-use.js +129 -286
- package/dist/tools/computer-use.js.map +1 -1
- package/dist-agent/bundle.cjs +208 -574
- package/package.json +1 -1
- package/dist/agent/applied-credential-signature.d.ts +0 -53
- package/dist/agent/applied-credential-signature.d.ts.map +0 -1
- package/dist/agent/applied-credential-signature.js +0 -137
- package/dist/agent/applied-credential-signature.js.map +0 -1
- package/dist/agent/tunnel-credential-handler.d.ts +0 -90
- package/dist/agent/tunnel-credential-handler.d.ts.map +0 -1
- package/dist/agent/tunnel-credential-handler.js +0 -162
- package/dist/agent/tunnel-credential-handler.js.map +0 -1
- package/dist/billing/payg-handler.d.ts +0 -29
- package/dist/billing/payg-handler.d.ts.map +0 -1
- package/dist/billing/payg-handler.js +0 -92
- package/dist/billing/payg-handler.js.map +0 -1
- package/dist/billing/payment-handler.d.ts +0 -24
- package/dist/billing/payment-handler.d.ts.map +0 -1
- package/dist/billing/payment-handler.js +0 -101
- package/dist/billing/payment-handler.js.map +0 -1
- package/dist/builtin-skills/catalog/phone-adb-automation/SKILL.md +0 -412
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_input.sh +0 -132
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_launch.sh +0 -166
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_screenshot.sh +0 -87
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_security_kbd.py +0 -174
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_setup.sh +0 -274
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_swipe.sh +0 -111
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_tap.sh +0 -87
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_ui_parse.py +0 -176
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_wake_unlock.sh +0 -67
- package/dist/builtin-skills/transcribe-audio/SKILL.md +0 -122
- package/dist/data-processing/convert-demo-cli.d.ts +0 -7
- package/dist/data-processing/convert-demo-cli.d.ts.map +0 -1
- package/dist/data-processing/convert-demo-cli.js +0 -30
- package/dist/data-processing/convert-demo-cli.js.map +0 -1
- package/dist/data-processing/convert-demo.d.ts +0 -26
- package/dist/data-processing/convert-demo.d.ts.map +0 -1
- package/dist/data-processing/convert-demo.js +0 -233
- package/dist/data-processing/convert-demo.js.map +0 -1
- package/dist/obs/rdp/icons/icons/app_windows.svg +0 -4
- package/dist/obs/rdp/icons/icons/clip_get.svg +0 -4
- package/dist/obs/rdp/icons/icons/clip_send.svg +0 -4
- package/dist/obs/rdp/icons/icons/clip_shared.svg +0 -4
- package/dist/obs/rdp/icons/icons/clipboard.svg +0 -4
- package/dist/obs/rdp/icons/icons/clipboard_shared.svg +0 -4
- package/dist/obs/rdp/icons/icons/control.svg +0 -4
- package/dist/obs/rdp/icons/icons/desktop.svg +0 -4
- package/dist/obs/rdp/icons/icons/display.svg +0 -4
- package/dist/obs/rdp/icons/icons/launchpad.svg +0 -4
- package/dist/obs/rdp/icons/icons/mission_control.svg +0 -4
- package/dist/obs/rdp/icons/icons/screenshot.svg +0 -4
- package/dist/obs/rdp/icons/icons/zoom_actual.svg +0 -4
- package/dist/obs/rdp/icons/icons/zoom_fit.svg +0 -4
- package/dist/obs/rdp/icons/icons/zoom_in.svg +0 -4
- package/dist/obs/rdp/icons/icons/zoom_out.svg +0 -4
- package/dist/obs/tunnel-telemetry.d.ts +0 -46
- package/dist/obs/tunnel-telemetry.d.ts.map +0 -1
- package/dist/obs/tunnel-telemetry.js +0 -70
- package/dist/obs/tunnel-telemetry.js.map +0 -1
- package/dist/service/gbox-tun.d.ts +0 -14
- package/dist/service/gbox-tun.d.ts.map +0 -1
- package/dist/service/gbox-tun.js +0 -315
- package/dist/service/gbox-tun.js.map +0 -1
- package/dist/tools/coordinate-resolver.d.ts +0 -30
- package/dist/tools/coordinate-resolver.d.ts.map +0 -1
- package/dist/tools/coordinate-resolver.js +0 -104
- package/dist/tools/coordinate-resolver.js.map +0 -1
- package/dist/utils/wechat-monitor.d.ts +0 -21
- package/dist/utils/wechat-monitor.d.ts.map +0 -1
- package/dist/utils/wechat-monitor.js +0 -88
- package/dist/utils/wechat-monitor.js.map +0 -1
|
@@ -1,10 +1,48 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Computer use MCP tools for desktop interaction.
|
|
3
|
-
* Each tool: screenshot
|
|
3
|
+
* Each coordinate-based tool: scale screenshot coords → display coords → execute → result screenshot.
|
|
4
|
+
*
|
|
5
|
+
* The model sees resized screenshots and outputs pixel positions in that
|
|
6
|
+
* image space. The execution layer scales from screenshot coords to actual
|
|
7
|
+
* display resolution, mirroring the android-use pattern.
|
|
4
8
|
*/
|
|
5
9
|
import { z } from "zod";
|
|
10
|
+
/**
|
|
11
|
+
* Compute the expected screenshot image dimensions after vision resize.
|
|
12
|
+
* The screenshot pipeline resizes the raw capture to fit Claude's vision
|
|
13
|
+
* constraints. This computes those dimensions deterministically from the
|
|
14
|
+
* display resolution so we can map coordinates without reading the image.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getScreenshotSize(displaySize: {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
}): {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Convert pixel coordinates in screenshot space to absolute display coordinates.
|
|
25
|
+
* The model outputs coordinates based on the resized screenshot it sees;
|
|
26
|
+
* we scale them to the actual display resolution for input events.
|
|
27
|
+
*/
|
|
28
|
+
export declare function screenshotToDisplay(point: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
}, screenshotSize: {
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
}, displaySize: {
|
|
35
|
+
width: number;
|
|
36
|
+
height: number;
|
|
37
|
+
}): {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
6
41
|
export declare const computerUseClickTool: import("@anthropic-ai/claude-agent-sdk").SdkMcpToolDefinition<{
|
|
7
|
-
|
|
42
|
+
point: z.ZodObject<{
|
|
43
|
+
x: z.ZodNumber;
|
|
44
|
+
y: z.ZodNumber;
|
|
45
|
+
}, z.core.$strip>;
|
|
8
46
|
button: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
9
47
|
left: "left";
|
|
10
48
|
right: "right";
|
|
@@ -12,10 +50,16 @@ export declare const computerUseClickTool: import("@anthropic-ai/claude-agent-sd
|
|
|
12
50
|
}>>>;
|
|
13
51
|
}>;
|
|
14
52
|
export declare const computerUseMoveTool: import("@anthropic-ai/claude-agent-sdk").SdkMcpToolDefinition<{
|
|
15
|
-
|
|
53
|
+
point: z.ZodObject<{
|
|
54
|
+
x: z.ZodNumber;
|
|
55
|
+
y: z.ZodNumber;
|
|
56
|
+
}, z.core.$strip>;
|
|
16
57
|
}>;
|
|
17
58
|
export declare const computerUseScrollTool: import("@anthropic-ai/claude-agent-sdk").SdkMcpToolDefinition<{
|
|
18
|
-
|
|
59
|
+
point: z.ZodObject<{
|
|
60
|
+
x: z.ZodNumber;
|
|
61
|
+
y: z.ZodNumber;
|
|
62
|
+
}, z.core.$strip>;
|
|
19
63
|
direction: z.ZodEnum<{
|
|
20
64
|
left: "left";
|
|
21
65
|
right: "right";
|
|
@@ -25,8 +69,14 @@ export declare const computerUseScrollTool: import("@anthropic-ai/claude-agent-s
|
|
|
25
69
|
amount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
26
70
|
}>;
|
|
27
71
|
export declare const computerUseDragTool: import("@anthropic-ai/claude-agent-sdk").SdkMcpToolDefinition<{
|
|
28
|
-
|
|
29
|
-
|
|
72
|
+
startPoint: z.ZodObject<{
|
|
73
|
+
x: z.ZodNumber;
|
|
74
|
+
y: z.ZodNumber;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
endPoint: z.ZodObject<{
|
|
77
|
+
x: z.ZodNumber;
|
|
78
|
+
y: z.ZodNumber;
|
|
79
|
+
}, z.core.$strip>;
|
|
30
80
|
}>;
|
|
31
81
|
export declare const computerUseTypeTool: import("@anthropic-ai/claude-agent-sdk").SdkMcpToolDefinition<{
|
|
32
82
|
text: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computer-use.d.ts","sourceRoot":"","sources":["../../src/tools/computer-use.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"computer-use.d.ts","sourceRoot":"","sources":["../../src/tools/computer-use.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8CxB;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAOpC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAC/B,cAAc,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACjD,WAAW,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC7C;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAK1B;AA6DD,eAAO,MAAM,oBAAoB;;;;;;;;;;EA4BhC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;EAqB/B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAuBjC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;EAyB/B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;EAuB/B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;EAiB9B,CAAC;AAEF,eAAO,MAAM,yBAAyB,mEAwCrC,CAAC"}
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Computer use MCP tools for desktop interaction.
|
|
3
|
-
* Each tool: screenshot
|
|
3
|
+
* Each coordinate-based tool: scale screenshot coords → display coords → execute → result screenshot.
|
|
4
|
+
*
|
|
5
|
+
* The model sees resized screenshots and outputs pixel positions in that
|
|
6
|
+
* image space. The execution layer scales from screenshot coords to actual
|
|
7
|
+
* display resolution, mirroring the android-use pattern.
|
|
4
8
|
*/
|
|
5
9
|
import { z } from "zod";
|
|
6
10
|
import { tool } from "@anthropic-ai/claude-agent-sdk";
|
|
7
11
|
import { captureScreen, getDisplaySize, isDisplaySizeInitialized, click, doubleClick, rightClick, moveTo, drag, typeText, pressKey, scroll, } from "./desktop-executor-factory.js";
|
|
8
|
-
import {
|
|
9
|
-
import { takeScreenshot } from "./screenshot.js";
|
|
12
|
+
import { takeScreenshot, getVisionScaleFactor } from "./screenshot.js";
|
|
10
13
|
import { logger } from "../logger.js";
|
|
11
14
|
/**
|
|
12
15
|
* Gate every computer_use entry point on (a) a supported platform and
|
|
13
16
|
* (b) a successfully-detected display size.
|
|
14
|
-
*
|
|
15
|
-
* The display-size check is load-bearing: every coordinate the tools
|
|
16
|
-
* compute — click targets, drag endpoints, vision-resolver scaling —
|
|
17
|
-
* depends on the real display dimensions. With a wrong or guessed size
|
|
18
|
-
* the agent silently clicks the wrong pixels, which is worse than
|
|
19
|
-
* refusing the call. When display-size detection fails at startup,
|
|
20
|
-
* `initDisplaySize()` leaves the cache empty; every computer_use tool
|
|
21
|
-
* then short-circuits with this error instead of running.
|
|
22
17
|
*/
|
|
23
18
|
function requireDesktop() {
|
|
24
19
|
if (process.platform !== "darwin" && process.platform !== "win32") {
|
|
@@ -40,249 +35,148 @@ function requireDesktop() {
|
|
|
40
35
|
}
|
|
41
36
|
return null;
|
|
42
37
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
};
|
|
59
|
-
return cachedConfig;
|
|
60
|
-
}
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
38
|
+
// ── Coordinate helpers (mirror android-use pattern) ─────────────────
|
|
39
|
+
/**
|
|
40
|
+
* Compute the expected screenshot image dimensions after vision resize.
|
|
41
|
+
* The screenshot pipeline resizes the raw capture to fit Claude's vision
|
|
42
|
+
* constraints. This computes those dimensions deterministically from the
|
|
43
|
+
* display resolution so we can map coordinates without reading the image.
|
|
44
|
+
*/
|
|
45
|
+
export function getScreenshotSize(displaySize) {
|
|
46
|
+
const scale = getVisionScaleFactor(displaySize.width, displaySize.height);
|
|
47
|
+
if (scale >= 1.0)
|
|
48
|
+
return { ...displaySize };
|
|
49
|
+
return {
|
|
50
|
+
width: Math.max(1, Math.round(displaySize.width * scale)),
|
|
51
|
+
height: Math.max(1, Math.round(displaySize.height * scale)),
|
|
52
|
+
};
|
|
63
53
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Convert pixel coordinates in screenshot space to absolute display coordinates.
|
|
56
|
+
* The model outputs coordinates based on the resized screenshot it sees;
|
|
57
|
+
* we scale them to the actual display resolution for input events.
|
|
58
|
+
*/
|
|
59
|
+
export function screenshotToDisplay(point, screenshotSize, displaySize) {
|
|
60
|
+
return {
|
|
61
|
+
x: Math.round((point.x / screenshotSize.width) * displaySize.width),
|
|
62
|
+
y: Math.round((point.y / screenshotSize.height) * displaySize.height),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/** Zod schema for a pixel coordinate point in the screenshot image. */
|
|
66
|
+
const pointSchema = z.object({
|
|
67
|
+
x: z
|
|
68
|
+
.number()
|
|
69
|
+
.min(0)
|
|
70
|
+
.describe("X pixel coordinate in the screenshot image (0 = left edge)"),
|
|
71
|
+
y: z
|
|
72
|
+
.number()
|
|
73
|
+
.min(0)
|
|
74
|
+
.describe("Y pixel coordinate in the screenshot image (0 = top edge)"),
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
77
|
+
* Capture a post-action screenshot and return a standard result.
|
|
78
|
+
*/
|
|
79
|
+
async function actionResult(text, delayMs = 1000) {
|
|
80
|
+
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
82
81
|
const { base64: resultScreenshot } = await captureScreen();
|
|
83
82
|
logger.screenshot(resultScreenshot);
|
|
84
83
|
return {
|
|
85
84
|
content: [
|
|
86
|
-
{ type: "text", text
|
|
85
|
+
{ type: "text", text },
|
|
87
86
|
{
|
|
88
87
|
type: "image",
|
|
89
88
|
data: resultScreenshot,
|
|
90
89
|
mimeType: "image/png",
|
|
91
|
-
}
|
|
90
|
+
},
|
|
92
91
|
],
|
|
93
92
|
};
|
|
94
93
|
}
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
/** Wrap a tool handler with desktop check and error handling. */
|
|
95
|
+
function withDesktopCheck(toolName, fn) {
|
|
96
|
+
return (async () => {
|
|
97
|
+
const err = requireDesktop();
|
|
98
|
+
if (err)
|
|
99
|
+
return err;
|
|
100
|
+
try {
|
|
101
|
+
return await fn();
|
|
102
|
+
}
|
|
103
|
+
catch (e) {
|
|
104
|
+
logger.err(`${toolName} failed`, { error: String(e) });
|
|
105
|
+
return {
|
|
106
|
+
content: [
|
|
107
|
+
{
|
|
108
|
+
type: "text",
|
|
109
|
+
text: `${toolName} failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
isError: true,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
})();
|
|
116
|
+
}
|
|
117
|
+
export const computerUseClickTool = tool("computer_use_click", "Click at a point on the desktop screen. Coordinates are pixel positions in the screenshot image returned by computer_use_screenshot. Supports left-click, right-click, and double-click.", {
|
|
118
|
+
point: pointSchema.describe("Pixel coordinates in the screenshot image to click"),
|
|
97
119
|
button: z.enum(["left", "right", "double"]).optional().default("left"),
|
|
98
120
|
}, async (args) => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const fn = args.button === "right"
|
|
115
|
-
? (x, y) => rightClick(x, y)
|
|
116
|
-
: args.button === "double"
|
|
117
|
-
? (x, y) => doubleClick(x, y)
|
|
118
|
-
: (x, y) => click(x, y);
|
|
119
|
-
try {
|
|
120
|
-
return await resolveAndExecute(instruction, cfg, fn);
|
|
121
|
-
}
|
|
122
|
-
catch (e) {
|
|
123
|
-
logger.err("computer_use_click failed", { error: String(e) });
|
|
124
|
-
return {
|
|
125
|
-
content: [
|
|
126
|
-
{
|
|
127
|
-
type: "text",
|
|
128
|
-
text: `computer_use_click failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
isError: true,
|
|
132
|
-
};
|
|
133
|
-
}
|
|
121
|
+
return withDesktopCheck("computer_use_click", async () => {
|
|
122
|
+
const displaySize = getDisplaySize();
|
|
123
|
+
const ssSize = getScreenshotSize(displaySize);
|
|
124
|
+
const abs = screenshotToDisplay(args.point, ssSize, displaySize);
|
|
125
|
+
if (args.button === "right") {
|
|
126
|
+
await rightClick(abs.x, abs.y);
|
|
127
|
+
}
|
|
128
|
+
else if (args.button === "double") {
|
|
129
|
+
await doubleClick(abs.x, abs.y);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
await click(abs.x, abs.y);
|
|
133
|
+
}
|
|
134
|
+
return actionResult(`${args.button === "double" ? "Double-clicked" : args.button === "right" ? "Right-clicked" : "Clicked"} at screenshot (${Math.round(args.point.x)}, ${Math.round(args.point.y)}) → display (${abs.x}, ${abs.y})`);
|
|
135
|
+
});
|
|
134
136
|
});
|
|
135
|
-
export const computerUseMoveTool = tool("computer_use_move", "Move the mouse cursor to a
|
|
136
|
-
|
|
137
|
+
export const computerUseMoveTool = tool("computer_use_move", "Move the mouse cursor to a point on the desktop screen. Coordinates are pixel positions in the screenshot image.", {
|
|
138
|
+
point: pointSchema.describe("Pixel coordinates in the screenshot image to move the cursor to"),
|
|
137
139
|
}, async (args) => {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return {
|
|
144
|
-
|
|
145
|
-
isError: true,
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
const instruction = `Move cursor to the center of: ${args.target}`;
|
|
149
|
-
try {
|
|
150
|
-
return await resolveAndExecute(instruction, cfg, async (x, y) => {
|
|
151
|
-
await moveTo(x, y);
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
catch (e) {
|
|
155
|
-
logger.err("computer_use_move failed", { error: String(e) });
|
|
156
|
-
return {
|
|
157
|
-
content: [
|
|
158
|
-
{
|
|
159
|
-
type: "text",
|
|
160
|
-
text: `computer_use_move failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
161
|
-
},
|
|
162
|
-
],
|
|
163
|
-
isError: true,
|
|
164
|
-
};
|
|
165
|
-
}
|
|
140
|
+
return withDesktopCheck("computer_use_move", async () => {
|
|
141
|
+
const displaySize = getDisplaySize();
|
|
142
|
+
const ssSize = getScreenshotSize(displaySize);
|
|
143
|
+
const abs = screenshotToDisplay(args.point, ssSize, displaySize);
|
|
144
|
+
await moveTo(abs.x, abs.y);
|
|
145
|
+
return actionResult(`Moved cursor to screenshot (${Math.round(args.point.x)}, ${Math.round(args.point.y)}) → display (${abs.x}, ${abs.y})`);
|
|
146
|
+
});
|
|
166
147
|
});
|
|
167
|
-
export const computerUseScrollTool = tool("computer_use_scroll", "Scroll at a
|
|
168
|
-
|
|
148
|
+
export const computerUseScrollTool = tool("computer_use_scroll", "Scroll at a point on the desktop screen in a direction. Coordinates are pixel positions in the screenshot image.", {
|
|
149
|
+
point: pointSchema.describe("Pixel coordinates in the screenshot image for scroll origin"),
|
|
169
150
|
direction: z.enum(["up", "down", "left", "right"]),
|
|
170
151
|
amount: z.number().optional().default(3).describe("Scroll amount (default 3)"),
|
|
171
152
|
}, async (args) => {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
return {
|
|
178
|
-
|
|
179
|
-
isError: true,
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
const instruction = `Move cursor to the center of: ${args.target} (for scrolling)`;
|
|
183
|
-
const amount = args.amount;
|
|
184
|
-
try {
|
|
185
|
-
return await resolveAndExecute(instruction, cfg, async (x, y) => {
|
|
186
|
-
await scroll(x, y, args.direction, amount);
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
catch (e) {
|
|
190
|
-
logger.err("computer_use_scroll failed", { error: String(e) });
|
|
191
|
-
return {
|
|
192
|
-
content: [
|
|
193
|
-
{
|
|
194
|
-
type: "text",
|
|
195
|
-
text: `computer_use_scroll failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
196
|
-
},
|
|
197
|
-
],
|
|
198
|
-
isError: true,
|
|
199
|
-
};
|
|
200
|
-
}
|
|
153
|
+
return withDesktopCheck("computer_use_scroll", async () => {
|
|
154
|
+
const displaySize = getDisplaySize();
|
|
155
|
+
const ssSize = getScreenshotSize(displaySize);
|
|
156
|
+
const abs = screenshotToDisplay(args.point, ssSize, displaySize);
|
|
157
|
+
await scroll(abs.x, abs.y, args.direction, args.amount);
|
|
158
|
+
return actionResult(`Scrolled ${args.direction} at screenshot (${Math.round(args.point.x)}, ${Math.round(args.point.y)}) → display (${abs.x}, ${abs.y})`);
|
|
159
|
+
});
|
|
201
160
|
});
|
|
202
|
-
export const computerUseDragTool = tool("computer_use_drag", "Drag from one
|
|
203
|
-
|
|
204
|
-
|
|
161
|
+
export const computerUseDragTool = tool("computer_use_drag", "Drag from one point to another on the desktop screen. Coordinates are pixel positions in the screenshot image.", {
|
|
162
|
+
startPoint: pointSchema.describe("Pixel coordinates in the screenshot image (drag source)"),
|
|
163
|
+
endPoint: pointSchema.describe("Pixel coordinates in the screenshot image (drop target)"),
|
|
205
164
|
}, async (args) => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
const { base64: screenshot, filePath: screenshotPath } = await captureScreen();
|
|
217
|
-
const size = getDisplaySize();
|
|
218
|
-
const [fromResolved, toResolved] = await Promise.all([
|
|
219
|
-
resolveCoordinates(screenshot, `Move cursor to the center of: ${args.from} (for dragging)`, size.width, size.height, cfg, screenshotPath),
|
|
220
|
-
resolveCoordinates(screenshot, `Move cursor to the center of: ${args.to} (for dragging)`, size.width, size.height, cfg, screenshotPath),
|
|
221
|
-
]);
|
|
222
|
-
if (!fromResolved) {
|
|
223
|
-
return {
|
|
224
|
-
content: [
|
|
225
|
-
{
|
|
226
|
-
type: "text",
|
|
227
|
-
text: `Could not resolve 'from' coordinates: ${args.from}. Please try again with a clearer instruction.`,
|
|
228
|
-
},
|
|
229
|
-
],
|
|
230
|
-
isError: true,
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
if (!toResolved) {
|
|
234
|
-
return {
|
|
235
|
-
content: [
|
|
236
|
-
{
|
|
237
|
-
type: "text",
|
|
238
|
-
text: `Could not resolve 'to' coordinates: ${args.to}. Please try again with a clearer instruction.`,
|
|
239
|
-
},
|
|
240
|
-
],
|
|
241
|
-
isError: true,
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
try {
|
|
245
|
-
await drag(fromResolved.x, fromResolved.y, toResolved.x, toResolved.y);
|
|
246
|
-
// wait for 1 second
|
|
247
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
248
|
-
const { base64: resultScreenshot } = await captureScreen();
|
|
249
|
-
logger.screenshot(resultScreenshot);
|
|
250
|
-
return {
|
|
251
|
-
content: [
|
|
252
|
-
{
|
|
253
|
-
type: "text",
|
|
254
|
-
text: `Dragged from (${fromResolved.x}, ${fromResolved.y}) to (${toResolved.x}, ${toResolved.y})`,
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
type: "image",
|
|
258
|
-
data: resultScreenshot,
|
|
259
|
-
mimeType: "image/png",
|
|
260
|
-
},
|
|
261
|
-
],
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
catch (e) {
|
|
265
|
-
logger.err("computer_use_drag failed", { error: String(e) });
|
|
266
|
-
return {
|
|
267
|
-
content: [
|
|
268
|
-
{
|
|
269
|
-
type: "text",
|
|
270
|
-
text: `computer_use_drag failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
271
|
-
},
|
|
272
|
-
],
|
|
273
|
-
isError: true,
|
|
274
|
-
};
|
|
275
|
-
}
|
|
165
|
+
return withDesktopCheck("computer_use_drag", async () => {
|
|
166
|
+
const displaySize = getDisplaySize();
|
|
167
|
+
const ssSize = getScreenshotSize(displaySize);
|
|
168
|
+
const start = screenshotToDisplay(args.startPoint, ssSize, displaySize);
|
|
169
|
+
const end = screenshotToDisplay(args.endPoint, ssSize, displaySize);
|
|
170
|
+
await drag(start.x, start.y, end.x, end.y);
|
|
171
|
+
return actionResult(`Dragged from screenshot (${Math.round(args.startPoint.x)}, ${Math.round(args.startPoint.y)}) to (${Math.round(args.endPoint.x)}, ${Math.round(args.endPoint.y)}) → display (${start.x}, ${start.y}) to (${end.x}, ${end.y})`);
|
|
172
|
+
});
|
|
276
173
|
});
|
|
277
174
|
export const computerUseTypeTool = tool("computer_use_type", "Type text into the focused field. Optionally clear the field first (replace) and/or press Enter after.", {
|
|
278
175
|
text: z.string().describe("Text to type"),
|
|
279
176
|
replace: z.boolean().optional().default(false).describe("If true, select-all and replace existing text first"),
|
|
280
177
|
press_enter: z.boolean().optional().default(false).describe("If true, press Enter after typing"),
|
|
281
178
|
}, async (args) => {
|
|
282
|
-
|
|
283
|
-
if (err)
|
|
284
|
-
return err;
|
|
285
|
-
try {
|
|
179
|
+
return withDesktopCheck("computer_use_type", async () => {
|
|
286
180
|
if (args.replace) {
|
|
287
181
|
await pressKey(process.platform === "win32" ? "ctrl+a" : "cmd+a");
|
|
288
182
|
}
|
|
@@ -290,84 +184,33 @@ export const computerUseTypeTool = tool("computer_use_type", "Type text into the
|
|
|
290
184
|
if (args.press_enter) {
|
|
291
185
|
await pressKey("enter");
|
|
292
186
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
const { base64: resultScreenshot } = await captureScreen();
|
|
296
|
-
logger.screenshot(resultScreenshot);
|
|
297
|
-
return {
|
|
298
|
-
content: [
|
|
299
|
-
{ type: "text", text: `Typed text${args.press_enter ? " and pressed Enter" : ""}` },
|
|
300
|
-
{
|
|
301
|
-
type: "image",
|
|
302
|
-
data: resultScreenshot,
|
|
303
|
-
mimeType: "image/png",
|
|
304
|
-
},
|
|
305
|
-
],
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
catch (e) {
|
|
309
|
-
logger.err("computer_use_type failed", { error: String(e) });
|
|
310
|
-
return {
|
|
311
|
-
content: [
|
|
312
|
-
{
|
|
313
|
-
type: "text",
|
|
314
|
-
text: `computer_use_type failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
315
|
-
},
|
|
316
|
-
],
|
|
317
|
-
isError: true,
|
|
318
|
-
};
|
|
319
|
-
}
|
|
187
|
+
return actionResult(`Typed text${args.press_enter ? " and pressed Enter" : ""}`);
|
|
188
|
+
});
|
|
320
189
|
});
|
|
321
190
|
export const computerUseKeyTool = tool("computer_use_key", "Press a key or key combination (e.g. 'enter', 'escape', 'cmd+s', 'ctrl+shift+t').", {
|
|
322
191
|
key: z
|
|
323
192
|
.string()
|
|
324
193
|
.describe("Key or combo: 'enter', 'escape', 'cmd+s', 'ctrl+shift+t', etc."),
|
|
325
194
|
}, async (args) => {
|
|
326
|
-
|
|
327
|
-
if (err)
|
|
328
|
-
return err;
|
|
329
|
-
try {
|
|
195
|
+
return withDesktopCheck("computer_use_key", async () => {
|
|
330
196
|
await pressKey(args.key);
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
const { base64: resultScreenshot } = await captureScreen();
|
|
334
|
-
logger.screenshot(resultScreenshot);
|
|
335
|
-
return {
|
|
336
|
-
content: [
|
|
337
|
-
{ type: "text", text: `Pressed: ${args.key}` },
|
|
338
|
-
{
|
|
339
|
-
type: "image",
|
|
340
|
-
data: resultScreenshot,
|
|
341
|
-
mimeType: "image/png",
|
|
342
|
-
},
|
|
343
|
-
],
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
catch (e) {
|
|
347
|
-
logger.err("computer_use_key failed", { error: String(e) });
|
|
348
|
-
return {
|
|
349
|
-
content: [
|
|
350
|
-
{
|
|
351
|
-
type: "text",
|
|
352
|
-
text: `computer_use_key failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
353
|
-
},
|
|
354
|
-
],
|
|
355
|
-
isError: true,
|
|
356
|
-
};
|
|
357
|
-
}
|
|
197
|
+
return actionResult(`Pressed: ${args.key}`);
|
|
198
|
+
});
|
|
358
199
|
});
|
|
359
|
-
export const computerUseScreenshotTool = tool("computer_use_screenshot", "Capture a screenshot of the current desktop screen. Returns the image as base64 PNG
|
|
200
|
+
export const computerUseScreenshotTool = tool("computer_use_screenshot", "Capture a screenshot of the current desktop screen. Returns the image as base64 PNG. Use the pixel coordinates from this image when calling click, move, scroll, or drag tools.", {}, async (_args) => {
|
|
360
201
|
const err = requireDesktop();
|
|
361
202
|
if (err)
|
|
362
203
|
return err;
|
|
363
204
|
try {
|
|
205
|
+
const displaySize = getDisplaySize();
|
|
206
|
+
const ssSize = getScreenshotSize(displaySize);
|
|
364
207
|
const { base64, filePath } = await takeScreenshot();
|
|
365
208
|
logger.screenshot(base64);
|
|
366
209
|
return {
|
|
367
210
|
content: [
|
|
368
211
|
{
|
|
369
212
|
type: "text",
|
|
370
|
-
text: `Screenshot saved to ${filePath}
|
|
213
|
+
text: `Screenshot saved to ${filePath}\nScreenshot image size: ${ssSize.width}x${ssSize.height}px | Display resolution: ${displaySize.width}x${displaySize.height}px\nUse pixel coordinates from this image when calling click/move/scroll/drag tools.`,
|
|
371
214
|
},
|
|
372
215
|
{
|
|
373
216
|
type: "image",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computer-use.js","sourceRoot":"","sources":["../../src/tools/computer-use.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