agentscope-ai / agentscope-ai/QwenPaw
[Feature]: Add ntfy channel support (working implementation ready)
- Lenguaje dominante
- TypeScript
- Estrellas
- 35k
- Forks
- 3.1k
- Merge medio
- 1 d 13 h
- PR fusionados (30 d)
- 228
Descripción
## Summary
I'd like to propose adding [ntfy](https://ntfy.sh) as a built-in channel.
ntfy is one of the most popular self-hosted push services (~34k ★) and is a
natural fit for QwenPaw's home-lab / self-hosted user base: agents can push
task results to your phone and receive commands back through the same
infra.
I have already built and verified a working channel plugin:
- Repository: https://github.com/Mcpy/qwenpaw-ntfy-channel
- Install: `qwenpaw plugin install https://github.com/Mcpy/qwenpaw-ntfy-channel`
- Tested end-to-end against a self-hosted ntfy v2.28 server (publish,
JSON-stream subscribe, reconnect, chunking, loop prevention).
## Motivation
- The roadmap lists "More channels" as horizontal expansion seeking
contributors — this fits.
- ntfy's model (plain HTTP publish + long-poll JSON/SSE/WebSocket subscribe,
optional auth tokens and per-topic ACL) maps cleanly onto QwenPaw's
channel abstraction; no heavy SDK, only `httpx`.
- Self-hosters commonly run ntfy alongside services like Home Assistant,
Uptime Kuma, Sonarr — an agent that can both *push status* and *receive
commands* through it closes the loop for the whole homelab.
## Feature highlights (already working)
- **Three runtime modes via config**: bidirectional, outbound-only (cron /
scheduled pushes), inbound-only (`enable_outbound=false`, zero egress).
- **Separated reply routing**: replies are broadcast to configured
`push_topics` only — never back to the source topic. Users can freely
choose "reply where asked" (same topics) or "command/result channel
split" (different topics).
- **Loop prevention via the official `Tags` field**: outbound messages carry
a configurable `bot_tag`; inbound messages with that tag are dropped.
This survives reconnect replays (`since=`) and never misfilters
human-typed messages. Per-agent tags also make multiple agents sharing
one ntfy server safe.
- **UTF-8 byte-safe chunking** with newline-preferred breaks — CJK
(3 bytes/char) and 4-byte emoji survive the 4KB message limit intact.
- **Resumable subscription**: JSON stream with `since=` and
exponential backoff reconnect.
- **Access control**: topic-granularity, reuses QwenPaw's built-in ACL
whitelist/approval flow.
## Plugin → built-in readiness
If maintainers are open to it, I'm happy to contribute this as a built-in
channel and handle:
- package-relative imports + a pydantic config class (modeled after
`MQTTChannelConfig`) + registry registration
- pytest unit tests (chunking, loop prevention, routing, reconnect logic)
- docs under `website/public/docs/`
- Conventional Commits / pre-commit compliance
One side observation from development: after a plugin hot-install, calling
`POST /config/channels/{name}/restart` rebuilds the channel via
`channel_instance.clone()` — so the restarted instance still runs the *old*
code; only an agent-level reload picks up changes from the registry. This
may be related to #4498 and might be worth a look.
Happy to hear feedback on the design (especially the reply-routing model)
before starting the built-in refactor.
Guía de contribución
Línea de trabajo
Start from the existing built-in channel implementations and registry wiring, especially the pattern around `MQTTChannelConfig`, to add ntfy as a registered channel. Review `website/public/docs/` to add/update user-facing docs for the new channel and its modes. Add pytest coverage for chunking, loop prevention, routing, and reconnect logic, then run the relevant test path for channels. Validate behavior through the `/config/channels/{name}/restart` flow mentioned in the report; done when the built-in ntfy path is documented, tested, and behaves as described.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- backend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 67/100