squad-openclaw 2026.2.1816 → 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 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
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squad-openclaw",
3
- "version": "2026.2.1816",
3
+ "version": "2026.2.1817",
4
4
  "description": "Entity registry, filesystem tools, and version management plugin for OpenClaw gateway",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",