Replaces the TTL-based event queue (internal/events) with a proper
in-memory pub-sub bus (internal/eventbus) backed by simonfxr/pubsub.
The agent/events 9P endpoint is now a streaming subscriber: clients
block on reads and receive one JSON-encoded event per read until they
disconnect. Each open(2) creates a per-connection subscription; clunk
and connection teardown cancel it automatically.
- internal/eventbus/bus.go: new package wrapping simonfxr/pubsub;
provides Publish(agent, type, data) and Subscribe() -> (chan, cancel)
- internal/events/events.go: deleted
- internal/session/manager.go: SetEventQueue -> SetEventBus; all
publish sites updated to use eventbus constants
- internal/p9/server.go: fid gains eventCh/eventUnsub fields; Topen
subscribes, Tread blocks on channel, Tclunk/serve-defer cancel
- cmd/anvilsrv/main.go: wired to SetEventBus
Co-Authored-By: Claude Sonnet 4.6 <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>