All checks were successful
continuous-integration/drone/push Build is passing
- AGENTS.md (bull/bear/hawk/dove): replace sessions_send references with sessions_spawn task-based protocol - SOUL.md (bull/bear): remove memory_search (unavailable in sub-agents) - SOUL.md (hawk/dove): remove REPLY_SKIP (not needed with spawn) - AGENTS.md (invest-analyst): restore daily briefing format and memory rules - deploy.sh: fix nvm loading for SSH non-interactive shell
48 lines
1.8 KiB
Bash
Executable File
48 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
# Deploy Trading Agent skills and configs to remote OpenClaw server
|
|
# Usage: ./openclaw-skills/deploy.sh
|
|
|
|
set -euo pipefail
|
|
|
|
REMOTE="yiukai@192.168.68.108"
|
|
CLAW="\$HOME/.openclaw"
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
echo "=== Trading Agents Deploy ==="
|
|
echo "Remote: $REMOTE"
|
|
echo "Source: $SCRIPT_DIR"
|
|
echo ""
|
|
|
|
# --- Phase 1: Deploy analysis skills to invest-analyst workspace ---
|
|
echo "[1/3] Deploying analysis skills to invest-analyst workspace..."
|
|
for skill in trade-analyze market-analysis fundamental-analysis sentiment-analysis macro-analysis; do
|
|
echo " → $skill"
|
|
ssh "$REMOTE" "mkdir -p $CLAW/workspace-invest-analyst/skills/$skill"
|
|
scp "$SCRIPT_DIR/$skill/SKILL.md" "$REMOTE:$CLAW/workspace-invest-analyst/skills/$skill/SKILL.md"
|
|
done
|
|
echo ""
|
|
|
|
# --- Phase 2: Deploy SOUL.md and AGENTS.md to debate agent workspaces ---
|
|
echo "[2/3] Deploying SOUL.md and AGENTS.md to debate agents..."
|
|
for agent in invest-bull invest-bear invest-hawk invest-dove; do
|
|
echo " → $agent"
|
|
ssh "$REMOTE" "mkdir -p $CLAW/workspace-$agent"
|
|
scp "$SCRIPT_DIR/souls/$agent.md" "$REMOTE:$CLAW/workspace-$agent/SOUL.md"
|
|
scp "$SCRIPT_DIR/agents/$agent.md" "$REMOTE:$CLAW/workspace-$agent/AGENTS.md"
|
|
done
|
|
echo ""
|
|
|
|
# --- Phase 3: Restart gateway ---
|
|
echo "[3/3] Restarting OpenClaw gateway..."
|
|
ssh "$REMOTE" 'export NVM_DIR="$HOME/.nvm"; [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"; openclaw gateway restart'
|
|
echo ""
|
|
|
|
echo "=== Deploy complete ==="
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo " 1. Create 4 Discord bots (invest-bull, invest-bear, invest-hawk, invest-dove)"
|
|
echo " 2. Add bot tokens to openclaw.json on remote server"
|
|
echo " 3. Add agents to openclaw.json (see plan for config template)"
|
|
echo " 4. Run: openclaw agents add invest-bull --workspace ~/.openclaw/workspace-invest-bull"
|
|
echo " 5. Test: /trade-analyze NVDA in Stock Guild Discord"
|