@saber2pr/ai-agent 0.0.49 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -153,10 +153,7 @@ const getFilesystemTools = (targetDir) => {
153
153
  });
154
154
  const createDirectoryTool = (0, createTool_1.createTool)({
155
155
  name: 'create_directory',
156
- description: 'Create a new directory or ensure a directory exists. Can create multiple ' +
157
- 'nested directories in one operation. If the directory already exists, ' +
158
- 'this operation will succeed silently. Perfect for setting up directory ' +
159
- 'structures for projects or ensuring required paths exist. Only works within allowed directories.',
156
+ description: '递归创建目录。支持多级嵌套。若目录已存在则静默成功。仅限允许目录。',
160
157
  parameters: CreateDirectoryArgsSchema,
161
158
  handler: async (args) => {
162
159
  const validPath = await (0, lib_1.validatePath)(targetDir, args.path);
@@ -167,10 +164,7 @@ const getFilesystemTools = (targetDir) => {
167
164
  });
168
165
  const listDirectoryWithSizesTool = (0, createTool_1.createTool)({
169
166
  name: 'list_directory',
170
- description: 'Get a detailed listing of all files and directories in a specified path, including sizes. ' +
171
- 'Results clearly distinguish between files and directories with [FILE] and [DIR] ' +
172
- 'prefixes. This tool is useful for understanding directory structure and ' +
173
- 'finding specific files within a directory. Only works within allowed directories.',
167
+ description: '列出目录内容。返回带 [FILE]/[DIR] 前缀的条目、大小及汇总。支持按名称或大小排序。',
174
168
  parameters: ListDirectoryWithSizesArgsSchema,
175
169
  handler: async (args) => {
176
170
  const validPath = await (0, lib_1.validatePath)(targetDir, args.path);
@@ -257,10 +251,7 @@ const getFilesystemTools = (targetDir) => {
257
251
  });
258
252
  const moveFileTool = (0, createTool_1.createTool)({
259
253
  name: 'move_file',
260
- description: 'Move or rename files and directories. Can move files between directories ' +
261
- 'and rename them in a single operation. If the destination exists, the ' +
262
- 'operation will fail. Works across different directories and can be used ' +
263
- 'for simple renaming within the same directory. Both source and destination must be within allowed directories.',
254
+ description: '移动或重命名文件/目录。目标路径若已存在则失败。源与目标均须在允许目录内。',
264
255
  parameters: MoveFileArgsSchema,
265
256
  handler: async (args) => {
266
257
  const validSourcePath = await (0, lib_1.validatePath)(targetDir, args.source);
@@ -272,9 +263,7 @@ const getFilesystemTools = (targetDir) => {
272
263
  });
273
264
  const searchFilesTool = (0, createTool_1.createTool)({
274
265
  name: 'search_files',
275
- description: 'Search for files matching a specific pattern in a specified path. ' +
276
- 'Returns a list of files that match the pattern. Only works within allowed directories.' +
277
- 'Used only for filename search',
266
+ description: '在指定路径下搜索匹配模式的文件名。返回匹配的相对路径列表。',
278
267
  parameters: SearchFilesArgsSchema,
279
268
  handler: async (args) => {
280
269
  const combinedExcludes = [...DEFAULT_IGNORE, ...(args.excludePatterns || [])];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saber2pr/ai-agent",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "AI Assistant CLI.",
5
5
  "author": "saber2pr",
6
6
  "license": "ISC",