feat: 添加 Git 工具集和重组描述文件目录结构

Git 工具集:
- 新增 10 个 Git 工具: status, diff, log, branch, add, commit, push, pull, checkout, stash
- 新增 GitPermissionChecker 权限检查器
- 读操作默认允许,写操作需要用户确认

目录结构优化:
- 重组 descriptions 目录,按工具类别分子目录 (shell, filesystem, web, git, todo)
- 更新 load_description.ts 支持子目录加载
- 更新 build 脚本支持递归复制描述文件
This commit is contained in:
2025-12-11 10:30:40 +08:00
parent 43cfe483fb
commit dddec9b6d5
44 changed files with 1862 additions and 2 deletions
+26
View File
@@ -26,6 +26,20 @@ import {
// Web 工具
import { webSearchTool, webExtractTool } from './web/index.js';
// Git 工具
import {
gitStatusTool,
gitDiffTool,
gitLogTool,
gitBranchTool,
gitAddTool,
gitCommitTool,
gitPushTool,
gitPullTool,
gitCheckoutTool,
gitStashTool,
} from './git/index.js';
// 所有工具列表(用于注册)
const allToolsWithMetadata: ToolWithMetadata[] = [
// 核心工具 (deferLoading: false)
@@ -50,6 +64,18 @@ const allToolsWithMetadata: ToolWithMetadata[] = [
// Web 工具 (deferLoading: false)
webSearchTool,
webExtractTool,
// Git 工具 (deferLoading: false)
gitStatusTool,
gitDiffTool,
gitLogTool,
gitBranchTool,
gitAddTool,
gitCommitTool,
gitPushTool,
gitPullTool,
gitCheckoutTool,
gitStashTool,
];
// 注册所有工具到 registry