cli/internal/cmd/ai
Claude d92762ecdc
feat(agentci): Clotho orchestrator and security hardening
Adds the Clotho dual-run verification system and hardens the entire
agent dispatch pipeline against command injection, token exposure,
and SSH MitM attacks. Breaks the agentci→handlers circular dependency.

Security:
- SanitizePath (regex whitelist + filepath.Base) for all dispatch inputs
- EscapeShellArg for shell argument safety
- SecureSSHCommand (StrictHostKeyChecking=yes, BatchMode=yes)
- ForgeToken removed from ticket JSON, transferred via .env with 0600
- ssh-keyscan on agent add populates known_hosts before first connection

Clotho:
- Spinner orchestrator determines Standard vs Dual execution mode
- Config-driven via ClothoConfig (strategy, validation_threshold)
- Agent runner supports claude/codex/gemini backends with dual-run
- Divergence detection compares thread outputs via git diff

API:
- LoadActiveAgents() returns map[string]AgentConfig (no handlers import)
- LoadClothoConfig() reads clotho section from config
- Forge helpers: AssignIssue, EnsureLabel, AddIssueLabels

32 tests pass (19 agentci + 13 dispatch).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:08:16 +00:00
..
cmd_agent.go feat(agentci): Clotho orchestrator and security hardening 2026-02-10 03:08:16 +00:00
cmd_ai.go feat(mcp): add workspace root validation to prevent path traversal (#100) 2026-02-01 21:59:34 +00:00
cmd_commands.go feat(agentci): package dispatch system for multi-agent deployment 2026-02-09 10:36:23 +00:00
cmd_git.go feat(mcp): add workspace root validation to prevent path traversal (#100) 2026-02-01 21:59:34 +00:00
cmd_metrics.go feat: wire release command, add tar.xz support, unified installers (#277) 2026-02-04 00:49:57 +00:00
cmd_tasks.go feat: wire release command, add tar.xz support, unified installers (#277) 2026-02-04 00:49:57 +00:00
cmd_updates.go feat: wire release command, add tar.xz support, unified installers (#277) 2026-02-04 00:49:57 +00:00