gemini-computer-use 0.4.3 → 0.4.5
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 +18 -1086
- package/cli.js +56 -0
- package/package.json +14 -24
- package/LICENSE +0 -21
- package/bin/cli.js +0 -122
- package/core/__init__.py +0 -0
- package/core/agent.py +0 -767
- package/core/agent_harness.py +0 -67
- package/core/code_cache.py +0 -244
- package/core/device.py +0 -2400
- package/core/domain.py +0 -303
- package/core/hooks.py +0 -61
- package/core/mcp_tools.py +0 -3497
- package/core/policies.py +0 -132
- package/core/schemas.py +0 -49
- package/core/server.py +0 -972
- package/core/subagents.py +0 -55
- package/core/termux.py +0 -916
- package/core/triggers.py +0 -70
- package/core/updater.py +0 -1713
- package/core/version.py +0 -31
- package/core/vitals.py +0 -181
- package/core/web_share.py +0 -814
- package/gateway.py +0 -2862
- package/install-gui.cmd +0 -40
- package/install-gui.ps1 +0 -1882
- package/install-gui.strings.json +0 -211
- package/install.ps1 +0 -1287
- package/install.sh +0 -2013
- package/ops/doctor.ps1 +0 -735
- package/ops/mesh-domain.sh +0 -86
- package/ops/nginx/README.md +0 -77
- package/ops/nginx/antigravity-mesh-mcp.conf +0 -172
- package/ops/nginx/mesh-domain.vhost.template +0 -58
- package/ops/nginx/render-domain.sh +0 -123
- package/ops/update.ps1 +0 -373
- package/ops/windows/README.md +0 -298
- package/ops/windows/agent-watchdog.ps1 +0 -575
- package/ops/windows/run-hidden.vbs +0 -64
- package/skills/orchestrator.md +0 -26
package/cli.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* gemini-computer-use is the pre-rename name of Remote Harness MCP.
|
|
4
|
+
*
|
|
5
|
+
* This package is a thin alias: it declares remote-harness-mcp as a dependency
|
|
6
|
+
* and forwards every argument to that package's CLI, so an existing
|
|
7
|
+
* `npx gemini-computer-use` (or a global install) keeps working and pulls the
|
|
8
|
+
* current code instead of a frozen copy of it.
|
|
9
|
+
*
|
|
10
|
+
* Nothing but the CLI is duplicated here - the node payload, the installer and
|
|
11
|
+
* the gateway live in remote-harness-mcp.
|
|
12
|
+
*/
|
|
13
|
+
'use strict';
|
|
14
|
+
|
|
15
|
+
const { spawn } = require('child_process');
|
|
16
|
+
|
|
17
|
+
// The real CLI. `remote-harness-mcp` declares "main": "bin/cli.js", so both the
|
|
18
|
+
// deep path and the package name resolve to the same file.
|
|
19
|
+
const CANDIDATES = ['remote-harness-mcp/bin/cli.js', 'remote-harness-mcp'];
|
|
20
|
+
|
|
21
|
+
function resolveCli() {
|
|
22
|
+
for (const id of CANDIDATES) {
|
|
23
|
+
try {
|
|
24
|
+
return require.resolve(id);
|
|
25
|
+
} catch (err) {
|
|
26
|
+
// try the next spelling
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const cli = resolveCli();
|
|
33
|
+
if (!cli) {
|
|
34
|
+
console.error('gemini-computer-use is an alias for remote-harness-mcp, but the');
|
|
35
|
+
console.error('remote-harness-mcp package is not installed next to it.');
|
|
36
|
+
console.error('Install it directly instead: npm install -g remote-harness-mcp');
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const child = spawn(process.execPath, [cli].concat(process.argv.slice(2)), {
|
|
41
|
+
stdio: 'inherit'
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
child.on('error', (err) => {
|
|
45
|
+
console.error('gemini-computer-use: could not start ' + cli + ': ' + err.message);
|
|
46
|
+
process.exit(1);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
child.on('exit', (code, signal) => {
|
|
50
|
+
if (signal) {
|
|
51
|
+
// Mirror the child's death by signal, as a shell would.
|
|
52
|
+
process.kill(process.pid, signal);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
process.exit(code === null ? 1 : code);
|
|
56
|
+
});
|
package/package.json
CHANGED
|
@@ -1,35 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gemini-computer-use",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "
|
|
3
|
+
"version": "0.4.5",
|
|
4
|
+
"description": "Alias for remote-harness-mcp: turn any PC, laptop, server or Android phone into an autonomous execution node for Gemini via native MCP.",
|
|
5
|
+
"main": "cli.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"gemini-computer-use": "
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"start": "node ./bin/cli.js",
|
|
11
|
-
"prepack": "node -e \"const fs=require('fs'),path=require('path');const walk=(d)=>{for(const e of fs.readdirSync(d,{withFileTypes:true})){if(e.name==='.git'||e.name==='node_modules'||e.name==='venv')continue;const p=path.join(d,e.name);if(e.isDirectory()){if(e.name==='__pycache__')fs.rmSync(p,{recursive:true,force:true});else walk(p);}else if(/\\.(pyc|pyo)$/.test(e.name))fs.rmSync(p,{force:true});}};walk('.');\""
|
|
7
|
+
"gemini-computer-use": "cli.js"
|
|
12
8
|
},
|
|
13
9
|
"files": [
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"skills",
|
|
17
|
-
"ops",
|
|
18
|
-
"install.sh",
|
|
19
|
-
"install.ps1",
|
|
20
|
-
"install-gui.ps1",
|
|
21
|
-
"install-gui.strings.json",
|
|
22
|
-
"install-gui.cmd",
|
|
23
|
-
"README.md",
|
|
24
|
-
"LICENSE",
|
|
25
|
-
"gateway.py"
|
|
10
|
+
"cli.js",
|
|
11
|
+
"README.md"
|
|
26
12
|
],
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"remote-harness-mcp": "^0.4.5"
|
|
15
|
+
},
|
|
27
16
|
"keywords": [
|
|
28
17
|
"gemini",
|
|
29
18
|
"mcp",
|
|
30
19
|
"computer-use",
|
|
31
20
|
"model-context-protocol",
|
|
32
|
-
"
|
|
21
|
+
"remote-harness-mcp",
|
|
33
22
|
"automation",
|
|
34
23
|
"google-gemini",
|
|
35
24
|
"spark"
|
|
@@ -38,10 +27,11 @@
|
|
|
38
27
|
"license": "MIT",
|
|
39
28
|
"repository": {
|
|
40
29
|
"type": "git",
|
|
41
|
-
"url": "git+https://github.com/LevRa7/
|
|
30
|
+
"url": "git+https://github.com/LevRa7/remote-harness-mcp.git",
|
|
31
|
+
"directory": "npm/gemini-computer-use"
|
|
42
32
|
},
|
|
43
33
|
"bugs": {
|
|
44
|
-
"url": "https://github.com/LevRa7/
|
|
34
|
+
"url": "https://github.com/LevRa7/remote-harness-mcp/issues"
|
|
45
35
|
},
|
|
46
|
-
"homepage": "https://github.com/LevRa7/
|
|
36
|
+
"homepage": "https://github.com/LevRa7/remote-harness-mcp#readme"
|
|
47
37
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Lev (levra7)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/bin/cli.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const { spawn } = require('child_process');
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const os = require('os');
|
|
5
|
-
const path = require('path');
|
|
6
|
-
|
|
7
|
-
const isWindows = os.platform() === 'win32';
|
|
8
|
-
const argv = process.argv.slice(2);
|
|
9
|
-
|
|
10
|
-
// The local maintenance subcommands run scripts that ship next to this CLI:
|
|
11
|
-
// in the installer payload, or in a repository checkout. Only the FIRST argument
|
|
12
|
-
// is inspected, so every other invocation - including the argument-passing
|
|
13
|
-
// bootstrap "-Quick", "-User <name>", "-Gateway <domain>" - is forwarded to the
|
|
14
|
-
// published installer exactly as before.
|
|
15
|
-
const LOCAL_SCRIPTS = {
|
|
16
|
-
doctor: path.join('ops', 'doctor.ps1'),
|
|
17
|
-
restart: path.join('ops', 'windows', 'agent-watchdog.ps1'),
|
|
18
|
-
update: path.join('ops', 'update.ps1')
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// Printed for "-h"/"-help"/"--help": the scripts declare their own parameter
|
|
22
|
-
// blocks, and forwarding a help flag to them only produced a PowerShell
|
|
23
|
-
// "parameter cannot be found" error.
|
|
24
|
-
const LOCAL_USAGE = {
|
|
25
|
-
doctor: [
|
|
26
|
-
'usage: gemini-computer-use doctor [-Json] [-ConfigDir <path>] [-TailLines <n>]',
|
|
27
|
-
' read-only node diagnostic: autostart interpreter, heartbeat, log tail, gateway state',
|
|
28
|
-
' exit code 0 when the node is healthy, 2 otherwise'
|
|
29
|
-
].join('\n'),
|
|
30
|
-
restart: [
|
|
31
|
-
'usage: gemini-computer-use restart [-Quiet] [-ConfigDir <path>] [-LogFile <path>] [-GraceSeconds <n>]',
|
|
32
|
-
' runs the watchdog once and starts the agent when the node is offline',
|
|
33
|
-
' exit code 0 when the node is online, 2 when the node is misconfigured, 3 when it is still offline'
|
|
34
|
-
].join('\n'),
|
|
35
|
-
update: [
|
|
36
|
-
'usage: gemini-computer-use update [-Check] [-Force] [-Offline] [-NoRestart] [-Json]',
|
|
37
|
-
' [-InstallDir <path>] [-Python <path>] [-ConfigDir <path>]',
|
|
38
|
-
' self-update from the newest GitHub release: -Check only reports what the',
|
|
39
|
-
' newest published version is, without -Check the payload is downloaded, its',
|
|
40
|
-
' SHA-256 verified and installed with a rollback backup, then the node restarts',
|
|
41
|
-
' exit code 0 up to date or applied, 2 update available (-Check), 3 failed,',
|
|
42
|
-
' 4 applied and the node is restarting'
|
|
43
|
-
].join('\n')
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
function findLocalScript(relative) {
|
|
47
|
-
// The CLI is "bin/cli.js", so the payload/repository root is its parent; a
|
|
48
|
-
// bundled layout that puts ops/ next to the CLI and the current directory are
|
|
49
|
-
// accepted as well.
|
|
50
|
-
const roots = [path.resolve(__dirname, '..'), path.resolve(__dirname), process.cwd()];
|
|
51
|
-
for (const root of roots) {
|
|
52
|
-
const candidate = path.join(root, relative);
|
|
53
|
-
if (fs.existsSync(candidate)) {
|
|
54
|
-
return candidate;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function runLocalScript(name, rest) {
|
|
61
|
-
if (!isWindows) {
|
|
62
|
-
console.error(`${name} is Windows-only: it drives Windows PowerShell 5.1 scripts.`);
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
if (rest.some(arg => ['-h', '--h', '-help', '--help'].includes(arg.toLowerCase()))) {
|
|
66
|
-
console.log(LOCAL_USAGE[name]);
|
|
67
|
-
process.exit(0);
|
|
68
|
-
}
|
|
69
|
-
const relative = LOCAL_SCRIPTS[name];
|
|
70
|
-
const script = findLocalScript(relative);
|
|
71
|
-
if (!script) {
|
|
72
|
-
console.error(`Cannot find ${relative.split(path.sep).join('/')} next to this CLI.`);
|
|
73
|
-
console.error('Run this from an installed node or from a repository checkout: the');
|
|
74
|
-
console.error('doctor and the watchdog ship with the installer payload.');
|
|
75
|
-
process.exit(1);
|
|
76
|
-
}
|
|
77
|
-
// Windows PowerShell binds parameter names case-insensitively and accepts the
|
|
78
|
-
// documented spelling, so a "--json" style flag only needs its second dash
|
|
79
|
-
// removed to reach -Json. Everything else is passed through untouched.
|
|
80
|
-
const forwarded = rest.map(arg => (arg.startsWith('--') ? arg.slice(1) : arg));
|
|
81
|
-
const ps = spawn(
|
|
82
|
-
'powershell.exe',
|
|
83
|
-
['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', script].concat(forwarded),
|
|
84
|
-
{ stdio: 'inherit' }
|
|
85
|
-
);
|
|
86
|
-
ps.on('error', (err) => {
|
|
87
|
-
console.error(`${name}: could not start powershell.exe: ${err.message}`);
|
|
88
|
-
process.exit(1);
|
|
89
|
-
});
|
|
90
|
-
ps.on('exit', (code) => process.exit(code === null ? 1 : code));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function launchRemoteInstaller(args) {
|
|
94
|
-
const rawArgs = args.map(arg => `"${arg.replace(/"/g, '\\"')}"`).join(' ');
|
|
95
|
-
|
|
96
|
-
console.log('🚀 Launching Gemini Computer Use installer...');
|
|
97
|
-
|
|
98
|
-
if (isWindows) {
|
|
99
|
-
const psCmd = rawArgs
|
|
100
|
-
? `& { $s = Invoke-RestMethod https://racknerd-5a24bf9.merino-carob.ts.net/install.ps1; & ([scriptblock]::Create($s)) ${rawArgs} }`
|
|
101
|
-
: `irm https://racknerd-5a24bf9.merino-carob.ts.net/install.ps1 | iex`;
|
|
102
|
-
const ps = spawn('powershell.exe', ['-ExecutionPolicy', 'Bypass', '-Command', psCmd], {
|
|
103
|
-
stdio: 'inherit'
|
|
104
|
-
});
|
|
105
|
-
ps.on('exit', (code) => process.exit(code || 0));
|
|
106
|
-
} else {
|
|
107
|
-
const bashCmd = rawArgs
|
|
108
|
-
? `curl -fsSL https://racknerd-5a24bf9.merino-carob.ts.net/install.sh | bash -s -- ${rawArgs}`
|
|
109
|
-
: `curl -fsSL https://racknerd-5a24bf9.merino-carob.ts.net/install.sh | bash`;
|
|
110
|
-
const sh = spawn('bash', ['-c', bashCmd], {
|
|
111
|
-
stdio: 'inherit'
|
|
112
|
-
});
|
|
113
|
-
sh.on('exit', (code) => process.exit(code || 0));
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const subcommand = (argv[0] || '').toLowerCase();
|
|
118
|
-
if (Object.prototype.hasOwnProperty.call(LOCAL_SCRIPTS, subcommand)) {
|
|
119
|
-
runLocalScript(subcommand, argv.slice(1));
|
|
120
|
-
} else {
|
|
121
|
-
launchRemoteInstaller(argv);
|
|
122
|
-
}
|
package/core/__init__.py
DELETED
|
File without changes
|