shannnnnks on X: with several Codex accounts behind magpie's gateway, one
is now and then signed out; they want notify to push it.
magpie v0.1.3443 calls a hooks file's onSignIn once when an account in
use must be signed in again (Codex revoked or refused, Claude, Copilot or
plugin sign-in lapsed, ...), and when a Claude sign-in ends within days.
notify pushes "⚠️ Codex account x signed out / Sign in again in magpie."
(zh with lang "zh") to the same channels. On by default (accounts: true);
one push per account and state per accountCooldownMinutes (60). Webhook
event: {kind: "signed-out"|"ending", provider, account, endsAt?}. ntfy
takes the message's tag, "warning" here. README, registry summary.
Run on mote: bun test packages/notify, 65 pass (7 new: default push, zh,
Claude ending days, accounts false, cooldown, unknown states, webhook
event); bun scripts/check.mjs ok. The new tests can't import onSignIn
from the old notify.hooks.mjs, so they fail there.
Not tried: a real push from a real revoked account.
25 lines
970 B
JSON
25 lines
970 B
JSON
{
|
|
"name": "@magpie-community/gateway-notify",
|
|
"version": "0.1.3",
|
|
"description": "A push to your phone or team chat when an agent's turn is done or an account is signed out: 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",
|
|
"accounts": true
|
|
}
|
|
},
|
|
"engines": { "bun": ">=1.4.2" }
|
|
}
|