@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.
- package/dist/apis/claw-cloud.mjs +0 -19
- package/dist/capabilities/admin/impl.mjs +19 -0
- package/dist/capabilities/node/invoke.mjs +27 -22
- package/dist/capabilities/routing/index.mjs +1 -0
- package/dist/capabilities/routing/restart.mjs +17 -0
- package/dist/cli/index.mjs +2 -2
- package/dist/cli/login/impl.mjs +1 -1
- package/dist/cli/logout/impl.mjs +17 -7
- package/dist/cloud-channel/dispatcher/impl.mjs +13 -19
- package/dist/core/hooks/tool-trace.mjs +24 -18
- package/dist/core/prompt/builder.mjs +8 -13
- package/dist/gateway/client/admin.mjs +3 -0
- package/dist/honor-auth/browser/result-page.mjs +125 -75
- package/dist/honor-auth/logout.mjs +6 -6
- package/dist/index.mjs +1 -1
- package/dist/messaging/dispatchers/stream/error.mjs +13 -0
- package/dist/messaging/inbound/context.mjs +4 -1
- package/dist/messaging/trace/index.mjs +1 -0
- package/dist/messaging/trace/lifecycle.mjs +17 -12
- package/dist/messaging/trace/storage.mjs +26 -24
- package/dist/messaging/trace/tool-context.mjs +30 -0
- package/dist/modules/configs/channel.mjs +12 -3
- package/dist/modules/configs/plugin-init.mjs +36 -44
- package/dist/tools/index.mjs +5 -5
- package/dist/tools/plugin-restart/tool.mjs +44 -0
- package/dist/utils/object.mjs +8 -0
- package/dist/utils/version.mjs +21 -16
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/yoyo-phone-control/SKILL.md +6 -78
- package/skills/yoyo-phone-control/mcptools/airplane_mode.json +1 -10
- package/skills/yoyo-phone-control/mcptools/autoscreen_onnotice.json +1 -10
- package/skills/yoyo-phone-control/mcptools/battery.json +8 -8
- package/skills/yoyo-phone-control/mcptools/bluetooth.json +1 -10
- package/skills/yoyo-phone-control/mcptools/call.json +6 -11
- package/skills/yoyo-phone-control/mcptools/camera.json +2 -3
- package/skills/yoyo-phone-control/mcptools/cancel_countdown_timer.json +2 -3
- package/skills/yoyo-phone-control/mcptools/capture_screenshot.json +1 -2
- package/skills/yoyo-phone-control/mcptools/check_alarm.json +2 -3
- package/skills/yoyo-phone-control/mcptools/check_countdown_timer.json +2 -3
- package/skills/yoyo-phone-control/mcptools/check_schedule.json +2 -3
- package/skills/yoyo-phone-control/mcptools/check_todo.json +2 -3
- package/skills/yoyo-phone-control/mcptools/clean_dirty.json +1 -2
- package/skills/yoyo-phone-control/mcptools/close_alarm.json +4 -5
- package/skills/yoyo-phone-control/mcptools/close_app.json +4 -5
- package/skills/yoyo-phone-control/mcptools/close_countdown_timer.json +2 -3
- package/skills/yoyo-phone-control/mcptools/create_alarm.json +6 -3
- package/skills/yoyo-phone-control/mcptools/create_countdown_timer.json +2 -3
- package/skills/yoyo-phone-control/mcptools/create_schedule.json +2 -3
- package/skills/yoyo-phone-control/mcptools/create_todo.json +2 -3
- package/skills/yoyo-phone-control/mcptools/dark_mode.json +1 -10
- package/skills/yoyo-phone-control/mcptools/delete_alarm.json +5 -6
- package/skills/yoyo-phone-control/mcptools/delete_schedule.json +5 -6
- package/skills/yoyo-phone-control/mcptools/delete_todo.json +1 -1
- package/skills/yoyo-phone-control/mcptools/device_operation.json +2 -3
- package/skills/yoyo-phone-control/mcptools/express_logistics_query.json +2 -2
- package/skills/yoyo-phone-control/mcptools/eyecomfort.json +1 -10
- package/skills/yoyo-phone-control/mcptools/flashlight.json +1 -2
- package/skills/yoyo-phone-control/mcptools/get_user_location.json +2 -2
- package/skills/yoyo-phone-control/mcptools/hotspot.json +1 -10
- package/skills/yoyo-phone-control/mcptools/hover_button.json +1 -10
- package/skills/yoyo-phone-control/mcptools/location_service.json +9 -10
- package/skills/yoyo-phone-control/mcptools/mobile_data.json +1 -10
- package/skills/yoyo-phone-control/mcptools/modify_schedule.json +5 -6
- package/skills/yoyo-phone-control/mcptools/modify_todo.json +1 -1
- package/skills/yoyo-phone-control/mcptools/musicFeedbackAction.json +2 -2
- package/skills/yoyo-phone-control/mcptools/nfc.json +1 -10
- package/skills/yoyo-phone-control/mcptools/no_disturb.json +1 -6
- package/skills/yoyo-phone-control/mcptools/open_alarm.json +5 -6
- package/skills/yoyo-phone-control/mcptools/open_app.json +6 -7
- package/skills/yoyo-phone-control/mcptools/open_payment_code.json +16 -16
- package/skills/yoyo-phone-control/mcptools/open_transport_code.json +4 -4
- package/skills/yoyo-phone-control/mcptools/operateMusic.json +2 -2
- package/skills/yoyo-phone-control/mcptools/operateVideo.json +2 -2
- package/skills/yoyo-phone-control/mcptools/pause_countdown_timer.json +2 -3
- package/skills/yoyo-phone-control/mcptools/playMusic.json +3 -3
- package/skills/yoyo-phone-control/mcptools/playNews.json +2 -2
- package/skills/yoyo-phone-control/mcptools/playVideo.json +3 -3
- package/skills/yoyo-phone-control/mcptools/quiet_mode.json +1 -2
- package/skills/yoyo-phone-control/mcptools/record.json +1 -2
- package/skills/yoyo-phone-control/mcptools/restart_countdown_timer.json +2 -3
- package/skills/yoyo-phone-control/mcptools/resume_countdown_timer.json +2 -3
- package/skills/yoyo-phone-control/mcptools/ringing_mode.json +1 -2
- package/skills/yoyo-phone-control/mcptools/scan_code.json +1 -2
- package/skills/yoyo-phone-control/mcptools/screen_recorder.json +1 -6
- package/skills/yoyo-phone-control/mcptools/search_contact.json +1 -2
- package/skills/yoyo-phone-control/mcptools/search_message.json +1 -2
- package/skills/yoyo-phone-control/mcptools/setMusicPlayMode.json +2 -2
- package/skills/yoyo-phone-control/mcptools/status_bar_show.json +1 -10
- package/skills/yoyo-phone-control/mcptools/switchMusic.json +2 -2
- package/skills/yoyo-phone-control/mcptools/uninstall_app.json +4 -5
- package/skills/yoyo-phone-control/mcptools/usb_shared_network.json +1 -10
- package/skills/yoyo-phone-control/mcptools/vibration_mode.json +1 -10
- package/skills/yoyo-phone-control/mcptools/volume.json +1 -10
- package/skills/yoyo-phone-control/mcptools/wlan.json +1 -10
- package/skills/yoyo-phone-control/references/gui-task-create.md +23 -15
- package/skills/yoyo-phone-control/references/{local_user_data_qa.md → local-user-data-qa.md} +33 -49
- package/skills/yoyo-phone-control/references/{local_user_file_search.md → local-user-file-search.md} +27 -27
- package/skills/yoyo-phone-control/references/{task_result_query.md → task-result-query.md} +2 -2
- package/skills/yoyo-update/SKILL.md +55 -11
- package/dist/capabilities/cloud-invoke/index.mjs +0 -1
- package/dist/capabilities/cloud-invoke/invoke.mjs +0 -43
- package/dist/core/prompt/cloud-tool.mjs +0 -7
- package/dist/tools/cloud-invoke/tool.mjs +0 -48
- package/dist/utils/array.mjs +0 -6
- package/skills/yoyo-smart-home/SKILL.md +0 -78
- package/skills/yoyo-smart-home/mcptools/device_control.json +0 -136
- package/skills/yoyo-smart-home/mcptools/device_query.json +0 -114
- package/skills/yoyo-smart-home/mcptools/skill_exit.json +0 -6
- /package/dist/tools/{cloud-invoke → plugin-restart}/index.mjs +0 -0
package/dist/apis/claw-cloud.mjs
CHANGED
|
@@ -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
|
|
7
|
-
async function
|
|
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
|
-
|
|
18
|
-
|
|
18
|
+
} },
|
|
19
|
+
...a ? { traceInfo: a } : {}
|
|
20
|
+
}, c = n();
|
|
21
|
+
return r.forAccount(c).request(o, {
|
|
19
22
|
timeoutMs: e.timeoutMs,
|
|
20
|
-
matchResult:
|
|
23
|
+
matchResult: s(e.toolCallId)
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
matched: !
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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 {
|
|
45
|
+
export { o as invokeNodeTool };
|
|
@@ -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 };
|
package/dist/cli/index.mjs
CHANGED
|
@@ -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
|
|
14
|
-
r(a, s), i(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
|
package/dist/cli/login/impl.mjs
CHANGED
|
@@ -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
|
|
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 });
|
package/dist/cli/logout/impl.mjs
CHANGED
|
@@ -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 {
|
|
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
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
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 {
|
|
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", {
|
|
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
|
|
42
|
-
|
|
43
|
-
let n = l.get(t);
|
|
44
|
-
if (n) {
|
|
38
|
+
for (let [t, n] of l) {
|
|
39
|
+
let r;
|
|
45
40
|
try {
|
|
46
|
-
|
|
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 {
|
|
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
|
|
4
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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 {
|
|
32
|
+
export { a as registerToolTraceHooks };
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
import { resolveAgentPromptContribution as e } from "./agent.mjs";
|
|
2
|
-
import {
|
|
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
|
|
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
|
|
10
|
-
let t =
|
|
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
|
-
...
|
|
12
|
+
...r ? { prependContext: r } : {}
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
|
-
async function
|
|
17
|
-
return
|
|
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 {
|
|
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 };
|