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