Files
plugins/packages/notify/package.json
T
Monica Everett cc7f4327e5 notify 0.1.2: a Gotify channel (#593, UnspokenSpell)
notify 0.1.2 adds a Gotify channel (UnspokenSpell): POST <server>/message with X-Gotify-Key, title and message; priority only when the channel sets it (an explicit 0 stays 0), so the application's own default applies otherwise; extras when set. Needs server and token. post() also reads Gotify's errorDescription on failure. Gotify is listed in the package README (with priority's fallback and extras), the root README and the registry summary.

Answers the 11-01 review at f2f5806: priority no longer defaults to 5, the sibling channel lists name Gotify, extras is documented and tested, errorDescription is read.

Run at the reviewed head f84a6a7 on mote:
- bun test packages/notify: 58 pass, 0 fail
- full bun test with HOME=$(mktemp -d): 4551 pass, 9 skip, 0 fail
- Broken by hand, each red then restored: priority back to `?? 5` (1 fail), errorDescription dropped (1 fail)
- A real Gotify server (3.1.1, 127.0.0.1, app with defaultPriority 2) through channels.mjs send(): no priority -> stored with priority 2; priority 0 -> stored 0; wrong token -> {ok:false,status:401,error:"you need to provide a valid access token or user credentials to access this api"}

Not tried: Gotify behind a reverse proxy at this head (tried at f2f5806, unchanged path code).
2026-11-02 03:37:00 +08:00

24 lines
918 B
JSON

{
"name": "@magpie-community/gateway-notify",
"version": "0.1.2",
"description": "A push to your phone or team chat when an agent's turn is done: ntfy, Bark, Gotify, Server酱, Feishu, DingTalk, WeCom, Telegram or a webhook",
"type": "module",
"files": ["notify.hooks.mjs", "turn.mjs", "channels.mjs", "README.md"],
"keywords": ["magpie", "magpie-gateway", "magpie-hooks", "notification", "ntfy", "bark", "gotify", "feishu", "dingtalk", "telegram"],
"license": "MIT",
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/notify" },
"magpie": {
"hooks": "./notify.hooks.mjs",
"options": {
"channels": [{ "type": "ntfy", "topic": "" }],
"minMinutes": 3,
"cooldownSeconds": 30,
"errors": true,
"agents": [],
"includeText": false,
"lang": "en"
}
},
"engines": { "bun": ">=1.4.2" }
}