- Wire all state changes in tmux session to use transitionToLocked (triggers OnStateChange)
- Close() exited state
- Refresh() stopped states (intentional stop, restart spam prevention, auto-restart failure, PID=0)
- Add event callbacks to mailbox manager for send/receive events
- Callbacks fire when message removed from outbox (send) and delivered to inbox (receive)
- Consistent with state change callback pattern
- Fix /events 9p read handler to respect offset/count
- Prevents infinite read loop by properly signaling EOF
- Uses readFile() pattern like /list for consistency
- Parse JSON and format as: [Message from X] / Type / Subject / Body
- Makes it clear who the sender is for replying
- Matches original 9p-read-inbox behavior
- Read only first message (not all messages)
- Automatically mark message as complete after reading
- Matches behavior of original 9p-read-inbox script
- Allows setting agent state via MCP (idle, running, stopped, etc.)
- Validates state values via enum in schema
- Enables agent hooks to update their own state
- Implements MCP protocol server that translates to 9p operations
- Three tools: read_inbox, send_message, list_sessions
- Uses plan9port 9p client for filesystem operations
- Debug logging to stderr, JSON-RPC on stdout
- Enables MCP clients to interact with anvilsrv daemon
- Check for existing tmux clients before launching new terminal
- Use 'tmux switch-client' to reuse existing terminal window
- Fall back to new terminal only when no client is attached
- Middle-click on session ID without selection now attaches to tmux session
- Preserves existing fire-and-forget prompt behavior when text is selected
- Same functionality as 'Attach {session-id}' command
- Fix PROMPT_RESPONSE messages not auto-completing
- Remove deprecated message types (LogInfo, LogError, StatusUpdate)
- Remove entire chat log system (replaced by audit log)
- Migrate user prompts to mailbox system in main.go
- Remove {id}/in and {id}/out 9P endpoints
- Only mail processor uses sess.Send() directly
- Fix file index constants after removing in/out files
- Remove unused SendCtl function
- Remove Sandbox button from main window tag
- Remove Sandbox case handler and related functions
- Remove sandbox package import
- Delete internal/ui/sandbox.go
The Sandbox window is no longer needed as sandbox configuration
has been split into layered configuration (global, backends, roles, tools).
- Created internal/audit package for centralized logging
- Replaced per-session log files with single agent/audit file
- Updated all UIs (TUI, web, Emacs) to use centralized audit log
- Modified mailbox manager to log all message deliveries with aliases
- Updated Alog script to stream centralized audit log
- Removed session-specific log streaming in favor of global audit log
- Added Archive to message window tag line
- Archive writes 'complete <msg-id>' to user/ctl
- Window closes after successful archive
- Added ID field to Message struct
- Added error handling for archive failures
Front-ends were constructing anvillm-{backend} but backend now uses
anvillm-{namespace}. Updated Assist and emacs to read tmux target from
the tmux file instead of constructing it from backend name.
Also removed broken direct prompt functionality from emacs (P and M-P
keybindings that used /in file directly).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- cmd/anvillm: Added sendPrompt() using user/outbox
- cmd/anvilweb: Updated sendPrompt() to write to user/outbox
- elisp/anvillm.el: Changed to write JSON messages to user/outbox
- All UIs now queue prompts non-blocking via mailbox system
- Resolves blocking issue across all interfaces
- Changed sendPrompt() to write JSON messages to user/outbox
- Messages now queue and deliver when session is idle (non-blocking)
- Fixed prompt window to stay open on send error
- Resolves blocking issue when bot is busy
- Fix Attach button to launch foot terminal with tmux attach
- Add tmux file to 9P server to expose session:window target
- Replace action buttons with cleaner layout: main actions visible,
secondary actions in dropdown menu
- Add browser notifications for session state changes
- Preserve open dropdown menu across table refresh
- Remove disabled state from Prompt button (mailbox queues prompts)
Opens streaming log window that displays session chat history.
Window is named /AnviLLM/Log.{session-id-or-alias} and streams
log data continuously, marking window as clean after each write.
The Restart button was incorrectly disabled for non-stopped sessions.
Since restart performs both stop and start actions, it should work
for any session state, similar to the Kill button.
Removed the conditional disabled state from the Restart button.
- Added /api/log/{sessionId} endpoint for SSE streaming
- Backend streams log file via 9P with proper SSE formatting
- Each log line sent as separate SSE message for protocol compliance
- Frontend displays log in terminal-like pane (black bg, white text)
- Log button added to each session in the table
- Auto-scrolls to bottom as new data arrives
- Stream automatically closes when log pane is closed
- Context cancellation properly closes 9P file handle
All three interfaces (Acme, Emacs, TUI, Web) now support log viewing
with appropriate streaming/refresh strategies for their execution models.
- Press 'l' to view session log in scrollable pane
- Press 'r' within log viewer to refresh
- Press 'q' or ESC to close
- Log window scales to 80% of terminal width
- Automatically scrolls to bottom on open
- Non-blocking read prevents hang on streaming log file
- Add vertical space above search box
- Style header as colored bar with white text
- Reduce header size and spacing for cleaner look
- Remove redundant subtitle text
- Add session ID column (2nd position) with monospace styling
- Add color-coded state badges for all states (idle=green, running=blue, starting=orange, stopped=gray, error=red, exited=light gray)
- Convert New Session form to compact modal dialog
- Fix XSS vulnerability by replacing inline onclick handlers with data attributes and event delegation
- Sort sessions alphabetically by alias/name (case-insensitive)
- Move New Session form below sessions table (view then act)
- Fix dialog buttons: right-aligned, [Send/Save] [Cancel] order (desktop convention)
- All changes client-side only, no API modifications
- Minimal Go web server with REST API for session management
- Single-page UI using Pico CSS (12KB, classless framework)
- Features: create sessions, send prompts, edit context/alias, control sessions
- Security: input validation, XSS prevention, path validation
- Auto-refresh every 5 seconds
- Documented security model (no authentication, localhost/SSH tunneling recommended)
Enhancements to anvillm TUI:
- Unified backend selection: 's' key shows menu (claude/kiro-cli)
- Changed stop from 's' to 't' to avoid conflict
- Added vim navigation (j/k) and emacs navigation (C-n/C-p)
- Responsive table layout with proper column expansion
- Blue header with white bold text and column spacing
- Improved dialog styling with blue borders
- Black text on white background for input fields
- Updated help text and status bar with new keybindings
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add terminal UI as an alternative to the Acme interface. Both UIs
interact with anvilsrv via the same 9P filesystem interface.
Implementation:
- cmd/anvillm/main.go: Full-featured TUI using tview/tcell
- Session list with color-coded states
- Keyboard-driven interface (no mouse required)
- Auto-refresh every 2 seconds
- Modal dialogs for creating sessions, sending prompts, setting aliases
Features:
- Create Kiro/Claude sessions (k/c keys)
- Send prompts to selected session (p key)
- Stop/Restart/Kill sessions (s/R/K keys)
- Set session aliases (a key)
- Refresh session list (r key)
- Help dialog (? key)
- Quit (q key)
UI Components:
- Session table with columns: ID, Alias, Backend, State, PID, Cwd
- Status bar showing keyboard shortcuts
- Modal forms for user input
- Color-coded session states (green=running, aqua=idle, etc.)
Dependencies:
- github.com/rivo/tview: TUI framework
- github.com/gdamore/tcell/v2: Terminal cell library
Build:
- Updated mkfile to build anvillm binary
- Fixed .gitignore to allow cmd/anvillm/ directory
Documentation:
- Added Terminal UI section to README
- Lists all keyboard shortcuts
- Notes that TUI uses same 9P interface as Assist
This provides a lightweight alternative for users without Acme.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Assist now continues working even if anvilsrv fails to start, and
provides a Daemon management window for server control.
Changes:
- Assist no longer fails fatally if anvilsrv won't start
- Logs ERROR and continues with disconnected state
- Add Daemon command to open /AnviLLM/Daemon window
- Daemon window shows server status with Start/Stop/Restart buttons
- Add isConnected() checks to all 9P operations
- Display friendly "not connected" message in main window
- Auto-reconnect when starting daemon from Daemon window
Daemon Window Features:
- Shows current daemon status (RUNNING/NOT RUNNING)
- Displays 9P socket path and existence
- Shows connection state
- Start button: runs `anvilsrv start` and reconnects
- Stop button: runs `anvilsrv stop` and disconnects
- Restart button: stops then starts
- Get button: refreshes status display
User Experience:
- Can still use Assist UI features (Sandbox, etc.) without daemon
- Session-related features show "not connected" errors
- Daemon command provides easy server management
- No more hard failures on startup
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>