seeu-computeruse 0.0.0-stage → 1.2.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 +15 -2
- package/bin/seeu-computeruse.js +48 -0
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
# seeu-computeruse (launcher)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A tiny launcher for **[SeeU](https://github.com/Mr-Bingoo/seeu-computeruse)** — background Computer Use for your Mac (Windows preview).
|
|
4
|
+
|
|
5
|
+
Some AI apps only accept MCP servers started with `npx` (for example **Qwen / 千问** desktop 5.2+). This package lets them start the SeeU you have already installed. It has no dependencies and downloads nothing else.
|
|
6
|
+
|
|
7
|
+
1. Install SeeU first (see the [README](https://github.com/Mr-Bingoo/seeu-computeruse#install)), then run once: `python3 -m seeu install qianwen`.
|
|
8
|
+
2. In the AI app, add an MCP server — name `seeu`, command:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npx -y seeu-computeruse
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
在千问里:左上切到「工作」→「连接」→「+ 添加」→「手动填写配置」,名称填 `seeu`,命令填 `npx -y seeu-computeruse`。
|
|
15
|
+
|
|
16
|
+
MIT · @Mr_Bingoo
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// SeeU launcher: some AI apps (e.g. Qwen / 千问) only accept MCP servers started with `npx`.
|
|
3
|
+
// This tiny package finds the SeeU you installed (it leaves a note at ~/.seeu/seeu_server.json
|
|
4
|
+
// when you run `python3 -m seeu install ...` or whenever its MCP server starts) and runs it,
|
|
5
|
+
// passing stdin/stdout straight through. No dependencies, nothing is downloaded.
|
|
6
|
+
"use strict";
|
|
7
|
+
const fs = require("fs");
|
|
8
|
+
const os = require("os");
|
|
9
|
+
const path = require("path");
|
|
10
|
+
const { spawn } = require("child_process");
|
|
11
|
+
|
|
12
|
+
function homes() {
|
|
13
|
+
const out = [];
|
|
14
|
+
if (process.env.SEEU_HOME) out.push(process.env.SEEU_HOME);
|
|
15
|
+
out.push(path.join(os.homedir(), ".seeu"));
|
|
16
|
+
return out;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function findSeeU() {
|
|
20
|
+
for (const h of homes()) {
|
|
21
|
+
const f = path.join(h, "seeu_server.json");
|
|
22
|
+
try {
|
|
23
|
+
const d = JSON.parse(fs.readFileSync(f, "utf8"));
|
|
24
|
+
if (d && d.python && d.server && fs.existsSync(d.server)) return d;
|
|
25
|
+
} catch (e) { /* not there / unreadable: try the next one */ }
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const d = findSeeU();
|
|
31
|
+
if (!d) {
|
|
32
|
+
process.stderr.write(
|
|
33
|
+
"SeeU is not installed on this computer yet (or has never been set up).\n" +
|
|
34
|
+
"Install it first: https://github.com/Mr-Bingoo/seeu-computeruse#install\n" +
|
|
35
|
+
"then run once: python3 -m seeu install qianwen (on Windows: python -m seeu install qianwen)\n" +
|
|
36
|
+
"还没装 SeeU(或还没接入过)。先按上面的链接安装,再运行一次 python3 -m seeu install qianwen。\n");
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const child = spawn(d.python, [d.server], { stdio: "inherit" });
|
|
41
|
+
child.on("error", (e) => {
|
|
42
|
+
process.stderr.write(`Could not start SeeU (${d.python} ${d.server}): ${e.message}\n`);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
});
|
|
45
|
+
child.on("exit", (code) => process.exit(code === null ? 1 : code));
|
|
46
|
+
for (const s of ["SIGINT", "SIGTERM", "SIGHUP"]) {
|
|
47
|
+
try { process.on(s, () => child.kill(s)); } catch (e) { /* SIGHUP is not on Windows */ }
|
|
48
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seeu-computeruse",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.2.0",
|
|
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" },
|
|
10
|
+
"homepage": "https://github.com/Mr-Bingoo/seeu-computeruse",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "@Mr_Bingoo"
|
|
13
|
+
}
|