@rebind.gg/mcp-server 0.3.0 → 0.3.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/package.json +1 -1
- package/src/rebind.d.luau +15 -2
- package/src/session.ts +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebind.gg/mcp-server",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "MCP server exposing Rebind as computer-use tools: screenshot, verified click, type, key, scroll, and window control over the Remote Control protocol.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/rebind.d.luau
CHANGED
|
@@ -647,8 +647,15 @@ declare rb: {
|
|
|
647
647
|
type: (text: string) -> (),
|
|
648
648
|
typewriter: (text: string, delay_ms: number?) -> (),
|
|
649
649
|
move: (dx: number, dy: number) -> (),
|
|
650
|
-
|
|
650
|
+
-- exact in Windows and macOS software mode; on a Rebind Link it moves,
|
|
651
|
+
-- rereads the cursor and corrects until within 2 px (about 150 ms at
|
|
652
|
+
-- most), waiting with sleep in rb.run and blocking elsewhere. With ms
|
|
653
|
+
-- it glides there over ms on an eased path; a duration needs rb.run or
|
|
654
|
+
-- rb.async.
|
|
655
|
+
-- Not supported on Linux (no cursor source).
|
|
656
|
+
move_to: (x: number, y: number, ms: number?) -> (),
|
|
651
657
|
scroll: (amount: number) -> (),
|
|
658
|
+
-- deprecated: the mode is stored but no longer changes move_to
|
|
652
659
|
set_mouse_mode: (mode: string) -> (),
|
|
653
660
|
get_mouse_mode: () -> string,
|
|
654
661
|
-- keyboard HID usage for a key name, or nil (media keys return nil). down,
|
|
@@ -954,8 +961,14 @@ declare HID: {
|
|
|
954
961
|
Type: (text: string) -> (),
|
|
955
962
|
Typewriter: (text: string, delayMs: number?) -> (),
|
|
956
963
|
Move: (dx: number, dy: number) -> (),
|
|
957
|
-
|
|
964
|
+
-- exact in Windows and macOS software mode; on a Rebind Link it moves,
|
|
965
|
+
-- rereads the cursor and corrects until within 2 px (about 150 ms at
|
|
966
|
+
-- most), waiting with Sleep in Run and blocking elsewhere. With ms it
|
|
967
|
+
-- glides there over ms on an eased path; a duration needs Run or Async.
|
|
968
|
+
-- Not supported on Linux (no cursor source).
|
|
969
|
+
MoveTo: (x: number, y: number, ms: number?) -> (),
|
|
958
970
|
Scroll: (amount: number) -> (),
|
|
971
|
+
-- deprecated: the mode is stored but no longer changes MoveTo
|
|
959
972
|
SetMouseMode: (mode: string) -> (),
|
|
960
973
|
GetMouseMode: () -> string,
|
|
961
974
|
-- keyboard HID usage for a key name, or nil (media keys return nil). Down,
|
package/src/session.ts
CHANGED
|
@@ -87,12 +87,12 @@ export class Session {
|
|
|
87
87
|
/**
|
|
88
88
|
* Move the OS cursor to absolute screen (x, y).
|
|
89
89
|
*
|
|
90
|
-
*
|
|
91
|
-
* cursor
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
90
|
+
* Relays before 3.10.1 derived hid.move_to's move from a stale
|
|
91
|
+
* cached cursor and could fling the pointer to a screen edge (observed:
|
|
92
|
+
* target (800,500) landing at (0,0)), so this reads the REAL cursor, glides
|
|
93
|
+
* the residual in small relative steps (human-like, not an instant jump),
|
|
94
|
+
* then reads back and corrects against the true cursor. Converges to the
|
|
95
|
+
* exact pixel, usually in a single pass.
|
|
96
96
|
*/
|
|
97
97
|
async moveTo(x: number, y: number): Promise<Point & { passes: number }> {
|
|
98
98
|
await this.ensureCalibrated();
|