The controlplane harness now uses Aider as the multi-agent orchestrator instead of Codex. Aider launches via --message for non-interactive task execution, with the same tmux glass-pane and log streaming as before. Runtime changes: - src/config.ts: ControlplaneRunner 'codex' -> 'aider', env vars renamed - src/controlplane-codex-runner.ts -> controlplane-aider-runner.ts: CodexRunOptions -> AiderRunOptions, runCodexTask -> runAiderTask, adjusted CLI args for Aider (--message, --model) - src/controlplane-heartbeat.ts: updated imports and branch logic - setup/agent-cli-check.ts: pi and aider first, others optional - setup/install.ts: added printAiderTip() - scripts/glass.sh: right pane now launches aider instead of shell Config: - .env.example: CONTROLPLANE_CODEX_* -> CONTROLPLANE_AIDER_* Docs: - AGENTS.md: updated agent identity and CLI prerequisite - README.md: Aider+Pi as primary driver - doc/CONTROLPLANE-MESSAGE-CONTRACT.md: runner modes updated Codex, Claude Code, and other CLIs remain installed and available as optional tools. Only the harness default changed. --- Build: pass | Tests: not run (Linux)
54 lines
2.4 KiB
Bash
Executable file
54 lines
2.4 KiB
Bash
Executable file
#!/bin/sh
|
|
# scripts/glass.sh — Launch the Clawdie glass-pane tmux session.
|
|
#
|
|
# Layout:
|
|
# ┌──────────────────────┬──────────────┐
|
|
# │ gateway / pi │ aider │
|
|
# ├──────────────────────┴──────────────┤
|
|
# │ btop │
|
|
# └─────────────────────────────────────┘
|
|
#
|
|
# Usage:
|
|
# scripts/glass.sh # create or attach
|
|
# scripts/glass.sh kill # destroy session
|
|
|
|
PROJECT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
if [ -z "${AGENT_NAME:-}" ] && [ -f "$PROJECT_DIR/.env" ]; then
|
|
AGENT_NAME="$(grep '^AGENT_NAME=' "$PROJECT_DIR/.env" | cut -d= -f2 | tr -d '"'\'')')"
|
|
fi
|
|
SESSION="${AGENT_NAME:-clawdie}"
|
|
PI_BIN="${PI_TUI_BIN:-/home/clawdie/.npm-global/bin/pi}"
|
|
AIDER_BIN="${AIDER_BIN:-aider}"
|
|
|
|
if [ "${1:-}" = "kill" ]; then
|
|
tmux kill-session -t "$SESSION" 2>/dev/null && echo "Session '$SESSION' killed." || echo "No session to kill."
|
|
exit 0
|
|
fi
|
|
|
|
if tmux has-session -t "$SESSION" 2>/dev/null; then
|
|
exec tmux attach-session -t "$SESSION"
|
|
fi
|
|
|
|
# ── Create session ─────────────────────────────────────────────────────────────
|
|
|
|
tmux new-session -d -s "$SESSION" -n glass -x 220 -y 50
|
|
|
|
# ── Window 0: glass — gateway/pi (left) | aider (right) ────────────────────────
|
|
tmux split-window -t "$SESSION:glass.0" -h -p 35
|
|
|
|
tmux select-pane -t "$SESSION:glass.0" -T "gateway / pi"
|
|
tmux send-keys -t "$SESSION:glass.0" "cd '$PROJECT_DIR' && '$PI_BIN'" Enter
|
|
|
|
tmux select-pane -t "$SESSION:glass.1" -T "aider"
|
|
tmux send-keys -t "$SESSION:glass.1" "cd '$PROJECT_DIR' && '$AIDER_BIN'" Enter
|
|
|
|
# ── Window 1: btop — full terminal height ─────────────────────────────────────
|
|
tmux new-window -t "$SESSION" -n btop
|
|
tmux select-pane -t "$SESSION:btop.0" -T "btop"
|
|
tmux send-keys -t "$SESSION:btop.0" "btop" Enter
|
|
|
|
# Focus window 0, gateway/pi pane on attach
|
|
tmux select-window -t "$SESSION:glass"
|
|
tmux select-pane -t "$SESSION:glass.0"
|
|
|
|
exec tmux attach-session -t "$SESSION"
|