Commit Graph

74 Commits

Author SHA1 Message Date
Levi Neely 0eeb591da7 Add superpowerd support and goq config to build
- Enable MCP servers in goq agent config
- Add superpowerd socket and env vars to goq backend
- Copy goq.json during build
2026-04-10 16:30:37 +02:00
Levi Neely 8ad8e35551 Add goq backend support 2026-04-10 16:13:49 +02:00
Levi Neely 8666dd5ae0 Fix mkfile: add tools install, remove stale Assist reference 2026-03-20 16:37:22 +01:00
Levi Neely bc2f67ddee Remove team-templates 2026-03-20 16:09:29 +01:00
Levi Neely a2b3667fc0 Include USER.md in kiro-cli agentSpawn hook 2026-03-20 16:06:45 +01:00
Levi Neely 5877c9865a Add USER.md for user-specific agent extensions 2026-03-20 16:05:32 +01:00
Levi Neely abd46789ea Generate claude agent from shared OUTPUT_PROTOCOL.md + SKILLS_PROMPT.md 2026-03-20 16:03:35 +01:00
Levi Neely cda33c11aa Remove unused claude OUTPUT_PROTOCOL copy and agentspawn hook 2026-03-20 15:59:58 +01:00
Levi Neely bedbc5c0a0 Move OUTPUT_PROTOCOL.md and SKILLS_PROMPT.md to agents/kiro-cli 2026-03-20 15:59:18 +01:00
Levi Neely 53fa4713f7 Restructure: move hooks to hooks/{backend}/ 2026-03-20 15:56:18 +01:00
Levi Neely ba6a5cfcd3 Restructure: move agents to agents/{backend}/ 2026-03-20 15:54:33 +01:00
Levi Neely 00d25936a5 Remove anvillm-notify scripts 2026-03-20 15:40:51 +01:00
Levi Neely e96410d599 Remove anvillm-skills script 2026-03-20 15:40:04 +01:00
Levi Neely ed761f67ee Move skills to agent-skills repo 2026-03-20 15:36:26 +01:00
Levi Neely 44dcc5f11b Move backend MCP configs to anvillm-mcp 2026-03-20 15:31:42 +01:00
Levi Neely 991b4ba2ce Rename anvilsrv to anvillm, move main.go to root 2026-03-20 15:30:09 +01:00
Levi Neely bb29ec6de7 Extract Assist to anvillm-acme, move logging to pkg/ 2026-03-20 15:29:06 +01:00
Levi Neely 170d3ca3df Move mcptools to anvillm-mcp 2026-03-20 15:20:14 +01:00
Levi Neely 29fe71d24d Remove anvilmcp from mkfile 2026-03-20 15:19:44 +01:00
Levi Neely daf50d9783 beads: natural sort for hierarchical IDs
Sort bd-1.2 before bd-1.10 instead of lexicographic order.
2026-03-20 14:28:19 +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 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 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 21b410f84e anvillm: add orphan bead recovery via cron
scripts/anvillm-orphan-check: scans all mounted beads projects every
5 minutes, finds in_progress beads whose assignee session has died,
and spawns a replacement agent with a bootstrap_session.sh prompt.

mkfile: install anvillm-orphan-check to $HOME/bin; add cron-install
and cron-remove targets for idempotent crontab management.

Default backend for replacement agents is $ANVILLM_DEFAULT_BACKEND
(falls back to "claude").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 15:16:40 +01:00
Levi Neely 824ab88fe3 anvilmcp: handle args passed as JSON-encoded string; fix team-templates install path
- Parse args as JSON string fallback when LLM passes args incorrectly
- Update SKILLS_PROMPT and agent docs to use unquoted args syntax
- Install team-templates under $INSTALL_PATH/Teams instead of hardcoded $HOME/bin/Teams

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 17:40:35 +01:00
Levi Neely 715a1f7432 team-templates: add workflow team scripts using anvilspawn 2026-03-07 12:37:48 +01:00
Levi Neely a73ef83d3d roles: replace bot-templates with anvilspawn and structured roles
- Remove bot-templates/ entirely
- Add scripts/anvilspawn: spawn a bot by role+workdir, hash-prefixed alias
  ties bots to the same workdir for organic collaboration
- Add roles: solo-developer, developer, reviewer, tester, devops, author,
  technical-editor, researcher, taskmgr
- Standardize all roles to: Responsibilities / Prohibited Activities /
  Workflow / Response Format
- Remove explicit delegation protocols from all roles; delegation is emergent
- Remove inbox-check startup steps; messages are delivered automatically
- Update mkfile to install anvilspawn

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 20:49:30 +01:00
Levi Neely 6475b9f216 Add maildir messaging support for agent communication 2026-03-05 14:33:47 +01:00
Levi Neely 090b92bb0a fixes for mkfile and anvillm-notify 2026-03-02 17:10:47 +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 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 631c9fb47e Fix race conditions and path traversal bugs in internal/p9
- Fix race in open(): hold lock during fid modification
- Fix race in write(): copy path before unlock
- Fix race in remove(): read sessionID under lock
- Fix panic in walk(): guard empty qids slice
- Fix sessionID tracking: always update to current session
- Fix path traversal in skills.go: use filepath.Clean + bounds check
- Fix path traversal in tools.go: use filepath.Clean + separator check
- Fix repeated array access in beads.go: extract beadID variable
2026-02-26 22:40:56 +01:00
Levi Neely c10a008f3d install mcptools and skills to default dir 2026-02-26 20:21:31 +01:00
Levi Neely 8b87e3514a Move tool scripts from cmd/anvilmcp to mcptools/ 2026-02-26 14:36:50 +01:00
Levi Neely 5f8c41b576
Implement MCP code execution pattern (#20)
* Implement MCP code execution pattern

- Add execute_code tool for bash execution in landrun sandbox
- Remove redundant MCP tools (read_inbox, send_message, etc.)
- Implement dynamic tool discovery from ~/.config/anvillm/mcptools/
- Add workspace isolation (~/.cache/anvillm/exec)
- Add security: output limits, concurrency limits, validation, path traversal protection
- Update bot templates (Conductor, Taskmaster) with bash examples
- Update anvillm-communication skill to use execute_code pattern
- Create comprehensive documentation (user guide, migration guide, security guide)
- Add test suite for validation and limitedWriter
- Fix landrun flags: --rox for executables, --env for AGENT_ID passthrough
- Network blocked by default (no --connect-tcp or --unrestricted-network)

Token reduction: 80-99% via progressive tool discovery and subprocess data processing

* Fix code review issues in MCP code execution pattern

- Security: Change security.jsonl permissions from 0644 to 0600
- Bug: Fix limitedWriter to return correct byte count for io.Copy
- Bug: Fix tool schema inconsistency (execute_code requires only 'code')
- Performance: Move whitespace regex to package-level var
- Security: Improve validateCode with regex patterns and normalization
- Cleanup: Remove dead code from main.go and tools.go
- Cleanup: Rewrite shell scripts to use jq for safe JSON construction
- Docs: Fix duplicate sections and JavaScript syntax in bash examples

* Improve code validation security patterns

- Fix rm -rf bypass: allow optional whitespace before /
- Expand rm -rf to block sensitive paths (/home, /var, /usr, etc.)
- Block all network protocols in curl/wget (not just http/https)
- Add test for regex pattern compilation
- Add test cases for tabs, sensitive paths, ftp/file protocols

* Harden shell scripts and improve rate limiting

---------

Co-authored-by: Levi Neely <lkn@darkstar.example.net>
Co-authored-by: Levi Neely <lneely@pascom.net>
2026-02-26 14:02:54 +01:00
Levi Neely 6b2d7dc853 hotfix: claude mcp install 2026-02-24 13:00:37 +01:00
Levi Neely 2e1c2d8849 hotfix: claude in sandbox 2026-02-24 12:50:05 +01:00
Levi Neely 98a659e411 hotfix: mkfile 2026-02-23 22:03:12 +01:00
Levi Neely 8dae78f161 Merge remote-tracking branch 'origin/main' into conductor 2026-02-22 10:46:48 +01:00
Levi Neely 8ecbbbd678 Add bot templates and orchestration system
- Add bot-templates/ directory with specialized agent templates
- Update README.md with orchestration documentation
- Update mkfile with new build targets
- Remove old workflow files (DevReview, DevReviewQA, Docs, Planning, Research, Taskmaster)
2026-02-22 10:45:03 +01:00
Levi Neely a28cf13cae Add anvilwebgw HTTP gateway service, simplify anvilweb
- New cmd/anvilwebgw: standalone HTTP gateway daemon with start/stop/fgstart/status
  subcommands, exposing all 9P-connected API endpoints on :8081
- cmd/anvilweb simplified to a plain static file server that reverse-proxies
  /api/* to anvilwebgw; removes all 9P connectivity
- Frontend error handling overhauled: replace alert() with styled dismissible
  error banner and inline container errors showing actual server response detail
- Fix CSS specificity bug that kept error banner always visible
- Fix nil slice JSON encoding (null vs []) for empty inbox/archive responses
- mkfile: add anvilwebgw build and clean targets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 09:01:23 +01:00
Levi Neely 9d0e9b7e42 Add ollama backend support
- Add ollama backend implementation using mcphost and ollie
- Add ollama.yaml sandbox configuration
- Update README with ollama installation and usage instructions
- Add ollama command to Assist, anvilmcp, and anvilsrv
- Add ANVILLM_OLLAMA_MODEL environment variable
- Hardcode ollama-mcp.json config path to ~/.config/anvillm/ollama-mcp.json
2026-02-21 21:03:55 +01:00
Levi Neely 977745d133 Make skills command conditional: use agent-prompt/agent-skills if available 2026-02-19 15:30:56 +01:00
Levi Neely 5fdcc039d1 Add agent-hook script and SKILLS_PROMPT.md
- Added agent-hook for future use with wrapper script
- Created SKILLS_PROMPT.md for automatic skill loading
- Updated mkfile to install both
- Kept explicit commands in agent config (agent-hook needs wrapper)
2026-02-18 22:33:09 +01:00
Levi Neely e5b77b0d27 Revert "Remove 9p-read-inbox from mkfile"
This reverts commit c7c02c9502.
2026-02-18 22:18:29 +01:00