Commit Graph

8 Commits

Author SHA1 Message Date
Levi Neely 407b3732af Replace event queue with in-memory pub-sub event bus
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>
2026-02-22 09:38:14 +01:00
Levi Neely 9ebd239a95 Add beads task tracking integration via 9P filesystem
- Add beads dependency (steveyegge/beads)
- Create internal/beads/beads.go: Storage wrapper for beads operations
- Create internal/p9/beads.go: 9P filesystem handlers for beads
- Integrate beads into 9P server (shared across all namespaces)
- Add beads directory to 9P filesystem: /agent/beads/
- Support commands: init, new, claim, complete, fail, dep
- Add ANVILLM_BEADS_PATH env var for custom beads location
- Update IDEAS.md with multi-tracker import design (Jira, GitHub, GitLab, Linear)
- Beads provides persistent, crash-resilient task tracking for multi-agent workflows
2026-02-19 23:08:50 +01:00
Levi Neely ff2bd372c1 improve send message api 2026-02-17 18:20:01 +01:00
Levi Neely 14e3c8d9a4 feat: add curses-based TUI (anvillm)
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>
2026-02-14 12:01:02 +01:00
Levi Neely 528a482fe8 basic sandboxing support with landrun, fail fast 2026-02-11 08:32:14 +01:00
Levi Neely d8fcb8fc89 rm dead code 2026-02-10 22:33:30 +01:00
Levi Neely 6cb61a7a32 debug mode, don't print to main window, rename go module and main window 2026-02-10 21:45:27 +01:00
Levi Neely d8dccd94b3 initial commit 2026-02-09 17:57:42 +01:00