- 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
19 lines
359 B
SYSTEMD
19 lines
359 B
SYSTEMD
[Unit]
|
|
Description=NOC Telegram Bot
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=%h
|
|
ExecStart=%h/bin/noc
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
Environment=RUST_LOG=noc=info
|
|
Environment=NOC_CONFIG=@REPO@/config.yaml
|
|
Environment=NOC_STATE=@REPO@/state.json
|
|
Environment=PATH=@PATH@
|
|
|
|
[Install]
|
|
WantedBy=default.target
|