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