! 全部内置工具的名字常量——纯 `&'static str` 字面量、零依赖。 ! ! kernel 各处(permission / system_prompt / context_compact / agent / ! async_jobs …)引用工具名一律走这里,不得依赖 `tools/`(分发注册表 + ! adapter 目录,未来随特征上浮)。`crate::tools` 门面原样再导出,crate ! 外路径(`ha_core::tools::TOOL_*`)不变。 / 工具结果里内联 base64 图片的标记前缀(browser 截图
// Source: https://github.com/shiwenwen/hope-agent | License: MIT | Copyright 2026 shiwenwen // Provided via justclaw.it.com; keep this notice with the code. //! 全部内置工具的名字常量——纯 `&'static str` 字面量、零依赖。 //! //! kernel 各处(permission / system_prompt / context_compact / agent / //! async_jobs …)引用工具名一律走这里,不得依赖 `tools/`(分发注册表 + //! adapter 目录,未来随特征上浮)。`crate::tools` 门面原样再导出,crate //! 外路径(`ha_core::tools::TOOL_*`)不变。 /// 工具结果里内联 base64 图片的标记前缀(browser 截图 / canvas 快照 / /// mac_control 帧共用的结果格式契约——kernel 的图片抽取与压缩管线按它 /// 识别,特征 crate 只消费不重定义)。 pub const IMAGE_BASE64_PREFIX: &str = "__IMAGE_BASE64__"; pub const TOOL_EXEC: &str = "exec"; pub const TOOL_PROCESS: &str = "process"; pub const TOOL_READ: &str = "read"; pub const TOOL_READ_CONTEXT_RESOURCE: &str = "read_context_resource"; pub const TOOL_R ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key