@bangdao-ai/acw-tools 1.4.8 → 1.4.9

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/index.js CHANGED
@@ -459,23 +459,24 @@ function rotateLogFile() {
459
459
  function log(level, message, data = null) {
460
460
  const timestamp = formatTimestamp();
461
461
  const levelStr = level.padEnd(5, ' ');
462
+ const pid = process.pid;
462
463
 
463
- // 简洁的日志格式
464
- let logLine = `${timestamp} ${levelStr} ${message}`;
464
+ // 单行日志格式:时间戳 [PID] 级别 消息 {数据}
465
+ let logLine = `${timestamp} [${pid}] ${levelStr} ${message}`;
465
466
 
466
- // 如果有附加数据,格式化输出
467
+ // 如果有附加数据,紧凑格式追加到同一行
467
468
  if (data) {
468
469
  if (typeof data === 'object' && !Array.isArray(data)) {
469
- // 对象数据:每个字段一行,缩进对齐
470
+ // 对象数据:紧凑的 key=value 格式
470
471
  const dataStr = Object.entries(data)
471
472
  .map(([key, value]) => {
472
473
  const valueStr = typeof value === 'object' ? JSON.stringify(value) : String(value);
473
- return ` ${key}: ${valueStr}`;
474
+ return `${key}=${valueStr}`;
474
475
  })
475
- .join('\n');
476
- logLine += '\n' + dataStr;
476
+ .join(', ');
477
+ logLine += ` | ${dataStr}`;
477
478
  } else {
478
- logLine += ` ${JSON.stringify(data)}`;
479
+ logLine += ` | ${JSON.stringify(data)}`;
479
480
  }
480
481
  }
481
482
 
@@ -1483,7 +1484,7 @@ async function grabAndUploadConversations() {
1483
1484
  processedCount: currentIndex - 1,
1484
1485
  totalCount
1485
1486
  });
1486
- handleLockLost();
1487
+ demoteToSlaveInstance();
1487
1488
 
1488
1489
  // 保存当前状态后退出循环
1489
1490
  saveChatGrabState(state);
package/manifest.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ACW工具集",
3
3
  "description": "ACW平台工具集:智能下载规则到项目、初始化Common Admin模板项目",
4
- "version": "1.4.8",
4
+ "version": "1.4.9",
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.4.8",
3
+ "version": "1.4.9",
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",