summaryrefslogtreecommitdiff
path: root/start_dispatcher.sh
blob: 1815581195ebb19fb93521e99742748987a45a86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
# 启动调度 Claude Code(交互式长期运行)
# Broker 收到 Telegram 消息后会通过 tmux send-keys 直接推送到这里
set -euo pipefail
cd "$(dirname "$0")"

if [ ! -f .env ]; then
    echo "ERROR: .env 文件不存在"
    exit 1
fi

set -a; source .env; set +a

echo "[Dispatcher] Starting interactive Claude session..."
echo "[Dispatcher] Messages from Telegram will be pushed here automatically."
exec claude --allowedTools "mcp__dispatcher__*"