Commit Graph

394 Commits

Author SHA1 Message Date
Levi Neely e3a63dedd8 tmux backend and p9 server improvements 2026-03-05 09:32:07 +01:00
Levi Neely 948e23156a refine skills prompt 2026-03-04 22:07:24 +01:00
Levi Neely 485016127d Add roles 9P endpoint to server and support multiple tool directories
- Wire up roles filesystem in server.go
- Add /agent/roles directory with focus areas and help
- Support ANVILLM_TOOLS_DIR env var for multiple tool directories
- Update pcloudcc-testing skill documentation
2026-03-04 21:15:23 +01:00
Levi Neely 65e5081134 Use physical filenames in roles 9P endpoint
- Add DisplayName field to RoleMeta for frontmatter name
- Name field now always contains physical filename (never overwritten)
- Use physical filename for 9P paths and deduplication
- Use DisplayName in help output for discovery
- Add unique filtering (sort -u) to discover_role/skill/tool scripts
2026-03-04 21:14:42 +01:00
Levi Neely d0e3ff2cd8 Rename role to sandbox in layered sandbox config
- cfg/roles/ → cfg/sandbox/
- DefaultRole → DefaultSandbox, LoadRole → LoadSandbox
- SessionOptions.Role → Sandbox, Session.Role() → Sandbox()
- p9 file: role → sandbox
- Remove tasks from layered sandbox config
- Update create_session.sh and SKILL.md docs
2026-03-04 13:10:10 +01:00
Levi Neely c93bd19487 perms, prompts 2026-03-04 08:05:22 +01:00
Levi Neely 12d446d748 Add comment_count field to bead list and json outputs
- Add CommentCount field to BeadWithBlockers struct in readListFromStore and readBeadPropertyFromStore
- Call GetIssueComments to populate comment count when > 0
- Update beads skill documentation to guide checking comment_count and reading comments for additional context
2026-03-03 11:05:08 +01:00
Levi Neely 33026360b3 Assist: reset view to top after refreshing window content
Add w.Addr("0")/dot=addr/show after content writes in refreshList,
refreshMailboxWindow, refreshDaemonWindow, and refreshViewBeadWindow
so windows no longer scroll to the bottom on open or refresh.

Closes anv-hww

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 18:42:07 +01:00
Levi Neely 090b92bb0a fixes for mkfile and anvillm-notify 2026-03-02 17:10:47 +01:00
Levi Neely 1774640f95 Update default role perms: move .npm/.yarn to read-write, add .mcp-auth 2026-03-02 10:53:16 +01:00
Levi Neely 7b90d4aad2 Add proactive skill discovery to agent prompts 2026-03-01 21:57:23 +01:00
Levi Neely 8852541423 Update changes 2026-03-01 17:23:25 +01:00
Levi Neely 8ac4a6f401 update claude agent-anvillm 2026-03-01 16:52:10 +01:00
Levi Neely bde53a7389 perf: reduce mail idle guard from 15s to 5s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 16:51:34 +01:00
Levi Neely 2c32295094 fix: inject session context into first prompt only
Context was prepended to every Send() call. Now it is consumed
on the first Send() and cleared, acting as a one-shot spawn
initialization rather than a per-prompt overhead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 16:49:22 +01:00
Levi Neely 75940dd963 feat: Conductor orchestration with intelligent time estimation
- Rewrote Conductor context prompt: cycle detection, single-domain
  validation, topological worker scheduling, deadline monitoring,
  completion logging, and replacement spawning on failure/timeout
- Add estimate_time.sh: computes LLM task deadline from bead signals
  (domain, child count, description length) using fitted model or
  cold-start defaults per domain
- Add calibrate_time_estimate.sh: updates model.json from completion
  data; auto-promotes 'other' labels to taxonomy when threshold met
- Add cfg/estimation/taxonomy.json: default 10-category domain taxonomy
- mkfile: create ~/.config/anvillm/estimation and ~/.local/share/anvillm/estimation at install time

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 16:43:01 +01:00
Levi Neely ba5fd04025 fix: make beads mount work with lazy initialization
- Changed NewServer to accept *BeadsFS instead of bd.Storage
- BeadsFS is always created but with no initial mounts
- Each mount opens its own store on-demand
- Added nil check in supervisor to handle missing beads gracefully
2026-03-01 00:47:13 +01:00
Levi Neely 33dbc312b0 fix: remove eager beads store initialization at startup
The beads store was being opened unconditionally at startup, causing
crashes when the database was corrupted or incompatible. Now it's only
opened on-demand when actually needed.
2026-03-01 00:41:39 +01:00
Levi Neely 788d97307f Remove cfg/tasks and all roles except default 2026-03-01 00:17:13 +01:00
Levi Neely cb77f3d3f2 Fix supervisor task assignment: only assign when session CWD is exactly or under task mountpoint 2026-03-01 00:15:18 +01:00
Levi Neely 04d3616819 fix: require mount parameter for all bead tools
- Add mount param to github_to_beads.sh, jira_to_beads.sh, batch_create_beads.sh, sync_beads.sh
- Update all 9p paths to use mount-specific paths (agent/beads/<mount>/...)
- Fix SKILLS_PROMPT.md to correctly document mount requirements
- Only exceptions: mount_beads.sh, umount_beads.sh, list_mounts.sh
2026-02-28 23:40:24 +01:00
Levi Neely 7a40244663 Fix create_bead.sh to handle multi-line descriptions properly
- Use proper shift-based parameter handling instead of positional
- Build command string that preserves newlines in description
- Fixes issue where multi-line descriptions were incorrectly parsed as parent-id
2026-02-28 23:10:57 +01:00
Levi Neely 27188f1f55 Fix MCP bead tools: add mount parameter and handle multi-line inputs
- All bead tools now require explicit mount parameter as first arg
- Multi-line values (descriptions, comments, reasons) properly quoted with printf
- Fixes issue where tools wrote to read-only agent/beads/list instead of mount-specific ctl
2026-02-28 23:07:21 +01:00
Levi Neely 495136c70c Remove BeadsFS.store field, fix subtask creation to use mounted project stores 2026-02-28 22:52:14 +01:00
Levi Neely 7db743483b Fix recursive bead directory structure in 9P filesystem
- Distinguish control files from bead IDs in mount walk logic
- Add bead directories to mount listings via Read(mountName/list)
- Verify mount exists before allowing walk into it
- Add encoding/json import to server.go
2026-02-28 22:15:55 +01:00
Levi Neely 5e36e672a9 fix: remove broken check blocking beads/ctl writes when mounts exist 2026-02-28 21:55:25 +01:00
Levi Neely 4d51216fa6 Move SKILLS_PROMPT to root and refactor agent protocol
- Move SKILLS_PROMPT.md from kiro-cli/ to repo root (shared across backends)
- Replace verbose agent instructions with concise discovery protocol
- Enforce execute_code for all AnviLLM tool usage; forbid raw 9p commands
- Add agentspawn hook for claude backend
- Clean up install-mcp.sh tool list (now auto-discovered)
- Clarify SKILL.md wording for beads and anvillm-communication

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 21:50:48 +01:00
Levi Neely afe13afba2 Fix 9p tool access in execute_code sandbox
- Add DISPLAY, WAYLAND_DISPLAY, USER to landrun env passthrough
- Mount /etc/passwd read-only for getuser() to work
- Update mcptools scripts to check /etc/shadow instead of /etc/passwd for sandbox detection
2026-02-28 20:49:42 +01:00
Levi Neely a30ef745b0 Fix beads skill command format 2026-02-28 19:01:15 +01:00
Levi Neely ff907518e2 Clarify list_sessions as agent discovery 2026-02-28 19:00:37 +01:00
Levi Neely 729ec54d2d Fix command format: action: command 2026-02-28 18:59:45 +01:00
Levi Neely e6187c3a62 Add explicit execute_code requirement to mcptools skills 2026-02-28 18:59:02 +01:00
Levi Neely 2e1f386ec8 Add anvillm-sessions skill for agent lifecycle management 2026-02-28 18:57:54 +01:00
Levi Neely b85d03eef5 Add beads capability to integration scripts 2026-02-28 18:56:48 +01:00
Levi Neely aa87a71cca Add tasks capability to beads scripts 2026-02-28 18:56:03 +01:00
Levi Neely 79871f2e78 Update skills to use mcptools scripts instead of direct 9p 2026-02-28 18:54:53 +01:00
Levi Neely 7028bcd3e3 Add missing beads tools: init, sync, delete, batch-create 2026-02-28 18:53:56 +01:00
Levi Neely 08ddd42958 Update skill docs for renamed scripts 2026-02-28 18:52:28 +01:00
Levi Neely 405ae1f4d9 Rename integration scripts to use underscore convention 2026-02-28 18:51:55 +01:00
Levi Neely 4bfbe3cc62 Add beads and session management tools for MCP 2026-02-28 18:51:10 +01:00
Levi Neely 8a5d9e8518 Allow bot assignment for subdirectories of project mount 2026-02-28 18:43:21 +01:00
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 1e3623920e Add mountable beads projects with per-project databases
- Mount projects: echo "mount /path/to/project name" | 9p write agent/beads/ctl
- Unmount: echo "umount name" | 9p write agent/beads/ctl
- All beads endpoints work in mounts (list, ready, pending, blocked, etc.)
- Add agent/beads/mtab for mount discovery (mount→cwd mappings)
- Store databases at ~/.beads/<cwd-hyphenated> to prevent cross-contamination
- Supervisor auto-assigns claimable beads to idle bots with matching cwd
- Fix supervisor duplicate messages (track assigned beads, filter by assignee)
- Update beads skill with mtab discovery pattern
- Fix race conditions and add proper locking for mount access
2026-02-28 11:35:19 +01:00
Levi Neely 425fa53877 Update beads and p9 implementation 2026-02-27 21:16:03 +01:00
Levi Neely cbace3407c Update changes 2026-02-27 12:12:08 +01:00
Levi Neely 0b612aa0cc Add logging.Init() to all cmd programs
- anvilwebgw: init logging in startCmd
- anvilweb: init logging in main
- anvillm: init logging in main
- Assist: init logging in main

Each program now creates its own timestamped log file
2026-02-27 11:51:50 +01:00
Levi Neely 521f785313 Use timestamped log files: ~/.config/anvillm/logs/<timestamp>-<progname>.log 2026-02-27 11:48:35 +01:00
Levi Neely 2111f19e9f Add zap logging to ~/.config/anvillm/logs with panic recovery
- Created internal/logging package with zap logger
- Added panic recovery to anvilsrv main loop, monitor goroutine, and mail processing
- Replaced log.Printf/Fatal with zap in debug, p9, tmux packages
- Fixed beads race condition: clear assignee before closing issue
- All errors and crashes now logged to ~/.config/anvillm/logs
2026-02-27 11:46:49 +01:00
Levi Neely f252aa9452 Add sandbox enforcement to mcptools scripts 2026-02-27 00:25:01 +01:00
Levi Neely 17ec56fbdd Update messaging skill and execute command 2026-02-27 00:06:13 +01:00