clawkeep 0.2.0 → 0.2.1

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": "clawkeep",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Private, encrypted backups with time-travel restore. Zero-knowledge protection for AI agents, configs, and everything you care about.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -166,7 +166,15 @@ class CloudTransport extends BackupTransport {
166
166
  accessKey: creds.access_key_id,
167
167
  secretKey: creds.secret_access_key,
168
168
  });
169
- this._inner = new S3Transport(s3, creds.prefix || `workspaces/${this.workspace}/`);
169
+ // API returns prefix like "workspaces/ws_xxx/" which is the R2 base path.
170
+ // SyncManager already prepends workspaceId to all paths (e.g. "ws_xxx/manifest.enc"),
171
+ // so we use the API prefix minus the trailing workspaceId to avoid doubling.
172
+ let prefix = creds.prefix || '';
173
+ const wsSuffix = this.workspace + '/';
174
+ if (prefix.endsWith(wsSuffix)) {
175
+ prefix = prefix.slice(0, -wsSuffix.length);
176
+ }
177
+ this._inner = new S3Transport(s3, prefix);
170
178
  const expiresAt = creds.expires_at || data.expires_at;
171
179
  this._credsExpiry = expiresAt
172
180
  ? new Date(expiresAt).getTime()