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