automify 0.1.2 → 0.1.4
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 +2 -2
- package/package.json +3 -5
- package/scripts/install-desktop.js +26 -3
- package/src/lib/automify.js +2 -7
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/automify)
|
|
6
6
|
[](./LICENSE)
|
|
7
|
-
[](https://nodejs.org/)
|
|
8
8
|
|
|
9
9
|
`Automify` is a Node.js library for AI computer use and command use across web apps, terminals, native desktops, Docker CLI sandboxes, and Docker-backed Linux desktops.
|
|
10
10
|
|
|
@@ -48,7 +48,7 @@ Chromium is installed by the package `postinstall` script. Skip it with:
|
|
|
48
48
|
AUTOMIFY_SKIP_BROWSER_INSTALL=1 npm install automify
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
Requirements: Node.js `
|
|
51
|
+
Requirements: Node.js `20.12.2+` and a provider config. OpenAI examples use `gpt-5.5`.
|
|
52
52
|
|
|
53
53
|
Automify is published as an ES module package, so the examples use modern `import` syntax:
|
|
54
54
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "automify",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "AI computer use for browser, CLI, and desktop in Node.js.",
|
|
5
5
|
"homepage": "https://aldovincenti.github.io/automify",
|
|
6
6
|
"bugs": {
|
|
@@ -46,9 +46,7 @@
|
|
|
46
46
|
"format:check": "prettier --check ."
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"
|
|
50
|
-
"@jimp/js-png": "^1.6.1",
|
|
51
|
-
"@jimp/plugin-resize": "^1.6.1",
|
|
49
|
+
"jimp": "^1.6.1",
|
|
52
50
|
"playwright": ">=1.40.0"
|
|
53
51
|
},
|
|
54
52
|
"peerDependencies": {
|
|
@@ -60,7 +58,7 @@
|
|
|
60
58
|
}
|
|
61
59
|
},
|
|
62
60
|
"engines": {
|
|
63
|
-
"node": ">=
|
|
61
|
+
"node": ">=20.12.2"
|
|
64
62
|
},
|
|
65
63
|
"keywords": [
|
|
66
64
|
"automation",
|
|
@@ -24,9 +24,7 @@ const platformPackageDir = join(nutScope, `libnut-${process.platform}`);
|
|
|
24
24
|
const macPermissionsPackageDir = join(nutScope, "node-mac-permissions");
|
|
25
25
|
|
|
26
26
|
const runtimeDependencies = [
|
|
27
|
-
"
|
|
28
|
-
"@jimp/js-png@1.6.1",
|
|
29
|
-
"@jimp/plugin-resize@1.6.1",
|
|
27
|
+
"jimp@1.6.1",
|
|
30
28
|
"node-abort-controller@3.1.1",
|
|
31
29
|
"clipboardy@2.3.0",
|
|
32
30
|
"bindings@1.5.0"
|
|
@@ -71,6 +69,7 @@ runPnpm(["--filter", "@nut-tree/shared", "run", "compile"], { cwd: nutSource });
|
|
|
71
69
|
runPnpm(["--filter", "@nut-tree/provider-interfaces", "run", "compile"], { cwd: nutSource });
|
|
72
70
|
runPnpm(["--filter", "@nut-tree/default-clipboard-provider", "run", "compile"], { cwd: nutSource });
|
|
73
71
|
runPnpm(["--filter", "@nut-tree/libnut", "run", "compile"], { cwd: nutSource });
|
|
72
|
+
writeLibnutImportBridge();
|
|
74
73
|
runPnpm(["--filter", "@nut-tree/nut-js", "run", "compile"], { cwd: nutSource });
|
|
75
74
|
|
|
76
75
|
run("npm", ["install", "--no-save", ...runtimeDependencies], { cwd: root });
|
|
@@ -227,6 +226,30 @@ function patchNutWorkspace() {
|
|
|
227
226
|
}
|
|
228
227
|
}
|
|
229
228
|
|
|
229
|
+
function writeLibnutImportBridge() {
|
|
230
|
+
const distDir = join(nutSource, "providers", "libnut", "dist");
|
|
231
|
+
mkdirSync(distDir, { recursive: true });
|
|
232
|
+
writeText(
|
|
233
|
+
join(distDir, "import_libnut.js"),
|
|
234
|
+
`"use strict";
|
|
235
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
236
|
+
exports.libnut = void 0;
|
|
237
|
+
exports.libnut = process.platform === "win32"
|
|
238
|
+
? require("@nut-tree/libnut-win32")
|
|
239
|
+
: process.platform === "linux"
|
|
240
|
+
? require("@nut-tree/libnut-linux")
|
|
241
|
+
: require("@nut-tree/libnut-darwin");
|
|
242
|
+
`
|
|
243
|
+
);
|
|
244
|
+
writeText(
|
|
245
|
+
join(distDir, "import_libnut.d.ts"),
|
|
246
|
+
`import ln from "./libnut";
|
|
247
|
+
declare const libnut: typeof ln;
|
|
248
|
+
export { libnut };
|
|
249
|
+
`
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
|
|
230
253
|
function installWorkspacePackage(source, target) {
|
|
231
254
|
rmSync(target, { recursive: true, force: true });
|
|
232
255
|
mkdirSync(dirname(target), { recursive: true });
|
package/src/lib/automify.js
CHANGED
|
@@ -715,15 +715,10 @@ async function resizeScreenshot(screenshot, target, options, automify) {
|
|
|
715
715
|
}
|
|
716
716
|
|
|
717
717
|
try {
|
|
718
|
-
const
|
|
719
|
-
import("@jimp/core"),
|
|
720
|
-
import("@jimp/js-png"),
|
|
721
|
-
import("@jimp/plugin-resize")
|
|
722
|
-
]);
|
|
723
|
-
const Jimp = createJimp({ formats: [png.default], plugins: [resize.methods] });
|
|
718
|
+
const { Jimp, JimpMime } = await import("jimp");
|
|
724
719
|
const image = await Jimp.read(Buffer.from(screenshot));
|
|
725
720
|
image.resize({ w: target.width, h: target.height });
|
|
726
|
-
return image.getBuffer(
|
|
721
|
+
return image.getBuffer(JimpMime.png);
|
|
727
722
|
} catch (error) {
|
|
728
723
|
debugLog(automify.debug, "automify", "screenshot_resize_skipped", {
|
|
729
724
|
reason: error?.message,
|