@burdenoff/microfe-botmanor 2026.1014.1 → 2026.1025.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.
@@ -1,23 +1,23 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
2
  import { formatRelativeTime as t } from "../utils/formatters.js";
3
3
  import { PageLayout as n } from "../components/PageLayout.js";
4
- import { Card as r, CardContent as i, CardDescription as ee, CardHeader as a, CardTitle as o } from "../components/Card.js";
5
- import { Button as s } from "../components/Button.js";
6
- import { Badge as te, StatusBadge as ne } from "../components/Badge.js";
7
- import { isNative as c, nativeImpact as re, nativeNotify as l } from "../../utils/nativeBridge.js";
8
- import { EmptyState as ie } from "../components/EmptyState.js";
9
- import { FormField as u, Input as d, Textarea as f } from "../components/Input.js";
10
- import { useCreatePolicy as ae, useDeletePolicy as oe, usePolicy as se, useUpdatePolicy as ce } from "../hooks/usePolicies.js";
11
- import { toUnion as p } from "../utils/unions.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";
6
+ 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";
8
+ 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 ie, useDeletePolicy as ae, usePolicy as oe, useUpdatePolicy as se } from "../hooks/usePolicies.js";
11
+ import { toUnion as m } from "../utils/unions.js";
12
12
  import "../hooks/index.js";
13
- import { useState as m } from "react";
14
- import { PagePurpose as le } from "@burdenoff/fe-libs/ui";
15
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
16
- import { useParams as ue } from "react-router";
17
- import { AlertTriangle as v, ArrowLeft as de, Clock as y, Database as b, DollarSign as x, Edit as fe, FileText as S, Save as C, Settings as pe, Shield as w, Trash2 as T, Wrench as E } from "lucide-react";
18
- import { toast as D } from "sonner";
13
+ import { useState as h } from "react";
14
+ import { PagePurpose as ce } from "@burdenoff/fe-libs/ui";
15
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
16
+ import { useParams as le } from "react-router";
17
+ import { AlertTriangle as y, ArrowLeft as ue, Clock as b, Database as x, DollarSign as de, Edit as fe, FileText as S, Power as pe, Save as me, Settings as he, Shield as C, Trash2 as w, Wrench as T } from "lucide-react";
18
+ import { toast as E } from "sonner";
19
19
  //#region src/botlit/pages/PolicyDetailPage.tsx
20
- var O = [
20
+ var D = [
21
21
  "CONTENT",
22
22
  "TOOL",
23
23
  "DATA",
@@ -25,257 +25,286 @@ var O = [
25
25
  "BUDGET",
26
26
  "RATE_LIMIT",
27
27
  "RETENTION"
28
- ], me = [
28
+ ], ge = [
29
29
  "PRIVATE",
30
30
  "WORKSPACE",
31
31
  "PUBLIC"
32
- ], k = ({ type: e }) => ({
33
- CONTENT: /* @__PURE__ */ g(v, { size: 18 }),
34
- TOOL: /* @__PURE__ */ g(E, { size: 18 }),
35
- DATA: /* @__PURE__ */ g(b, { size: 18 }),
36
- RESPONSE: /* @__PURE__ */ g(S, { size: 18 }),
37
- BUDGET: /* @__PURE__ */ g(x, { size: 18 }),
38
- RATE_LIMIT: /* @__PURE__ */ g(y, { size: 18 }),
39
- RETENTION: /* @__PURE__ */ g(T, { size: 18 })
40
- })[e] || /* @__PURE__ */ g(w, { size: 18 }), he = {
32
+ ];
33
+ function O(e) {
34
+ return e.split(",").map((e) => e.trim()).filter(Boolean);
35
+ }
36
+ var k = ({ type: e }) => ({
37
+ CONTENT: /* @__PURE__ */ _(y, { size: 18 }),
38
+ TOOL: /* @__PURE__ */ _(T, { size: 18 }),
39
+ DATA: /* @__PURE__ */ _(x, { size: 18 }),
40
+ RESPONSE: /* @__PURE__ */ _(S, { size: 18 }),
41
+ BUDGET: /* @__PURE__ */ _(de, { size: 18 }),
42
+ RATE_LIMIT: /* @__PURE__ */ _(b, { size: 18 }),
43
+ RETENTION: /* @__PURE__ */ _(w, { size: 18 })
44
+ })[e] || /* @__PURE__ */ _(C, { size: 18 }), _e = {
41
45
  CONTENT: "Content Policy",
42
46
  TOOL: "Tool Policy",
43
47
  DATA: "Data Policy",
44
- RESPONSE: "Response Policy",
48
+ RESPONSE: "Response & Model Policy",
45
49
  BUDGET: "Budget Policy",
46
50
  RATE_LIMIT: "Rate Limit Policy",
47
51
  RETENTION: "Retention Policy"
48
- }, A = ({ isNew: b }) => {
49
- let { policyId: S } = ue(), { navigateTo: A } = e(), { data: j, loading: M } = se(b ? void 0 : S), { create: N, loading: P } = ae(), { update: F, loading: I } = ce(), { remove: L, loading: ge } = oe(), [R, z] = m(!1), [_e, B] = m(!1), [V, H] = m({
52
+ }, A = ({ isNew: x }) => {
53
+ let { policyId: A } = le(), { navigateTo: j } = e(), { data: M, loading: ve } = oe(x ? void 0 : A), { create: ye, loading: be } = ie(), { update: N, loading: P } = se(), { remove: xe, loading: Se } = ae(), [F, I] = h(!1), [Ce, L] = h(!1), [R, z] = h({
50
54
  name: "",
51
55
  description: "",
52
56
  type: "CONTENT",
53
57
  visibility: "PRIVATE"
54
- }), [U, W] = m({
58
+ }), [B, V] = h({
55
59
  jailbreakDetection: !0,
56
60
  piiDetection: !0,
57
61
  toxicityThreshold: .7,
58
62
  customPatterns: ""
59
- }), [G, K] = m({
63
+ }), [H, U] = h({
60
64
  allowedTools: "",
61
65
  deniedTools: "",
62
66
  maxCallsPerExecution: 10,
63
67
  timeoutSeconds: 30
64
- }), [q, J] = m({
68
+ }), [W, G] = h({
65
69
  maxTokensPerExecution: 1e4,
66
70
  maxCostPerExecution: 1,
67
71
  allowEscalation: !1,
68
72
  maxModelTier: "gpt-4"
69
- }), [Y, X] = m({
73
+ }), [K, q] = h({
70
74
  requestsPerMinute: 60,
71
75
  requestsPerHour: 1e3,
72
76
  tokensPerMinute: 1e5,
73
77
  scope: "app"
74
- }), [Z, Q] = m({
78
+ }), [J, Y] = h({
79
+ allowedModels: "",
80
+ allowedProviders: ""
81
+ }), [we, Te] = h(!1), [X, Z] = h({
75
82
  executionDataRetentionDays: 90,
76
83
  payloadSnapshotsEnabled: !0
77
- }), ve = async () => {
78
- if (!V.name) return;
84
+ }), Ee = async () => {
85
+ if (!R.name) return;
79
86
  let e;
80
- switch (V.type) {
87
+ switch (R.type) {
81
88
  case "CONTENT":
82
89
  e = {
83
- jailbreakDetection: U.jailbreakDetection,
84
- piiDetection: U.piiDetection,
85
- toxicityThreshold: U.toxicityThreshold,
86
- customPatterns: U.customPatterns.split("\n").filter(Boolean)
90
+ jailbreakDetection: B.jailbreakDetection,
91
+ piiDetection: B.piiDetection,
92
+ toxicityThreshold: B.toxicityThreshold,
93
+ customPatterns: B.customPatterns.split("\n").filter(Boolean)
87
94
  };
88
95
  break;
89
96
  case "TOOL":
90
97
  e = {
91
- allowedTools: G.allowedTools.split(",").map((e) => e.trim()).filter(Boolean),
92
- deniedTools: G.deniedTools.split(",").map((e) => e.trim()).filter(Boolean),
98
+ allowedTools: H.allowedTools.split(",").map((e) => e.trim()).filter(Boolean),
99
+ deniedTools: H.deniedTools.split(",").map((e) => e.trim()).filter(Boolean),
93
100
  limits: {
94
- maxCallsPerExecution: G.maxCallsPerExecution,
95
- timeoutSeconds: G.timeoutSeconds
101
+ maxCallsPerExecution: H.maxCallsPerExecution,
102
+ timeoutSeconds: H.timeoutSeconds
96
103
  }
97
104
  };
98
105
  break;
99
106
  case "BUDGET":
100
107
  e = {
101
- maxTokensPerExecution: q.maxTokensPerExecution,
102
- maxCostPerExecution: q.maxCostPerExecution,
108
+ maxTokensPerExecution: W.maxTokensPerExecution,
109
+ maxCostPerExecution: W.maxCostPerExecution,
103
110
  modelEscalationConstraints: {
104
- allowEscalation: q.allowEscalation,
105
- maxModelTier: q.maxModelTier
111
+ allowEscalation: W.allowEscalation,
112
+ maxModelTier: W.maxModelTier
106
113
  }
107
114
  };
108
115
  break;
109
116
  case "RATE_LIMIT":
110
117
  e = {
111
118
  limits: {
112
- requestsPerMinute: Y.requestsPerMinute,
113
- requestsPerHour: Y.requestsPerHour,
114
- tokensPerMinute: Y.tokensPerMinute
119
+ requestsPerMinute: K.requestsPerMinute,
120
+ requestsPerHour: K.requestsPerHour,
121
+ tokensPerMinute: K.tokensPerMinute
115
122
  },
116
- scope: Y.scope
123
+ scope: K.scope
117
124
  };
118
125
  break;
126
+ case "RESPONSE": {
127
+ let t = O(J.allowedModels), n = O(J.allowedProviders).map((e) => e.toUpperCase());
128
+ e = {
129
+ ...t.length > 0 ? { allowedModels: t } : {},
130
+ ...n.length > 0 ? { allowedProviders: n } : {}
131
+ };
132
+ break;
133
+ }
119
134
  case "RETENTION":
120
135
  e = {
121
- executionDataRetentionDays: Z.executionDataRetentionDays,
122
- payloadSnapshotsEnabled: Z.payloadSnapshotsEnabled
136
+ executionDataRetentionDays: X.executionDataRetentionDays,
137
+ payloadSnapshotsEnabled: X.payloadSnapshotsEnabled
123
138
  };
124
139
  break;
125
140
  }
126
141
  try {
127
- await N({
128
- name: V.name,
129
- description: V.description,
130
- type: V.type,
131
- visibility: V.visibility,
142
+ await ye({
143
+ name: R.name,
144
+ description: R.description,
145
+ type: R.type,
146
+ visibility: R.visibility,
147
+ status: we ? "ACTIVE" : "DRAFT",
132
148
  config: e
133
149
  });
134
150
  } catch (e) {
135
- D.error(e instanceof Error ? e.message : "Failed to create policy");
151
+ E.error(e instanceof Error ? e.message : "Failed to create policy");
136
152
  return;
137
153
  }
138
- D.success(`Policy "${V.name}" created`), A("policies");
139
- }, ye = async () => {
140
- if (!(!S || !V.name)) {
154
+ E.success(`Policy "${R.name}" created`), j("policies");
155
+ }, De = async () => {
156
+ if (!(!A || !R.name)) {
141
157
  try {
142
- await F({
143
- policyId: S,
158
+ await N({
159
+ policyId: A,
144
160
  input: {
145
- name: V.name,
146
- description: V.description,
147
- visibility: V.visibility
161
+ name: R.name,
162
+ description: R.description,
163
+ visibility: R.visibility
148
164
  }
149
165
  });
150
166
  } catch (e) {
151
- D.error(e instanceof Error ? e.message : "Failed to update policy");
167
+ E.error(e instanceof Error ? e.message : "Failed to update policy");
152
168
  return;
153
169
  }
154
- D.success("Policy updated"), z(!1);
170
+ E.success("Policy updated"), I(!1);
155
171
  }
156
- }, be = async () => {
157
- if (S) try {
158
- await L(S), c() && l("success"), A("policies");
172
+ }, Oe = async () => {
173
+ if (A) try {
174
+ await xe(A), l() && u("success"), j("policies");
159
175
  } catch (e) {
160
- throw c() && l("error"), e;
176
+ throw l() && u("error"), e;
161
177
  }
162
- }, xe = () => {
163
- j && (H({
164
- name: j.name,
165
- description: j.description || "",
166
- type: p(j.type, O, "CONTENT"),
167
- visibility: p(j.visibility, me, "PRIVATE")
168
- }), z(!0));
178
+ }, Q = M?.status === "ACTIVE", ke = async () => {
179
+ if (!A) return;
180
+ let e = Q ? "DRAFT" : "ACTIVE";
181
+ try {
182
+ await N({
183
+ policyId: A,
184
+ input: { status: e }
185
+ });
186
+ } catch (e) {
187
+ E.error(e instanceof Error ? e.message : "Failed to update policy");
188
+ return;
189
+ }
190
+ E.success(e === "ACTIVE" ? "Policy is now enforced" : "Policy is no longer enforced");
191
+ }, Ae = () => {
192
+ M && (z({
193
+ name: M.name,
194
+ description: M.description || "",
195
+ type: m(M.type, D, "CONTENT"),
196
+ visibility: m(M.visibility, ge, "PRIVATE")
197
+ }), I(!0));
169
198
  };
170
- if (b) return /* @__PURE__ */ g(n, {
199
+ if (x) return /* @__PURE__ */ _(n, {
171
200
  title: "Create Policy",
172
201
  description: "Define guardrails and constraints for your AI agents",
173
- actions: /* @__PURE__ */ _("div", {
202
+ actions: /* @__PURE__ */ v("div", {
174
203
  className: "flex gap-2",
175
- children: [/* @__PURE__ */ g(s, {
204
+ children: [/* @__PURE__ */ _(c, {
176
205
  variant: "outline",
177
- onClick: () => A("policies"),
206
+ onClick: () => j("policies"),
178
207
  children: "Cancel"
179
- }), /* @__PURE__ */ g(s, {
180
- leftIcon: /* @__PURE__ */ g(C, { size: 16 }),
181
- onClick: ve,
182
- isLoading: P,
183
- disabled: !V.name,
208
+ }), /* @__PURE__ */ _(c, {
209
+ leftIcon: /* @__PURE__ */ _(me, { size: 16 }),
210
+ onClick: Ee,
211
+ isLoading: be,
212
+ disabled: !R.name,
184
213
  children: "Create"
185
214
  })]
186
215
  }),
187
- children: /* @__PURE__ */ _("div", {
216
+ children: /* @__PURE__ */ v("div", {
188
217
  className: "max-w-2xl space-y-6",
189
218
  children: [
190
- /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(a, { children: /* @__PURE__ */ g(o, { children: "Basic Information" }) }), /* @__PURE__ */ _(i, {
219
+ /* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(o, { children: /* @__PURE__ */ _(s, { children: "Basic Information" }) }), /* @__PURE__ */ v(i, {
191
220
  className: "space-y-4",
192
221
  children: [
193
- /* @__PURE__ */ g(u, {
222
+ /* @__PURE__ */ _(d, {
194
223
  label: "Policy Name",
195
224
  required: !0,
196
- children: /* @__PURE__ */ g(d, {
225
+ children: /* @__PURE__ */ _(f, {
197
226
  placeholder: "e.g., Production Content Policy",
198
- value: V.name,
199
- onChange: (e) => H({
200
- ...V,
227
+ value: R.name,
228
+ onChange: (e) => z({
229
+ ...R,
201
230
  name: e.target.value
202
231
  })
203
232
  })
204
233
  }),
205
- /* @__PURE__ */ g(u, {
234
+ /* @__PURE__ */ _(d, {
206
235
  label: "Description",
207
- children: /* @__PURE__ */ g(f, {
236
+ children: /* @__PURE__ */ _(p, {
208
237
  placeholder: "What does this policy enforce?",
209
- value: V.description,
210
- onChange: (e) => H({
211
- ...V,
238
+ value: R.description,
239
+ onChange: (e) => z({
240
+ ...R,
212
241
  description: e.target.value
213
242
  }),
214
243
  rows: 3
215
244
  })
216
245
  }),
217
- /* @__PURE__ */ _("div", {
246
+ /* @__PURE__ */ v("div", {
218
247
  className: "grid grid-cols-2 gap-4",
219
- children: [/* @__PURE__ */ g(u, {
248
+ children: [/* @__PURE__ */ _(d, {
220
249
  label: "Policy Type",
221
250
  required: !0,
222
- children: /* @__PURE__ */ _("select", {
251
+ children: /* @__PURE__ */ v("select", {
223
252
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
224
- value: V.type,
225
- onChange: (e) => H({
226
- ...V,
253
+ value: R.type,
254
+ onChange: (e) => z({
255
+ ...R,
227
256
  type: e.target.value
228
257
  }),
229
258
  children: [
230
- /* @__PURE__ */ g("option", {
259
+ /* @__PURE__ */ _("option", {
231
260
  value: "CONTENT",
232
261
  children: "Content Policy"
233
262
  }),
234
- /* @__PURE__ */ g("option", {
263
+ /* @__PURE__ */ _("option", {
235
264
  value: "TOOL",
236
265
  children: "Tool Policy"
237
266
  }),
238
- /* @__PURE__ */ g("option", {
267
+ /* @__PURE__ */ _("option", {
239
268
  value: "DATA",
240
269
  children: "Data Policy"
241
270
  }),
242
- /* @__PURE__ */ g("option", {
271
+ /* @__PURE__ */ _("option", {
243
272
  value: "RESPONSE",
244
- children: "Response Policy"
273
+ children: "Response & Model Policy"
245
274
  }),
246
- /* @__PURE__ */ g("option", {
275
+ /* @__PURE__ */ _("option", {
247
276
  value: "BUDGET",
248
277
  children: "Budget Policy"
249
278
  }),
250
- /* @__PURE__ */ g("option", {
279
+ /* @__PURE__ */ _("option", {
251
280
  value: "RATE_LIMIT",
252
281
  children: "Rate Limit Policy"
253
282
  }),
254
- /* @__PURE__ */ g("option", {
283
+ /* @__PURE__ */ _("option", {
255
284
  value: "RETENTION",
256
285
  children: "Retention Policy"
257
286
  })
258
287
  ]
259
288
  })
260
- }), /* @__PURE__ */ g(u, {
289
+ }), /* @__PURE__ */ _(d, {
261
290
  label: "Visibility",
262
- children: /* @__PURE__ */ _("select", {
291
+ children: /* @__PURE__ */ v("select", {
263
292
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
264
- value: V.visibility,
265
- onChange: (e) => H({
266
- ...V,
293
+ value: R.visibility,
294
+ onChange: (e) => z({
295
+ ...R,
267
296
  visibility: e.target.value
268
297
  }),
269
298
  children: [
270
- /* @__PURE__ */ g("option", {
299
+ /* @__PURE__ */ _("option", {
271
300
  value: "PRIVATE",
272
301
  children: "Private"
273
302
  }),
274
- /* @__PURE__ */ g("option", {
303
+ /* @__PURE__ */ _("option", {
275
304
  value: "WORKSPACE",
276
305
  children: "Workspace"
277
306
  }),
278
- /* @__PURE__ */ g("option", {
307
+ /* @__PURE__ */ _("option", {
279
308
  value: "PUBLIC",
280
309
  children: "Public"
281
310
  })
@@ -285,71 +314,71 @@ var O = [
285
314
  })
286
315
  ]
287
316
  })] }),
288
- V.type === "CONTENT" && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(a, { children: /* @__PURE__ */ _(o, {
317
+ R.type === "CONTENT" && /* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(o, { children: /* @__PURE__ */ v(s, {
289
318
  className: "flex items-center gap-2",
290
- children: [/* @__PURE__ */ g(v, { size: 18 }), "Content Policy Configuration"]
291
- }) }), /* @__PURE__ */ _(i, {
319
+ children: [/* @__PURE__ */ _(y, { size: 18 }), "Content Policy Configuration"]
320
+ }) }), /* @__PURE__ */ v(i, {
292
321
  className: "space-y-4",
293
322
  children: [
294
- /* @__PURE__ */ _("div", {
323
+ /* @__PURE__ */ v("div", {
295
324
  className: "grid grid-cols-2 gap-4",
296
- children: [/* @__PURE__ */ _("div", {
325
+ children: [/* @__PURE__ */ v("div", {
297
326
  className: "flex items-center gap-2",
298
- children: [/* @__PURE__ */ g("input", {
327
+ children: [/* @__PURE__ */ _("input", {
299
328
  type: "checkbox",
300
329
  id: "jailbreak",
301
- checked: U.jailbreakDetection,
302
- onChange: (e) => W({
303
- ...U,
330
+ checked: B.jailbreakDetection,
331
+ onChange: (e) => V({
332
+ ...B,
304
333
  jailbreakDetection: e.target.checked
305
334
  }),
306
335
  className: "h-4 w-4"
307
- }), /* @__PURE__ */ g("label", {
336
+ }), /* @__PURE__ */ _("label", {
308
337
  htmlFor: "jailbreak",
309
338
  className: "text-sm",
310
339
  children: "Jailbreak Detection"
311
340
  })]
312
- }), /* @__PURE__ */ _("div", {
341
+ }), /* @__PURE__ */ v("div", {
313
342
  className: "flex items-center gap-2",
314
- children: [/* @__PURE__ */ g("input", {
343
+ children: [/* @__PURE__ */ _("input", {
315
344
  type: "checkbox",
316
345
  id: "pii",
317
- checked: U.piiDetection,
318
- onChange: (e) => W({
319
- ...U,
346
+ checked: B.piiDetection,
347
+ onChange: (e) => V({
348
+ ...B,
320
349
  piiDetection: e.target.checked
321
350
  }),
322
351
  className: "h-4 w-4"
323
- }), /* @__PURE__ */ g("label", {
352
+ }), /* @__PURE__ */ _("label", {
324
353
  htmlFor: "pii",
325
354
  className: "text-sm",
326
355
  children: "PII Detection"
327
356
  })]
328
357
  })]
329
358
  }),
330
- /* @__PURE__ */ g(u, {
359
+ /* @__PURE__ */ _(d, {
331
360
  label: "Toxicity Threshold",
332
361
  description: "0.0 to 1.0",
333
- children: /* @__PURE__ */ g(d, {
362
+ children: /* @__PURE__ */ _(f, {
334
363
  type: "number",
335
364
  min: 0,
336
365
  max: 1,
337
366
  step: .1,
338
- value: U.toxicityThreshold,
339
- onChange: (e) => W({
340
- ...U,
367
+ value: B.toxicityThreshold,
368
+ onChange: (e) => V({
369
+ ...B,
341
370
  toxicityThreshold: parseFloat(e.target.value)
342
371
  })
343
372
  })
344
373
  }),
345
- /* @__PURE__ */ g(u, {
374
+ /* @__PURE__ */ _(d, {
346
375
  label: "Custom Patterns",
347
376
  description: "One regex pattern per line",
348
- children: /* @__PURE__ */ g(f, {
377
+ children: /* @__PURE__ */ _(p, {
349
378
  placeholder: "Enter custom patterns...",
350
- value: U.customPatterns,
351
- onChange: (e) => W({
352
- ...U,
379
+ value: B.customPatterns,
380
+ onChange: (e) => V({
381
+ ...B,
353
382
  customPatterns: e.target.value
354
383
  }),
355
384
  rows: 3
@@ -357,57 +386,57 @@ var O = [
357
386
  })
358
387
  ]
359
388
  })] }),
360
- V.type === "TOOL" && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(a, { children: /* @__PURE__ */ _(o, {
389
+ R.type === "TOOL" && /* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(o, { children: /* @__PURE__ */ v(s, {
361
390
  className: "flex items-center gap-2",
362
- children: [/* @__PURE__ */ g(E, { size: 18 }), "Tool Policy Configuration"]
363
- }) }), /* @__PURE__ */ _(i, {
391
+ children: [/* @__PURE__ */ _(T, { size: 18 }), "Tool Policy Configuration"]
392
+ }) }), /* @__PURE__ */ v(i, {
364
393
  className: "space-y-4",
365
394
  children: [
366
- /* @__PURE__ */ g(u, {
395
+ /* @__PURE__ */ _(d, {
367
396
  label: "Allowed Tools",
368
397
  description: "Comma-separated tool IDs",
369
- children: /* @__PURE__ */ g(d, {
398
+ children: /* @__PURE__ */ _(f, {
370
399
  placeholder: "e.g., search, read_file, web_browse",
371
- value: G.allowedTools,
372
- onChange: (e) => K({
373
- ...G,
400
+ value: H.allowedTools,
401
+ onChange: (e) => U({
402
+ ...H,
374
403
  allowedTools: e.target.value
375
404
  })
376
405
  })
377
406
  }),
378
- /* @__PURE__ */ g(u, {
407
+ /* @__PURE__ */ _(d, {
379
408
  label: "Denied Tools",
380
409
  description: "Comma-separated tool IDs",
381
- children: /* @__PURE__ */ g(d, {
410
+ children: /* @__PURE__ */ _(f, {
382
411
  placeholder: "e.g., delete_file, execute_code",
383
- value: G.deniedTools,
384
- onChange: (e) => K({
385
- ...G,
412
+ value: H.deniedTools,
413
+ onChange: (e) => U({
414
+ ...H,
386
415
  deniedTools: e.target.value
387
416
  })
388
417
  })
389
418
  }),
390
- /* @__PURE__ */ _("div", {
419
+ /* @__PURE__ */ v("div", {
391
420
  className: "grid grid-cols-2 gap-4",
392
- children: [/* @__PURE__ */ g(u, {
421
+ children: [/* @__PURE__ */ _(d, {
393
422
  label: "Max Calls Per Execution",
394
- children: /* @__PURE__ */ g(d, {
423
+ children: /* @__PURE__ */ _(f, {
395
424
  type: "number",
396
425
  min: 1,
397
- value: G.maxCallsPerExecution,
398
- onChange: (e) => K({
399
- ...G,
426
+ value: H.maxCallsPerExecution,
427
+ onChange: (e) => U({
428
+ ...H,
400
429
  maxCallsPerExecution: parseInt(e.target.value)
401
430
  })
402
431
  })
403
- }), /* @__PURE__ */ g(u, {
432
+ }), /* @__PURE__ */ _(d, {
404
433
  label: "Timeout (seconds)",
405
- children: /* @__PURE__ */ g(d, {
434
+ children: /* @__PURE__ */ _(f, {
406
435
  type: "number",
407
436
  min: 1,
408
- value: G.timeoutSeconds,
409
- onChange: (e) => K({
410
- ...G,
437
+ value: H.timeoutSeconds,
438
+ onChange: (e) => U({
439
+ ...H,
411
440
  timeoutSeconds: parseInt(e.target.value)
412
441
  })
413
442
  })
@@ -415,83 +444,83 @@ var O = [
415
444
  })
416
445
  ]
417
446
  })] }),
418
- V.type === "BUDGET" && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(a, { children: /* @__PURE__ */ _(o, {
447
+ R.type === "BUDGET" && /* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(o, { children: /* @__PURE__ */ v(s, {
419
448
  className: "flex items-center gap-2",
420
- children: [/* @__PURE__ */ g(x, { size: 18 }), "Budget Policy Configuration"]
421
- }) }), /* @__PURE__ */ _(i, {
449
+ children: [/* @__PURE__ */ _(de, { size: 18 }), "Budget Policy Configuration"]
450
+ }) }), /* @__PURE__ */ v(i, {
422
451
  className: "space-y-4",
423
452
  children: [
424
- /* @__PURE__ */ _("div", {
453
+ /* @__PURE__ */ v("div", {
425
454
  className: "grid grid-cols-2 gap-4",
426
- children: [/* @__PURE__ */ g(u, {
455
+ children: [/* @__PURE__ */ _(d, {
427
456
  label: "Max Tokens Per Execution",
428
- children: /* @__PURE__ */ g(d, {
457
+ children: /* @__PURE__ */ _(f, {
429
458
  type: "number",
430
459
  min: 100,
431
- value: q.maxTokensPerExecution,
432
- onChange: (e) => J({
433
- ...q,
460
+ value: W.maxTokensPerExecution,
461
+ onChange: (e) => G({
462
+ ...W,
434
463
  maxTokensPerExecution: parseInt(e.target.value)
435
464
  })
436
465
  })
437
- }), /* @__PURE__ */ g(u, {
466
+ }), /* @__PURE__ */ _(d, {
438
467
  label: "Max Cost Per Execution ($)",
439
- children: /* @__PURE__ */ g(d, {
468
+ children: /* @__PURE__ */ _(f, {
440
469
  type: "number",
441
470
  min: .01,
442
471
  step: .01,
443
- value: q.maxCostPerExecution,
444
- onChange: (e) => J({
445
- ...q,
472
+ value: W.maxCostPerExecution,
473
+ onChange: (e) => G({
474
+ ...W,
446
475
  maxCostPerExecution: parseFloat(e.target.value)
447
476
  })
448
477
  })
449
478
  })]
450
479
  }),
451
- /* @__PURE__ */ _("div", {
480
+ /* @__PURE__ */ v("div", {
452
481
  className: "flex items-center gap-2",
453
- children: [/* @__PURE__ */ g("input", {
482
+ children: [/* @__PURE__ */ _("input", {
454
483
  type: "checkbox",
455
484
  id: "escalation",
456
- checked: q.allowEscalation,
457
- onChange: (e) => J({
458
- ...q,
485
+ checked: W.allowEscalation,
486
+ onChange: (e) => G({
487
+ ...W,
459
488
  allowEscalation: e.target.checked
460
489
  }),
461
490
  className: "h-4 w-4"
462
- }), /* @__PURE__ */ g("label", {
491
+ }), /* @__PURE__ */ _("label", {
463
492
  htmlFor: "escalation",
464
493
  className: "text-sm",
465
494
  children: "Allow Model Escalation"
466
495
  })]
467
496
  }),
468
- /* @__PURE__ */ g(u, {
497
+ /* @__PURE__ */ _(d, {
469
498
  label: "Max Model Tier",
470
- children: /* @__PURE__ */ _("select", {
499
+ children: /* @__PURE__ */ v("select", {
471
500
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
472
- value: q.maxModelTier,
473
- onChange: (e) => J({
474
- ...q,
501
+ value: W.maxModelTier,
502
+ onChange: (e) => G({
503
+ ...W,
475
504
  maxModelTier: e.target.value
476
505
  }),
477
506
  children: [
478
- /* @__PURE__ */ g("option", {
507
+ /* @__PURE__ */ _("option", {
479
508
  value: "gpt-3.5-turbo",
480
509
  children: "GPT-3.5 Turbo"
481
510
  }),
482
- /* @__PURE__ */ g("option", {
511
+ /* @__PURE__ */ _("option", {
483
512
  value: "gpt-4",
484
513
  children: "GPT-4"
485
514
  }),
486
- /* @__PURE__ */ g("option", {
515
+ /* @__PURE__ */ _("option", {
487
516
  value: "gpt-4-turbo",
488
517
  children: "GPT-4 Turbo"
489
518
  }),
490
- /* @__PURE__ */ g("option", {
519
+ /* @__PURE__ */ _("option", {
491
520
  value: "claude-3-sonnet",
492
521
  children: "Claude 3 Sonnet"
493
522
  }),
494
- /* @__PURE__ */ g("option", {
523
+ /* @__PURE__ */ _("option", {
495
524
  value: "claude-3-opus",
496
525
  children: "Claude 3 Opus"
497
526
  })
@@ -500,74 +529,74 @@ var O = [
500
529
  })
501
530
  ]
502
531
  })] }),
503
- V.type === "RATE_LIMIT" && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(a, { children: /* @__PURE__ */ _(o, {
532
+ R.type === "RATE_LIMIT" && /* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(o, { children: /* @__PURE__ */ v(s, {
504
533
  className: "flex items-center gap-2",
505
- children: [/* @__PURE__ */ g(y, { size: 18 }), "Rate Limit Configuration"]
506
- }) }), /* @__PURE__ */ _(i, {
534
+ children: [/* @__PURE__ */ _(b, { size: 18 }), "Rate Limit Configuration"]
535
+ }) }), /* @__PURE__ */ v(i, {
507
536
  className: "space-y-4",
508
- children: [/* @__PURE__ */ _("div", {
537
+ children: [/* @__PURE__ */ v("div", {
509
538
  className: "grid grid-cols-3 gap-4",
510
539
  children: [
511
- /* @__PURE__ */ g(u, {
540
+ /* @__PURE__ */ _(d, {
512
541
  label: "Requests / Minute",
513
- children: /* @__PURE__ */ g(d, {
542
+ children: /* @__PURE__ */ _(f, {
514
543
  type: "number",
515
544
  min: 1,
516
- value: Y.requestsPerMinute,
517
- onChange: (e) => X({
518
- ...Y,
545
+ value: K.requestsPerMinute,
546
+ onChange: (e) => q({
547
+ ...K,
519
548
  requestsPerMinute: parseInt(e.target.value)
520
549
  })
521
550
  })
522
551
  }),
523
- /* @__PURE__ */ g(u, {
552
+ /* @__PURE__ */ _(d, {
524
553
  label: "Requests / Hour",
525
- children: /* @__PURE__ */ g(d, {
554
+ children: /* @__PURE__ */ _(f, {
526
555
  type: "number",
527
556
  min: 1,
528
- value: Y.requestsPerHour,
529
- onChange: (e) => X({
530
- ...Y,
557
+ value: K.requestsPerHour,
558
+ onChange: (e) => q({
559
+ ...K,
531
560
  requestsPerHour: parseInt(e.target.value)
532
561
  })
533
562
  })
534
563
  }),
535
- /* @__PURE__ */ g(u, {
564
+ /* @__PURE__ */ _(d, {
536
565
  label: "Tokens / Minute",
537
- children: /* @__PURE__ */ g(d, {
566
+ children: /* @__PURE__ */ _(f, {
538
567
  type: "number",
539
568
  min: 1,
540
- value: Y.tokensPerMinute,
541
- onChange: (e) => X({
542
- ...Y,
569
+ value: K.tokensPerMinute,
570
+ onChange: (e) => q({
571
+ ...K,
543
572
  tokensPerMinute: parseInt(e.target.value)
544
573
  })
545
574
  })
546
575
  })
547
576
  ]
548
- }), /* @__PURE__ */ g(u, {
577
+ }), /* @__PURE__ */ _(d, {
549
578
  label: "Scope",
550
- children: /* @__PURE__ */ _("select", {
579
+ children: /* @__PURE__ */ v("select", {
551
580
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
552
- value: Y.scope,
553
- onChange: (e) => X({
554
- ...Y,
581
+ value: K.scope,
582
+ onChange: (e) => q({
583
+ ...K,
555
584
  scope: e.target.value
556
585
  }),
557
586
  children: [
558
- /* @__PURE__ */ g("option", {
587
+ /* @__PURE__ */ _("option", {
559
588
  value: "connector",
560
589
  children: "Per Connector"
561
590
  }),
562
- /* @__PURE__ */ g("option", {
591
+ /* @__PURE__ */ _("option", {
563
592
  value: "app",
564
593
  children: "Per Bot"
565
594
  }),
566
- /* @__PURE__ */ g("option", {
595
+ /* @__PURE__ */ _("option", {
567
596
  value: "agent",
568
597
  children: "Per Agent"
569
598
  }),
570
- /* @__PURE__ */ g("option", {
599
+ /* @__PURE__ */ _("option", {
571
600
  value: "user_group",
572
601
  children: "Per User Group"
573
602
  })
@@ -575,34 +604,86 @@ var O = [
575
604
  })
576
605
  })]
577
606
  })] }),
578
- V.type === "RETENTION" && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(a, { children: /* @__PURE__ */ _(o, {
607
+ R.type === "RESPONSE" && /* @__PURE__ */ v(r, { children: [/* @__PURE__ */ v(o, { children: [/* @__PURE__ */ v(s, {
608
+ className: "flex items-center gap-2",
609
+ children: [/* @__PURE__ */ _(S, { size: 18 }), "Model Usage Allowlist"]
610
+ }), /* @__PURE__ */ _(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__ */ v(i, {
611
+ className: "space-y-4",
612
+ children: [/* @__PURE__ */ _(d, {
613
+ label: "Allowed Models",
614
+ description: "Comma-separated model IDs. End an entry with * to allow a prefix.",
615
+ children: /* @__PURE__ */ _(f, {
616
+ placeholder: "e.g., gpt-4o-mini, anthropic.claude-*",
617
+ value: J.allowedModels,
618
+ onChange: (e) => Y({
619
+ ...J,
620
+ allowedModels: e.target.value
621
+ })
622
+ })
623
+ }), /* @__PURE__ */ _(d, {
624
+ label: "Allowed Providers",
625
+ description: "Comma-separated provider types, e.g. OPENAI, ANTHROPIC, AWS_BEDROCK.",
626
+ children: /* @__PURE__ */ _(f, {
627
+ placeholder: "e.g., AWS_BEDROCK, ANTHROPIC",
628
+ value: J.allowedProviders,
629
+ onChange: (e) => Y({
630
+ ...J,
631
+ allowedProviders: e.target.value
632
+ })
633
+ })
634
+ })]
635
+ })] }),
636
+ /* @__PURE__ */ _(r, { children: /* @__PURE__ */ _(i, {
637
+ className: "pt-6",
638
+ children: /* @__PURE__ */ v("div", {
639
+ className: "flex items-start gap-2",
640
+ children: [/* @__PURE__ */ _("input", {
641
+ type: "checkbox",
642
+ id: "activate-on-create",
643
+ checked: we,
644
+ onChange: (e) => Te(e.target.checked),
645
+ className: "mt-1 h-4 w-4"
646
+ }), /* @__PURE__ */ v("label", {
647
+ htmlFor: "activate-on-create",
648
+ className: "text-sm",
649
+ children: [/* @__PURE__ */ _("span", {
650
+ className: "font-medium",
651
+ children: "Enforce immediately"
652
+ }), /* @__PURE__ */ _("span", {
653
+ className: "block text-text-secondary",
654
+ children: "Only active policies are enforced. Leave unchecked to save this policy as a draft and activate it later."
655
+ })]
656
+ })]
657
+ })
658
+ }) }),
659
+ R.type === "RETENTION" && /* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(o, { children: /* @__PURE__ */ v(s, {
579
660
  className: "flex items-center gap-2",
580
- children: [/* @__PURE__ */ g(T, { size: 18 }), "Retention Policy Configuration"]
581
- }) }), /* @__PURE__ */ _(i, {
661
+ children: [/* @__PURE__ */ _(w, { size: 18 }), "Retention Policy Configuration"]
662
+ }) }), /* @__PURE__ */ v(i, {
582
663
  className: "space-y-4",
583
- children: [/* @__PURE__ */ g(u, {
664
+ children: [/* @__PURE__ */ _(d, {
584
665
  label: "Execution Data Retention (days)",
585
- children: /* @__PURE__ */ g(d, {
666
+ children: /* @__PURE__ */ _(f, {
586
667
  type: "number",
587
668
  min: 1,
588
- value: Z.executionDataRetentionDays,
589
- onChange: (e) => Q({
590
- ...Z,
669
+ value: X.executionDataRetentionDays,
670
+ onChange: (e) => Z({
671
+ ...X,
591
672
  executionDataRetentionDays: parseInt(e.target.value)
592
673
  })
593
674
  })
594
- }), /* @__PURE__ */ _("div", {
675
+ }), /* @__PURE__ */ v("div", {
595
676
  className: "flex items-center gap-2",
596
- children: [/* @__PURE__ */ g("input", {
677
+ children: [/* @__PURE__ */ _("input", {
597
678
  type: "checkbox",
598
679
  id: "snapshots",
599
- checked: Z.payloadSnapshotsEnabled,
600
- onChange: (e) => Q({
601
- ...Z,
680
+ checked: X.payloadSnapshotsEnabled,
681
+ onChange: (e) => Z({
682
+ ...X,
602
683
  payloadSnapshotsEnabled: e.target.checked
603
684
  }),
604
685
  className: "h-4 w-4"
605
- }), /* @__PURE__ */ g("label", {
686
+ }), /* @__PURE__ */ _("label", {
606
687
  htmlFor: "snapshots",
607
688
  className: "text-sm",
608
689
  children: "Enable Payload Snapshots"
@@ -612,239 +693,249 @@ var O = [
612
693
  ]
613
694
  })
614
695
  });
615
- if (M) return /* @__PURE__ */ g(n, {
696
+ if (ve) return /* @__PURE__ */ _(n, {
616
697
  title: "Loading...",
617
- children: /* @__PURE__ */ g("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
698
+ children: /* @__PURE__ */ _("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
618
699
  });
619
- if (!j) return /* @__PURE__ */ g(n, {
700
+ if (!M) return /* @__PURE__ */ _(n, {
620
701
  title: "Policy Not Found",
621
- children: /* @__PURE__ */ g(ie, {
702
+ children: /* @__PURE__ */ _(re, {
622
703
  illustration: "empty-generic",
623
704
  title: "Policy Not Found",
624
705
  description: "This policy doesn't exist.",
625
- action: /* @__PURE__ */ g(s, {
626
- onClick: () => A("policies"),
706
+ action: /* @__PURE__ */ _(c, {
707
+ onClick: () => j("policies"),
627
708
  children: "Back to Policies"
628
709
  })
629
710
  })
630
711
  });
631
- let $ = p(j.type, O, "CONTENT");
632
- return /* @__PURE__ */ g(n, {
633
- title: /* @__PURE__ */ _("div", {
712
+ let $ = m(M.type, D, "CONTENT");
713
+ return /* @__PURE__ */ _(n, {
714
+ title: /* @__PURE__ */ v("div", {
634
715
  className: "flex items-center gap-3",
635
716
  children: [
636
- /* @__PURE__ */ g(s, {
717
+ /* @__PURE__ */ _(c, {
637
718
  variant: "ghost",
638
719
  size: "icon",
639
- onClick: () => A("policies"),
640
- children: /* @__PURE__ */ g(de, { size: 20 })
720
+ onClick: () => j("policies"),
721
+ children: /* @__PURE__ */ _(ue, { size: 20 })
641
722
  }),
642
- /* @__PURE__ */ g("div", {
723
+ /* @__PURE__ */ _("div", {
643
724
  className: "p-2 rounded-lg bg-action-primary-bg/10",
644
- children: /* @__PURE__ */ g(k, { type: $ })
725
+ children: /* @__PURE__ */ _(k, { type: $ })
645
726
  }),
646
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("div", {
727
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("div", {
647
728
  className: "flex items-center gap-2",
648
- children: [/* @__PURE__ */ g("span", { children: j.name }), /* @__PURE__ */ g(ne, { status: j.status })]
649
- }), /* @__PURE__ */ g("p", {
729
+ children: [/* @__PURE__ */ _("span", { children: M.name }), /* @__PURE__ */ _(te, { status: M.status })]
730
+ }), /* @__PURE__ */ _("p", {
650
731
  className: "text-sm font-normal text-text-secondary",
651
- children: j.description
732
+ children: M.description
652
733
  })] })
653
734
  ]
654
735
  }),
655
- actions: /* @__PURE__ */ g("div", {
736
+ actions: /* @__PURE__ */ _("div", {
656
737
  className: "flex gap-2",
657
- children: R ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(s, {
738
+ children: F ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(c, {
658
739
  variant: "outline",
659
- onClick: () => z(!1),
740
+ onClick: () => I(!1),
660
741
  children: "Cancel"
661
- }), /* @__PURE__ */ g(s, {
662
- leftIcon: /* @__PURE__ */ g(C, { size: 16 }),
663
- onClick: ye,
664
- isLoading: I,
665
- disabled: !V.name,
742
+ }), /* @__PURE__ */ _(c, {
743
+ leftIcon: /* @__PURE__ */ _(me, { size: 16 }),
744
+ onClick: De,
745
+ isLoading: P,
746
+ disabled: !R.name,
666
747
  children: "Save Changes"
667
- })] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(s, {
668
- variant: "outline",
669
- leftIcon: /* @__PURE__ */ g(fe, { size: 16 }),
670
- onClick: xe,
671
- children: "Edit"
672
- }), _e ? /* @__PURE__ */ _("div", {
673
- className: "flex gap-2",
674
- children: [/* @__PURE__ */ g(s, {
748
+ })] }) : /* @__PURE__ */ v(g, { children: [
749
+ /* @__PURE__ */ _(c, {
750
+ variant: Q ? "outline" : "default",
751
+ leftIcon: /* @__PURE__ */ _(pe, { size: 16 }),
752
+ onClick: () => void ke(),
753
+ isLoading: P,
754
+ children: Q ? "Deactivate" : "Activate"
755
+ }),
756
+ /* @__PURE__ */ _(c, {
675
757
  variant: "outline",
676
- size: "sm",
677
- onClick: () => B(!1),
678
- children: "Cancel"
679
- }), /* @__PURE__ */ g(s, {
758
+ leftIcon: /* @__PURE__ */ _(fe, { size: 16 }),
759
+ onClick: Ae,
760
+ children: "Edit"
761
+ }),
762
+ Ce ? /* @__PURE__ */ v("div", {
763
+ className: "flex gap-2",
764
+ children: [/* @__PURE__ */ _(c, {
765
+ variant: "outline",
766
+ size: "sm",
767
+ onClick: () => L(!1),
768
+ children: "Cancel"
769
+ }), /* @__PURE__ */ _(c, {
770
+ variant: "destructive",
771
+ size: "sm",
772
+ onClick: () => {
773
+ ne("medium"), Oe();
774
+ },
775
+ isLoading: Se,
776
+ children: "Confirm Delete"
777
+ })]
778
+ }) : /* @__PURE__ */ _(c, {
680
779
  variant: "destructive",
681
- size: "sm",
682
- onClick: () => {
683
- re("medium"), be();
684
- },
685
- isLoading: ge,
686
- children: "Confirm Delete"
687
- })]
688
- }) : /* @__PURE__ */ g(s, {
689
- variant: "destructive",
690
- leftIcon: /* @__PURE__ */ g(T, { size: 16 }),
691
- onClick: () => B(!0),
692
- children: "Delete"
693
- })] })
780
+ leftIcon: /* @__PURE__ */ _(w, { size: 16 }),
781
+ onClick: () => L(!0),
782
+ children: "Delete"
783
+ })
784
+ ] })
694
785
  }),
695
- children: /* @__PURE__ */ _("div", {
786
+ children: /* @__PURE__ */ v("div", {
696
787
  className: "space-y-6",
697
788
  children: [
698
- /* @__PURE__ */ g(le, {
699
- icon: /* @__PURE__ */ g(w, { size: 18 }),
789
+ /* @__PURE__ */ _(ce, {
790
+ icon: /* @__PURE__ */ _(C, { size: 18 }),
700
791
  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."
701
792
  }),
702
- R && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(a, { children: /* @__PURE__ */ g(o, { children: "Edit Policy" }) }), /* @__PURE__ */ _(i, {
793
+ F && /* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(o, { children: /* @__PURE__ */ _(s, { children: "Edit Policy" }) }), /* @__PURE__ */ v(i, {
703
794
  className: "space-y-4",
704
795
  children: [
705
- /* @__PURE__ */ g(u, {
796
+ /* @__PURE__ */ _(d, {
706
797
  label: "Policy Name",
707
798
  required: !0,
708
- children: /* @__PURE__ */ g(d, {
709
- value: V.name,
710
- onChange: (e) => H({
711
- ...V,
799
+ children: /* @__PURE__ */ _(f, {
800
+ value: R.name,
801
+ onChange: (e) => z({
802
+ ...R,
712
803
  name: e.target.value
713
804
  })
714
805
  })
715
806
  }),
716
- /* @__PURE__ */ g(u, {
807
+ /* @__PURE__ */ _(d, {
717
808
  label: "Description",
718
- children: /* @__PURE__ */ g(f, {
719
- value: V.description,
720
- onChange: (e) => H({
721
- ...V,
809
+ children: /* @__PURE__ */ _(p, {
810
+ value: R.description,
811
+ onChange: (e) => z({
812
+ ...R,
722
813
  description: e.target.value
723
814
  }),
724
815
  rows: 3
725
816
  })
726
817
  }),
727
- /* @__PURE__ */ g(u, {
818
+ /* @__PURE__ */ _(d, {
728
819
  label: "Visibility",
729
- children: /* @__PURE__ */ _("select", {
820
+ children: /* @__PURE__ */ v("select", {
730
821
  className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
731
- value: V.visibility,
732
- onChange: (e) => H({
733
- ...V,
822
+ value: R.visibility,
823
+ onChange: (e) => z({
824
+ ...R,
734
825
  visibility: e.target.value
735
826
  }),
736
827
  children: [
737
- /* @__PURE__ */ g("option", {
828
+ /* @__PURE__ */ _("option", {
738
829
  value: "PRIVATE",
739
830
  children: "Private"
740
831
  }),
741
- /* @__PURE__ */ g("option", {
832
+ /* @__PURE__ */ _("option", {
742
833
  value: "WORKSPACE",
743
834
  children: "Workspace"
744
835
  }),
745
- /* @__PURE__ */ g("option", {
836
+ /* @__PURE__ */ _("option", {
746
837
  value: "PUBLIC",
747
838
  children: "Public"
748
839
  })
749
840
  ]
750
841
  })
751
842
  }),
752
- /* @__PURE__ */ g("p", {
843
+ /* @__PURE__ */ _("p", {
753
844
  className: "text-sm text-text-secondary",
754
845
  children: "Note: Policy type and configuration cannot be changed after creation."
755
846
  })
756
847
  ]
757
848
  })] }),
758
- /* @__PURE__ */ _("div", {
849
+ /* @__PURE__ */ v("div", {
759
850
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
760
851
  children: [
761
- /* @__PURE__ */ g(r, {
852
+ /* @__PURE__ */ _(r, {
762
853
  treatment: "glass",
763
854
  glow: !0,
764
- children: /* @__PURE__ */ _(i, {
855
+ children: /* @__PURE__ */ v(i, {
765
856
  className: "pt-6 text-center",
766
857
  children: [
767
- /* @__PURE__ */ g("div", {
858
+ /* @__PURE__ */ _("div", {
768
859
  className: "p-3 rounded-full bg-action-primary-bg/10 w-fit mx-auto mb-2",
769
- children: /* @__PURE__ */ g(k, { type: $ })
860
+ children: /* @__PURE__ */ _(k, { type: $ })
770
861
  }),
771
- /* @__PURE__ */ g("p", {
862
+ /* @__PURE__ */ _("p", {
772
863
  className: "text-lg font-bold",
773
- children: he[$]
864
+ children: _e[$]
774
865
  }),
775
- /* @__PURE__ */ g("p", {
866
+ /* @__PURE__ */ _("p", {
776
867
  className: "text-sm text-text-secondary",
777
868
  children: "Policy Type"
778
869
  })
779
870
  ]
780
871
  })
781
872
  }),
782
- /* @__PURE__ */ g(r, { children: /* @__PURE__ */ _(i, {
873
+ /* @__PURE__ */ _(r, { children: /* @__PURE__ */ v(i, {
783
874
  className: "pt-6 text-center",
784
- children: [/* @__PURE__ */ g("p", {
875
+ children: [/* @__PURE__ */ _("p", {
785
876
  className: "text-3xl font-bold text-text-primary capitalize",
786
- children: j.visibility.toLowerCase()
787
- }), /* @__PURE__ */ g("p", {
877
+ children: M.visibility.toLowerCase()
878
+ }), /* @__PURE__ */ _("p", {
788
879
  className: "text-sm text-text-secondary",
789
880
  children: "Visibility"
790
881
  })]
791
882
  }) }),
792
- /* @__PURE__ */ g(r, { children: /* @__PURE__ */ _(i, {
883
+ /* @__PURE__ */ _(r, { children: /* @__PURE__ */ v(i, {
793
884
  className: "pt-6 text-center",
794
- children: [/* @__PURE__ */ g("p", {
885
+ children: [/* @__PURE__ */ _("p", {
795
886
  className: "text-3xl font-bold text-text-primary",
796
- children: j.revision
797
- }), /* @__PURE__ */ g("p", {
887
+ children: M.revision
888
+ }), /* @__PURE__ */ _("p", {
798
889
  className: "text-sm text-text-secondary",
799
890
  children: "Revision"
800
891
  })]
801
892
  }) }),
802
- /* @__PURE__ */ g(r, { children: /* @__PURE__ */ _(i, {
893
+ /* @__PURE__ */ _(r, { children: /* @__PURE__ */ v(i, {
803
894
  className: "pt-6 text-center",
804
- children: [/* @__PURE__ */ g("p", {
895
+ children: [/* @__PURE__ */ _("p", {
805
896
  className: "text-lg font-bold text-text-primary",
806
- children: t(j.updatedAt)
807
- }), /* @__PURE__ */ g("p", {
897
+ children: t(M.updatedAt)
898
+ }), /* @__PURE__ */ _("p", {
808
899
  className: "text-sm text-text-secondary",
809
900
  children: "Last Updated"
810
901
  })]
811
902
  }) })
812
903
  ]
813
904
  }),
814
- /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ _(a, { children: [/* @__PURE__ */ g(o, { children: "Configuration" }), /* @__PURE__ */ g(ee, { children: "Current policy configuration" })] }), /* @__PURE__ */ g(i, { children: /* @__PURE__ */ g("div", {
905
+ /* @__PURE__ */ v(r, { children: [/* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _(s, { children: "Configuration" }), /* @__PURE__ */ _(a, { children: "Current policy configuration" })] }), /* @__PURE__ */ _(i, { children: /* @__PURE__ */ _("div", {
815
906
  className: "p-4 bg-bg-sunken rounded-lg font-mono text-sm overflow-auto",
816
- children: /* @__PURE__ */ g("pre", { children: JSON.stringify(j.config, null, 2) })
907
+ children: /* @__PURE__ */ _("pre", { children: JSON.stringify(M.config, null, 2) })
817
908
  }) })] }),
818
- /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(a, { children: /* @__PURE__ */ _(o, {
909
+ /* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(o, { children: /* @__PURE__ */ v(s, {
819
910
  className: "flex items-center gap-2",
820
- children: [/* @__PURE__ */ g(pe, { size: 18 }), "Metadata"]
821
- }) }), /* @__PURE__ */ g(i, { children: /* @__PURE__ */ _("div", {
911
+ children: [/* @__PURE__ */ _(he, { size: 18 }), "Metadata"]
912
+ }) }), /* @__PURE__ */ _(i, { children: /* @__PURE__ */ v("div", {
822
913
  className: "grid grid-cols-2 md:grid-cols-4 gap-6 text-sm",
823
914
  children: [
824
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
915
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
825
916
  className: "text-text-secondary",
826
917
  children: "Created"
827
- }), /* @__PURE__ */ g("p", {
918
+ }), /* @__PURE__ */ _("p", {
828
919
  className: "font-medium",
829
- children: t(j.createdAt)
920
+ children: t(M.createdAt)
830
921
  })] }),
831
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
922
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
832
923
  className: "text-text-secondary",
833
924
  children: "Updated"
834
- }), /* @__PURE__ */ g("p", {
925
+ }), /* @__PURE__ */ _("p", {
835
926
  className: "font-medium",
836
- children: t(j.updatedAt)
927
+ children: t(M.updatedAt)
837
928
  })] }),
838
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
929
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
839
930
  className: "text-text-secondary",
840
931
  children: "Tags"
841
- }), /* @__PURE__ */ g("div", {
932
+ }), /* @__PURE__ */ _("div", {
842
933
  className: "flex gap-1",
843
- children: j.tags.length > 0 ? j.tags.map((e) => /* @__PURE__ */ g(te, {
934
+ children: M.tags.length > 0 ? M.tags.map((e) => /* @__PURE__ */ _(ee, {
844
935
  variant: "secondary",
845
936
  className: "text-xs",
846
937
  children: e
847
- }, e)) : /* @__PURE__ */ g("span", {
938
+ }, e)) : /* @__PURE__ */ _("span", {
848
939
  className: "text-text-secondary",
849
940
  children: "None"
850
941
  })