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