feat(tools): add glob tool with timeout protection

- Override OpenCode's built-in glob with 60s timeout
- Kill process on expiration to prevent indefinite hanging
- Reuse grep's CLI resolver for ripgrep detection

Generated by [OpenCode](https://opencode.ai/)
This commit is contained in:
YeonGyu-Kim
2025-12-08 14:04:37 +09:00
parent b77dd2fcdf
commit ed3d7a55f4
9 changed files with 241 additions and 0 deletions

View File

@@ -187,6 +187,12 @@ The features you use in your editor—other agents cannot access them. Oh My Ope
- The default `grep` lacks safeguards. On a large codebase, a broad pattern can cause CPU overload and indefinite hanging.
- This tool enforces strict limits and completely replaces the built-in `grep`.
#### Glob
- **glob**: File pattern matching with timeout protection (60s). Overrides OpenCode's built-in `glob` tool.
- The default `glob` lacks timeout. If ripgrep hangs, it waits indefinitely.
- This tool enforces timeouts and kills the process on expiration.
#### Built-in MCPs
- **websearch_exa**: Exa AI web search. Performs real-time web searches and can scrape content from specific URLs. Returns LLM-optimized context from relevant websites.