@ynhcj/xiaoyi-channel 1.1.11 → 1.1.13

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 3 minutes)
206
- console.log("🏥 Starting periodic health check (every 3 minutes)...");
205
+ // Start periodic health check (every 6 hours)
206
+ console.log("🏥 Starting periodic health check (every 6 hours)...");
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
- }, 3 * 60 * 1000); // 3 minutes
217
+ }, 6 * 60 * 60 * 1000); // 6 hours
218
218
  // Connect to WebSocket servers
219
219
  wsManager.connect()
220
220
  .then(() => {
@@ -5,6 +5,7 @@ import type { XYChannelConfig } from "./types.js";
5
5
  */
6
6
  export declare class XYPushService {
7
7
  private config;
8
+ private readonly DEFAULT_PUSH_URL;
8
9
  private readonly REQUEST_FROM;
9
10
  constructor(config: XYChannelConfig);
10
11
  /**
package/dist/src/push.js CHANGED
@@ -7,6 +7,7 @@ import { randomUUID } from "crypto";
7
7
  */
8
8
  export class XYPushService {
9
9
  config;
10
+ DEFAULT_PUSH_URL = "https://hag.cloud.huawei.com/open-ability-agent/v1/agent-webhook";
10
11
  REQUEST_FROM = "openclaw";
11
12
  constructor(config) {
12
13
  this.config = config;
@@ -28,7 +29,7 @@ export class XYPushService {
28
29
  * @param pushId - Push ID to use (required)
29
30
  */
30
31
  async sendPush(content, title, data, sessionId, pushDataId, pushId) {
31
- const pushUrl = `${this.config.fileUploadUrl}/open-ability-agent/v1/agent-webhook`;
32
+ const pushUrl = this.config.pushUrl || this.DEFAULT_PUSH_URL;
32
33
  const traceId = this.generateTraceId();
33
34
  // Use provided pushId or fall back to config pushId
34
35
  const actualPushId = pushId || this.config.pushId;
@@ -9,7 +9,7 @@ export interface CreateXYReplyDispatcherParams {
9
9
  isSteerFollower?: boolean;
10
10
  }
11
11
  /**
12
- * 清理 /tmp/xy_channel 目录中超过 1 分钟的旧文件
12
+ * 清理 /tmp/xy_channel 目录中超过 24 小时的旧文件
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 = 60 * 1000; // 1 minute
7
+ const TEMP_FILE_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours
8
8
  /**
9
- * 清理 /tmp/xy_channel 目录中超过 1 分钟的旧文件
9
+ * 清理 /tmp/xy_channel 目录中超过 24 小时的旧文件
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}s) from ${tempDir}`);
34
+ console.log(`[CLEANUP] 🧹 Cleaned ${cleanedCount} stale files (>${TEMP_FILE_TTL_MS / 1000 / 3600}h) 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": "1.1.11",
3
+ "version": "1.1.13",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",