hex_ai_tools library
Hex AI Tools — tool definitions and execution for the agent system.
Classes
- AgentTool
- A tool that can be used by the agent.
- AppendMutation
- BashGuard
- Bash 命令沙箱守卫 — 轻量启发式逃逸检测。
- BashTool
-
Bash execution tool — mirrors hex-ai
bash.ts. - DeleteMutation
- EditTool
-
File editing tool — mirrors hex-ai
edit.tsandedit-diff.ts. - FileMutation
- A file mutation operation.
- FileMutationQueue
-
File mutation queue — mirrors hex-ai
file-mutation-queue.ts. - FindTool
-
File finding tool — mirrors hex-ai
find.ts. - Glob
- Simple glob pattern matcher.
- GrepTool
-
Grep/search tool — mirrors hex-ai
grep.ts. - LsTool
-
Directory listing tool — mirrors hex-ai
ls.ts. - PathValidator
- 路径沙箱验证器 — 确保文件操作限制在工作目录内。
- ReadTool
-
File reading tool — mirrors hex-ai
read.ts. - ToolExecutionGuard
- 统一工具执行守卫 — "路径沙箱 → 权限确认 → 执行"。
- ToolRegistry
- Registry for tools — mirrors hex-ai ToolRegistry.
- ToolResult
- Result of a tool execution.
- WriteMutation
- WriteTool
-
File writing tool — mirrors hex-ai
write.ts.
Enums
- ToolCategory
- 工具类别,用于权限判断。
- ToolExecMode
- Tool execution mode.
- ToolPermissionLevel
- 权限级别,控制哪些工具需要用户确认。
Extensions
- ToolPermissionPolicy on ToolPermissionLevel
- 权限策略:根据工具类别判断当前权限级别下是否需要用户确认。