Commit Graph

539 Commits

Author SHA1 Message Date
Levi Neely c5b96bcac1 Update docs: execute_code is the only MCP tool
- Rewrite code execution docs to reflect single-tool model
- Remove obsolete migration guide and testing doc
- Update README, kiro-cli README, BEADS.md MCP sections
- Remove all 'direct tool calls' / 'legacy tools' framing
- Update sandbox-config diagram: roles→sandbox, override→merge
- Add 9P security mitigation: run locally on trusted network
- Regenerate sandbox-config.svg
2026-03-18 23:39:23 +01:00
Levi Neely 4fa1e0cc7d architecture diagram: rename Backends to tmux sessions 2026-03-18 23:23:30 +01:00
Levi Neely c5e95eb1ea Remove cmd/anvilweb, cmd/anvilwebgw, cmd/anvillm, and elisp/
Drop legacy frontend proof-of-concepts (TUI, web UI, HTTP gateway,
Emacs major mode) to focus on the core. Assist remains as the primary
frontend; any 9P-speaking program can serve as a frontend.

Update README, mkfile, .gitignore, and architecture/client-interactions
diagrams accordingly.
2026-03-18 23:20:54 +01:00
Levi Neely 304bf25bf1 resolve prjdir from worktree/workspace dir 2026-03-18 23:07:45 +01:00
Levi Neely 6791d42a3e archive: re-read date from window name on Get 2026-03-18 17:27:57 +01:00
Levi Neely cfd4cf5daa mailbox: delete only removes from inbox, not completed 2026-03-18 17:20:41 +01:00
Levi Neely e78d91cf55 mailbox: add DeleteFromInbox, delete tries inbox then completed 2026-03-18 17:19:40 +01:00
Levi Neely a5bf4a8397 Assist: archive window reads from mail history
- Archive tag accepts YYYYMMdd date (defaults to today)
- Loads messages from ~/.local/share/anvillm/mail/{date}-*.jsonl
- Shows both sent and received with From/To columns
- Inbox '- <id>' now deletes instead of archiving
2026-03-18 17:18:15 +01:00
Levi Neely b03324baaf beads: add deferred filter endpoint
Add /beads/deferred aggregate endpoint and per-mount /beads/<mount>/deferred
endpoint to list beads with status=deferred.

- internal/p9/beads.go: add readDeferredFromStore and readDeferredAggregate
- internal/p9/server.go: wire up deferred in walk, directory listings
- cmd/Assist: update listBeadsWithFilter to use deferred endpoint
2026-03-18 17:02:32 +01:00
Levi Neely aab91394a2 Assist: add Deferred/Ready/All filter buttons to Tasks window
- Deferred: shows only deferred status tickets
- Ready: shows open and in_progress tickets
- All: shows everything (default)
2026-03-18 15:03:50 +01:00
Levi Neely 1f7d3ace54 fix crash on double mount 2026-03-18 09:25:28 +01:00
Levi Neely 74845f151b messaging built in, not a skill 2026-03-18 08:35:59 +01:00
Levi Neely d3e2a543cb Update remaining read_inbox references to check_inbox 2026-03-18 08:20:41 +01:00
Levi Neely e53ce4bb1f Rename read_inbox.sh to check_inbox.sh
Renamed mcptools/read_inbox.sh to mcptools/check_inbox.sh and updated
all references across docs, scripts, and skills.
2026-03-18 08:18:20 +01:00
Levi Neely 3ab11f1c88 beads: remove workspace detection — can't distinguish from worktree-based 2026-03-16 15:11:27 +01:00
Levi Neely 6645cd9efb beads: fix worktree detection — allow worktree-based repos, reject feature workspaces 2026-03-16 15:08:51 +01:00
Levi Neely ff58ef9438 beads: move worktree/workspace validation to server-side 2026-03-16 15:04:13 +01:00
Levi Neely 42ccb8f096 mount_beads.sh: reject dirs containing git worktrees 2026-03-16 15:03:16 +01:00
Levi Neely ff77225643 mount_beads.sh: reject git worktrees as mount targets 2026-03-16 15:00:59 +01:00
Levi Neely 5a81faa5f9 mount_beads.sh: verify mount succeeded via mtab 2026-03-16 14:54:59 +01:00
Levi Neely d5b30ed38e config: add shared ANVILLM_PROJECT_DIRS config
- Loaded once at startup, defaults to ~/src:~/prj
- Beads mount validation uses shared config
- Available for other uses via config.ProjectDirs
2026-03-16 14:52:28 +01:00
Levi Neely 7935950e4d beads: warn on overlapping mount paths 2026-03-16 14:47:39 +01:00
Levi Neely 69829a98a1 beads: add scope-based filtering for worktree/workspace isolation
- Beads tagged with scope:<value> label, auto-derived from cwd
- Strict scope matching: bots only see beads matching their scope
- Updated scripts: create_bead, list_beads, list_ready_beads, wait_for_bead, search_beads, batch_create_beads, jira_to_beads, github_to_beads
- Fixed batch-create to handle raw JSON and create beads one at a time
- Added scope to JSON output and BeadReady events
2026-03-16 14:41:54 +01:00
Levi Neely 8fcf31a3a4 batch load skills 2026-03-16 11:55:30 +01:00
Levi Neely 2f55509e2c Assist: refresh Tasks window after Put edits 2026-03-16 11:24:23 +01:00
Levi Neely 2d908c6dcd Assist: add Comment tag to leave comments on beads
- Add Comment tag to bead view window tagline
- New /AnviLLM/Tasks/{bead-id}/comment window with Put handler
- Fix comments display: JSON field is 'text' not 'body'
2026-03-16 11:23:46 +01:00
Levi Neely 8ddb7f28b9 cron: fix NAMESPACE path to /tmp/ns.$USER.$DISPLAY; add PLAN9 export
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 15:38:06 +01:00
Levi Neely 6b49d69a4c cron: inline env setup in crontab command; drop variable assignments
Classic cron does not support variable assignments in the crontab.
Inline PLAN9, PATH, DISPLAY, and NAMESPACE exports directly in the
cron command, expanded at install time from the user's environment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 15:27:05 +01:00
Levi Neely 96fe19fe02 cron-install: use $HOME/plan9 for PLAN9 instead of unbound $PLAN9
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 15:14:42 +01:00
Levi Neely e825611aec cron-install: set PLAN9 and PATH in crontab for anvillm-supervisor
Cron runs with a minimal environment; without PLAN9 and the full PATH,
9p cannot locate the namespace socket and sessions are not detected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 15:11:49 +01:00
Levi Neely a934d47303 anvillm-supervisor: fix message type case (PROMPT_REQUEST)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 15:04:23 +01:00
Levi Neely dc3fa50e48 anvillm-supervisor: invoke send_message.sh via 9P tools endpoint
send_message.sh is not on PATH outside the MCP context; use
bash <(9p read anvillm/tools/send_message.sh) instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 15:01:30 +01:00
Levi Neely 8814586a2c supervisor: replace Go supervisor with anvillm-supervisor shell script
Remove internal/supervisor Go package. Replace with anvillm-supervisor
script driven by cron: --orphans (every 5m) recovers in_progress beads
whose assignee session has died, --nudge (every 1m) prompts idle worker-
role bots to check for available work via execute_code + wait_for_bead.sh.
Nudges sent as user via send_message.sh. cron-install uses a temp file
to avoid pipeline issues.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:57:39 +01:00
Levi Neely 47a97e5cea supervisor: replace Go package with anvillm-supervisor shell script
Remove the internal/supervisor Go package and cron-driven orphan check
script. Replace with a single anvillm-supervisor script invoked by cron
that handles both orphan bead recovery (--orphans, every 5m) and idle
worker nudging (--nudge, every 1m). Nudges use send_message.sh as user,
consistent with existing mail processing. anvilsrv no longer runs any
supervisor goroutine.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:47:56 +01:00
Levi Neely 989558cf7f roles: replace Bead Loop with When Nudged section
The supervisor drives re-polling via 15s nudges to idle workers.
Roles no longer need to instruct bots to loop — just what to do
when the supervisor prompts them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:30:14 +01:00
Levi Neely eca5762565 roles: add worker: true to roles that run the bead polling loop
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:28:13 +01:00
Levi Neely 8e88660f65 supervisor: nudge idle worker-role bots to run their polling loop
Replace dead assignWork() stub with nudgeIdleWorkers(), which sends a
prompt to any session whose role has worker: true in its front-matter
and has been idle for more than 15 seconds. A 15-second ticker drives
the checks. Bots that should be polling for beads will self-correct
after a brief idle period.

Add Worker bool to RoleMeta, parsed from "worker: true" front-matter,
and IsWorker() helper on RolesFS. Remove unused beads/mailbox/eventbus
deps from the supervisor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:25:21 +01:00
Levi Neely b4e84f57ee supervisor: stop sending inbox messages to bots
BeadReady events are already fired when a bead becomes ready; bots
listen for those directly. Sending inbox messages was redundant and
caused duplicate/unexpected prompts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:16:03 +01:00
Levi Neely 0ced30825d claim_bead: verify claim succeeded by reading back assignee
9p write exits 0 even when the server returns Rerror on Tclunk, so
the previous exit-code check never detected failed claims. Read back
the bead's assignee after writing and fail if it doesn't match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:13:11 +01:00
Levi Neely 173746ce3b beads: add per-mount write mutex to serialize concurrent writes
Concurrent writes to the same mount (e.g. two bots claiming the same
bead simultaneously) could race through RunInTransaction before either
committed. A per-mount writeMu serializes all writes without blocking
independent mounts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 13:57:07 +01:00
Levi Neely 4c83e0d2bf claim_bead: exit 1 on failed ctl write instead of printing success
9p write error was ignored; bots always printed "claimed" regardless
of whether the server rejected the claim with ErrAlreadyClaimed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 07:54:38 +01:00
Levi Neely 32a3016f0d wait_for_bead: kill 9p read child on exit to prevent hang in execute_code
cmd.Run() waits for stdout pipe EOF, but the 9p read subprocess
spawned by process substitution inherits the fd and keeps it open
after bash exits. Capture the PID and kill it in an EXIT trap.
2026-03-15 07:33:29 +01:00
Levi Neely 1df382c441 wait_for_bead: close stderr in process substitution to unblock cmd.Wait
9p read inherits the stderr pipe write end from bash -c, keeping
cmd.Wait() blocked after bash exits. Redirecting to /dev/null lets
the goroutine see EOF and the execute_code call complete normally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 23:48:07 +01:00
Levi Neely 47af198732 SKILLS_PROMPT: add sub-agent discipline section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 22:01:43 +01:00
Levi Neely b238502b25 anvillm-agent: prohibit sub-agents for single-tool operations
Inbox checking, bead reading, and any single-tool op must be done
directly — never delegated to a sub-agent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 21:57:18 +01:00
Levi Neely 0ae34f20a6 beads: fix wait_for_bead description — no role filter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 21:39:11 +01:00
Levi Neely 399edb5f6e beads: remove --role doc from wait_for_bead
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 21:37:22 +01:00
Levi Neely 07a7abb248 wait_for_bead: remove role filter — bot decides whether to claim
Role filtering was silently dropping events when $AGENT_ROLE didn't
match the default "developer". The bot already handles out-of-scope
work refusal — no need to filter here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 21:36:54 +01:00
Levi Neely 6ea87e1810 Assist: remap bead prefixes, add open/defer; orphan: skip user-claimed
Tasks window Put handler prefix changes:
  ~ → c  (claim)
  ^ → u  (unclaim)
  o      (open/promote deferred)
  d      (defer)
  x, f, -, + unchanged

Orphan check now skips beads claimed by "user" — human-held beads
are not orphans.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 21:21:25 +01:00
Levi Neely 9b8d7fba0c Revert "mail_search: replace bash process substitution with direct script call"
This reverts commit fc24e26a7d.
2026-03-14 21:14:07 +01:00