Skip to content

Commit 54b0308

Browse files
author
Slyrian
committed
docs: document event filtering and rich message features
- Add event filtering configuration section with table of all 5 event types - Document rich message content with priority chain explanation - Update example configuration to include events block - Add message format examples showing assistant text extraction - Update usage section to reflect rich notification content
1 parent 4b6c628 commit 54b0308

1 file changed

Lines changed: 46 additions & 1 deletion

File tree

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ In long-running development tasks or deep research sessions, it's common to swit
2525
-**Fault Tolerance**: Isolated service calls ensure that a failure in one provider doesn't block others.
2626
-**Zero Runtime Dependencies**: Built entirely on standard Node.js APIs and native `fetch()`.
2727
-**Privacy & Control**: Completely opt-in; no notifications are sent until you enable and configure a service.
28+
-**Event Filtering**: Selectively enable or disable notifications for specific event types.
29+
-**Rich Content**: Notifications include the actual assistant response text for better context.
2830

2931
## Installation
3032

@@ -104,15 +106,58 @@ Create your `.everynotify.json` with the tokens for the services you want to use
104106
"discord": {
105107
"enabled": false,
106108
"webhookUrl": "https://discord.com/api/webhooks/0000/XXXX"
109+
},
110+
"events": {
111+
"complete": true,
112+
"subagent_complete": true,
113+
"error": true,
114+
"permission": false,
115+
"question": true
107116
}
108117
}
109118
```
110119

120+
## Configuration Options
121+
122+
### Event Filtering
123+
124+
You can control which events trigger notifications by adding an `events` block to your `.everynotify.json`. All events are enabled (`true`) by default to ensure backward compatibility.
125+
126+
| Event | Description |
127+
| ------------------- | -------------------------------------------------------------------------- |
128+
| `complete` | The main opencode session has finished its task and is now idle. |
129+
| `subagent_complete` | A subagent has completed its specific assigned task. |
130+
| `error` | A fatal error or crash occurred during the session. |
131+
| `permission` | opencode is waiting for you to grant permission for a tool or file access. |
132+
| `question` | The `question` tool was used to ask you for clarification. |
133+
134+
### Rich Message Content
135+
136+
EveryNotify provides rich context in its notifications by extracting the assistant's last response. Instead of generic "Task completed" messages, you receive the actual summary or answer provided by opencode.
137+
138+
**Notification Priority:**
139+
140+
1. **Errors**: The specific error message always takes top priority.
141+
2. **Assistant Text**: The actual text from the assistant's final response.
142+
3. **Fallback**: If no text is found, it defaults to a generic "Task completed" message.
143+
144+
**Message Format Example:**
145+
146+
```text
147+
[complete] my-project
148+
I've successfully implemented the authentication system with JWT tokens and refresh token rotation. The API endpoints are secured and tests are passing. (elapsed: 2m 18s)
149+
```
150+
111151
## Usage
112152

113153
EveryNotify is a "fire-and-forget" plugin. Once you have [registered it with opencode](#using-with-opencode) and [configured](#configuration) at least one service with `"enabled": true`, it runs automatically. opencode loads the plugin at startup; EveryNotify then listens for events and sends notifications in the background with no further action needed.
114154

115-
When an event is triggered, EveryNotify builds a descriptive message (e.g., `[complete] my-project (elapsed: 12m 30s)`) and dispatches it to all services marked as `"enabled": true`.
155+
When an event is triggered, EveryNotify builds a rich message containing the event type, project name, the actual assistant response, and the total elapsed time.
156+
157+
Example:
158+
`[complete] my-project: I've finished the refactor. (elapsed: 12m 30s)`
159+
160+
Notifications are dispatched to all services marked as `"enabled": true`.
116161

117162
## Supported Services
118163

0 commit comments

Comments
 (0)