Commit Graph

23 Commits

Author SHA1 Message Date
a15e428af0 feat: replace REPL loop with Textual TUI launch
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:48:10 -05:00
99a15cbd9b feat: add SneakyCodeApp Textual application
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:47:41 -05:00
202466f73d feat: add StatusBar and StreamingStatic widgets
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:46:52 -05:00
623ed14cbf feat: add Textual CSS stylesheet for TUI layout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:46:52 -05:00
641672e4c7 feat: wire AgentLoop to DisplayAdapter and async permissions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:46:28 -05:00
cab3fbc1cf feat: make PermissionsService async with pluggable prompt callback
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:44:12 -05:00
021fe340c1 feat: convert StreamHandler to callback-based (remove Rich.Live)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:44:11 -05:00
8335978583 feat: add render functions and DisplayAdapter for TUI display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:41:04 -05:00
08da2c542a feat: add TUI-safe logging mode that disables RichHandler
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:41:03 -05:00
ff40ef7803 feat: add textual dependency for TUI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:40:59 -05:00
3e88d1d481 Merge branch 'feature/phase-7-polish-hardening' 2026-03-11 10:21:16 -05:00
76ba490aa2 Add Phase 7: polish and hardening — retry, truncation, sessions, shutdown
- Config extensions: retry backoff, truncation threshold, session persistence
- LLM retry with exponential backoff + jitter on transient errors (5xx, connection)
- Conversation truncation: drops oldest messages preserving first user + recent N
- Session persistence: auto-save/restore with atomic writes, cleanup of old files
- Graceful shutdown: SIGTERM handler, cancel() on AgentLoop, save-on-exit
- Partial message recovery on mid-stream interruption
- New slash commands: /save, /session
- 18 new tests (5 retry, 5 truncation, 4 session, 4 integration workflows)
- README.md and docs/tools.md documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 10:20:16 -05:00
82846d6236 Add .worktrees/ to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 10:03:27 -05:00
d845fa45a3 Merge branch 'feature/phase-6-write-tools-shell' 2026-03-11 09:45:59 -05:00
f60c47a85f Add Phase 6: write tools, shell, and edit tools with reasoning-only fix
Implement 6 new agent tools — write_file, make_dir, delete_file,
str_replace, patch_apply, run_command — bringing the agent from
read-only observer to active code modifier. All write/shell operations
are gated through the existing permissions service.

Also fix a bug where qwen3.5 thinking mode produces reasoning tokens
but no content after tool results, causing the agent to silently exit.
The loop now detects reasoning-only responses, retries twice, then
injects a nudge message to break the model out of its thinking loop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 09:45:48 -05:00
0cf0d01657 file to track little tweaks i want to make after v1 2026-03-11 08:53:55 -05:00
810886effb Merge branch 'bugfix/resolve-safe-path-doubled-prefix' 2026-03-11 08:48:02 -05:00
273da21ef6 Fix doubled workspace path when LLM passes absolute-style relative paths
resolve_safe_path now detects when the LLM passes the workspace root as
a relative path (e.g. "home/user/project/file.py") and strips the prefix
before joining. Also updated the system prompt to explicitly instruct the
model to use relative paths for all tool arguments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 08:47:57 -05:00
4623489564 Merge branch 'feature/phase-5-agent-loop' 2026-03-11 08:39:04 -05:00
91187a0728 Add Phase 5: ReAct-style agent loop with tool execution
Implement the core autonomy layer — AgentLoop streams LLM responses,
parses tool calls, executes them with permission checks, feeds results
back, and repeats until the task completes or finish is called.

- Add FinishTool for explicit loop termination
- Add tools parameter to LLMClient.stream_chat() for function calling
- Add compact tool result display (status line, not full output)
- Refactor REPL to delegate to AgentLoop.run_turn()
- Fix Ollama null content rejection (always send content as string)
- Add finish to auto_approve permissions
- 9 unit tests for agent loop (34 total, zero regressions)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 08:37:22 -05:00
501bf5c45b added file permissions and fixed a duplicate output bug. 2026-03-11 08:02:21 -05:00
adbb442ce5 Add Phase 3: LLM integration with Ollama streaming and preflight checks
Wire the REPL to a local Ollama instance via streaming HTTP (SSE).
LLMClient handles async streaming chat, StreamHandler renders live
Markdown via Rich and accumulates tool call fragments. Startup now
runs a preflight check that verifies Ollama is reachable and the
configured model is pulled, exiting with a clear message on failure.
Also adds .gitignore and updates config to use qwen3.5.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 07:27:56 -05:00
5aff2183d6 init commit 2026-03-11 07:21:21 -05:00