nonotify-opencode
v0.2.0
Published
OpenCode plugin for nonotify alerts
Maintainers
Readme
nonotify-opencode
OpenCode plugin that sends notifications and interactive Telegram questions through nnt when:
- a permission request is pending for more than 1 minute
- a question request (agent needs your input) is pending for more than 1 minute
After the delay, the plugin tries to answer directly from Telegram:
- permission requests get buttons for
allow once,allow always, anddeny - single-choice OpenCode questions are answered with one Telegram button tap
- multi-select OpenCode questions are asked step by step until you press
Завершить выбор
If the same request is already answered in the OpenCode UI, the later Telegram answer is ignored.
Installation (from npm)
- Configure
nntat least once (if you have not done it yet):
npm i -g nonotify
nnt profile add- Add the plugin package to your OpenCode config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["nonotify-opencode"]
}- Restart OpenCode.
OpenCode installs npm plugins and their dependencies automatically at startup.
Optional configuration
- Use plugin config in
opencode.jsonto pick a profile:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["nonotify-opencode"],
"nonotify-opencode": {
"profile": "important",
"approvalDelaySeconds": 60,
"questionDelaySeconds": 60
}
}profiledefaults to yournntdefault profile.NNT_PROFILE: fallback source whenprofileis not set in config.- Timing values are in seconds.
approvalDelaySeconds: wait before notifying about pending permission request (default60).questionDelaySeconds: wait before notifying about pending question request (default60).
Notes
- The plugin uses
Notifier.ask()fromnonotify, so install a version that includesnnt asksupport. - If interactive asking is unavailable or fails, the plugin falls back to a regular notification message.
