seeu-computeruse 1.2.0 → 1.2.1

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.
@@ -9,10 +9,21 @@ const os = require("os");
9
9
  const path = require("path");
10
10
  const { spawn } = require("child_process");
11
11
 
12
+ // Some apps (Qwen / 千问 5.2) start tools with HOME pointed at a folder of their own. Python then can't
13
+ // find the libraries installed with `pip install --user`, and ~/.seeu isn't where we look. So use the
14
+ // account's real home folder (from the system's user record, not $HOME) and hand that to SeeU.
15
+ function realHome() {
16
+ try {
17
+ const h = os.userInfo().homedir;
18
+ if (h) return h;
19
+ } catch (e) { /* fall back below */ }
20
+ return os.homedir();
21
+ }
22
+
12
23
  function homes() {
13
24
  const out = [];
14
25
  if (process.env.SEEU_HOME) out.push(process.env.SEEU_HOME);
15
- out.push(path.join(os.homedir(), ".seeu"));
26
+ out.push(path.join(realHome(), ".seeu"));
16
27
  return out;
17
28
  }
18
29
 
@@ -37,7 +48,13 @@ if (!d) {
37
48
  process.exit(1);
38
49
  }
39
50
 
40
- const child = spawn(d.python, [d.server], { stdio: "inherit" });
51
+ const env = Object.assign({}, process.env);
52
+ const home = realHome();
53
+ if (home && env.HOME !== home) {
54
+ env.SEEU_HOST_HOME = env.HOME || ""; // keep what the app set, in case anyone needs it
55
+ env.HOME = home;
56
+ }
57
+ const child = spawn(d.python, [d.server], { stdio: "inherit", env });
41
58
  child.on("error", (e) => {
42
59
  process.stderr.write(`Could not start SeeU (${d.python} ${d.server}): ${e.message}\n`);
43
60
  process.exit(1);
package/package.json CHANGED
@@ -1,12 +1,28 @@
1
1
  {
2
2
  "name": "seeu-computeruse",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Launcher for SeeU (background Computer Use for your Mac) — for AI apps that only accept `npx` MCP commands, such as Qwen (千问). Starts the SeeU you already installed.",
5
- "bin": { "seeu-computeruse": "bin/seeu-computeruse.js" },
6
- "files": ["bin/", "README.md"],
7
- "engines": { "node": ">=16" },
8
- "keywords": ["mcp", "computer-use", "seeu", "macos", "qwen"],
9
- "repository": { "type": "git", "url": "git+https://github.com/Mr-Bingoo/seeu-computeruse.git" },
5
+ "bin": {
6
+ "seeu-computeruse": "bin/seeu-computeruse.js"
7
+ },
8
+ "files": [
9
+ "bin/",
10
+ "README.md"
11
+ ],
12
+ "engines": {
13
+ "node": ">=16"
14
+ },
15
+ "keywords": [
16
+ "mcp",
17
+ "computer-use",
18
+ "seeu",
19
+ "macos",
20
+ "qwen"
21
+ ],
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/Mr-Bingoo/seeu-computeruse.git"
25
+ },
10
26
  "homepage": "https://github.com/Mr-Bingoo/seeu-computeruse",
11
27
  "license": "MIT",
12
28
  "author": "@Mr_Bingoo"