@askjo/camofox-browser 1.0.13 → 1.0.14

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
@@ -9,11 +9,14 @@
9
9
  <a href="https://hub.docker.com"><img src="https://img.shields.io/badge/docker-ready-blue" alt="Docker" /></a>
10
10
  </p>
11
11
  <p>
12
- Built on <a href="https://camoufox.com">Camoufox</a> — a Firefox fork with fingerprint spoofing at the C++ level.<br/>
12
+ Standing on the mighty shoulders of <a href="https://camoufox.com">Camoufox</a> — a Firefox fork with fingerprint spoofing at the C++ level.
13
+ <br/><br/>
13
14
  The same engine behind <a href="https://askjo.ai">askjo.ai</a>'s web browsing.
14
15
  </p>
15
16
  </div>
16
17
 
18
+ <br/>
19
+
17
20
  ---
18
21
 
19
22
  ## Why
@@ -167,8 +170,13 @@ npm install @askjo/camofox-browser
167
170
  ## Credits
168
171
 
169
172
  - [Camoufox](https://camoufox.com) — Firefox-based browser with C++ anti-detection
173
+ - [Donate to Camoufox's original creator daijro](https://camoufox.com/about/)
170
174
  - [OpenClaw](https://openclaw.ai) — Open-source AI agent framework
171
175
 
176
+ ## Crypto Scam Warning
177
+
178
+ Sketchy people are doing sketchy things with crypto tokens named "Camofox" now that this project is getting attention. **Camofox is not a crypto project and will never be one.** Any token, coin, or NFT using the Camofox name has nothing to do with us.
179
+
172
180
  ## License
173
181
 
174
182
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askjo/camofox-browser",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Headless browser automation server and OpenClaw plugin for AI agents - anti-detection, element refs, and session isolation",
5
5
  "main": "server.js",
6
6
  "license": "MIT",
@@ -56,7 +56,6 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "camoufox-js": "^0.8.5",
59
- "dotenv": "^17.2.3",
60
59
  "express": "^4.18.2",
61
60
  "playwright": "^1.50.0",
62
61
  "playwright-core": "^1.58.0",
package/plugin.ts CHANGED
@@ -108,7 +108,12 @@ async function startServer(
108
108
  const serverPath = join(pluginDir, "server.js");
109
109
  const proc = spawn("node", [serverPath], {
110
110
  cwd: pluginDir,
111
- env: { ...process.env, CAMOFOX_PORT: String(port) },
111
+ env: {
112
+ PATH: process.env.PATH,
113
+ HOME: process.env.HOME,
114
+ NODE_ENV: process.env.NODE_ENV,
115
+ CAMOFOX_PORT: String(port),
116
+ },
112
117
  stdio: ["ignore", "pipe", "pipe"],
113
118
  detached: false,
114
119
  });
@@ -377,8 +382,23 @@ export default function register(api: PluginApi) {
377
382
  async execute(_id, params) {
378
383
  const { tabId } = params as { tabId: string };
379
384
  const userId = ctx.agentId || "openclaw";
380
- const result = await fetchApi(baseUrl, `/tabs/${tabId}/screenshot?userId=${userId}`);
381
- return toToolResult(result);
385
+ const url = `${baseUrl}/tabs/${tabId}/screenshot?userId=${userId}`;
386
+ const res = await fetch(url);
387
+ if (!res.ok) {
388
+ const text = await res.text();
389
+ throw new Error(`${res.status}: ${text}`);
390
+ }
391
+ const arrayBuffer = await res.arrayBuffer();
392
+ const base64 = Buffer.from(arrayBuffer).toString("base64");
393
+ return {
394
+ content: [
395
+ {
396
+ type: "image",
397
+ data: base64,
398
+ mimeType: "image/png",
399
+ },
400
+ ],
401
+ };
382
402
  },
383
403
  }));
384
404
 
package/server.js CHANGED
@@ -1,4 +1,3 @@
1
- require('dotenv').config();
2
1
  const { Camoufox, launchOptions } = require('camoufox-js');
3
2
  const { firefox } = require('playwright-core');
4
3
  const express = require('express');