@ynhcj/xiaoyi-channel 0.0.188-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.
package/dist/src/formatter.js
CHANGED
|
@@ -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:
|
|
221
|
-
//
|
|
222
|
-
//
|
|
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
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
55
|
-
|
|
59
|
+
createAgentAsSkillTool(ctx),
|
|
60
|
+
createCheckPluginPrivilegeTool(ctx),
|
|
56
61
|
];
|
|
57
62
|
}
|