@ynhcj/xiaoyi-channel 0.0.162-beta → 0.0.163-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.
@@ -23,7 +23,7 @@ export function createSchemaTool(options) {
23
23
  content: [
24
24
  {
25
25
  type: "text",
26
- text: JSON.stringify(schemas, null, 2),
26
+ text: "以下为工具列表。请仔细阅读,使用call_device_tool进行调用:\n" + JSON.stringify(schemas, null, 2),
27
27
  },
28
28
  ],
29
29
  };
@@ -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 { isCronToolCall } from "./session-manager.js";
5
6
  import { logger } from "../utils/logger.js";
6
7
  /**
7
8
  * XiaoYi GUI tool - executes phone app interactions through GUI agent.
@@ -46,6 +47,10 @@ export function createXiaoyiGuiTool(ctx) {
46
47
  if (!params.query || typeof params.query !== "string") {
47
48
  throw new Error("Missing or invalid required parameter: query must be a non-empty string");
48
49
  }
50
+ // GUI agent only works in active WebSocket sessions — reject cron-triggered calls
51
+ if (sessionId.startsWith("cron-") || isCronToolCall(toolCallId)) {
52
+ throw new Error("xiaoyi_gui_agent 不支持定时任务触发,只能在活跃对话中使用");
53
+ }
49
54
  // Get WebSocket manager
50
55
  const wsManager = getXYWebSocketManager(config);
51
56
  // Build InvokeJarvisGUIAgentRequest command
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.162-beta",
3
+ "version": "0.0.163-beta",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",