opencode-zombie-monitor 1.1.0 โ 1.1.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.
- package/README.md +44 -115
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,42 +1,30 @@
|
|
|
1
|
-
# ๐ง
|
|
1
|
+
# ๐ง opencode-zombie-monitor
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/opencode-zombie-monitor)
|
|
4
|
-
[]()
|
|
4
|
+
[](https://opencode.ai)
|
|
5
|
+
[](./LICENSE)
|
|
7
6
|
|
|
8
7
|
> *"The only good zombie is a dead zombie"* ๐
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
OpenCode plugin that hunts down and eliminates orphaned processes devouring your RAM.
|
|
11
10
|
|
|
12
11
|
## ๐ฑ The Horror Story
|
|
13
12
|
|
|
14
13
|
You're coding happily with OpenCode. You close a terminal tab. Life goes on...
|
|
15
14
|
|
|
16
|
-
**BUT WAIT!** The process didn't die. It's still there. Lurking.
|
|
15
|
+
**BUT WAIT!** The process didn't die. It's still there. Lurking. Eating your RAM. And every time you close a tab without pressing `q`... another zombie rises.
|
|
17
16
|
|
|
18
|
-
Before you know it:
|
|
19
17
|
```
|
|
20
18
|
$ ps aux | grep opencode
|
|
21
|
-
opencode ??
|
|
22
|
-
opencode ??
|
|
23
|
-
opencode ??
|
|
24
|
-
|
|
25
|
-
... ๐ YOUR RAM IS GONE ๐
|
|
19
|
+
opencode ?? S 156MB
|
|
20
|
+
opencode ?? S 143MB
|
|
21
|
+
opencode ?? S 98MB
|
|
22
|
+
... ๐ your RAM is gone
|
|
26
23
|
```
|
|
27
24
|
|
|
28
|
-
|
|
25
|
+
Those `??` = no TTY attached = zombie ๐ง
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- ๐ **Detects** zombie processes (no TTY = undead)
|
|
33
|
-
- ๐ง **Kills** them on sight (every message you send)
|
|
34
|
-
- ๐ข **Reports** the kills (without wasting LLM tokens)
|
|
35
|
-
- ๐งน **Keeps** your system clean automatically
|
|
36
|
-
|
|
37
|
-
## ๐ฆ Installation
|
|
38
|
-
|
|
39
|
-
Add to your `opencode.json`:
|
|
27
|
+
## ๐ฆ Install
|
|
40
28
|
|
|
41
29
|
```json
|
|
42
30
|
{
|
|
@@ -44,142 +32,83 @@ Add to your `opencode.json`:
|
|
|
44
32
|
}
|
|
45
33
|
```
|
|
46
34
|
|
|
47
|
-
Restart OpenCode. The hunt begins
|
|
35
|
+
Restart OpenCode. The hunt begins ๐ฏ
|
|
48
36
|
|
|
49
|
-
##
|
|
37
|
+
## ๐ซ How it works
|
|
50
38
|
|
|
51
|
-
|
|
39
|
+
Every message you send โ plugin scans for zombies โ calculates their RAM โ kills them โ reports exact numbers:
|
|
52
40
|
|
|
53
|
-
Just chat normally. The plugin silently patrols your system and eliminates zombies on every message.
|
|
54
|
-
|
|
55
|
-
When zombies are neutralized, you'll see:
|
|
56
41
|
```
|
|
57
|
-
๐ง Killed 3 zombie processes | Freed
|
|
42
|
+
๐ง Killed 3 zombie processes | Freed 397MB RAM | Headshot! ๐ฅ
|
|
58
43
|
```
|
|
59
44
|
|
|
60
|
-
|
|
45
|
+
No tokens wasted - notification goes via `ignored` message.
|
|
46
|
+
|
|
47
|
+
## ๐ฎ Commands
|
|
61
48
|
|
|
62
|
-
| Command |
|
|
63
|
-
|
|
64
|
-
| `/zombies` |
|
|
65
|
-
| `/kill-zombies` |
|
|
49
|
+
| Command | What |
|
|
50
|
+
|---------|------|
|
|
51
|
+
| `/zombies` | check status |
|
|
52
|
+
| `/kill-zombies` | manual headshot ๐ฅ |
|
|
66
53
|
|
|
67
|
-
**Check status:**
|
|
68
54
|
```
|
|
69
55
|
/zombies
|
|
70
|
-
```
|
|
71
|
-
```
|
|
72
56
|
โ
2 processes, no zombies
|
|
73
57
|
```
|
|
74
|
-
|
|
58
|
+
|
|
75
59
|
```
|
|
76
|
-
|
|
60
|
+
/zombies
|
|
61
|
+
๐ง 3 zombies of 5 processes | 284MB RAM | /kill-zombies
|
|
77
62
|
```
|
|
78
63
|
|
|
79
|
-
**Manual kill:**
|
|
80
64
|
```
|
|
81
65
|
/kill-zombies
|
|
66
|
+
๐ฅ Headshot! Killed 3 zombies | Freed 284MB RAM
|
|
82
67
|
```
|
|
83
|
-
```
|
|
84
|
-
๐ฅ Headshot! Killed 5 zombies | Freed 500MB RAM
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## โ๏ธ Configuration
|
|
88
68
|
|
|
89
|
-
|
|
69
|
+
## โ๏ธ Config
|
|
90
70
|
|
|
91
71
|
```json
|
|
92
72
|
{
|
|
93
73
|
"plugin": [
|
|
94
|
-
["opencode-zombie-monitor", {
|
|
95
|
-
"autoKill": true,
|
|
96
|
-
"threshold": 1
|
|
97
|
-
}]
|
|
74
|
+
["opencode-zombie-monitor", { "autoKill": false }]
|
|
98
75
|
]
|
|
99
76
|
}
|
|
100
77
|
```
|
|
101
78
|
|
|
102
|
-
| Option | Default |
|
|
103
|
-
|
|
104
|
-
| `autoKill` | `true` |
|
|
105
|
-
| `threshold` | `1` |
|
|
79
|
+
| Option | Default | What |
|
|
80
|
+
|--------|---------|------|
|
|
81
|
+
| `autoKill` | `true` | auto-kill or just notify |
|
|
82
|
+
| `threshold` | `1` | min zombies to trigger |
|
|
106
83
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
**RAMBO MODE** (default) โ Kill on sight:
|
|
84
|
+
**RAMBO MODE** (default) - kill on sight:
|
|
110
85
|
```json
|
|
111
86
|
{ "autoKill": true, "threshold": 1 }
|
|
112
87
|
```
|
|
113
88
|
|
|
114
|
-
**
|
|
115
|
-
```json
|
|
116
|
-
{ "autoKill": true, "threshold": 5 }
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
**MANUAL MODE** โ Only notify, kill with `/kill-zombies`:
|
|
89
|
+
**MANUAL MODE** - you pull the trigger:
|
|
120
90
|
```json
|
|
121
91
|
{ "autoKill": false }
|
|
122
92
|
```
|
|
123
93
|
|
|
124
|
-
## ๐ฅ๏ธ
|
|
125
|
-
|
|
126
|
-
| Platform | Status | TTY Pattern |
|
|
127
|
-
|----------|--------|-------------|
|
|
128
|
-
| macOS | โ
Ready to hunt | `??` |
|
|
129
|
-
| Linux | โ
Ready to hunt | `?` |
|
|
130
|
-
| Windows | โ Zombies win | N/A |
|
|
131
|
-
|
|
132
|
-
## ๐ Language Support
|
|
133
|
-
|
|
134
|
-
Auto-detects your language. Because zombies are international.
|
|
135
|
-
|
|
136
|
-
| Language | Detection | Example |
|
|
137
|
-
|----------|-----------|---------|
|
|
138
|
-
| ๐ฌ๐ง English | default | "Killed 3 zombie processes" |
|
|
139
|
-
| ๐ท๐บ Russian | `LANG=ru*` | "ะฃะฑะธัะพ 3 ะทะพะผะฑะธ-ะฟัะพัะตััะพะฒ" |
|
|
140
|
-
| ๐จ๐ณ Chinese | `LANG=zh*` | "ๅทฒๅปๆ 3 ไธชๅตๅฐธ่ฟ็จ" |
|
|
141
|
-
|
|
142
|
-
## ๐ฌ How It Works
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
146
|
-
โ You send a message โ
|
|
147
|
-
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
148
|
-
โผ
|
|
149
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
150
|
-
โ Plugin runs: ps aux | grep opencode โ
|
|
151
|
-
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
152
|
-
โผ
|
|
153
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
154
|
-
โ Filter: TTY == "??" (no terminal) โ
|
|
155
|
-
โ These are the zombies ๐ง โ
|
|
156
|
-
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
157
|
-
โผ
|
|
158
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
159
|
-
โ Execute: kill -9 <zombie_pids> โ
|
|
160
|
-
โ Headshot! ๐ฅ โ
|
|
161
|
-
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
162
|
-
โผ
|
|
163
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
164
|
-
โ Notify via "ignored" message โ
|
|
165
|
-
โ (Free! No LLM tokens used) โ
|
|
166
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
167
|
-
```
|
|
94
|
+
## ๐ฅ๏ธ Platforms
|
|
168
95
|
|
|
169
|
-
|
|
96
|
+
| Platform | Status |
|
|
97
|
+
|----------|--------|
|
|
98
|
+
| macOS | โ
hunting |
|
|
99
|
+
| Linux | โ
hunting |
|
|
100
|
+
| Windows | โ zombies win |
|
|
170
101
|
|
|
171
|
-
|
|
102
|
+
## ๐ Languages
|
|
172
103
|
|
|
173
|
-
|
|
104
|
+
Auto-detects from `LANG`: EN, RU, ZH.
|
|
174
105
|
|
|
175
106
|
## ๐ License
|
|
176
107
|
|
|
177
|
-
MIT
|
|
108
|
+
MIT - use it, fork it, kill zombies with it.
|
|
178
109
|
|
|
179
110
|
---
|
|
180
111
|
|
|
181
112
|
<p align="center">
|
|
182
|
-
|
|
183
|
-
<br><br>
|
|
184
|
-
<b>From Russia with <img src="./assets/russia-heart.png" width="20" height="20" alt="love"></b>
|
|
113
|
+
From Russia with <img src="./assets/russia-heart.png" width="16" height="16" alt="love">
|
|
185
114
|
</p>
|
package/package.json
CHANGED