@ynhcj/xiaoyi-channel 0.0.116-next → 0.0.117-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.
Files changed (30) hide show
  1. package/dist/src/tools/calendar-tool.js +2 -0
  2. package/dist/src/tools/call-phone-tool.js +2 -0
  3. package/dist/src/tools/create-alarm-tool.js +2 -0
  4. package/dist/src/tools/delete-alarm-tool.js +2 -0
  5. package/dist/src/tools/location-tool.js +2 -0
  6. package/dist/src/tools/modify-alarm-tool.js +2 -0
  7. package/dist/src/tools/modify-note-tool.js +2 -0
  8. package/dist/src/tools/note-tool.js +2 -0
  9. package/dist/src/tools/query-app-message-tool.js +2 -0
  10. package/dist/src/tools/query-memory-data-tool.js +2 -0
  11. package/dist/src/tools/query-todo-task-tool.js +2 -0
  12. package/dist/src/tools/save-file-to-phone-tool.js +2 -0
  13. package/dist/src/tools/save-media-to-gallery-tool.js +2 -0
  14. package/dist/src/tools/search-alarm-tool.js +2 -0
  15. package/dist/src/tools/search-calendar-tool.js +2 -0
  16. package/dist/src/tools/search-contact-tool.js +2 -0
  17. package/dist/src/tools/search-email-tool.js +2 -0
  18. package/dist/src/tools/search-file-tool.js +2 -0
  19. package/dist/src/tools/search-message-tool.js +2 -0
  20. package/dist/src/tools/search-note-tool.js +2 -0
  21. package/dist/src/tools/search-photo-gallery-tool.js +2 -0
  22. package/dist/src/tools/send-email-tool.js +2 -0
  23. package/dist/src/tools/send-message-tool.js +2 -0
  24. package/dist/src/tools/upload-file-tool.js +2 -0
  25. package/dist/src/tools/upload-photo-tool.js +2 -0
  26. package/dist/src/tools/xiaoyi-add-collection-tool.js +2 -0
  27. package/dist/src/tools/xiaoyi-collection-tool.js +2 -0
  28. package/dist/src/tools/xiaoyi-delete-collection-tool.js +2 -0
  29. package/dist/src/tools/xiaoyi-gui-tool.js +2 -0
  30. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY calendar event tool - creates a calendar event on user's device.
6
7
  * Requires title, dtStart (start time), and dtEnd (end time) parameters.
@@ -86,6 +87,7 @@ export function createCalendarTool(ctx) {
86
87
  return new Promise((resolve, reject) => {
87
88
  const timeout = setTimeout(() => {
88
89
  wsManager.off("data-event", handler);
90
+ logger.error("超时: 创建日程超时(60秒)", { sessionId, toolCallId });
89
91
  reject(new Error("创建日程超时(60秒)"));
90
92
  }, 60000);
91
93
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY call phone tool - makes a phone call on user's device.
6
7
  * Requires phoneNumber parameter and optional slotId (0 for primary SIM, 1 for secondary SIM).
@@ -78,6 +79,7 @@ export function createCallPhoneTool(ctx) {
78
79
  return new Promise((resolve, reject) => {
79
80
  const timeout = setTimeout(() => {
80
81
  wsManager.off("data-event", handler);
82
+ logger.error("超时: 拨打电话超时(60秒)", { sessionId, toolCallId });
81
83
  reject(new Error("拨打电话超时(60秒)"));
82
84
  }, 60000);
83
85
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  // Enum definitions for alarm parameters
5
6
  const ALARM_SNOOZE_DURATION_VALUES = [5, 10, 15, 20, 25, 30];
6
7
  const ALARM_SNOOZE_TOTAL_VALUES = [0, 1, 3, 5, 10];
@@ -223,6 +224,7 @@ b. 使用该工具之前需获取当前真实时间
223
224
  return new Promise((resolve, reject) => {
224
225
  const timeout = setTimeout(() => {
225
226
  wsManager.off("data-event", handler);
227
+ logger.error("超时: 创建闹钟超时(60秒)", { sessionId, toolCallId });
226
228
  reject(new Error("创建闹钟超时(60秒)"));
227
229
  }, 60000);
228
230
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY delete alarm tool - deletes existing alarms on user's device.
6
7
  * Requires entityId(s) from search_alarm or create_alarm tool as prerequisite.
@@ -122,6 +123,7 @@ export function createDeleteAlarmTool(ctx) {
122
123
  return new Promise((resolve, reject) => {
123
124
  const timeout = setTimeout(() => {
124
125
  wsManager.off("data-event", handler);
126
+ logger.error("超时: 删除闹钟超时(60秒)", { sessionId, toolCallId });
125
127
  reject(new Error("删除闹钟超时(60秒)"));
126
128
  }, 60000);
127
129
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY location tool - gets user's current location.
6
7
  * Returns WGS84 coordinates (latitude, longitude).
@@ -54,6 +55,7 @@ export function createLocationTool(ctx) {
54
55
  return new Promise((resolve, reject) => {
55
56
  const timeout = setTimeout(() => {
56
57
  wsManager.off("data-event", handler);
58
+ logger.error("超时: 获取位置超时(60秒)", { sessionId, toolCallId });
57
59
  reject(new Error("获取位置超时(60秒)"));
58
60
  }, 60000);
59
61
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  // Enum definitions for alarm parameters (same as create-alarm-tool)
5
6
  const ALARM_SNOOZE_DURATION_VALUES = [5, 10, 15, 20, 25, 30];
6
7
  const ALARM_SNOOZE_TOTAL_VALUES = [0, 1, 3, 5, 10];
@@ -235,6 +236,7 @@ export function createModifyAlarmTool(ctx) {
235
236
  return new Promise((resolve, reject) => {
236
237
  const timeout = setTimeout(() => {
237
238
  wsManager.off("data-event", handler);
239
+ logger.error("超时: 修改闹钟超时(60秒)", { sessionId, toolCallId });
238
240
  reject(new Error("修改闹钟超时(60秒)"));
239
241
  }, 60000);
240
242
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY modify note tool - appends content to an existing note on user's device.
6
7
  * Requires entityId from search_notes tool as prerequisite.
@@ -76,6 +77,7 @@ export function createModifyNoteTool(ctx) {
76
77
  return new Promise((resolve, reject) => {
77
78
  const timeout = setTimeout(() => {
78
79
  wsManager.off("data-event", handler);
80
+ logger.error("超时: 修改备忘录超时(60秒)", { sessionId, toolCallId });
79
81
  reject(new Error("修改备忘录超时(60秒)"));
80
82
  }, 60000);
81
83
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * Duck-typed ToolInputError: openclaw 按 .name 字段匹配,不用 instanceof。
6
7
  * 抛出此错误会让 openclaw 返回 HTTP 400 而非 500,
@@ -93,6 +94,7 @@ export function createNoteTool(ctx) {
93
94
  return new Promise((resolve, reject) => {
94
95
  const timeout = setTimeout(() => {
95
96
  wsManager.off("data-event", handler);
97
+ logger.error("超时: 创建备忘录超时(60秒)", { sessionId, toolCallId });
96
98
  reject(new Error("创建备忘录超时(60秒)"));
97
99
  }, 60000);
98
100
  // Listen for data events from WebSocket
@@ -2,6 +2,7 @@
2
2
  import { getXYWebSocketManager } from "../client.js";
3
3
  import { sendCommand } from "../formatter.js";
4
4
  import { getCurrentTaskId } from "../task-manager.js";
5
+ import { logger } from "../utils/logger.js";
5
6
  class ToolInputError extends Error {
6
7
  status = 400;
7
8
  constructor(message) {
@@ -95,6 +96,7 @@ c. 调用工具前需认真检查调用参数是否满足工具要求
95
96
  return new Promise((resolve, reject) => {
96
97
  const timeout = setTimeout(() => {
97
98
  wsManager.off("data-event", handler);
99
+ logger.error("超时: 查询通知消息超时(60秒)", { sessionId, toolCallId: _toolCallId });
98
100
  reject(new Error("查询通知消息超时(60秒)"));
99
101
  }, 60000);
100
102
  const handler = (event) => {
@@ -2,6 +2,7 @@
2
2
  import { getXYWebSocketManager } from "../client.js";
3
3
  import { sendCommand } from "../formatter.js";
4
4
  import { getCurrentTaskId } from "../task-manager.js";
5
+ import { logger } from "../utils/logger.js";
5
6
  class ToolInputError extends Error {
6
7
  status = 400;
7
8
  constructor(message) {
@@ -111,6 +112,7 @@ c. 调用工具前需认真检查调用参数是否满足工具要求
111
112
  return new Promise((resolve, reject) => {
112
113
  const timeout = setTimeout(() => {
113
114
  wsManager.off("data-event", handler);
115
+ logger.error("超时: 查询记忆数据超时(60秒)", { sessionId, toolCallId: _toolCallId });
114
116
  reject(new Error("查询记忆数据超时(60秒)"));
115
117
  }, 60000);
116
118
  const handler = (event) => {
@@ -2,6 +2,7 @@
2
2
  import { getXYWebSocketManager } from "../client.js";
3
3
  import { sendCommand } from "../formatter.js";
4
4
  import { getCurrentTaskId } from "../task-manager.js";
5
+ import { logger } from "../utils/logger.js";
5
6
  class ToolInputError extends Error {
6
7
  status = 400;
7
8
  constructor(message) {
@@ -90,6 +91,7 @@ d. 当只传入 startTime 时,返回该时间点之后的所有任务;当只
90
91
  return new Promise((resolve, reject) => {
91
92
  const timeout = setTimeout(() => {
92
93
  wsManager.off("data-event", handler);
94
+ logger.error("超时: 查询待办任务超时(60秒)", { sessionId, toolCallId: _toolCallId });
93
95
  reject(new Error("查询待办任务超时(60秒)"));
94
96
  }, 60000);
95
97
  const handler = (event) => {
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  import { XYFileUploadService } from "../file-upload.js";
5
6
  /**
6
7
  * Duck-typed ToolInputError: openclaw 按 .name 字段匹配,不用 instanceof。
@@ -118,6 +119,7 @@ export function createSaveFileToPhoneTool(ctx) {
118
119
  return new Promise((resolve, reject) => {
119
120
  const timeout = setTimeout(() => {
120
121
  wsManager.off("data-event", handler);
122
+ logger.error("超时: 保存文件到手机超时(60秒)", { sessionId, toolCallId });
121
123
  reject(new Error("保存文件到手机超时(60秒)"));
122
124
  }, 60000);
123
125
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  import { XYFileUploadService } from "../file-upload.js";
5
6
  /**
6
7
  * Duck-typed ToolInputError: openclaw 按 .name 字段匹配,不用 instanceof。
@@ -126,6 +127,7 @@ export function createSaveMediaToGalleryTool(ctx) {
126
127
  return new Promise((resolve, reject) => {
127
128
  const timeout = setTimeout(() => {
128
129
  wsManager.off("data-event", handler);
130
+ logger.error("超时: 保存媒体到图库超时(60秒)", { sessionId, toolCallId });
129
131
  reject(new Error("保存媒体到图库超时(60秒)"));
130
132
  }, 60000);
131
133
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  // Enum definitions for alarm search parameters
5
6
  const RANGE_TYPE_VALUES = ["all", "next", "current"];
6
7
  const ALARM_STATE_VALUES = [0, 1];
@@ -167,6 +168,7 @@ b. 使用该工具之前需获取当前真实时间
167
168
  return new Promise((resolve, reject) => {
168
169
  const timeout = setTimeout(() => {
169
170
  wsManager.off("data-event", handler);
171
+ logger.error("超时: 检索闹钟超时(60秒)", { sessionId, toolCallId });
170
172
  reject(new Error("检索闹钟超时(60秒)"));
171
173
  }, 60000);
172
174
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY search calendar event tool - searches calendar events on user's device.
6
7
  * Returns matching events based on time range and optional title filter.
@@ -138,6 +139,7 @@ d. 如果查询结果返回-303,代表查询结果为空
138
139
  return new Promise((resolve, reject) => {
139
140
  const timeout = setTimeout(() => {
140
141
  wsManager.off("data-event", handler);
142
+ logger.error("超时: 检索日程超时(60秒)", { sessionId, toolCallId });
141
143
  reject(new Error("检索日程超时(60秒)"));
142
144
  }, 60000);
143
145
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY search contact tool - searches contacts on user's device.
6
7
  * Returns matching contact information based on name.
@@ -66,6 +67,7 @@ export function createSearchContactTool(ctx) {
66
67
  return new Promise((resolve, reject) => {
67
68
  const timeout = setTimeout(() => {
68
69
  wsManager.off("data-event", handler);
70
+ logger.error("超时: 搜索联系人超时(60秒)", { sessionId, toolCallId });
69
71
  reject(new Error("搜索联系人超时(60秒)"));
70
72
  }, 60000);
71
73
  // Listen for data events from WebSocket
@@ -2,6 +2,7 @@
2
2
  import { getXYWebSocketManager } from "../client.js";
3
3
  import { sendCommand } from "../formatter.js";
4
4
  import { getCurrentTaskId } from "../task-manager.js";
5
+ import { logger } from "../utils/logger.js";
5
6
  /**
6
7
  * XY search email tool - searches emails on user's device (花瓣邮箱).
7
8
  * Returns matching emails based on query text and search type.
@@ -90,6 +91,7 @@ b. 使用该工具之前需获取当前真实时间
90
91
  return new Promise((resolve, reject) => {
91
92
  const timeout = setTimeout(() => {
92
93
  wsManager.off("data-event", handler);
94
+ logger.error("超时: 检索邮件超时(60秒)", { sessionId, toolCallId: _toolCallId });
93
95
  reject(new Error("检索邮件超时(60秒)"));
94
96
  }, 60000);
95
97
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY search file tool - searches files on user's device file system.
6
7
  * Returns matching files based on keyword search in file name or content.
@@ -78,6 +79,7 @@ export function createSearchFileTool(ctx) {
78
79
  return new Promise((resolve, reject) => {
79
80
  const timeout = setTimeout(() => {
80
81
  wsManager.off("data-event", handler);
82
+ logger.error("超时: 搜索文件超时(60秒)", { sessionId, toolCallId });
81
83
  reject(new Error("搜索文件超时(60秒)"));
82
84
  }, 60000);
83
85
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY search message tool - searches SMS messages on user's device.
6
7
  * Returns matching messages based on content keyword search.
@@ -67,6 +68,7 @@ export function createSearchMessageTool(ctx) {
67
68
  return new Promise((resolve, reject) => {
68
69
  const timeout = setTimeout(() => {
69
70
  wsManager.off("data-event", handler);
71
+ logger.error("超时: 搜索短信超时(60秒)", { sessionId, toolCallId });
70
72
  reject(new Error("搜索短信超时(60秒)"));
71
73
  }, 60000);
72
74
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY search note tool - searches notes on user's device.
6
7
  * Returns matching notes based on query string.
@@ -65,6 +66,7 @@ export function createSearchNoteTool(ctx) {
65
66
  return new Promise((resolve, reject) => {
66
67
  const timeout = setTimeout(() => {
67
68
  wsManager.off("data-event", handler);
69
+ logger.error("超时: 搜索备忘录超时(60秒)", { sessionId, toolCallId });
68
70
  reject(new Error("搜索备忘录超时(60秒)"));
69
71
  }, 60000);
70
72
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY search photo gallery tool - searches photos in user's gallery.
6
7
  * Returns local mediaUri strings that can be used with upload_photo tool.
@@ -127,6 +128,7 @@ async function searchPhotos(wsManager, config, sessionId, taskId, messageId, que
127
128
  return new Promise((resolve, reject) => {
128
129
  const timeout = setTimeout(() => {
129
130
  wsManager.off("data-event", handler);
131
+ logger.error("超时: 搜索照片超时(60秒)", { sessionId });
130
132
  reject(new Error("搜索照片超时(60秒)"));
131
133
  }, 60000);
132
134
  const handler = (event) => {
@@ -2,6 +2,7 @@
2
2
  import { getXYWebSocketManager } from "../client.js";
3
3
  import { sendCommand } from "../formatter.js";
4
4
  import { getCurrentTaskId } from "../task-manager.js";
5
+ import { logger } from "../utils/logger.js";
5
6
  class ToolInputError extends Error {
6
7
  status = 400;
7
8
  constructor(message) {
@@ -91,6 +92,7 @@ c. 调用工具前需认真检查调用参数是否满足工具要求
91
92
  return new Promise((resolve, reject) => {
92
93
  const timeout = setTimeout(() => {
93
94
  wsManager.off("data-event", handler);
95
+ logger.error("超时: 发送邮件超时(60秒)", { sessionId, toolCallId: _toolCallId });
94
96
  reject(new Error("发送邮件超时(60秒)"));
95
97
  }, 60000);
96
98
  const handler = (event) => {
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY send message tool - sends SMS message on user's device.
6
7
  * Requires phoneNumber (with +86 prefix) and content parameters.
@@ -88,6 +89,7 @@ export function createSendMessageTool(ctx) {
88
89
  return new Promise((resolve, reject) => {
89
90
  const timeout = setTimeout(() => {
90
91
  wsManager.off("data-event", handler);
92
+ logger.error("超时: 发送短信超时(60秒)", { sessionId, toolCallId });
91
93
  reject(new Error("发送短信超时(60秒)"));
92
94
  }, 60000);
93
95
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY upload file tool - uploads local files to get publicly accessible URLs.
6
7
  * Requires file URIs from search_file tool as prerequisite.
@@ -153,6 +154,7 @@ async function getFileUrls(wsManager, config, sessionId, taskId, messageId, file
153
154
  return new Promise((resolve, reject) => {
154
155
  const timeout = setTimeout(() => {
155
156
  wsManager.off("data-event", handler);
157
+ logger.error("超时: 获取文件URL超时(60秒)", { sessionId });
156
158
  reject(new Error("获取文件URL超时(60秒)"));
157
159
  }, 60000);
158
160
  const handler = (event) => {
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * XY upload photo tool - uploads local photos to get publicly accessible URLs.
6
7
  * Requires mediaUris from search_photo_gallery tool as prerequisite.
@@ -136,6 +137,7 @@ async function getPhotoUrls(wsManager, config, sessionId, taskId, messageId, med
136
137
  return new Promise((resolve, reject) => {
137
138
  const timeout = setTimeout(() => {
138
139
  wsManager.off("data-event", handler);
140
+ logger.error("超时: 获取照片URL超时(60秒)", { sessionId });
139
141
  reject(new Error("获取照片URL超时(60秒)"));
140
142
  }, 60000);
141
143
  const handler = (event) => {
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  import { XYFileUploadService } from "../file-upload.js";
5
6
  /**
6
7
  * Duck-typed ToolInputError: openclaw 按 .name 字段匹配,不用 instanceof。
@@ -144,6 +145,7 @@ export function createXiaoyiAddCollectionTool(ctx) {
144
145
  return new Promise((resolve, reject) => {
145
146
  const timeout = setTimeout(() => {
146
147
  wsManager.off("data-event", handler);
148
+ logger.error("超时: 添加小艺收藏超时(60秒)", { sessionId, toolCallId });
147
149
  reject(new Error("添加小艺收藏超时(60秒)"));
148
150
  }, 60000);
149
151
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * Duck-typed ToolInputError: openclaw 按 .name 字段匹配,不用 instanceof。
6
7
  * 抛出此错误会让 openclaw 返回 HTTP 400 而非 500,
@@ -99,6 +100,7 @@ export function createXiaoyiCollectionTool(ctx) {
99
100
  return new Promise((resolve, reject) => {
100
101
  const timeout = setTimeout(() => {
101
102
  wsManager.off("data-event", handler);
103
+ logger.error("超时: 查询小艺收藏超时(60秒)", { sessionId, toolCallId });
102
104
  reject(new Error("查询小艺收藏超时(60秒)"));
103
105
  }, 60000);
104
106
  // Listen for data events from WebSocket
@@ -1,6 +1,7 @@
1
1
  import { getXYWebSocketManager } from "../client.js";
2
2
  import { sendCommand } from "../formatter.js";
3
3
  import { getCurrentTaskId } from "../task-manager.js";
4
+ import { logger } from "../utils/logger.js";
4
5
  /**
5
6
  * Duck-typed ToolInputError: openclaw 按 .name 字段匹配,不用 instanceof。
6
7
  * 抛出此错误会让 openclaw 返回 HTTP 400 而非 500,
@@ -115,6 +116,7 @@ export function createXiaoyiDeleteCollectionTool(ctx) {
115
116
  return new Promise((resolve, reject) => {
116
117
  const timeout = setTimeout(() => {
117
118
  wsManager.off("data-event", handler);
119
+ logger.error("超时: 删除小艺收藏超时(60秒)", { sessionId, toolCallId });
118
120
  reject(new Error("删除小艺收藏超时(60秒)"));
119
121
  }, 60000);
120
122
  // Listen for data events from WebSocket
@@ -2,6 +2,7 @@
2
2
  import { getXYWebSocketManager } from "../client.js";
3
3
  import { sendCommand } from "../formatter.js";
4
4
  import { getCurrentTaskId } from "../task-manager.js";
5
+ import { logger } from "../utils/logger.js";
5
6
  /**
6
7
  * XiaoYi GUI tool - executes phone app interactions through GUI agent.
7
8
  * Simulates user interactions on phone screen (click, swipe, input, navigation, etc.)
@@ -63,6 +64,7 @@ export function createXiaoyiGuiTool(ctx) {
63
64
  return new Promise((resolve, reject) => {
64
65
  const timeout = setTimeout(() => {
65
66
  wsManager.off("gui-agent-response", handler);
67
+ logger.error("超时: XiaoYi GUI Agent 操作超时(5分钟)", { sessionId, toolCallId });
66
68
  reject(new Error("XiaoYi GUI Agent 操作超时(5分钟)"));
67
69
  }, 180000); // 5 minutes timeout
68
70
  // Listen for GUI agent response events
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.116-next",
3
+ "version": "0.0.117-next",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",