gm-cc 2.0.209 → 2.0.211
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/.claude-plugin/marketplace.json +1 -1
- package/hooks/pre-tool-use-hook.js +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills/ssh/SKILL.md +86 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "AnEntrypoint"
|
|
5
5
|
},
|
|
6
6
|
"description": "State machine agent with hooks, skills, and automated git enforcement",
|
|
7
|
-
"version": "2.0.
|
|
7
|
+
"version": "2.0.211",
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "State machine agent with hooks, skills, and automated git enforcement"
|
|
10
10
|
},
|
|
@@ -258,7 +258,7 @@ const run = () => {
|
|
|
258
258
|
.then(out => process.stdout.write(String(out || '')))
|
|
259
259
|
.catch(e => { process.stderr.write(e.message || String(e)); process.exit(1); });
|
|
260
260
|
`;
|
|
261
|
-
const r = spawnSync('bun', ['-e', runnerCode], { encoding: 'utf-8', timeout:
|
|
261
|
+
const r = spawnSync('bun', ['-e', runnerCode], { encoding: 'utf-8', timeout: 60000, windowsHide: true });
|
|
262
262
|
const out = (r.stdout || '').trimEnd();
|
|
263
263
|
const err = (r.stderr || '').trimEnd();
|
|
264
264
|
if (r.status !== 0 || r.error) return allowWithNoop(`exec:${rawLang} error:\n\n${r.error ? r.error.message : (err || 'exec failed')}`);
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ssh
|
|
3
|
+
description: Run shell commands on remote SSH hosts via exec:ssh. Reads targets from ~/.claude/ssh-targets.json. Use for deploying, monitoring, or controlling remote machines.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# exec:ssh — Remote SSH Execution
|
|
7
|
+
|
|
8
|
+
Runs shell commands on a remote host over SSH. No shell open, no manual connection — just write the command.
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
Create `~/.claude/ssh-targets.json`:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"default": {
|
|
17
|
+
"host": "192.168.1.10",
|
|
18
|
+
"port": 22,
|
|
19
|
+
"username": "pi",
|
|
20
|
+
"password": "yourpassword"
|
|
21
|
+
},
|
|
22
|
+
"prod": {
|
|
23
|
+
"host": "10.0.0.1",
|
|
24
|
+
"username": "ubuntu",
|
|
25
|
+
"keyPath": "/home/user/.ssh/id_rsa"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Fields: `host` (required), `port` (default 22), `username` (required), `password` OR `keyPath` + optional `passphrase`.
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
exec:ssh
|
|
36
|
+
<shell command>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Target a named host with `@name` on the first line:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
exec:ssh
|
|
43
|
+
@prod
|
|
44
|
+
sudo systemctl restart myapp
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Multi-line scripts work:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
exec:ssh
|
|
51
|
+
cd /var/log && tail -20 syslog
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Process Persistence
|
|
55
|
+
|
|
56
|
+
SSH sessions kill child processes on close. To keep a process running after the command returns:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
exec:ssh
|
|
60
|
+
sudo systemctl reset-failed myunit 2>/dev/null; systemd-run --unit=myunit bash -c 'your-long-running-command'
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Always call `systemctl reset-failed <unit>` before reusing a unit name, or use a unique timestamped name:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
exec:ssh
|
|
67
|
+
systemd-run --unit=job-$(date +%s) bash -c 'nohup myprogram &'
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Fallback if systemd unavailable:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
exec:ssh
|
|
74
|
+
setsid nohup bash -c 'myprogram > /tmp/out.log 2>&1' &
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Dependency
|
|
78
|
+
|
|
79
|
+
Requires `ssh2` npm package. Install in `~/.claude/gm-tools`:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
exec:bash
|
|
83
|
+
cd ~/.claude/gm-tools && npm install ssh2
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The plugin searches: `~/.claude/gm-tools/node_modules/ssh2`, `~/.claude/plugins/node_modules/ssh2`, then global.
|