rol-websocket-channel 1.0.9 → 1.1.1
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# OpenClaw MQTT API 文档
|
|
1
|
+
# OpenClaw MQTT API 文档 (配对逻辑更新)
|
|
2
2
|
|
|
3
3
|
## 消息格式
|
|
4
4
|
|
|
@@ -1654,3 +1654,5 @@ openclaw admin-bridge pair <key> --endpoint https://api.deotaland.ai
|
|
|
1654
1654
|
实际效果是:线上默认更安全,线下切环境更显式,安装器不再因为环境变量读取拦截 pairing 文件。
|
|
1655
1655
|
|
|
1656
1656
|
---
|
|
1657
|
+
|
|
1658
|
+
```
|
package/package.json
CHANGED
|
@@ -236,9 +236,10 @@ async function runOpenClawSkillCommand(
|
|
|
236
236
|
cwd: string
|
|
237
237
|
): Promise<{ stdout: string; stderr: string; parsed: JsonValue | null }> {
|
|
238
238
|
const command = process.env.OPENCLAW_BIN || 'openclaw';
|
|
239
|
+
const options = buildOpenClawExecOptions(cwd);
|
|
239
240
|
|
|
240
241
|
try {
|
|
241
|
-
const { stdout, stderr } = await execFileAsync(command, args,
|
|
242
|
+
const { stdout, stderr } = await execFileAsync(command, args, options);
|
|
242
243
|
return {
|
|
243
244
|
stdout,
|
|
244
245
|
stderr,
|
|
@@ -273,11 +274,10 @@ function parseJsonOutput(stdout: string): JsonValue | null {
|
|
|
273
274
|
|
|
274
275
|
async function queryOpenClawSkills(context: MethodContext): Promise<unknown[]> {
|
|
275
276
|
const command = process.env.OPENCLAW_BIN || 'openclaw';
|
|
277
|
+
const options = buildOpenClawExecOptions(context.projectRoot);
|
|
276
278
|
|
|
277
279
|
try {
|
|
278
|
-
const { stdout } = await execFileAsync(command, ['skills', 'list', '--json'],
|
|
279
|
-
cwd: context.projectRoot
|
|
280
|
-
});
|
|
280
|
+
const { stdout } = await execFileAsync(command, ['skills', 'list', '--json'], options);
|
|
281
281
|
const parsed = JSON.parse(stdout) as unknown;
|
|
282
282
|
|
|
283
283
|
if (Array.isArray(parsed)) {
|
|
@@ -300,6 +300,17 @@ async function queryOpenClawSkills(context: MethodContext): Promise<unknown[]> {
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
+
function buildOpenClawExecOptions(cwd: string): { cwd: string; shell?: boolean } {
|
|
304
|
+
if (process.platform === 'win32') {
|
|
305
|
+
return {
|
|
306
|
+
cwd,
|
|
307
|
+
shell: true
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
return { cwd };
|
|
312
|
+
}
|
|
313
|
+
|
|
303
314
|
function normalizeCliSkill(
|
|
304
315
|
skill: unknown,
|
|
305
316
|
skillState: {
|