nanobot/create-bot-configs.sh
tanyar09 7050e032e8
Some checks failed
CI / Lint with ruff (pull_request) Failing after 47s
CI / Test Python 3.11 (pull_request) Successful in 51s
CI / Test Python 3.12 (pull_request) Successful in 50s
CI / Build package (pull_request) Has been cancelled
Improve MCP tool calling and routing
Add explicit JSON tool-call protocol for local providers, improve parsing of JSON-only tool calls, and add heuristic routing to MCP-capable profiles for repo/PR intents. Also document and mount local-cloned MCP servers and expand MCP env var handling.

Made-with: Cursor
2026-03-31 12:15:05 -04:00

77 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# Create minimal config.json files for each bot
# These only contain channel-specific settings that can't be in env vars
set -e
echo "Creating bot config files..."
# Bot 1 config
cat > ~/.nanobot-user1/config.json << 'EOF'
{
"channels": {
"telegram": {
"enabled": true,
"allowFrom": ["TADec2023"]
},
"email": {
"enabled": true,
"allowFrom": ["adayear2025@gmail.com"]
}
},
"tools": {
"mcpServers": {
"gitea": {
"command": "/app/mcp-servers/gitea-mcp/gitea-mcp",
"args": ["-t", "stdio", "--host", "http://10.0.30.169:3000", "-r"],
"env": {
"GITEA_ACCESS_TOKEN": "$NANOBOT_GITLE_TOKEN"
}
}
}
}
}
EOF
# Bot 2 config (placeholder - update with actual values)
cat > ~/.nanobot-user2/config.json << 'EOF'
{
"channels": {
"telegram": {
"enabled": true,
"allowFrom": []
},
"email": {
"enabled": true,
"allowFrom": []
}
}
}
EOF
# Bot 3 config (placeholder - update with actual values)
cat > ~/.nanobot-user3/config.json << 'EOF'
{
"channels": {
"telegram": {
"enabled": true,
"allowFrom": []
},
"email": {
"enabled": true,
"allowFrom": []
}
}
}
EOF
echo "✓ Created config files:"
echo " - ~/.nanobot-user1/config.json"
echo " - ~/.nanobot-user2/config.json"
echo " - ~/.nanobot-user3/config.json"
echo ""
echo "Note: Telegram tokens come from .env.userX files"
echo " Update allowFrom arrays with actual user IDs/emails"