Commit Graph

9 Commits

Author SHA1 Message Date
Levi Neely 267f438e9e clean up OLLIE_* env vars: replace with XDG conventions
- Remove all OLLIE_*_PATH vars (TOOLS_PATH, CFG_PATH, DATA_PATH, etc.)
  Use XDG_CONFIG_HOME/ollie/* and XDG_DATA_HOME/ollie/* instead
- Replace OLLIE_<TAG>_LOG per-component logging with single OLLIE_LOG={level}
- Remove Route()/RouteRequest/RouteResult (replaced by direct backend selection)
- Update sandbox config to use XDG paths instead of OLLIE_*_PATH tokens
- Update docs accordingly
2026-08-07 07:12:08 +02:00
Levi Neely 2ea13cd611 restructure: drop pkg/, split tools/execute into focused packages
- Drop pkg/ prefix (Go anti-pattern): ollie/pkg/X → ollie/X
- Split tools/execute god package:
  - execute/: shell execution, sandboxing, elevation client, remote SSH
  - tools/: interfaces + registry + discovery + schema parsing
  - detach/: background process management (ring buffer, signal)
- Promote internal/sandbox → sandbox/
- Absorb config/ into agent/config.go (agent definition loading)
- Merge remote/ into execute/remote.go (RemoteServer)

All tests pass.
2026-07-29 18:10:25 +02:00
Levi Neely c5b16e739e Restructure: pkg/core interface, internal/ packages, cmd/ollie TUI entry point
- pkg/core: public Core interface (Submit/Prompt/Interrupt) + Event/EventHandler types
- internal/agentcore: AgentCore implementation of Core (session, tools, commands)
- internal/tui: TUI package (readline loop, splitInput, signals, bracketed paste)
- internal/agent,backend,config,exec,mcp,tools: moved from root to internal/
- cmd/ollie: minimal main() that wires agentcore + tui together (~130 lines)
- mkfile: update build target to ./cmd/ollie

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 21:00:04 +02:00
Levi Neely 868ae09364 Add CodeWhisperer/Kiro backend + backend-aware model defaults
- backend/codewhisperer{,_internal}.go: full Amazon CodeWhisperer
  backend implementation — binary AWS event stream decoding, SQLite
  auth for both enterprise OIDC and personal social/GitHub flows, OIDC
  token refresh, and message encoding to the Kiro wire format
- backend/anthropic.go, copilot.go: new backends wired into New()
- backend/new.go: register anthropic, copilot, kiro/codewhisperer cases
- backend/openai.go: add extraHeaders hook for future use
- agent/loop.go: surface non-standard stop reasons as errors instead of
  silently dropping them
- main.go: defaultModelForBackend() sets a sensible default per backend
  (ollama→qwen3.5:9b, openrouter→deepseek/deepseek-v3.2,
   anthropic→claude-sonnet-4-5, kiro→auto); /backend switch now also
  resets the model to avoid stale foreign model IDs causing
  ValidationException; add -prompt flag for non-interactive batch mode

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 20:02:23 +02:00
Levi Neely 2286ebded5 Remove openrouter backend alias
openrouter is OpenAI-compatible; just set OLLIE_OPENAI_URL to the
OpenRouter endpoint. No separate backend case needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 00:57:18 +02:00
Levi Neely b529c23d75 Rename OLLIE_API_KEY to OLLIE_OPENAI_KEY
Consistent with OLLIE_OPENAI_URL; makes it clear the key only applies
to openai/openrouter backends.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 23:51:01 +02:00
Levi Neely ebb726e384 Split OLLIE_API_URL into backend-specific vars
OLLIE_API_URL was shared across backends, causing the ollama backend
to use the OpenRouter URL when OLLIE_BACKEND was overridden on the
command line while the env file still set OLLIE_API_URL.

Replace with OLLIE_OLLAMA_URL and OLLIE_OPENAI_URL so each backend
only reads its own URL setting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 23:50:05 +02:00
Levi Neely 463457cd14 Load ~/.config/ollie/env before reading backend env vars
Env file is optional; existing environment variables take precedence.
Supports KEY=VALUE format with # comments and blank lines ignored.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 23:32:36 +02:00
Levi Neely 127f428620 Add backend package: common LLM interface for ollama and OpenAI-compatible APIs
Defines a Backend interface with shared Message/Tool/ToolCall types.
OllamaBackend wraps /api/chat; OpenAIBackend covers OpenAI, OpenRouter,
and any compatible API. Factory reads OLLIE_BACKEND, OLLIE_API_URL,
OLLIE_API_KEY.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 22:40:42 +02:00