Drop ollie/mcp, ollie/tools, ollie/ollama packages. Config now only
carries hooks. main.go wires a single execute_code tool directly to
the agent loop — no MCP discovery or dispatch needed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main.go now uses backend.New() for LLM selection (OLLIE_BACKEND env),
agent.Loop for observe/decide/act/update/terminate, and ollie/exec for
built-in execute_code. Multi-turn sessions persist across user inputs.
MCP tools route through mcpExecutor; unknown tools fall back to built-in.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements the core agent loop with two state backends:
- Session: ephemeral in-memory, lives for one process lifetime
- BeadState: bead-backed via 9beads tool scripts (claim/read/complete)
Loop is backend-agnostic; takes a ToolExecutor and emits OutputMsgs.
MaxSteps defaults to 1 for simple prompts; callers set higher for tasks.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extracts execute_code into a shared ollie/exec package so anvillm-mcp
and ollie's agent loop can both use it. Includes sandboxed execution,
dangerous-pattern validation with per-Executor rate limiting, 9P tool
reading, and pipeline construction.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>