squad-openclaw 2026.2.2003 → 2026.2.2004
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/README.md +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ These directories are **completely blocked** from all filesystem operations (rea
|
|
|
31
31
|
|
|
32
32
|
| Path | Reason |
|
|
33
33
|
|---|---|
|
|
34
|
-
| `~/.openclaw/squad-ceo-data/squad-relay.json` | Contains ed25519 private key for relay device identity |
|
|
34
|
+
| `~/.openclaw/squad-ceo-data/relay/squad-relay.json` | Contains ed25519 private key for relay device identity |
|
|
35
35
|
| `~/.openclaw/*.bak` | Backup files at the top level contain unredacted config (tokens, keys) that would bypass redaction |
|
|
36
36
|
|
|
37
37
|
### Layer 2: Redacted Files (hardcoded, non-configurable)
|
|
@@ -60,7 +60,7 @@ Operators can customize via the `fs.allowedRoots` config option.
|
|
|
60
60
|
These files/directories cannot be written to, even if they fall within `allowedRoots`:
|
|
61
61
|
|
|
62
62
|
- `~/.openclaw/openclaw.json` — operator configuration (read-only with redaction)
|
|
63
|
-
- `~/.openclaw/squad-ceo-data/squad-relay.json` — relay device private key
|
|
63
|
+
- `~/.openclaw/squad-ceo-data/relay/squad-relay.json` — relay device private key
|
|
64
64
|
- All blocked directories above (credentials, devices, identity)
|
|
65
65
|
- All `.bak` files at `~/.openclaw/` top level
|
|
66
66
|
|
package/dist/index.d.ts
CHANGED
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
* │ REDACTED on read (sensitive fields replaced with "[REDACTED]"): │
|
|
22
22
|
* │ • ~/.openclaw/openclaw.json → channel.*.botToken │
|
|
23
23
|
* │ • ~/.openclaw/openclaw.json → gateway.auth.* │
|
|
24
|
-
* │ • squad-ceo-data/squad-relay.json → deviceKeys.privateKeyPem
|
|
24
|
+
* │ • squad-ceo-data/relay/squad-relay.json → deviceKeys.privateKeyPem │
|
|
25
25
|
* │ │
|
|
26
26
|
* │ WRITE-PROTECTED (no writes, deletes, or renames): │
|
|
27
27
|
* │ • ~/.openclaw/openclaw.json │
|
|
28
|
-
* │ • squad-ceo-data/squad-relay.json
|
|
28
|
+
* │ • squad-ceo-data/relay/squad-relay.json │
|
|
29
29
|
* │ • All blocked directories above │
|
|
30
30
|
* │ │
|
|
31
31
|
* │ The bundle is NOT minified to allow security auditing of the │
|
package/dist/index.js
CHANGED
|
@@ -370,7 +370,7 @@ var SENSITIVE_BLOCKED_DIRS = [
|
|
|
370
370
|
path2.join(OPENCLAW_DIR, "identity")
|
|
371
371
|
];
|
|
372
372
|
var SENSITIVE_BLOCKED_FILES = [
|
|
373
|
-
path2.join(OPENCLAW_DIR, "squad-ceo-data", "squad-relay.json")
|
|
373
|
+
path2.join(OPENCLAW_DIR, "squad-ceo-data", "relay", "squad-relay.json")
|
|
374
374
|
];
|
|
375
375
|
function isSensitivePath(resolvedPath) {
|
|
376
376
|
for (const blocked of SENSITIVE_BLOCKED_DIRS) {
|
|
@@ -1220,6 +1220,11 @@ import fs5 from "fs";
|
|
|
1220
1220
|
import path5 from "path";
|
|
1221
1221
|
import { fileURLToPath } from "url";
|
|
1222
1222
|
var PACKAGE_NAME = "squad-openclaw";
|
|
1223
|
+
var CONFIG_PATH = path5.join(
|
|
1224
|
+
process.env.HOME ?? "/root",
|
|
1225
|
+
".openclaw",
|
|
1226
|
+
"openclaw.json"
|
|
1227
|
+
);
|
|
1223
1228
|
function getCurrentVersion() {
|
|
1224
1229
|
const thisFile = fileURLToPath(import.meta.url);
|
|
1225
1230
|
const pkgPath = path5.resolve(path5.dirname(thisFile), "..", "package.json");
|
|
@@ -1279,6 +1284,18 @@ function registerVersionMethods(api) {
|
|
|
1279
1284
|
try {
|
|
1280
1285
|
const before = getCurrentVersion();
|
|
1281
1286
|
let updateOutput = "";
|
|
1287
|
+
let configBackup = null;
|
|
1288
|
+
try {
|
|
1289
|
+
configBackup = fs5.readFileSync(CONFIG_PATH, "utf-8");
|
|
1290
|
+
} catch {
|
|
1291
|
+
}
|
|
1292
|
+
try {
|
|
1293
|
+
execSync2("openclaw doctor --fix 2>&1", {
|
|
1294
|
+
timeout: 3e4,
|
|
1295
|
+
encoding: "utf-8"
|
|
1296
|
+
});
|
|
1297
|
+
} catch {
|
|
1298
|
+
}
|
|
1282
1299
|
try {
|
|
1283
1300
|
updateOutput = execSync2(
|
|
1284
1301
|
`openclaw plugins update ${PACKAGE_NAME} 2>&1`,
|
|
@@ -1291,6 +1308,12 @@ function registerVersionMethods(api) {
|
|
|
1291
1308
|
{ timeout: 12e4, encoding: "utf-8" }
|
|
1292
1309
|
);
|
|
1293
1310
|
} catch (npmErr) {
|
|
1311
|
+
if (configBackup) {
|
|
1312
|
+
try {
|
|
1313
|
+
fs5.writeFileSync(CONFIG_PATH, configBackup, "utf-8");
|
|
1314
|
+
} catch {
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1294
1317
|
const msg = npmErr instanceof Error ? npmErr.message : String(npmErr);
|
|
1295
1318
|
respond(false, {
|
|
1296
1319
|
error: `Update failed: ${msg}`,
|
|
@@ -1423,7 +1446,7 @@ function readOperatorToken() {
|
|
|
1423
1446
|
return null;
|
|
1424
1447
|
}
|
|
1425
1448
|
}
|
|
1426
|
-
var RELAY_DATA_DIR = path6.join(os.homedir(), ".openclaw", "squad-ceo-data");
|
|
1449
|
+
var RELAY_DATA_DIR = path6.join(os.homedir(), ".openclaw", "squad-ceo-data", "relay");
|
|
1427
1450
|
var RELAY_STATE_PATH = path6.join(RELAY_DATA_DIR, "squad-relay.json");
|
|
1428
1451
|
function readRelayState() {
|
|
1429
1452
|
try {
|
|
@@ -1460,7 +1483,7 @@ function loadOrCreateRelayDeviceKeys() {
|
|
|
1460
1483
|
}
|
|
1461
1484
|
function writeDeviceInfoFile(keys) {
|
|
1462
1485
|
const stateDir = process.env.OPENCLAW_STATE_DIR || path6.join(os.homedir(), ".openclaw");
|
|
1463
|
-
const infoPath = path6.join(stateDir, "squad-ceo-data", "relay-device-info.json");
|
|
1486
|
+
const infoPath = path6.join(stateDir, "squad-ceo-data", "relay", "relay-device-info.json");
|
|
1464
1487
|
const info = {
|
|
1465
1488
|
deviceId: keys.deviceId,
|
|
1466
1489
|
publicKey: keys.publicKey,
|
package/openclaw.plugin.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"type": "array",
|
|
11
11
|
"items": { "type": "string" },
|
|
12
12
|
"default": ["~/.openclaw"],
|
|
13
|
-
"description": "Restrict filesystem operations to these directories. Defaults to [\"~/.openclaw\"]. Hardcoded blocks on credentials/, devices/, identity/, squad-relay.json, and .bak files always apply."
|
|
13
|
+
"description": "Restrict filesystem operations to these directories. Defaults to [\"~/.openclaw\"]. Hardcoded blocks on credentials/, devices/, identity/, relay/squad-relay.json, and .bak files always apply."
|
|
14
14
|
},
|
|
15
15
|
"relay.enabled": {
|
|
16
16
|
"type": "boolean",
|
package/package.json
CHANGED