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 CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/automify.svg)](https://www.npmjs.com/package/automify)
6
6
  [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
7
- [![Node.js](https://img.shields.io/badge/node-%3E%3D18.18-brightgreen.svg)](https://nodejs.org/)
7
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D20.12.2-brightgreen.svg)](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 `18.18+` and a provider config. OpenAI examples use `gpt-5.5`.
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.2",
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
- "@jimp/core": "^1.6.1",
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": ">=18.18"
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
- "@jimp/core@1.6.1",
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 });
@@ -715,15 +715,10 @@ async function resizeScreenshot(screenshot, target, options, automify) {
715
715
  }
716
716
 
717
717
  try {
718
- const [{ createJimp }, png, resize] = await Promise.all([
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("image/png");
721
+ return image.getBuffer(JimpMime.png);
727
722
  } catch (error) {
728
723
  debugLog(automify.debug, "automify", "screenshot_resize_skipped", {
729
724
  reason: error?.message,