A second messaging channel (Discord, Slack or Matrix)

Aperta
#207 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
api, backend

Direzione di ricerca

Start by reading crates/channel-telegram/src/tests.rs, pairing.rs, and docs/telegram.md; first coordinate in the issue thread on the service and outbound connection plan, and account for the dependency on #196. Compare the existing adapter’s pairing, approvals, streaming, redaction, and reconnect tests with the chosen service’s API, then implement and test the adapter, CLI setup flow, and user guide. Done means the stated acceptance criteria pass, including Linux and Windows CI.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: daemon enhancement help wanted needs design

size: L · first-timer: no

Please comment before starting so we can agree on the design. Say which service you want to build and how it will connect without an inbound port.

Summary

Add a second messaging channel (Discord, Slack or Matrix; pick one) with the same guarantees as Telegram: pairing, streamed answers, inline approvals, secret redaction and no inbound port.

Why it matters

Telegram is the only channel today. Many people live in Discord, Slack or Matrix, and a channel is how a bot reaches you away from the desktop. Building a second adapter is also the real test that the channel abstraction is right.

Current state

  • crates/channel-telegram is a complete adapter: long polling (bot_api.rs), one-time pairing codes with lockout (pairing.rs), per-user routing and approvals (bridge.rs, inbox.rs), streaming edits, a redactor for everything sent out, and a thorough test suite (tests.rs).
  • The channel abstraction (ChannelCaps, InlineButton, incoming/outgoing messages, the trait) currently lives inside that crate (channel_trait.rs); crates/channel-api is an empty placeholder. The refactor that moves it is tracked in #196; start this issue after it or coordinate with it.
  • apps/cli/src/channels.rs wires Telegram into bot serve with bot channels telegram setup | pair | status | disable.
  • User docs: docs/guide/telegram.md, docs/telegram.md.
  • The permission model has a channel run initiator that is not assigned to Telegram runs yet (docs/guide/telegram.md).

Proposal and suggested approach

  1. Pick a service whose bot API supports outbound-only connections: Discord via its gateway, Slack via Socket Mode, or Matrix via sync. The daemon must never need to be reachable from the internet.
  2. Implement the adapter against the shared trait: send/edit messages, interactive approval controls where the service has buttons (Discord components, Slack Block Kit; for Matrix fall back to reactions or text replies), message length splitting, and rate-limit handling.
  3. Pairing parity: a one-time code, lockout after wrong guesses, fixed refusal text for unpaired users, no information leaked to strangers.
  4. Everything sent passes through the secret redactor. The service token lives in the secret store, never in a file or on a command line.
  5. CLI: bot channels <name> setup | pair | status | disable, and a user-guide page modelled on docs/guide/telegram.md.
  6. Tests against a fake server for the service (no network in CI), mirroring the Telegram test cases: pairing, lockout, approvals, streaming, redaction, reconnect.

Acceptance criteria

  • The adapter implements the shared channel trait and can run alongside Telegram.
  • Pairing, approvals and redaction behave as in Telegram, shown by tests; wrong or unpaired senders get the fixed refusal and never reach a bot.
  • Docs page and CLI reference updated; setup works end to end on a real account (describe how you verified it in the PR).
  • cargo test -p for the new crate and cargo clippy ... -D warnings pass on Linux and Windows CI.

Out of scope

More than one new service per PR, voice or file transfer, group-chat features, changing the permission model.

How to get started

Read crates/channel-telegram/src/tests.rs and pairing.rs, then docs/telegram.md. Create a throwaway bot account on the service you chose and comment here with your connection plan.

Lingua principale
Rust
Stelle
0
Fork
1
Merge medio
6h 54m
PR unite (30g)
152

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di emreocell/Praxi-Bot

Tutte le issue di emreocell/Praxi-Bot

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.