@burdenoff/microfe-subscriberbot 2026.827.1 → 2026.829.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.
Files changed (56) hide show
  1. package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
  2. package/dist/subscriberbot/admin/AdminDashboardPage.js +80 -83
  3. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  4. package/dist/subscriberbot/hooks/index.d.ts +1 -0
  5. package/dist/subscriberbot/hooks/index.d.ts.map +1 -1
  6. package/dist/subscriberbot/hooks/index.js +1 -0
  7. package/dist/subscriberbot/hooks/useTr.d.ts +17 -0
  8. package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -0
  9. package/dist/subscriberbot/hooks/useTr.js +14 -0
  10. package/dist/subscriberbot/hooks/useTr.js.map +1 -0
  11. package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
  12. package/dist/subscriberbot/pages/AssetVaultPage.js +111 -109
  13. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  14. package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
  15. package/dist/subscriberbot/pages/DashboardPage.js +113 -105
  16. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  17. package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
  18. package/dist/subscriberbot/pages/InboxPage.js +404 -369
  19. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  20. package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
  21. package/dist/subscriberbot/pages/InsightsPage.js +94 -93
  22. package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
  23. package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
  24. package/dist/subscriberbot/pages/InvoicesPage.js +360 -366
  25. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  26. package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
  27. package/dist/subscriberbot/pages/WorkflowsPage.js +209 -193
  28. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
  29. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
  30. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +268 -236
  31. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  32. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
  33. package/dist/subscriberbot/pages/agents/AgentNewPage.js +96 -76
  34. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  35. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
  36. package/dist/subscriberbot/pages/agents/AgentsListPage.js +145 -161
  37. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  38. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
  39. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +514 -441
  40. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  41. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
  42. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +167 -129
  43. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  44. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
  45. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +171 -218
  46. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  47. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
  48. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +340 -279
  49. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  50. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
  51. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +185 -166
  52. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  53. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
  54. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +153 -182
  55. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  56. package/package.json +1 -1
@@ -9,17 +9,28 @@ import { ErrorView as l, LoadingView as u, Section as d } from "../../components
9
9
  import { Timeline as f } from "../../components/viz.js";
10
10
  import "../../components/index.js";
11
11
  import { useAgent as p, useCreatePolicy as m, useSetAgentStatus as h } from "../../hooks/useSubscriberBotApi.js";
12
- import { useState as g } from "react";
13
- import { ArrowLeft as _, ArrowLeftRight as v, Bot as y, Building2 as b, Clock as x, ConciergeBell as S, DollarSign as C, Handshake as w, History as T, ListChecks as E, Mail as D, Plus as O, RefreshCw as k, Search as A, ShieldCheck as j, SlidersHorizontal as M, Zap as N } from "lucide-react";
14
- import { useParams as P } from "react-router";
15
- import { jsx as F, jsxs as I } from "react/jsx-runtime";
16
- import { GlassCard as L } from "@burdenoff/fe-libs/ui";
12
+ import { useTr as g } from "../../hooks/useTr.js";
13
+ import { useState as _ } from "react";
14
+ import { ArrowLeft as v, ArrowLeftRight as y, Bot as b, Building2 as x, Clock as S, ConciergeBell as C, DollarSign as w, Handshake as T, History as E, ListChecks as D, Mail as O, Plus as k, RefreshCw as A, Search as j, ShieldCheck as M, SlidersHorizontal as N, Zap as P } from "lucide-react";
15
+ import { useParams as F } from "react-router";
16
+ import { jsx as I, jsxs as L } from "react/jsx-runtime";
17
+ import { GlassCard as R } from "@burdenoff/fe-libs/ui";
17
18
  //#region src/subscriberbot/pages/agents/AgentDetailPage.tsx
18
- var R = [
19
+ var z = [
19
20
  "DISABLED",
20
21
  "SUGGEST_ONLY",
21
22
  "AUTONOMOUS"
22
- ], z = [
23
+ ], B = {
24
+ DISCOVERY: "agents.kinds.discovery",
25
+ RENEWAL: "agents.kinds.renewal",
26
+ COST: "agents.kinds.cost",
27
+ NEWSLETTER: "agents.kinds.newsletter",
28
+ VENDOR: "agents.kinds.vendor",
29
+ COMPLIANCE: "agents.kinds.compliance",
30
+ NEGOTIATION: "agents.kinds.negotiation",
31
+ MIGRATION: "agents.kinds.migration",
32
+ CONCIERGE: "agents.kinds.concierge"
33
+ }, V = [
23
34
  "ALERT",
24
35
  "CREATE_TASK",
25
36
  "RENEW",
@@ -27,18 +38,18 @@ var R = [
27
38
  "PAUSE",
28
39
  "UPGRADE",
29
40
  "DOWNGRADE"
30
- ], B = {
31
- DISCOVERY: A,
32
- RENEWAL: k,
33
- COST: C,
34
- NEWSLETTER: D,
35
- VENDOR: b,
36
- COMPLIANCE: j,
37
- NEGOTIATION: w,
38
- MIGRATION: v,
39
- CONCIERGE: S
41
+ ], H = {
42
+ DISCOVERY: j,
43
+ RENEWAL: A,
44
+ COST: w,
45
+ NEWSLETTER: O,
46
+ VENDOR: x,
47
+ COMPLIANCE: M,
48
+ NEGOTIATION: T,
49
+ MIGRATION: y,
50
+ CONCIERGE: C
40
51
  };
41
- function V(e) {
52
+ function U(e) {
42
53
  switch (e) {
43
54
  case "RENEW":
44
55
  case "UPGRADE": return "positive";
@@ -49,169 +60,182 @@ function V(e) {
49
60
  default: return "default";
50
61
  }
51
62
  }
52
- var H = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", U = "mb-1 block text-xs font-medium text-text-secondary";
53
- function W(e) {
63
+ var W = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", G = "mb-1 block text-xs font-medium text-text-secondary";
64
+ function K(e) {
54
65
  let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
55
66
  return t.charAt(0).toUpperCase() + t.slice(1);
56
67
  }
57
- function G(e) {
58
- return e == null ? "—" : typeof e == "string" ? e : typeof e == "number" ? i(e) : typeof e == "boolean" ? e ? "Yes" : "No" : Array.isArray(e) ? e.map(G).join(", ") : JSON.stringify(e);
68
+ function q(e) {
69
+ return e == null ? "—" : typeof e == "string" ? e : typeof e == "number" ? i(e) : typeof e == "boolean" ? e ? "Yes" : "No" : Array.isArray(e) ? e.map(q).join(", ") : JSON.stringify(e);
59
70
  }
60
- function K(e) {
71
+ function J(e) {
61
72
  return !e || Array.isArray(e) ? [] : Object.entries(e).filter(([, e]) => e != null && e !== "").map(([e, t]) => ({
62
73
  key: e,
63
- value: G(t)
74
+ value: q(t)
64
75
  }));
65
76
  }
66
- function q({ enabled: e }) {
67
- return /* @__PURE__ */ I("span", {
77
+ function Y({ enabled: e }) {
78
+ let t = g();
79
+ return /* @__PURE__ */ L("span", {
68
80
  className: e ? "inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle px-2.5 py-0.5 text-xs font-medium text-status-success-text" : "inline-flex items-center gap-1.5 rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary",
69
- children: [/* @__PURE__ */ F("span", {
81
+ children: [/* @__PURE__ */ I("span", {
70
82
  "aria-hidden": !0,
71
83
  className: "size-1.5 rounded-full bg-current",
72
84
  style: { opacity: e ? 1 : .6 }
73
- }), e ? "Enabled" : "Disabled"]
85
+ }), e ? t("agents.detail.enabled", "Enabled") : t("agents.detail.disabled", "Disabled")]
74
86
  });
75
87
  }
76
- function J({ agentId: e, onClose: t }) {
77
- let n = m(), [r, i] = g(""), [a, o] = g("ALERT"), [s, l] = g(""), [u, d] = g(""), [f, p] = g(!0), [h, _] = g(null);
78
- return /* @__PURE__ */ F(c, {
79
- title: "Add policy",
88
+ function X({ agentId: e, onClose: t }) {
89
+ let n = g(), i = m(), [a, o] = _(""), [s, l] = _("ALERT"), [u, d] = _(""), [f, p] = _(""), [h, v] = _(!0), [y, b] = _(null);
90
+ return /* @__PURE__ */ I(c, {
91
+ title: n("agents.policyModal.title", "Add policy"),
80
92
  onClose: t,
81
93
  maxWidthClassName: "max-w-xl",
82
- children: /* @__PURE__ */ I("form", {
83
- onSubmit: (i) => {
84
- if (i.preventDefault(), _(null), !r.trim()) {
85
- _("A policy name is required.");
94
+ children: /* @__PURE__ */ L("form", {
95
+ onSubmit: (r) => {
96
+ if (r.preventDefault(), b(null), !a.trim()) {
97
+ b(n("agents.policyModal.nameRequired", "A policy name is required."));
86
98
  return;
87
99
  }
88
100
  let o;
89
- if (u.trim()) try {
90
- o = JSON.parse(u);
101
+ if (f.trim()) try {
102
+ o = JSON.parse(f);
91
103
  } catch {
92
- _("Condition must be valid JSON (e.g. {\"amountOver\": 100}).");
104
+ b(n("agents.policyModal.conditionInvalid", "Condition must be valid JSON (e.g. {\"amountOver\": 100})."));
93
105
  return;
94
106
  }
95
- n.mutate({
107
+ i.mutate({
96
108
  agentId: e,
97
- name: r.trim(),
98
- action: a,
99
- isEnabled: f,
100
- ...s.trim() ? { description: s.trim() } : {},
109
+ name: a.trim(),
110
+ action: s,
111
+ isEnabled: h,
112
+ ...u.trim() ? { description: u.trim() } : {},
101
113
  ...o ? { condition: o } : {}
102
114
  }, {
103
115
  onSuccess: () => t(),
104
- onError: (e) => _(e instanceof Error ? e.message : "Could not add policy.")
116
+ onError: (e) => b(e instanceof Error ? e.message : n("agents.policyModal.error", "Could not add policy."))
105
117
  });
106
118
  },
107
119
  className: "space-y-4",
108
120
  children: [
109
- h && /* @__PURE__ */ F("div", {
121
+ y && /* @__PURE__ */ I("div", {
110
122
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
111
- children: h
123
+ children: y
112
124
  }),
113
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ I("label", {
125
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ L("label", {
114
126
  htmlFor: "policy-name",
115
- className: U,
116
- children: ["Name ", /* @__PURE__ */ F("span", {
117
- className: "text-status-error-text",
118
- children: "*"
119
- })]
120
- }), /* @__PURE__ */ F("input", {
127
+ className: G,
128
+ children: [
129
+ n("agents.policyModal.nameLabel", "Name"),
130
+ " ",
131
+ /* @__PURE__ */ I("span", {
132
+ className: "text-status-error-text",
133
+ children: "*"
134
+ })
135
+ ]
136
+ }), /* @__PURE__ */ I("input", {
121
137
  id: "policy-name",
122
138
  type: "text",
123
- value: r,
124
- onChange: (e) => i(e.target.value),
125
- placeholder: "e.g. Alert on price hike over 20%",
126
- className: H,
139
+ value: a,
140
+ onChange: (e) => o(e.target.value),
141
+ placeholder: n("agents.policyModal.namePlaceholder", "e.g. Alert on price hike over 20%"),
142
+ className: W,
127
143
  required: !0
128
144
  })] }),
129
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
145
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("label", {
130
146
  htmlFor: "policy-action",
131
- className: U,
132
- children: "Action"
133
- }), /* @__PURE__ */ F("select", {
147
+ className: G,
148
+ children: n("agents.policyModal.actionLabel", "Action")
149
+ }), /* @__PURE__ */ I("select", {
134
150
  id: "policy-action",
135
- value: a,
136
- onChange: (e) => o(e.target.value),
137
- className: H,
138
- children: z.map((e) => /* @__PURE__ */ F("option", {
151
+ value: s,
152
+ onChange: (e) => l(e.target.value),
153
+ className: W,
154
+ children: V.map((e) => /* @__PURE__ */ I("option", {
139
155
  value: e,
140
- children: e.replace(/_/g, " ")
156
+ children: r(e)
141
157
  }, e))
142
158
  })] }),
143
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ I("label", {
159
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ L("label", {
144
160
  htmlFor: "policy-condition",
145
- className: U,
146
- children: ["Condition ", /* @__PURE__ */ F("span", {
147
- className: "text-text-secondary",
148
- children: "(optional JSON)"
149
- })]
150
- }), /* @__PURE__ */ F("textarea", {
161
+ className: G,
162
+ children: [
163
+ n("agents.policyModal.conditionLabel", "Condition"),
164
+ " ",
165
+ /* @__PURE__ */ L("span", {
166
+ className: "text-text-secondary",
167
+ children: [
168
+ "(",
169
+ n("agents.policyModal.conditionOptional", "optional JSON"),
170
+ ")"
171
+ ]
172
+ })
173
+ ]
174
+ }), /* @__PURE__ */ I("textarea", {
151
175
  id: "policy-condition",
152
- value: u,
153
- onChange: (e) => d(e.target.value),
176
+ value: f,
177
+ onChange: (e) => p(e.target.value),
154
178
  rows: 3,
155
- placeholder: "{ \"priceIncreasePct\": 20 }",
156
- className: `${H} font-mono`
179
+ placeholder: n("agents.policyModal.conditionPlaceholder", "{ \"priceIncreasePct\": 20 }"),
180
+ className: `${W} font-mono`
157
181
  })] }),
158
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
182
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("label", {
159
183
  htmlFor: "policy-desc",
160
- className: U,
161
- children: "Description"
162
- }), /* @__PURE__ */ F("textarea", {
184
+ className: G,
185
+ children: n("agents.policyModal.descriptionLabel", "Description")
186
+ }), /* @__PURE__ */ I("textarea", {
163
187
  id: "policy-desc",
164
- value: s,
165
- onChange: (e) => l(e.target.value),
188
+ value: u,
189
+ onChange: (e) => d(e.target.value),
166
190
  rows: 2,
167
- className: H
191
+ className: W
168
192
  })] }),
169
- /* @__PURE__ */ I("label", {
193
+ /* @__PURE__ */ L("label", {
170
194
  className: "flex items-center gap-2 text-sm text-text-primary",
171
- children: [/* @__PURE__ */ F("input", {
195
+ children: [/* @__PURE__ */ I("input", {
172
196
  type: "checkbox",
173
- checked: f,
174
- onChange: (e) => p(e.target.checked),
197
+ checked: h,
198
+ onChange: (e) => v(e.target.checked),
175
199
  className: "size-4 rounded border-border-subtle"
176
- }), "Enabled"]
200
+ }), n("agents.policyModal.enabled", "Enabled")]
177
201
  }),
178
- /* @__PURE__ */ I("div", {
202
+ /* @__PURE__ */ L("div", {
179
203
  className: "flex justify-end gap-3",
180
- children: [/* @__PURE__ */ F("button", {
204
+ children: [/* @__PURE__ */ I("button", {
181
205
  type: "button",
182
206
  onClick: t,
183
207
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
184
- children: "Cancel"
185
- }), /* @__PURE__ */ F("button", {
208
+ children: n("agents.policyModal.cancel", "Cancel")
209
+ }), /* @__PURE__ */ I("button", {
186
210
  type: "submit",
187
- disabled: n.isPending,
211
+ disabled: i.isPending,
188
212
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
189
- children: n.isPending ? "Adding…" : "Add policy"
213
+ children: i.isPending ? n("agents.policyModal.adding", "Adding…") : n("agents.policyModal.submit", "Add policy")
190
214
  })]
191
215
  })
192
216
  ]
193
217
  })
194
218
  });
195
219
  }
196
- function Y({ policy: e }) {
197
- let t = K(e.condition);
198
- return /* @__PURE__ */ I(L, {
220
+ function Z({ policy: e }) {
221
+ let t = g(), n = J(e.condition);
222
+ return /* @__PURE__ */ L(R, {
199
223
  treatment: "metric",
200
224
  className: "flex flex-col p-4",
201
225
  children: [
202
- /* @__PURE__ */ I("div", {
226
+ /* @__PURE__ */ L("div", {
203
227
  className: "flex items-start justify-between gap-2",
204
- children: [/* @__PURE__ */ F("p", {
228
+ children: [/* @__PURE__ */ I("p", {
205
229
  className: "text-sm font-semibold text-text-primary",
206
230
  children: e.name
207
- }), /* @__PURE__ */ F(q, { enabled: e.isEnabled })]
231
+ }), /* @__PURE__ */ I(Y, { enabled: e.isEnabled })]
208
232
  }),
209
- /* @__PURE__ */ I("div", {
233
+ /* @__PURE__ */ L("div", {
210
234
  className: "mt-2 flex flex-wrap items-center gap-2",
211
- children: [/* @__PURE__ */ I("span", {
235
+ children: [/* @__PURE__ */ L("span", {
212
236
  className: "inline-flex items-center gap-1.5 rounded-md bg-[var(--color-accent-soft)] px-2 py-0.5 text-[11px] font-medium text-text-primary",
213
237
  children: [
214
- /* @__PURE__ */ F(j, {
238
+ /* @__PURE__ */ I(M, {
215
239
  className: "h-3 w-3",
216
240
  "aria-hidden": !0
217
241
  }),
@@ -220,262 +244,270 @@ function Y({ policy: e }) {
220
244
  ]
221
245
  }), /* @__PURE__ */ I("span", {
222
246
  className: "inline-flex items-center gap-1 rounded-md bg-bg-sunken px-2 py-0.5 text-[11px] font-medium text-text-secondary tabular-nums",
223
- children: [
224
- "Triggered ",
225
- e.triggerCount,
226
- "×"
227
- ]
247
+ children: t("agents.detail.triggered", "Triggered {{count}}×", { count: e.triggerCount })
228
248
  })]
229
249
  }),
230
- e.description && /* @__PURE__ */ F("p", {
250
+ e.description && /* @__PURE__ */ I("p", {
231
251
  className: "mt-2 line-clamp-2 text-xs text-text-secondary",
232
252
  children: e.description
233
253
  }),
234
- t.length > 0 && /* @__PURE__ */ I("div", {
254
+ n.length > 0 && /* @__PURE__ */ L("div", {
235
255
  className: "mt-3 border-t border-border-subtle pt-2.5",
236
- children: [/* @__PURE__ */ I("p", {
256
+ children: [/* @__PURE__ */ L("p", {
237
257
  className: "flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wide text-text-secondary",
238
- children: [/* @__PURE__ */ F(M, {
239
- className: "h-3 w-3",
240
- "aria-hidden": !0
241
- }), " Fires when"]
242
- }), /* @__PURE__ */ F("div", {
258
+ children: [
259
+ /* @__PURE__ */ I(N, {
260
+ className: "h-3 w-3",
261
+ "aria-hidden": !0
262
+ }),
263
+ " ",
264
+ t("agents.detail.firesWhen", "Fires when")
265
+ ]
266
+ }), /* @__PURE__ */ I("div", {
243
267
  className: "mt-1.5 flex flex-wrap gap-1.5",
244
- children: t.map((e) => /* @__PURE__ */ I("span", {
268
+ children: n.map((e) => /* @__PURE__ */ L("span", {
245
269
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-sunken px-2 py-0.5 text-[11px] text-text-secondary",
246
- children: [/* @__PURE__ */ F("span", {
270
+ children: [/* @__PURE__ */ I("span", {
247
271
  className: "font-medium text-text-primary",
248
- children: W(e.key)
249
- }), /* @__PURE__ */ F("span", {
272
+ children: K(e.key)
273
+ }), /* @__PURE__ */ I("span", {
250
274
  className: "font-mono tabular-nums",
251
275
  children: e.value
252
276
  })]
253
277
  }, e.key))
254
278
  })]
255
279
  }),
256
- /* @__PURE__ */ I("p", {
280
+ /* @__PURE__ */ L("p", {
257
281
  className: "mt-2 flex items-center gap-1.5 text-xs text-text-secondary",
258
- children: [/* @__PURE__ */ F(x, {
282
+ children: [/* @__PURE__ */ I(S, {
259
283
  className: "h-3.5 w-3.5",
260
284
  "aria-hidden": !0
261
- }), e.lastTriggeredAt ? `Last triggered ${a(e.lastTriggeredAt)}` : "Not yet triggered"]
285
+ }), e.lastTriggeredAt ? t("agents.detail.triggered", "Triggered {{count}}×", { count: e.triggerCount }) : t("agents.detail.notYetTriggered", "Not yet triggered")]
262
286
  })
263
287
  ]
264
288
  });
265
289
  }
266
- function X() {
267
- let { id: i } = P(), { navigateTo: c } = e(), { data: m, isLoading: v, isError: b, refetch: S } = p(i), C = h(), [w, D] = g(null), [k, A] = g(!1);
268
- if (v) return /* @__PURE__ */ F(t, {
269
- title: "Agent",
270
- children: /* @__PURE__ */ F(u, { label: "Loading agent…" })
290
+ function Q() {
291
+ let i = g(), { id: c } = F(), { navigateTo: m } = e(), { data: y, isLoading: x, isError: C, refetch: w } = p(c), T = h(), [O, A] = _(null), [j, N] = _(!1);
292
+ if (x) return /* @__PURE__ */ I(t, {
293
+ title: i("agents.detail.loading", "Loading agent…"),
294
+ children: /* @__PURE__ */ I(u, { label: i("agents.detail.loading", "Loading agent…") })
271
295
  });
272
- if (b) return /* @__PURE__ */ F(t, {
273
- title: "Agent",
274
- children: /* @__PURE__ */ F(l, {
275
- message: "Could not load this agent.",
276
- onRetry: () => void S()
296
+ if (C) return /* @__PURE__ */ I(t, {
297
+ title: i("agents.title", "AI Agents"),
298
+ children: /* @__PURE__ */ I(l, {
299
+ message: i("agents.detail.error", "Could not load this agent."),
300
+ onRetry: () => void w()
277
301
  })
278
302
  });
279
- if (!m) return /* @__PURE__ */ F(t, {
280
- title: "Agent",
281
- children: /* @__PURE__ */ F(s, {
303
+ if (!y) return /* @__PURE__ */ I(t, {
304
+ title: i("agents.title", "AI Agents"),
305
+ children: /* @__PURE__ */ I(s, {
282
306
  illustration: "empty-data",
283
- title: "Agent not found",
284
- description: "It may have been removed, or you may not have access to it.",
285
- action: /* @__PURE__ */ F("button", {
307
+ title: i("agents.detail.notFoundTitle", "Agent not found"),
308
+ description: i("agents.detail.notFoundDescription", "It may have been removed, or you may not have access to it."),
309
+ action: /* @__PURE__ */ I("button", {
286
310
  type: "button",
287
- onClick: () => c("/agents"),
311
+ onClick: () => m("/agents"),
288
312
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
289
- children: "Back to agents"
313
+ children: i("agents.detail.backToAgents", "Back to agents")
290
314
  })
291
315
  })
292
316
  });
293
- let M = m, z = B[M.kind] ?? y, H = M.policies ?? [], U = H.filter((e) => e.isEnabled).length, W = H.reduce((e, t) => e + (t.triggerCount || 0), 0), G = [];
294
- M.lastRunAt && G.push({
295
- ts: new Date(M.lastRunAt).getTime(),
317
+ let V = y, W = H[V.kind] ?? b, G = V.policies ?? [], K = G.filter((e) => e.isEnabled).length, q = G.reduce((e, t) => e + (t.triggerCount || 0), 0), J = [];
318
+ V.lastRunAt && J.push({
319
+ ts: new Date(V.lastRunAt).getTime(),
296
320
  item: {
297
- title: "Agent run",
298
- sub: "Latest autonomous cycle",
299
- meta: a(M.lastRunAt),
321
+ title: i("agents.detail.agentRun", "Agent run"),
322
+ sub: i("agents.detail.agentRunSub", "Latest autonomous cycle"),
323
+ meta: a(V.lastRunAt),
300
324
  tone: "positive"
301
325
  }
302
326
  });
303
- for (let e of H) e.lastTriggeredAt && G.push({
327
+ for (let e of G) e.lastTriggeredAt && J.push({
304
328
  ts: new Date(e.lastTriggeredAt).getTime(),
305
329
  item: {
306
330
  title: e.name,
307
- sub: `${r(e.action)} · fired ${e.triggerCount}×`,
331
+ sub: `${r(e.action)} · ${i("agents.detail.triggered", "Triggered {{count}}×", { count: e.triggerCount })}`,
308
332
  meta: a(e.lastTriggeredAt),
309
- tone: V(e.action)
333
+ tone: U(e.action)
310
334
  }
311
335
  });
312
- G.sort((e, t) => t.ts - e.ts);
313
- let K = G.map((e) => e.item);
314
- return /* @__PURE__ */ I(t, {
315
- title: M.name,
316
- description: `${r(M.kind)} agent`,
317
- actions: /* @__PURE__ */ I("button", {
336
+ J.sort((e, t) => t.ts - e.ts);
337
+ let Y = J.map((e) => e.item);
338
+ return /* @__PURE__ */ L(t, {
339
+ title: V.name,
340
+ description: `${i(B[V.kind] ?? "", r(V.kind))} ${i("agents.card.kindSuffix", "agent")}`,
341
+ actions: /* @__PURE__ */ L("button", {
318
342
  type: "button",
319
- onClick: () => c("/agents"),
343
+ onClick: () => m("/agents"),
320
344
  className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
321
- children: [/* @__PURE__ */ F(_, { className: "h-4 w-4" }), " Back"]
345
+ children: [
346
+ /* @__PURE__ */ I(v, { className: "h-4 w-4" }),
347
+ " ",
348
+ i("agents.new.back", "Back")
349
+ ]
322
350
  }),
323
351
  children: [
324
- /* @__PURE__ */ F(L, {
352
+ /* @__PURE__ */ I(R, {
325
353
  treatment: "glass",
326
- glow: M.status === "AUTONOMOUS",
354
+ glow: V.status === "AUTONOMOUS",
327
355
  className: "p-5",
328
- children: /* @__PURE__ */ I("div", {
356
+ children: /* @__PURE__ */ L("div", {
329
357
  className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
330
- children: [/* @__PURE__ */ I("div", {
358
+ children: [/* @__PURE__ */ L("div", {
331
359
  className: "flex items-start gap-4",
332
- children: [/* @__PURE__ */ F("span", {
360
+ children: [/* @__PURE__ */ I("span", {
333
361
  className: "flex size-12 shrink-0 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-text-primary",
334
- children: /* @__PURE__ */ F(z, { className: "h-6 w-6" })
335
- }), /* @__PURE__ */ I("div", {
362
+ children: /* @__PURE__ */ I(W, { className: "h-6 w-6" })
363
+ }), /* @__PURE__ */ L("div", {
336
364
  className: "min-w-0",
337
365
  children: [
338
- /* @__PURE__ */ I("div", {
366
+ /* @__PURE__ */ L("div", {
339
367
  className: "flex flex-wrap items-center gap-2",
340
- children: [/* @__PURE__ */ F("p", {
368
+ children: [/* @__PURE__ */ I("p", {
341
369
  className: "text-lg font-semibold text-text-primary",
342
- children: M.name
343
- }), /* @__PURE__ */ F(o, { status: M.status })]
370
+ children: V.name
371
+ }), /* @__PURE__ */ I(o, { status: V.status })]
344
372
  }),
345
- /* @__PURE__ */ I("p", {
373
+ /* @__PURE__ */ L("p", {
346
374
  className: "mt-1 flex items-center gap-1.5 text-xs text-text-secondary",
347
- children: [/* @__PURE__ */ F(x, {
375
+ children: [/* @__PURE__ */ I(S, {
348
376
  className: "h-3.5 w-3.5",
349
377
  "aria-hidden": !0
350
- }), M.lastRunAt ? `Last run ${a(M.lastRunAt)}` : "Never run"]
378
+ }), V.lastRunAt ? i("agents.card.lastRun", "Last run {{when}}", { when: a(V.lastRunAt) }) : i("agents.card.neverRun", "Never run")]
351
379
  }),
352
- M.description && /* @__PURE__ */ F("p", {
380
+ V.description && /* @__PURE__ */ I("p", {
353
381
  className: "mt-2 max-w-2xl text-sm text-text-secondary",
354
- children: M.description
382
+ children: V.description
355
383
  })
356
384
  ]
357
385
  })]
358
- }), /* @__PURE__ */ I("div", {
386
+ }), /* @__PURE__ */ L("div", {
359
387
  className: "w-full sm:w-56 sm:shrink-0",
360
388
  children: [
361
- /* @__PURE__ */ F("label", {
389
+ /* @__PURE__ */ I("label", {
362
390
  htmlFor: "agent-posture",
363
391
  className: "mb-1 block text-xs font-medium text-text-secondary",
364
- children: "Operating posture"
392
+ children: i("agents.detail.operatingPosture", "Operating posture")
365
393
  }),
366
- /* @__PURE__ */ F("select", {
394
+ /* @__PURE__ */ I("select", {
367
395
  id: "agent-posture",
368
- value: M.status,
369
- disabled: C.isPending,
396
+ value: V.status,
397
+ disabled: T.isPending,
370
398
  onChange: (e) => {
371
- D(null), C.mutate({
372
- id: M.id,
399
+ A(null), T.mutate({
400
+ id: V.id,
373
401
  status: e.target.value
374
- }, { onError: (e) => D(e instanceof Error ? e.message : "Could not change posture.") });
402
+ }, { onError: (e) => A(e instanceof Error ? e.message : i("agents.detail.error", "Could not load this agent.")) });
375
403
  },
376
404
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] disabled:opacity-50",
377
- children: R.map((e) => /* @__PURE__ */ F("option", {
405
+ children: z.map((e) => /* @__PURE__ */ I("option", {
378
406
  value: e,
379
- children: r(e)
407
+ children: i(`agents.postures.${e.toLowerCase()}`, r(e))
380
408
  }, e))
381
409
  }),
382
- /* @__PURE__ */ F("p", {
410
+ /* @__PURE__ */ I("p", {
383
411
  className: "mt-1.5 text-[11px] leading-snug text-text-secondary",
384
- children: "Disabled never acts · Suggest-only proposes · Autonomous acts within its policies."
412
+ children: i("agents.detail.postureHint", "Disabled never acts · Suggest-only proposes · Autonomous acts within its policies.")
385
413
  })
386
414
  ]
387
415
  })]
388
416
  })
389
417
  }),
390
- w && /* @__PURE__ */ F("div", {
418
+ O && /* @__PURE__ */ I("div", {
391
419
  className: "mt-4 rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
392
- children: w
420
+ children: O
393
421
  }),
394
- /* @__PURE__ */ I("div", {
422
+ /* @__PURE__ */ L("div", {
395
423
  className: "mt-6 grid grid-cols-1 gap-4 sm:grid-cols-3",
396
424
  children: [
397
- /* @__PURE__ */ F(n, {
398
- icon: /* @__PURE__ */ F(E, { className: "h-5 w-5" }),
399
- value: H.length,
400
- label: "Policies"
425
+ /* @__PURE__ */ I(n, {
426
+ icon: /* @__PURE__ */ I(D, { className: "h-5 w-5" }),
427
+ value: G.length,
428
+ label: i("agents.detail.policies", "Policies")
401
429
  }),
402
- /* @__PURE__ */ F(n, {
403
- icon: /* @__PURE__ */ F(j, { className: "h-5 w-5" }),
404
- value: U,
405
- label: "Enabled"
430
+ /* @__PURE__ */ I(n, {
431
+ icon: /* @__PURE__ */ I(M, { className: "h-5 w-5" }),
432
+ value: K,
433
+ label: i("agents.detail.enabled", "Enabled")
406
434
  }),
407
- /* @__PURE__ */ F(n, {
408
- icon: /* @__PURE__ */ F(N, { className: "h-5 w-5" }),
409
- value: W,
410
- label: "Total triggers"
435
+ /* @__PURE__ */ I(n, {
436
+ icon: /* @__PURE__ */ I(P, { className: "h-5 w-5" }),
437
+ value: q,
438
+ label: i("agents.detail.totalTriggers", "Total triggers")
411
439
  })
412
440
  ]
413
441
  }),
414
- /* @__PURE__ */ I("div", {
442
+ /* @__PURE__ */ L("div", {
415
443
  className: "mt-8 grid grid-cols-1 gap-6 lg:grid-cols-3",
416
- children: [/* @__PURE__ */ F("div", {
444
+ children: [/* @__PURE__ */ I("div", {
417
445
  className: "lg:col-span-2",
418
- children: /* @__PURE__ */ F(d, {
419
- title: "Policies",
420
- description: "The autonomous rules that bound this agent",
421
- action: /* @__PURE__ */ I("button", {
446
+ children: /* @__PURE__ */ I(d, {
447
+ title: i("agents.detail.policies", "Policies"),
448
+ description: i("agents.detail.policiesDescription", "The autonomous rules that bound this agent"),
449
+ action: /* @__PURE__ */ L("button", {
422
450
  type: "button",
423
- onClick: () => A(!0),
451
+ onClick: () => N(!0),
424
452
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
425
- children: [/* @__PURE__ */ F(O, { className: "h-3.5 w-3.5" }), " Add policy"]
453
+ children: [
454
+ /* @__PURE__ */ I(k, { className: "h-3.5 w-3.5" }),
455
+ " ",
456
+ i("agents.detail.addPolicy", "Add policy")
457
+ ]
426
458
  }),
427
- children: H.length === 0 ? /* @__PURE__ */ F(s, {
459
+ children: G.length === 0 ? /* @__PURE__ */ I(s, {
428
460
  illustration: "empty-data",
429
- title: "No policies",
430
- description: "Policies define what this agent may do autonomously, and what it must alert on.",
431
- action: /* @__PURE__ */ F("button", {
461
+ title: i("agents.detail.noPoliciesTitle", "No policies"),
462
+ description: i("agents.detail.noPoliciesDescription", "Policies define what this agent may do autonomously, and what it must alert on."),
463
+ action: /* @__PURE__ */ I("button", {
432
464
  type: "button",
433
- onClick: () => A(!0),
465
+ onClick: () => N(!0),
434
466
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
435
- children: "Add policy"
467
+ children: i("agents.detail.addPolicy", "Add policy")
436
468
  })
437
- }) : /* @__PURE__ */ F("div", {
469
+ }) : /* @__PURE__ */ I("div", {
438
470
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
439
- children: H.map((e) => /* @__PURE__ */ F(Y, { policy: e }, e.id))
471
+ children: G.map((e) => /* @__PURE__ */ I(Z, { policy: e }, e.id))
440
472
  })
441
473
  })
442
- }), /* @__PURE__ */ F("div", {
474
+ }), /* @__PURE__ */ I("div", {
443
475
  className: "lg:col-span-1",
444
- children: /* @__PURE__ */ F(d, {
445
- title: "Run history",
446
- description: "Recent agent activity",
447
- children: /* @__PURE__ */ F(L, {
476
+ children: /* @__PURE__ */ I(d, {
477
+ title: i("agents.detail.runHistory", "Run history"),
478
+ description: i("agents.detail.runHistoryDescription", "Recent agent activity"),
479
+ children: /* @__PURE__ */ I(R, {
448
480
  treatment: "metric",
449
481
  className: "p-5",
450
- children: K.length === 0 ? /* @__PURE__ */ I("div", {
482
+ children: Y.length === 0 ? /* @__PURE__ */ L("div", {
451
483
  className: "flex flex-col items-center justify-center gap-2 py-6 text-center",
452
484
  children: [
453
- /* @__PURE__ */ F(T, {
485
+ /* @__PURE__ */ I(E, {
454
486
  className: "h-8 w-8 text-text-secondary",
455
487
  "aria-hidden": !0
456
488
  }),
457
- /* @__PURE__ */ F("p", {
489
+ /* @__PURE__ */ I("p", {
458
490
  className: "text-sm font-medium text-text-primary",
459
- children: "No runs yet"
491
+ children: i("agents.detail.noRunsTitle", "No runs yet")
460
492
  }),
461
- /* @__PURE__ */ F("p", {
493
+ /* @__PURE__ */ I("p", {
462
494
  className: "text-xs text-text-secondary",
463
- children: "Activity appears here once the agent runs or a policy fires."
495
+ children: i("agents.detail.noRunsDescription", "Activity appears here once the agent runs or a policy fires.")
464
496
  })
465
497
  ]
466
- }) : /* @__PURE__ */ F(f, { items: K })
498
+ }) : /* @__PURE__ */ I(f, { items: Y })
467
499
  })
468
500
  })
469
501
  })]
470
502
  }),
471
- k && /* @__PURE__ */ F(J, {
472
- agentId: M.id,
473
- onClose: () => A(!1)
503
+ j && /* @__PURE__ */ I(X, {
504
+ agentId: V.id,
505
+ onClose: () => N(!1)
474
506
  })
475
507
  ]
476
508
  });
477
509
  }
478
510
  //#endregion
479
- export { X as AgentDetailPage };
511
+ export { Q as AgentDetailPage };
480
512
 
481
513
  //# sourceMappingURL=AgentDetailPage.js.map