squad-openclaw 2026.2.1815 → 2026.2.1817
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/index.d.ts +1 -1
- package/dist/index.js +49 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides:
|
|
5
5
|
* - In-memory entity registry with filesystem watching (entity_list, entity_search, entity_sync)
|
|
6
|
-
* - Filesystem tools for remote clients (fs_read, fs_write, fs_list)
|
|
6
|
+
* - Filesystem tools for remote clients (fs_read, fs_write, fs_list, fs_delete)
|
|
7
7
|
* - Version check and self-update gateway methods (squad.version.*)
|
|
8
8
|
* - Cloud relay client for remote browser access (relay-client)
|
|
9
9
|
*/
|
package/dist/index.js
CHANGED
|
@@ -773,6 +773,41 @@ function registerFilesystemTools(api) {
|
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
775
|
});
|
|
776
|
+
api.registerTool({
|
|
777
|
+
name: "fs_delete",
|
|
778
|
+
label: "Delete File or Directory",
|
|
779
|
+
description: "Delete a file or directory from the server filesystem. For directories, removes recursively. Supports ~ for home directory expansion.",
|
|
780
|
+
parameters: {
|
|
781
|
+
type: "object",
|
|
782
|
+
properties: {
|
|
783
|
+
path: {
|
|
784
|
+
type: "string",
|
|
785
|
+
description: "Absolute or ~-prefixed path to the file or directory to delete"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
required: ["path"]
|
|
789
|
+
},
|
|
790
|
+
async execute(_id, params) {
|
|
791
|
+
try {
|
|
792
|
+
const targetPath = validatePath(params.path, allowedRoots);
|
|
793
|
+
const stat = fs3.statSync(targetPath);
|
|
794
|
+
const wasDirectory = stat.isDirectory();
|
|
795
|
+
if (wasDirectory) {
|
|
796
|
+
fs3.rmSync(targetPath, { recursive: true });
|
|
797
|
+
} else {
|
|
798
|
+
fs3.unlinkSync(targetPath);
|
|
799
|
+
}
|
|
800
|
+
return ok({
|
|
801
|
+
path: targetPath,
|
|
802
|
+
deleted: true,
|
|
803
|
+
type: wasDirectory ? "directory" : "file"
|
|
804
|
+
});
|
|
805
|
+
} catch (e) {
|
|
806
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
807
|
+
return err(`fs_delete failed: ${msg}`);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
});
|
|
776
811
|
}
|
|
777
812
|
|
|
778
813
|
// src/version.ts
|
|
@@ -1254,7 +1289,7 @@ var RelayClient = class {
|
|
|
1254
1289
|
}
|
|
1255
1290
|
/** Route a message from the relay to the appropriate user's local WS */
|
|
1256
1291
|
routeToUser(userId, innerMsg) {
|
|
1257
|
-
|
|
1292
|
+
let msg = innerMsg;
|
|
1258
1293
|
if (msg.type === "event" && typeof msg.event === "string" && msg.event.startsWith("relay.")) {
|
|
1259
1294
|
if (msg.event === "relay.user.connected") {
|
|
1260
1295
|
console.log(`[relay-client] User ${userId} connected via relay \u2014 creating local WS`);
|
|
@@ -1274,6 +1309,19 @@ var RelayClient = class {
|
|
|
1274
1309
|
conn = this.userConnections.get(userId);
|
|
1275
1310
|
if (!conn) return;
|
|
1276
1311
|
}
|
|
1312
|
+
if (msg._e2e && conn.e2e) {
|
|
1313
|
+
try {
|
|
1314
|
+
const plaintext = conn.e2e.decrypt({
|
|
1315
|
+
ciphertext: msg.ciphertext,
|
|
1316
|
+
iv: msg.iv,
|
|
1317
|
+
tag: msg.tag
|
|
1318
|
+
});
|
|
1319
|
+
msg = JSON.parse(plaintext);
|
|
1320
|
+
} catch (err2) {
|
|
1321
|
+
console.error(`[relay-client] E2E decrypt error for ${userId}:`, err2);
|
|
1322
|
+
return;
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1277
1325
|
if (msg.type === "req" && msg.method === "connect") {
|
|
1278
1326
|
if (conn.connectHandshakeComplete) {
|
|
1279
1327
|
console.log(`[relay-client] New connect from ${userId} \u2014 creating fresh local WS for handshake`);
|
package/openclaw.plugin.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"fs.allowedRoots": {
|
|
10
10
|
"type": "array",
|
|
11
11
|
"items": { "type": "string" },
|
|
12
|
-
"description": "Restrict fs_read/fs_write/fs_list to these directories. Empty or omitted = allow all."
|
|
12
|
+
"description": "Restrict fs_read/fs_write/fs_list/fs_delete to these directories. Empty or omitted = allow all."
|
|
13
13
|
},
|
|
14
14
|
"relay.enabled": {
|
|
15
15
|
"type": "boolean",
|
package/package.json
CHANGED