@ynhcj/xiaoyi-channel 0.0.164-beta → 0.0.166-beta

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 (33) hide show
  1. package/dist/src/cron-query-handler.d.ts +1 -11
  2. package/dist/src/cron-query-handler.js +87 -0
  3. package/dist/src/formatter.d.ts +1 -0
  4. package/dist/src/formatter.js +8 -5
  5. package/dist/src/reply-dispatcher.js +37 -12
  6. package/dist/src/tools/calendar-tool.js +1 -1
  7. package/dist/src/tools/call-phone-tool.js +1 -1
  8. package/dist/src/tools/create-alarm-tool.js +1 -1
  9. package/dist/src/tools/create-all-tools.js +2 -2
  10. package/dist/src/tools/delete-alarm-tool.js +1 -1
  11. package/dist/src/tools/display-a2ui-card-tool.js +9 -6
  12. package/dist/src/tools/location-tool.js +1 -1
  13. package/dist/src/tools/modify-alarm-tool.js +1 -1
  14. package/dist/src/tools/modify-note-tool.js +1 -1
  15. package/dist/src/tools/note-tool.js +1 -1
  16. package/dist/src/tools/query-app-message-tool.js +1 -1
  17. package/dist/src/tools/query-memory-data-tool.js +1 -1
  18. package/dist/src/tools/query-todo-task-tool.js +1 -1
  19. package/dist/src/tools/save-file-to-phone-tool.js +1 -1
  20. package/dist/src/tools/save-media-to-gallery-tool.js +1 -1
  21. package/dist/src/tools/search-alarm-tool.js +1 -1
  22. package/dist/src/tools/search-calendar-tool.js +1 -1
  23. package/dist/src/tools/search-contact-tool.js +1 -1
  24. package/dist/src/tools/search-email-tool.js +1 -1
  25. package/dist/src/tools/search-note-tool.js +1 -1
  26. package/dist/src/tools/search-photo-gallery-tool.js +1 -1
  27. package/dist/src/tools/send-email-tool.js +1 -1
  28. package/dist/src/tools/upload-file-tool.js +1 -1
  29. package/dist/src/tools/upload-photo-tool.js +1 -1
  30. package/dist/src/tools/xiaoyi-add-collection-tool.js +1 -1
  31. package/dist/src/tools/xiaoyi-collection-tool.js +1 -1
  32. package/dist/src/tools/xiaoyi-delete-collection-tool.js +1 -1
  33. package/package.json +1 -1
@@ -1,17 +1,7 @@
1
- export type CronQueryAction = "list" | "status" | "runs" | "add" | "update" | "remove" | "run";
2
- export interface CronQueryEventContext {
3
- action: CronQueryAction;
4
- jobId?: string;
5
- params?: Record<string, unknown>;
6
- /** Original A2A message fields for routing the response. */
7
- sessionId?: string;
8
- taskId?: string;
9
- messageId?: string;
10
- }
11
1
  /**
12
2
  * Handle a cron-query-event.
13
3
  *
14
4
  * Calls the Gateway cron RPC and sends the result back through sendCommand
15
5
  * as a System.CronQuery command with the full result object in payload.ans.
16
6
  */
17
- export declare function handleCronQueryEvent(context: CronQueryEventContext, cfg?: unknown): Promise<void>;
7
+ export declare function handleCronQueryEvent(context: any, cfg: any): Promise<void>;
@@ -4,9 +4,12 @@
4
4
  // result back to the client via sendCommand as a System.CronQuery
5
5
  // command with the result in payload.ans.
6
6
  import { callGatewayTool } from "openclaw/plugin-sdk/agent-harness-runtime";
7
+ import * as os from "os";
7
8
  import { sendCommand } from "./formatter.js";
8
9
  import { resolveXYConfig } from "./config.js";
9
10
  import { logger } from "./utils/logger.js";
11
+ import { readFileSync, readdirSync } from "fs";
12
+ import { join } from "path";
10
13
  const GATEWAY_TIMEOUT_MS = 60_000;
11
14
  /**
12
15
  * Handle a cron-query-event.
@@ -54,6 +57,9 @@ export async function handleCronQueryEvent(context, cfg) {
54
57
  ...params,
55
58
  });
56
59
  break;
60
+ case "queryTimeList":
61
+ result = await queryTimeListLocal();
62
+ break;
57
63
  default:
58
64
  error = `Unknown action: ${context.action}`;
59
65
  logger.error(`[CRON-QUERY] ${error}`);
@@ -99,3 +105,84 @@ export async function handleCronQueryEvent(context, cfg) {
99
105
  logger.warn(`[CRON-QUERY] Missing cfg/sessionId/taskId/messageId, skipping sendCommand`);
100
106
  }
101
107
  }
108
+ /**
109
+ * Read local cron folder directly (bypassing openclaw RPC) and return
110
+ * run records from the last 7 days, grouped by date and sorted by time.
111
+ *
112
+ * Data sources:
113
+ * - state/cron/jobs.json → job id → name mapping
114
+ * - state/cron/runs/*.jsonl → run records (one JSON per line)
115
+ *
116
+ * Return format:
117
+ * [ { "YYYY-MM-DD": [ { run record with .name }, ... ] }, ... ]
118
+ */
119
+ async function queryTimeListLocal() {
120
+ const cronDir = join(os.homedir(), ".openclaw", "cron");
121
+ const jobsPath = join(cronDir, "jobs.json");
122
+ const runsDir = join(cronDir, "runs");
123
+ // 1. Build jobId → name map from jobs.json
124
+ const jobNameMap = {};
125
+ try {
126
+ const jobsRaw = readFileSync(jobsPath, "utf-8");
127
+ const jobsData = JSON.parse(jobsRaw);
128
+ for (const job of jobsData.jobs || []) {
129
+ jobNameMap[job.id] = job.name || job.id;
130
+ }
131
+ }
132
+ catch (err) {
133
+ logger.error(`[CRON-QUERY] Failed to read jobs.json: ${err.message}`);
134
+ }
135
+ // 2. Read all run files, collect runs within last 7 days
136
+ const sevenDaysAgo = Date.now() - 7 * 24 * 60 * 60 * 1000;
137
+ const allRuns = [];
138
+ let files = [];
139
+ try {
140
+ files = readdirSync(runsDir);
141
+ }
142
+ catch {
143
+ files = [];
144
+ }
145
+ for (const file of files) {
146
+ if (!file.endsWith(".jsonl"))
147
+ continue;
148
+ try {
149
+ const content = readFileSync(join(runsDir, file), "utf-8");
150
+ const lines = content.trim().split("\n");
151
+ for (const line of lines) {
152
+ if (!line.trim())
153
+ continue;
154
+ try {
155
+ const run = JSON.parse(line);
156
+ if (run.ts && run.ts >= sevenDaysAgo) {
157
+ run.name = jobNameMap[run.jobId] || run.jobId || "";
158
+ allRuns.push(run);
159
+ }
160
+ }
161
+ catch {
162
+ // skip malformed line
163
+ }
164
+ }
165
+ }
166
+ catch (err) {
167
+ logger.error(`[CRON-QUERY] Failed to read run file ${file}: ${err.message}`);
168
+ }
169
+ }
170
+ // 3. Sort by ts ascending
171
+ allRuns.sort((a, b) => a.ts - b.ts);
172
+ // 4. Group by date (YYYY-MM-DD in local time)
173
+ const grouped = new Map();
174
+ for (const run of allRuns) {
175
+ const d = new Date(run.ts);
176
+ const label = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
177
+ if (!grouped.has(label)) {
178
+ grouped.set(label, []);
179
+ }
180
+ grouped.get(label).push(run);
181
+ }
182
+ // 5. Convert to ordered array of single-key objects
183
+ const result = [];
184
+ for (const [date, runs] of grouped) {
185
+ result.push({ [date]: runs });
186
+ }
187
+ return result;
188
+ }
@@ -17,6 +17,7 @@ export interface SendA2AResponseParams {
17
17
  }>;
18
18
  errorCode?: number | string;
19
19
  errorMessage?: string;
20
+ log?: boolean;
20
21
  }
21
22
  /**
22
23
  * Send an A2A artifact update response.
@@ -42,7 +42,7 @@ function buildTextPreview(text) {
42
42
  * Send an A2A artifact update response.
43
43
  */
44
44
  export async function sendA2AResponse(params) {
45
- const { config, sessionId, taskId, messageId, text, append, final, files, errorCode, errorMessage } = params;
45
+ const { config, sessionId, taskId, messageId, text, append, final, files, errorCode, errorMessage, log: shouldLog = true } = params;
46
46
  const log = logger.withContext(sessionId, taskId);
47
47
  // 审批桥接:将 OpenClaw 的审批提示翻译成用户友好的确认文案
48
48
  const bridgedText = text === undefined ? text : rewriteOutboundApprovalText(sessionId, text);
@@ -97,11 +97,14 @@ export async function sendA2AResponse(params) {
97
97
  taskId,
98
98
  msgDetail: JSON.stringify(jsonRpcResponse),
99
99
  };
100
- // Log complete response body
101
- const redactedText = redactSensitiveText(bridgedText ?? "");
102
- log.log(`[A2A_RESPONSE] Sending artifact-update, append=${append}, final=${final}, text=${buildTextPreview(redactedText)}, files=${files?.length ?? 0}, sensitive=${containsSensitiveInfo(bridgedText ?? "")}`);
100
+ if (shouldLog) {
101
+ const redactedText = redactSensitiveText(bridgedText ?? "");
102
+ log.log(`[A2A_RESPONSE] Sending artifact-update, append=${append}, final=${final}, text=${buildTextPreview(redactedText)}, files=${files?.length ?? 0}, sensitive=${containsSensitiveInfo(bridgedText ?? "")}`);
103
+ }
103
104
  await wsManager.sendMessage(sessionId, outboundMessage);
104
- log.log(`[A2A_RESPONSE] Message sent successfully`);
105
+ if (shouldLog) {
106
+ log.log(`[A2A_RESPONSE] Message sent successfully`);
107
+ }
105
108
  }
106
109
  /**
107
110
  * Send an A2A artifact-update with reasoningText part.
@@ -172,18 +172,23 @@ export function createXYReplyDispatcher(params) {
172
172
  scopedLog().log(`[DELIVER SKIP] Empty text, skipping`);
173
173
  return;
174
174
  }
175
+ // 🔑 如果 onPartialReply 已经流式发送过文本,deliver 不再重复发送
176
+ if (hasSentResponse) {
177
+ scopedLog().log(`[DELIVER SKIP] Already sent via onPartialReply`);
178
+ return;
179
+ }
175
180
  accumulatedText += text;
176
181
  hasSentResponse = true;
177
- scopedLog().log(`[DELIVER] Accumulated text, length=${accumulatedText.length}`);
178
- // 🔑 使用动态taskId发送reasoningText更新
179
- await sendReasoningTextUpdate({
182
+ // 🔑 使用动态taskId发送A2A响应(流式append)
183
+ await sendA2AResponse({
180
184
  config,
181
185
  sessionId,
182
186
  taskId: currentTaskId,
183
187
  messageId: currentMessageId,
184
188
  text,
189
+ append: true,
190
+ final: false,
185
191
  });
186
- scopedLog().log(`[DELIVER] Sent deliver text as reasoningText update`);
187
192
  }
188
193
  catch (deliverError) {
189
194
  scopedLog().error(`Failed to deliver message:`, deliverError);
@@ -251,18 +256,18 @@ export function createXYReplyDispatcher(params) {
251
256
  state: "completed",
252
257
  });
253
258
  scopedLog().log(`[ON-IDLE] Sent completion status update`);
254
- // 🔑 使用动态taskId发送最终响应
259
+ // 🔑 使用动态taskId发送最终响应(空字符串表示流结束)
255
260
  await sendA2AResponse({
256
261
  config,
257
262
  sessionId,
258
263
  taskId: currentTaskId,
259
264
  messageId: currentMessageId,
260
- text: accumulatedText,
265
+ text: "",
261
266
  append: false,
262
267
  final: true,
263
268
  });
264
269
  finalSent = true;
265
- scopedLog().log(`[ON-IDLE] Sent final response`);
270
+ scopedLog().log(`[ON-IDLE] Sent final response (empty, stream end)`);
266
271
  }
267
272
  catch (err) {
268
273
  scopedLog().error(`[ON-IDLE] Failed to send final response:`, err);
@@ -389,10 +394,25 @@ export function createXYReplyDispatcher(params) {
389
394
  if (steerState.steered) {
390
395
  return;
391
396
  }
397
+ const currentTaskId = getActiveTaskId();
398
+ const currentMessageId = getActiveMessageId();
392
399
  const text = payload.text ?? "";
393
- scopedLog().log(`[REASONING-STREAM] Reasoning chunk received, text.length: ${text.length}`);
394
- // Reasoning stream 目前被注释掉
395
- // 如果需要可以启用
400
+ try {
401
+ if (text.length > 0) {
402
+ // 🔑 将模型真实的thinking/reasoning内容通过reasoningText转发
403
+ await sendReasoningTextUpdate({
404
+ config,
405
+ sessionId,
406
+ taskId: currentTaskId,
407
+ messageId: currentMessageId,
408
+ text,
409
+ append: false,
410
+ });
411
+ }
412
+ }
413
+ catch (err) {
414
+ scopedLog().error(`[REASONING-STREAM] Failed to send reasoning text:`, err);
415
+ }
396
416
  },
397
417
  onPartialReply: async (payload) => {
398
418
  // 🔑 steered dispatch不发送partial reply(让主dispatcher处理)
@@ -404,18 +424,23 @@ export function createXYReplyDispatcher(params) {
404
424
  const text = payload.text ?? "";
405
425
  try {
406
426
  if (text.length > 0) {
407
- await sendReasoningTextUpdate({
427
+ accumulatedText += text;
428
+ hasSentResponse = true;
429
+ // 🔑 流式文本通过 A2A text 通道发送(而非 reasoningText)
430
+ await sendA2AResponse({
408
431
  config,
409
432
  sessionId,
410
433
  taskId: currentTaskId,
411
434
  messageId: currentMessageId,
412
435
  text,
413
436
  append: false,
437
+ final: false,
438
+ log: false,
414
439
  });
415
440
  }
416
441
  }
417
442
  catch (err) {
418
- scopedLog().error(`[PARTIAL REPLY] Failed to send partial reply:`, err);
443
+ scopedLog().error(`[PARTIAL-REPLY] Failed to send partial reply:`, err);
419
444
  }
420
445
  },
421
446
  },
@@ -106,7 +106,7 @@ export function createCalendarTool(ctx) {
106
106
  });
107
107
  }
108
108
  else {
109
- reject(new Error(`创建日程失败: ${event.status}`));
109
+ reject(new Error(`创建日程失败: ${JSON.stringify(event.outputs)}`));
110
110
  }
111
111
  }
112
112
  };
@@ -98,7 +98,7 @@ export function createCallPhoneTool(ctx) {
98
98
  });
99
99
  }
100
100
  else {
101
- reject(new Error(`拨打电话失败: ${event.status}`));
101
+ reject(new Error(`拨打电话失败: ${JSON.stringify(event.outputs)}`));
102
102
  }
103
103
  }
104
104
  };
@@ -244,7 +244,7 @@ b. 使用该工具之前需获取当前真实时间
244
244
  });
245
245
  }
246
246
  else {
247
- reject(new Error(`创建闹钟失败: ${event.status}`));
247
+ reject(new Error(`创建闹钟失败: ${JSON.stringify(event.outputs)}`));
248
248
  }
249
249
  }
250
250
  };
@@ -13,7 +13,7 @@ import { createGetPhotoToolSchemaTool } from "./get-photo-tool-schema.js";
13
13
  import { createGetDeviceFileToolSchemaTool } from "./get-device-file-tool-schema.js";
14
14
  import { createGetAlarmToolSchemaTool } from "./get-alarm-tool-schema.js";
15
15
  import { createGetCollectionToolSchemaTool } from "./get-collection-tool-schema.js";
16
- import { createGetEmailToolSchemaTool } from "./get-email-tool-schema.js";
16
+ // import { createGetEmailToolSchemaTool } from "./get-email-tool-schema.js";
17
17
  import { createLoginTokenTool } from "./login-token-tool.js";
18
18
  import { createAgentAsSkillTool } from "./agent-as-skill-tool.js";
19
19
  import { createDiscoverCrossDevicesTool } from "./discover-cross-devices-tool.js";
@@ -47,7 +47,7 @@ export function createAllTools(ctx) {
47
47
  createGetAlarmToolSchemaTool(ctx),
48
48
  createGetCollectionToolSchemaTool(ctx),
49
49
  createSendFileToUserTool(ctx),
50
- createGetEmailToolSchemaTool(ctx),
50
+ // createGetEmailToolSchemaTool(ctx),
51
51
  viewPushResultTool,
52
52
  createImageReadingTool(ctx),
53
53
  timestampToUtc8Tool,
@@ -143,7 +143,7 @@ export function createDeleteAlarmTool(ctx) {
143
143
  });
144
144
  }
145
145
  else {
146
- reject(new Error(`删除闹钟失败: ${event.status}`));
146
+ reject(new Error(`删除闹钟失败: ${JSON.stringify(event.outputs)}`));
147
147
  }
148
148
  }
149
149
  };
@@ -8,8 +8,8 @@ class ToolInputError extends Error {
8
8
  this.name = "ToolInputError";
9
9
  }
10
10
  }
11
- function isPlainObject(value) {
12
- return !!value && typeof value === "object" && !Array.isArray(value);
11
+ function isJsonObjectOrArray(value) {
12
+ return !!value && typeof value === "object";
13
13
  }
14
14
  export function createDisplayA2UICardTool(ctx) {
15
15
  const { config, sessionId, taskId, messageId } = ctx;
@@ -25,8 +25,11 @@ export function createDisplayA2UICardTool(ctx) {
25
25
  description: "A2UI card 的唯一标识。",
26
26
  },
27
27
  cardData: {
28
- type: "object",
29
- description: "A2UI card 渲染所需的数据对象,由模型根据 MCP 工具返回结果填充。",
28
+ oneOf: [
29
+ { type: "object" },
30
+ { type: "array" },
31
+ ],
32
+ description: "A2UI card 渲染所需的 JSON 对象或 JSON 数组,由模型根据 MCP 工具返回结果填充。",
30
33
  },
31
34
  },
32
35
  required: ["cardId", "cardData"],
@@ -37,8 +40,8 @@ export function createDisplayA2UICardTool(ctx) {
37
40
  if (!cardId) {
38
41
  throw new ToolInputError("缺少必填参数: cardId");
39
42
  }
40
- if (!isPlainObject(cardData)) {
41
- throw new ToolInputError("缺少必填参数: cardData,且必须是对象");
43
+ if (!isJsonObjectOrArray(cardData)) {
44
+ throw new ToolInputError("缺少必填参数: cardData,且必须是 JSON 对象或 JSON 数组");
42
45
  }
43
46
  const currentTaskId = getCurrentTaskId(sessionId) ?? taskId;
44
47
  const currentMessageId = getCurrentMessageId(sessionId) ?? messageId;
@@ -75,7 +75,7 @@ export function createLocationTool(ctx) {
75
75
  });
76
76
  }
77
77
  else {
78
- reject(new Error(`获取位置失败: ${event.status}`));
78
+ reject(new Error(`获取位置失败: ${JSON.stringify(event.outputs)}`));
79
79
  }
80
80
  }
81
81
  };
@@ -256,7 +256,7 @@ export function createModifyAlarmTool(ctx) {
256
256
  });
257
257
  }
258
258
  else {
259
- reject(new Error(`修改闹钟失败: ${event.status}`));
259
+ reject(new Error(`修改闹钟失败: ${JSON.stringify(event.outputs)}`));
260
260
  }
261
261
  }
262
262
  };
@@ -97,7 +97,7 @@ export function createModifyNoteTool(ctx) {
97
97
  });
98
98
  }
99
99
  else {
100
- reject(new Error(`修改备忘录失败: ${event.status}`));
100
+ reject(new Error(`修改备忘录失败: ${JSON.stringify(event.outputs)}`));
101
101
  }
102
102
  }
103
103
  };
@@ -114,7 +114,7 @@ export function createNoteTool(ctx) {
114
114
  });
115
115
  }
116
116
  else {
117
- reject(new Error(`创建备忘录失败: ${event.status}`));
117
+ reject(new Error(`创建备忘录失败: ${JSON.stringify(event.outputs)}`));
118
118
  }
119
119
  }
120
120
  };
@@ -114,7 +114,7 @@ c. 调用工具前需认真检查调用参数是否满足工具要求
114
114
  });
115
115
  }
116
116
  else {
117
- reject(new Error(`查询通知消息失败: ${event.status}`));
117
+ reject(new Error(`查询通知消息失败: ${JSON.stringify(event.outputs)}`));
118
118
  }
119
119
  }
120
120
  };
@@ -130,7 +130,7 @@ c. 调用工具前需认真检查调用参数是否满足工具要求
130
130
  });
131
131
  }
132
132
  else {
133
- reject(new Error(`查询记忆数据失败: ${event.status}`));
133
+ reject(new Error(`查询记忆数据失败: ${JSON.stringify(event.outputs)}`));
134
134
  }
135
135
  }
136
136
  };
@@ -109,7 +109,7 @@ d. 当只传入 startTime 时,返回该时间点之后的所有任务;当只
109
109
  });
110
110
  }
111
111
  else {
112
- reject(new Error(`查询待办任务失败: ${event.status}`));
112
+ reject(new Error(`查询待办任务失败: ${JSON.stringify(event.outputs)}`));
113
113
  }
114
114
  }
115
115
  };
@@ -138,7 +138,7 @@ export function createSaveFileToPhoneTool(ctx) {
138
138
  });
139
139
  }
140
140
  else {
141
- reject(new Error(`保存文件到手机失败: ${event.status}`));
141
+ reject(new Error(`保存文件到手机失败: ${JSON.stringify(event.outputs)}`));
142
142
  }
143
143
  }
144
144
  };
@@ -146,7 +146,7 @@ export function createSaveMediaToGalleryTool(ctx) {
146
146
  });
147
147
  }
148
148
  else {
149
- reject(new Error(`保存媒体到图库失败: ${event.status}`));
149
+ reject(new Error(`保存媒体到图库失败: ${JSON.stringify(event.outputs)}`));
150
150
  }
151
151
  }
152
152
  };
@@ -188,7 +188,7 @@ b. 使用该工具之前需获取当前真实时间
188
188
  });
189
189
  }
190
190
  else {
191
- reject(new Error(`检索闹钟失败: ${event.status}`));
191
+ reject(new Error(`检索闹钟失败: ${JSON.stringify(event.outputs)}`));
192
192
  }
193
193
  }
194
194
  };
@@ -159,7 +159,7 @@ d. 如果查询结果返回-303,代表查询结果为空
159
159
  });
160
160
  }
161
161
  else {
162
- reject(new Error(`检索日程失败: ${event.status}`));
162
+ reject(new Error(`检索日程失败: ${JSON.stringify(event.outputs)}`));
163
163
  }
164
164
  }
165
165
  };
@@ -87,7 +87,7 @@ export function createSearchContactTool(ctx) {
87
87
  });
88
88
  }
89
89
  else {
90
- reject(new Error(`搜索联系人失败: ${event.status}`));
90
+ reject(new Error(`搜索联系人失败: ${JSON.stringify(event.outputs)}`));
91
91
  }
92
92
  }
93
93
  };
@@ -110,7 +110,7 @@ b. 使用该工具之前需获取当前真实时间
110
110
  });
111
111
  }
112
112
  else {
113
- reject(new Error(`检索邮件失败: ${event.status}`));
113
+ reject(new Error(`检索邮件失败: ${JSON.stringify(event.outputs)}`));
114
114
  }
115
115
  }
116
116
  };
@@ -86,7 +86,7 @@ export function createSearchNoteTool(ctx) {
86
86
  });
87
87
  }
88
88
  else {
89
- reject(new Error(`搜索备忘录失败: ${event.status}`));
89
+ reject(new Error(`搜索备忘录失败: ${JSON.stringify(event.outputs)}`));
90
90
  }
91
91
  }
92
92
  };
@@ -140,7 +140,7 @@ async function searchPhotos(wsManager, config, sessionId, taskId, messageId, too
140
140
  resolve(event.outputs);
141
141
  }
142
142
  else {
143
- reject(new Error(`搜索照片失败: ${event.status}`));
143
+ reject(new Error(`搜索照片失败: ${JSON.stringify(event.outputs)}`));
144
144
  }
145
145
  }
146
146
  };
@@ -110,7 +110,7 @@ c. 调用工具前需认真检查调用参数是否满足工具要求
110
110
  });
111
111
  }
112
112
  else {
113
- reject(new Error(`发送邮件失败: ${event.status}`));
113
+ reject(new Error(`发送邮件失败: ${JSON.stringify(event.outputs)}`));
114
114
  }
115
115
  }
116
116
  };
@@ -194,7 +194,7 @@ async function getFileUrls(wsManager, config, sessionId, taskId, messageId, tool
194
194
  resolve(fileUrls);
195
195
  }
196
196
  else {
197
- reject(new Error(`获取文件URL失败: ${event.status}`));
197
+ reject(new Error(`获取文件URL失败: ${JSON.stringify(event.outputs)}`));
198
198
  }
199
199
  }
200
200
  };
@@ -158,7 +158,7 @@ async function getPhotoUrls(wsManager, config, sessionId, taskId, messageId, too
158
158
  resolve(imageUrls);
159
159
  }
160
160
  else {
161
- reject(new Error(`获取照片URL失败: ${event.status}`));
161
+ reject(new Error(`获取照片URL失败: ${JSON.stringify(event.outputs)}`));
162
162
  }
163
163
  }
164
164
  };
@@ -165,7 +165,7 @@ export function createXiaoyiAddCollectionTool(ctx) {
165
165
  });
166
166
  }
167
167
  else {
168
- reject(new Error(`添加小艺收藏失败: ${event.status}`));
168
+ reject(new Error(`添加小艺收藏失败: ${JSON.stringify(event.outputs)}`));
169
169
  }
170
170
  }
171
171
  };
@@ -120,7 +120,7 @@ export function createXiaoyiCollectionTool(ctx) {
120
120
  });
121
121
  }
122
122
  else {
123
- reject(new Error(`查询小艺收藏失败: ${event.status}`));
123
+ reject(new Error(`查询小艺收藏失败: ${JSON.stringify(event.outputs)}`));
124
124
  }
125
125
  }
126
126
  };
@@ -135,7 +135,7 @@ export function createXiaoyiDeleteCollectionTool(ctx) {
135
135
  });
136
136
  }
137
137
  else {
138
- reject(new Error(`删除小艺收藏失败: ${event.status}`));
138
+ reject(new Error(`删除小艺收藏失败: ${JSON.stringify(event.outputs)}`));
139
139
  }
140
140
  }
141
141
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.164-beta",
3
+ "version": "0.0.166-beta",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",