Fam Zheng 4d88e80f1c add streaming responses, file transfer, remote deploy
- Streaming: use claude --output-format stream-json, edit TG message
  every 5s with progress, show tool use status during execution,
  ◎ cursor indicator while processing
- File transfer: download user uploads to ~/incoming/, scan
  ~/outgoing/{sid}/ for new files after claude completes
- Error handling: wrap post-auth logic in handle_inner, all errors
  reply to user instead of silently failing
- Remote deploy: make deploy-hera via SSH, generate service from
  template with dynamic PATH/REPO
- Service: binary installed to ~/bin/noc, WorkingDirectory=%h
- Invoke claude directly instead of ms wrapper
- Session state persisted to disk across restarts
2026-04-05 08:20:32 +01:00

NOC

Telegram bot that bridges messages to claude sessions.

How it works

  1. User sends a message to the bot
  2. First message must be the auth passphrase, otherwise the bot replies "not authenticated"
  3. Once authenticated, messages are piped to ms --resume <session_id> via stdin
  4. claude stdout is sent back as the reply
  5. Sessions are scoped per chat and refresh daily at 5am local time

Setup

cp config.example.yaml config.yaml
# edit config.yaml with your values

Config

Key Description
tg.key Telegram bot token
auth.passphrase Passphrase required to authenticate each session
session.refresh_hour Hour (local time, 24h) when sessions reset

Deploy

make deploy

This builds the release binary and installs a systemd --user service.

Logs

journalctl --user -u noc -f
Description
NOC
Readme 784 KiB
Languages
Rust 99%
Makefile 1%