openclaw-xiaoyou 1.3.9 → 1.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-xiaoyou",
3
- "version": "1.3.9",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "description": "Xiaoyou channel plugin for OpenClaw — connects enterprise services via persistent outbound WebSocket",
6
6
  "openclaw": {
package/src/channel.ts CHANGED
@@ -207,6 +207,7 @@ export const xiayouPlugin = {
207
207
  conversationId,
208
208
  messageId: replyMessageId,
209
209
  replyToMessageId: inboundMessageId,
210
+ senderId,
210
211
  text: textToSend,
211
212
  streamStatus: "chunk",
212
213
  seq: chunkSeq++,
@@ -223,6 +224,7 @@ export const xiayouPlugin = {
223
224
  conversationId,
224
225
  messageId: replyMessageId,
225
226
  replyToMessageId: inboundMessageId,
227
+ senderId,
226
228
  text: fullText,
227
229
  streamStatus: "end",
228
230
  timestamp: Date.now(),
@@ -240,6 +242,7 @@ export const xiayouPlugin = {
240
242
  conversationId,
241
243
  messageId: replyMessageId,
242
244
  replyToMessageId: inboundMessageId,
245
+ senderId,
243
246
  text: fullText,
244
247
  streamStatus: "end",
245
248
  timestamp: Date.now(),
@@ -288,6 +291,8 @@ export const xiayouPlugin = {
288
291
  conversationId: to || "cron-delivery",
289
292
  messageId: `xiaoyou-${Date.now()}`,
290
293
  replyToMessageId: replyToId,
294
+ senderId: to,
295
+ source: "scheduled_task" as const,
291
296
  text: text,
292
297
  timestamp: Date.now(),
293
298
  };
@@ -307,6 +312,8 @@ export const xiayouPlugin = {
307
312
  conversationId: to || "cron-delivery",
308
313
  messageId: `xiaoyou-${Date.now()}`,
309
314
  replyToMessageId: replyToId,
315
+ senderId: to,
316
+ source: "scheduled_task" as const,
310
317
  text: text ?? "",
311
318
  mediaUrls: mediaUrl ? [mediaUrl] : [],
312
319
  timestamp: Date.now(),
package/src/types.ts CHANGED
@@ -60,10 +60,13 @@ export type OutboundReply = {
60
60
  conversationId: string;
61
61
  messageId: string;
62
62
  replyToMessageId?: string;
63
+ senderId?: string;
63
64
  text: string;
64
65
  mediaUrls?: string[];
65
66
  agentId?: string;
66
67
  timestamp: number;
68
+ /** 消息来源标识:scheduled_task=定时任务推送,不传=正常对话回复 */
69
+ source?: "scheduled_task";
67
70
  /** 流式标记:chunk=增量片段, end=流结束, 不传=一次性完整回复 */
68
71
  streamStatus?: StreamStatus;
69
72
  /** 流式片段序号(仅 streamStatus="chunk" 时有值,从 0 开始) */