@burdenoff/microfe-vibecontrols 2026.526.1 → 2026.526.3

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.
@@ -5,21 +5,26 @@ import { CheckCircle2 as a, Clock as o, Database as s, Loader2 as c, Play as l,
5
5
  import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
6
6
  //#region src/components/agents/backup/AgentBackupTab.tsx
7
7
  function b(e) {
8
- return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
8
+ if (!e) return "Backup failed.";
9
+ let t = e.toLowerCase();
10
+ return t.includes("undefined is not an object") || t.includes("cannot read property") || t.includes("cannot read properties of") || /\btypeerror:/.test(t) || /\breferenceerror:/.test(t) ? e.includes("createResult.data.createFolder") ? "Backup failed: the agent could not reach the workspace files service (missing workspace context). Re-push credentials from the agent's Security tab and try again. See agent logs for the full error." : "Backup failed: the agent threw an internal error. See agent logs for the full error." : e.length > 200 ? e.slice(0, 200) + "…" : e;
9
11
  }
10
12
  function x(e) {
11
- return e < 1e3 ? `${e}ms` : `${(e / 1e3).toFixed(1)}s`;
13
+ return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
12
14
  }
13
15
  function S(e) {
16
+ return e < 1e3 ? `${e}ms` : `${(e / 1e3).toFixed(1)}s`;
17
+ }
18
+ function C(e) {
14
19
  return new Date(e).toLocaleString();
15
20
  }
16
- function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
17
- let E = e(), [D, O] = i(null), [k, A] = i(null), [j, M] = i([]), [N, P] = i(!0), [F, I] = i(null), [L, R] = i(null), [z, B] = i(null), [V, H] = i(!1), U = C.replace(/\/+$/, ""), W = n(async (e, t) => {
18
- let n = await fetch(`${U}${e}`, {
21
+ function w({ agentTunnelUrl: w, agentApiKey: T, profile: E }) {
22
+ let D = e(), [O, k] = i(null), [A, j] = i(null), [M, N] = i([]), [P, F] = i(!0), [I, L] = i(null), [R, z] = i(null), [B, V] = i(null), [H, U] = i(!1), W = w.replace(/\/+$/, ""), G = n(async (e, t) => {
23
+ let n = await fetch(`${W}${e}`, {
19
24
  ...t,
20
25
  headers: {
21
26
  "Content-Type": "application/json",
22
- "x-agent-api-key": w,
27
+ "x-agent-api-key": T,
23
28
  ...t?.headers
24
29
  }
25
30
  });
@@ -28,109 +33,117 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
28
33
  throw Error(e || `HTTP ${n.status}`);
29
34
  }
30
35
  return n.json();
31
- }, [U, w]), G = n(async () => {
36
+ }, [W, T]), K = n(async () => {
32
37
  try {
33
- P(!0), R(null);
38
+ F(!0), z(null);
34
39
  let [e, n, r] = await Promise.all([
35
- W(t(T, "/backup/config")),
36
- W(t(T, "/backup/status")),
37
- W(`${t(T, "/backup/list")}?limit=20`)
40
+ G(t(E, "/backup/config")),
41
+ G(t(E, "/backup/status")),
42
+ G(`${t(E, "/backup/list")}?limit=20`)
38
43
  ]);
39
- O(e.config), A(n.status), M(r.backups || []);
44
+ k(e.config), j(n.status), N(r.backups || []);
40
45
  } catch (e) {
41
46
  let t = e instanceof Error ? e.message : String(e);
42
- R(t === "Failed to fetch" ? `Cannot reach agent REST API at ${U}. Ensure the agent is running and its tunnel URL is accessible.` : t);
47
+ z(t === "Failed to fetch" ? `Cannot reach agent REST API at ${W}. Ensure the agent is running and its tunnel URL is accessible.` : t);
43
48
  } finally {
44
- P(!1);
49
+ F(!1);
45
50
  }
46
- }, [W, U]);
51
+ }, [G, W]);
47
52
  r(() => {
48
- G();
49
- }, [G]), r(() => {
50
- if (z) {
51
- let e = setTimeout(() => B(null), 3e3);
53
+ K();
54
+ }, [K]), r(() => {
55
+ if (B) {
56
+ let e = setTimeout(() => V(null), 3e3);
52
57
  return () => clearTimeout(e);
53
58
  }
54
- }, [z]);
55
- let K = async (e) => {
59
+ }, [B]);
60
+ let q = async (e) => {
56
61
  try {
57
- I("backup"), R(null);
58
- let n = (await W(`${t(T, "/backup/run")}?force=${e}`, { method: "POST" })).backup;
59
- n.error === "Skipped: no changes" ? B("No changes detected — backup skipped") : B(`Backup completed: ${b(n.dbSizeBytes)} in ${x(n.durationMs)}`), await G();
62
+ L("backup"), z(null);
63
+ let n = await G(`${t(E, "/backup/run")}?force=${e}`, { method: "POST" }), r = n?.backup, i = typeof n?.error == "string" && n.error || (r && typeof r.error == "string" && r.error !== "Skipped: no changes" ? r.error : null);
64
+ if (i) {
65
+ z(b(i));
66
+ return;
67
+ }
68
+ if (!r) {
69
+ z(b(""));
70
+ return;
71
+ }
72
+ r.error === "Skipped: no changes" ? V("No changes detected — backup skipped") : V(`Backup completed: ${x(r.dbSizeBytes)} in ${S(r.durationMs)}`), await K();
60
73
  } catch (e) {
61
- R(e instanceof Error ? e.message : String(e));
74
+ z(b(e instanceof Error ? e.message : String(e)));
62
75
  } finally {
63
- I(null);
76
+ L(null);
64
77
  }
65
- }, q = async (e, n) => {
78
+ }, J = async (e, n) => {
66
79
  try {
67
- I(`restore-${e}`), R(null);
68
- let r = await W(t(T, "/backup/restore"), {
80
+ L(`restore-${e}`), z(null);
81
+ let r = await G(t(E, "/backup/restore"), {
69
82
  method: "POST",
70
83
  body: JSON.stringify({
71
84
  backupId: e,
72
85
  dryRun: n
73
86
  })
74
87
  });
75
- r.success ? B(r.message) : R(r.message);
88
+ r.success ? V(r.message) : z(r.message);
76
89
  } catch (e) {
77
- R(e instanceof Error ? e.message : String(e));
90
+ z(e instanceof Error ? e.message : String(e));
78
91
  } finally {
79
- I(null);
92
+ L(null);
80
93
  }
81
- }, J = async () => {
94
+ }, Y = async () => {
82
95
  try {
83
- I("toggle");
84
- let e = await W(t(T, "/backup/config"), {
96
+ L("toggle");
97
+ let e = await G(t(E, "/backup/config"), {
85
98
  method: "PUT",
86
- body: JSON.stringify({ enabled: !D?.enabled })
99
+ body: JSON.stringify({ enabled: !O?.enabled })
87
100
  });
88
- O(e.config), B(e.config.enabled ? "Backup enabled" : "Backup disabled"), await G();
101
+ k(e.config), V(e.config.enabled ? "Backup enabled" : "Backup disabled"), await K();
89
102
  } catch (e) {
90
- R(e instanceof Error ? e.message : String(e));
103
+ z(e instanceof Error ? e.message : String(e));
91
104
  } finally {
92
- I(null);
105
+ L(null);
93
106
  }
94
- }, Y = async () => {
107
+ }, X = async () => {
95
108
  try {
96
- I("test");
97
- let e = await W(t(T, "/backup/test-connection"), { method: "POST" });
98
- e.ok ? B(`Connection OK: ${e.message}`) : R(`Connection failed: ${e.message}`);
109
+ L("test");
110
+ let e = await G(t(E, "/backup/test-connection"), { method: "POST" });
111
+ e.ok ? V(`Connection OK: ${e.message}`) : z(`Connection failed: ${e.message}`);
99
112
  } catch (e) {
100
- R(e instanceof Error ? e.message : String(e));
113
+ z(e instanceof Error ? e.message : String(e));
101
114
  } finally {
102
- I(null);
115
+ L(null);
103
116
  }
104
- }, X = async (e) => {
117
+ }, Z = async (e) => {
105
118
  try {
106
- I(`delete-${e}`), await W(t(T, `/backup/backups/${e}`), { method: "DELETE" }), B("Backup deleted"), await G();
119
+ L(`delete-${e}`), await G(t(E, `/backup/backups/${e}`), { method: "DELETE" }), V("Backup deleted"), await K();
107
120
  } catch (e) {
108
- R(e instanceof Error ? e.message : String(e));
121
+ z(e instanceof Error ? e.message : String(e));
109
122
  } finally {
110
- I(null);
123
+ L(null);
111
124
  }
112
125
  };
113
- return N ? /* @__PURE__ */ y("div", {
126
+ return P ? /* @__PURE__ */ y("div", {
114
127
  className: "flex items-center justify-center py-12 text-text-secondary",
115
- children: [/* @__PURE__ */ v(c, { className: "w-5 h-5 animate-spin mr-2" }), E("vibecontrols.agents.backup.loading", "Loading backup settings...")]
128
+ children: [/* @__PURE__ */ v(c, { className: "w-5 h-5 animate-spin mr-2" }), D("vibecontrols.agents.backup.loading", "Loading backup settings...")]
116
129
  }) : /* @__PURE__ */ y("div", {
117
130
  className: "space-y-6",
118
131
  children: [
119
- L && /* @__PURE__ */ y("div", {
132
+ R && /* @__PURE__ */ y("div", {
120
133
  className: "flex items-center gap-2 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
121
134
  children: [
122
135
  /* @__PURE__ */ v(g, { className: "w-4 h-4 shrink-0" }),
123
- L,
136
+ R,
124
137
  /* @__PURE__ */ v("button", {
125
- onClick: () => R(null),
138
+ onClick: () => z(null),
126
139
  className: "ml-auto text-xs underline",
127
140
  children: "Dismiss"
128
141
  })
129
142
  ]
130
143
  }),
131
- z && /* @__PURE__ */ y("div", {
144
+ B && /* @__PURE__ */ y("div", {
132
145
  className: "flex items-center gap-2 rounded-lg border border-status-success-border bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
133
- children: [/* @__PURE__ */ v(a, { className: "w-4 h-4 shrink-0" }), z]
146
+ children: [/* @__PURE__ */ v(a, { className: "w-4 h-4 shrink-0" }), B]
134
147
  }),
135
148
  /* @__PURE__ */ y("div", {
136
149
  className: "rounded-lg border border-border-default bg-bg-surface p-5",
@@ -141,17 +154,17 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
141
154
  className: "flex items-center gap-2",
142
155
  children: [/* @__PURE__ */ v(s, { className: "w-5 h-5 text-action-primary-bg" }), /* @__PURE__ */ v("h3", {
143
156
  className: "font-semibold text-text-primary",
144
- children: E("vibecontrols.agents.backup.title", "Database Backup")
157
+ children: D("vibecontrols.agents.backup.title", "Database Backup")
145
158
  })]
146
159
  }), /* @__PURE__ */ y("div", {
147
160
  className: "flex items-center gap-2",
148
161
  children: [/* @__PURE__ */ v("button", {
149
- onClick: G,
162
+ onClick: K,
150
163
  className: "p-2 rounded-lg hover:bg-bg-sunken transition-colors text-text-secondary",
151
164
  title: "Refresh",
152
165
  children: /* @__PURE__ */ v(u, { className: "w-4 h-4" })
153
166
  }), /* @__PURE__ */ v("button", {
154
- onClick: () => H(!V),
167
+ onClick: () => U(!H),
155
168
  className: "p-2 rounded-lg hover:bg-bg-sunken transition-colors text-text-secondary",
156
169
  title: "Settings",
157
170
  children: /* @__PURE__ */ v(f, { className: "w-4 h-4" })
@@ -163,84 +176,84 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
163
176
  children: [
164
177
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
165
178
  className: "text-xs text-text-muted mb-1",
166
- children: E("vibecontrols.agents.backup.status", "Status")
179
+ children: D("vibecontrols.agents.backup.status", "Status")
167
180
  }), /* @__PURE__ */ v("div", {
168
181
  className: "flex items-center gap-1.5",
169
- children: D?.enabled ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", { className: "h-2 w-2 rounded-full bg-status-success-bg" }), /* @__PURE__ */ v("span", {
182
+ children: O?.enabled ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", { className: "h-2 w-2 rounded-full bg-status-success-bg" }), /* @__PURE__ */ v("span", {
170
183
  className: "text-sm font-medium text-text-primary",
171
- children: E("vibecontrols.agents.backup.enabled", "Enabled")
184
+ children: D("vibecontrols.agents.backup.enabled", "Enabled")
172
185
  })] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", { className: "h-2 w-2 rounded-full bg-text-tertiary" }), /* @__PURE__ */ v("span", {
173
186
  className: "text-sm font-medium text-text-secondary",
174
- children: E("vibecontrols.agents.backup.disabled", "Disabled")
187
+ children: D("vibecontrols.agents.backup.disabled", "Disabled")
175
188
  })] })
176
189
  })] }),
177
190
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
178
191
  className: "text-xs text-text-muted mb-1",
179
- children: E("vibecontrols.agents.backup.scheduler", "Scheduler")
192
+ children: D("vibecontrols.agents.backup.scheduler", "Scheduler")
180
193
  }), /* @__PURE__ */ v("span", {
181
194
  className: "text-sm font-medium text-text-primary",
182
- children: k?.schedulerRunning ? "Running" : "Stopped"
195
+ children: A?.schedulerRunning ? "Running" : "Stopped"
183
196
  })] }),
184
197
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
185
198
  className: "text-xs text-text-muted mb-1",
186
- children: E("vibecontrols.agents.backup.totalBackups", "Total Backups")
199
+ children: D("vibecontrols.agents.backup.totalBackups", "Total Backups")
187
200
  }), /* @__PURE__ */ v("span", {
188
201
  className: "text-sm font-medium text-text-primary",
189
- children: k?.totalBackups ?? 0
202
+ children: A?.totalBackups ?? 0
190
203
  })] }),
191
204
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
192
205
  className: "text-xs text-text-muted mb-1",
193
- children: E("vibecontrols.agents.backup.target", "Target")
206
+ children: D("vibecontrols.agents.backup.target", "Target")
194
207
  }), /* @__PURE__ */ v("span", {
195
208
  className: "text-sm font-medium text-text-primary",
196
- children: k?.storageTarget ?? "N/A"
209
+ children: A?.storageTarget ?? "N/A"
197
210
  })] })
198
211
  ]
199
212
  }),
200
- k?.lastBackupTime && /* @__PURE__ */ y("div", {
213
+ A?.lastBackupTime && /* @__PURE__ */ y("div", {
201
214
  className: "flex flex-wrap items-center gap-3 text-xs text-text-muted",
202
215
  children: [/* @__PURE__ */ y("span", { children: [
203
216
  /* @__PURE__ */ v(o, { className: "w-3 h-3 inline mr-1" }),
204
217
  "Last: ",
205
- S(k.lastBackupTime)
206
- ] }), k.nextScheduledBackup && /* @__PURE__ */ y("span", { children: ["Next: ", S(k.nextScheduledBackup)] })]
218
+ C(A.lastBackupTime)
219
+ ] }), A.nextScheduledBackup && /* @__PURE__ */ y("span", { children: ["Next: ", C(A.nextScheduledBackup)] })]
207
220
  }),
208
221
  /* @__PURE__ */ y("div", {
209
222
  className: "flex flex-wrap gap-2 mt-4 pt-4 border-t border-border-subtle",
210
223
  children: [
211
224
  /* @__PURE__ */ y("button", {
212
- onClick: () => K(!0),
213
- disabled: !!F,
225
+ onClick: () => q(!0),
226
+ disabled: !!I,
214
227
  className: "flex items-center gap-2 px-3 py-1.5 rounded-lg bg-action-primary-bg text-action-primary-text text-sm font-medium hover:bg-action-primary-bg-hover disabled:opacity-50 transition-colors",
215
- children: [F === "backup" ? /* @__PURE__ */ v(c, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ v(m, { className: "w-4 h-4" }), E("vibecontrols.agents.backup.backupNow", "Backup Now")]
228
+ children: [I === "backup" ? /* @__PURE__ */ v(c, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ v(m, { className: "w-4 h-4" }), D("vibecontrols.agents.backup.backupNow", "Backup Now")]
216
229
  }),
217
230
  /* @__PURE__ */ y("button", {
218
- onClick: () => K(!1),
219
- disabled: !!F,
231
+ onClick: () => q(!1),
232
+ disabled: !!I,
220
233
  className: "flex items-center gap-2 px-3 py-1.5 rounded-lg bg-bg-sunken text-text-primary text-sm font-medium hover:bg-bg-canvas border border-border-default disabled:opacity-50 transition-colors",
221
- children: [/* @__PURE__ */ v(l, { className: "w-4 h-4" }), E("vibecontrols.agents.backup.backupIfChanged", "Backup if Changed")]
234
+ children: [/* @__PURE__ */ v(l, { className: "w-4 h-4" }), D("vibecontrols.agents.backup.backupIfChanged", "Backup if Changed")]
222
235
  }),
223
236
  /* @__PURE__ */ y("button", {
224
- onClick: J,
225
- disabled: !!F,
237
+ onClick: Y,
238
+ disabled: !!I,
226
239
  className: "flex items-center gap-2 px-3 py-1.5 rounded-lg bg-bg-sunken text-text-primary text-sm font-medium hover:bg-bg-canvas border border-border-default disabled:opacity-50 transition-colors",
227
- children: [F === "toggle" ? /* @__PURE__ */ v(c, { className: "w-4 h-4 animate-spin" }) : D?.enabled ? /* @__PURE__ */ v(g, { className: "w-4 h-4" }) : /* @__PURE__ */ v(a, { className: "w-4 h-4" }), D?.enabled ? E("vibecontrols.agents.backup.disableSchedule", "Disable Schedule") : E("vibecontrols.agents.backup.enableSchedule", "Enable Schedule")]
240
+ children: [I === "toggle" ? /* @__PURE__ */ v(c, { className: "w-4 h-4 animate-spin" }) : O?.enabled ? /* @__PURE__ */ v(g, { className: "w-4 h-4" }) : /* @__PURE__ */ v(a, { className: "w-4 h-4" }), O?.enabled ? D("vibecontrols.agents.backup.disableSchedule", "Disable Schedule") : D("vibecontrols.agents.backup.enableSchedule", "Enable Schedule")]
228
241
  }),
229
242
  /* @__PURE__ */ y("button", {
230
- onClick: Y,
231
- disabled: !!F,
243
+ onClick: X,
244
+ disabled: !!I,
232
245
  className: "flex items-center gap-2 px-3 py-1.5 rounded-lg bg-bg-sunken text-text-primary text-sm font-medium hover:bg-bg-canvas border border-border-default disabled:opacity-50 transition-colors",
233
- children: [F === "test" ? /* @__PURE__ */ v(c, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ v(h, { className: "w-4 h-4" }), E("vibecontrols.agents.backup.testConnection", "Test Connection")]
246
+ children: [I === "test" ? /* @__PURE__ */ v(c, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ v(h, { className: "w-4 h-4" }), D("vibecontrols.agents.backup.testConnection", "Test Connection")]
234
247
  })
235
248
  ]
236
249
  })
237
250
  ]
238
251
  }),
239
- V && D && /* @__PURE__ */ y("div", {
252
+ H && O && /* @__PURE__ */ y("div", {
240
253
  className: "rounded-lg border border-border-default bg-bg-surface p-5",
241
254
  children: [/* @__PURE__ */ y("h4", {
242
255
  className: "font-semibold text-text-primary mb-3 flex items-center gap-2",
243
- children: [/* @__PURE__ */ v(f, { className: "w-4 h-4" }), E("vibecontrols.agents.backup.configuration", "Configuration")]
256
+ children: [/* @__PURE__ */ v(f, { className: "w-4 h-4" }), D("vibecontrols.agents.backup.configuration", "Configuration")]
244
257
  }), /* @__PURE__ */ y("div", {
245
258
  className: "grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",
246
259
  children: [
@@ -252,7 +265,7 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
252
265
  " ",
253
266
  /* @__PURE__ */ v("span", {
254
267
  className: "text-text-primary font-medium",
255
- children: D.scheduleIntervalMs >= 36e5 ? `${D.scheduleIntervalMs / 36e5}h` : `${D.scheduleIntervalMs / 6e4}m`
268
+ children: O.scheduleIntervalMs >= 36e5 ? `${O.scheduleIntervalMs / 36e5}h` : `${O.scheduleIntervalMs / 6e4}m`
256
269
  })
257
270
  ] }),
258
271
  /* @__PURE__ */ y("div", { children: [
@@ -263,7 +276,7 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
263
276
  " ",
264
277
  /* @__PURE__ */ v("span", {
265
278
  className: "text-text-primary font-medium",
266
- children: D.changeOnlyBackup ? "On" : "Off"
279
+ children: O.changeOnlyBackup ? "On" : "Off"
267
280
  })
268
281
  ] }),
269
282
  /* @__PURE__ */ y("div", { children: [
@@ -274,10 +287,10 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
274
287
  " ",
275
288
  /* @__PURE__ */ v("span", {
276
289
  className: "text-text-primary font-medium",
277
- children: D.storageTarget
290
+ children: O.storageTarget
278
291
  })
279
292
  ] }),
280
- D.customS3 && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", { children: [
293
+ O.customS3 && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", { children: [
281
294
  /* @__PURE__ */ v("span", {
282
295
  className: "text-text-muted",
283
296
  children: "S3 Bucket:"
@@ -285,7 +298,7 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
285
298
  " ",
286
299
  /* @__PURE__ */ v("span", {
287
300
  className: "text-text-primary font-medium",
288
- children: D.customS3.bucket
301
+ children: O.customS3.bucket
289
302
  })
290
303
  ] }), /* @__PURE__ */ y("div", { children: [
291
304
  /* @__PURE__ */ v("span", {
@@ -295,10 +308,10 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
295
308
  " ",
296
309
  /* @__PURE__ */ v("span", {
297
310
  className: "text-text-primary font-medium",
298
- children: D.customS3.region
311
+ children: O.customS3.region
299
312
  })
300
313
  ] })] }),
301
- D.retentionDays && /* @__PURE__ */ y("div", { children: [
314
+ O.retentionDays && /* @__PURE__ */ y("div", { children: [
302
315
  /* @__PURE__ */ v("span", {
303
316
  className: "text-text-muted",
304
317
  children: "Retention:"
@@ -306,10 +319,10 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
306
319
  " ",
307
320
  /* @__PURE__ */ y("span", {
308
321
  className: "text-text-primary font-medium",
309
- children: [D.retentionDays, " days"]
322
+ children: [O.retentionDays, " days"]
310
323
  })
311
324
  ] }),
312
- D.maxBackups && /* @__PURE__ */ y("div", { children: [
325
+ O.maxBackups && /* @__PURE__ */ y("div", { children: [
313
326
  /* @__PURE__ */ v("span", {
314
327
  className: "text-text-muted",
315
328
  children: "Max Backups:"
@@ -317,7 +330,7 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
317
330
  " ",
318
331
  /* @__PURE__ */ v("span", {
319
332
  className: "text-text-primary font-medium",
320
- children: D.maxBackups
333
+ children: O.maxBackups
321
334
  })
322
335
  ] })
323
336
  ]
@@ -329,22 +342,22 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
329
342
  className: "font-semibold text-text-primary mb-3 flex items-center gap-2",
330
343
  children: [
331
344
  /* @__PURE__ */ v(o, { className: "w-4 h-4" }),
332
- E("vibecontrols.agents.backup.history", "Backup History"),
345
+ D("vibecontrols.agents.backup.history", "Backup History"),
333
346
  /* @__PURE__ */ y("span", {
334
347
  className: "text-xs text-text-muted font-normal",
335
348
  children: [
336
349
  "(",
337
- j.length,
350
+ M.length,
338
351
  " shown)"
339
352
  ]
340
353
  })
341
354
  ]
342
- }), j.length === 0 ? /* @__PURE__ */ v("p", {
355
+ }), M.length === 0 ? /* @__PURE__ */ v("p", {
343
356
  className: "text-sm text-text-muted py-4 text-center",
344
- children: E("vibecontrols.agents.backup.noBackups", "No backups yet. Click \"Backup Now\" to create one.")
357
+ children: D("vibecontrols.agents.backup.noBackups", "No backups yet. Click \"Backup Now\" to create one.")
345
358
  }) : /* @__PURE__ */ v("div", {
346
359
  className: "space-y-2",
347
- children: j.map((e) => /* @__PURE__ */ y("div", {
360
+ children: M.map((e) => /* @__PURE__ */ y("div", {
348
361
  className: "flex items-center justify-between p-3 rounded-lg border border-border-subtle hover:bg-bg-sunken transition-colors",
349
362
  children: [/* @__PURE__ */ y("div", {
350
363
  className: "flex items-center gap-3 min-w-0",
@@ -355,13 +368,13 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
355
368
  className: "min-w-0",
356
369
  children: [/* @__PURE__ */ v("p", {
357
370
  className: "text-sm font-medium text-text-primary truncate",
358
- children: S(e.timestamp)
371
+ children: C(e.timestamp)
359
372
  }), /* @__PURE__ */ y("p", {
360
373
  className: "text-xs text-text-muted truncate",
361
374
  children: [
362
- b(e.dbSizeBytes),
375
+ x(e.dbSizeBytes),
363
376
  " · ",
364
- x(e.durationMs),
377
+ S(e.durationMs),
365
378
  " ·",
366
379
  " ",
367
380
  e.storageTarget
@@ -372,27 +385,27 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
372
385
  className: "flex items-center gap-1 shrink-0",
373
386
  children: [
374
387
  /* @__PURE__ */ v("button", {
375
- onClick: () => q(e.id, !0),
376
- disabled: !!F,
388
+ onClick: () => J(e.id, !0),
389
+ disabled: !!I,
377
390
  className: "p-1.5 rounded hover:bg-bg-canvas text-text-secondary transition-colors",
378
391
  title: "Validate (dry run)",
379
- children: F === `restore-${e.id}` ? /* @__PURE__ */ v(c, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ v(a, { className: "w-4 h-4" })
392
+ children: I === `restore-${e.id}` ? /* @__PURE__ */ v(c, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ v(a, { className: "w-4 h-4" })
380
393
  }),
381
394
  /* @__PURE__ */ v("button", {
382
395
  onClick: () => {
383
- confirm("Restore this backup? The agent will need to restart.") && q(e.id, !1);
396
+ confirm("Restore this backup? The agent will need to restart.") && J(e.id, !1);
384
397
  },
385
- disabled: !!F,
398
+ disabled: !!I,
386
399
  className: "p-1.5 rounded hover:bg-bg-canvas text-text-secondary transition-colors",
387
400
  title: "Restore",
388
401
  children: /* @__PURE__ */ v(d, { className: "w-4 h-4" })
389
402
  }),
390
403
  /* @__PURE__ */ v("button", {
391
- onClick: () => X(e.id),
392
- disabled: !!F,
404
+ onClick: () => Z(e.id),
405
+ disabled: !!I,
393
406
  className: "p-1.5 rounded text-text-secondary transition-colors hover:bg-status-error-bg/80 hover:text-status-error-text",
394
407
  title: "Delete",
395
- children: F === `delete-${e.id}` ? /* @__PURE__ */ v(c, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ v(p, { className: "w-4 h-4" })
408
+ children: I === `delete-${e.id}` ? /* @__PURE__ */ v(c, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ v(p, { className: "w-4 h-4" })
396
409
  })
397
410
  ]
398
411
  })]
@@ -403,6 +416,6 @@ function C({ agentTunnelUrl: C, agentApiKey: w, profile: T }) {
403
416
  });
404
417
  }
405
418
  //#endregion
406
- export { C as AgentBackupTab };
419
+ export { w as AgentBackupTab };
407
420
 
408
421
  //# sourceMappingURL=AgentBackupTab.js.map