rol-websocket-channel 1.1.4 → 1.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rol-websocket-channel",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Unified OpenClaw plugin: MQTT Channel + Admin Bridge for remote management",
5
5
  "license": "MIT",
6
6
  "author": "nixgnehc",
@@ -240,9 +240,10 @@ async function runOpenClawSkillCommand(
240
240
  const options = buildOpenClawExecOptions(cwd, openclawRoot);
241
241
  const openclawBin = process.env.OPENCLAW_BIN || '';
242
242
  const openclawHome = options.env?.OPENCLAW_HOME || '';
243
+ const home = options.env?.HOME || '';
243
244
 
244
245
  console.log(
245
- `[skills] exec start: command=${command}, args=${JSON.stringify(args)}, cwd=${cwd}, OPENCLAW_BIN=${openclawBin}, OPENCLAW_HOME=${openclawHome}`
246
+ `[skills] exec start: command=${command}, args=${JSON.stringify(args)}, cwd=${cwd}, OPENCLAW_BIN=${openclawBin}, OPENCLAW_HOME=${openclawHome}, HOME=${home}`
246
247
  );
247
248
 
248
249
  try {
@@ -259,7 +260,7 @@ async function runOpenClawSkillCommand(
259
260
  const stdout = typeof err?.stdout === 'string' ? err.stdout : '';
260
261
  const stderr = typeof err?.stderr === 'string' ? err.stderr : '';
261
262
  console.error(
262
- `[skills] exec failed: command=${command}, args=${JSON.stringify(args)}, cwd=${cwd}, OPENCLAW_BIN=${openclawBin}, OPENCLAW_HOME=${openclawHome}, stdout=${JSON.stringify(stdout)}, stderr=${JSON.stringify(stderr)}`
263
+ `[skills] exec failed: command=${command}, args=${JSON.stringify(args)}, cwd=${cwd}, OPENCLAW_BIN=${openclawBin}, OPENCLAW_HOME=${openclawHome}, HOME=${home}, stdout=${JSON.stringify(stdout)}, stderr=${JSON.stringify(stderr)}`
263
264
  );
264
265
  throw new JsonRpcException(
265
266
  JSON_RPC_ERRORS.internalError,
@@ -324,6 +325,13 @@ function buildOpenClawExecOptions(
324
325
  if (openclawHome) {
325
326
  env.OPENCLAW_HOME = openclawHome;
326
327
  }
328
+ if (openclawRoot && path.basename(path.resolve(openclawRoot)) === '.openclaw') {
329
+ const home = path.dirname(path.resolve(openclawRoot));
330
+ env.HOME = home;
331
+ if (process.platform === 'win32') {
332
+ env.USERPROFILE = home;
333
+ }
334
+ }
327
335
 
328
336
  if (process.platform === 'win32') {
329
337
  return {