

<!-- 2026-03-02 -->
## Tools Directory Analysis

The `/home/ixi/khacloud/drive/Plugins/VeilCli/tools` directory contains **25 tool files** that provide the core functionality for VeilCLI agents.

### Tool Categories:

**Agent Communication (3 tools):**
- `agent_message.js` - Synchronous message to another agent with response waiting
- `agent_send.js` - Asynchronous fire-and-forget message to another agent
- `agent_spawn.js` - Spawn sub-agents with sync/async modes and return modes

**File Operations (5 tools):**
- `read_file.js` - Read file contents with offset/limit support
- `write_file.js` - Write/overwrite entire files
- `edit_file.js` - Search-and-replace file editing
- `glob.js` - Find files matching glob patterns
- `list_dir.js` - List directory contents with sizes

**Code Search (1 tool):**
- `grep.js` - Search file contents with regex support

**System Operations (2 tools):**
- `bash.js` - Execute shell commands with timeout support
- `sleep.js` - Wait for specified duration

**Task Management (5 tools):**
- `task_create.js` - Create new async tasks
- `task_status.js` - Check task status and output
- `task_respond.js` - Respond to waiting tasks
- `task_subscribe.js` - Subscribe to task completion

**Memory Management (3 tools):**
- `memory_read.js` - Read agent/project memory files
- `memory_write.js` - Write to persistent memory
- `memory_search.js` - Search across memory files

**Planning (2 tools):**
- `todo_read.js` - Read session TODO list
- `todo_write.js` - Create/update structured TODOs

**Web Operations (2 tools):**
- `web_search.js` - Web search via DuckDuckGo
- `web_fetch.js` - Fetch URL content (text/JSON/base64)

**Utilities (1 tool):**
- `tool_search.js` - Search available tools by name/description
- `log_write.js` - Write progress entries to task log

### Key Dependencies:
- Most tools use `../infrastructure/database` for persistence
- File tools use Node.js `fs` and `path` modules
- Memory tools use `../utils/paths` for directory resolution