@ynhcj/xiaoyi-channel 0.0.207-beta → 0.0.209-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.
@@ -578,6 +578,7 @@ export class XYWebSocketManager extends EventEmitter {
578
578
  }
579
579
  log.log(`[XY] Processing ${events.length} events from data.events`);
580
580
  for (const item of events) {
581
+ log.log(`[XY] Raw event: header=${JSON.stringify(item?.header)}, payloadKeys=${Object.keys(item?.payload ?? {}).join(",")}`);
581
582
  const dataEvent = this.toUploadExeDataEvent(item);
582
583
  const crossDeviceTaskResult = this.toCrossDeviceTaskResultEvent(item, sessionId);
583
584
  if (dataEvent) {
@@ -643,6 +644,10 @@ export class XYWebSocketManager extends EventEmitter {
643
644
  log.log("[XY] ExecuteAgentAsSkillResponse detected, emitting agent-as-skill-response");
644
645
  this.emit("agent-as-skill-response", item);
645
646
  }
647
+ else if (item.header?.namespace === "FunctionExecute" && item.header?.name === "ExecuteCLIRsp") {
648
+ log.log(`[XY] FunctionExecute.ExecuteCLIRsp detected, emitting cli-response, type=${item.payload?.type}`);
649
+ this.emit("cli-response", item.payload);
650
+ }
646
651
  }
647
652
  }
648
653
  return;
@@ -691,6 +696,7 @@ export class XYWebSocketManager extends EventEmitter {
691
696
  }
692
697
  log.log(`[XY] Processing ${events.length} events from data.events`);
693
698
  for (const item of events) {
699
+ log.log(`[XY] Raw event (wrapped): header=${JSON.stringify(item?.header)}, payloadKeys=${Object.keys(item?.payload ?? {}).join(",")}`);
694
700
  const dataEvent = this.toUploadExeDataEvent(item);
695
701
  const crossDeviceTaskResult = this.toCrossDeviceTaskResultEvent(item, inboundMsg.sessionId || a2aRequest.params?.sessionId);
696
702
  if (dataEvent) {
@@ -741,6 +747,10 @@ export class XYWebSocketManager extends EventEmitter {
741
747
  log.log("[XY] ExecuteAgentAsSkillResponse detected (wrapped format), emitting agent-as-skill-response");
742
748
  this.emit("agent-as-skill-response", item);
743
749
  }
750
+ else if (item.header?.namespace === "FunctionExecute" && item.header?.name === "ExecuteCLIRsp") {
751
+ log.log(`[XY] FunctionExecute.ExecuteCLIRsp detected (wrapped), emitting cli-response, type=${item.payload?.type}`);
752
+ this.emit("cli-response", item.payload);
753
+ }
744
754
  }
745
755
  }
746
756
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.207-beta",
3
+ "version": "0.0.209-beta",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",