init: telegram bot bridging messages to claude sessions
Async Rust bot (teloxide + tokio) that: - Authenticates users per chat with a passphrase (resets daily at 5am) - Generates deterministic UUID v5 session IDs from chat_id + date - Pipes messages to `claude -p --session-id/--resume <uuid>` - Persists auth and session state to disk across restarts - Deploys as systemd --user service via `make deploy`
This commit is contained in:
16
Makefile
Normal file
16
Makefile
Normal file
@@ -0,0 +1,16 @@
|
||||
REPO := $(shell pwd)
|
||||
|
||||
.PHONY: build deploy
|
||||
|
||||
build:
|
||||
cargo build --release
|
||||
|
||||
noc.service: noc.service.in
|
||||
sed -e 's|@REPO@|$(REPO)|g' -e 's|@PATH@|$(PATH)|g' $< > $@
|
||||
|
||||
deploy: build noc.service
|
||||
mkdir -p ~/.config/systemd/user
|
||||
cp noc.service ~/.config/systemd/user/
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now noc
|
||||
systemctl --user restart noc
|
||||
Reference in New Issue
Block a user