@burdenoff/microfe-botmanor 2026.1117.2 → 2026.1118.2

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 (78) hide show
  1. package/dist/botlit/BotlitRoutes.js +59 -55
  2. package/dist/botlit/BotlitRoutes.js.map +1 -1
  3. package/dist/botlit/components/AgentA2APanel.d.ts +13 -0
  4. package/dist/botlit/components/AgentA2APanel.js +149 -0
  5. package/dist/botlit/components/AgentA2APanel.js.map +1 -0
  6. package/dist/botlit/components/BotAgentsPanel.d.ts +15 -0
  7. package/dist/botlit/components/BotAgentsPanel.js +341 -0
  8. package/dist/botlit/components/BotAgentsPanel.js.map +1 -0
  9. package/dist/botlit/components/BotFormFields.d.ts +4 -0
  10. package/dist/botlit/components/BotFormFields.js +108 -74
  11. package/dist/botlit/components/BotFormFields.js.map +1 -1
  12. package/dist/botlit/components/BotRoutingSummary.d.ts +13 -0
  13. package/dist/botlit/components/BotRoutingSummary.js +126 -0
  14. package/dist/botlit/components/BotRoutingSummary.js.map +1 -0
  15. package/dist/botlit/components/BotVersionHistoryPanel.d.ts +8 -0
  16. package/dist/botlit/components/BotVersionHistoryPanel.js +172 -0
  17. package/dist/botlit/components/BotVersionHistoryPanel.js.map +1 -0
  18. package/dist/botlit/components/CreateFromTemplate.d.ts +12 -0
  19. package/dist/botlit/components/CreateFromTemplate.js +129 -0
  20. package/dist/botlit/components/CreateFromTemplate.js.map +1 -0
  21. package/dist/botlit/components/EntityTags.d.ts +24 -0
  22. package/dist/botlit/components/EntityTags.js +72 -0
  23. package/dist/botlit/components/EntityTags.js.map +1 -0
  24. package/dist/botlit/components/GuardrailPoliciesPanel.d.ts +10 -0
  25. package/dist/botlit/components/GuardrailPoliciesPanel.js +91 -0
  26. package/dist/botlit/components/GuardrailPoliciesPanel.js.map +1 -0
  27. package/dist/botlit/hooks/useA2AConnections.d.ts +21 -0
  28. package/dist/botlit/hooks/useA2AConnections.js +82 -0
  29. package/dist/botlit/hooks/useA2AConnections.js.map +1 -0
  30. package/dist/botlit/hooks/useAgentTestChat.d.ts +29 -0
  31. package/dist/botlit/hooks/useAgentTestChat.js +35 -0
  32. package/dist/botlit/hooks/useAgentTestChat.js.map +1 -0
  33. package/dist/botlit/hooks/useAgents.d.ts +3 -0
  34. package/dist/botlit/hooks/useAgents.js +4 -0
  35. package/dist/botlit/hooks/useAgents.js.map +1 -1
  36. package/dist/botlit/hooks/useBotAgents.d.ts +22 -1
  37. package/dist/botlit/hooks/useBotAgents.js +46 -12
  38. package/dist/botlit/hooks/useBotAgents.js.map +1 -1
  39. package/dist/botlit/hooks/useBotVersions.d.ts +25 -0
  40. package/dist/botlit/hooks/useBotVersions.js +69 -0
  41. package/dist/botlit/hooks/useBotVersions.js.map +1 -0
  42. package/dist/botlit/hooks/useBots.d.ts +3 -0
  43. package/dist/botlit/hooks/useBots.js +4 -0
  44. package/dist/botlit/hooks/useBots.js.map +1 -1
  45. package/dist/botlit/hooks/useLLMProviders.js +40 -32
  46. package/dist/botlit/hooks/useLLMProviders.js.map +1 -1
  47. package/dist/botlit/hooks/useTemplates.d.ts +19 -0
  48. package/dist/botlit/hooks/useTemplates.js +71 -0
  49. package/dist/botlit/hooks/useTemplates.js.map +1 -0
  50. package/dist/botlit/pages/AgentBuilderPage.js +388 -347
  51. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
  52. package/dist/botlit/pages/AgentDetailPage.js +237 -247
  53. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  54. package/dist/botlit/pages/AgentTestChatPage.d.ts +2 -0
  55. package/dist/botlit/pages/AgentTestChatPage.js +176 -0
  56. package/dist/botlit/pages/AgentTestChatPage.js.map +1 -0
  57. package/dist/botlit/pages/AgentsListPage.js +2 -2
  58. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  59. package/dist/botlit/pages/BotDetailPage.js +398 -447
  60. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  61. package/dist/botlit/pages/ChatPage.js +19 -12
  62. package/dist/botlit/pages/ChatPage.js.map +1 -1
  63. package/dist/botlit/pages/PolicyDetailPage.js +605 -293
  64. package/dist/botlit/pages/PolicyDetailPage.js.map +1 -1
  65. package/dist/botlit/pages/SettingsPage.d.ts +7 -0
  66. package/dist/botlit/pages/SettingsPage.js +120 -85
  67. package/dist/botlit/pages/SettingsPage.js.map +1 -1
  68. package/dist/botlit/pages/index.d.ts +1 -0
  69. package/dist/botlit/types/index.d.ts +39 -5
  70. package/dist/botlit/utils/botRouting.d.ts +42 -0
  71. package/dist/botlit/utils/botRouting.js +52 -0
  72. package/dist/botlit/utils/botRouting.js.map +1 -0
  73. package/dist/botlit/utils/policyConfig.d.ts +34 -1
  74. package/dist/botlit/utils/policyConfig.js +172 -55
  75. package/dist/botlit/utils/policyConfig.js.map +1 -1
  76. package/dist/generated/wspace-operations.js +41 -43
  77. package/dist/generated/wspace-operations.js.map +1 -1
  78. package/package.json +1 -1
@@ -7,17 +7,17 @@ import { Button as l } from "../components/Button.js";
7
7
  import { FormField as u, Input as d } from "../components/Input.js";
8
8
  import { Badge as f } from "../components/Badge.js";
9
9
  import "../permissions/index.js";
10
- import { ModelRegistrationPanel as p } from "../components/ModelRegistrationPanel.js";
11
- import { useConfigureLLMProvider as ee, useLLMModels as te, useLLMProviders as m } from "../hooks/useLLMProviders.js";
12
- import { cn as h } from "../utils/cn.js";
13
- import { toUnion as g } from "../utils/unions.js";
14
- import { useState as _ } from "react";
15
- import { PagePurpose as v } from "@burdenoff/fe-libs/ui";
10
+ import { ModelRegistrationPanel as ee } from "../components/ModelRegistrationPanel.js";
11
+ import { useConfigureLLMProvider as te, useLLMModels as p, useLLMProviders as m, useTestLLMConnection as h } from "../hooks/useLLMProviders.js";
12
+ import { cn as g } from "../utils/cn.js";
13
+ import { toUnion as _ } from "../utils/unions.js";
14
+ import { useState as v } from "react";
15
+ import { PagePurpose as ne } from "@burdenoff/fe-libs/ui";
16
16
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
17
- import { Brain as x, ExternalLink as S, Key as C, Link2 as w, Save as T } from "lucide-react";
18
- import { toast as E } from "sonner";
17
+ import { Brain as re, ExternalLink as ie, Key as x, Link2 as S, Save as C } from "lucide-react";
18
+ import { toast as w } from "sonner";
19
19
  // src/botlit/pages/SettingsPage.tsx
20
- var D = [
20
+ var T = [
21
21
  "OPENAI",
22
22
  "ANTHROPIC",
23
23
  "GOOGLE",
@@ -25,14 +25,44 @@ var D = [
25
25
  "AWS_BEDROCK",
26
26
  "CUSTOM"
27
27
  ];
28
+ function E(e) {
29
+ return _(e.toUpperCase(), T, "CUSTOM");
30
+ }
31
+ var D = {
32
+ OPENAI: "OpenAI",
33
+ ANTHROPIC: "Anthropic",
34
+ GOOGLE: "Google AI",
35
+ AZURE_OPENAI: "Azure OpenAI",
36
+ AWS_BEDROCK: "AWS Bedrock",
37
+ CUSTOM: "Custom"
38
+ };
28
39
  function O(e) {
29
- return g(e.toUpperCase(), D, "CUSTOM");
40
+ return D[E(e)];
41
+ }
42
+ function k(e, t) {
43
+ return t?.trim() || O(e);
30
44
  }
31
- var k = () => {
32
- let g = e(), { data: D, refetch: k, loading: ne, error: re } = m(), { configureProvider: A, isConfiguring: j } = ee(), { data: M, refetch: N, loading: P, error: F } = te(), I = ne || P, L = re || F, [R, z] = _(""), [B, V] = _(!0), [H, U] = _("openai"), [W, G] = _(null), [K, q] = _("apikey"), [J, Y] = _(""), [X, Z] = _("ap-south-1"), Q = H === "aws_bedrock", $ = Q && K === "iam", ie = /^[a-z]{2}(?:-[a-z]+)+-\d+$/.test(X.trim());
45
+ var A = ({ providerId: e, providerName: t }) => {
46
+ let [n, r] = h();
47
+ return /* @__PURE__ */ y(l, {
48
+ variant: "outline",
49
+ size: "sm",
50
+ isLoading: r.loading,
51
+ "aria-label": `Test connection to ${t}`,
52
+ onClick: async () => {
53
+ try {
54
+ await n(e) ? w.success(`${t}: connection works`) : w.error(`${t}: the provider did not accept the request`);
55
+ } catch (e) {
56
+ w.error(e instanceof Error ? e.message : `${t}: connection test failed`);
57
+ }
58
+ },
59
+ children: "Test connection"
60
+ });
61
+ }, j = () => {
62
+ let h = e(), { data: _, refetch: T, loading: D, error: O } = m(), { configureProvider: j, isConfiguring: M } = te(), { data: N, refetch: P, loading: ae, error: F } = p(), I = D || ae, L = O || F, [R, z] = v(""), [B, V] = v(!0), [H, U] = v("openai"), [W, G] = v(null), [K, q] = v("apikey"), [J, Y] = v(""), [X, Z] = v("ap-south-1"), Q = H === "aws_bedrock", $ = Q && K === "iam", oe = /^[a-z]{2}(?:-[a-z]+)+-\d+$/.test(X.trim());
33
63
  return /* @__PURE__ */ y(t, {
34
- title: g("botlit.settings.title", "Settings"),
35
- description: g("botlit.settings.description", "Configure your BotManor workspace settings"),
64
+ title: h("botlit.settings.title", "Settings"),
65
+ description: h("botlit.settings.description", "Configure your BotManor workspace settings"),
36
66
  children: /* @__PURE__ */ b("div", {
37
67
  className: "space-y-6",
38
68
  children: [
@@ -45,27 +75,27 @@ var k = () => {
45
75
  children: [/* @__PURE__ */ y("p", { children: "Could not load providers and models. Try loading the catalog again." }), /* @__PURE__ */ y(l, {
46
76
  variant: "secondary",
47
77
  onClick: () => {
48
- k(), N();
78
+ T(), P();
49
79
  },
50
80
  children: "Retry model catalog"
51
81
  })]
52
82
  }),
53
- /* @__PURE__ */ y(v, {
54
- icon: /* @__PURE__ */ y(C, { size: 18 }),
55
- children: g("botlit.settings.purpose", "Workspace-wide settings for LLM Providers — connect at least one model provider (OpenAI, Anthropic, Google and others) so your agents have a brain to think with.")
83
+ /* @__PURE__ */ y(ne, {
84
+ icon: /* @__PURE__ */ y(x, { size: 18 }),
85
+ children: h("botlit.settings.purpose", "Workspace-wide settings for LLM Providers — connect at least one model provider (OpenAI, Anthropic, Google and others) so your agents have a brain to think with.")
56
86
  }),
57
87
  /* @__PURE__ */ b(n, {
58
88
  treatment: "glass",
59
89
  glow: !0,
60
- children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children: g("botlit.settings.providers.title", "LLM Providers") }), /* @__PURE__ */ y(i, { children: g("botlit.settings.providers.description", "Configure API keys for AI model providers") })] }), /* @__PURE__ */ y(r, {
90
+ children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children: h("botlit.settings.providers.title", "LLM Providers") }), /* @__PURE__ */ y(i, { children: h("botlit.settings.providers.description", "Configure API keys for AI model providers") })] }), /* @__PURE__ */ y(r, {
61
91
  className: "space-y-4",
62
- children: D?.map((e) => /* @__PURE__ */ b("div", {
92
+ children: _?.map((e) => /* @__PURE__ */ b("div", {
63
93
  className: "flex items-center justify-between p-4 border border-border-subtle rounded-lg",
64
94
  children: [/* @__PURE__ */ b("div", {
65
95
  className: "flex items-center gap-4",
66
96
  children: [/* @__PURE__ */ y("div", {
67
97
  className: "p-2 bg-action-primary-bg/10 rounded-lg",
68
- children: e.connectionId ? /* @__PURE__ */ y(w, { className: "h-5 w-5 text-primary" }) : /* @__PURE__ */ y(C, { className: "h-5 w-5 text-primary" })
98
+ children: e.connectionId ? /* @__PURE__ */ y(S, { className: "h-5 w-5 text-primary" }) : /* @__PURE__ */ y(x, { className: "h-5 w-5 text-primary" })
69
99
  }), /* @__PURE__ */ b("div", { children: [
70
100
  /* @__PURE__ */ y("p", {
71
101
  className: "font-medium",
@@ -73,15 +103,15 @@ var k = () => {
73
103
  }),
74
104
  /* @__PURE__ */ y("p", {
75
105
  className: "text-sm text-text-secondary",
76
- children: g("botlit.settings.providers.type", "Type: {{type}}", { type: e.type })
106
+ children: h("botlit.settings.providers.type", "Type: {{type}}", { type: e.type })
77
107
  }),
78
108
  e.connectionId && /* @__PURE__ */ y("p", {
79
109
  className: "text-xs text-text-secondary mt-0.5",
80
- children: g("botlit.settings.providers.connectedViaIntegrations", "Connected via Integrations")
110
+ children: h("botlit.settings.providers.connectedViaIntegrations", "Connected via Integrations")
81
111
  }),
82
112
  !e.connectionId && e.credentialsHash && /* @__PURE__ */ y("p", {
83
113
  className: "text-xs text-text-secondary mt-0.5",
84
- children: g("botlit.settings.providers.apiKeyStored", "API key stored locally")
114
+ children: h("botlit.settings.providers.apiKeyStored", "API key stored locally")
85
115
  })
86
116
  ] })]
87
117
  }), /* @__PURE__ */ b("div", {
@@ -89,11 +119,18 @@ var k = () => {
89
119
  children: [
90
120
  e.connectionId && /* @__PURE__ */ y(f, {
91
121
  variant: "default",
92
- children: g("botlit.settings.providers.integrationBadge", "Integration")
122
+ children: h("botlit.settings.providers.integrationBadge", "Integration")
93
123
  }),
94
124
  /* @__PURE__ */ y(f, {
95
125
  variant: e.isActive ? "success" : "secondary",
96
- children: e.isActive ? g("botlit.settings.providers.active", "Active") : g("botlit.settings.providers.inactive", "Inactive")
126
+ children: e.isActive ? h("botlit.settings.providers.active", "Active") : h("botlit.settings.providers.inactive", "Inactive")
127
+ }),
128
+ e.isActive && /* @__PURE__ */ y(c, {
129
+ permission: s.LLM_TEST,
130
+ children: /* @__PURE__ */ y(A, {
131
+ providerId: e.id,
132
+ providerName: e.name
133
+ })
97
134
  }),
98
135
  /* @__PURE__ */ y(c, {
99
136
  permission: s.LLM_UPDATE,
@@ -103,7 +140,7 @@ var k = () => {
103
140
  onClick: () => {
104
141
  G(e.id), V(e.isActive), U(e.type.toLowerCase()), z(""), Y(e.connectionId || ""), q(e.type === "AWS_BEDROCK" && e.metadata?.awsAuthentication === "iam" ? "iam" : e.connectionId ? "integration" : "apikey"), Z(typeof e.metadata?.region == "string" ? e.metadata.region : "ap-south-1"), document.getElementById("provider-form")?.scrollIntoView({ behavior: "smooth" });
105
142
  },
106
- children: g("botlit.settings.actions.configure", "Configure")
143
+ children: h("botlit.settings.actions.configure", "Configure")
107
144
  })
108
145
  })
109
146
  ]
@@ -111,17 +148,17 @@ var k = () => {
111
148
  }, e.id))
112
149
  })]
113
150
  }),
114
- /* @__PURE__ */ b(n, { children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children: g("botlit.settings.models.title", "LLM Models") }), /* @__PURE__ */ y(i, { children: g("botlit.settings.models.description", "Registered models across your providers") })] }), /* @__PURE__ */ y(r, {
151
+ /* @__PURE__ */ b(n, { children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children: h("botlit.settings.models.title", "LLM Models") }), /* @__PURE__ */ y(i, { children: h("botlit.settings.models.description", "Registered models across your providers") })] }), /* @__PURE__ */ y(r, {
115
152
  className: "space-y-4",
116
- children: M && M.length > 0 ? M.map((e) => {
117
- let t = D?.find((t) => t.id === e.providerId)?.name;
153
+ children: N && N.length > 0 ? N.map((e) => {
154
+ let t = _?.find((t) => t.id === e.providerId)?.name;
118
155
  return /* @__PURE__ */ b("div", {
119
156
  className: "flex items-center justify-between p-4 border border-border-subtle rounded-lg",
120
157
  children: [/* @__PURE__ */ b("div", {
121
158
  className: "flex items-center gap-4",
122
159
  children: [/* @__PURE__ */ y("div", {
123
160
  className: "p-2 bg-accent rounded-lg",
124
- children: /* @__PURE__ */ y(x, { className: "h-5 w-5 text-text-primary" })
161
+ children: /* @__PURE__ */ y(re, { className: "h-5 w-5 text-text-primary" })
125
162
  }), /* @__PURE__ */ b("div", { children: [
126
163
  /* @__PURE__ */ y("p", {
127
164
  className: "font-medium",
@@ -134,39 +171,39 @@ var k = () => {
134
171
  /* @__PURE__ */ b("div", {
135
172
  className: "flex gap-3 mt-1 text-xs text-text-secondary",
136
173
  children: [
137
- e.contextWindow != null && /* @__PURE__ */ y("span", { children: g("botlit.settings.models.context", "Context: {{value}}K", { value: (e.contextWindow / 1e3).toFixed(0) }) }),
138
- e.maxOutputTokens != null && /* @__PURE__ */ y("span", { children: g("botlit.settings.models.maxOut", "Max out: {{value}}K", { value: (e.maxOutputTokens / 1e3).toFixed(0) }) }),
139
- e.inputPricePerMToken != null && /* @__PURE__ */ y("span", { children: g("botlit.settings.models.priceIn", "${{value}}/M in", { value: e.inputPricePerMToken }) }),
140
- e.outputPricePerMToken != null && /* @__PURE__ */ y("span", { children: g("botlit.settings.models.priceOut", "${{value}}/M out", { value: e.outputPricePerMToken }) })
174
+ e.contextWindow != null && /* @__PURE__ */ y("span", { children: h("botlit.settings.models.context", "Context: {{value}}K", { value: (e.contextWindow / 1e3).toFixed(0) }) }),
175
+ e.maxOutputTokens != null && /* @__PURE__ */ y("span", { children: h("botlit.settings.models.maxOut", "Max out: {{value}}K", { value: (e.maxOutputTokens / 1e3).toFixed(0) }) }),
176
+ e.inputPricePerMToken != null && /* @__PURE__ */ y("span", { children: h("botlit.settings.models.priceIn", "${{value}}/M in", { value: e.inputPricePerMToken }) }),
177
+ e.outputPricePerMToken != null && /* @__PURE__ */ y("span", { children: h("botlit.settings.models.priceOut", "${{value}}/M out", { value: e.outputPricePerMToken }) })
141
178
  ]
142
179
  })
143
180
  ] })]
144
181
  }), /* @__PURE__ */ y(f, {
145
182
  variant: e.isActive ? "success" : "secondary",
146
- children: e.isActive ? g("botlit.settings.providers.active", "Active") : g("botlit.settings.providers.inactive", "Inactive")
183
+ children: e.isActive ? h("botlit.settings.providers.active", "Active") : h("botlit.settings.providers.inactive", "Inactive")
147
184
  })]
148
185
  }, e.id);
149
186
  }) : !I && !L ? /* @__PURE__ */ y("p", {
150
187
  className: "text-sm text-text-secondary text-center py-4",
151
- children: g("botlit.settings.models.empty", "No models registered yet.")
188
+ children: h("botlit.settings.models.empty", "No models registered yet.")
152
189
  }) : null
153
190
  })] }),
154
191
  !I && !L && /* @__PURE__ */ y(c, {
155
192
  permission: s.LLM_CREATE,
156
- children: /* @__PURE__ */ y(p, {
157
- providers: D ?? [],
158
- onCreated: () => void N()
193
+ children: /* @__PURE__ */ y(ee, {
194
+ providers: _ ?? [],
195
+ onCreated: () => void P()
159
196
  })
160
197
  }),
161
198
  /* @__PURE__ */ y(c, {
162
199
  permission: s.LLM_CREATE,
163
200
  children: /* @__PURE__ */ b(n, {
164
201
  id: "provider-form",
165
- children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children: W ? g("botlit.settings.form.updateTitle", "Update Provider") : g("botlit.settings.form.addTitle", "Add Provider") }), /* @__PURE__ */ y(i, { children: W ? g("botlit.settings.form.updateDescription", "Update credentials for this provider") : g("botlit.settings.form.addDescription", "Configure a new LLM provider") })] }), /* @__PURE__ */ b(r, {
202
+ children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(o, { children: W ? h("botlit.settings.form.updateTitle", "Update Provider") : h("botlit.settings.form.addTitle", "Add Provider") }), /* @__PURE__ */ y(i, { children: W ? h("botlit.settings.form.updateDescription", "Update credentials for this provider") : h("botlit.settings.form.addDescription", "Configure a new LLM provider") })] }), /* @__PURE__ */ b(r, {
166
203
  className: "space-y-4",
167
204
  children: [
168
205
  /* @__PURE__ */ y(u, {
169
- label: g("botlit.settings.form.providerLabel", "Provider"),
206
+ label: h("botlit.settings.form.providerLabel", "Provider"),
170
207
  children: /* @__PURE__ */ b("select", {
171
208
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
172
209
  value: H,
@@ -222,12 +259,12 @@ var k = () => {
222
259
  })]
223
260
  }),
224
261
  /* @__PURE__ */ y(u, {
225
- label: g("botlit.settings.form.credentialMethod", "Credential Method"),
262
+ label: h("botlit.settings.form.credentialMethod", "Credential Method"),
226
263
  children: /* @__PURE__ */ b("div", {
227
264
  className: "flex flex-wrap gap-3",
228
265
  children: [
229
266
  Q && /* @__PURE__ */ b("label", {
230
- className: h("flex items-center gap-2 px-4 py-3 border rounded-lg cursor-pointer flex-1", $ ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/50"),
267
+ className: g("flex items-center gap-2 px-4 py-3 border rounded-lg cursor-pointer flex-1", $ ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/50"),
231
268
  children: [/* @__PURE__ */ y("input", {
232
269
  type: "radio",
233
270
  name: "credentialMethod",
@@ -239,7 +276,7 @@ var k = () => {
239
276
  }), "Managed AWS IAM"]
240
277
  }),
241
278
  /* @__PURE__ */ b("label", {
242
- className: h("flex items-center gap-2 px-4 py-3 border rounded-lg cursor-pointer transition-colors flex-1", K === "integration" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/50"),
279
+ className: g("flex items-center gap-2 px-4 py-3 border rounded-lg cursor-pointer transition-colors flex-1", K === "integration" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/50"),
243
280
  children: [/* @__PURE__ */ y("input", {
244
281
  type: "radio",
245
282
  name: "credentialMethod",
@@ -249,14 +286,14 @@ var k = () => {
249
286
  className: "h-4 w-4"
250
287
  }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
251
288
  className: "font-medium text-sm",
252
- children: g("botlit.settings.form.integrationOption", "Connect via Integrations")
289
+ children: h("botlit.settings.form.integrationOption", "Connect via Integrations")
253
290
  }), /* @__PURE__ */ y("p", {
254
291
  className: "text-xs text-text-secondary",
255
- children: g("botlit.settings.form.integrationHint", "Managed credentials (recommended)")
292
+ children: h("botlit.settings.form.integrationHint", "Managed credentials (recommended)")
256
293
  })] })]
257
294
  }),
258
295
  /* @__PURE__ */ b("label", {
259
- className: h("flex items-center gap-2 px-4 py-3 border rounded-lg cursor-pointer transition-colors flex-1", K === "apikey" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/50"),
296
+ className: g("flex items-center gap-2 px-4 py-3 border rounded-lg cursor-pointer transition-colors flex-1", K === "apikey" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/50"),
260
297
  children: [/* @__PURE__ */ y("input", {
261
298
  type: "radio",
262
299
  name: "credentialMethod",
@@ -266,10 +303,10 @@ var k = () => {
266
303
  className: "h-4 w-4"
267
304
  }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
268
305
  className: "font-medium text-sm",
269
- children: g("botlit.settings.form.apiKeyOption", "Enter API Key")
306
+ children: h("botlit.settings.form.apiKeyOption", "Enter API Key")
270
307
  }), /* @__PURE__ */ y("p", {
271
308
  className: "text-xs text-text-secondary",
272
- children: g("botlit.settings.form.apiKeyHint", "Paste key directly (legacy)")
309
+ children: h("botlit.settings.form.apiKeyHint", "Paste key directly (legacy)")
273
310
  })] })]
274
311
  })
275
312
  ]
@@ -281,16 +318,16 @@ var k = () => {
281
318
  className: "p-4 bg-bg-sunken/50 border border-border-subtle rounded-lg",
282
319
  children: /* @__PURE__ */ b("div", {
283
320
  className: "flex items-start gap-3",
284
- children: [/* @__PURE__ */ y(w, { className: "h-5 w-5 text-primary mt-0.5 flex-shrink-0" }), /* @__PURE__ */ b("div", {
321
+ children: [/* @__PURE__ */ y(S, { className: "h-5 w-5 text-primary mt-0.5 flex-shrink-0" }), /* @__PURE__ */ b("div", {
285
322
  className: "space-y-2 flex-1",
286
323
  children: [
287
324
  /* @__PURE__ */ y("p", {
288
325
  className: "text-sm font-medium",
289
- children: g("botlit.settings.form.integrationTitle", "Integration Connection")
326
+ children: h("botlit.settings.form.integrationTitle", "Integration Connection")
290
327
  }),
291
328
  /* @__PURE__ */ y("p", {
292
329
  className: "text-xs text-text-secondary",
293
- children: g("botlit.settings.form.integrationDescription", "Create a connection in the Integrations module, then paste the Connection ID here. This stores your API key securely in the Integrations vault.")
330
+ children: h("botlit.settings.form.integrationDescription", "Create a connection in the Integrations module, then paste the Connection ID here. This stores your API key securely in the Integrations vault.")
294
331
  }),
295
332
  /* @__PURE__ */ y("div", {
296
333
  className: "flex gap-2 mt-2",
@@ -300,29 +337,29 @@ var k = () => {
300
337
  onClick: () => {
301
338
  window.open("/integrations/connections", "_blank");
302
339
  },
303
- children: [/* @__PURE__ */ y(S, {
340
+ children: [/* @__PURE__ */ y(ie, {
304
341
  size: 14,
305
342
  className: "mr-1.5"
306
- }), g("botlit.settings.form.openIntegrations", "Open Integrations")]
343
+ }), h("botlit.settings.form.openIntegrations", "Open Integrations")]
307
344
  })
308
345
  })
309
346
  ]
310
347
  })]
311
348
  })
312
349
  }), /* @__PURE__ */ y(u, {
313
- label: g("botlit.settings.form.connectionIdPlaceholder", "Connection ID"),
350
+ label: h("botlit.settings.form.connectionIdPlaceholder", "Connection ID"),
314
351
  children: /* @__PURE__ */ y(d, {
315
- placeholder: g("botlit.settings.form.connectionIdPlaceholder", "Paste connection ID from Integrations..."),
352
+ placeholder: h("botlit.settings.form.connectionIdPlaceholder", "Paste connection ID from Integrations..."),
316
353
  value: J,
317
354
  onChange: (e) => Y(e.target.value)
318
355
  })
319
356
  })]
320
357
  }),
321
358
  K === "apikey" && /* @__PURE__ */ y(u, {
322
- label: g("botlit.settings.form.apiKeyLabel", "API Key"),
359
+ label: h("botlit.settings.form.apiKeyLabel", "API Key"),
323
360
  children: /* @__PURE__ */ y(d, {
324
361
  type: "password",
325
- placeholder: g("botlit.settings.form.apiKeyPlaceholder", "sk-..."),
362
+ placeholder: h("botlit.settings.form.apiKeyPlaceholder", "sk-..."),
326
363
  value: R,
327
364
  onChange: (e) => z(e.target.value)
328
365
  })
@@ -330,44 +367,42 @@ var k = () => {
330
367
  /* @__PURE__ */ b("div", {
331
368
  className: "flex gap-2",
332
369
  children: [/* @__PURE__ */ y(l, {
333
- leftIcon: /* @__PURE__ */ y(T, { size: 16 }),
334
- isLoading: j,
335
- disabled: Q && !ie || ($ ? !1 : K === "apikey" ? !R.trim() : !J.trim()),
370
+ leftIcon: /* @__PURE__ */ y(C, { size: 16 }),
371
+ isLoading: M,
372
+ disabled: Q && !oe || ($ ? !1 : K === "apikey" ? !R.trim() : !J.trim()),
336
373
  onClick: async () => {
337
374
  try {
338
- let e = H.charAt(0).toUpperCase() + H.slice(1), t = K === "apikey" && R ? { apiKey: R } : void 0, n = K === "integration" ? J : null, r = D?.find((e) => e.id === W)?.metadata ?? {}, i = Q ? {
339
- ...r,
375
+ let e = _?.find((e) => e.id === W), t = k(H, e?.name), n = K === "apikey" && R ? { apiKey: R } : void 0, r = K === "integration" ? J : null, i = e?.metadata ?? {}, a = Q ? {
376
+ ...i,
340
377
  region: X.trim(),
341
378
  awsAuthentication: $ ? "iam" : "credentials"
342
- } : r;
343
- W ? await A({
344
- name: e,
345
- type: O(H),
346
- connectionId: n,
347
- credentials: t,
348
- metadata: i,
379
+ } : i;
380
+ W ? await j({
381
+ name: t,
382
+ type: E(H),
383
+ connectionId: r,
384
+ credentials: n,
385
+ metadata: a,
349
386
  isActive: B
350
- }, W) : await A({
351
- name: e,
352
- type: O(H),
353
- connectionId: n,
354
- credentials: t,
355
- metadata: i
356
- }), z(""), Y(""), G(null), await k();
357
- let a = H.charAt(0).toUpperCase() + H.slice(1);
358
- E.success(W ? g("botlit.settings.form.updateSuccess", "{{provider}} provider updated successfully", { provider: a }) : g("botlit.settings.form.addSuccess", "{{provider}} provider added successfully", { provider: a }));
387
+ }, W) : await j({
388
+ name: t,
389
+ type: E(H),
390
+ connectionId: r,
391
+ credentials: n,
392
+ metadata: a
393
+ }), z(""), Y(""), G(null), await T(), w.success(W ? h("botlit.settings.form.updateSuccess", "{{provider}} provider updated successfully", { provider: t }) : h("botlit.settings.form.addSuccess", "{{provider}} provider added successfully", { provider: t }));
359
394
  } catch (e) {
360
- let t = e instanceof Error ? e.message : g("botlit.settings.form.saveError", "Failed to save provider");
361
- E.error(t);
395
+ let t = e instanceof Error ? e.message : h("botlit.settings.form.saveError", "Failed to save provider");
396
+ w.error(t);
362
397
  }
363
398
  },
364
- children: W ? g("botlit.settings.form.updateProvider", "Update Provider") : g("botlit.settings.form.saveProvider", "Save Provider")
399
+ children: W ? h("botlit.settings.form.updateProvider", "Update Provider") : h("botlit.settings.form.saveProvider", "Save Provider")
365
400
  }), W && /* @__PURE__ */ y(l, {
366
401
  variant: "outline",
367
402
  onClick: () => {
368
403
  G(null), z(""), Y(""), q("apikey"), U("openai");
369
404
  },
370
- children: g("botlit.settings.form.cancel", "Cancel")
405
+ children: h("botlit.settings.form.cancel", "Cancel")
371
406
  })]
372
407
  })
373
408
  ]
@@ -378,6 +413,6 @@ var k = () => {
378
413
  })
379
414
  });
380
415
  };
381
- export { k as SettingsPage };
416
+ export { j as SettingsPage, O as providerLabel, k as providerNameFor };
382
417
 
383
418
  //# sourceMappingURL=SettingsPage.js.map