feat(setup): optional Telegram wiring in setup:auto

After cli-agent, prompt the user to connect a messaging app. For now
only Telegram is offered; "skip" falls through to the existing CLI
flow.

setup/add-telegram.sh runs the scriptable half of /add-telegram: fetch
the channels branch, copy the adapter + pair-telegram files, append
the self-registration import, install @chat-adapter/telegram@4.26.0
(pinned to match the skill), rebuild, collect TELEGRAM_BOT_TOKEN via
silent paste, write .env + data/env/env, and kick the service so the
new adapter is live. Idempotent throughout.

setup:auto then runs the existing `pair-telegram` step with
--intent main. The step emits the 4-digit code in its status stream,
which is already forwarded to stdout by runStep.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gavrielc
2026-04-22 00:04:14 +03:00
parent c87cd250b2
commit 9c7e1d02af
3 changed files with 178 additions and 3 deletions

View File

@@ -4,7 +4,7 @@
#
# Runs `bash setup.sh` (bootstrap: Node check, pnpm install, native module
# verify), then `pnpm run setup:auto` (environment → container → onecli →
# auth → mounts → service → cli-agent → verify).
# auth → mounts → service → cli-agent → channel → verify).
#
# Everything that can be scripted runs unattended; the one interactive pause
# is the auth step (browser sign-in or paste token/API key).