Add `--experimental` / `--beta` flag to enable an agent loop that allows LLMs to use tools (bash, web_search) with interactive user approval. Features: - Built-in tools: bash command execution, web search via Ollama API - Interactive approval UI with arrow key navigation - Auto-allowlist for safe commands (pwd, git status, npm run, etc.) - Denylist for dangerous patterns (rm -rf, sudo, credential access) - Prefix-based allowlist for approved directories (cat src/ approves cat src/*) - Warning box for commands targeting paths outside project directory Architecture: - x/tools/: Tool registry, bash executor, web search client - x/agent/: Approval manager with TUI selector - x/cmd/: Agent loop orchestration The readline change fixes a stdin race condition where background goroutine consumption caused double-keypress issues in the approval UI. |
||
|---|---|---|
| .. | ||
| buffer.go | ||
| errors.go | ||
| history.go | ||
| readline.go | ||
| readline_unix.go | ||
| readline_windows.go | ||
| term.go | ||
| term_bsd.go | ||
| term_linux.go | ||
| term_windows.go | ||
| types.go | ||