Expand description
§zapmyco-tools
可复用的 AgentTool 实现集,配合 [zapmyco-core] 组装完整 agent。
全局 dead_code 抑制:与主 crate 迁移前一致(部分 Options 字段为预留用途暂未启用)。
从 zapmyco 主 crate 的 src/tools/ 提取,保持零主 crate 依赖,可被任意
Rust 项目直接引入。当前包含:
- 文件类:
file_read/file_write/file_edit/file_find/file_search - Web 类:
web_fetch - 任务系统:
task_manager及task_create/task_get/task_list/task_update/task_display - 审批基础设施:
confirm(ConfirmBackend/AskBackend)
Re-exports§
pub use backend::AllowlistPersister;pub use backend::OutputEmitter;pub use backend::OutputLevel;pub use backend::SessionLogger;pub use backend::SkillResolver;pub use backend::ToolsContext;pub use backend::UserPrompt;pub use confirm::AskBackend;pub use confirm::AskUserResponse;pub use confirm::ConfirmBackend;pub use confirm::PendingApprovals;pub use confirm::PendingAsks;pub use confirm::ShellConfirmDecision;pub use types::PermissionMode;
Modules§
- ask_
user - backend
- 注入 trait 与聚合上下文 — 将工具对环境(终端输出、交互提示、会话日志、
配置持久化、skill 解析)的依赖抽象为可注入后端,使
zapmyco-tools保持 环境无关,由宿主(主 crate / 外部项目)实现并注入。 - confirm
- Web 模式确认机制 — 将 shell_exec 的审批和 ask_user 的提问从 终端交互改为通过 channel 等待 HTTP 请求注入结果。
- file_
edit - file_
find - file_
read - file_
search - file_
write - shell_
exec - skill
- subagent
- task_
create - task_
display - task_
get - task_
list - task_
manager - task_
update - types
- 公共数据类型 — 与主 crate
tui/types.rs、skills/types.rs字段对齐。 - web_
fetch - web_
search
Enums§
- Grep
Error - 搜索错误