Commit Graph

171 Commits

Author SHA1 Message Date
William Valentin 4f87643341 feat(agent): add iterative tool use loop with max iterations
Rewrites NativeAgent.process() from single-turn to an iterative tool
loop. When toolRegistry and toolExecutor are provided, the agent calls
the model, executes any requested tool calls, feeds results back, and
loops until the model returns a text response or max iterations hit.

- Backward compatible: works exactly as before without tools
- Supports onToolUse callback for frontend status display
- Max iterations (default 10) prevents infinite loops
- Handles multiple tool calls per model response
- 5 new tests (8 total)
2026-02-05 17:48:38 -08:00
William Valentin 96ade25e98 feat(models): add tool use support to OpenAIClient 2026-02-05 17:44:04 -08:00
William Valentin 36c1cfc768 feat(models): add tool use support to AnthropicClient 2026-02-05 17:44:00 -08:00
William Valentin c96165fb2f feat(tools): add barrel exports and allBuiltinTools list 2026-02-05 17:40:13 -08:00
William Valentin b00706325b feat: add tool framework foundation (types, registry, executor, shell tool, model types, SOUL.md)
- Task 0: SOUL.md + loadSystemPrompt() in daemon
- Task 1: Tool type definitions (Tool, ToolCall, ToolResult, etc.)
- Task 2: ToolRegistry with Anthropic/OpenAI serialization
- Task 3: ToolExecutor with hooks, timeout, truncation
- Task 4: shell.exec builtin tool
- Task 8: Model types updated for tool use (ToolDefinition, ModelToolCall, etc.)
- Task 15: Model index exports for tool types
2026-02-05 17:39:40 -08:00
William Valentin 32dd3ad728 feat(tools): add file read/write/edit/list builtin tools 2026-02-05 17:39:20 -08:00
William Valentin b913941e4f docs: add README and AGENTS.md documentation 2026-02-05 15:51:50 -08:00
William Valentin d2a597d49d fix: add model parameter to LlamaCppClient requests 2026-02-05 15:51:33 -08:00
William Valentin 2fc07b4bca feat: add timestamps to session messages 2026-02-05 15:51:32 -08:00
William Valentin 5558687ab9 feat: wire up num_gpu config and updated clients to daemon and TUI 2026-02-05 15:51:30 -08:00
William Valentin c1f64d6ded feat: enhance TUI with colors, command hints, and improved rendering 2026-02-05 15:51:29 -08:00
William Valentin dbf1acd822 feat: add streaming support and num_gpu option to Ollama client 2026-02-05 15:51:28 -08:00
William Valentin a2e1f73493 feat: wire up localProviders config to TUI
Add LlamaCppClient to imports and handle llamacpp provider in createModelRouter.
Pass localProviders and currentLocalProvider configuration to MinimalTui to enable
the /backend command to access alternate provider configs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:37:26 -08:00
William Valentin f722cf2bf0 feat: add /backend command handler to MinimalTui 2026-02-05 13:36:36 -08:00
William Valentin 465b4a0c3c feat: add /backend command parsing
Add support for /backend command to show or switch local backend providers. Follows the same pattern as /model command with optional argument support.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:35:10 -08:00
William Valentin dbeaa78e2c feat: add setLocalClient and getLocalProviderName to ModelRouter 2026-02-05 13:34:25 -08:00
William Valentin 0528b895b0 feat: add local_providers to config schema 2026-02-05 13:33:50 -08:00
William Valentin 61d9358449 docs: add backend switch implementation plan 2026-02-05 13:32:35 -08:00
William Valentin a893460397 docs: add backend switch command design 2026-02-05 13:30:14 -08:00
William Valentin d86710577d feat: wire up LlamaCppClient to model router
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:20:20 -08:00
William Valentin 8e7fa24fd6 feat: add clear error message when llama-server not running 2026-02-05 13:17:56 -08:00
William Valentin e8079347c7 feat: add streaming support to LlamaCppClient
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:15:18 -08:00
William Valentin a20156f8db feat: add LlamaCppClient with basic chat support
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:11:56 -08:00
William Valentin 3cf28df111 docs: add llama.cpp implementation plan 2026-02-05 13:09:23 -08:00
William Valentin 785bbe4acd chore: add .worktrees to gitignore 2026-02-05 13:07:09 -08:00
William Valentin 6f5dd741a9 docs: add llama.cpp integration design
Design for adding LlamaCppClient to support local LLM inference
via llama-server with CUDA. Target model: Qwen 2.5 14B Q4_K_M.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:05:58 -08:00
William Valentin f891c7aee8 fix: add API key/auth token support across all model clients 2026-02-05 10:56:40 -08:00
William Valentin 747a7f44a2 feat(tui): add streaming, scroll, and model switching to fullscreen App 2026-02-05 10:56:27 -08:00
William Valentin 0490d2fe39 feat(tui): add markdown rendering and scroll support to MessageList 2026-02-05 10:56:23 -08:00
William Valentin 7391b50d6d feat(tui): enhance StatusBar with token usage and streaming indicator 2026-02-05 10:56:19 -08:00
William Valentin 83a750f484 feat(tui): update fullscreen config for model router 2026-02-05 10:56:16 -08:00
William Valentin d1d6054deb feat(tui): pass modelRouter to both TUI modes 2026-02-05 10:56:11 -08:00
William Valentin f115407af3 feat(tui): add streaming and model switching to minimal mode 2026-02-05 10:53:41 -08:00
William Valentin 435146344e feat(tui): add unified command parser with model switching 2026-02-05 10:52:49 -08:00
William Valentin da2bb57488 feat(tui): add markdown rendering utility 2026-02-05 10:52:00 -08:00
William Valentin 0950296cf0 chore: add markdown rendering dependencies 2026-02-05 10:50:55 -08:00
William Valentin 9a48c39b07 feat(models): add streaming and tier switching to ModelRouter 2026-02-05 10:48:41 -08:00
William Valentin 896a0da10e feat(models): add streaming support to AnthropicClient 2026-02-05 10:47:42 -08:00
William Valentin 1f0cf28d1f feat(models): add streaming types for chat responses 2026-02-05 10:46:53 -08:00
William Valentin 228e7d86bd docs: add TUI redesign implementation plan with 14 tasks 2026-02-05 10:44:49 -08:00
William Valentin 42d1175b02 docs: add TUI redesign plan
- Streaming responses (chunk-based)
- Rich markdown rendering with syntax highlighting
- Model switching via /model command
- Scrollable message history
- Enhanced status bar with token usage
- Inline error handling with auto-retry
- Feature parity between minimal and fullscreen modes
2026-02-05 10:41:20 -08:00
William Valentin fb7575f850 refactor: integrate SessionManager into daemon and agent
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:43:09 -08:00
William Valentin f671ea5ab5 feat: add fullscreen TUI mode with Ink React components 2026-02-05 00:41:17 -08:00
William Valentin 53a8bd97eb feat: add Ink-based fullscreen TUI components 2026-02-05 00:39:53 -08:00
William Valentin c0deeb5cf0 feat: add TUI entry point with minimal readline mode 2026-02-05 00:37:40 -08:00
William Valentin f792f8407a feat: add minimal TUI with readline interface 2026-02-05 00:36:16 -08:00
William Valentin 2f1c302d85 feat: add SessionManager for multi-frontend session handling 2026-02-05 00:34:25 -08:00
William Valentin 55c2e6bf74 chore: add dependencies for TUI (ink, react)
Adds:
- ink ^6.0.0 (React for CLI)
- ink-text-input ^6.0.0 (text input component)
- react ^19.0.0
- @types/react ^19.0.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:33:04 -08:00
William Valentin 934be021ab docs: add Phase 3 TUI implementation plan
Covers:
- SessionManager for multi-frontend support
- Minimal readline TUI
- Fullscreen Ink-based TUI
- Mode switching and session transfer

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:31:28 -08:00
William Valentin 81e9597777 chore: add Ollama local model to default config
Adds llama3.2:1b as local fallback provider for when primary
Anthropic API is unavailable.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:12:49 -08:00