@ynhcj/xiaoyi-channel 0.0.187-beta → 0.0.189-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.
@@ -217,11 +217,12 @@ export async function sendCommand(params) {
217
217
  if (commands.length === 0) {
218
218
  throw new Error("sendCommand requires command or commands.");
219
219
  }
220
- // ── Cron mode: disabled ────────────────────────────────────────
221
- // sendCommandViaPush is disabled in this version. Cron-triggered
222
- // tool calls that try to send commands will be rejected.
220
+ // ── Cron mode: route through push channel ──────────────────────
221
+ // Detected via: (a) sessionId "cron-" prefix from synthetic session, OR
222
+ // (b) toolCallId marked by before_tool_call hook from openclaw's sessionKey.
223
223
  if (sessionId.startsWith("cron-") || isCronToolCall(toolCallId)) {
224
- throw new Error("sendCommandViaPush is disabled in this version");
224
+ const { sendCommandViaPush } = await import("./cron-command.js");
225
+ return sendCommandViaPush({ config, command: commands[0] });
225
226
  }
226
227
  // ── Normal mode: WebSocket ─────────────────────────────────────
227
228
  // Dynamic lookup: use latest taskId/messageId from task-manager (handles steer/interrupt),
@@ -16,6 +16,11 @@ import { createGetAlarmToolSchemaTool } from "./get-alarm-tool-schema.js";
16
16
  import { createGetCollectionToolSchemaTool } from "./get-collection-tool-schema.js";
17
17
  // import { createGetEmailToolSchemaTool } from "./get-email-tool-schema.js";
18
18
  import { createLoginTokenTool } from "./login-token-tool.js";
19
+ import { createAgentAsSkillTool } from "./agent-as-skill-tool.js";
20
+ import { createDiscoverCrossDevicesTool } from "./discover-cross-devices-tool.js";
21
+ import { createSendCrossDeviceTaskTool } from "./send-cross-device-task-tool.js";
22
+ import { createDisplayA2UICardTool } from "./display-a2ui-card-tool.js";
23
+ import { createCheckPluginPrivilegeTool } from "./check-plugin-privilege-tool.js";
19
24
  import { logger } from "../utils/logger.js";
20
25
  /**
21
26
  * Create all XY channel tools for the given session context.
@@ -31,9 +36,9 @@ export function createAllTools(ctx) {
31
36
  logger.log(`[CREATE-ALL-TOOLS] creating tools`);
32
37
  return [
33
38
  createLocationTool(ctx),
34
- // createDiscoverCrossDevicesTool(ctx),
35
- // createSendCrossDeviceTaskTool(ctx),
36
- // createDisplayA2UICardTool(ctx),
39
+ createDiscoverCrossDevicesTool(ctx),
40
+ createSendCrossDeviceTaskTool(ctx),
41
+ createDisplayA2UICardTool(ctx),
37
42
  createCallDeviceTool(ctx),
38
43
  createGetNoteToolSchemaTool(ctx),
39
44
  createGetCalendarToolSchemaTool(ctx),
@@ -51,7 +56,7 @@ export function createAllTools(ctx) {
51
56
  timestampToUtc8Tool,
52
57
  createSaveSelfEvolutionSkillTool(ctx),
53
58
  createLoginTokenTool(ctx),
54
- // createAgentAsSkillTool(ctx),
55
- // createCheckPluginPrivilegeTool(ctx),
59
+ createAgentAsSkillTool(ctx),
60
+ createCheckPluginPrivilegeTool(ctx),
56
61
  ];
57
62
  }
@@ -21,8 +21,7 @@ const DEVICE_TOOL_POLICY = {
21
21
  "pad": {
22
22
  allowlist: false,
23
23
  tools: [
24
- "xiaoyi_gui_agent",
25
- "send_html_card"
24
+ "xiaoyi_gui_agent"
26
25
  ],
27
26
  },
28
27
  "web": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.187-beta",
3
+ "version": "0.0.189-beta",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",