@honor-claw/yoyo 1.4.0-beta.8 → 1.4.0
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/honor-auth/callback-server.mjs +11 -11
- package/dist/hooks/index.mjs +4 -1
- package/dist/modules/configs/config-manager.mjs +51 -49
- package/dist/modules/configs/index.mjs +1 -0
- package/dist/modules/configs/state-flags.mjs +66 -0
- package/dist/utils/home-dir.mjs +6 -6
- package/dist/utils/version.mjs +1 -1
- package/package.json +1 -1
- package/skills/yoyo-control/SKILL.md +1 -0
- package/skills/yoyo-control/configs/sub-skills.json +8 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./assets/favicon.mjs";
|
|
2
2
|
import { ASSET_URLS as t, getResultHtml as n } from "./auth-result-html.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { URL as r } from "node:url";
|
|
4
|
+
import { createServer as i } from "http";
|
|
5
5
|
//#region src/honor-auth/callback-server.ts
|
|
6
6
|
var a = { "favicon.png": e };
|
|
7
7
|
function o(e, t) {
|
|
@@ -26,11 +26,11 @@ function s(e) {
|
|
|
26
26
|
setTimeout(() => {
|
|
27
27
|
g();
|
|
28
28
|
}, e);
|
|
29
|
-
}, y =
|
|
29
|
+
}, y = i((e, i) => {
|
|
30
30
|
try {
|
|
31
|
-
let a = new
|
|
31
|
+
let a = new r(e.url || "", `http://localhost:${c}`);
|
|
32
32
|
if (e.method !== "GET") {
|
|
33
|
-
|
|
33
|
+
i.writeHead(405, { "Content-Type": "text/html; charset=utf-8" }), i.end(n({
|
|
34
34
|
pageTitle: "请求方式不支持",
|
|
35
35
|
statusClass: "error",
|
|
36
36
|
title: "不支持的请求方式",
|
|
@@ -39,16 +39,16 @@ function s(e) {
|
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
41
|
if (a.pathname === "/favicon.ico" || a.pathname === t.favicon) {
|
|
42
|
-
o(
|
|
42
|
+
o(i, "favicon.png");
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
45
|
let s = a.searchParams.get("code") || "", l = a.searchParams.get("error") || "", d = a.searchParams.get("error_description") || a.searchParams.get("error_message") || "";
|
|
46
|
-
s && !m ? (m = !0,
|
|
46
|
+
s && !m ? (m = !0, i.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), i.end(n({
|
|
47
47
|
pageTitle: "授权成功",
|
|
48
48
|
statusClass: "success",
|
|
49
49
|
title: "登录已完成",
|
|
50
50
|
hintText: "请返回 OpenClaw,登录流程会继续完成。"
|
|
51
|
-
})), v(), u(s)) : l && !m ? (
|
|
51
|
+
})), v(), u(s)) : l && !m ? (i.writeHead(400, { "Content-Type": "text/html; charset=utf-8" }), i.end(n({
|
|
52
52
|
pageTitle: "授权失败",
|
|
53
53
|
statusClass: "error",
|
|
54
54
|
title: "未能完成授权",
|
|
@@ -62,12 +62,12 @@ function s(e) {
|
|
|
62
62
|
}] : []]
|
|
63
63
|
})), setTimeout(() => {
|
|
64
64
|
_(/* @__PURE__ */ Error(d ? `authorization failed: ${l} (${d})` : `authorization failed: ${l}`));
|
|
65
|
-
}, 120)) : m ? (
|
|
65
|
+
}, 120)) : m ? (i.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), i.end(n({
|
|
66
66
|
pageTitle: "登录已完成",
|
|
67
67
|
statusClass: "success",
|
|
68
68
|
title: "授权已经处理完成",
|
|
69
69
|
hintText: "请返回 OpenClaw,登录流程会继续完成。"
|
|
70
|
-
}))) : (
|
|
70
|
+
}))) : (i.writeHead(400, { "Content-Type": "text/html; charset=utf-8" }), i.end(n({
|
|
71
71
|
pageTitle: "授权失败",
|
|
72
72
|
statusClass: "error",
|
|
73
73
|
title: "回调参数不完整",
|
|
@@ -76,7 +76,7 @@ function s(e) {
|
|
|
76
76
|
_(/* @__PURE__ */ Error("authorization failed: no code in callback"));
|
|
77
77
|
}, 120));
|
|
78
78
|
} catch (e) {
|
|
79
|
-
console.error("authorize callback error:", e),
|
|
79
|
+
console.error("authorize callback error:", e), i.writeHead(500, { "Content-Type": "text/html; charset=utf-8" }), i.end(n({
|
|
80
80
|
pageTitle: "服务异常",
|
|
81
81
|
statusClass: "error",
|
|
82
82
|
title: "回调服务出现异常",
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -22,12 +22,15 @@ function c(e) {
|
|
|
22
22
|
}
|
|
23
23
|
function l(e) {
|
|
24
24
|
e.on("after_tool_call", async (t) => {
|
|
25
|
-
if (!(t.toolName !== "read" || t.error || !
|
|
25
|
+
if (!(t.toolName !== "read" || t.error || !u(t.params))) try {
|
|
26
26
|
await r(o, "after_tool_call:read_yoyo_control_skill"), e.logger.info("[yoyoclaw-skill-refresh] yoyo-control skill read marker updated");
|
|
27
27
|
} catch (t) {
|
|
28
28
|
e.logger.warn(`[yoyoclaw-skill-refresh] failed to update skill read marker: ${String(t)}`);
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
+
function u(e) {
|
|
33
|
+
return n(e.path) || n(e.file_path);
|
|
34
|
+
}
|
|
32
35
|
//#endregion
|
|
33
36
|
export { s as registerHooks };
|
|
@@ -5,8 +5,9 @@ import { getEnvFromProcessEnv as r } from "../../utils/env.mjs";
|
|
|
5
5
|
import { wrapError as i } from "../../utils/error.mjs";
|
|
6
6
|
import { useClawLogger as a } from "../../utils/logger.mjs";
|
|
7
7
|
import { detectProvidersToRename as o, updateProviderReferences as s } from "./provider.mjs";
|
|
8
|
+
import { STATE_FLAG as c, hasPersistedStateFlag as l, markPersistedStateFlag as u } from "./state-flags.mjs";
|
|
8
9
|
//#region src/modules/configs/config-manager.ts
|
|
9
|
-
var
|
|
10
|
+
var d = "yoyo", f = /* @__PURE__ */ "alarm.create,alarm.delete,alarm.disable,alarm.enable,alarm.query,alarm.update,app.close,app.open,call.phone,call.search,capture-screenshot,contact.search,file-upload,hotspot,local-search,message.search,message.send,mobile-data,no-disturb,quiet-mode,ringing-mode,schedule.create,schedule.delete,schedule.search,schedule.update,screen-record,vibration-mode,volume.operate,wlan,bluetooth,location-service,nfc,usb-shared-network,eyecomfort,status-bar-show,brightness,autoscreen-onnotice,dark-mode,device-operation,camera,app.uninstall,audio-record,battery,gui.create,gui.pause,gui.terminate,mcp.tool.call".split(","), p = class {
|
|
10
11
|
loadConfig() {
|
|
11
12
|
try {
|
|
12
13
|
return t().config.loadConfig();
|
|
@@ -44,7 +45,7 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
44
45
|
}
|
|
45
46
|
getUserConfig() {
|
|
46
47
|
try {
|
|
47
|
-
return this.loadConfig().plugins?.entries?.[
|
|
48
|
+
return this.loadConfig().plugins?.entries?.[d]?.config?.user;
|
|
48
49
|
} catch (e) {
|
|
49
50
|
console.error(`[claw-configs] Failed to read user config: ${e}`);
|
|
50
51
|
return;
|
|
@@ -52,7 +53,7 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
52
53
|
}
|
|
53
54
|
getEnvInfo() {
|
|
54
55
|
try {
|
|
55
|
-
let e = this.loadConfig().plugins?.entries?.[
|
|
56
|
+
let e = this.loadConfig().plugins?.entries?.[d]?.config, t = e?.envInfo;
|
|
56
57
|
if (t?.env) return t;
|
|
57
58
|
let n = e?.env;
|
|
58
59
|
if (n) return {
|
|
@@ -76,7 +77,7 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
76
77
|
}
|
|
77
78
|
getGrayTag() {
|
|
78
79
|
try {
|
|
79
|
-
return this.loadConfig().plugins?.entries?.[
|
|
80
|
+
return this.loadConfig().plugins?.entries?.[d]?.config?.gray;
|
|
80
81
|
} catch (e) {
|
|
81
82
|
console.error(`[claw-configs] Failed to read gray tag config: ${e}`);
|
|
82
83
|
return;
|
|
@@ -84,7 +85,7 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
84
85
|
}
|
|
85
86
|
getDeviceConfig() {
|
|
86
87
|
try {
|
|
87
|
-
return this.loadConfig().plugins?.entries?.[
|
|
88
|
+
return this.loadConfig().plugins?.entries?.[d]?.config?.device;
|
|
88
89
|
} catch (e) {
|
|
89
90
|
console.error(`[claw-configs] Failed to read device config: ${e}`);
|
|
90
91
|
return;
|
|
@@ -92,17 +93,17 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
92
93
|
}
|
|
93
94
|
async updateDeviceConfig(e) {
|
|
94
95
|
try {
|
|
95
|
-
let t = this.loadConfig(), n = t.plugins?.entries?.[
|
|
96
|
+
let t = this.loadConfig(), n = t.plugins?.entries?.[d]?.config?.device || {}, r = {
|
|
96
97
|
...t,
|
|
97
98
|
plugins: {
|
|
98
99
|
...t.plugins,
|
|
99
100
|
entries: {
|
|
100
101
|
...t.plugins?.entries,
|
|
101
|
-
[
|
|
102
|
-
...t.plugins?.entries?.[
|
|
102
|
+
[d]: {
|
|
103
|
+
...t.plugins?.entries?.[d],
|
|
103
104
|
enabled: !0,
|
|
104
105
|
config: {
|
|
105
|
-
...t.plugins?.entries?.[
|
|
106
|
+
...t.plugins?.entries?.[d]?.config,
|
|
106
107
|
device: {
|
|
107
108
|
...n,
|
|
108
109
|
...e
|
|
@@ -125,11 +126,11 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
125
126
|
...t.plugins,
|
|
126
127
|
entries: {
|
|
127
128
|
...t.plugins?.entries,
|
|
128
|
-
[
|
|
129
|
-
...t.plugins?.entries?.[
|
|
129
|
+
[d]: {
|
|
130
|
+
...t.plugins?.entries?.[d],
|
|
130
131
|
enabled: !0,
|
|
131
132
|
config: {
|
|
132
|
-
...t.plugins?.entries?.[
|
|
133
|
+
...t.plugins?.entries?.[d]?.config,
|
|
133
134
|
envInfo: {
|
|
134
135
|
env: e,
|
|
135
136
|
source: "manual"
|
|
@@ -147,7 +148,7 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
147
148
|
}
|
|
148
149
|
async resetEnv() {
|
|
149
150
|
try {
|
|
150
|
-
let e = this.loadConfig(), t = e.plugins?.entries?.[
|
|
151
|
+
let e = this.loadConfig(), t = e.plugins?.entries?.[d]?.config?.envInfo;
|
|
151
152
|
if (!t?.env) return;
|
|
152
153
|
let n = {
|
|
153
154
|
...e,
|
|
@@ -155,11 +156,11 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
155
156
|
...e.plugins,
|
|
156
157
|
entries: {
|
|
157
158
|
...e.plugins?.entries,
|
|
158
|
-
[
|
|
159
|
-
...e.plugins?.entries?.[
|
|
159
|
+
[d]: {
|
|
160
|
+
...e.plugins?.entries?.[d],
|
|
160
161
|
enabled: !0,
|
|
161
162
|
config: {
|
|
162
|
-
...e.plugins?.entries?.[
|
|
163
|
+
...e.plugins?.entries?.[d]?.config,
|
|
163
164
|
envInfo: {
|
|
164
165
|
env: t.env,
|
|
165
166
|
source: "env"
|
|
@@ -182,11 +183,11 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
182
183
|
...t.plugins,
|
|
183
184
|
entries: {
|
|
184
185
|
...t.plugins?.entries,
|
|
185
|
-
[
|
|
186
|
-
...t.plugins?.entries?.[
|
|
186
|
+
[d]: {
|
|
187
|
+
...t.plugins?.entries?.[d],
|
|
187
188
|
enabled: !0,
|
|
188
189
|
config: {
|
|
189
|
-
...t.plugins?.entries?.[
|
|
190
|
+
...t.plugins?.entries?.[d]?.config,
|
|
190
191
|
...e && { gray: e }
|
|
191
192
|
}
|
|
192
193
|
}
|
|
@@ -206,11 +207,11 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
206
207
|
...t.plugins,
|
|
207
208
|
entries: {
|
|
208
209
|
...t.plugins?.entries,
|
|
209
|
-
[
|
|
210
|
-
...t.plugins?.entries?.[
|
|
210
|
+
[d]: {
|
|
211
|
+
...t.plugins?.entries?.[d],
|
|
211
212
|
enabled: !0,
|
|
212
213
|
config: {
|
|
213
|
-
...t.plugins?.entries?.[
|
|
214
|
+
...t.plugins?.entries?.[d]?.config,
|
|
214
215
|
user: e
|
|
215
216
|
}
|
|
216
217
|
}
|
|
@@ -230,10 +231,10 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
230
231
|
...e.plugins,
|
|
231
232
|
entries: {
|
|
232
233
|
...e.plugins?.entries,
|
|
233
|
-
[
|
|
234
|
-
...e.plugins?.entries?.[
|
|
234
|
+
[d]: {
|
|
235
|
+
...e.plugins?.entries?.[d],
|
|
235
236
|
config: {
|
|
236
|
-
...e.plugins?.entries?.[
|
|
237
|
+
...e.plugins?.entries?.[d]?.config,
|
|
237
238
|
user: void 0
|
|
238
239
|
}
|
|
239
240
|
}
|
|
@@ -247,30 +248,26 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
247
248
|
}
|
|
248
249
|
async initializePluginConfig(t) {
|
|
249
250
|
try {
|
|
250
|
-
let i = this.loadConfig(), c = i.plugins?.allow || [],
|
|
251
|
-
|
|
252
|
-
...l,
|
|
253
|
-
watchDebounceMs: v.watchDebounceMs ?? u
|
|
254
|
-
} : v, x = i.plugins?.entries?.[t]?.config?.envInfo, S = i.plugins?.entries?.[t]?.config?.env, C = !!(x?.env || S), w = r(), T = !!x?.env && x.source === "env", E = !x?.env && !!S || T && w && x.env !== w, D = !C || E, O = {
|
|
255
|
-
env: w || S || (e() ? "test" : "production"),
|
|
251
|
+
let i = this.loadConfig(), d = i.skills || {}, p = d.load || {}, m = p.watch === !0, h = !m || await l(c.DISABLE_SKILLS_LOAD_WATCH_MIGRATION_DONE), g = i.plugins?.allow || [], _ = !g.includes(t), v = g.includes(t) ? g : [...g, t], y = i.gateway?.nodes?.allowCommands || [], b = Array.from(new Set([...y, ...f])), x = !n(y, b), S = m && !h, C = i.plugins?.entries?.[t]?.config?.envInfo, w = i.plugins?.entries?.[t]?.config?.env, T = !!(C?.env || w), E = r(), D = !!C?.env && C.source === "env", O = !C?.env && !!w || D && E && C.env !== E, k = !T || O, A = {
|
|
252
|
+
env: E || w || (e() ? "test" : "production"),
|
|
256
253
|
source: "env"
|
|
257
|
-
},
|
|
258
|
-
...
|
|
259
|
-
envInfo:
|
|
254
|
+
}, j = i.plugins?.entries?.[t]?.config || {}, M = k ? {
|
|
255
|
+
...j,
|
|
256
|
+
envInfo: A,
|
|
260
257
|
env: void 0
|
|
261
|
-
} :
|
|
262
|
-
if (
|
|
263
|
-
let
|
|
258
|
+
} : j, N = i.plugins?.entries?.[t]?.enabled !== !0, P = o(i), F = Object.keys(P).length > 0;
|
|
259
|
+
if (F && a().info(`[claw-configs] Found ${Object.keys(P).length} providers to rename: ${Object.entries(P).map(([e, t]) => `${e} -> ${t}`).join(", ")}`), !_ && !x && !S && !k && !N && !F) return;
|
|
260
|
+
let I = {
|
|
264
261
|
...i,
|
|
265
262
|
plugins: {
|
|
266
263
|
...i.plugins,
|
|
267
|
-
allow:
|
|
264
|
+
allow: v,
|
|
268
265
|
entries: {
|
|
269
266
|
...i.plugins?.entries,
|
|
270
267
|
[t]: {
|
|
271
268
|
...i.plugins?.entries?.[t],
|
|
272
269
|
enabled: !0,
|
|
273
|
-
config:
|
|
270
|
+
config: M
|
|
274
271
|
}
|
|
275
272
|
}
|
|
276
273
|
},
|
|
@@ -278,22 +275,27 @@ var c = "yoyo", l = { watch: !0 }, u = 250, d = /* @__PURE__ */ "alarm.create,al
|
|
|
278
275
|
...i.gateway,
|
|
279
276
|
nodes: {
|
|
280
277
|
...i.gateway?.nodes,
|
|
281
|
-
allowCommands:
|
|
278
|
+
allowCommands: b
|
|
282
279
|
}
|
|
283
|
-
},
|
|
284
|
-
skills: {
|
|
285
|
-
..._,
|
|
286
|
-
load: b
|
|
287
280
|
}
|
|
288
281
|
};
|
|
289
|
-
|
|
282
|
+
S && (I = {
|
|
283
|
+
...I,
|
|
284
|
+
skills: {
|
|
285
|
+
...d,
|
|
286
|
+
load: {
|
|
287
|
+
...p,
|
|
288
|
+
watch: !1
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}, a().info("[claw-configs] Disabled skills.load.watch for yoyo migration")), F && (I = s(I, P), a().info("[claw-configs] Provider renaming completed")), await this.saveConfig(I), S && await u(c.DISABLE_SKILLS_LOAD_WATCH_MIGRATION_DONE);
|
|
290
292
|
} catch (e) {
|
|
291
293
|
throw i(e, "failed to initialize plugin config");
|
|
292
294
|
}
|
|
293
295
|
}
|
|
294
|
-
},
|
|
295
|
-
function
|
|
296
|
-
return
|
|
296
|
+
}, m = null;
|
|
297
|
+
function h() {
|
|
298
|
+
return m ||= new p(), m;
|
|
297
299
|
}
|
|
298
300
|
//#endregion
|
|
299
|
-
export {
|
|
301
|
+
export { p as ConfigManager, h as getConfigManager };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useClawLogger as e } from "../../utils/logger.mjs";
|
|
2
|
+
import { SafeFsError as t, safeReadFile as n, safeWriteFile as r } from "../../utils/fs-safe.mjs";
|
|
3
|
+
import { resolveEffectiveHomeDir as i } from "../../utils/home-dir.mjs";
|
|
4
|
+
import a from "node:path";
|
|
5
|
+
//#region src/modules/configs/state-flags.ts
|
|
6
|
+
var o = { DISABLE_SKILLS_LOAD_WATCH_MIGRATION_DONE: "disableSkillsLoadWatchMigrationDone" }, s = ".openclaw", c = "yoyo", l = "state.json", u = 64 * 1024;
|
|
7
|
+
function d() {
|
|
8
|
+
return a.join(s, c, l);
|
|
9
|
+
}
|
|
10
|
+
async function f(r) {
|
|
11
|
+
try {
|
|
12
|
+
let e = await n({
|
|
13
|
+
rootDir: r,
|
|
14
|
+
relativePath: d(),
|
|
15
|
+
maxBytes: u
|
|
16
|
+
});
|
|
17
|
+
return v(JSON.parse(e.buffer.toString("utf8")));
|
|
18
|
+
} catch (n) {
|
|
19
|
+
return n instanceof t && n.code === "not-found" || e().warn(`[yoyo-state] failed to read state: ${String(n)}`), null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async function p() {
|
|
23
|
+
let t = i();
|
|
24
|
+
return t ? f(t) : (e().warn("[yoyo-state] failed to find home dir"), null);
|
|
25
|
+
}
|
|
26
|
+
async function m(t) {
|
|
27
|
+
let n = i();
|
|
28
|
+
if (!n) return e().warn("[yoyo-state] failed to find home dir"), null;
|
|
29
|
+
let a = {
|
|
30
|
+
...await f(n) ?? _(),
|
|
31
|
+
version: 1
|
|
32
|
+
};
|
|
33
|
+
return t.flags && (a.flags = {
|
|
34
|
+
...a.flags,
|
|
35
|
+
...y(t.flags)
|
|
36
|
+
}), await r({
|
|
37
|
+
rootDir: n,
|
|
38
|
+
relativePath: d(),
|
|
39
|
+
data: JSON.stringify(a, null, 2),
|
|
40
|
+
encoding: "utf8",
|
|
41
|
+
mkdir: !0
|
|
42
|
+
}), a;
|
|
43
|
+
}
|
|
44
|
+
async function h(e) {
|
|
45
|
+
return (await p())?.flags?.[e] === !0;
|
|
46
|
+
}
|
|
47
|
+
async function g(e) {
|
|
48
|
+
return m({ flags: { [e]: !0 } });
|
|
49
|
+
}
|
|
50
|
+
function _() {
|
|
51
|
+
return { version: 1 };
|
|
52
|
+
}
|
|
53
|
+
function v(e) {
|
|
54
|
+
return !e || typeof e != "object" || Array.isArray(e) ? _() : {
|
|
55
|
+
..._(),
|
|
56
|
+
flags: y(e.flags)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function y(e) {
|
|
60
|
+
if (!e || typeof e != "object" || Array.isArray(e)) return;
|
|
61
|
+
let t = {};
|
|
62
|
+
for (let [n, r] of Object.entries(e)) typeof r == "boolean" && (t[n] = r);
|
|
63
|
+
return Object.keys(t).length > 0 ? t : void 0;
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { o as STATE_FLAG, p as getPersistedPluginState, h as hasPersistedStateFlag, g as markPersistedStateFlag, m as updatePersistedPluginState };
|
package/dist/utils/home-dir.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { existsSync as e } from "node:fs";
|
|
2
2
|
import t from "node:path";
|
|
3
|
-
import
|
|
4
|
-
import r from "node:
|
|
3
|
+
import n from "node:os";
|
|
4
|
+
import { fileURLToPath as r } from "node:url";
|
|
5
5
|
//#region src/utils/home-dir.ts
|
|
6
6
|
function i(e) {
|
|
7
7
|
return e?.trim() || void 0;
|
|
8
8
|
}
|
|
9
|
-
function a(
|
|
10
|
-
let i = t.dirname(n
|
|
9
|
+
function a(n = import.meta.url) {
|
|
10
|
+
let i = t.dirname(r(n));
|
|
11
11
|
for (; i !== t.dirname(i);) {
|
|
12
12
|
if (e(t.join(i, "package.json"))) return i;
|
|
13
13
|
i = t.dirname(i);
|
|
14
14
|
}
|
|
15
15
|
return i;
|
|
16
16
|
}
|
|
17
|
-
function o(e = process.env,
|
|
18
|
-
let i = s(e,
|
|
17
|
+
function o(e = process.env, r = n.homedir) {
|
|
18
|
+
let i = s(e, r);
|
|
19
19
|
return i ? t.resolve(i) : void 0;
|
|
20
20
|
}
|
|
21
21
|
function s(e, t) {
|
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.4.0
|
|
4
|
+
return e === null && (e = "1.4.0".includes("beta") || "1.4.0".includes("alpha")), !!e;
|
|
5
5
|
}
|
|
6
6
|
//#endregion
|
|
7
7
|
export { t as isBetaVersion };
|
package/package.json
CHANGED
|
@@ -204,6 +204,7 @@ metadata: { "openclaw": { "emoji": "📱", "always": true } }
|
|
|
204
204
|
| 节点离线 | 重新执行 `nodes status --json` 确认 | 否 |
|
|
205
205
|
| 权限拒绝 | 检查 `gateway.nodes.allowCommands` 配置 | 否 |
|
|
206
206
|
| 节点不支持该能力 | 重新执行读取 `SKILL.md` 确认 | 是(最多 1 次) |
|
|
207
|
+
| 格式错误 | 严格按照4.1中定义的命令格式检查单双引号和转义字符 | 否 |
|
|
207
208
|
|
|
208
209
|
如果发送错误**必须强制执行**重新读取 `SKILL.md` 和 对应的工具定义文件,并重新执行。
|
|
209
210
|
3 次重试均失败后,停止重试,向用户报告错误诊断并建议手动处理。
|
|
@@ -50,5 +50,12 @@
|
|
|
50
50
|
"clean_dirty",
|
|
51
51
|
"create_flight_monitor_task",
|
|
52
52
|
"query_flight_monitor_task",
|
|
53
|
-
"express_logistics_search"
|
|
53
|
+
"express_logistics_search",
|
|
54
|
+
"desktop",
|
|
55
|
+
"createTimer",
|
|
56
|
+
"queryTimer",
|
|
57
|
+
"pauseTimer",
|
|
58
|
+
"resumeTimer",
|
|
59
|
+
"restartTimer",
|
|
60
|
+
"cancelTimer"
|
|
54
61
|
]
|