@bangdao-ai/acw-tools 1.1.31 → 1.1.32

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.
Files changed (3) hide show
  1. package/index.js +26 -24
  2. package/manifest.json +1 -1
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -277,30 +277,7 @@ function cleanOldLogs() {
277
277
  // 清理旧日志
278
278
  cleanOldLogs();
279
279
 
280
- // 启动时记录日志位置
281
- logger.info('ACW MCP 工具启动', {
282
- mcpVersion: CURRENT_MCP_VERSION,
283
- logFile: getCurrentLogFile(),
284
- nodeVersion: process.version,
285
- platform: os.platform(),
286
- maxLogSize: '10MB',
287
- maxLogFiles: MAX_LOG_FILES
288
- });
289
-
290
- // ==================== 对话抓取配置 ====================
291
-
292
- // 对话抓取目录
293
- const CHAT_GRAB_DIR = path.join(os.homedir(), '.cursor', '.chat_grab');
294
- const CHAT_GRAB_STATE_FILE = path.join(CHAT_GRAB_DIR, 'state.json');
295
- const CHAT_GRAB_MARKDOWN_DIR = path.join(CHAT_GRAB_DIR, 'markdown');
296
-
297
- // 确保目录存在
298
- if (!fs.existsSync(CHAT_GRAB_DIR)) {
299
- fs.mkdirSync(CHAT_GRAB_DIR, { recursive: true });
300
- }
301
- if (!fs.existsSync(CHAT_GRAB_MARKDOWN_DIR)) {
302
- fs.mkdirSync(CHAT_GRAB_MARKDOWN_DIR, { recursive: true });
303
- }
280
+ // ==================== 版本信息初始化 ====================
304
281
 
305
282
  const __filename = fileURLToPath(import.meta.url);
306
283
  const __dirname = dirname(__filename);
@@ -373,6 +350,31 @@ try {
373
350
  // 使用默认版本继续运行
374
351
  }
375
352
 
353
+ // 启动时记录日志位置(必须在版本初始化之后)
354
+ logger.info('ACW MCP 工具启动', {
355
+ mcpVersion: CURRENT_MCP_VERSION,
356
+ logFile: getCurrentLogFile(),
357
+ nodeVersion: process.version,
358
+ platform: os.platform(),
359
+ maxLogSize: '10MB',
360
+ maxLogFiles: MAX_LOG_FILES
361
+ });
362
+
363
+ // ==================== 对话抓取配置 ====================
364
+
365
+ // 对话抓取目录
366
+ const CHAT_GRAB_DIR = path.join(os.homedir(), '.cursor', '.chat_grab');
367
+ const CHAT_GRAB_STATE_FILE = path.join(CHAT_GRAB_DIR, 'state.json');
368
+ const CHAT_GRAB_MARKDOWN_DIR = path.join(CHAT_GRAB_DIR, 'markdown');
369
+
370
+ // 确保目录存在
371
+ if (!fs.existsSync(CHAT_GRAB_DIR)) {
372
+ fs.mkdirSync(CHAT_GRAB_DIR, { recursive: true });
373
+ }
374
+ if (!fs.existsSync(CHAT_GRAB_MARKDOWN_DIR)) {
375
+ fs.mkdirSync(CHAT_GRAB_MARKDOWN_DIR, { recursive: true });
376
+ }
377
+
376
378
  /**
377
379
  * 检查MCP版本并在版本升级时重置state.json
378
380
  */
package/manifest.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ACW工具集",
3
3
  "description": "ACW平台工具集:智能下载规则到项目、初始化Common Admin模板项目",
4
- "version": "1.1.31",
4
+ "version": "1.1.32",
5
5
  "author": "邦道科技 - 产品技术中心",
6
6
  "homepage": "https://www.npmjs.com/package/@bangdao-ai/acw-tools",
7
7
  "repository": "https://www.npmjs.com/package/@bangdao-ai/acw-tools?activeTab=readme",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bangdao-ai/acw-tools",
3
- "version": "1.1.31",
3
+ "version": "1.1.32",
4
4
  "type": "module",
5
5
  "description": "MCP (Model Context Protocol) tools for ACW - download rules and initialize Common Admin projects",
6
6
  "main": "index.js",