clawkeep 0.2.3 → 0.2.5

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.3",
3
+ "version": "0.2.5",
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": {
@@ -157,11 +157,10 @@ class BackupManager {
157
157
  freshConfig.backup.lastSync = new Date().toISOString();
158
158
  this.claw.saveConfig(freshConfig);
159
159
 
160
- // Report sync stats to cloud API (fire-and-forget)
161
- if (target === 'cloud' && transport.reportSync) {
162
- const chunkCount = freshConfig.backup.chunkCount || result.chunkCount || 0;
163
- const totalSize = result.totalSize || 0;
164
- transport.reportSync({ chunkCount, totalSize }).catch(() => {});
160
+ // Notify cloud API that a sync occurred (fire-and-forget)
161
+ // The API reads real stats from R2 — we just ping it.
162
+ if (target === 'cloud' && transport && transport.reportSync) {
163
+ transport.reportSync().catch(() => {});
165
164
  }
166
165
 
167
166
  return { ...result, lastSync: freshConfig.backup.lastSync };
@@ -182,11 +182,11 @@ class CloudTransport extends BackupTransport {
182
182
  }
183
183
 
184
184
  /**
185
- * Report sync stats to the cloud API (fire-and-forget).
185
+ * Notify the cloud API that a sync occurred (fire-and-forget).
186
+ * The API reads actual stats from R2 — we just ping it.
186
187
  */
187
- async reportSync({ chunkCount, totalSize }) {
188
+ async reportSync() {
188
189
  const url = `${this.endpoint}/api/workspaces/${this.workspace}/sync-report`;
189
- const body = JSON.stringify({ chunk_count: chunkCount, storage_bytes: totalSize });
190
190
  try {
191
191
  await new Promise((resolve, reject) => {
192
192
  const parsed = new URL(url);
@@ -204,7 +204,7 @@ class CloudTransport extends BackupTransport {
204
204
  });
205
205
  req.on('error', reject);
206
206
  req.setTimeout(15000, () => req.destroy(new Error('Sync report timeout')));
207
- req.end(body);
207
+ req.end('{}');
208
208
  });
209
209
  } catch {
210
210
  // Fire-and-forget: don't fail the sync if report fails