@myagentroam/node 0.13.12 → 0.13.13
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/marctl/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"0.13.
|
|
1
|
+
{"type":"module","version":"0.13.13"}
|
|
@@ -11,13 +11,33 @@ const run = promisify(execFile);
|
|
|
11
11
|
const SCREEN_QUERY = `
|
|
12
12
|
$ErrorActionPreference = "Stop"
|
|
13
13
|
if (-not [Environment]::UserInteractive) { exit 2 }
|
|
14
|
-
Add-Type -
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
Add-Type -TypeDefinition @'
|
|
15
|
+
using System;
|
|
16
|
+
using System.Runtime.InteropServices;
|
|
17
|
+
public static class MarRemoteDesktopDpi {
|
|
18
|
+
[DllImport("user32.dll", SetLastError = true)]
|
|
19
|
+
public static extern IntPtr SetThreadDpiAwarenessContext(IntPtr context);
|
|
20
|
+
}
|
|
21
|
+
'@
|
|
22
|
+
# Query every monitor in physical pixels, matching UltraVNC even with mixed DPI scales.
|
|
23
|
+
$previousDpiContext = [MarRemoteDesktopDpi]::SetThreadDpiAwarenessContext([IntPtr](-4))
|
|
24
|
+
if ($previousDpiContext -eq [IntPtr]::Zero) {
|
|
25
|
+
throw [System.ComponentModel.Win32Exception]::new(
|
|
26
|
+
[System.Runtime.InteropServices.Marshal]::GetLastWin32Error(),
|
|
27
|
+
"Cannot query physical desktop coordinates."
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
Add-Type -AssemblyName System.Windows.Forms
|
|
32
|
+
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new()
|
|
33
|
+
$screens = @([System.Windows.Forms.Screen]::AllScreens | ForEach-Object {
|
|
34
|
+
@{ name=$_.DeviceName; primary=$_.Primary; x=$_.Bounds.X; y=$_.Bounds.Y;
|
|
35
|
+
width=$_.Bounds.Width; height=$_.Bounds.Height }
|
|
36
|
+
})
|
|
37
|
+
ConvertTo-Json -InputObject $screens -Compress
|
|
38
|
+
} finally {
|
|
39
|
+
[void][MarRemoteDesktopDpi]::SetThreadDpiAwarenessContext($previousDpiContext)
|
|
40
|
+
}
|
|
21
41
|
`;
|
|
22
42
|
/** Maps Windows virtual-screen coordinates into the full VNC framebuffer. */
|
|
23
43
|
export function windowsDesktopLayout(screens, generation, revision) {
|
|
@@ -79,7 +99,12 @@ export class WindowsRemoteDesktopRuntime {
|
|
|
79
99
|
async refresh(signal) {
|
|
80
100
|
const screens = (await queryScreens(signal)).sort((left, right) => left.name.localeCompare(right.name));
|
|
81
101
|
const signature = JSON.stringify(screens.map((screen) => [
|
|
82
|
-
screen.name,
|
|
102
|
+
screen.name,
|
|
103
|
+
screen.primary,
|
|
104
|
+
screen.x,
|
|
105
|
+
screen.y,
|
|
106
|
+
screen.width,
|
|
107
|
+
screen.height
|
|
83
108
|
]));
|
|
84
109
|
if (this.#disposed)
|
|
85
110
|
throw new RemoteDesktopError('DESKTOP_BACKEND_CLOSED');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.13",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/myagentroam/mar.git",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"turndown-plugin-gfm": "^1.0.2",
|
|
50
50
|
"ws": "^8.21.3",
|
|
51
51
|
"zod": "4.4.3",
|
|
52
|
-
"@myagentroam/
|
|
53
|
-
"@myagentroam/
|
|
52
|
+
"@myagentroam/protocol": "0.13.13",
|
|
53
|
+
"@myagentroam/agent": "0.13.13"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/turndown": "^5.0.6",
|
|
57
57
|
"@types/ws": "^8.18.1",
|
|
58
|
-
"@myagentroam/
|
|
59
|
-
"@myagentroam/
|
|
58
|
+
"@myagentroam/marctl": "0.13.13",
|
|
59
|
+
"@myagentroam/code-navigation": "0.11.1"
|
|
60
60
|
},
|
|
61
61
|
"exports": {
|
|
62
62
|
"./config": {
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"start": "node dist/main.js",
|
|
76
76
|
"test:unit": "vitest run --config vitest.config.mts && node --test test/unit/*.test.mjs",
|
|
77
77
|
"test:e2e:real": "vitest run --config vitest.e2e.config.mts",
|
|
78
|
-
"test:e2e:computer-use:windows": "node --test test/e2e/computer-use-windows.test.mjs"
|
|
78
|
+
"test:e2e:computer-use:windows": "node --test test/e2e/computer-use-windows.test.mjs",
|
|
79
|
+
"test:e2e:remote-desktop:windows": "node --test test/e2e/remote-desktop-windows.test.mjs"
|
|
79
80
|
}
|
|
80
81
|
}
|