@honor-claw/yoyo 2026.6.9-beta.9 → 2026.6.9

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.
Files changed (110) hide show
  1. package/dist/apis/claw-cloud.mjs +0 -19
  2. package/dist/capabilities/admin/impl.mjs +19 -0
  3. package/dist/capabilities/node/invoke.mjs +27 -22
  4. package/dist/capabilities/routing/index.mjs +1 -0
  5. package/dist/capabilities/routing/restart.mjs +17 -0
  6. package/dist/cli/index.mjs +2 -2
  7. package/dist/cli/login/impl.mjs +1 -1
  8. package/dist/cli/logout/impl.mjs +17 -7
  9. package/dist/cloud-channel/dispatcher/impl.mjs +13 -19
  10. package/dist/core/hooks/tool-trace.mjs +24 -18
  11. package/dist/core/prompt/builder.mjs +8 -13
  12. package/dist/gateway/client/admin.mjs +3 -0
  13. package/dist/honor-auth/browser/result-page.mjs +125 -75
  14. package/dist/honor-auth/logout.mjs +6 -6
  15. package/dist/index.mjs +1 -1
  16. package/dist/messaging/dispatchers/stream/error.mjs +13 -0
  17. package/dist/messaging/inbound/context.mjs +4 -1
  18. package/dist/messaging/trace/index.mjs +1 -0
  19. package/dist/messaging/trace/lifecycle.mjs +17 -12
  20. package/dist/messaging/trace/storage.mjs +26 -24
  21. package/dist/messaging/trace/tool-context.mjs +30 -0
  22. package/dist/modules/configs/channel.mjs +12 -3
  23. package/dist/modules/configs/plugin-init.mjs +36 -44
  24. package/dist/tools/index.mjs +5 -5
  25. package/dist/tools/plugin-restart/tool.mjs +44 -0
  26. package/dist/utils/object.mjs +8 -0
  27. package/dist/utils/version.mjs +21 -16
  28. package/openclaw.plugin.json +1 -1
  29. package/package.json +1 -1
  30. package/skills/yoyo-phone-control/SKILL.md +6 -78
  31. package/skills/yoyo-phone-control/mcptools/airplane_mode.json +1 -10
  32. package/skills/yoyo-phone-control/mcptools/autoscreen_onnotice.json +1 -10
  33. package/skills/yoyo-phone-control/mcptools/battery.json +8 -8
  34. package/skills/yoyo-phone-control/mcptools/bluetooth.json +1 -10
  35. package/skills/yoyo-phone-control/mcptools/call.json +6 -11
  36. package/skills/yoyo-phone-control/mcptools/camera.json +2 -3
  37. package/skills/yoyo-phone-control/mcptools/cancel_countdown_timer.json +2 -3
  38. package/skills/yoyo-phone-control/mcptools/capture_screenshot.json +1 -2
  39. package/skills/yoyo-phone-control/mcptools/check_alarm.json +2 -3
  40. package/skills/yoyo-phone-control/mcptools/check_countdown_timer.json +2 -3
  41. package/skills/yoyo-phone-control/mcptools/check_schedule.json +2 -3
  42. package/skills/yoyo-phone-control/mcptools/check_todo.json +2 -3
  43. package/skills/yoyo-phone-control/mcptools/clean_dirty.json +1 -2
  44. package/skills/yoyo-phone-control/mcptools/close_alarm.json +4 -5
  45. package/skills/yoyo-phone-control/mcptools/close_app.json +4 -5
  46. package/skills/yoyo-phone-control/mcptools/close_countdown_timer.json +2 -3
  47. package/skills/yoyo-phone-control/mcptools/create_alarm.json +6 -3
  48. package/skills/yoyo-phone-control/mcptools/create_countdown_timer.json +2 -3
  49. package/skills/yoyo-phone-control/mcptools/create_schedule.json +2 -3
  50. package/skills/yoyo-phone-control/mcptools/create_todo.json +2 -3
  51. package/skills/yoyo-phone-control/mcptools/dark_mode.json +1 -10
  52. package/skills/yoyo-phone-control/mcptools/delete_alarm.json +5 -6
  53. package/skills/yoyo-phone-control/mcptools/delete_schedule.json +5 -6
  54. package/skills/yoyo-phone-control/mcptools/delete_todo.json +1 -1
  55. package/skills/yoyo-phone-control/mcptools/device_operation.json +2 -3
  56. package/skills/yoyo-phone-control/mcptools/express_logistics_query.json +2 -2
  57. package/skills/yoyo-phone-control/mcptools/eyecomfort.json +1 -10
  58. package/skills/yoyo-phone-control/mcptools/flashlight.json +1 -2
  59. package/skills/yoyo-phone-control/mcptools/get_user_location.json +2 -2
  60. package/skills/yoyo-phone-control/mcptools/hotspot.json +1 -10
  61. package/skills/yoyo-phone-control/mcptools/hover_button.json +1 -10
  62. package/skills/yoyo-phone-control/mcptools/location_service.json +9 -10
  63. package/skills/yoyo-phone-control/mcptools/mobile_data.json +1 -10
  64. package/skills/yoyo-phone-control/mcptools/modify_schedule.json +5 -6
  65. package/skills/yoyo-phone-control/mcptools/modify_todo.json +1 -1
  66. package/skills/yoyo-phone-control/mcptools/musicFeedbackAction.json +2 -2
  67. package/skills/yoyo-phone-control/mcptools/nfc.json +1 -10
  68. package/skills/yoyo-phone-control/mcptools/no_disturb.json +1 -6
  69. package/skills/yoyo-phone-control/mcptools/open_alarm.json +5 -6
  70. package/skills/yoyo-phone-control/mcptools/open_app.json +6 -7
  71. package/skills/yoyo-phone-control/mcptools/open_payment_code.json +16 -16
  72. package/skills/yoyo-phone-control/mcptools/open_transport_code.json +4 -4
  73. package/skills/yoyo-phone-control/mcptools/operateMusic.json +2 -2
  74. package/skills/yoyo-phone-control/mcptools/operateVideo.json +2 -2
  75. package/skills/yoyo-phone-control/mcptools/pause_countdown_timer.json +2 -3
  76. package/skills/yoyo-phone-control/mcptools/playMusic.json +3 -3
  77. package/skills/yoyo-phone-control/mcptools/playNews.json +2 -2
  78. package/skills/yoyo-phone-control/mcptools/playVideo.json +3 -3
  79. package/skills/yoyo-phone-control/mcptools/quiet_mode.json +1 -2
  80. package/skills/yoyo-phone-control/mcptools/record.json +1 -2
  81. package/skills/yoyo-phone-control/mcptools/restart_countdown_timer.json +2 -3
  82. package/skills/yoyo-phone-control/mcptools/resume_countdown_timer.json +2 -3
  83. package/skills/yoyo-phone-control/mcptools/ringing_mode.json +1 -2
  84. package/skills/yoyo-phone-control/mcptools/scan_code.json +1 -2
  85. package/skills/yoyo-phone-control/mcptools/screen_recorder.json +1 -6
  86. package/skills/yoyo-phone-control/mcptools/search_contact.json +1 -2
  87. package/skills/yoyo-phone-control/mcptools/search_message.json +1 -2
  88. package/skills/yoyo-phone-control/mcptools/setMusicPlayMode.json +2 -2
  89. package/skills/yoyo-phone-control/mcptools/status_bar_show.json +1 -10
  90. package/skills/yoyo-phone-control/mcptools/switchMusic.json +2 -2
  91. package/skills/yoyo-phone-control/mcptools/uninstall_app.json +4 -5
  92. package/skills/yoyo-phone-control/mcptools/usb_shared_network.json +1 -10
  93. package/skills/yoyo-phone-control/mcptools/vibration_mode.json +1 -10
  94. package/skills/yoyo-phone-control/mcptools/volume.json +1 -10
  95. package/skills/yoyo-phone-control/mcptools/wlan.json +1 -10
  96. package/skills/yoyo-phone-control/references/gui-task-create.md +23 -15
  97. package/skills/yoyo-phone-control/references/{local_user_data_qa.md → local-user-data-qa.md} +33 -49
  98. package/skills/yoyo-phone-control/references/{local_user_file_search.md → local-user-file-search.md} +27 -27
  99. package/skills/yoyo-phone-control/references/{task_result_query.md → task-result-query.md} +2 -2
  100. package/skills/yoyo-update/SKILL.md +55 -11
  101. package/dist/capabilities/cloud-invoke/index.mjs +0 -1
  102. package/dist/capabilities/cloud-invoke/invoke.mjs +0 -43
  103. package/dist/core/prompt/cloud-tool.mjs +0 -7
  104. package/dist/tools/cloud-invoke/tool.mjs +0 -48
  105. package/dist/utils/array.mjs +0 -6
  106. package/skills/yoyo-smart-home/SKILL.md +0 -78
  107. package/skills/yoyo-smart-home/mcptools/device_control.json +0 -136
  108. package/skills/yoyo-smart-home/mcptools/device_query.json +0 -114
  109. package/skills/yoyo-smart-home/mcptools/skill_exit.json +0 -6
  110. /package/dist/tools/{cloud-invoke → plugin-restart}/index.mjs +0 -0
@@ -69,25 +69,6 @@ var o = class {
69
69
  timeout: r?.timeoutMs ?? 3e4
70
70
  });
71
71
  }
72
- async invokeCloudTool(e, n, r) {
73
- let i = {
74
- "x-trace-id": t(),
75
- "x-jwt-token": n.token
76
- }, a = {
77
- pluginService: { serviceId: r.serviceId },
78
- pluginParams: r.pluginParams,
79
- device: {
80
- deviceId: e.deviceId,
81
- role: "yoyoclaw",
82
- port: e.port
83
- }
84
- };
85
- return this.httpClient.post("/icsplugin/execute", {
86
- headers: i,
87
- body: a,
88
- timeout: r?.timeoutMs ?? 3e4
89
- });
90
- }
91
72
  async exchangeToken(e, r) {
92
73
  let i = t(), o = {
93
74
  "Content-Type": "application/json",
@@ -82,6 +82,25 @@ var r = t("capabilities"), i = null, a = class {
82
82
  };
83
83
  }
84
84
  }
85
+ async restart(t) {
86
+ let n = this.manager.getClient();
87
+ if (!n) return {
88
+ ok: !1,
89
+ error: "Admin gateway client not ready"
90
+ };
91
+ try {
92
+ return await n.restartGateway(t), r.info("plugin restart command dispatched via admin RPC", { reason: t }), {
93
+ ok: !0,
94
+ data: { dispatched: !0 }
95
+ };
96
+ } catch (t) {
97
+ let n = e(t);
98
+ return r.error("gateway restart RPC failed", t), {
99
+ ok: !1,
100
+ error: `gateway restart failed: ${n}`
101
+ };
102
+ }
103
+ }
85
104
  };
86
105
  function o() {
87
106
  return i === null && (i = new a()), i;
@@ -2,10 +2,12 @@ import { clawLogger as e } from "../../utils/claw-logger.mjs";
2
2
  import { buildEndpoint as t } from "../../cloud-channel/protocol/target.mjs";
3
3
  import { resolveEnabledYoyoAccountId as n } from "../../modules/configs/channel.mjs";
4
4
  import { ClawClient as r } from "../../connection/registry.mjs";
5
+ import { getToolCallContext as i } from "../../messaging/trace/tool-context.mjs";
6
+ import "../../messaging/trace/index.mjs";
5
7
  //#region src/capabilities/node/invoke.ts
6
- var i = e("capabilities");
7
- async function a(e) {
8
- let i = {
8
+ var a = e("capabilities");
9
+ async function o(e) {
10
+ let a = i(e.toolCallId) ?? void 0, o = {
9
11
  to: t("node", e.nodeId),
10
12
  msgType: "nodeInvokeRequest",
11
13
  data: { node: {
@@ -13,28 +15,31 @@ async function a(e) {
13
15
  nodeId: e.nodeId,
14
16
  name: e.name,
15
17
  ...e.params ? { params: { arguments: JSON.stringify(e.params) } } : {}
16
- } }
17
- }, a = n();
18
- return r.forAccount(a).request(i, {
18
+ } },
19
+ ...a ? { traceInfo: a } : {}
20
+ }, c = n();
21
+ return r.forAccount(c).request(o, {
19
22
  timeoutMs: e.timeoutMs,
20
- matchResult: o
23
+ matchResult: s(e.toolCallId)
21
24
  });
22
25
  }
23
- function o(e) {
24
- if (e.payload.msgType !== "nodeInvokeResult") return { matched: !1 };
25
- let t = e.data?.node;
26
- return !t || typeof t.runStatus != "number" || !t.nodeId || !t.toolCallId ? (i.warn("nodeInvokeResult missing required fields", { node: t }), {
27
- matched: !0,
28
- error: "missing required fields in invoke result"
29
- }) : {
30
- matched: !0,
31
- result: {
32
- nodeId: t.nodeId,
33
- toolCallId: t.toolCallId,
34
- runStatus: t.runStatus,
35
- result: t.result
36
- }
26
+ function s(e) {
27
+ return (t) => {
28
+ if (t.payload.msgType !== "nodeInvokeResult") return { matched: !1 };
29
+ let n = t.data?.node;
30
+ return !n || n.toolCallId !== e ? { matched: !1 } : typeof n.runStatus != "number" || !n.nodeId ? (a.warn("nodeInvokeResult missing required fields", { node: n }), {
31
+ matched: !0,
32
+ error: "missing required fields in invoke result"
33
+ }) : {
34
+ matched: !0,
35
+ result: {
36
+ nodeId: n.nodeId,
37
+ toolCallId: e,
38
+ runStatus: n.runStatus,
39
+ result: n.result
40
+ }
41
+ };
37
42
  };
38
43
  }
39
44
  //#endregion
40
- export { a as invokeNodeTool };
45
+ export { o as invokeNodeTool };
@@ -1,3 +1,4 @@
1
1
  import "./route.mjs";
2
2
  import "./list.mjs";
3
3
  import "./model-switch.mjs";
4
+ import "./restart.mjs";
@@ -0,0 +1,17 @@
1
+ import { clawLogger as e } from "../../utils/claw-logger.mjs";
2
+ import { useAdminCapability as t } from "../admin/impl.mjs";
3
+ import "../admin/index.mjs";
4
+ //#region src/capabilities/routing/restart.ts
5
+ var n = e("routing");
6
+ async function r(e) {
7
+ let r = await t().restart(e);
8
+ return n.info("plugin restart command dispatched", {
9
+ ok: r.ok,
10
+ reason: e
11
+ }), r.ok ? { ok: !0 } : {
12
+ ok: !1,
13
+ error: r.error
14
+ };
15
+ }
16
+ //#endregion
17
+ export { r as restartGateway };
@@ -10,8 +10,8 @@ import "./logout/index.mjs";
10
10
  //#region src/cli/index.ts
11
11
  function a(a) {
12
12
  a.registerCli((o) => {
13
- let s = o.program.command("honor").description("Commands for honor yoyoclaw");
14
- r(a, s), i(a, s), t(a, s), e() && n(a, s);
13
+ let s = o.program.command("honor").description("Commands for Honor yoyoclaw");
14
+ r(a, s), i(a, s), e() && (n(a, s), t(a, s));
15
15
  }, { commands: ["honor"] });
16
16
  }
17
17
  //#endregion
@@ -8,7 +8,7 @@ import "../../honor-auth/index.mjs";
8
8
  //#region src/cli/login/impl.ts
9
9
  var l = t("login-cli");
10
10
  function u(t, u) {
11
- u.command("login").description("login to yoyoclaw and register devices").option("-u, --uid <userId>", "login with a specific user ID").option("--token <token>", "login with a specific token").action(async (u) => e(t.runtime, async () => {
11
+ u.command("login").description("login to Honor and register devices").option("-u, --uid <userId>", "login with a specific user ID").option("--token <token>", "login with a specific token").action(async (u) => e(t.runtime, async () => {
12
12
  let { token: e } = u;
13
13
  l.debug("login CLI command called");
14
14
  let t = a(), d = await c({ token: e });
@@ -1,14 +1,24 @@
1
1
  import { withCommandRuntime as e } from "../../core/runtime.mjs";
2
2
  import { toErrorMessage as t } from "../../utils/error.mjs";
3
3
  import { clawLogger as n } from "../../utils/claw-logger.mjs";
4
- import { performLogout as r } from "../../honor-auth/logout.mjs";
4
+ import { loadConfig as r, saveConfig as i } from "../../modules/configs/config-store.mjs";
5
+ import { removeYoyoChannelAccount as a, resolveEnabledYoyoAccountId as o } from "../../modules/configs/channel.mjs";
6
+ import "../../modules/configs/index.mjs";
7
+ import { performLogout as s } from "../../honor-auth/logout.mjs";
5
8
  //#region src/cli/logout/impl.ts
6
- var i = n("logout-cli");
7
- function a(n, a) {
8
- a.command("logout").description("Logout and clear user configuration").action(async () => e(n.runtime, async () => {
9
- i.info("logout CLI command called");
9
+ var c = n("logout-cli");
10
+ function l(n, l) {
11
+ l.command("logout").description("Logout and clear user configuration").action(async () => e(n.runtime, async () => {
12
+ c.info("logout CLI command called");
13
+ let e = o();
10
14
  try {
11
- await r(), console.log("✅ Logout successful, gateway will automatically restart to handle new configuration");
15
+ await s(e);
16
+ try {
17
+ await i(a(r(), e));
18
+ } catch (t) {
19
+ c.error("failed to remove channel account after logout", t, { userId: e });
20
+ }
21
+ console.log("✅ Logout successful, gateway will automatically stop the account connection");
12
22
  } catch (e) {
13
23
  let n = t(e);
14
24
  console.error("🚫 Logout failed:", n);
@@ -16,4 +26,4 @@ function a(n, a) {
16
26
  }));
17
27
  }
18
28
  //#endregion
19
- export { a as registerLogoutCommand };
29
+ export { l as registerLogoutCommand };
@@ -21,13 +21,10 @@ function s(e) {
21
21
  send: u,
22
22
  async request(e, t) {
23
23
  let { matchResult: r, timeoutMs: i } = t, s = n();
24
- if (!await u({
25
- ...e,
26
- traceInfo: { traceId: s }
27
- })) throw Error("send failed");
24
+ if (!await u(e)) throw Error("send failed");
28
25
  return new Promise((e, t) => {
29
26
  let n = setTimeout(() => {
30
- l.has(s) && (l.delete(s), o.warn("request timeout", { traceId: s }), t(/* @__PURE__ */ Error("request timeout")));
27
+ l.has(s) && (l.delete(s), o.warn("request timeout", { requestId: s }), t(/* @__PURE__ */ Error("request timeout")));
31
28
  }, a(i));
32
29
  l.set(s, {
33
30
  timeout: n,
@@ -38,25 +35,22 @@ function s(e) {
38
35
  });
39
36
  },
40
37
  consume(e) {
41
- let t = e.payload.traceInfo?.traceId;
42
- if (!t) return;
43
- let n = l.get(t);
44
- if (n) {
38
+ for (let [t, n] of l) {
39
+ let r;
45
40
  try {
46
- let r = n.matchResult(e);
47
- if (r.matched) {
48
- if (l.delete(t), clearTimeout(n.timeout), "error" in r) {
49
- n.reject(r.error);
50
- return;
51
- }
52
- n.resolve(r.result);
53
- return;
54
- }
41
+ r = n.matchResult(e);
55
42
  } catch (e) {
56
43
  o.error("match request result failed", e);
44
+ continue;
45
+ }
46
+ if (r?.matched) {
47
+ if (l.delete(t), clearTimeout(n.timeout), "error" in r) {
48
+ n.reject(r.error);
49
+ return;
50
+ }
51
+ n.resolve(r.result);
57
52
  return;
58
53
  }
59
- o.warn("response shape not matched, keep pending", { traceId: t });
60
54
  }
61
55
  },
62
56
  destroy() {
@@ -1,26 +1,32 @@
1
- import { recordToolCallEnd as e, recordToolCallStart as t } from "../../messaging/dispatchers/stream/hooks.mjs";
1
+ import { bindToolCallContext as e, releaseToolCallContext as t } from "../../messaging/trace/tool-context.mjs";
2
+ import { resolveTurnSessionBySessionKey as n } from "../../messaging/trace/lifecycle.mjs";
3
+ import "../../messaging/trace/index.mjs";
4
+ import { recordToolCallEnd as r, recordToolCallStart as i } from "../../messaging/dispatchers/stream/hooks.mjs";
2
5
  //#region src/core/hooks/tool-trace.ts
3
- function n(n) {
4
- n.on("before_tool_call", (e, n) => {
5
- t({
6
+ function a(a) {
7
+ a.on("before_tool_call", (t, r) => {
8
+ let a = t.toolCallId ?? r.toolCallId;
9
+ i({
10
+ sessionKey: r.sessionKey,
11
+ toolName: t.toolName,
12
+ params: t.params,
13
+ toolCallId: a,
14
+ runId: t.runId ?? r.runId
15
+ });
16
+ let o = n(r.sessionKey);
17
+ a && o && e(a, o);
18
+ }), a.on("after_tool_call", (e, n) => {
19
+ r({
6
20
  sessionKey: n.sessionKey,
7
21
  toolName: e.toolName,
8
22
  params: e.params,
9
23
  toolCallId: e.toolCallId ?? n.toolCallId,
10
- runId: e.runId ?? n.runId
11
- });
12
- }), n.on("after_tool_call", (t, n) => {
13
- e({
14
- sessionKey: n.sessionKey,
15
- toolName: t.toolName,
16
- params: t.params,
17
- toolCallId: t.toolCallId ?? n.toolCallId,
18
- runId: t.runId ?? n.runId,
19
- result: t.result,
20
- error: typeof t.error == "string" ? t.error : void 0,
21
- durationMs: typeof t.durationMs == "number" ? t.durationMs : void 0
22
- });
24
+ runId: e.runId ?? n.runId,
25
+ result: e.result,
26
+ error: typeof e.error == "string" ? e.error : void 0,
27
+ durationMs: typeof e.durationMs == "number" ? e.durationMs : void 0
28
+ }), t(e.toolCallId ?? n.toolCallId);
23
29
  });
24
30
  }
25
31
  //#endregion
26
- export { n as registerToolTraceHooks };
32
+ export { a as registerToolTraceHooks };
@@ -1,24 +1,19 @@
1
1
  import { resolveAgentPromptContribution as e } from "./agent.mjs";
2
- import { resolveCloudToolPromptContribution as t } from "./cloud-tool.mjs";
3
- import { resolveSkillPromptContribution as n } from "./skill.mjs";
2
+ import { resolveSkillPromptContribution as t } from "./skill.mjs";
4
3
  //#region src/core/prompt/builder.ts
5
- function r(e) {
4
+ function n(e) {
6
5
  let t = e.filter((e) => !!e);
7
6
  return t.length > 0 ? t.join("\n\n") : void 0;
8
7
  }
9
- function i(e) {
10
- let t = r(e.map((e) => e.prependSystemContext)), n = r(e.map((e) => e.prependContext));
8
+ function r(e) {
9
+ let t = n(e.map((e) => e.prependSystemContext)), r = n(e.map((e) => e.prependContext));
11
10
  return {
12
11
  ...t ? { prependSystemContext: t } : {},
13
- ...n ? { prependContext: n } : {}
12
+ ...r ? { prependContext: r } : {}
14
13
  };
15
14
  }
16
- async function a() {
17
- return i([
18
- t(),
19
- e(),
20
- await n()
21
- ]);
15
+ async function i() {
16
+ return r([e(), await t()]);
22
17
  }
23
18
  //#endregion
24
- export { a as resolvePromptBuildContribution };
19
+ export { i as resolvePromptBuildContribution };
@@ -37,6 +37,9 @@ var r = {
37
37
  async devicePairApprove(e) {
38
38
  return this.sendRequest("device.pair.approve", { requestId: e });
39
39
  }
40
+ async restartGateway(e) {
41
+ return this.sendRequest("gateway.restart.request", { reason: e });
42
+ }
40
43
  };
41
44
  //#endregion
42
45
  export { i as default };