openclaw-workspace-sync 2.2.0 → 2.3.0

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,6 +1,10 @@
1
1
  {
2
2
  "id": "openclaw-workspace-sync",
3
3
  "uiHints": {
4
+ "sync": {
5
+ "label": "Sync Settings",
6
+ "help": "Nested sync config (preferred). Same fields as flat config: provider, mode, interval, etc."
7
+ },
4
8
  "provider": {
5
9
  "label": "Cloud Provider",
6
10
  "help": "Cloud storage provider for workspace sync"
@@ -123,12 +127,54 @@
123
127
  "label": "rclone Options",
124
128
  "help": "Key-value pairs passed directly to rclone config",
125
129
  "advanced": true
130
+ },
131
+ "backup.enabled": {
132
+ "label": "Enable Backups",
133
+ "help": "Encrypted snapshot backups to cloud storage"
134
+ },
135
+ "backup.provider": {
136
+ "label": "Backup Provider",
137
+ "help": "Cloud provider for backup storage (can differ from sync provider). Defaults to the sync provider."
138
+ },
139
+ "backup.bucket": {
140
+ "label": "Backup Bucket",
141
+ "help": "S3/R2 bucket name for backup snapshots"
142
+ },
143
+ "backup.prefix": {
144
+ "label": "Backup Prefix",
145
+ "placeholder": "habibi/",
146
+ "help": "Path prefix within the bucket for this agent's snapshots"
147
+ },
148
+ "backup.interval": {
149
+ "label": "Backup Interval (seconds)",
150
+ "placeholder": "86400",
151
+ "help": "How often to create backups (default: 86400 = daily)"
152
+ },
153
+ "backup.encrypt": {
154
+ "label": "Encrypt Backups",
155
+ "help": "Encrypt snapshots with AES-256 before upload"
156
+ },
157
+ "backup.passphrase": {
158
+ "label": "Encryption Passphrase",
159
+ "sensitive": true,
160
+ "help": "Passphrase for backup encryption. Use env var: ${BACKUP_PASSPHRASE}"
161
+ },
162
+ "backup.include": {
163
+ "label": "Backup Include",
164
+ "help": "What to include: workspace, config, cron, memory, sessions, credentials, skills, hooks, extensions, env, agents, pages, transcripts"
165
+ },
166
+ "backup.retain": {
167
+ "label": "Retention",
168
+ "help": "Number of snapshots to keep, or { daily: N, weekly: N, monthly: N }"
126
169
  }
127
170
  },
128
171
  "configSchema": {
129
172
  "type": "object",
130
- "additionalProperties": false,
131
173
  "properties": {
174
+ "sync": {
175
+ "type": "object",
176
+ "description": "Nested sync config (preferred). Contains the same fields as the flat config: provider, mode, interval, remotePath, etc."
177
+ },
132
178
  "provider": {
133
179
  "type": "string",
134
180
  "enum": [
@@ -196,6 +242,81 @@
196
242
  "copySymlinks": {
197
243
  "type": "boolean"
198
244
  },
245
+ "backup": {
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "properties": {
249
+ "enabled": { "type": "boolean" },
250
+ "provider": {
251
+ "type": "string",
252
+ "enum": ["dropbox", "gdrive", "onedrive", "s3", "custom"]
253
+ },
254
+ "remoteName": { "type": "string" },
255
+ "configPath": { "type": "string" },
256
+ "remotePath": { "type": "string" },
257
+ "bucket": { "type": "string" },
258
+ "prefix": { "type": "string" },
259
+ "interval": { "type": "number", "minimum": 0 },
260
+ "encrypt": { "type": "boolean" },
261
+ "passphrase": { "type": "string" },
262
+ "include": {
263
+ "type": "array",
264
+ "items": {
265
+ "type": "string",
266
+ "enum": ["workspace", "config", "cron", "memory", "sessions", "credentials", "skills", "hooks", "extensions", "env", "agents", "pages", "transcripts"]
267
+ }
268
+ },
269
+ "retain": {
270
+ "description": "Number of snapshots to keep, or {daily, weekly, monthly} object for tiered retention"
271
+ },
272
+ "exclude": {
273
+ "type": "array",
274
+ "items": { "type": "string" }
275
+ },
276
+ "s3": {
277
+ "type": "object",
278
+ "properties": {
279
+ "endpoint": { "type": "string" },
280
+ "bucket": { "type": "string" },
281
+ "region": { "type": "string" },
282
+ "accessKeyId": { "type": "string" },
283
+ "secretAccessKey": { "type": "string" }
284
+ }
285
+ },
286
+ "dropbox": {
287
+ "type": "object",
288
+ "properties": {
289
+ "appFolder": { "type": "boolean" },
290
+ "appKey": { "type": "string" },
291
+ "appSecret": { "type": "string" },
292
+ "token": { "type": "string" }
293
+ }
294
+ },
295
+ "gdrive": {
296
+ "type": "object",
297
+ "properties": {
298
+ "token": { "type": "string" },
299
+ "teamDrive": { "type": "string" },
300
+ "rootFolderId": { "type": "string" }
301
+ }
302
+ },
303
+ "onedrive": {
304
+ "type": "object",
305
+ "properties": {
306
+ "token": { "type": "string" },
307
+ "driveId": { "type": "string" },
308
+ "driveType": { "type": "string", "enum": ["personal", "business", "sharepoint"] }
309
+ }
310
+ },
311
+ "custom": {
312
+ "type": "object",
313
+ "properties": {
314
+ "rcloneType": { "type": "string" },
315
+ "rcloneOptions": { "type": "object", "additionalProperties": { "type": "string" } }
316
+ }
317
+ }
318
+ }
319
+ },
199
320
  "s3": {
200
321
  "type": "object",
201
322
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-workspace-sync",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Workspace cloud sync via rclone — mailbox (inbox/outbox), mirror, or bisync (Dropbox, Google Drive, S3, OneDrive, 70+ providers)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -80,7 +80,7 @@ Lists files in the configured cloud storage path.
80
80
 
81
81
  ## Configuration
82
82
 
83
- Workspace sync is configured via the plugin entry in `openclaw.json`:
83
+ Workspace sync is configured via the plugin entry in `openclaw.json`. The preferred format uses nested `sync` and `backup` blocks (flat config at root level is also supported):
84
84
 
85
85
  ```json
86
86
  {
@@ -89,15 +89,17 @@ Workspace sync is configured via the plugin entry in `openclaw.json`:
89
89
  "openclaw-workspace-sync": {
90
90
  "enabled": true,
91
91
  "config": {
92
- "provider": "dropbox",
93
- "mode": "mailbox",
94
- "remotePath": "",
95
- "localPath": "/",
96
- "interval": 60,
97
- "timeout": 1800,
98
- "onSessionStart": true,
99
- "onSessionEnd": true,
100
- "exclude": [".git/**", "node_modules/**", "*.log"]
92
+ "sync": {
93
+ "provider": "dropbox",
94
+ "mode": "mailbox",
95
+ "remotePath": "",
96
+ "localPath": "/",
97
+ "interval": 60,
98
+ "timeout": 1800,
99
+ "onSessionStart": true,
100
+ "onSessionEnd": true,
101
+ "exclude": [".git/**", "node_modules/**", "*.log"]
102
+ }
101
103
  }
102
104
  }
103
105
  }
@@ -107,6 +109,8 @@ Workspace sync is configured via the plugin entry in `openclaw.json`:
107
109
 
108
110
  ### Config keys
109
111
 
112
+ These keys live under `sync` in the nested format, or at the config root in flat format.
113
+
110
114
  | Key | Default | Description |
111
115
  |-----|---------|-------------|
112
116
  | `provider` | `"off"` | `dropbox`, `gdrive`, `onedrive`, `s3`, `custom`, or `off` |
@@ -179,3 +183,46 @@ rclone ls cloud:openclaw-share
179
183
  - Only `**/.DS_Store` excluded by default — add your own excludes in config
180
184
  - Sync operations run in background (no LLM tokens used)
181
185
  - All rclone activity is logged at info level for visibility
186
+
187
+ ## Encrypted backups
188
+
189
+ Add a `backup` block to the plugin config for automated encrypted snapshots to your own cloud storage (S3, R2, B2, etc.). Backups stream directly (`tar | rclone rcat`) — no local temp files, so they work even when disk space is tight.
190
+
191
+ ### Backup commands
192
+
193
+ ```bash
194
+ openclaw workspace-sync backup now # Create a snapshot immediately
195
+ openclaw workspace-sync backup list # List available snapshots
196
+ openclaw workspace-sync backup restore # Restore latest snapshot
197
+ openclaw workspace-sync backup status # Check backup service status
198
+ ```
199
+
200
+ ### Backup config
201
+
202
+ ```json
203
+ {
204
+ "backup": {
205
+ "enabled": true,
206
+ "provider": "s3",
207
+ "bucket": "my-backups",
208
+ "prefix": "agent-name/",
209
+ "interval": 86400,
210
+ "encrypt": true,
211
+ "passphrase": "${BACKUP_PASSPHRASE}",
212
+ "include": ["workspace", "config", "cron", "memory"],
213
+ "retain": { "daily": 7, "weekly": 4 }
214
+ }
215
+ }
216
+ ```
217
+
218
+ | Key | Default | Description |
219
+ |-----|---------|-------------|
220
+ | `enabled` | `false` | Enable scheduled backups |
221
+ | `provider` | parent provider | Cloud provider (can differ from sync provider) |
222
+ | `bucket` | — | S3/R2 bucket name |
223
+ | `prefix` | `""` | Path prefix within the bucket |
224
+ | `interval` | `86400` | Backup interval in seconds (clamped to min 300) |
225
+ | `encrypt` | `false` | AES-256 client-side encryption |
226
+ | `passphrase` | — | Encryption passphrase (use env var) |
227
+ | `include` | `["workspace", "config", "cron", "memory"]` | What to back up |
228
+ | `retain` | `7` | Keep N snapshots, or `{ daily: N, weekly: N }` |