@burdenoff/microfe-botmanor 2026.1027.2 → 2026.1028.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 (91) hide show
  1. package/dist/botlit/BotlitRoutes.js +142 -132
  2. package/dist/botlit/BotlitRoutes.js.map +1 -1
  3. package/dist/botlit/components/AgentApprovalPanel.js +144 -126
  4. package/dist/botlit/components/AgentApprovalPanel.js.map +1 -1
  5. package/dist/botlit/components/ModelRegistrationPanel.js +4 -4
  6. package/dist/botlit/components/RetentionStatusPanel.js +95 -0
  7. package/dist/botlit/components/RetentionStatusPanel.js.map +1 -0
  8. package/dist/botlit/components/VersionHistoryPanel.js +92 -83
  9. package/dist/botlit/components/VersionHistoryPanel.js.map +1 -1
  10. package/dist/botlit/hooks/index.js +1 -0
  11. package/dist/botlit/hooks/useRetention.js +31 -0
  12. package/dist/botlit/hooks/useRetention.js.map +1 -0
  13. package/dist/botlit/pages/A2AAgentDetailPage.js +212 -203
  14. package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
  15. package/dist/botlit/pages/A2ARegistryPage.js +129 -117
  16. package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
  17. package/dist/botlit/pages/AgentApprovalsPage.js +122 -110
  18. package/dist/botlit/pages/AgentApprovalsPage.js.map +1 -1
  19. package/dist/botlit/pages/AgentBuilderPage.js +18 -18
  20. package/dist/botlit/pages/AgentDetailPage.js +298 -273
  21. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  22. package/dist/botlit/pages/AgentsListPage.js +145 -121
  23. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  24. package/dist/botlit/pages/BotChannelsTab.js +238 -226
  25. package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
  26. package/dist/botlit/pages/BotDetailPage.js +307 -288
  27. package/dist/botlit/pages/BotDetailPage.js.map +1 -1
  28. package/dist/botlit/pages/BotWorkflowTab.js +125 -116
  29. package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
  30. package/dist/botlit/pages/BotsListPage.js +159 -144
  31. package/dist/botlit/pages/BotsListPage.js.map +1 -1
  32. package/dist/botlit/pages/BucketsPage.js +279 -258
  33. package/dist/botlit/pages/BucketsPage.js.map +1 -1
  34. package/dist/botlit/pages/ChannelDetailPage.js +346 -328
  35. package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
  36. package/dist/botlit/pages/ChannelRoutesPage.js +10 -10
  37. package/dist/botlit/pages/ChannelsPage.js +163 -148
  38. package/dist/botlit/pages/ChannelsPage.js.map +1 -1
  39. package/dist/botlit/pages/DashboardPage.js +129 -114
  40. package/dist/botlit/pages/DashboardPage.js.map +1 -1
  41. package/dist/botlit/pages/ExecutionDetailPage.js +145 -139
  42. package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
  43. package/dist/botlit/pages/ExecutionsPage.js +14 -14
  44. package/dist/botlit/pages/InstalledPackagesPage.js +245 -227
  45. package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
  46. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +168 -156
  47. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
  48. package/dist/botlit/pages/KnowledgeBasesPage.js +91 -79
  49. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
  50. package/dist/botlit/pages/MCPServerDetailPage.js +200 -188
  51. package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -1
  52. package/dist/botlit/pages/MCPServersPage.js +170 -155
  53. package/dist/botlit/pages/MCPServersPage.js.map +1 -1
  54. package/dist/botlit/pages/PoliciesPage.js +115 -104
  55. package/dist/botlit/pages/PoliciesPage.js.map +1 -1
  56. package/dist/botlit/pages/PolicyDetailPage.js +368 -324
  57. package/dist/botlit/pages/PolicyDetailPage.js.map +1 -1
  58. package/dist/botlit/pages/PromptStudioPage.js +106 -97
  59. package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
  60. package/dist/botlit/pages/PromptTemplateDetailPage.js +359 -347
  61. package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -1
  62. package/dist/botlit/pages/PromptTemplatesPage.js +127 -112
  63. package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -1
  64. package/dist/botlit/pages/RetrievalProfileDetailPage.js +219 -210
  65. package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -1
  66. package/dist/botlit/pages/RetrievalProfilesPage.js +112 -103
  67. package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -1
  68. package/dist/botlit/pages/SettingsPage.js +264 -252
  69. package/dist/botlit/pages/SettingsPage.js.map +1 -1
  70. package/dist/botlit/pages/SkillDetailPage.js +235 -226
  71. package/dist/botlit/pages/SkillDetailPage.js.map +1 -1
  72. package/dist/botlit/pages/SkillsPage.js +115 -106
  73. package/dist/botlit/pages/SkillsPage.js.map +1 -1
  74. package/dist/botlit/pages/StorePackageDetailPage.js +194 -188
  75. package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
  76. package/dist/botlit/pages/StorePage.js +161 -155
  77. package/dist/botlit/pages/StorePage.js.map +1 -1
  78. package/dist/botlit/permissions/PermissionRequired.js +45 -0
  79. package/dist/botlit/permissions/PermissionRequired.js.map +1 -0
  80. package/dist/botlit/permissions/botmanorPermissions.js +72 -0
  81. package/dist/botlit/permissions/botmanorPermissions.js.map +1 -0
  82. package/dist/botlit/permissions/index.js +3 -0
  83. package/dist/botlit/permissions/useBotmanorPermissions.js +19 -0
  84. package/dist/botlit/permissions/useBotmanorPermissions.js.map +1 -0
  85. package/dist/botlit/utils/policyConfig.js +67 -42
  86. package/dist/botlit/utils/policyConfig.js.map +1 -1
  87. package/dist/generated/global-types.js.map +1 -1
  88. package/dist/generated/wspace-operations.js +90 -54
  89. package/dist/generated/wspace-operations.js.map +1 -1
  90. package/dist/generated/wspace-types.js.map +1 -1
  91. package/package.json +1 -1
@@ -1,24 +1,27 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
2
  import { formatRelativeTime as t } from "../utils/formatters.js";
3
- import { PageLayout as n } from "../components/PageLayout.js";
4
- import { Card as r, CardContent as i, CardDescription as a, CardHeader as o, CardTitle as s } from "../components/Card.js";
5
- import { Button as c } from "../components/Button.js";
3
+ import { BOTMANOR_PERMISSIONS as n } from "../permissions/botmanorPermissions.js";
4
+ import { BotmanorPermissionGate as r } from "../permissions/useBotmanorPermissions.js";
5
+ import { PageLayout as i } from "../components/PageLayout.js";
6
+ import { Button as a } from "../components/Button.js";
7
+ import "../permissions/index.js";
8
+ import { Card as o, CardContent as s, CardDescription as c, CardHeader as l, CardTitle as u } from "../components/Card.js";
6
9
  import { Badge as ee, StatusBadge as te } from "../components/Badge.js";
7
- import { isNative as l, nativeImpact as ne, nativeNotify as u } from "../../utils/nativeBridge.js";
10
+ import { isNative as d, nativeImpact as ne, nativeNotify as f } from "../../utils/nativeBridge.js";
8
11
  import { EmptyState as re } from "../components/EmptyState.js";
9
- import { FormField as d, Input as f, Textarea as p } from "../components/Input.js";
10
- import { useCreatePolicy as m, useDeletePolicy as ie, usePolicy as ae, useUpdatePolicy as oe } from "../hooks/usePolicies.js";
11
- import { toUnion as h } from "../utils/unions.js";
12
+ import { FormField as p, Input as m, Textarea as h } from "../components/Input.js";
13
+ import { useCreatePolicy as ie, useDeletePolicy as ae, usePolicy as oe, useUpdatePolicy as se } from "../hooks/usePolicies.js";
14
+ import { toUnion as g } from "../utils/unions.js";
12
15
  import "../hooks/index.js";
13
- import { A2A_TRUST_LEVELS as se, CREATABLE_POLICY_TYPES as ce, EMPTY_POLICY_FORM as le, TOOL_RISK_LEVELS as ue, buildPolicyConfig as de, isCreatablePolicyType as fe, unenforcedConfigKeys as pe } from "../utils/policyConfig.js";
14
- import { useState as g } from "react";
15
- import { PagePurpose as me } from "@burdenoff/fe-libs/ui";
16
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
17
- import { useParams as he } from "react-router";
18
- import { AlertTriangle as b, ArrowLeft as ge, Clock as x, Database as S, DollarSign as C, Edit as _e, FileText as w, Power as ve, Save as T, Settings as ye, Shield as E, Trash2 as D, Wrench as O } from "lucide-react";
19
- import { toast as k } from "sonner";
16
+ import { A2A_TRUST_LEVELS as ce, CREATABLE_POLICY_TYPES as le, EMPTY_POLICY_FORM as ue, TOOL_RISK_LEVELS as de, buildPolicyConfig as fe, isCreatablePolicyType as pe, unenforcedConfigKeys as me } from "../utils/policyConfig.js";
17
+ import { useState as _ } from "react";
18
+ import { PagePurpose as he } from "@burdenoff/fe-libs/ui";
19
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
20
+ import { useParams as ge } from "react-router";
21
+ import { AlertTriangle as x, ArrowLeft as _e, Clock as S, Database as C, DollarSign as w, Edit as ve, FileText as T, Power as ye, Save as E, Settings as be, Shield as D, Trash2 as O, Wrench as k } from "lucide-react";
22
+ import { toast as A } from "sonner";
20
23
  //#region src/botlit/pages/PolicyDetailPage.tsx
21
- var be = [
24
+ var xe = [
22
25
  "CONTENT",
23
26
  "TOOL",
24
27
  "DATA",
@@ -26,19 +29,19 @@ var be = [
26
29
  "BUDGET",
27
30
  "RATE_LIMIT",
28
31
  "RETENTION"
29
- ], xe = [
32
+ ], Se = [
30
33
  "PRIVATE",
31
34
  "WORKSPACE",
32
35
  "PUBLIC"
33
- ], A = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", j = ({ type: e }) => ({
34
- CONTENT: /* @__PURE__ */ v(b, { size: 18 }),
35
- TOOL: /* @__PURE__ */ v(O, { size: 18 }),
36
- DATA: /* @__PURE__ */ v(S, { size: 18 }),
37
- RESPONSE: /* @__PURE__ */ v(w, { size: 18 }),
38
- BUDGET: /* @__PURE__ */ v(C, { size: 18 }),
39
- RATE_LIMIT: /* @__PURE__ */ v(x, { size: 18 }),
40
- RETENTION: /* @__PURE__ */ v(D, { size: 18 })
41
- })[e] || /* @__PURE__ */ v(E, { size: 18 }), M = {
36
+ ], j = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", M = ({ type: e }) => ({
37
+ CONTENT: /* @__PURE__ */ y(x, { size: 18 }),
38
+ TOOL: /* @__PURE__ */ y(k, { size: 18 }),
39
+ DATA: /* @__PURE__ */ y(C, { size: 18 }),
40
+ RESPONSE: /* @__PURE__ */ y(T, { size: 18 }),
41
+ BUDGET: /* @__PURE__ */ y(w, { size: 18 }),
42
+ RATE_LIMIT: /* @__PURE__ */ y(S, { size: 18 }),
43
+ RETENTION: /* @__PURE__ */ y(O, { size: 18 })
44
+ })[e] || /* @__PURE__ */ y(D, { size: 18 }), N = {
42
45
  CONTENT: "Content Policy",
43
46
  TOOL: "Tool Policy",
44
47
  DATA: "Data Policy",
@@ -46,174 +49,174 @@ var be = [
46
49
  BUDGET: "Budget Policy",
47
50
  RATE_LIMIT: "Rate Limit Policy",
48
51
  RETENTION: "Retention Policy"
49
- }, N = ({ isNew: S }) => {
50
- let { policyId: N } = he(), { navigateTo: P } = e(), { data: F, loading: Se, refetch: I } = ae(S ? void 0 : N), { create: Ce, loading: we } = m(), { update: L, loading: R } = oe(), { remove: Te, loading: Ee } = ie(), [z, B] = g(!1), [De, V] = g(!1), [H, U] = g({
52
+ }, P = ({ isNew: C }) => {
53
+ let { policyId: P } = ge(), { navigateTo: F } = e(), { data: I, loading: Ce, refetch: L } = oe(C ? void 0 : P), { create: we, loading: Te } = ie(), { update: R, loading: z } = se(), { remove: Ee, loading: De } = ae(), [B, V] = _(!1), [Oe, H] = _(!1), [U, W] = _({
51
54
  name: "",
52
55
  description: "",
53
56
  type: "CONTENT",
54
57
  visibility: "PRIVATE"
55
- }), [W, G] = g({
58
+ }), [G, K] = _({
56
59
  name: "",
57
60
  description: "",
58
61
  visibility: "PRIVATE"
59
- }), [K, Oe] = g(le), [q, J] = g(null), Y = (e, t) => {
60
- J(null), Oe((n) => ({
62
+ }), [q, ke] = _(ue), [J, Y] = _(null), X = (e, t) => {
63
+ Y(null), ke((n) => ({
61
64
  ...n,
62
65
  [e]: {
63
66
  ...n[e],
64
67
  ...t
65
68
  }
66
69
  }));
67
- }, [X, ke] = g(!1), Ae = async () => {
68
- if (!H.name) return;
69
- let e = de(H.type, K);
70
+ }, [Ae, je] = _(!1), Me = async () => {
71
+ if (!U.name) return;
72
+ let e = fe(U.type, q);
70
73
  if (!e.ok) {
71
- J(e.error), k.error(e.error);
74
+ Y(e.error), A.error(e.error);
72
75
  return;
73
76
  }
74
77
  try {
75
- await Ce({
76
- name: H.name,
77
- description: H.description,
78
- type: H.type,
79
- visibility: H.visibility,
80
- status: X ? "ACTIVE" : "DRAFT",
78
+ await we({
79
+ name: U.name,
80
+ description: U.description,
81
+ type: U.type,
82
+ visibility: U.visibility,
83
+ status: Ae ? "ACTIVE" : "DRAFT",
81
84
  config: e.config
82
85
  });
83
86
  } catch (e) {
84
- k.error(e instanceof Error ? e.message : "Failed to create policy");
87
+ A.error(e instanceof Error ? e.message : "Failed to create policy");
85
88
  return;
86
89
  }
87
- k.success(`Policy "${H.name}" created`), P("policies");
88
- }, je = async () => {
89
- if (!(!N || !W.name)) {
90
+ A.success(`Policy "${U.name}" created`), F("policies");
91
+ }, Ne = async () => {
92
+ if (!(!P || !G.name)) {
90
93
  try {
91
- await L({
92
- policyId: N,
94
+ await R({
95
+ policyId: P,
93
96
  input: {
94
- name: W.name,
95
- description: W.description,
96
- visibility: W.visibility
97
+ name: G.name,
98
+ description: G.description,
99
+ visibility: G.visibility
97
100
  }
98
101
  });
99
102
  } catch (e) {
100
- k.error(e instanceof Error ? e.message : "Failed to update policy");
103
+ A.error(e instanceof Error ? e.message : "Failed to update policy");
101
104
  return;
102
105
  }
103
- await I(), k.success("Policy updated"), B(!1);
106
+ await L(), A.success("Policy updated"), V(!1);
104
107
  }
105
- }, Me = async () => {
106
- if (N) try {
107
- await Te(N), l() && u("success"), P("policies");
108
+ }, Pe = async () => {
109
+ if (P) try {
110
+ await Ee(P), d() && f("success"), F("policies");
108
111
  } catch (e) {
109
- throw l() && u("error"), e;
112
+ throw d() && f("error"), e;
110
113
  }
111
- }, Z = F?.status === "ACTIVE", Ne = async () => {
112
- if (!N) return;
114
+ }, Z = I?.status === "ACTIVE", Fe = async () => {
115
+ if (!P) return;
113
116
  let e = Z ? "DRAFT" : "ACTIVE";
114
117
  try {
115
- await L({
116
- policyId: N,
118
+ await R({
119
+ policyId: P,
117
120
  input: { status: e }
118
121
  });
119
122
  } catch (e) {
120
- k.error(e instanceof Error ? e.message : "Failed to update policy");
123
+ A.error(e instanceof Error ? e.message : "Failed to update policy");
121
124
  return;
122
125
  }
123
- await I(), k.success(e === "ACTIVE" ? "Policy is now enforced" : "Policy is no longer enforced");
124
- }, Pe = () => {
125
- F && (G({
126
- name: F.name,
127
- description: F.description || "",
128
- visibility: h(F.visibility, xe, "PRIVATE")
129
- }), B(!0));
126
+ await L(), A.success(e === "ACTIVE" ? "Policy is now enforced" : "Policy is no longer enforced");
127
+ }, Ie = () => {
128
+ I && (K({
129
+ name: I.name,
130
+ description: I.description || "",
131
+ visibility: g(I.visibility, Se, "PRIVATE")
132
+ }), V(!0));
130
133
  };
131
- if (S) return /* @__PURE__ */ v(n, {
134
+ if (C) return /* @__PURE__ */ y(i, {
132
135
  title: "Create Policy",
133
136
  description: "Define guardrails and constraints for your AI agents",
134
- actions: /* @__PURE__ */ y("div", {
137
+ actions: /* @__PURE__ */ b("div", {
135
138
  className: "flex gap-2",
136
- children: [/* @__PURE__ */ v(c, {
139
+ children: [/* @__PURE__ */ y(a, {
137
140
  variant: "outline",
138
- onClick: () => P("policies"),
141
+ onClick: () => F("policies"),
139
142
  children: "Cancel"
140
- }), /* @__PURE__ */ v(c, {
141
- leftIcon: /* @__PURE__ */ v(T, { size: 16 }),
142
- onClick: Ae,
143
- isLoading: we,
144
- disabled: !H.name,
143
+ }), /* @__PURE__ */ y(a, {
144
+ leftIcon: /* @__PURE__ */ y(E, { size: 16 }),
145
+ onClick: Me,
146
+ isLoading: Te,
147
+ disabled: !U.name,
145
148
  children: "Create"
146
149
  })]
147
150
  }),
148
- children: /* @__PURE__ */ y("div", {
151
+ children: /* @__PURE__ */ b("div", {
149
152
  className: "max-w-2xl space-y-6",
150
153
  children: [
151
- /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ v(o, { children: /* @__PURE__ */ v(s, { children: "Basic Information" }) }), /* @__PURE__ */ y(i, {
154
+ /* @__PURE__ */ b(o, { children: [/* @__PURE__ */ y(l, { children: /* @__PURE__ */ y(u, { children: "Basic Information" }) }), /* @__PURE__ */ b(s, {
152
155
  className: "space-y-4",
153
156
  children: [
154
- /* @__PURE__ */ v(d, {
157
+ /* @__PURE__ */ y(p, {
155
158
  label: "Policy Name",
156
159
  required: !0,
157
- children: /* @__PURE__ */ v(f, {
160
+ children: /* @__PURE__ */ y(m, {
158
161
  placeholder: "e.g., Production Content Policy",
159
- value: H.name,
160
- onChange: (e) => U({
161
- ...H,
162
+ value: U.name,
163
+ onChange: (e) => W({
164
+ ...U,
162
165
  name: e.target.value
163
166
  })
164
167
  })
165
168
  }),
166
- /* @__PURE__ */ v(d, {
169
+ /* @__PURE__ */ y(p, {
167
170
  label: "Description",
168
- children: /* @__PURE__ */ v(p, {
171
+ children: /* @__PURE__ */ y(h, {
169
172
  placeholder: "What does this policy enforce?",
170
- value: H.description,
171
- onChange: (e) => U({
172
- ...H,
173
+ value: U.description,
174
+ onChange: (e) => W({
175
+ ...U,
173
176
  description: e.target.value
174
177
  }),
175
178
  rows: 3
176
179
  })
177
180
  }),
178
- /* @__PURE__ */ y("div", {
181
+ /* @__PURE__ */ b("div", {
179
182
  className: "grid grid-cols-2 gap-4",
180
- children: [/* @__PURE__ */ v(d, {
183
+ children: [/* @__PURE__ */ y(p, {
181
184
  label: "Policy Type",
182
185
  required: !0,
183
- children: /* @__PURE__ */ v("select", {
184
- className: A,
185
- value: H.type,
186
+ children: /* @__PURE__ */ y("select", {
187
+ className: j,
188
+ value: U.type,
186
189
  onChange: (e) => {
187
190
  let t = e.target.value;
188
- fe(t) && (J(null), U({
189
- ...H,
191
+ pe(t) && (Y(null), W({
192
+ ...U,
190
193
  type: t
191
194
  }));
192
195
  },
193
- children: ce.map((e) => /* @__PURE__ */ v("option", {
196
+ children: le.map((e) => /* @__PURE__ */ y("option", {
194
197
  value: e,
195
- children: M[e]
198
+ children: N[e]
196
199
  }, e))
197
200
  })
198
- }), /* @__PURE__ */ v(d, {
201
+ }), /* @__PURE__ */ y(p, {
199
202
  label: "Visibility",
200
- children: /* @__PURE__ */ y("select", {
203
+ children: /* @__PURE__ */ b("select", {
201
204
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
202
- value: H.visibility,
203
- onChange: (e) => U({
204
- ...H,
205
+ value: U.visibility,
206
+ onChange: (e) => W({
207
+ ...U,
205
208
  visibility: e.target.value
206
209
  }),
207
210
  children: [
208
- /* @__PURE__ */ v("option", {
211
+ /* @__PURE__ */ y("option", {
209
212
  value: "PRIVATE",
210
213
  children: "Private"
211
214
  }),
212
- /* @__PURE__ */ v("option", {
215
+ /* @__PURE__ */ y("option", {
213
216
  value: "WORKSPACE",
214
217
  children: "Workspace"
215
218
  }),
216
- /* @__PURE__ */ v("option", {
219
+ /* @__PURE__ */ y("option", {
217
220
  value: "PUBLIC",
218
221
  children: "Public"
219
222
  })
@@ -223,252 +226,284 @@ var be = [
223
226
  })
224
227
  ]
225
228
  })] }),
226
- H.type === "CONTENT" && /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y(s, {
229
+ U.type === "CONTENT" && /* @__PURE__ */ b(o, { children: [/* @__PURE__ */ b(l, { children: [/* @__PURE__ */ b(u, {
227
230
  className: "flex items-center gap-2",
228
- children: [/* @__PURE__ */ v(b, { size: 18 }), "Content Policy Configuration"]
229
- }), /* @__PURE__ */ v(a, { children: "Checked against every message sent to an agent and every response it gives. A blocked message is refused; a blocked response is replaced with a refusal." })] }), /* @__PURE__ */ y(i, {
231
+ children: [/* @__PURE__ */ y(x, { size: 18 }), "Content Policy Configuration"]
232
+ }), /* @__PURE__ */ y(c, { children: "Checked against every message sent to an agent and every response it gives. A blocked message is refused; a blocked response is replaced with a refusal." })] }), /* @__PURE__ */ b(s, {
230
233
  className: "space-y-4",
231
234
  children: [
232
- /* @__PURE__ */ y("div", {
235
+ /* @__PURE__ */ b("div", {
233
236
  className: "flex items-start gap-2",
234
- children: [/* @__PURE__ */ v("input", {
237
+ children: [/* @__PURE__ */ y("input", {
235
238
  type: "checkbox",
236
239
  id: "pii",
237
- checked: K.content.piiDetection,
238
- onChange: (e) => Y("content", { piiDetection: e.target.checked }),
240
+ checked: q.content.piiDetection,
241
+ onChange: (e) => X("content", { piiDetection: e.target.checked }),
239
242
  className: "mt-1 h-4 w-4"
240
- }), /* @__PURE__ */ y("label", {
243
+ }), /* @__PURE__ */ b("label", {
241
244
  htmlFor: "pii",
242
245
  className: "text-sm",
243
- children: [/* @__PURE__ */ v("span", {
246
+ children: [/* @__PURE__ */ y("span", {
244
247
  className: "font-medium",
245
248
  children: "PII Detection"
246
- }), /* @__PURE__ */ v("span", {
249
+ }), /* @__PURE__ */ y("span", {
247
250
  className: "block text-text-secondary",
248
251
  children: "Blocks text containing an email address, a US SSN or a card-number shaped digit run."
249
252
  })]
250
253
  })]
251
254
  }),
252
- /* @__PURE__ */ v(d, {
255
+ /* @__PURE__ */ y(p, {
253
256
  label: "Blocked Keywords",
254
257
  description: "Comma-separated. Case-insensitive; any occurrence blocks the text.",
255
- children: /* @__PURE__ */ v(f, {
258
+ children: /* @__PURE__ */ y(m, {
256
259
  placeholder: "e.g., internal-only, project-x",
257
- value: K.content.blockedKeywords,
258
- onChange: (e) => Y("content", { blockedKeywords: e.target.value })
260
+ value: q.content.blockedKeywords,
261
+ onChange: (e) => X("content", { blockedKeywords: e.target.value })
259
262
  })
260
263
  }),
261
- /* @__PURE__ */ v(d, {
264
+ /* @__PURE__ */ y(p, {
262
265
  label: "Blocked Patterns",
263
266
  description: "One regular expression per line, matched case-insensitively.",
264
- children: /* @__PURE__ */ v(p, {
267
+ children: /* @__PURE__ */ y(h, {
265
268
  placeholder: "e.g., \\bACME-\\d{6}\\b",
266
- value: K.content.blockedPatterns,
267
- onChange: (e) => Y("content", { blockedPatterns: e.target.value }),
269
+ value: q.content.blockedPatterns,
270
+ onChange: (e) => X("content", { blockedPatterns: e.target.value }),
268
271
  rows: 3
269
272
  })
270
273
  })
271
274
  ]
272
275
  })] }),
273
- H.type === "TOOL" && /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y(s, {
276
+ U.type === "TOOL" && /* @__PURE__ */ b(o, { children: [/* @__PURE__ */ b(l, { children: [/* @__PURE__ */ b(u, {
274
277
  className: "flex items-center gap-2",
275
- children: [/* @__PURE__ */ v(O, { size: 18 }), "Tool Policy Configuration"]
276
- }), /* @__PURE__ */ v(a, { children: "Applies to MCP tool calls made by agents and through Call Tool, and to agent delegation. Leave a field empty to not restrict it." })] }), /* @__PURE__ */ y(i, {
278
+ children: [/* @__PURE__ */ y(k, { size: 18 }), "Tool Policy Configuration"]
279
+ }), /* @__PURE__ */ y(c, { children: "Applies to MCP tool calls made by agents and through Call Tool, and to agent delegation. Leave a field empty to not restrict it." })] }), /* @__PURE__ */ b(s, {
277
280
  className: "space-y-4",
278
281
  children: [
279
- /* @__PURE__ */ v(d, {
282
+ /* @__PURE__ */ y(p, {
280
283
  label: "Allowed Tools",
281
284
  description: "Comma-separated MCP tool names. End an entry with * to allow a prefix. Empty allows every tool.",
282
- children: /* @__PURE__ */ v(f, {
285
+ children: /* @__PURE__ */ y(m, {
283
286
  placeholder: "e.g., search, read_*",
284
- value: K.tool.allowedTools,
285
- onChange: (e) => Y("tool", { allowedTools: e.target.value })
287
+ value: q.tool.allowedTools,
288
+ onChange: (e) => X("tool", { allowedTools: e.target.value })
286
289
  })
287
290
  }),
288
- /* @__PURE__ */ v(d, {
291
+ /* @__PURE__ */ y(p, {
289
292
  label: "Denied Tools",
290
293
  description: "Comma-separated MCP tool names that may never run. A deny always wins.",
291
- children: /* @__PURE__ */ v(f, {
294
+ children: /* @__PURE__ */ y(m, {
292
295
  placeholder: "e.g., delete_*, execute_code",
293
- value: K.tool.deniedTools,
294
- onChange: (e) => Y("tool", { deniedTools: e.target.value })
296
+ value: q.tool.deniedTools,
297
+ onChange: (e) => X("tool", { deniedTools: e.target.value })
295
298
  })
296
299
  }),
297
- /* @__PURE__ */ y("div", {
300
+ /* @__PURE__ */ b("div", {
298
301
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
299
- children: [/* @__PURE__ */ v(d, {
302
+ children: [/* @__PURE__ */ y(p, {
300
303
  label: "Max Tool Risk Level",
301
- children: /* @__PURE__ */ y("select", {
302
- className: A,
303
- value: K.tool.maxToolRiskLevel,
304
- onChange: (e) => Y("tool", { maxToolRiskLevel: e.target.value }),
305
- children: [/* @__PURE__ */ v("option", {
304
+ children: /* @__PURE__ */ b("select", {
305
+ className: j,
306
+ value: q.tool.maxToolRiskLevel,
307
+ onChange: (e) => X("tool", { maxToolRiskLevel: e.target.value }),
308
+ children: [/* @__PURE__ */ y("option", {
306
309
  value: "",
307
310
  children: "Any risk level"
308
- }), ue.map((e) => /* @__PURE__ */ y("option", {
311
+ }), de.map((e) => /* @__PURE__ */ b("option", {
309
312
  value: e,
310
313
  children: ["Up to ", e.toLowerCase()]
311
314
  }, e))]
312
315
  })
313
- }), /* @__PURE__ */ v(d, {
316
+ }), /* @__PURE__ */ y(p, {
314
317
  label: "Minimum A2A Trust Level",
315
318
  description: "For delegation to external registry agents.",
316
- children: /* @__PURE__ */ y("select", {
317
- className: A,
318
- value: K.tool.a2aMinTrustLevel,
319
- onChange: (e) => Y("tool", { a2aMinTrustLevel: e.target.value }),
320
- children: [/* @__PURE__ */ v("option", {
319
+ children: /* @__PURE__ */ b("select", {
320
+ className: j,
321
+ value: q.tool.a2aMinTrustLevel,
322
+ onChange: (e) => X("tool", { a2aMinTrustLevel: e.target.value }),
323
+ children: [/* @__PURE__ */ y("option", {
321
324
  value: "",
322
325
  children: "Default (verified publisher)"
323
- }), se.map((e) => /* @__PURE__ */ v("option", {
326
+ }), ce.map((e) => /* @__PURE__ */ y("option", {
324
327
  value: e,
325
328
  children: e === "VERIFIED_PUBLISHER" ? "Verified publisher" : e.charAt(0) + e.slice(1).toLowerCase()
326
329
  }, e))]
327
330
  })
328
331
  })]
329
332
  }),
330
- /* @__PURE__ */ y("div", {
333
+ /* @__PURE__ */ b("div", {
331
334
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
332
- children: [/* @__PURE__ */ v(d, {
335
+ children: [/* @__PURE__ */ y(p, {
333
336
  label: "Max Tool Calls Per Execution",
334
337
  description: "Tool calls allowed in one agent turn.",
335
- children: /* @__PURE__ */ v(f, {
338
+ children: /* @__PURE__ */ y(m, {
336
339
  type: "number",
337
340
  min: 1,
338
341
  placeholder: "No limit",
339
- value: K.tool.maxCallsPerExecution,
340
- onChange: (e) => Y("tool", { maxCallsPerExecution: e.target.value })
342
+ value: q.tool.maxCallsPerExecution,
343
+ onChange: (e) => X("tool", { maxCallsPerExecution: e.target.value })
341
344
  })
342
- }), /* @__PURE__ */ v(d, {
345
+ }), /* @__PURE__ */ y(p, {
343
346
  label: "Tool Call Timeout (seconds)",
344
347
  description: "Can only shorten the platform's own timeout.",
345
- children: /* @__PURE__ */ v(f, {
348
+ children: /* @__PURE__ */ y(m, {
346
349
  type: "number",
347
350
  min: 1,
348
351
  placeholder: "Platform default",
349
- value: K.tool.timeoutSeconds,
350
- onChange: (e) => Y("tool", { timeoutSeconds: e.target.value })
352
+ value: q.tool.timeoutSeconds,
353
+ onChange: (e) => X("tool", { timeoutSeconds: e.target.value })
351
354
  })
352
355
  })]
353
356
  })
354
357
  ]
355
358
  })] }),
356
- H.type === "BUDGET" && /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y(s, {
359
+ U.type === "BUDGET" && /* @__PURE__ */ b(o, { children: [/* @__PURE__ */ b(l, { children: [/* @__PURE__ */ b(u, {
357
360
  className: "flex items-center gap-2",
358
- children: [/* @__PURE__ */ v(C, { size: 18 }), "Budget Policy Configuration"]
359
- }), /* @__PURE__ */ v(a, { children: "Token budgets apply per agent. Leave a field empty to not restrict it." })] }), /* @__PURE__ */ v(i, {
361
+ children: [/* @__PURE__ */ y(w, { size: 18 }), "Budget Policy Configuration"]
362
+ }), /* @__PURE__ */ y(c, { children: "Token budgets apply per agent. Leave a field empty to not restrict it." })] }), /* @__PURE__ */ y(s, {
360
363
  className: "space-y-4",
361
- children: /* @__PURE__ */ y("div", {
364
+ children: /* @__PURE__ */ b("div", {
362
365
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
363
- children: [/* @__PURE__ */ v(d, {
366
+ children: [/* @__PURE__ */ y(p, {
364
367
  label: "Max Tokens Per Day",
365
368
  description: "An agent that has used this many tokens today (UTC) is refused.",
366
- children: /* @__PURE__ */ v(f, {
369
+ children: /* @__PURE__ */ y(m, {
367
370
  type: "number",
368
371
  min: 1,
369
372
  placeholder: "No limit",
370
- value: K.budget.maxTokensPerDay,
371
- onChange: (e) => Y("budget", { maxTokensPerDay: e.target.value })
373
+ value: q.budget.maxTokensPerDay,
374
+ onChange: (e) => X("budget", { maxTokensPerDay: e.target.value })
372
375
  })
373
- }), /* @__PURE__ */ v(d, {
376
+ }), /* @__PURE__ */ y(p, {
374
377
  label: "Max Output Tokens Per Model Call",
375
378
  description: "Lowers the agent's own max-tokens setting when it is higher.",
376
- children: /* @__PURE__ */ v(f, {
379
+ children: /* @__PURE__ */ y(m, {
377
380
  type: "number",
378
381
  min: 1,
379
382
  placeholder: "No limit",
380
- value: K.budget.maxTokensPerExecution,
381
- onChange: (e) => Y("budget", { maxTokensPerExecution: e.target.value })
383
+ value: q.budget.maxTokensPerExecution,
384
+ onChange: (e) => X("budget", { maxTokensPerExecution: e.target.value })
382
385
  })
383
386
  })]
384
387
  })
385
388
  })] }),
386
- H.type === "RATE_LIMIT" && /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y(s, {
389
+ U.type === "RATE_LIMIT" && /* @__PURE__ */ b(o, { children: [/* @__PURE__ */ b(l, { children: [/* @__PURE__ */ b(u, {
387
390
  className: "flex items-center gap-2",
388
- children: [/* @__PURE__ */ v(x, { size: 18 }), "Rate Limit Configuration"]
389
- }), /* @__PURE__ */ v(a, { children: "Every limit is counted per agent. Leave a field empty to not restrict it." })] }), /* @__PURE__ */ v(i, {
391
+ children: [/* @__PURE__ */ y(S, { size: 18 }), "Rate Limit Configuration"]
392
+ }), /* @__PURE__ */ y(c, { children: "Every limit is counted per agent. Leave a field empty to not restrict it." })] }), /* @__PURE__ */ y(s, {
390
393
  className: "space-y-4",
391
- children: /* @__PURE__ */ y("div", {
394
+ children: /* @__PURE__ */ b("div", {
392
395
  className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
393
396
  children: [
394
- /* @__PURE__ */ v(d, {
397
+ /* @__PURE__ */ y(p, {
395
398
  label: "Requests / Minute",
396
- children: /* @__PURE__ */ v(f, {
399
+ children: /* @__PURE__ */ y(m, {
397
400
  type: "number",
398
401
  min: 1,
399
402
  placeholder: "No limit",
400
- value: K.rateLimit.requestsPerMinute,
401
- onChange: (e) => Y("rateLimit", { requestsPerMinute: e.target.value })
403
+ value: q.rateLimit.requestsPerMinute,
404
+ onChange: (e) => X("rateLimit", { requestsPerMinute: e.target.value })
402
405
  })
403
406
  }),
404
- /* @__PURE__ */ v(d, {
407
+ /* @__PURE__ */ y(p, {
405
408
  label: "Requests / Hour",
406
- children: /* @__PURE__ */ v(f, {
409
+ children: /* @__PURE__ */ y(m, {
407
410
  type: "number",
408
411
  min: 1,
409
412
  placeholder: "No limit",
410
- value: K.rateLimit.requestsPerHour,
411
- onChange: (e) => Y("rateLimit", { requestsPerHour: e.target.value })
413
+ value: q.rateLimit.requestsPerHour,
414
+ onChange: (e) => X("rateLimit", { requestsPerHour: e.target.value })
412
415
  })
413
416
  }),
414
- /* @__PURE__ */ v(d, {
417
+ /* @__PURE__ */ y(p, {
415
418
  label: "Tokens / Minute",
416
- children: /* @__PURE__ */ v(f, {
419
+ children: /* @__PURE__ */ y(m, {
417
420
  type: "number",
418
421
  min: 1,
419
422
  placeholder: "No limit",
420
- value: K.rateLimit.tokensPerMinute,
421
- onChange: (e) => Y("rateLimit", { tokensPerMinute: e.target.value })
423
+ value: q.rateLimit.tokensPerMinute,
424
+ onChange: (e) => X("rateLimit", { tokensPerMinute: e.target.value })
422
425
  })
423
426
  })
424
427
  ]
425
428
  })
426
429
  })] }),
427
- H.type === "RESPONSE" && /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y(s, {
430
+ U.type === "RESPONSE" && /* @__PURE__ */ b(o, { children: [/* @__PURE__ */ b(l, { children: [/* @__PURE__ */ b(u, {
428
431
  className: "flex items-center gap-2",
429
- children: [/* @__PURE__ */ v(w, { size: 18 }), "Model Usage Allowlist"]
430
- }), /* @__PURE__ */ v(a, { children: "Agents in this workspace may only answer with models that match every active model policy. Leave both fields empty to allow all models." })] }), /* @__PURE__ */ y(i, {
432
+ children: [/* @__PURE__ */ y(T, { size: 18 }), "Model Usage Allowlist"]
433
+ }), /* @__PURE__ */ y(c, { children: "Agents in this workspace may only answer with models that match every active model policy. Leave both fields empty to allow all models." })] }), /* @__PURE__ */ b(s, {
431
434
  className: "space-y-4",
432
- children: [/* @__PURE__ */ v(d, {
435
+ children: [/* @__PURE__ */ y(p, {
433
436
  label: "Allowed Models",
434
437
  description: "Comma-separated model IDs. End an entry with * to allow a prefix.",
435
- children: /* @__PURE__ */ v(f, {
438
+ children: /* @__PURE__ */ y(m, {
436
439
  placeholder: "e.g., gpt-4o-mini, anthropic.claude-*",
437
- value: K.response.allowedModels,
438
- onChange: (e) => Y("response", { allowedModels: e.target.value })
440
+ value: q.response.allowedModels,
441
+ onChange: (e) => X("response", { allowedModels: e.target.value })
439
442
  })
440
- }), /* @__PURE__ */ v(d, {
443
+ }), /* @__PURE__ */ y(p, {
441
444
  label: "Allowed Providers",
442
445
  description: "Comma-separated provider types, e.g. OPENAI, ANTHROPIC, AWS_BEDROCK.",
443
- children: /* @__PURE__ */ v(f, {
446
+ children: /* @__PURE__ */ y(m, {
444
447
  placeholder: "e.g., AWS_BEDROCK, ANTHROPIC",
445
- value: K.response.allowedProviders,
446
- onChange: (e) => Y("response", { allowedProviders: e.target.value })
448
+ value: q.response.allowedProviders,
449
+ onChange: (e) => X("response", { allowedProviders: e.target.value })
447
450
  })
448
451
  })]
449
452
  })] }),
450
- q && /* @__PURE__ */ v("p", {
453
+ U.type === "RETENTION" && /* @__PURE__ */ b(o, { children: [/* @__PURE__ */ b(l, { children: [/* @__PURE__ */ b(u, {
454
+ className: "flex items-center gap-2",
455
+ children: [/* @__PURE__ */ y(O, { size: 18 }), "Retention Policy Configuration"]
456
+ }), /* @__PURE__ */ y(c, { children: "A scheduled job erases content older than these periods every hour. With several active retention policies the shortest period applies. Leave a field empty to keep that content for the life of the workspace." })] }), /* @__PURE__ */ y(s, {
457
+ className: "space-y-4",
458
+ children: /* @__PURE__ */ b("div", {
459
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
460
+ children: [/* @__PURE__ */ y(p, {
461
+ label: "Execution Data Retention (days)",
462
+ description: "Inputs, outputs and errors of finished runs and agent-to-agent messages are erased this many days after the run ended; 0 keeps none. Run metrics stay.",
463
+ children: /* @__PURE__ */ y(m, {
464
+ type: "number",
465
+ min: 0,
466
+ max: 3650,
467
+ placeholder: "Keep",
468
+ value: q.retention.executionDataRetentionDays,
469
+ onChange: (e) => X("retention", { executionDataRetentionDays: e.target.value })
470
+ })
471
+ }), /* @__PURE__ */ y(p, {
472
+ label: "Conversation Retention (days)",
473
+ description: "Assistant conversations older than this are retired and erased.",
474
+ children: /* @__PURE__ */ y(m, {
475
+ type: "number",
476
+ min: 1,
477
+ max: 3650,
478
+ placeholder: "Keep",
479
+ value: q.retention.conversationRetentionDays,
480
+ onChange: (e) => X("retention", { conversationRetentionDays: e.target.value })
481
+ })
482
+ })]
483
+ })
484
+ })] }),
485
+ J && /* @__PURE__ */ y("p", {
451
486
  className: "text-sm text-status-error-text",
452
487
  role: "alert",
453
- children: q
488
+ children: J
454
489
  }),
455
- /* @__PURE__ */ v(r, { children: /* @__PURE__ */ v(i, {
490
+ /* @__PURE__ */ y(o, { children: /* @__PURE__ */ y(s, {
456
491
  className: "pt-6",
457
- children: /* @__PURE__ */ y("div", {
492
+ children: /* @__PURE__ */ b("div", {
458
493
  className: "flex items-start gap-2",
459
- children: [/* @__PURE__ */ v("input", {
494
+ children: [/* @__PURE__ */ y("input", {
460
495
  type: "checkbox",
461
496
  id: "activate-on-create",
462
- checked: X,
463
- onChange: (e) => ke(e.target.checked),
497
+ checked: Ae,
498
+ onChange: (e) => je(e.target.checked),
464
499
  className: "mt-1 h-4 w-4"
465
- }), /* @__PURE__ */ y("label", {
500
+ }), /* @__PURE__ */ b("label", {
466
501
  htmlFor: "activate-on-create",
467
502
  className: "text-sm",
468
- children: [/* @__PURE__ */ v("span", {
503
+ children: [/* @__PURE__ */ y("span", {
469
504
  className: "font-medium",
470
505
  children: "Enforce immediately"
471
- }), /* @__PURE__ */ v("span", {
506
+ }), /* @__PURE__ */ y("span", {
472
507
  className: "block text-text-secondary",
473
508
  children: "Only active policies are enforced. Leave unchecked to save this policy as a draft and activate it later."
474
509
  })]
@@ -478,274 +513,283 @@ var be = [
478
513
  ]
479
514
  })
480
515
  });
481
- if (Se) return /* @__PURE__ */ v(n, {
516
+ if (Ce) return /* @__PURE__ */ y(i, {
482
517
  title: "Loading...",
483
- children: /* @__PURE__ */ v("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
518
+ children: /* @__PURE__ */ y("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
484
519
  });
485
- if (!F) return /* @__PURE__ */ v(n, {
520
+ if (!I) return /* @__PURE__ */ y(i, {
486
521
  title: "Policy Not Found",
487
- children: /* @__PURE__ */ v(re, {
522
+ children: /* @__PURE__ */ y(re, {
488
523
  illustration: "empty-generic",
489
524
  title: "Policy Not Found",
490
525
  description: "This policy doesn't exist.",
491
- action: /* @__PURE__ */ v(c, {
492
- onClick: () => P("policies"),
526
+ action: /* @__PURE__ */ y(a, {
527
+ onClick: () => F("policies"),
493
528
  children: "Back to Policies"
494
529
  })
495
530
  })
496
531
  });
497
- let Q = h(F.type, be, "CONTENT"), $ = pe(Q, F.config);
498
- return /* @__PURE__ */ v(n, {
499
- title: /* @__PURE__ */ y("div", {
532
+ let Q = g(I.type, xe, "CONTENT"), $ = me(Q, I.config);
533
+ return /* @__PURE__ */ y(i, {
534
+ title: /* @__PURE__ */ b("div", {
500
535
  className: "flex items-center gap-3",
501
536
  children: [
502
- /* @__PURE__ */ v(c, {
537
+ /* @__PURE__ */ y(a, {
503
538
  variant: "ghost",
504
539
  size: "icon",
505
- onClick: () => P("policies"),
506
- children: /* @__PURE__ */ v(ge, { size: 20 })
540
+ onClick: () => F("policies"),
541
+ children: /* @__PURE__ */ y(_e, { size: 20 })
507
542
  }),
508
- /* @__PURE__ */ v("div", {
543
+ /* @__PURE__ */ y("div", {
509
544
  className: "p-2 rounded-lg bg-action-primary-bg/10",
510
- children: /* @__PURE__ */ v(j, { type: Q })
545
+ children: /* @__PURE__ */ y(M, { type: Q })
511
546
  }),
512
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
547
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("div", {
513
548
  className: "flex items-center gap-2",
514
- children: [/* @__PURE__ */ v("span", { children: F.name }), /* @__PURE__ */ v(te, { status: F.status })]
515
- }), /* @__PURE__ */ v("p", {
549
+ children: [/* @__PURE__ */ y("span", { children: I.name }), /* @__PURE__ */ y(te, { status: I.status })]
550
+ }), /* @__PURE__ */ y("p", {
516
551
  className: "text-sm font-normal text-text-secondary",
517
- children: F.description
552
+ children: I.description
518
553
  })] })
519
554
  ]
520
555
  }),
521
- actions: /* @__PURE__ */ v("div", {
556
+ actions: /* @__PURE__ */ y("div", {
522
557
  className: "flex gap-2",
523
- children: z ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(c, {
558
+ children: B ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(a, {
524
559
  variant: "outline",
525
- onClick: () => B(!1),
560
+ onClick: () => V(!1),
526
561
  children: "Cancel"
527
- }), /* @__PURE__ */ v(c, {
528
- leftIcon: /* @__PURE__ */ v(T, { size: 16 }),
529
- onClick: je,
530
- isLoading: R,
531
- disabled: !W.name,
562
+ }), /* @__PURE__ */ y(a, {
563
+ leftIcon: /* @__PURE__ */ y(E, { size: 16 }),
564
+ onClick: Ne,
565
+ isLoading: z,
566
+ disabled: !G.name,
532
567
  children: "Save Changes"
533
- })] }) : /* @__PURE__ */ y(_, { children: [
534
- /* @__PURE__ */ v(c, {
535
- variant: Z ? "outline" : "default",
536
- leftIcon: /* @__PURE__ */ v(ve, { size: 16 }),
537
- onClick: () => void Ne(),
538
- isLoading: R,
539
- children: Z ? "Deactivate" : "Activate"
568
+ })] }) : /* @__PURE__ */ b(v, { children: [
569
+ /* @__PURE__ */ y(r, {
570
+ permission: n.POLICY_UPDATE,
571
+ children: /* @__PURE__ */ y(a, {
572
+ variant: Z ? "outline" : "default",
573
+ leftIcon: /* @__PURE__ */ y(ye, { size: 16 }),
574
+ onClick: () => void Fe(),
575
+ isLoading: z,
576
+ children: Z ? "Deactivate" : "Activate"
577
+ })
540
578
  }),
541
- /* @__PURE__ */ v(c, {
542
- variant: "outline",
543
- leftIcon: /* @__PURE__ */ v(_e, { size: 16 }),
544
- onClick: Pe,
545
- children: "Edit"
579
+ /* @__PURE__ */ y(r, {
580
+ permission: n.POLICY_UPDATE,
581
+ children: /* @__PURE__ */ y(a, {
582
+ variant: "outline",
583
+ leftIcon: /* @__PURE__ */ y(ve, { size: 16 }),
584
+ onClick: Ie,
585
+ children: "Edit"
586
+ })
546
587
  }),
547
- De ? /* @__PURE__ */ y("div", {
588
+ Oe ? /* @__PURE__ */ b("div", {
548
589
  className: "flex gap-2",
549
- children: [/* @__PURE__ */ v(c, {
590
+ children: [/* @__PURE__ */ y(a, {
550
591
  variant: "outline",
551
592
  size: "sm",
552
- onClick: () => V(!1),
593
+ onClick: () => H(!1),
553
594
  children: "Cancel"
554
- }), /* @__PURE__ */ v(c, {
595
+ }), /* @__PURE__ */ y(a, {
555
596
  variant: "destructive",
556
597
  size: "sm",
557
598
  onClick: () => {
558
- ne("medium"), Me();
599
+ ne("medium"), Pe();
559
600
  },
560
- isLoading: Ee,
601
+ isLoading: De,
561
602
  children: "Confirm Delete"
562
603
  })]
563
- }) : /* @__PURE__ */ v(c, {
564
- variant: "destructive",
565
- leftIcon: /* @__PURE__ */ v(D, { size: 16 }),
566
- onClick: () => V(!0),
567
- children: "Delete"
604
+ }) : /* @__PURE__ */ y(r, {
605
+ permission: n.POLICY_DELETE,
606
+ children: /* @__PURE__ */ y(a, {
607
+ variant: "destructive",
608
+ leftIcon: /* @__PURE__ */ y(O, { size: 16 }),
609
+ onClick: () => H(!0),
610
+ children: "Delete"
611
+ })
568
612
  })
569
613
  ] })
570
614
  }),
571
- children: /* @__PURE__ */ y("div", {
615
+ children: /* @__PURE__ */ b("div", {
572
616
  className: "space-y-6",
573
617
  children: [
574
- /* @__PURE__ */ v(me, {
575
- icon: /* @__PURE__ */ v(E, { size: 18 }),
618
+ /* @__PURE__ */ y(he, {
619
+ icon: /* @__PURE__ */ y(D, { size: 18 }),
576
620
  children: "This is a single guardrail and its rules. Review and tune exactly what it enforces — what content to block, which tools are allowed, the spend or rate limits it applies — then attach it to the agents and bots that should obey it. Policies are how you keep agents safe, compliant and within budget."
577
621
  }),
578
- z && /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ v(o, { children: /* @__PURE__ */ v(s, { children: "Edit Policy" }) }), /* @__PURE__ */ y(i, {
622
+ B && /* @__PURE__ */ b(o, { children: [/* @__PURE__ */ y(l, { children: /* @__PURE__ */ y(u, { children: "Edit Policy" }) }), /* @__PURE__ */ b(s, {
579
623
  className: "space-y-4",
580
624
  children: [
581
- /* @__PURE__ */ v(d, {
625
+ /* @__PURE__ */ y(p, {
582
626
  label: "Policy Name",
583
627
  required: !0,
584
- children: /* @__PURE__ */ v(f, {
585
- value: W.name,
586
- onChange: (e) => G({
587
- ...W,
628
+ children: /* @__PURE__ */ y(m, {
629
+ value: G.name,
630
+ onChange: (e) => K({
631
+ ...G,
588
632
  name: e.target.value
589
633
  })
590
634
  })
591
635
  }),
592
- /* @__PURE__ */ v(d, {
636
+ /* @__PURE__ */ y(p, {
593
637
  label: "Description",
594
- children: /* @__PURE__ */ v(p, {
595
- value: W.description,
596
- onChange: (e) => G({
597
- ...W,
638
+ children: /* @__PURE__ */ y(h, {
639
+ value: G.description,
640
+ onChange: (e) => K({
641
+ ...G,
598
642
  description: e.target.value
599
643
  }),
600
644
  rows: 3
601
645
  })
602
646
  }),
603
- /* @__PURE__ */ v(d, {
647
+ /* @__PURE__ */ y(p, {
604
648
  label: "Visibility",
605
- children: /* @__PURE__ */ y("select", {
606
- className: A,
607
- value: W.visibility,
608
- onChange: (e) => G({
609
- ...W,
649
+ children: /* @__PURE__ */ b("select", {
650
+ className: j,
651
+ value: G.visibility,
652
+ onChange: (e) => K({
653
+ ...G,
610
654
  visibility: e.target.value
611
655
  }),
612
656
  children: [
613
- /* @__PURE__ */ v("option", {
657
+ /* @__PURE__ */ y("option", {
614
658
  value: "PRIVATE",
615
659
  children: "Private"
616
660
  }),
617
- /* @__PURE__ */ v("option", {
661
+ /* @__PURE__ */ y("option", {
618
662
  value: "WORKSPACE",
619
663
  children: "Workspace"
620
664
  }),
621
- /* @__PURE__ */ v("option", {
665
+ /* @__PURE__ */ y("option", {
622
666
  value: "PUBLIC",
623
667
  children: "Public"
624
668
  })
625
669
  ]
626
670
  })
627
671
  }),
628
- /* @__PURE__ */ v("p", {
672
+ /* @__PURE__ */ y("p", {
629
673
  className: "text-sm text-text-secondary",
630
674
  children: "Note: Policy type and configuration cannot be changed after creation."
631
675
  })
632
676
  ]
633
677
  })] }),
634
- /* @__PURE__ */ y("div", {
678
+ /* @__PURE__ */ b("div", {
635
679
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
636
680
  children: [
637
- /* @__PURE__ */ v(r, {
681
+ /* @__PURE__ */ y(o, {
638
682
  treatment: "glass",
639
683
  glow: !0,
640
- children: /* @__PURE__ */ y(i, {
684
+ children: /* @__PURE__ */ b(s, {
641
685
  className: "pt-6 text-center",
642
686
  children: [
643
- /* @__PURE__ */ v("div", {
687
+ /* @__PURE__ */ y("div", {
644
688
  className: "p-3 rounded-full bg-action-primary-bg/10 w-fit mx-auto mb-2",
645
- children: /* @__PURE__ */ v(j, { type: Q })
689
+ children: /* @__PURE__ */ y(M, { type: Q })
646
690
  }),
647
- /* @__PURE__ */ v("p", {
691
+ /* @__PURE__ */ y("p", {
648
692
  className: "text-lg font-bold",
649
- children: M[Q]
693
+ children: N[Q]
650
694
  }),
651
- /* @__PURE__ */ v("p", {
695
+ /* @__PURE__ */ y("p", {
652
696
  className: "text-sm text-text-secondary",
653
697
  children: "Policy Type"
654
698
  })
655
699
  ]
656
700
  })
657
701
  }),
658
- /* @__PURE__ */ v(r, { children: /* @__PURE__ */ y(i, {
702
+ /* @__PURE__ */ y(o, { children: /* @__PURE__ */ b(s, {
659
703
  className: "pt-6 text-center",
660
- children: [/* @__PURE__ */ v("p", {
704
+ children: [/* @__PURE__ */ y("p", {
661
705
  className: "text-3xl font-bold text-text-primary capitalize",
662
- children: F.visibility.toLowerCase()
663
- }), /* @__PURE__ */ v("p", {
706
+ children: I.visibility.toLowerCase()
707
+ }), /* @__PURE__ */ y("p", {
664
708
  className: "text-sm text-text-secondary",
665
709
  children: "Visibility"
666
710
  })]
667
711
  }) }),
668
- /* @__PURE__ */ v(r, { children: /* @__PURE__ */ y(i, {
712
+ /* @__PURE__ */ y(o, { children: /* @__PURE__ */ b(s, {
669
713
  className: "pt-6 text-center",
670
- children: [/* @__PURE__ */ v("p", {
714
+ children: [/* @__PURE__ */ y("p", {
671
715
  className: "text-3xl font-bold text-text-primary",
672
- children: F.revision
673
- }), /* @__PURE__ */ v("p", {
716
+ children: I.revision
717
+ }), /* @__PURE__ */ y("p", {
674
718
  className: "text-sm text-text-secondary",
675
719
  children: "Revision"
676
720
  })]
677
721
  }) }),
678
- /* @__PURE__ */ v(r, { children: /* @__PURE__ */ y(i, {
722
+ /* @__PURE__ */ y(o, { children: /* @__PURE__ */ b(s, {
679
723
  className: "pt-6 text-center",
680
- children: [/* @__PURE__ */ v("p", {
724
+ children: [/* @__PURE__ */ y("p", {
681
725
  className: "text-lg font-bold text-text-primary",
682
- children: t(F.updatedAt)
683
- }), /* @__PURE__ */ v("p", {
726
+ children: t(I.updatedAt)
727
+ }), /* @__PURE__ */ y("p", {
684
728
  className: "text-sm text-text-secondary",
685
729
  children: "Last Updated"
686
730
  })]
687
731
  }) })
688
732
  ]
689
733
  }),
690
- /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v(s, { children: "Configuration" }), /* @__PURE__ */ v(a, { children: "Current policy configuration" })] }), /* @__PURE__ */ y(i, {
734
+ /* @__PURE__ */ b(o, { children: [/* @__PURE__ */ b(l, { children: [/* @__PURE__ */ y(u, { children: "Configuration" }), /* @__PURE__ */ y(c, { children: "Current policy configuration" })] }), /* @__PURE__ */ b(s, {
691
735
  className: "space-y-4",
692
- children: [$ === null ? /* @__PURE__ */ y("div", {
736
+ children: [$ === null ? /* @__PURE__ */ b("div", {
693
737
  className: "flex items-start gap-2 p-3 bg-status-warning-bg-subtle rounded-lg text-sm",
694
738
  "data-testid": "policy-not-enforced",
695
- children: [/* @__PURE__ */ v(b, {
739
+ children: [/* @__PURE__ */ y(x, {
696
740
  size: 16,
697
741
  className: "mt-0.5 shrink-0 text-status-warning-text"
698
- }), /* @__PURE__ */ y("p", { children: [M[Q], " settings are not enforced at runtime. This policy is kept for reference only and does not restrict any agent."] })]
699
- }) : $.length > 0 ? /* @__PURE__ */ y("div", {
742
+ }), /* @__PURE__ */ b("p", { children: [N[Q], " settings are not enforced at runtime. This policy is kept for reference only and does not restrict any agent."] })]
743
+ }) : $.length > 0 ? /* @__PURE__ */ b("div", {
700
744
  className: "flex items-start gap-2 p-3 bg-status-warning-bg-subtle rounded-lg text-sm",
701
745
  "data-testid": "policy-ignored-keys",
702
- children: [/* @__PURE__ */ v(b, {
746
+ children: [/* @__PURE__ */ y(x, {
703
747
  size: 16,
704
748
  className: "mt-0.5 shrink-0 text-status-warning-text"
705
- }), /* @__PURE__ */ y("p", { children: [
749
+ }), /* @__PURE__ */ b("p", { children: [
706
750
  "These settings are not enforced at runtime and have no effect:",
707
751
  " ",
708
- /* @__PURE__ */ v("span", {
752
+ /* @__PURE__ */ y("span", {
709
753
  className: "font-mono",
710
754
  children: $.join(", ")
711
755
  }),
712
756
  ". Create a new policy to use the enforced settings."
713
757
  ] })]
714
- }) : null, /* @__PURE__ */ v("div", {
758
+ }) : null, /* @__PURE__ */ y("div", {
715
759
  className: "p-4 bg-bg-sunken rounded-lg font-mono text-sm overflow-auto",
716
- children: /* @__PURE__ */ v("pre", { children: JSON.stringify(F.config, null, 2) })
760
+ children: /* @__PURE__ */ y("pre", { children: JSON.stringify(I.config, null, 2) })
717
761
  })]
718
762
  })] }),
719
- /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ v(o, { children: /* @__PURE__ */ y(s, {
763
+ /* @__PURE__ */ b(o, { children: [/* @__PURE__ */ y(l, { children: /* @__PURE__ */ b(u, {
720
764
  className: "flex items-center gap-2",
721
- children: [/* @__PURE__ */ v(ye, { size: 18 }), "Metadata"]
722
- }) }), /* @__PURE__ */ v(i, { children: /* @__PURE__ */ y("div", {
765
+ children: [/* @__PURE__ */ y(be, { size: 18 }), "Metadata"]
766
+ }) }), /* @__PURE__ */ y(s, { children: /* @__PURE__ */ b("div", {
723
767
  className: "grid grid-cols-2 md:grid-cols-4 gap-6 text-sm",
724
768
  children: [
725
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
769
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
726
770
  className: "text-text-secondary",
727
771
  children: "Created"
728
- }), /* @__PURE__ */ v("p", {
772
+ }), /* @__PURE__ */ y("p", {
729
773
  className: "font-medium",
730
- children: t(F.createdAt)
774
+ children: t(I.createdAt)
731
775
  })] }),
732
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
776
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
733
777
  className: "text-text-secondary",
734
778
  children: "Updated"
735
- }), /* @__PURE__ */ v("p", {
779
+ }), /* @__PURE__ */ y("p", {
736
780
  className: "font-medium",
737
- children: t(F.updatedAt)
781
+ children: t(I.updatedAt)
738
782
  })] }),
739
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
783
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
740
784
  className: "text-text-secondary",
741
785
  children: "Tags"
742
- }), /* @__PURE__ */ v("div", {
786
+ }), /* @__PURE__ */ y("div", {
743
787
  className: "flex gap-1",
744
- children: F.tags.length > 0 ? F.tags.map((e) => /* @__PURE__ */ v(ee, {
788
+ children: I.tags.length > 0 ? I.tags.map((e) => /* @__PURE__ */ y(ee, {
745
789
  variant: "secondary",
746
790
  className: "text-xs",
747
791
  children: e
748
- }, e)) : /* @__PURE__ */ v("span", {
792
+ }, e)) : /* @__PURE__ */ y("span", {
749
793
  className: "text-text-secondary",
750
794
  children: "None"
751
795
  })
@@ -757,6 +801,6 @@ var be = [
757
801
  });
758
802
  };
759
803
  //#endregion
760
- export { N as PolicyDetailPage };
804
+ export { P as PolicyDetailPage };
761
805
 
762
806
  //# sourceMappingURL=PolicyDetailPage.js.map