feat(config): Add multi-agent support with pluggable registry
Implements agent abstraction layer to support multiple AI coding agents. Built-in presets (E2E tested): - Claude Code (default) - Gemini CLI - OpenAI Codex Key changes: - Add AgentRegistry with built-in presets and custom agent support - Add TownSettings with default_agent and custom agents map - Add Agent field to RigSettings for per-rig agent selection - Update ResolveAgentConfig for hierarchical config resolution - Update spawn paths to use configured agent instead of hardcoded claude Configuration hierarchy (first match wins): 1. Rig's Runtime config (backwards compat) 2. Rig's Agent -> custom agents -> built-in presets 3. Town's default_agent setting 4. Fallback to Claude Additional agents (aider, opencode, etc.) can be added via config file: settings/agents.json Addresses Issue #10: Agent Agnostic Engine with Multi-provider support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -183,10 +183,11 @@ func runCrewAt(cmd *cobra.Command, args []string) error {
|
||||
|
||||
// Check if we're already in the target session
|
||||
if isInTmuxSession(sessionID) {
|
||||
// We're in the session at a shell prompt - just start Claude directly
|
||||
// Pass "gt prime" as initial prompt so Claude loads context immediately
|
||||
fmt.Printf("Starting Claude in current session...\n")
|
||||
return execClaude("gt prime")
|
||||
// We're in the session at a shell prompt - just start the agent directly
|
||||
// Pass "gt prime" as initial prompt so it loads context immediately
|
||||
agentCfg := config.ResolveAgentConfig(townRoot, r.Path)
|
||||
fmt.Printf("Starting %s in current session...\n", agentCfg.Command)
|
||||
return execAgent(agentCfg, "gt prime")
|
||||
}
|
||||
|
||||
// If inside tmux (but different session), don't switch - just inform user
|
||||
|
||||
Reference in New Issue
Block a user