Commit Graph

19 Commits

Author SHA1 Message Date
Levi Neely 95efd907fb Add frontend support for mountable beads and remove global mount state
- Add mount management UI to all frontends (anvillm TUI, Assist, anvilwebgw, anvillm.el)
- Mount commands default to directory basename if name not specified
- Server validates directory exists before mounting
- Umount accepts either mount name or cwd path
- Fix server bug: all beads operations now use mount-specific store
- Remove currentMount global - all operations require explicit mount parameter
- Each Tasks window tracks its own windowMount independently
- Bead detail windows receive mount from parent window
- When no mounts exist, show instructions to mount a project
- When unmounting current mount, switch to first available or show empty state
- Mount validation: Select command checks mount exists before switching
- Database path: ~/.beads/<cwd-hyphenated> to prevent cross-contamination
2026-02-28 13:35:46 +01:00
Levi Neely 2418f12012 Fix review findings from code review
- Include model in session list output (eliminates N+1 reads)
- Add jq error handling in Supervisor dispatch_ready_beads
- Use process substitution in Supervisor to avoid subshell variable scope
- Fix claude backend Execute to return error (commands go through PTY)
- Make createSubtask return childID (eliminates duplicate O(n) scan)

Fixes: bd-1z2, bd-73r, bd-cid, bd-viu, bd-vdi
2026-02-26 12:05:28 +01:00
Levi Neely 5bcaa38ad7 cost / usage optimization, phase 1 2026-02-25 19:17:50 +01:00
Levi Neely 312d2c987d anvillm.el: add ~ path translation for display and input 2026-02-25 14:27:10 +01:00
Levi Neely 45e495a975
Add requires_approval and requires_review flags to bead UI across all frontends (#10)
Implements bd-258: display and toggle of requires_approval / requires_review
boolean flags in all four AnviLLM frontends. Flags are backed by labels
(requires_approval, requires_review) on each bead, read from the labels
array in bead JSON and toggled via label/unlabel ctl commands.

- Acme: adds Labels/HasLabel to Bead struct; shows flags in frontmatter;
  updateBead parses and applies label/unlabel on Put
- TUI: showBead displays flags (green when set); edit dialog adds two
  checkboxes that toggle labels on save
- Web: detail view shows flag status with Set/Unset buttons; new
  toggleBeadFlag() function calls beads ctl API and refreshes
- Emacs: detail buffer shows flag lines; A/R keybindings invoke new
  anvillm-bead-toggle-approval and anvillm-bead-toggle-review commands

Co-authored-by: Levi Neely <lkn@darkstar.example.net>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 18:13:12 +01:00
Levi Neely db501cca26
Add approval/rejection flags and actions to tasks UI (#9)
* Add approval/rejection flags and actions to tasks UI

Adds visual flags for APPROVAL_REQUEST and REVIEW_REQUEST messages across
all UI frontends (Acme, TUI, web, Emacs), with one-click approve/reject
actions and inferred reply type mapping.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Auto-archive messages on approve or reject across all UIs

After an approval or rejection response is sent, the original inbox
message is now automatically completed/archived in all four frontends:

- Acme: handleReplyWindow gains an originalMsgID param; approve/reject
  windows pass the message ID so the original is archived on Send
- TUI: already archived via completeInboxMessage in approveMessage /
  rejectMessage — no change needed
- Web: approveCurrentMessage archives after reply succeeds; rejectCurrent-
  Message sets pendingArchiveId so the reply-form submit handler archives
  on send
- Emacs: anvillm-inbox-approve and anvillm-inbox-reject write "complete
  <id>" to user/ctl and refresh the inbox after sending the response

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Levi Neely <lkn@darkstar.example.net>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:38:23 +01:00
Levi Neely 0dd616fe66 Add bead management features to Emacs interface
- Add subtask creation with 's' keybinding in tasks view
- Swap 't' and 'T' keybindings in main view (t=tasks, T=stop)
- Add Return key to view bead details in tasks view
- Add 'w' keybinding to assign beads to agents (both views)
- Add tab completion for bead IDs and agent IDs
2026-02-21 14:30:35 +01:00
Levi Neely 5a212793c3 ui parity 2026-02-21 13:57:05 +01:00
Levi Neely 937ad83e97 Remove deprecated endpoints and fix mailbox auto-completion
- 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
2026-02-17 23:06:07 +01:00
Levi Neely 314d347e76 Add centralized audit log system
- 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
2026-02-17 22:07:39 +01:00
Levi Neely ff2bd372c1 improve send message api 2026-02-17 18:20:01 +01:00
Levi Neely b66e9822a2 Fix attach for new tmux session naming and clean up emacs prompts
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>
2026-02-17 15:32:48 +01:00
Levi Neely 35b3ff338e Fix 9p-read-inbox to strip .json extension when marking messages complete 2026-02-17 14:37:46 +01:00
Levi Neely 241e4b9818 Fix all UIs to use mailbox system for prompt sending
- 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
2026-02-17 11:10:14 +01:00
Levi Neely 533bc8acee Fix: Ensure streaming process is killed when log window is closed with 'q'
Previously, pressing 'q' in the Emacs log viewer would close the window
but might leave the streaming 9p read process running. Now explicitly
kills the process before closing the window.

- Added anvillm-log-quit function that kills process then closes window
- Changed 'q' keybinding from quit-window to anvillm-log-quit
- Process is now reliably terminated on both 'q' and buffer kill
2026-02-15 11:26:08 +01:00
Levi Neely 57007b2fbc Add streaming log viewer to Emacs and TUI
TUI changes:
- Press 'l' to view session log in scrollable pane
- Manual refresh with 'r' key
- Non-blocking read prevents hang on streaming log file
- Log window scales to 80% of terminal width
- Auto-scrolls to bottom on open

Emacs changes:
- Press 'l' to view session log in dedicated buffer
- Streams log continuously in real-time
- Auto-scrolls when at bottom of buffer
- Process automatically killed when buffer closed
- Refresh with 'r' restarts stream from beginning
- Fixed pre-existing bug in anvillm-compose-prompt

Both interfaces now support log viewing with appropriate
streaming/refresh strategies for their execution models.
2026-02-15 11:22:45 +01:00
Levi Neely fb0ff24aa8 improve prompting 2026-02-14 12:50:34 +01:00
Levi Neely ccc02379ae add attach functionality to emacs frontend 2026-02-14 12:33:29 +01:00
Levi Neely e7b1b1912a basic emacs interface 2026-02-14 12:23:27 +01:00