@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.
- package/dist/index.d.ts +3 -8
- package/dist/index.js +5 -1
- package/dist/src/bot.js +16 -77
- package/dist/src/cspl/config.js +3 -0
- package/dist/src/reply-dispatcher.js +4 -3
- package/dist/src/skill-retriever/config.js +2 -0
- package/dist/src/skill-retriever/hooks.js +1 -0
- package/dist/src/skill-retriever/tool-search.d.ts +3 -0
- package/dist/src/skill-retriever/tool-search.js +27 -11
- package/dist/src/skill-retriever/types.d.ts +1 -0
- package/dist/src/tools/device-tool-map.js +0 -6
- package/dist/src/tools/hmos-cli.d.ts +103 -0
- package/dist/src/tools/hmos-cli.js +561 -0
- package/dist/src/tools/invoke.d.ts +48 -0
- package/dist/src/tools/invoke.js +1201 -0
- package/dist/src/websocket.js +10 -0
- package/package.json +1 -1
package/dist/src/websocket.js
CHANGED
|
@@ -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
|
}
|