@raolin2025/claude-code-node 1.1.0 → 2.0.0

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.
package/src/tools/glob.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Glob 工具 — 文件模式搜索
3
3
  * 对应原版: src/tools/GlobTool/
4
4
  */
5
- import { readdir, stat } from 'fs/promises'
5
+ import { readdir } from 'fs/promises'
6
6
  import { resolve, join, isAbsolute } from 'path'
7
7
  import { ToolDef } from '../types/index.js'
8
8
 
@@ -1,3 +1,4 @@
1
+ import { randomUUID } from 'crypto'
1
2
  // ====== 消息类型 ======
2
3
 
3
4
  /** 消息角色 */
@@ -18,7 +19,7 @@ export class Message {
18
19
  this.role = role
19
20
  this.content = content
20
21
  this.timestamp = Date.now()
21
- this.id = crypto.randomUUID()
22
+ this.id = randomUUID()
22
23
  }
23
24
  }
24
25
 
@@ -2,9 +2,8 @@
2
2
  * 文件操作工具
3
3
  * 对应原版: src/utils/file.ts + src/utils/fsOperations.ts
4
4
  */
5
- import { readFile, writeFile, stat, mkdir, rm, rename, copyFile } from 'fs/promises'
6
- import { resolve, dirname, basename, isAbsolute } from 'path'
7
- import { existsSync } from 'fs'
5
+ import { readFile, writeFile, stat, mkdir, rm } from 'fs/promises'
6
+ import { resolve, dirname, isAbsolute } from 'path'
8
7
 
9
8
  /**
10
9
  * 安全读取文件(带大小限制)