How wshrepo/oc-notify works
oc-notify is a Windows desktop notification companion for the opencode CLI. The principal flow is opencode events through the plugin’s filtering and enrichment into a named-pipe message; the desktop app accepts it, applies configuration and notification policy, then presents an animated, dismissible bubble. The graph also shows configuration hot reload, category styling, window placement, and idle shutdown. Edges are limited to sampled source or README evidence; unsampled implementation details are not inferred.
Main entry points: App.xaml.cs App Lifecycle · notify-bubble.ts Event Plugin · NotificationManager.cs Notification Manager · MainWindow.xaml.cs Bubble Window
Components 15
opencode Plugin
- Event Plugin
src/plugin/notify-bubble.ts - Five Event Types
src/plugin/notify-bubble.ts - Session Context
src/plugin/notify-bubble.ts
Message Transport
- Pipe Message
src/OcNotify/Models/NotifyMessage.cs - Named Pipe Server
src/OcNotify/Services/PipeServer.cs
Notification Runtime
- App Lifecycle
src/OcNotify/App.xaml.cs - Notification Manager
src/OcNotify/Services/NotificationManager.cs - Notification State
src/OcNotify/Models/NotificationItem.cs - Configuration Service
src/OcNotify/Services/ConfigService.cs - Configuration Model
src/OcNotify/Models/NotifyConfig.cs
Bubble Presentation
- Bubble Window
src/OcNotify/MainWindow.xaml.cs - Notification Card
src/OcNotify/Controls/NotificationCard.xaml.cs - Category Styling
src/OcNotify/Helpers/CategoryInfo.cs - Windows DWM
src/OcNotify/Services/DwmHelper.cs
Other components
- opencode CLI
Connections 21
- opencode CLI → Event Plugin: loads plugin
README.md - Event Plugin → Five Event Types: handles events
README.md - Event Plugin → Session Context: looks up session
src/plugin/notify-bubble.ts - Event Plugin → Named Pipe Server: writes pipe
- Event Plugin → App Lifecycle: launches app
README.md - Named Pipe Server → Pipe Message: parses messages
src/OcNotify/Services/PipeServer.cs - App Lifecycle → Named Pipe Server: starts server
src/OcNotify/App.xaml.cs - Named Pipe Server → App Lifecycle: raises messages
src/OcNotify/App.xaml.cs - App Lifecycle → Notification Manager: forwards messages
src/OcNotify/App.xaml.cs - App Lifecycle → Bubble Window: creates window
src/OcNotify/App.xaml.cs - App Lifecycle → Configuration Service: initializes service
src/OcNotify/App.xaml.cs - App Lifecycle → Configuration Service: reads idle settings
src/OcNotify/App.xaml.cs - Notification Manager → Configuration Service: loads settings
src/OcNotify/Services/NotificationManager.cs - Notification Manager → Category Styling: gets category
src/OcNotify/Services/NotificationManager.cs - Notification Manager → Notification State: creates state
src/OcNotify/Services/NotificationManager.cs - Configuration Service → Configuration Model: loads config
src/OcNotify/Services/ConfigService.cs - Notification Manager → Bubble Window: notifies card changes
src/OcNotify/MainWindow.xaml.cs - Bubble Window → Notification Card: creates and binds
src/OcNotify/MainWindow.xaml.cs - Notification Card → Category Styling: gets category
src/OcNotify/Controls/NotificationCard.xaml.cs - Bubble Window → Configuration Service: refreshes on change
src/OcNotify/MainWindow.xaml.cs - Bubble Window → Windows DWM: sets window attributes
src/OcNotify/MainWindow.xaml.cs