跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    antctt

    Ntfy Smart

    v0.1.1智能体编排
    opencode-ntfy-smart

    OpenCode plugin that sends ntfy.sh notifications with smart main/subagent filtering

    GitHub 星标

    0

    月装机量

    20

    近 7 天 2

    综合评分SCORE

    22.3

    生态多维模型

    最近提交

    3 个月前

    2026-04-30

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-ntfy-smart@0.1.1"]
    }

    opencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

    opencode-ntfy-smart is a standalone OpenCode plugin that sends ntfy.sh push notifications with smart filtering for main sessions and subagents.

    It keeps the four supported notification events while reducing subagent noise:

    Event Main session Subagent
    session.idle notify suppress
    session.error notify suppress
    permission.asked notify notify
    question.asked notify notify

    Install

    When you use OpenCode as a global app, you do not need to run npm install manually for the plugin. OpenCode can install npm plugins automatically from ~/.config/opencode/opencode.json and cache them under ~/.cache/opencode/.

    Agentic

    Give your agent a prompt like this:

    Update my OpenCode config to use `opencode-ntfy-smart` as a plugin. If `opencode-ntfy.sh` is present, replace it. Keep my other plugins unchanged, and create or update `~/.config/opencode/notification-ntfy-smart.json` with my ntfy.sh topic/server settings.
    

    Manual

    1. Edit ~/.config/opencode/opencode.json and add opencode-ntfy-smart to the plugin array. If you are migrating from opencode-ntfy.sh, replace it.
    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-ntfy-smart"]
    }
    
    1. Create ~/.config/opencode/notification-ntfy-smart.json using the configuration example below.

    Local Development

    npm install
    npm run build
    

    Use the local OpenCode plugin build at /root/code/opencode-ntfy-smart/dist/index.js.

    Example OpenCode plugin configuration:

    {
      "plugin": [
        "/root/code/opencode-ntfy-smart/dist/index.js"
      ]
    }
    

    Configuration

    Create the config file at ~/.config/opencode/notification-ntfy-smart.json.

    {
      "$schema": "https://raw.githubusercontent.com/antctt/opencode-ntfy-smart/main/notification-ntfy-smart.schema.json",
      "enabled": true,
      "events": {
        "session.idle": { "enabled": true },
        "session.error": { "enabled": true },
        "permission.asked": { "enabled": true },
        "question.asked": { "enabled": true }
      },
      "backend": {
        "topic": "opencode-example-topic",
        "server": "https://ntfy.sh",
        "priority": "default",
        "fetchTimeout": "PT10S",
        "title": {
          "session.idle": { "value": "{project}: opencode finished" },
          "session.error": { "value": "{project}: opencode error" },
          "permission.asked": { "value": "{project}: permission needed" },
          "question.asked": { "value": "{project}: response needed" }
        },
        "message": {
          "session.idle": { "value": "The agent finished and is waiting for input." },
          "session.error": { "value": "{error}" },
          "permission.asked": { "value": "Permission requested: {permission_type} {permission_patterns}" },
          "question.asked": { "value": "{question}" }
        }
      }
    }
    

    Publish

    npm pack
    npm publish