@honor-claw/yoyo 1.3.0-beta.6 → 1.3.0-beta.8
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.
|
@@ -167,7 +167,7 @@ var r = { style: "SOUL.md" }, i = "[yoyoclaw-channel]", a = class {
|
|
|
167
167
|
this.sendMessage("deviceControl", t, n, "", void 0, o), e().info(`${i} auto pair is completed, requestId: ${r}`);
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
|
-
e().debug?.(`${i} trans gateway msg to cloud, session: ${t}, data: ${r.slice(0,
|
|
170
|
+
e().debug?.(`${i} trans gateway msg to cloud, session: ${t}, data: ${r.slice(0, 3e3)}`), this.sendMessage("userMessage", t, n, r) || (e().error(`${i} failed to send message, cloud socket closed, session ${t}, device ${s}`), this.sessionManager.closeNodeGatewayClient(t));
|
|
171
171
|
} catch (t) {
|
|
172
172
|
e().error(`${i} failed to handle gateway message: ${String(t)}`);
|
|
173
173
|
}
|
|
@@ -12,7 +12,7 @@ function s(e) {
|
|
|
12
12
|
return JSON.stringify(f(e));
|
|
13
13
|
}
|
|
14
14
|
function c(e) {
|
|
15
|
-
return e.length === 0 ? "" : a("md5").update(s(e)).digest("hex");
|
|
15
|
+
return e.length === 0 ? "" : a("md5").update(s(p(e))).digest("hex");
|
|
16
16
|
}
|
|
17
17
|
async function l(n) {
|
|
18
18
|
try {
|
|
@@ -67,5 +67,8 @@ function f(e) {
|
|
|
67
67
|
}
|
|
68
68
|
return t;
|
|
69
69
|
}
|
|
70
|
+
function p(e) {
|
|
71
|
+
return e.toSorted((e, t) => e.id.localeCompare(t.id));
|
|
72
|
+
}
|
|
70
73
|
//#endregion
|
|
71
74
|
export { c as computeDeviceToolSetMd5, u as getDeviceToolSetChangeState, d as writeToolSetMd5Entry };
|
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
import { useClawLogger as e } from "../../utils/logger.mjs";
|
|
2
1
|
//#region src/modules/device-toolset/normalize.ts
|
|
3
|
-
function
|
|
2
|
+
function e(e) {
|
|
4
3
|
return typeof e == "string" && e.trim() ? e : void 0;
|
|
5
4
|
}
|
|
6
|
-
function
|
|
7
|
-
if (!
|
|
8
|
-
let
|
|
9
|
-
if (!
|
|
10
|
-
if (!Array.isArray(
|
|
11
|
-
return
|
|
5
|
+
function t(t) {
|
|
6
|
+
if (!t || typeof t != "object") throw Error("DeviceToolSet payload must be an object");
|
|
7
|
+
let n = t;
|
|
8
|
+
if (!e(n.nodeId)) throw Error("DeviceToolSet payload missing nodeId");
|
|
9
|
+
if (!Array.isArray(n.toolSet)) throw Error("DeviceToolSet payload toolSet must be an array");
|
|
10
|
+
return t;
|
|
12
11
|
}
|
|
13
|
-
function
|
|
14
|
-
let t = e.nodeId, n = /* @__PURE__ */ new Map(),
|
|
12
|
+
function n(e) {
|
|
13
|
+
let t = e.nodeId, n = /* @__PURE__ */ new Map(), i = 0;
|
|
15
14
|
for (let t of e.toolSet) {
|
|
16
|
-
let e =
|
|
17
|
-
e ? n.set(e.name, e) :
|
|
15
|
+
let e = r(t);
|
|
16
|
+
e ? n.set(e.name, e) : i += 1;
|
|
18
17
|
}
|
|
19
18
|
return {
|
|
20
19
|
nodeId: t,
|
|
21
20
|
tools: Array.from(n.values()),
|
|
22
|
-
skippedCount:
|
|
21
|
+
skippedCount: i
|
|
23
22
|
};
|
|
24
23
|
}
|
|
25
|
-
function
|
|
26
|
-
let n = t
|
|
27
|
-
if (!n ||
|
|
24
|
+
function r(t) {
|
|
25
|
+
let n = e(t.tool?.id), r = e(t.tool?.function?.name), i = e(t.tool?.function?.description);
|
|
26
|
+
if (!n || t.tool?.type !== "function" || !r || !i) return;
|
|
28
27
|
let a = {
|
|
29
28
|
id: n,
|
|
30
29
|
type: "function",
|
|
31
30
|
name: r,
|
|
32
31
|
description: i
|
|
33
32
|
};
|
|
34
|
-
|
|
35
|
-
let o = t
|
|
33
|
+
t.tool.function?.inputSchema && (a.inputSchema = t.tool.function.inputSchema), t.tool.function?.outputSchema && (a.outputSchema = t.tool.function.outputSchema), t.tool.function?.examples && (a.examples = t.tool.function.examples);
|
|
34
|
+
let o = e(t.executeParams?.pkgName);
|
|
36
35
|
return o && (a.pkgName = o), a;
|
|
37
36
|
}
|
|
38
37
|
//#endregion
|
|
39
|
-
export {
|
|
38
|
+
export { t as assertDeviceToolSetPayload, n as normalizeDeviceToolSet };
|
|
@@ -3,7 +3,7 @@ import { YOYO_CONTROL_SKILL_READ_MARKER_RELATIVE_PATH as t } from "./consts.mjs"
|
|
|
3
3
|
import n from "node:path";
|
|
4
4
|
import r from "node:fs/promises";
|
|
5
5
|
//#region src/modules/device-toolset/skill-refresh-marker.ts
|
|
6
|
-
var i = /(?:^|[\\/])skills[\\/]yoyo-control[\\/]SKILL\.md$/i, a, o = "## Mandatory yoyo_phone_control skill refresh\n\
|
|
6
|
+
var i = /(?:^|[\\/])skills[\\/]yoyo-control[\\/]SKILL\.md$/i, a, o = "## Mandatory yoyo_phone_control skill refresh\n\nThis is a one-shot instruction for the same user message that contains this notice.\n\nThe yoyo_phone_control skill changed after your cached context was built. If that same user message involves or may involve phone control:\n\n1. Your next tool call MUST read exactly skills/yoyo-control/SKILL.md.\n2. Until that read succeeds, DO NOT read skills/yoyo-control/references/*, read skills/yoyo-control/mcptools/*, run openclaw commands, or invoke any phone-control action.\n3. Ignore all previously cached yoyo_phone_control instructions, tool tables, reference paths, command formats, and parameter schemas. They are stale even if they look relevant.\n4. After reading SKILL.md, use only the freshly read workflow to decide which reference or tool definition file to read next.\n\nThis instruction expires as soon as you either successfully read skills/yoyo-control/SKILL.md or finish responding to that same user message. If you see this notice only in conversation history, and it is not included in the latest user message you are answering, ignore it and do not re-read SKILL.md because of this old notice.\n\nThinking or saying that you should re-read the skill is not enough while this one-shot instruction is active; the first phone-control tool call after the active notice must be the SKILL.md read.";
|
|
7
7
|
function s(e) {
|
|
8
8
|
return typeof e == "string" && i.test(e);
|
|
9
9
|
}
|
package/dist/utils/version.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/utils/version.ts
|
|
2
2
|
var e = null;
|
|
3
3
|
function t() {
|
|
4
|
-
return e === null && (e = "1.3.0-beta.
|
|
4
|
+
return e === null && (e = "1.3.0-beta.8".includes("beta") || "1.3.0-beta.8".includes("alpha")), !!e;
|
|
5
5
|
}
|
|
6
6
|
//#endregion
|
|
7
7
|
export { t as isBetaVersion };
|