@ynhcj/xiaoyi-channel 0.0.37-next → 0.0.38-next

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.
@@ -202,8 +202,8 @@ export async function monitorXYProvider(opts = {}) {
202
202
  wsManager.on("disconnected", disconnectedHandler);
203
203
  wsManager.on("error", errorHandler);
204
204
  wsManager.on("trigger-event", triggerEventHandler);
205
- // Start periodic health check (every 6 hours)
206
- console.log("🏥 Starting periodic health check (every 6 hours)...");
205
+ // Start periodic health check (every 3 minutes)
206
+ console.log("🏥 Starting periodic health check (every 3 minutes)...");
207
207
  healthCheckInterval = setInterval(() => {
208
208
  console.log("🏥 [HEALTH CHECK] Periodic WebSocket diagnostics...");
209
209
  diagnoseAllManagers();
@@ -214,7 +214,7 @@ export async function monitorXYProvider(opts = {}) {
214
214
  }
215
215
  // Cleanup stale temp files (older than 24 hours)
216
216
  void cleanupStaleTempFiles();
217
- }, 6 * 60 * 60 * 1000); // 6 hours
217
+ }, 3 * 60 * 1000); // 3 minutes
218
218
  // Connect to WebSocket servers
219
219
  wsManager.connect()
220
220
  .then(() => {
@@ -9,7 +9,7 @@ export interface CreateXYReplyDispatcherParams {
9
9
  isSteerFollower?: boolean;
10
10
  }
11
11
  /**
12
- * 清理 /tmp/xy_channel 目录中超过 24 小时的旧文件
12
+ * 清理 /tmp/xy_channel 目录中超过 1 分钟的旧文件
13
13
  */
14
14
  export declare function cleanupStaleTempFiles(tempDir?: string): Promise<void>;
15
15
  /**
@@ -4,9 +4,9 @@ import { resolveXYConfig } from "./config.js";
4
4
  import { getCurrentTaskId, getCurrentMessageId } from "./task-manager.js";
5
5
  import fs from "fs/promises";
6
6
  import path from "path";
7
- const TEMP_FILE_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours
7
+ const TEMP_FILE_TTL_MS = 60 * 1000; // 1 minute
8
8
  /**
9
- * 清理 /tmp/xy_channel 目录中超过 24 小时的旧文件
9
+ * 清理 /tmp/xy_channel 目录中超过 1 分钟的旧文件
10
10
  */
11
11
  export async function cleanupStaleTempFiles(tempDir = "/tmp/xy_channel") {
12
12
  try {
@@ -31,7 +31,7 @@ export async function cleanupStaleTempFiles(tempDir = "/tmp/xy_channel") {
31
31
  }
32
32
  }
33
33
  if (cleanedCount > 0) {
34
- console.log(`[CLEANUP] 🧹 Cleaned ${cleanedCount} stale files (>${TEMP_FILE_TTL_MS / 1000 / 3600}h) from ${tempDir}`);
34
+ console.log(`[CLEANUP] 🧹 Cleaned ${cleanedCount} stale files (>${TEMP_FILE_TTL_MS / 1000}s) from ${tempDir}`);
35
35
  }
36
36
  }
37
37
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.37-next",
3
+ "version": "0.0.38-next",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",