@mohak34/opencode-notifier 0.1.8 → 0.1.9
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 +130 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,18 +12,67 @@ Add the plugin to your `opencode.json` or `opencode.jsonc`:
|
|
|
12
12
|
}
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
Using `@latest` ensures you always get the newest version when the cache is refreshed.
|
|
16
|
+
|
|
17
|
+
To pin a specific version:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"plugin": ["@mohak34/opencode-notifier@0.1.8"]
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
15
25
|
Restart OpenCode. The plugin will be automatically installed and loaded.
|
|
16
26
|
|
|
17
27
|
## Updating
|
|
18
28
|
|
|
19
|
-
OpenCode caches plugins in `~/.cache/opencode`.
|
|
29
|
+
OpenCode caches plugins in `~/.cache/opencode`. Plugins are not auto-updated; you need to clear the cache to get new versions.
|
|
30
|
+
|
|
31
|
+
### If you use `@latest`
|
|
32
|
+
|
|
33
|
+
Clear the cache and restart OpenCode:
|
|
34
|
+
|
|
35
|
+
**Linux/macOS:**
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
rm -rf ~/.cache/opencode/node_modules/@mohak34/opencode-notifier
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Windows (PowerShell):**
|
|
20
42
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
43
|
+
```powershell
|
|
44
|
+
Remove-Item -Recurse -Force "$env:USERPROFILE\.cache\opencode\node_modules\@mohak34\opencode-notifier"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then restart OpenCode - it will download the latest version automatically.
|
|
48
|
+
|
|
49
|
+
### If you use a pinned version (e.g., `@0.1.7`)
|
|
50
|
+
|
|
51
|
+
1. Update the version in your `opencode.json`:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"plugin": ["@mohak34/opencode-notifier@0.1.8"]
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
2. Clear the cache (see commands above)
|
|
60
|
+
|
|
61
|
+
3. Restart OpenCode
|
|
24
62
|
|
|
25
|
-
|
|
26
|
-
|
|
63
|
+
### Check installed version
|
|
64
|
+
|
|
65
|
+
**Linux/macOS:**
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
cat ~/.cache/opencode/node_modules/@mohak34/opencode-notifier/package.json | grep version
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Windows (PowerShell):**
|
|
72
|
+
|
|
73
|
+
```powershell
|
|
74
|
+
Get-Content "$env:USERPROFILE\.cache\opencode\node_modules\@mohak34\opencode-notifier\package.json" | Select-String "version"
|
|
75
|
+
```
|
|
27
76
|
|
|
28
77
|
## Platform Notes
|
|
29
78
|
|
|
@@ -124,6 +173,81 @@ Use your own sound files:
|
|
|
124
173
|
|
|
125
174
|
If a custom sound file path is provided but the file doesn't exist, the plugin will fall back to the bundled sound.
|
|
126
175
|
|
|
176
|
+
## Troubleshooting
|
|
177
|
+
|
|
178
|
+
### macOS: Notifications not showing (only sound works)
|
|
179
|
+
|
|
180
|
+
**Update to v0.1.8 or later** - this version includes a fix for macOS notification events.
|
|
181
|
+
|
|
182
|
+
If notifications still don't work after updating:
|
|
183
|
+
|
|
184
|
+
1. **Install terminal-notifier via Homebrew:**
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
brew install terminal-notifier
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
2. **Check notification permissions:**
|
|
191
|
+
- Open **System Settings > Notifications**
|
|
192
|
+
- Find your terminal app (e.g., Ghostty, iTerm2, Terminal)
|
|
193
|
+
- Make sure notifications are set to **Banners** or **Alerts**
|
|
194
|
+
- Also enable notifications for **terminal-notifier** if it appears in the list
|
|
195
|
+
|
|
196
|
+
### Linux: Notifications not showing
|
|
197
|
+
|
|
198
|
+
1. **Install notify-send:**
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Debian/Ubuntu
|
|
202
|
+
sudo apt install libnotify-bin
|
|
203
|
+
|
|
204
|
+
# Fedora
|
|
205
|
+
sudo dnf install libnotify
|
|
206
|
+
|
|
207
|
+
# Arch
|
|
208
|
+
sudo pacman -S libnotify
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
2. **Test if it works:**
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
notify-send "Test" "Hello"
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Linux: Sounds not playing
|
|
218
|
+
|
|
219
|
+
Install one of these audio players: `paplay`, `aplay`, `mpv`, or `ffplay`.
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
# Debian/Ubuntu (PulseAudio)
|
|
223
|
+
sudo apt install pulseaudio-utils
|
|
224
|
+
|
|
225
|
+
# Or install mpv
|
|
226
|
+
sudo apt install mpv
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Windows: Notifications not showing
|
|
230
|
+
|
|
231
|
+
1. Open **Settings > System > Notifications**
|
|
232
|
+
2. Make sure notifications are enabled
|
|
233
|
+
3. Check that your terminal app has notification permissions
|
|
234
|
+
|
|
235
|
+
### General: Plugin not loading
|
|
236
|
+
|
|
237
|
+
1. **Check your opencode.json syntax:**
|
|
238
|
+
|
|
239
|
+
```json
|
|
240
|
+
{
|
|
241
|
+
"plugin": ["@mohak34/opencode-notifier@latest"]
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
2. **Clear the cache and restart:**
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
rm -rf ~/.cache/opencode/node_modules/@mohak34/opencode-notifier
|
|
249
|
+
```
|
|
250
|
+
|
|
127
251
|
## License
|
|
128
252
|
|
|
129
253
|
MIT
|
package/dist/index.js
CHANGED
|
@@ -3835,7 +3835,7 @@ if (platform === "Linux" || platform.match(/BSD$/)) {
|
|
|
3835
3835
|
platformNotifier = new NotifySend({ withFallback: false });
|
|
3836
3836
|
} else if (platform === "Darwin") {
|
|
3837
3837
|
const { NotificationCenter } = import_node_notifier.default;
|
|
3838
|
-
platformNotifier = new NotificationCenter({ withFallback:
|
|
3838
|
+
platformNotifier = new NotificationCenter({ withFallback: true });
|
|
3839
3839
|
} else if (platform === "Windows_NT") {
|
|
3840
3840
|
const { WindowsToaster } = import_node_notifier.default;
|
|
3841
3841
|
platformNotifier = new WindowsToaster({ withFallback: false });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mohak34/opencode-notifier",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "OpenCode plugin that sends system notifications and plays sounds when permission is needed, generation completes, or errors occur",
|
|
5
5
|
"author": "mohak34",
|
|
6
6
|
"license": "MIT",
|