@burdenoff/microfe-subscriberbot 2026.1103.2 → 2026.1105.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 (198) hide show
  1. package/dist/index.js +3 -3
  2. package/dist/stories/Accessibility.stories.d.ts +13 -0
  3. package/dist/stories/Accessibility.stories.d.ts.map +1 -0
  4. package/dist/stories/pages/AgentNewPage.stories.d.ts.map +1 -1
  5. package/dist/stories/pages/BankConnectionsPage.stories.d.ts +1 -0
  6. package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +1 -1
  7. package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts.map +1 -1
  8. package/dist/stories/pages/InboxPage.stories.d.ts.map +1 -1
  9. package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
  10. package/dist/subscriberbot/admin/AdminDashboardPage.js +168 -168
  11. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  12. package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +1 -1
  13. package/dist/subscriberbot/admin/NegotiationDeskPanel.js +116 -116
  14. package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
  15. package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +1 -1
  16. package/dist/subscriberbot/admin/ProcurementDeskPanel.js +211 -211
  17. package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
  18. package/dist/subscriberbot/components/Modal.d.ts.map +1 -1
  19. package/dist/subscriberbot/components/Modal.js +43 -33
  20. package/dist/subscriberbot/components/Modal.js.map +1 -1
  21. package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -1
  22. package/dist/subscriberbot/components/PostureOptions.js +10 -10
  23. package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
  24. package/dist/subscriberbot/components/StateViews.d.ts.map +1 -1
  25. package/dist/subscriberbot/components/StateViews.js +45 -37
  26. package/dist/subscriberbot/components/StateViews.js.map +1 -1
  27. package/dist/subscriberbot/components/StatusBadge.d.ts.map +1 -1
  28. package/dist/subscriberbot/components/StatusBadge.js +6 -6
  29. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  30. package/dist/subscriberbot/components/decisions/DecisionBanners.js +6 -6
  31. package/dist/subscriberbot/components/decisions/DecisionCard.d.ts.map +1 -1
  32. package/dist/subscriberbot/components/decisions/DecisionCard.js +149 -147
  33. package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
  34. package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +1 -1
  35. package/dist/subscriberbot/components/mobile/MobileDashboard.js +127 -127
  36. package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
  37. package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +1 -1
  38. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +114 -114
  39. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
  40. package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -1
  41. package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
  42. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +4 -4
  43. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +1 -1
  44. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +11 -11
  45. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
  46. package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +1 -1
  47. package/dist/subscriberbot/components/negotiations/OutcomeForm.js +29 -29
  48. package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
  49. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +1 -1
  50. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +43 -43
  51. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
  52. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +4 -4
  53. package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +1 -1
  54. package/dist/subscriberbot/components/procurement/ProcurementThread.js +14 -14
  55. package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
  56. package/dist/subscriberbot/components/savings/SavingsCards.d.ts.map +1 -1
  57. package/dist/subscriberbot/components/savings/SavingsCards.js +242 -237
  58. package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
  59. package/dist/subscriberbot/components/viz.d.ts +1 -0
  60. package/dist/subscriberbot/components/viz.d.ts.map +1 -1
  61. package/dist/subscriberbot/components/viz.js +100 -101
  62. package/dist/subscriberbot/components/viz.js.map +1 -1
  63. package/dist/subscriberbot/hooks/index.js +1 -1
  64. package/dist/subscriberbot/hooks/useFormError.d.ts +7 -0
  65. package/dist/subscriberbot/hooks/useFormError.d.ts.map +1 -0
  66. package/dist/subscriberbot/hooks/useFormError.js +28 -0
  67. package/dist/subscriberbot/hooks/useFormError.js.map +1 -0
  68. package/dist/subscriberbot/hooks/useFormatters.d.ts +11 -0
  69. package/dist/subscriberbot/hooks/useFormatters.d.ts.map +1 -0
  70. package/dist/subscriberbot/hooks/useFormatters.js +13 -0
  71. package/dist/subscriberbot/hooks/useFormatters.js.map +1 -0
  72. package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
  73. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +371 -370
  74. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  75. package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -1
  76. package/dist/subscriberbot/hooks/useTr.js +1 -1
  77. package/dist/subscriberbot/hooks/useTr.js.map +1 -1
  78. package/dist/subscriberbot/index.js +1 -1
  79. package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
  80. package/dist/subscriberbot/pages/AssetVaultPage.js +124 -124
  81. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  82. package/dist/subscriberbot/pages/DashboardPage.d.ts +0 -10
  83. package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
  84. package/dist/subscriberbot/pages/DashboardPage.js +107 -98
  85. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  86. package/dist/subscriberbot/pages/InboxPage.d.ts +0 -10
  87. package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
  88. package/dist/subscriberbot/pages/InboxPage.js +421 -402
  89. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  90. package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
  91. package/dist/subscriberbot/pages/InsightsPage.js +130 -121
  92. package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
  93. package/dist/subscriberbot/pages/InvoicesPage.d.ts +0 -12
  94. package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
  95. package/dist/subscriberbot/pages/InvoicesPage.js +237 -215
  96. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  97. package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +1 -1
  98. package/dist/subscriberbot/pages/RenewalsPage.js +303 -295
  99. package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
  100. package/dist/subscriberbot/pages/SavingsPage.d.ts.map +1 -1
  101. package/dist/subscriberbot/pages/SavingsPage.js +57 -57
  102. package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
  103. package/dist/subscriberbot/pages/WorkflowsPage.d.ts +0 -13
  104. package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
  105. package/dist/subscriberbot/pages/WorkflowsPage.js +202 -196
  106. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
  107. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts +0 -18
  108. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
  109. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +283 -275
  110. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  111. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts +0 -6
  112. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
  113. package/dist/subscriberbot/pages/agents/AgentNewPage.js +85 -77
  114. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  115. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts +0 -9
  116. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
  117. package/dist/subscriberbot/pages/agents/AgentsListPage.js +136 -136
  118. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  119. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +0 -9
  120. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +1 -1
  121. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +267 -260
  122. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
  123. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts +0 -10
  124. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts.map +1 -1
  125. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +96 -96
  126. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
  127. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts +0 -11
  128. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts.map +1 -1
  129. package/dist/subscriberbot/pages/decisions/DecisionsPage.js +46 -46
  130. package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
  131. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts +0 -11
  132. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts.map +1 -1
  133. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +181 -171
  134. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
  135. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +0 -9
  136. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +1 -1
  137. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +164 -164
  138. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
  139. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +0 -9
  140. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +1 -1
  141. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +197 -181
  142. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
  143. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +0 -8
  144. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +1 -1
  145. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +79 -79
  146. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
  147. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +0 -9
  148. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +1 -1
  149. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +147 -147
  150. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
  151. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +0 -10
  152. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +1 -1
  153. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +204 -188
  154. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
  155. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +0 -9
  156. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +1 -1
  157. package/dist/subscriberbot/pages/procurement/ProcurementPage.js +80 -80
  158. package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
  159. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts +0 -10
  160. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
  161. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +484 -458
  162. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  163. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts +0 -8
  164. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
  165. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +146 -136
  166. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  167. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts +0 -10
  168. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
  169. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +88 -87
  170. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  171. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts +0 -11
  172. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
  173. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +520 -490
  174. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  175. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts +0 -8
  176. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
  177. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +104 -90
  178. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  179. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts +0 -8
  180. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
  181. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +97 -96
  182. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  183. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +1 -1
  184. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +76 -74
  185. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
  186. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts +5 -3
  187. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts.map +1 -1
  188. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +26 -25
  189. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
  190. package/dist/subscriberbot/utils/formatters.d.ts +16 -5
  191. package/dist/subscriberbot/utils/formatters.d.ts.map +1 -1
  192. package/dist/subscriberbot/utils/formatters.js +57 -25
  193. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  194. package/dist/subscriberbot/utils/plaidLink.d.ts +2 -1
  195. package/dist/subscriberbot/utils/plaidLink.d.ts.map +1 -1
  196. package/dist/subscriberbot/utils/plaidLink.js +21 -21
  197. package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
  198. package/package.json +1 -1
@@ -1,28 +1,29 @@
1
1
  import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
2
- import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { MetricsCard as n } from "../../components/MetricsCard.js";
4
- import { formatEnumLabel as r, formatNumber as i, formatRelativeTime as a } from "../../utils/formatters.js";
5
- import { StatusBadge as o } from "../../components/StatusBadge.js";
6
- import { EmptyState as s } from "../../components/EmptyState.js";
7
- import { Modal as c } from "../../components/Modal.js";
8
- import { useAutonomousAgentMode as l } from "../../hooks/useAutonomousAgentMode.js";
9
- import { useTr as u } from "../../hooks/useTr.js";
10
- import { PostureOptions as d } from "../../components/PostureOptions.js";
11
- import { ErrorView as f, LoadingView as p, Section as m } from "../../components/StateViews.js";
12
- import { Timeline as h } from "../../components/viz.js";
2
+ import { useTr as t } from "../../hooks/useTr.js";
3
+ import { useFormatters as n } from "../../hooks/useFormatters.js";
4
+ import { PageLayout as r } from "../../components/PageLayout.js";
5
+ import { MetricsCard as i } from "../../components/MetricsCard.js";
6
+ import { StatusBadge as a } from "../../components/StatusBadge.js";
7
+ import { EmptyState as o } from "../../components/EmptyState.js";
8
+ import { Modal as s } from "../../components/Modal.js";
9
+ import { useAutonomousAgentMode as c } from "../../hooks/useAutonomousAgentMode.js";
10
+ import { PostureOptions as l } from "../../components/PostureOptions.js";
11
+ import { ErrorView as u, LoadingView as d, Section as f } from "../../components/StateViews.js";
12
+ import { Timeline as p } from "../../components/viz.js";
13
13
  import "../../components/index.js";
14
- import { useAgent as g, useCreatePolicy as _, useDecisions as v, useRunAgent as y, useSetAgentStatus as ee } from "../../hooks/useSubscriberBotApi.js";
15
- import { RUNNABLE_AGENT_KINDS as te } from "../../components/decisions/decisionModel.js";
16
- import { DecisionCard as ne } from "../../components/decisions/DecisionCard.js";
17
- import { AiDisclaimer as re, DecisionsUnavailableBanner as b } from "../../components/decisions/DecisionBanners.js";
14
+ import { useAgent as m, useCreatePolicy as h, useDecisions as g, useRunAgent as _, useSetAgentStatus as v } from "../../hooks/useSubscriberBotApi.js";
15
+ import { RUNNABLE_AGENT_KINDS as y } from "../../components/decisions/decisionModel.js";
16
+ import { useFormError as b } from "../../hooks/useFormError.js";
17
+ import { DecisionCard as x } from "../../components/decisions/DecisionCard.js";
18
+ import { AiDisclaimer as S, DecisionsUnavailableBanner as C } from "../../components/decisions/DecisionBanners.js";
18
19
  import "../../components/decisions/index.js";
19
- import { useState as x } from "react";
20
- import { ArrowLeft as ie, ArrowLeftRight as S, ArrowRight as C, Bot as w, Building2 as T, Clock as E, ConciergeBell as D, DollarSign as O, Handshake as k, History as ae, ListChecks as oe, Mail as A, Play as se, Plus as ce, RefreshCw as j, Search as M, ShieldCheck as N, SlidersHorizontal as P, Zap as le } from "lucide-react";
21
- import { useParams as ue } from "react-router";
22
- import { jsx as F, jsxs as I } from "react/jsx-runtime";
23
- import { GlassCard as L } from "@burdenoff/fe-libs/ui";
20
+ import { useState as w } from "react";
21
+ import { ArrowLeft as ee, ArrowLeftRight as T, ArrowRight as te, Bot as ne, Building2 as E, Clock as D, ConciergeBell as O, DollarSign as k, Handshake as A, History as re, ListChecks as ie, Mail as j, Play as ae, Plus as oe, RefreshCw as M, Search as N, ShieldCheck as P, SlidersHorizontal as F, Zap as se } from "lucide-react";
22
+ import { useParams as ce } from "react-router";
23
+ import { jsx as I, jsxs as L } from "react/jsx-runtime";
24
+ import { GlassCard as R } from "@burdenoff/fe-libs/ui";
24
25
  //#region src/subscriberbot/pages/agents/AgentDetailPage.tsx
25
- function de(e) {
26
+ function le(e) {
26
27
  let t = /* @__PURE__ */ new Map();
27
28
  for (let n of e) {
28
29
  let e = t.get(n.runId) ?? {
@@ -36,11 +37,11 @@ function de(e) {
36
37
  }
37
38
  return [...t.values()];
38
39
  }
39
- var R = [
40
+ var ue = [
40
41
  "DISABLED",
41
42
  "SUGGEST_ONLY",
42
43
  "AUTONOMOUS"
43
- ], z = {
44
+ ], de = {
44
45
  DISCOVERY: "agents.kinds.discovery",
45
46
  RENEWAL: "agents.kinds.renewal",
46
47
  COST: "agents.kinds.cost",
@@ -50,7 +51,7 @@ var R = [
50
51
  NEGOTIATION: "agents.kinds.negotiation",
51
52
  MIGRATION: "agents.kinds.migration",
52
53
  CONCIERGE: "agents.kinds.concierge"
53
- }, B = [
54
+ }, z = [
54
55
  "ALERT",
55
56
  "CREATE_TASK",
56
57
  "RENEW",
@@ -58,18 +59,18 @@ var R = [
58
59
  "PAUSE",
59
60
  "UPGRADE",
60
61
  "DOWNGRADE"
61
- ], V = {
62
- DISCOVERY: M,
63
- RENEWAL: j,
64
- COST: O,
65
- NEWSLETTER: A,
66
- VENDOR: T,
67
- COMPLIANCE: N,
68
- NEGOTIATION: k,
69
- MIGRATION: S,
70
- CONCIERGE: D
62
+ ], fe = {
63
+ DISCOVERY: N,
64
+ RENEWAL: M,
65
+ COST: k,
66
+ NEWSLETTER: j,
67
+ VENDOR: E,
68
+ COMPLIANCE: P,
69
+ NEGOTIATION: A,
70
+ MIGRATION: T,
71
+ CONCIERGE: O
71
72
  };
72
- function fe(e) {
73
+ function pe(e) {
73
74
  switch (e) {
74
75
  case "RENEW":
75
76
  case "UPGRADE": return "positive";
@@ -80,267 +81,274 @@ function fe(e) {
80
81
  default: return "default";
81
82
  }
82
83
  }
83
- 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";
84
- function W(e) {
84
+ var B = "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)]", V = "mb-1 block text-xs font-medium text-text-secondary";
85
+ function H(e) {
85
86
  let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
86
87
  return t.charAt(0).toUpperCase() + t.slice(1);
87
88
  }
88
- function G(e) {
89
- 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);
89
+ function U(e, t, n) {
90
+ return e == null ? "—" : typeof e == "string" ? e : typeof e == "number" ? t(e) : typeof e == "boolean" ? e ? n("common.yes", "Yes") : n("common.no", "No") : Array.isArray(e) ? e.map((e) => U(e, t, n)).join(", ") : JSON.stringify(e);
90
91
  }
91
- function K(e) {
92
- return !e || Array.isArray(e) ? [] : Object.entries(e).filter(([, e]) => e != null && e !== "").map(([e, t]) => ({
92
+ function W(e, t, n) {
93
+ return !e || Array.isArray(e) ? [] : Object.entries(e).filter(([, e]) => e != null && e !== "").map(([e, r]) => ({
93
94
  key: e,
94
- value: G(t)
95
+ value: U(r, t, n)
95
96
  }));
96
97
  }
97
- function q({ enabled: e }) {
98
- let t = u();
99
- return /* @__PURE__ */ I("span", {
98
+ function G({ enabled: e }) {
99
+ let n = t();
100
+ return /* @__PURE__ */ L("span", {
100
101
  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",
101
- children: [/* @__PURE__ */ F("span", {
102
+ children: [/* @__PURE__ */ I("span", {
102
103
  "aria-hidden": !0,
103
104
  className: "size-1.5 rounded-full bg-current",
104
105
  style: { opacity: e ? 1 : .6 }
105
- }), e ? t("agents.detail.enabled", "Enabled") : t("agents.detail.disabled", "Disabled")]
106
+ }), e ? n("agents.detail.enabled", "Enabled") : n("agents.detail.disabled", "Disabled")]
106
107
  });
107
108
  }
108
- function pe({ agentId: e, onClose: t }) {
109
- let n = u(), i = _(), [a, o] = x(""), [s, l] = x("ALERT"), [d, f] = x(""), [p, m] = x(""), [h, g] = x(!0), [v, y] = x(null);
110
- return /* @__PURE__ */ F(c, {
111
- title: n("agents.policyModal.title", "Add policy"),
112
- onClose: t,
109
+ function me({ agentId: e, onClose: r }) {
110
+ let { formatEnumLabel: i } = n(), a = t(), o = h(), [c, l] = w(""), [u, d] = w("ALERT"), [f, p] = w(""), [m, g] = w(""), [_, v] = w(!0), [y, x, S, C] = b();
111
+ return /* @__PURE__ */ I(s, {
112
+ title: a("agents.policyModal.title", "Add policy"),
113
+ onClose: r,
113
114
  maxWidthClassName: "max-w-xl",
114
- children: /* @__PURE__ */ I("form", {
115
- onSubmit: (r) => {
116
- if (r.preventDefault(), y(null), !a.trim()) {
117
- y(n("agents.policyModal.nameRequired", "A policy name is required."));
115
+ children: /* @__PURE__ */ L("form", {
116
+ onSubmit: (t) => {
117
+ if (t.preventDefault(), x(null), !c.trim()) {
118
+ x(a("agents.policyModal.nameRequired", "A policy name is required."), "policy-name");
118
119
  return;
119
120
  }
120
- let o;
121
- if (p.trim()) try {
122
- o = JSON.parse(p);
121
+ let n;
122
+ if (m.trim()) try {
123
+ n = JSON.parse(m);
123
124
  } catch {
124
- y(n("agents.policyModal.conditionInvalid", "Condition must be valid JSON (e.g. {\"amountOver\": 100})."));
125
+ x(a("agents.policyModal.conditionInvalid", "Condition must be valid JSON (e.g. {\"amountOver\": 100})."), "policy-condition");
125
126
  return;
126
127
  }
127
- i.mutate({
128
+ o.mutate({
128
129
  agentId: e,
129
- name: a.trim(),
130
- action: s,
131
- isEnabled: h,
132
- ...d.trim() ? { description: d.trim() } : {},
133
- ...o ? { condition: o } : {}
130
+ name: c.trim(),
131
+ action: u,
132
+ isEnabled: _,
133
+ ...f.trim() ? { description: f.trim() } : {},
134
+ ...n ? { condition: n } : {}
134
135
  }, {
135
- onSuccess: () => t(),
136
- onError: (e) => y(e instanceof Error ? e.message : n("agents.policyModal.error", "Could not add policy."))
136
+ onSuccess: () => r(),
137
+ onError: (e) => x(e instanceof Error ? e.message : a("agents.policyModal.error", "Could not add policy."))
137
138
  });
138
139
  },
139
140
  className: "space-y-4",
140
141
  children: [
141
- v && /* @__PURE__ */ F("div", {
142
+ y && /* @__PURE__ */ I("div", {
143
+ id: C,
144
+ tabIndex: -1,
145
+ role: "alert",
142
146
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
143
- children: v
147
+ children: y
144
148
  }),
145
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ I("label", {
149
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ L("label", {
146
150
  htmlFor: "policy-name",
147
- className: U,
151
+ className: V,
148
152
  children: [
149
- n("agents.policyModal.nameLabel", "Name"),
153
+ a("agents.policyModal.nameLabel", "Name"),
150
154
  " ",
151
- /* @__PURE__ */ F("span", {
155
+ /* @__PURE__ */ I("span", {
152
156
  className: "text-status-error-text",
153
157
  children: "*"
154
158
  })
155
159
  ]
156
- }), /* @__PURE__ */ F("input", {
160
+ }), /* @__PURE__ */ I("input", {
161
+ ...S("policy-name"),
157
162
  id: "policy-name",
158
163
  type: "text",
159
- value: a,
160
- onChange: (e) => o(e.target.value),
161
- placeholder: n("agents.policyModal.namePlaceholder", "e.g. Alert on price hike over 20%"),
162
- className: H,
164
+ value: c,
165
+ onChange: (e) => l(e.target.value),
166
+ placeholder: a("agents.policyModal.namePlaceholder", "e.g. Alert on price hike over 20%"),
167
+ className: B,
163
168
  required: !0
164
169
  })] }),
165
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
170
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("label", {
166
171
  htmlFor: "policy-action",
167
- className: U,
168
- children: n("agents.policyModal.actionLabel", "Action")
169
- }), /* @__PURE__ */ F("select", {
172
+ className: V,
173
+ children: a("agents.policyModal.actionLabel", "Action")
174
+ }), /* @__PURE__ */ I("select", {
175
+ ...S("policy-action"),
170
176
  id: "policy-action",
171
- value: s,
172
- onChange: (e) => l(e.target.value),
173
- className: H,
174
- children: B.map((e) => /* @__PURE__ */ F("option", {
177
+ value: u,
178
+ onChange: (e) => d(e.target.value),
179
+ className: B,
180
+ children: z.map((e) => /* @__PURE__ */ I("option", {
175
181
  value: e,
176
- children: r(e)
182
+ children: i(e)
177
183
  }, e))
178
184
  })] }),
179
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ I("label", {
185
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ L("label", {
180
186
  htmlFor: "policy-condition",
181
- className: U,
187
+ className: V,
182
188
  children: [
183
- n("agents.policyModal.conditionLabel", "Condition"),
189
+ a("agents.policyModal.conditionLabel", "Condition"),
184
190
  " ",
185
- /* @__PURE__ */ I("span", {
191
+ /* @__PURE__ */ L("span", {
186
192
  className: "text-text-secondary",
187
193
  children: [
188
194
  "(",
189
- n("agents.policyModal.conditionOptional", "optional JSON"),
195
+ a("agents.policyModal.conditionOptional", "optional JSON"),
190
196
  ")"
191
197
  ]
192
198
  })
193
199
  ]
194
- }), /* @__PURE__ */ F("textarea", {
200
+ }), /* @__PURE__ */ I("textarea", {
201
+ ...S("policy-condition"),
195
202
  id: "policy-condition",
196
- value: p,
197
- onChange: (e) => m(e.target.value),
203
+ value: m,
204
+ onChange: (e) => g(e.target.value),
198
205
  rows: 3,
199
- placeholder: n("agents.policyModal.conditionPlaceholder", "{ \"priceIncreasePct\": 20 }"),
200
- className: `${H} font-mono`
206
+ placeholder: a("agents.policyModal.conditionPlaceholder", "{ \"priceIncreasePct\": 20 }"),
207
+ className: `${B} font-mono`
201
208
  })] }),
202
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
209
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("label", {
203
210
  htmlFor: "policy-desc",
204
- className: U,
205
- children: n("agents.policyModal.descriptionLabel", "Description")
206
- }), /* @__PURE__ */ F("textarea", {
211
+ className: V,
212
+ children: a("agents.policyModal.descriptionLabel", "Description")
213
+ }), /* @__PURE__ */ I("textarea", {
214
+ ...S("policy-desc"),
207
215
  id: "policy-desc",
208
- value: d,
209
- onChange: (e) => f(e.target.value),
216
+ value: f,
217
+ onChange: (e) => p(e.target.value),
210
218
  rows: 2,
211
- className: H
219
+ className: B
212
220
  })] }),
213
- /* @__PURE__ */ I("label", {
221
+ /* @__PURE__ */ L("label", {
214
222
  className: "flex items-center gap-2 text-sm text-text-primary",
215
- children: [/* @__PURE__ */ F("input", {
223
+ children: [/* @__PURE__ */ I("input", {
216
224
  type: "checkbox",
217
- checked: h,
218
- onChange: (e) => g(e.target.checked),
225
+ checked: _,
226
+ onChange: (e) => v(e.target.checked),
219
227
  className: "size-4 rounded border-border-subtle"
220
- }), n("agents.policyModal.enabled", "Enabled")]
228
+ }), a("agents.policyModal.enabled", "Enabled")]
221
229
  }),
222
- /* @__PURE__ */ I("div", {
230
+ /* @__PURE__ */ L("div", {
223
231
  className: "flex justify-end gap-3",
224
- children: [/* @__PURE__ */ F("button", {
232
+ children: [/* @__PURE__ */ I("button", {
225
233
  type: "button",
226
- onClick: t,
234
+ onClick: r,
227
235
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
228
- children: n("agents.policyModal.cancel", "Cancel")
229
- }), /* @__PURE__ */ F("button", {
236
+ children: a("agents.policyModal.cancel", "Cancel")
237
+ }), /* @__PURE__ */ I("button", {
230
238
  type: "submit",
231
- disabled: i.isPending,
239
+ disabled: o.isPending,
232
240
  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",
233
- children: i.isPending ? n("agents.policyModal.adding", "Adding…") : n("agents.policyModal.submit", "Add policy")
241
+ children: o.isPending ? a("agents.policyModal.adding", "Adding…") : a("agents.policyModal.submit", "Add policy")
234
242
  })]
235
243
  })
236
244
  ]
237
245
  })
238
246
  });
239
247
  }
240
- function me({ policy: e }) {
241
- let t = u(), n = K(e.condition);
242
- return /* @__PURE__ */ I(L, {
248
+ function he({ policy: e }) {
249
+ let { formatEnumLabel: r, formatNumber: i } = n(), a = t(), o = W(e.condition, i, a);
250
+ return /* @__PURE__ */ L(R, {
243
251
  treatment: "metric",
244
252
  className: "flex flex-col p-4",
245
253
  children: [
246
- /* @__PURE__ */ I("div", {
254
+ /* @__PURE__ */ L("div", {
247
255
  className: "flex items-start justify-between gap-2",
248
- children: [/* @__PURE__ */ F("p", {
256
+ children: [/* @__PURE__ */ I("p", {
249
257
  className: "text-sm font-semibold text-text-primary",
250
258
  children: e.name
251
- }), /* @__PURE__ */ F(q, { enabled: e.isEnabled })]
259
+ }), /* @__PURE__ */ I(G, { enabled: e.isEnabled })]
252
260
  }),
253
- /* @__PURE__ */ I("div", {
261
+ /* @__PURE__ */ L("div", {
254
262
  className: "mt-2 flex flex-wrap items-center gap-2",
255
- children: [/* @__PURE__ */ I("span", {
263
+ children: [/* @__PURE__ */ L("span", {
256
264
  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",
257
265
  children: [
258
- /* @__PURE__ */ F(N, {
266
+ /* @__PURE__ */ I(P, {
259
267
  className: "h-3 w-3",
260
268
  "aria-hidden": !0
261
269
  }),
262
270
  " ",
263
271
  r(e.action)
264
272
  ]
265
- }), /* @__PURE__ */ F("span", {
273
+ }), /* @__PURE__ */ I("span", {
266
274
  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",
267
- children: t("agents.detail.triggered", "Triggered {{count}}×", { count: e.triggerCount })
275
+ children: a("agents.detail.triggered", "Triggered {{count}}×", { count: e.triggerCount })
268
276
  })]
269
277
  }),
270
- e.description && /* @__PURE__ */ F("p", {
278
+ e.description && /* @__PURE__ */ I("p", {
271
279
  className: "mt-2 line-clamp-2 text-xs text-text-secondary",
272
280
  children: e.description
273
281
  }),
274
- n.length > 0 && /* @__PURE__ */ I("div", {
282
+ o.length > 0 && /* @__PURE__ */ L("div", {
275
283
  className: "mt-3 border-t border-border-subtle pt-2.5",
276
- children: [/* @__PURE__ */ I("p", {
284
+ children: [/* @__PURE__ */ L("p", {
277
285
  className: "flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wide text-text-secondary",
278
286
  children: [
279
- /* @__PURE__ */ F(P, {
287
+ /* @__PURE__ */ I(F, {
280
288
  className: "h-3 w-3",
281
289
  "aria-hidden": !0
282
290
  }),
283
291
  " ",
284
- t("agents.detail.firesWhen", "Fires when")
292
+ a("agents.detail.firesWhen", "Fires when")
285
293
  ]
286
- }), /* @__PURE__ */ F("div", {
294
+ }), /* @__PURE__ */ I("div", {
287
295
  className: "mt-1.5 flex flex-wrap gap-1.5",
288
- children: n.map((e) => /* @__PURE__ */ I("span", {
296
+ children: o.map((e) => /* @__PURE__ */ L("span", {
289
297
  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",
290
- children: [/* @__PURE__ */ F("span", {
298
+ children: [/* @__PURE__ */ I("span", {
291
299
  className: "font-medium text-text-primary",
292
- children: W(e.key)
293
- }), /* @__PURE__ */ F("span", {
300
+ children: H(e.key)
301
+ }), /* @__PURE__ */ I("span", {
294
302
  className: "font-mono tabular-nums",
295
303
  children: e.value
296
304
  })]
297
305
  }, e.key))
298
306
  })]
299
307
  }),
300
- /* @__PURE__ */ I("p", {
308
+ /* @__PURE__ */ L("p", {
301
309
  className: "mt-2 flex items-center gap-1.5 text-xs text-text-secondary",
302
- children: [/* @__PURE__ */ F(E, {
310
+ children: [/* @__PURE__ */ I(D, {
303
311
  className: "h-3.5 w-3.5",
304
312
  "aria-hidden": !0
305
- }), e.lastTriggeredAt ? t("agents.detail.triggered", "Triggered {{count}}×", { count: e.triggerCount }) : t("agents.detail.notYetTriggered", "Not yet triggered")]
313
+ }), e.lastTriggeredAt ? a("agents.detail.triggered", "Triggered {{count}}×", { count: e.triggerCount }) : a("agents.detail.notYetTriggered", "Not yet triggered")]
306
314
  })
307
315
  ]
308
316
  });
309
317
  }
310
- function J() {
311
- let i = u(), { id: c } = ue(), { navigateTo: _ } = e(), { data: S, isLoading: T, isError: D, refetch: O } = g(c), k = ee(), A = l(), [j, M] = x(null), [P, B] = x(!1), H = y(), [U, W] = x(null), [G, K] = x(null), q = v({ agentId: c }, { enabled: !!c });
312
- if (T) return /* @__PURE__ */ F(t, {
313
- title: i("agents.detail.loading", "Loading agent…"),
314
- children: /* @__PURE__ */ F(p, { label: i("agents.detail.loading", "Loading agent…") })
318
+ function K() {
319
+ let { formatEnumLabel: s, formatRelativeTime: h } = n(), b = t(), { id: T } = ce(), { navigateTo: E } = e(), { data: O, isLoading: k, isError: A, refetch: j } = m(T), M = v(), N = c(), [F, z] = w(null), [B, V] = w(!1), H = _(), [U, W] = w(null), [G, K] = w(null), q = g({ agentId: T }, { enabled: !!T });
320
+ if (k) return /* @__PURE__ */ I(r, {
321
+ title: b("agents.detail.loading", "Loading agent…"),
322
+ children: /* @__PURE__ */ I(d, { label: b("agents.detail.loading", "Loading agent…") })
315
323
  });
316
- if (D) return /* @__PURE__ */ F(t, {
317
- title: i("agents.title", "AI Agents"),
318
- children: /* @__PURE__ */ F(f, {
319
- message: i("agents.detail.error", "Could not load this agent."),
320
- onRetry: () => void O()
324
+ if (A) return /* @__PURE__ */ I(r, {
325
+ title: b("agents.title", "AI Agents"),
326
+ children: /* @__PURE__ */ I(u, {
327
+ message: b("agents.detail.error", "Could not load this agent."),
328
+ onRetry: () => void j()
321
329
  })
322
330
  });
323
- if (!S) return /* @__PURE__ */ F(t, {
324
- title: i("agents.title", "AI Agents"),
325
- children: /* @__PURE__ */ F(s, {
331
+ if (!O) return /* @__PURE__ */ I(r, {
332
+ title: b("agents.title", "AI Agents"),
333
+ children: /* @__PURE__ */ I(o, {
326
334
  illustration: "empty-data",
327
- title: i("agents.detail.notFoundTitle", "Agent not found"),
328
- description: i("agents.detail.notFoundDescription", "It may have been removed, or you may not have access to it."),
329
- action: /* @__PURE__ */ F("button", {
335
+ title: b("agents.detail.notFoundTitle", "Agent not found"),
336
+ description: b("agents.detail.notFoundDescription", "It may have been removed, or you may not have access to it."),
337
+ action: /* @__PURE__ */ I("button", {
330
338
  type: "button",
331
- onClick: () => _("/agents"),
339
+ onClick: () => E("/agents"),
332
340
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
333
- children: i("agents.detail.backToAgents", "Back to agents")
341
+ children: b("agents.detail.backToAgents", "Back to agents")
334
342
  })
335
343
  })
336
344
  });
337
- let J = S, he = V[J.kind] ?? w, Y = J.policies ?? [], ge = Y.filter((e) => e.isEnabled).length, _e = Y.reduce((e, t) => e + (t.triggerCount || 0), 0), X = [];
345
+ let J = O, ge = fe[J.kind] ?? ne, Y = J.policies ?? [], _e = Y.filter((e) => e.isEnabled).length, ve = Y.reduce((e, t) => e + (t.triggerCount || 0), 0), X = [];
338
346
  J.lastRunAt && X.push({
339
347
  ts: new Date(J.lastRunAt).getTime(),
340
348
  item: {
341
- title: i("agents.detail.agentRun", "Agent run"),
342
- sub: i("agents.detail.agentRunSub", "Latest agent run"),
343
- meta: a(J.lastRunAt),
349
+ title: b("agents.detail.agentRun", "Agent run"),
350
+ sub: b("agents.detail.agentRunSub", "Latest agent run"),
351
+ meta: h(J.lastRunAt),
344
352
  tone: "positive"
345
353
  }
346
354
  });
@@ -348,273 +356,273 @@ function J() {
348
356
  ts: new Date(e.lastTriggeredAt).getTime(),
349
357
  item: {
350
358
  title: e.name,
351
- sub: `${r(e.action)} · ${i("agents.detail.triggered", "Triggered {{count}}×", { count: e.triggerCount })}`,
352
- meta: a(e.lastTriggeredAt),
353
- tone: fe(e.action)
359
+ sub: `${s(e.action)} · ${b("agents.detail.triggered", "Triggered {{count}}×", { count: e.triggerCount })}`,
360
+ meta: h(e.lastTriggeredAt),
361
+ tone: pe(e.action)
354
362
  }
355
363
  });
356
364
  let Z = q.data?.items ?? [];
357
- for (let e of de(Z)) X.push({
365
+ for (let e of le(Z)) X.push({
358
366
  ts: new Date(e.ranAt).getTime(),
359
367
  item: {
360
- title: i("agents.detail.decisionRun", "Decision run"),
361
- sub: i("agents.detail.decisionRunSub", "{{total}} recommendations · {{proposed}} open · {{flagged}} flagged", {
368
+ title: b("agents.detail.decisionRun", "Decision run"),
369
+ sub: b("agents.detail.decisionRunSub", "{{total}} recommendations · {{proposed}} open · {{flagged}} flagged", {
362
370
  total: e.total,
363
371
  proposed: e.proposed,
364
372
  flagged: e.flagged
365
373
  }),
366
- meta: a(e.ranAt),
374
+ meta: h(e.ranAt),
367
375
  tone: e.flagged > 0 ? "warning" : "positive"
368
376
  }
369
377
  });
370
378
  X.sort((e, t) => t.ts - e.ts);
371
- let Q = te.has(J.kind) ? J.status === "DISABLED" ? i("agents.detail.runDisabled", "Set the posture to Suggest-only to run this agent.") : null : i("agents.detail.runUnsupported", "This agent kind does not make decisions yet. Cost, renewal, vendor and discovery agents do."), ve = () => {
379
+ let Q = y.has(J.kind) ? J.status === "DISABLED" ? b("agents.detail.runDisabled", "Set the posture to Suggest-only to run this agent.") : null : b("agents.detail.runUnsupported", "This agent kind does not make decisions yet. Cost, renewal, vendor and discovery agents do."), ye = () => {
372
380
  K(null), W(null), H.mutate(J.id, {
373
381
  onSuccess: (e) => W(e),
374
- onError: (e) => K(e instanceof Error && e.message ? e.message : i("agents.detail.runError", "The agent run failed."))
382
+ onError: (e) => K(e instanceof Error && e.message ? e.message : b("agents.detail.runError", "The agent run failed."))
375
383
  });
376
384
  }, $ = X.map((e) => e.item);
377
- return /* @__PURE__ */ I(t, {
385
+ return /* @__PURE__ */ L(r, {
378
386
  title: J.name,
379
- description: `${i(z[J.kind] ?? "", r(J.kind))} ${i("agents.card.kindSuffix", "agent")}`,
380
- actions: /* @__PURE__ */ I("div", {
387
+ description: `${b(de[J.kind] ?? "", s(J.kind))} ${b("agents.card.kindSuffix", "agent")}`,
388
+ actions: /* @__PURE__ */ L("div", {
381
389
  className: "flex flex-wrap gap-2",
382
- children: [/* @__PURE__ */ I("button", {
390
+ children: [/* @__PURE__ */ L("button", {
383
391
  type: "button",
384
- onClick: () => _("/agents"),
392
+ onClick: () => E("/agents"),
385
393
  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",
386
394
  children: [
387
- /* @__PURE__ */ F(ie, { className: "h-4 w-4" }),
395
+ /* @__PURE__ */ I(ee, { className: "rtl:rotate-180 h-4 w-4" }),
388
396
  " ",
389
- i("agents.new.back", "Back")
397
+ b("agents.new.back", "Back")
390
398
  ]
391
- }), /* @__PURE__ */ I("button", {
399
+ }), /* @__PURE__ */ L("button", {
392
400
  type: "button",
393
- onClick: ve,
401
+ onClick: ye,
394
402
  disabled: H.isPending || Q !== null,
395
403
  title: Q ?? void 0,
396
404
  "data-testid": "run-agent",
397
405
  className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",
398
- children: [/* @__PURE__ */ F(se, {
406
+ children: [/* @__PURE__ */ I(ae, {
399
407
  className: "h-4 w-4",
400
408
  "aria-hidden": !0
401
- }), H.isPending ? i("agents.detail.running", "Running…") : i("agents.detail.run", "Run agent")]
409
+ }), H.isPending ? b("agents.detail.running", "Running…") : b("agents.detail.run", "Run agent")]
402
410
  })]
403
411
  }),
404
412
  children: [
405
- /* @__PURE__ */ F(L, {
413
+ /* @__PURE__ */ I(R, {
406
414
  treatment: "glass",
407
415
  glow: J.status === "AUTONOMOUS",
408
416
  className: "p-5",
409
- children: /* @__PURE__ */ I("div", {
417
+ children: /* @__PURE__ */ L("div", {
410
418
  className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
411
- children: [/* @__PURE__ */ I("div", {
419
+ children: [/* @__PURE__ */ L("div", {
412
420
  className: "flex items-start gap-4",
413
- children: [/* @__PURE__ */ F("span", {
421
+ children: [/* @__PURE__ */ I("span", {
414
422
  className: "flex size-12 shrink-0 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-text-primary",
415
- children: /* @__PURE__ */ F(he, { className: "h-6 w-6" })
416
- }), /* @__PURE__ */ I("div", {
423
+ children: /* @__PURE__ */ I(ge, { className: "h-6 w-6" })
424
+ }), /* @__PURE__ */ L("div", {
417
425
  className: "min-w-0",
418
426
  children: [
419
- /* @__PURE__ */ I("div", {
427
+ /* @__PURE__ */ L("div", {
420
428
  className: "flex flex-wrap items-center gap-2",
421
- children: [/* @__PURE__ */ F("p", {
429
+ children: [/* @__PURE__ */ I("p", {
422
430
  className: "text-lg font-semibold text-text-primary",
423
431
  children: J.name
424
- }), /* @__PURE__ */ F(o, { status: J.status })]
432
+ }), /* @__PURE__ */ I(a, { status: J.status })]
425
433
  }),
426
- /* @__PURE__ */ I("p", {
434
+ /* @__PURE__ */ L("p", {
427
435
  className: "mt-1 flex items-center gap-1.5 text-xs text-text-secondary",
428
- children: [/* @__PURE__ */ F(E, {
436
+ children: [/* @__PURE__ */ I(D, {
429
437
  className: "h-3.5 w-3.5",
430
438
  "aria-hidden": !0
431
- }), J.lastRunAt ? i("agents.card.lastRun", "Last run {{when}}", { when: a(J.lastRunAt) }) : i("agents.card.neverRun", "Never run")]
439
+ }), J.lastRunAt ? b("agents.card.lastRun", "Last run {{when}}", { when: h(J.lastRunAt) }) : b("agents.card.neverRun", "Never run")]
432
440
  }),
433
- J.description && /* @__PURE__ */ F("p", {
441
+ J.description && /* @__PURE__ */ I("p", {
434
442
  className: "mt-2 max-w-2xl text-sm text-text-secondary",
435
443
  children: J.description
436
444
  })
437
445
  ]
438
446
  })]
439
- }), /* @__PURE__ */ I("div", {
447
+ }), /* @__PURE__ */ L("div", {
440
448
  className: "w-full sm:w-56 sm:shrink-0",
441
449
  children: [
442
- /* @__PURE__ */ F("label", {
450
+ /* @__PURE__ */ I("label", {
443
451
  htmlFor: "agent-posture",
444
452
  className: "mb-1 block text-xs font-medium text-text-secondary",
445
- children: i("agents.detail.operatingPosture", "Operating posture")
453
+ children: b("agents.detail.operatingPosture", "Operating posture")
446
454
  }),
447
- /* @__PURE__ */ F("select", {
455
+ /* @__PURE__ */ I("select", {
448
456
  id: "agent-posture",
449
457
  value: J.status,
450
- disabled: k.isPending,
458
+ disabled: M.isPending,
451
459
  onChange: (e) => {
452
- M(null), k.mutate({
460
+ z(null), M.mutate({
453
461
  id: J.id,
454
462
  status: e.target.value
455
- }, { onError: (e) => M(e instanceof Error ? e.message : i("agents.detail.error", "Could not load this agent.")) });
463
+ }, { onError: (e) => z(e instanceof Error ? e.message : b("agents.detail.error", "Could not load this agent.")) });
456
464
  },
457
465
  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",
458
- children: /* @__PURE__ */ F(d, {
459
- options: R,
466
+ children: /* @__PURE__ */ I(l, {
467
+ options: ue,
460
468
  currentStatus: J.status
461
469
  })
462
470
  }),
463
- /* @__PURE__ */ F("p", {
471
+ /* @__PURE__ */ I("p", {
464
472
  className: "mt-1.5 text-[11px] leading-snug text-text-secondary",
465
- children: A ? i("agents.detail.postureHint", "Disabled never acts · Suggest-only proposes. You review proposed actions before applying them. Policy-driven autonomous execution is not available yet.") : i("agents.detail.postureHintGated", "Disabled never acts · Suggest-only proposes. Autonomous mode is not available yet — agents only suggest, they never act on their own.")
473
+ children: N ? b("agents.detail.postureHint", "Disabled never acts · Suggest-only proposes. You review proposed actions before applying them. Policy-driven autonomous execution is not available yet.") : b("agents.detail.postureHintGated", "Disabled never acts · Suggest-only proposes. Autonomous mode is not available yet — agents only suggest, they never act on their own.")
466
474
  })
467
475
  ]
468
476
  })]
469
477
  })
470
478
  }),
471
- j && /* @__PURE__ */ F("div", {
479
+ F && /* @__PURE__ */ I("div", {
472
480
  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",
473
- children: j
481
+ children: F
474
482
  }),
475
- H.isPending && /* @__PURE__ */ F("div", {
483
+ H.isPending && /* @__PURE__ */ I("div", {
476
484
  role: "status",
477
485
  className: "mt-4 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-2 text-sm text-text-secondary",
478
- children: i("agents.detail.runProgress", "Evaluating your active and trial subscriptions. Nothing is changed by this run.")
486
+ children: b("agents.detail.runProgress", "Evaluating your active and trial subscriptions. Nothing is changed by this run.")
479
487
  }),
480
- U && /* @__PURE__ */ I("div", {
488
+ U && /* @__PURE__ */ L("div", {
481
489
  role: "status",
482
490
  "data-testid": "run-result",
483
491
  className: "mt-4 rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle px-4 py-2 text-sm text-status-success-text",
484
- children: [i("agents.detail.runResult", "Run finished: {{evaluated}} subscriptions evaluated, {{proposed}} recommendations to review, {{flagged}} held back by validation.", {
492
+ children: [b("agents.detail.runResult", "Run finished: {{evaluated}} subscriptions evaluated, {{proposed}} recommendations to review, {{flagged}} held back by validation.", {
485
493
  evaluated: U.evaluated,
486
494
  proposed: U.proposed,
487
495
  flagged: U.flagged
488
- }), U.truncated && ` ${i("agents.detail.runTruncated", "Only part of the portfolio was evaluated in this run.")}`]
496
+ }), U.truncated && ` ${b("agents.detail.runTruncated", "Only part of the portfolio was evaluated in this run.")}`]
489
497
  }),
490
- G && /* @__PURE__ */ F("div", {
498
+ G && /* @__PURE__ */ I("div", {
491
499
  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",
492
500
  children: G
493
501
  }),
494
- Q && /* @__PURE__ */ F("p", {
502
+ Q && /* @__PURE__ */ I("p", {
495
503
  className: "mt-3 text-xs text-text-secondary",
496
504
  children: Q
497
505
  }),
498
- /* @__PURE__ */ I("div", {
506
+ /* @__PURE__ */ L("div", {
499
507
  className: "mt-6 grid grid-cols-1 gap-4 sm:grid-cols-3",
500
508
  children: [
501
- /* @__PURE__ */ F(n, {
502
- icon: /* @__PURE__ */ F(oe, { className: "h-5 w-5" }),
509
+ /* @__PURE__ */ I(i, {
510
+ icon: /* @__PURE__ */ I(ie, { className: "h-5 w-5" }),
503
511
  value: Y.length,
504
- label: i("agents.detail.policies", "Policies")
512
+ label: b("agents.detail.policies", "Policies")
505
513
  }),
506
- /* @__PURE__ */ F(n, {
507
- icon: /* @__PURE__ */ F(N, { className: "h-5 w-5" }),
508
- value: ge,
509
- label: i("agents.detail.enabled", "Enabled")
510
- }),
511
- /* @__PURE__ */ F(n, {
512
- icon: /* @__PURE__ */ F(le, { className: "h-5 w-5" }),
514
+ /* @__PURE__ */ I(i, {
515
+ icon: /* @__PURE__ */ I(P, { className: "h-5 w-5" }),
513
516
  value: _e,
514
- label: i("agents.detail.totalTriggers", "Total triggers")
517
+ label: b("agents.detail.enabled", "Enabled")
518
+ }),
519
+ /* @__PURE__ */ I(i, {
520
+ icon: /* @__PURE__ */ I(se, { className: "h-5 w-5" }),
521
+ value: ve,
522
+ label: b("agents.detail.totalTriggers", "Total triggers")
515
523
  })
516
524
  ]
517
525
  }),
518
- /* @__PURE__ */ I("div", {
526
+ /* @__PURE__ */ L("div", {
519
527
  className: "mt-8 grid grid-cols-1 gap-6 lg:grid-cols-3",
520
- children: [/* @__PURE__ */ F("div", {
528
+ children: [/* @__PURE__ */ I("div", {
521
529
  className: "lg:col-span-2",
522
- children: /* @__PURE__ */ F(m, {
523
- title: i("agents.detail.policies", "Policies"),
524
- description: i("agents.detail.policiesDescription", "Saved policy settings for this agent; autonomous execution is not available yet"),
525
- action: /* @__PURE__ */ I("button", {
530
+ children: /* @__PURE__ */ I(f, {
531
+ title: b("agents.detail.policies", "Policies"),
532
+ description: b("agents.detail.policiesDescription", "Saved policy settings for this agent; autonomous execution is not available yet"),
533
+ action: /* @__PURE__ */ L("button", {
526
534
  type: "button",
527
- onClick: () => B(!0),
535
+ onClick: () => V(!0),
528
536
  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",
529
537
  children: [
530
- /* @__PURE__ */ F(ce, { className: "h-3.5 w-3.5" }),
538
+ /* @__PURE__ */ I(oe, { className: "h-3.5 w-3.5" }),
531
539
  " ",
532
- i("agents.detail.addPolicy", "Add policy")
540
+ b("agents.detail.addPolicy", "Add policy")
533
541
  ]
534
542
  }),
535
- children: Y.length === 0 ? /* @__PURE__ */ F(s, {
543
+ children: Y.length === 0 ? /* @__PURE__ */ I(o, {
536
544
  illustration: "empty-data",
537
- title: i("agents.detail.noPoliciesTitle", "No policies"),
538
- description: i("agents.detail.noPoliciesDescription", "You can save policy settings here. Policy-driven autonomous execution is not available yet; proposed actions still need your review."),
539
- action: /* @__PURE__ */ F("button", {
545
+ title: b("agents.detail.noPoliciesTitle", "No policies"),
546
+ description: b("agents.detail.noPoliciesDescription", "You can save policy settings here. Policy-driven autonomous execution is not available yet; proposed actions still need your review."),
547
+ action: /* @__PURE__ */ I("button", {
540
548
  type: "button",
541
- onClick: () => B(!0),
549
+ onClick: () => V(!0),
542
550
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
543
- children: i("agents.detail.addPolicy", "Add policy")
551
+ children: b("agents.detail.addPolicy", "Add policy")
544
552
  })
545
- }) : /* @__PURE__ */ F("div", {
553
+ }) : /* @__PURE__ */ I("div", {
546
554
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
547
- children: Y.map((e) => /* @__PURE__ */ F(me, { policy: e }, e.id))
555
+ children: Y.map((e) => /* @__PURE__ */ I(he, { policy: e }, e.id))
548
556
  })
549
557
  })
550
- }), /* @__PURE__ */ F("div", {
558
+ }), /* @__PURE__ */ I("div", {
551
559
  className: "lg:col-span-1",
552
- children: /* @__PURE__ */ F(m, {
553
- title: i("agents.detail.runHistory", "Run history"),
554
- description: i("agents.detail.runHistoryDescription", "Recent agent activity"),
555
- children: /* @__PURE__ */ F(L, {
560
+ children: /* @__PURE__ */ I(f, {
561
+ title: b("agents.detail.runHistory", "Run history"),
562
+ description: b("agents.detail.runHistoryDescription", "Recent agent activity"),
563
+ children: /* @__PURE__ */ I(R, {
556
564
  treatment: "metric",
557
565
  className: "p-5",
558
- children: $.length === 0 ? /* @__PURE__ */ I("div", {
566
+ children: $.length === 0 ? /* @__PURE__ */ L("div", {
559
567
  className: "flex flex-col items-center justify-center gap-2 py-6 text-center",
560
568
  children: [
561
- /* @__PURE__ */ F(ae, {
569
+ /* @__PURE__ */ I(re, {
562
570
  className: "h-8 w-8 text-text-secondary",
563
571
  "aria-hidden": !0
564
572
  }),
565
- /* @__PURE__ */ F("p", {
573
+ /* @__PURE__ */ I("p", {
566
574
  className: "text-sm font-medium text-text-primary",
567
- children: i("agents.detail.noRunsTitle", "No runs yet")
575
+ children: b("agents.detail.noRunsTitle", "No runs yet")
568
576
  }),
569
- /* @__PURE__ */ F("p", {
577
+ /* @__PURE__ */ I("p", {
570
578
  className: "text-xs text-text-secondary",
571
- children: i("agents.detail.noRunsDescription", "Activity appears here once the agent runs.")
579
+ children: b("agents.detail.noRunsDescription", "Activity appears here once the agent runs.")
572
580
  })
573
581
  ]
574
- }) : /* @__PURE__ */ F(h, { items: $ })
582
+ }) : /* @__PURE__ */ I(p, { items: $ })
575
583
  })
576
584
  })
577
585
  })]
578
586
  }),
579
- /* @__PURE__ */ I(m, {
580
- title: i("agents.detail.decisions", "Decisions"),
581
- description: i("agents.detail.decisionsDescription", "Recommendations from this agent. Review, apply or dismiss each one."),
582
- action: /* @__PURE__ */ I("button", {
587
+ /* @__PURE__ */ L(f, {
588
+ title: b("agents.detail.decisions", "Decisions"),
589
+ description: b("agents.detail.decisionsDescription", "Recommendations from this agent. Review, apply or dismiss each one."),
590
+ action: /* @__PURE__ */ L("button", {
583
591
  type: "button",
584
- onClick: () => _("/decisions"),
592
+ onClick: () => E("/decisions"),
585
593
  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",
586
- children: [i("agents.detail.allDecisions", "All decisions"), /* @__PURE__ */ F(C, {
587
- className: "h-3.5 w-3.5",
594
+ children: [b("agents.detail.allDecisions", "All decisions"), /* @__PURE__ */ I(te, {
595
+ className: "rtl:rotate-180 h-3.5 w-3.5",
588
596
  "aria-hidden": !0
589
597
  })]
590
598
  }),
591
- children: [/* @__PURE__ */ F(re, { className: "mb-3" }), q.isLoading ? /* @__PURE__ */ F(p, {
599
+ children: [/* @__PURE__ */ I(S, { className: "mb-3" }), q.isLoading ? /* @__PURE__ */ I(d, {
592
600
  className: "min-h-[120px]",
593
- label: i("decisions.loading", "Loading decisions…")
594
- }) : q.isError ? /* @__PURE__ */ F(b, {
601
+ label: b("decisions.loading", "Loading decisions…")
602
+ }) : q.isError ? /* @__PURE__ */ I(C, {
595
603
  message: q.error instanceof Error ? q.error.message : void 0,
596
604
  onRetry: () => void q.refetch()
597
- }) : Z.length === 0 ? /* @__PURE__ */ F(s, {
605
+ }) : Z.length === 0 ? /* @__PURE__ */ I(o, {
598
606
  illustration: "empty-data",
599
- title: i("agents.detail.noDecisionsTitle", "No decisions yet"),
600
- description: Q ?? i("agents.detail.noDecisionsDescription", "Run the agent to get recommendations. A run only proposes; nothing changes until you apply.")
601
- }) : /* @__PURE__ */ F("div", {
607
+ title: b("agents.detail.noDecisionsTitle", "No decisions yet"),
608
+ description: Q ?? b("agents.detail.noDecisionsDescription", "Run the agent to get recommendations. A run only proposes; nothing changes until you apply.")
609
+ }) : /* @__PURE__ */ I("div", {
602
610
  className: "grid grid-cols-1 gap-3 lg:grid-cols-2",
603
611
  "data-testid": "agent-decisions",
604
- children: Z.slice(0, 6).map((e) => /* @__PURE__ */ F(ne, {
612
+ children: Z.slice(0, 6).map((e) => /* @__PURE__ */ I(x, {
605
613
  decision: e,
606
614
  hideAgent: !0
607
615
  }, e.id))
608
616
  })]
609
617
  }),
610
- P && /* @__PURE__ */ F(pe, {
618
+ B && /* @__PURE__ */ I(me, {
611
619
  agentId: J.id,
612
- onClose: () => B(!1)
620
+ onClose: () => V(!1)
613
621
  })
614
622
  ]
615
623
  });
616
624
  }
617
625
  //#endregion
618
- export { J as AgentDetailPage };
626
+ export { K as AgentDetailPage };
619
627
 
620
628
  //# sourceMappingURL=AgentDetailPage.js.map