@intentic/desktop-automation 1.310.0 → 1.311.0
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/README.md +25 -121
- package/dist/parse.d.ts +1 -1
- package/dist/parse.d.ts.map +1 -1
- package/dist/parse.js +7 -10
- package/dist/parse.js.map +1 -1
- package/dist/screen.d.ts.map +1 -1
- package/dist/screen.js +18 -3
- package/dist/screen.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,128 +1,32 @@
|
|
|
1
|
-
#
|
|
1
|
+
# desktop-automation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Moves a real desktop from Node on Windows and Linux: captures the screen, moves the pointer, clicks, types, scrolls, lists and focuses windows, and uses the clipboard.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const png = await screen.capture();
|
|
13
|
-
await screen.click({ x: 840, y: 512 }, "left");
|
|
14
|
-
await screen.type("hello world");
|
|
15
|
-
await screen.key("ctrl+s");
|
|
16
|
-
|
|
17
|
-
// …and operating applications, not just pixels
|
|
18
|
-
await screen.launch("https://example.com");
|
|
19
|
-
const open = await screen.windows(); // app, title, bounds, focused
|
|
20
|
-
await screen.focusWindow(open[0]!.id); // typing goes to the FOCUSED window
|
|
21
|
-
await screen.writeClipboard("some text");
|
|
5
|
+
```mermaid
|
|
6
|
+
flowchart LR
|
|
7
|
+
machine["intentic-machine<br/>screenshot, device, apps tools"] --> desktop(["desktop()"])
|
|
8
|
+
smoke["desktop-smoke-windows"] --> desktop
|
|
9
|
+
desktop -->|"Windows"| ps["PowerShell calling user32"]
|
|
10
|
+
desktop -->|"Linux X11"| x11["xdotool, wmctrl, xclip"]
|
|
11
|
+
desktop -->|"Linux Wayland"| wl["ydotool, wtype, sway IPC"]
|
|
22
12
|
```
|
|
23
13
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
chords, and `SendKeys` for text only. The split is deliberate: SendKeys is the only one that handles arbitrary
|
|
35
|
-
unicode sensibly, and the only one that *cannot press the Windows key*: so text uses it and chords do not.
|
|
36
|
-
Screen capture is `System.Drawing`. No install step, and nothing left resident but the helper of a notice that is
|
|
37
|
-
open (below).
|
|
38
|
-
|
|
39
|
-
**Linux**: two backends behind one interface. X11 lets any client synthesise input, so `xdotool` does
|
|
40
|
-
everything with no privileges. Wayland does not, so the pointer goes through `ydotool` (which needs
|
|
41
|
-
`/dev/uinput`) and text/keys prefer `wtype` (which does not). Missing tools raise a `DesktopError` carrying the
|
|
42
|
-
one-line install for the specific thing that is absent.
|
|
43
|
-
|
|
44
|
-
**macOS**: capture works, input does not. The methods throw rather than silently doing nothing.
|
|
45
|
-
|
|
46
|
-
**Windows enumeration**: `EnumWindows` supplies every visible top-level window, including several owned by one
|
|
47
|
-
process; process lookup adds the app name, and the remaining P/Invokes supply bounds and foreground state.
|
|
48
|
-
`Get-Process.MainWindowHandle` is intentionally not used because it collapses a workspace and its dialog into
|
|
49
|
-
one row.
|
|
50
|
-
|
|
51
|
-
**Taking focus on Windows needs more than `SetForegroundWindow`.** Windows refuses that call from a process
|
|
52
|
-
that is not already in the foreground, and refuses it *quietly*: it flashes the taskbar button and leaves the
|
|
53
|
-
keyboard where it was, so the next `type` or `key` goes to whatever the person at that guest had open. A backend
|
|
54
|
-
running from a fresh `powershell.exe` misses every qualifying condition at once, so `focusWindow` asks for
|
|
55
|
-
three of them together:
|
|
56
|
-
|
|
57
|
-
- it attaches its input queue to the foreground window's thread and the target's, which is what earns the right;
|
|
58
|
-
- it zeroes the **foreground-lock timeout** for the duration of the call and puts it back after. While that
|
|
59
|
-
timeout is armed the refusal is unconditional, and no amount of queue attachment outvotes it. It is armed by
|
|
60
|
-
ordinary desktop activity, and raised outright by gaming and anti-focus-stealing utilities;
|
|
61
|
-
- it synthesises a lone ALT *key-up*, which makes this process the one that received the last input event —
|
|
62
|
-
another of the documented conditions. A key-up with no key-down before it is the half of the pair that no
|
|
63
|
-
window reads as a press, so nothing on the desktop sees an ALT.
|
|
64
|
-
|
|
65
|
-
Then it *checks*, over three rounds, because the refusal is not always permanent: a window still mapping, or an
|
|
66
|
-
app that activates itself a moment after being asked to, loses the first round and wins the second. If the
|
|
67
|
-
keyboard still went elsewhere it raises a `DesktopError` **naming the window that kept it**, rather than
|
|
68
|
-
returning to a caller that is about to type into the wrong one.
|
|
69
|
-
|
|
70
|
-
**A refused focus states its cause, and `windowsSession()` is where it comes from.** The foreground can be held
|
|
71
|
-
by a window `windows()` does not return — a cloaked one, or the lock screen's, which has no row anywhere — so
|
|
72
|
-
looking for the holder in the window list answers "nobody" in exactly the case that matters. That read is the
|
|
73
|
-
OS's: `GetForegroundWindow` for the holder, and the presence of `LogonUI` for whether Windows is drawing its
|
|
74
|
-
sign-in screen over the desktop at all, which is a state in which nothing can be focused and nothing typed
|
|
75
|
-
lands. The message used to list every cause it might have been ("a UAC prompt, a full-screen app, or a locked
|
|
76
|
-
session") on every refusal; it now says which one the machine reported, and only admits to guessing when the
|
|
77
|
-
read itself failed. Windows-only, and named so: no compositor on Linux answers the second half.
|
|
78
|
-
|
|
79
|
-
**Wayland enumeration mostly cannot happen**, and that is a design decision rather than a gap: a compositor does
|
|
80
|
-
not let one client enumerate another's windows, the same protection that stops it synthesising input. The
|
|
81
|
-
wlroots family (sway, Hyprland) answers `swaymsg -t get_tree` to anyone who can reach the socket, so those are
|
|
82
|
-
supported; everything else gets a sentence explaining why, rather than an empty list that reads as "nothing is
|
|
83
|
-
open".
|
|
84
|
-
|
|
85
|
-
## A notice nothing driving the machine can touch
|
|
86
|
-
|
|
87
|
-
`notice(hotkey, events)` pins one line of text to the top of the display the pointer is on, for the person sitting
|
|
88
|
-
at the machine, while something else drives it ([src/notice-windows.ts](src/notice-windows.ts)). Windows only: elsewhere
|
|
89
|
-
it answers `undefined`, and the caller has nothing to show.
|
|
90
|
-
|
|
91
|
-
- **It is a hidden `powershell.exe` hosting a WinForms window**, alive exactly as long as the notice is open. It is
|
|
92
|
-
told `show <text>` or `quit` on stdin, and end of input is quit, so it dies with the process that opened it; it
|
|
93
|
-
answers `hotkey` and `hotkey-taken` on stdout. `close()` asks it to quit and kills it a second later if it has not.
|
|
94
|
-
- **It never takes focus**: `WS_EX_NOACTIVATE`, and it is shown with `SetWindowPos(SWP_NOACTIVATE | SWP_SHOWWINDOW)`
|
|
95
|
-
alone. Typing goes to the focused window, so a notice that took focus would take the next `type` with it. (Not
|
|
96
|
-
`ShowWindow`: a process's first call obeys the `SW_HIDE` a hidden spawn hands it, whatever it asks for.)
|
|
97
|
-
- **Every click goes through it** (`WS_EX_TRANSPARENT | WS_EX_LAYERED`), and it has no taskbar button or Alt+Tab
|
|
98
|
-
entry (`WS_EX_TOOLWINDOW`) and no title, so `windows()` does not list it either. It stays on top (`WS_EX_TOPMOST`,
|
|
99
|
-
re-asserted on every `show`).
|
|
100
|
-
- **It is left out of every screen capture**, `capture()` included: `SetWindowDisplayAffinity(WDA_EXCLUDEFROMCAPTURE)`.
|
|
101
|
-
A helper Windows refuses that to quits rather than show a notice that would cover part of the next screenshot.
|
|
102
|
-
- **The hotkey is `RegisterHotKey` on that window**, in this package's key vocabulary (`"Ctrl+Alt+Shift+P"`), so it
|
|
103
|
-
works exactly while the notice is open. When another program already holds it, `hotkeyTaken` says so.
|
|
104
|
-
|
|
105
|
-
The window's C# is C# 5, the newest Windows PowerShell 5.1 compiles. What it asks Windows for is pinned by
|
|
106
|
-
[src/notice-windows.test.ts](src/notice-windows.test.ts); whether Windows honours it is for a person at a Windows
|
|
107
|
-
screen to see.
|
|
108
|
-
|
|
109
|
-
## Two details worth knowing
|
|
110
|
-
|
|
111
|
-
**Coordinates are screenshot pixels.** `frame()` also reports the virtual desktop's `origin`, which is not
|
|
112
|
-
always (0,0): a second monitor to the left of the primary one gives Windows a negative left edge. The backends
|
|
113
|
-
add it back, so callers work in screenshot pixels throughout and multi-monitor setups stop being a source of
|
|
114
|
-
silent misclicks.
|
|
115
|
-
|
|
116
|
-
**One key vocabulary, three renderings.** `keys.ts` fixes the names (X11 keysyms: `Return`, `Escape`,
|
|
117
|
-
`BackSpace`, `Page_Up`, plus `ctrl`/`alt`/`shift`/`super` and the aliases people actually type: `enter`, `esc`,
|
|
118
|
-
`win`, `cmd`) and each backend translates. Without it every caller would be platform-aware, which is the exact
|
|
119
|
-
coupling this package exists to remove.
|
|
14
|
+
- Runs on the user's device inside [`intentic-machine`](../machine). It knows nothing about agents or permissions;
|
|
15
|
+
the machine's device tools decide what is allowed before calling `desktop()`.
|
|
16
|
+
- No native modules, so it works from a single-file compiled binary: every action runs an existing program
|
|
17
|
+
(`run.ts`), and a missing one fails with a `DesktopError` that says what to install.
|
|
18
|
+
- Coordinates are screenshot pixels. On Windows each action adds the virtual desktop's origin, which is not `(0,0)`
|
|
19
|
+
on every multi-monitor setup.
|
|
20
|
+
- Windows and Linux only: on any other OS every input method throws. On Wayland, window listing works only under sway.
|
|
21
|
+
- `notice()` (Windows only) shows a banner that never takes focus or appears in a capture, and reports a global
|
|
22
|
+
hotkey press; the machine uses it to pause input. `windowsSession()` says whether the sign-in screen is up, since
|
|
23
|
+
keys typed then reach nothing.
|
|
120
24
|
|
|
121
25
|
## Key files
|
|
122
26
|
|
|
123
|
-
- [src/index.ts](src/index.ts)
|
|
124
|
-
- [src/
|
|
125
|
-
- [src/
|
|
126
|
-
- [src/
|
|
127
|
-
- [src/
|
|
128
|
-
- [src/
|
|
27
|
+
- [src/index.ts](src/index.ts) — `desktop()`: picks the backend for the current platform.
|
|
28
|
+
- [src/types.ts](src/types.ts) — the `Desktop` interface and the coordinate model.
|
|
29
|
+
- [src/keys.ts](src/keys.ts) — the one key-chord vocabulary each backend translates.
|
|
30
|
+
- [src/input-windows.ts](src/input-windows.ts) — pointer and keyboard through user32 from PowerShell.
|
|
31
|
+
- [src/input-linux.ts](src/input-linux.ts) — xdotool on X11, ydotool and wtype on Wayland.
|
|
32
|
+
- [src/notice-windows.ts](src/notice-windows.ts) — the on-screen notice and its hotkey.
|
package/dist/parse.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type SessionState, type WindowInfo } from "./types.js";
|
|
2
2
|
export declare const parseWmctrl: (output: string, focusedId?: string) => WindowInfo[];
|
|
3
3
|
export declare const parseSwayTree: (json: string) => WindowInfo[];
|
|
4
4
|
export declare const parseWindowsJson: (json: string) => WindowInfo[];
|
package/dist/parse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAO9E,eAAO,MAAM,WAAW,WAAY,MAAM,cAAc,MAAM,KAAG,UAAU,EA2BjE,CAAC;AA8CX,eAAO,MAAM,aAAa,SAAU,MAAM,KAAG,UAAU,EAA2D,CAAC;AAInH,eAAO,MAAM,gBAAgB,SAAU,MAAM,KAAG,UAAU,EAwBzD,CAAC;AAKF,eAAO,MAAM,gBAAgB,SAAU,MAAM,KAAG,YAAY,GAAG,SAe9D,CAAC;AASF,eAAO,MAAM,YAAY,OAAQ,MAAM,YAAY,MAAM,SAAS,YAAY,GAAG,SAAS,KAAG,MAU5F,CAAC;AAIF,eAAO,MAAM,YAAY,WAAY,MAAM,KAAG,OAAsF,CAAC"}
|
package/dist/parse.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DesktopError } from "./types.js";
|
|
1
2
|
export const parseWmctrl = (output, focusedId) => output
|
|
2
3
|
.split(/\r?\n/)
|
|
3
4
|
.map((line) => line.trim())
|
|
@@ -42,22 +43,18 @@ const walkSwayNode = (node) => {
|
|
|
42
43
|
...descendants,
|
|
43
44
|
];
|
|
44
45
|
};
|
|
45
|
-
|
|
46
|
+
const listedJson = (json, lister) => {
|
|
46
47
|
try {
|
|
47
|
-
return
|
|
48
|
+
return JSON.parse(json);
|
|
48
49
|
}
|
|
49
50
|
catch {
|
|
50
|
-
|
|
51
|
+
const said = json.trim().slice(0, 200);
|
|
52
|
+
throw new DesktopError(`${lister} answered something that is not a window list: ${said === "" ? "nothing" : said}`);
|
|
51
53
|
}
|
|
52
54
|
};
|
|
55
|
+
export const parseSwayTree = (json) => walkSwayNode(listedJson(json, "swaymsg"));
|
|
53
56
|
export const parseWindowsJson = (json) => {
|
|
54
|
-
|
|
55
|
-
try {
|
|
56
|
-
parsed = JSON.parse(json);
|
|
57
|
-
}
|
|
58
|
-
catch {
|
|
59
|
-
return [];
|
|
60
|
-
}
|
|
57
|
+
const parsed = listedJson(json, "PowerShell");
|
|
61
58
|
const rows = Array.isArray(parsed) ? parsed : [parsed];
|
|
62
59
|
return rows.flatMap((row) => {
|
|
63
60
|
const record = row;
|
package/dist/parse.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsC,MAAM,YAAY,CAAC;AAO9E,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,SAAkB,EAAgB,EAAE,CAC5E,MAAM;KACD,KAAK,CAAC,OAAO,CAAC;KACd,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;KAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAA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C,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,KAAK,MAAM,UAAU,CAAC,GAAG,GAAG,CAAC;AAMrH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAU,EAAE,QAAgB,EAAE,KAA+B,EAAU,EAAE;IAClG,MAAM,KAAK,GACP,KAAK,KAAK,SAAS;QACf,CAAC,CAAC,6CAA6C;QAC/C,CAAC,CAAC,KAAK,CAAC,MAAM;YACZ,CAAC,CAAC,uLAAuL;YACzL,CAAC,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS;gBAC9B,CAAC,CAAC,oFAAoF;gBACtF,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,6FAA6F,CAAC;IACvI,OAAO,iCAAiC,EAAE,uBAAuB,QAAQ,cAAc,KAAK,GAAG,CAAC;AACpG,CAAC,CAAC;AAIF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAc,EAAW,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/screen.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../src/screen.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAyB5D,eAAO,MAAM,SAAS,QAAO,OAAwG,CAAC;
|
|
1
|
+
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../src/screen.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAyB5D,eAAO,MAAM,SAAS,QAAO,OAAwG,CAAC;AAmCtI,eAAO,MAAM,mBAAmB,QAAO,OACiF,CAAC;AAEzH,eAAO,MAAM,OAAO,QAAa,OAAO,CAAC,MAAM,CAoC9C,CAAC;AAIF,eAAO,MAAM,OAAO,QAAS,MAAM,KAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAKpE,CAAC;AAOF,eAAO,MAAM,KAAK,QAAa,OAAO,CAAC,WAAW,CAoBjD,CAAC"}
|
package/dist/screen.js
CHANGED
|
@@ -31,10 +31,15 @@ const grabbers = (out) => {
|
|
|
31
31
|
];
|
|
32
32
|
return isWayland() ? [...waylandTools, ...x11Tools] : [...x11Tools, ...waylandTools];
|
|
33
33
|
};
|
|
34
|
+
const MISSING = "missing";
|
|
34
35
|
const attempt = (command, args) => new Promise((resolvePromise) => {
|
|
35
36
|
const child = spawn(command, [...args], { windowsHide: true });
|
|
36
|
-
|
|
37
|
-
child.on("
|
|
37
|
+
let said = "";
|
|
38
|
+
child.stderr?.on("data", (chunk) => {
|
|
39
|
+
said += chunk.toString();
|
|
40
|
+
});
|
|
41
|
+
child.on("error", (error) => resolvePromise(error.code === "ENOENT" ? MISSING : error.message));
|
|
42
|
+
child.on("close", (code) => resolvePromise(code === 0 ? undefined : said.trim() === "" ? `exited with code ${code}` : said.trim().slice(-300)));
|
|
38
43
|
});
|
|
39
44
|
export const hasGraphicalSession = () => process.platform === "win32" || process.env["DISPLAY"] !== undefined || process.env["WAYLAND_DISPLAY"] !== undefined;
|
|
40
45
|
export const capture = async () => {
|
|
@@ -42,15 +47,25 @@ export const capture = async () => {
|
|
|
42
47
|
throw new DesktopError("This device has no graphical session right now (no DISPLAY or WAYLAND_DISPLAY), so there is no screen.");
|
|
43
48
|
}
|
|
44
49
|
const out = pngPath();
|
|
50
|
+
const failures = [];
|
|
45
51
|
try {
|
|
46
52
|
for (const grabber of grabbers(out)) {
|
|
47
|
-
|
|
53
|
+
const failed = await attempt(grabber.command, grabber.args(out));
|
|
54
|
+
if (failed === MISSING) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (failed !== undefined) {
|
|
58
|
+
failures.push(`${grabber.command}: ${failed}`);
|
|
48
59
|
continue;
|
|
49
60
|
}
|
|
50
61
|
const png = await readFile(out).catch(() => undefined);
|
|
51
62
|
if (png !== undefined && png.length > 0) {
|
|
52
63
|
return png;
|
|
53
64
|
}
|
|
65
|
+
failures.push(`${grabber.command}: exited cleanly without writing an image`);
|
|
66
|
+
}
|
|
67
|
+
if (failures.length > 0) {
|
|
68
|
+
throw new DesktopError(`Could not capture the screen. ${failures.join("; ")}`);
|
|
54
69
|
}
|
|
55
70
|
const installs = grabbers(out)
|
|
56
71
|
.map((grabber) => grabber.install)
|
package/dist/screen.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.js","sourceRoot":"","sources":["../src/screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAoB,MAAM,YAAY,CAAC;AAM5D,MAAM,OAAO,GAAG,GAAW,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,oBAAoB,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAQlG,MAAM,eAAe,GAAG,CAAC,GAAW,EAAU,EAAE,CAC5C;IACI,6DAA6D;IAC7D,+DAA+D;IAC/D,8DAA8D;IAC9D,kDAAkD;IAClD,sDAAsD;IACtD,cAAc,GAAG,gDAAgD;IACjE,+BAA+B;CAClC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEhB,MAAM,CAAC,MAAM,SAAS,GAAG,GAAY,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,KAAK,SAAS,IAAI,OAAO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AAE,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;AACnE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/desktop-automation",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.311.0",
|
|
4
4
|
"description": "Drive a desktop from Node: capture the screen, move the pointer, click, type and scroll, Windows and Linux, no native modules",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|