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.
Files changed (2) hide show
  1. package/README.md +44 -115
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,42 +1,30 @@
1
- # ๐ŸงŸ OpenCode Zombie Monitor
1
+ # ๐ŸงŸ opencode-zombie-monitor
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/opencode-zombie-monitor)](https://www.npmjs.com/package/opencode-zombie-monitor)
4
- [![GitHub](https://img.shields.io/github/license/Matroskin86/opencode-zombie-monitor)](https://github.com/Matroskin86/opencode-zombie-monitor/blob/main/LICENSE)
5
- [![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux-blue)]()
6
- [![OpenCode](https://img.shields.io/badge/opencode-plugin-purple)]()
4
+ [![opencode plugin](https://img.shields.io/badge/opencode-plugin-purple)](https://opencode.ai)
5
+ [![license](https://img.shields.io/github/license/Matroskin86/opencode-zombie-monitor)](./LICENSE)
7
6
 
8
7
  > *"The only good zombie is a dead zombie"* ๐Ÿ’€
9
8
 
10
- Automatically hunts down and eliminates orphaned OpenCode processes that lurk in your system, devouring precious RAM.
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. Consuming ~100MB of your RAM. And every time you close a tab without pressing `q`... another zombie rises.
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 ?? 100MB
22
- opencode ?? 100MB
23
- opencode ?? 100MB
24
- opencode ?? 100MB
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
- ## ๐Ÿ”ซ The Solution
25
+ Those `??` = no TTY attached = zombie ๐ŸงŸ
29
26
 
30
- This plugin is your zombie apocalypse survival kit:
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
- ## ๐ŸŽฎ Usage
37
+ ## ๐Ÿ”ซ How it works
50
38
 
51
- ### Automatic Mode (default)
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 300MB RAM | Headshot! ๐Ÿ’ฅ
42
+ ๐ŸงŸ Killed 3 zombie processes | Freed 397MB RAM | Headshot! ๐Ÿ’ฅ
58
43
  ```
59
44
 
60
- ### Commands
45
+ No tokens wasted - notification goes via `ignored` message.
46
+
47
+ ## ๐ŸŽฎ Commands
61
48
 
62
- | Command | Description |
63
- |---------|-------------|
64
- | `/zombies` | Check zombie status |
65
- | `/kill-zombies` | Manually kill all 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
- or
58
+
75
59
  ```
76
- ๐ŸงŸ 5 zombies of 7 processes | 500MB RAM | /kill-zombies
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
- Configure in your `opencode.json`:
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 | Description |
103
- |--------|---------|-------------|
104
- | `autoKill` | `true` | Auto-kill zombies on every message |
105
- | `threshold` | `1` | Minimum zombies to trigger action |
79
+ | Option | Default | What |
80
+ |--------|---------|------|
81
+ | `autoKill` | `true` | auto-kill or just notify |
82
+ | `threshold` | `1` | min zombies to trigger |
106
83
 
107
- ### Modes
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
- **PATIENT MODE** โ€” Wait until horde forms:
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
- ## ๐Ÿ–ฅ๏ธ Supported Platforms
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
- ## ๐Ÿค Contributing
96
+ | Platform | Status |
97
+ |----------|--------|
98
+ | macOS | โœ… hunting |
99
+ | Linux | โœ… hunting |
100
+ | Windows | โŒ zombies win |
170
101
 
171
- Found a bug? Zombies escaped? Open an issue!
102
+ ## ๐ŸŒ Languages
172
103
 
173
- Want to add Windows support? PRs welcome! (Good luck with that ๐Ÿ˜…)
104
+ Auto-detects from `LANG`: EN, RU, ZH.
174
105
 
175
106
  ## ๐Ÿ“œ License
176
107
 
177
- MIT โ€” Use it, fork it, kill zombies with it.
108
+ MIT - use it, fork it, kill zombies with it.
178
109
 
179
110
  ---
180
111
 
181
112
  <p align="center">
182
- <i>Made with ๐Ÿง  (before zombies ate it)</i>
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-zombie-monitor",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Auto-kill zombie opencode processes. Supports macOS and Linux with auto language detection (EN/RU).",
5
5
  "main": "index.mjs",
6
6
  "type": "module",