@mohak34/opencode-notifier 0.1.29-beta.0 → 0.1.29
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 +19 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ You'll get notified when:
|
|
|
22
22
|
- An error happens
|
|
23
23
|
- The question tool pops up
|
|
24
24
|
|
|
25
|
-
There's also `subagent_complete` for when subagents finish,
|
|
25
|
+
There's also `subagent_complete` for when subagents finish, and `user_cancelled` for when you press ESC to abort -- both are silent by default so you don't get spammed.
|
|
26
26
|
|
|
27
27
|
## Setup by platform
|
|
28
28
|
|
|
@@ -69,28 +69,32 @@ Create `~/.config/opencode/opencode-notifier.json` with the defaults:
|
|
|
69
69
|
"complete": { "sound": true, "notification": true },
|
|
70
70
|
"subagent_complete": { "sound": false, "notification": false },
|
|
71
71
|
"error": { "sound": true, "notification": true },
|
|
72
|
-
"question": { "sound": true, "notification": true }
|
|
72
|
+
"question": { "sound": true, "notification": true },
|
|
73
|
+
"user_cancelled": { "sound": false, "notification": false }
|
|
73
74
|
},
|
|
74
75
|
"messages": {
|
|
75
76
|
"permission": "Session needs permission: {sessionTitle}",
|
|
76
77
|
"complete": "Session has finished: {sessionTitle}",
|
|
77
78
|
"subagent_complete": "Subagent task completed: {sessionTitle}",
|
|
78
79
|
"error": "Session encountered an error: {sessionTitle}",
|
|
79
|
-
"question": "Session has a question: {sessionTitle}"
|
|
80
|
+
"question": "Session has a question: {sessionTitle}",
|
|
81
|
+
"user_cancelled": "Session was cancelled by user: {sessionTitle}"
|
|
80
82
|
},
|
|
81
83
|
"sounds": {
|
|
82
84
|
"permission": null,
|
|
83
85
|
"complete": null,
|
|
84
86
|
"subagent_complete": null,
|
|
85
87
|
"error": null,
|
|
86
|
-
"question": null
|
|
88
|
+
"question": null,
|
|
89
|
+
"user_cancelled": null
|
|
87
90
|
},
|
|
88
91
|
"volumes": {
|
|
89
92
|
"permission": 1,
|
|
90
93
|
"complete": 1,
|
|
91
94
|
"subagent_complete": 1,
|
|
92
95
|
"error": 1,
|
|
93
|
-
"question": 1
|
|
96
|
+
"question": 1,
|
|
97
|
+
"user_cancelled": 1
|
|
94
98
|
}
|
|
95
99
|
}
|
|
96
100
|
```
|
|
@@ -131,11 +135,14 @@ Control each event separately:
|
|
|
131
135
|
"complete": { "sound": true, "notification": true },
|
|
132
136
|
"subagent_complete": { "sound": false, "notification": false },
|
|
133
137
|
"error": { "sound": true, "notification": true },
|
|
134
|
-
"question": { "sound": true, "notification": true }
|
|
138
|
+
"question": { "sound": true, "notification": true },
|
|
139
|
+
"user_cancelled": { "sound": false, "notification": false }
|
|
135
140
|
}
|
|
136
141
|
}
|
|
137
142
|
```
|
|
138
143
|
|
|
144
|
+
`user_cancelled` fires when you press ESC to abort a session. It's silent by default so intentional cancellations don't trigger error alerts. Set `sound` or `notification` to `true` if you want confirmation when cancelling.
|
|
145
|
+
|
|
139
146
|
Or use true/false for both:
|
|
140
147
|
|
|
141
148
|
```json
|
|
@@ -157,7 +164,8 @@ Customize the notification text:
|
|
|
157
164
|
"complete": "Session has finished: {sessionTitle}",
|
|
158
165
|
"subagent_complete": "Subagent task completed: {sessionTitle}",
|
|
159
166
|
"error": "Session encountered an error: {sessionTitle}",
|
|
160
|
-
"question": "Session has a question: {sessionTitle}"
|
|
167
|
+
"question": "Session has a question: {sessionTitle}",
|
|
168
|
+
"user_cancelled": "Session was cancelled by user: {sessionTitle}"
|
|
161
169
|
}
|
|
162
170
|
}
|
|
163
171
|
```
|
|
@@ -182,7 +190,8 @@ Use your own sound files:
|
|
|
182
190
|
"complete": "/path/to/done.wav",
|
|
183
191
|
"subagent_complete": "/path/to/subagent-done.wav",
|
|
184
192
|
"error": "/path/to/error.wav",
|
|
185
|
-
"question": "/path/to/question.wav"
|
|
193
|
+
"question": "/path/to/question.wav",
|
|
194
|
+
"user_cancelled": "/path/to/cancelled.wav"
|
|
186
195
|
}
|
|
187
196
|
}
|
|
188
197
|
```
|
|
@@ -203,7 +212,8 @@ Set per-event volume from `0` to `1`:
|
|
|
203
212
|
"complete": 0.3,
|
|
204
213
|
"subagent_complete": 0.15,
|
|
205
214
|
"error": 1,
|
|
206
|
-
"question": 0.7
|
|
215
|
+
"question": 0.7,
|
|
216
|
+
"user_cancelled": 0.5
|
|
207
217
|
}
|
|
208
218
|
}
|
|
209
219
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mohak34/opencode-notifier",
|
|
3
|
-
"version": "0.1.29
|
|
3
|
+
"version": "0.1.29",
|
|
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",
|