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