@uipath/apollo-react 6.47.4 → 6.49.0
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/canvas/components/Guardrails/__fixtures__/catalog-coverage.cjs +83 -0
- package/dist/canvas/components/Guardrails/__fixtures__/catalog-coverage.d.ts +8 -0
- package/dist/canvas/components/Guardrails/__fixtures__/catalog-coverage.d.ts.map +1 -0
- package/dist/canvas/components/Guardrails/__fixtures__/catalog-coverage.js +37 -0
- package/dist/canvas/components/Guardrails/__fixtures__/definitions-wire.fixtures.cjs +344 -0
- package/dist/canvas/components/Guardrails/__fixtures__/definitions-wire.fixtures.d.ts +13 -0
- package/dist/canvas/components/Guardrails/__fixtures__/definitions-wire.fixtures.d.ts.map +1 -0
- package/dist/canvas/components/Guardrails/__fixtures__/definitions-wire.fixtures.js +280 -0
- package/dist/canvas/components/Guardrails/__fixtures__/host-copy-baselines.cjs +221 -0
- package/dist/canvas/components/Guardrails/__fixtures__/host-copy-baselines.d.ts +4 -0
- package/dist/canvas/components/Guardrails/__fixtures__/host-copy-baselines.d.ts.map +1 -0
- package/dist/canvas/components/Guardrails/__fixtures__/host-copy-baselines.js +184 -0
- package/dist/canvas/components/Guardrails/builder-types.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/components/guardrail-chip.cjs +5 -1
- package/dist/canvas/components/Guardrails/components/guardrail-chip.d.ts +1 -0
- package/dist/canvas/components/Guardrails/components/guardrail-chip.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/components/guardrail-chip.js +3 -2
- package/dist/canvas/components/Guardrails/components/guardrail-status-chip.cjs +60 -0
- package/dist/canvas/components/Guardrails/components/guardrail-status-chip.d.ts +7 -0
- package/dist/canvas/components/Guardrails/components/guardrail-status-chip.d.ts.map +1 -0
- package/dist/canvas/components/Guardrails/components/guardrail-status-chip.js +26 -0
- package/dist/canvas/components/Guardrails/definitions-copy.cjs +369 -0
- package/dist/canvas/components/Guardrails/definitions-copy.d.ts +14 -0
- package/dist/canvas/components/Guardrails/definitions-copy.d.ts.map +1 -0
- package/dist/canvas/components/Guardrails/definitions-copy.js +326 -0
- package/dist/canvas/components/Guardrails/definitions-enrich.cjs +173 -0
- package/dist/canvas/components/Guardrails/definitions-enrich.d.ts +30 -0
- package/dist/canvas/components/Guardrails/definitions-enrich.d.ts.map +1 -0
- package/dist/canvas/components/Guardrails/definitions-enrich.js +130 -0
- package/dist/canvas/components/Guardrails/definitions-parse.cjs +199 -0
- package/dist/canvas/components/Guardrails/definitions-parse.d.ts +13 -0
- package/dist/canvas/components/Guardrails/definitions-parse.d.ts.map +1 -0
- package/dist/canvas/components/Guardrails/definitions-parse.js +165 -0
- package/dist/canvas/components/Guardrails/definitions-wire.cjs +18 -0
- package/dist/canvas/components/Guardrails/definitions-wire.d.ts +59 -0
- package/dist/canvas/components/Guardrails/definitions-wire.d.ts.map +1 -0
- package/dist/canvas/components/Guardrails/definitions-wire.js +0 -0
- package/dist/canvas/components/Guardrails/i18n.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/index.cjs +49 -8
- package/dist/canvas/components/Guardrails/index.d.ts +11 -0
- package/dist/canvas/components/Guardrails/index.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/index.js +6 -1
- package/dist/canvas/components/Guardrails/types.d.ts.map +1 -1
- package/dist/canvas/components/Guardrails/use-guardrail-definitions.cjs +158 -0
- package/dist/canvas/components/Guardrails/use-guardrail-definitions.d.ts +30 -0
- package/dist/canvas/components/Guardrails/use-guardrail-definitions.d.ts.map +1 -0
- package/dist/canvas/components/Guardrails/use-guardrail-definitions.js +121 -0
- package/dist/canvas/components/JsonTree/JsonContainerEditor.cjs +1 -1
- package/dist/canvas/components/JsonTree/JsonContainerEditor.js +1 -1
- package/dist/canvas/components/NodePropertyPanel/PanelField.cjs +1 -1
- package/dist/canvas/components/NodePropertyPanel/PanelField.d.ts.map +1 -1
- package/dist/canvas/components/NodePropertyPanel/PanelField.js +1 -1
- package/dist/canvas/locales/en.cjs +1 -1
- package/dist/canvas/locales/en.d.ts.map +1 -1
- package/dist/canvas/locales/en.js +1 -1
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
const PII_ENTITY_OPTIONS = [
|
|
2
|
+
'Person',
|
|
3
|
+
'Address',
|
|
4
|
+
'Date',
|
|
5
|
+
'PhoneNumber',
|
|
6
|
+
'EugpsCoordinates',
|
|
7
|
+
'Email',
|
|
8
|
+
'CreditCardNumber',
|
|
9
|
+
'InternationalBankingAccountNumber',
|
|
10
|
+
'SwiftCode',
|
|
11
|
+
'ABARoutingNumber',
|
|
12
|
+
'USDriversLicenseNumber',
|
|
13
|
+
'UKDriversLicenseNumber',
|
|
14
|
+
'USIndividualTaxpayerIdentification',
|
|
15
|
+
'UKUniqueTaxpayerNumber',
|
|
16
|
+
'USBankAccountNumber',
|
|
17
|
+
'USSocialSecurityNumber',
|
|
18
|
+
'UsukPassportNumber',
|
|
19
|
+
'NOIdentityNumber',
|
|
20
|
+
'FINationalID',
|
|
21
|
+
'FIPassportNumber',
|
|
22
|
+
'SENationalID',
|
|
23
|
+
'DKPersonalIdentificationNumber',
|
|
24
|
+
'NLCitizensServiceNumber',
|
|
25
|
+
'URL',
|
|
26
|
+
'IPAddress'
|
|
27
|
+
];
|
|
28
|
+
const PII_DETECTION_WIRE = {
|
|
29
|
+
validator: 'pii_detection',
|
|
30
|
+
allowedScopes: [
|
|
31
|
+
'Agent',
|
|
32
|
+
'Llm',
|
|
33
|
+
'Tool'
|
|
34
|
+
],
|
|
35
|
+
status: 'Available',
|
|
36
|
+
parameters: [
|
|
37
|
+
{
|
|
38
|
+
id: 'entities',
|
|
39
|
+
type: 'enum-list',
|
|
40
|
+
required: true,
|
|
41
|
+
defaultValue: [
|
|
42
|
+
'Email',
|
|
43
|
+
'CreditCardNumber'
|
|
44
|
+
],
|
|
45
|
+
options: PII_ENTITY_OPTIONS
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 'entityThresholds',
|
|
49
|
+
type: 'map-enum',
|
|
50
|
+
required: false,
|
|
51
|
+
defaultValue: {
|
|
52
|
+
Email: 0.8,
|
|
53
|
+
CreditCardNumber: 0.8
|
|
54
|
+
},
|
|
55
|
+
keySource: 'entities'
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
};
|
|
59
|
+
const HARMFUL_CONTENT_WIRE = {
|
|
60
|
+
validator: 'harmful_content',
|
|
61
|
+
allowedScopes: [
|
|
62
|
+
'Llm',
|
|
63
|
+
'Tool'
|
|
64
|
+
],
|
|
65
|
+
status: 'Available',
|
|
66
|
+
parameters: [
|
|
67
|
+
{
|
|
68
|
+
id: 'harmfulContentEntities',
|
|
69
|
+
type: 'enum-list',
|
|
70
|
+
required: true,
|
|
71
|
+
defaultValue: [
|
|
72
|
+
'Hate',
|
|
73
|
+
'Violence'
|
|
74
|
+
],
|
|
75
|
+
options: [
|
|
76
|
+
'Hate',
|
|
77
|
+
'SelfHarm',
|
|
78
|
+
'Sexual',
|
|
79
|
+
'Violence'
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 'harmfulContentEntityThresholds',
|
|
84
|
+
type: 'map-enum',
|
|
85
|
+
required: false,
|
|
86
|
+
defaultValue: {
|
|
87
|
+
Hate: 2,
|
|
88
|
+
Violence: 2
|
|
89
|
+
},
|
|
90
|
+
keySource: 'harmfulContentEntities',
|
|
91
|
+
min: 0,
|
|
92
|
+
max: 6,
|
|
93
|
+
step: 2
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
};
|
|
97
|
+
const PROMPT_INJECTION_WIRE = {
|
|
98
|
+
validator: 'prompt_injection',
|
|
99
|
+
allowedScopes: [
|
|
100
|
+
'Llm'
|
|
101
|
+
],
|
|
102
|
+
status: 'Available',
|
|
103
|
+
parameters: [
|
|
104
|
+
{
|
|
105
|
+
id: 'threshold',
|
|
106
|
+
type: 'number',
|
|
107
|
+
required: true,
|
|
108
|
+
defaultValue: 0.7,
|
|
109
|
+
min: 0,
|
|
110
|
+
max: 1,
|
|
111
|
+
step: 0.1
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
};
|
|
115
|
+
const USER_PROMPT_ATTACKS_WIRE = {
|
|
116
|
+
validator: 'user_prompt_attacks',
|
|
117
|
+
allowedScopes: [
|
|
118
|
+
'Llm'
|
|
119
|
+
],
|
|
120
|
+
status: 'Available',
|
|
121
|
+
parameters: []
|
|
122
|
+
};
|
|
123
|
+
const INTELLECTUAL_PROPERTY_WIRE = {
|
|
124
|
+
validator: 'intellectual_property',
|
|
125
|
+
allowedScopes: [
|
|
126
|
+
'Llm',
|
|
127
|
+
'Tool'
|
|
128
|
+
],
|
|
129
|
+
status: 'FeatureDisabled',
|
|
130
|
+
parameters: [
|
|
131
|
+
{
|
|
132
|
+
id: 'ipEntities',
|
|
133
|
+
type: 'enum-list',
|
|
134
|
+
required: true,
|
|
135
|
+
defaultValue: [
|
|
136
|
+
'Text'
|
|
137
|
+
],
|
|
138
|
+
options: [
|
|
139
|
+
'Text',
|
|
140
|
+
'Code'
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
};
|
|
145
|
+
const LLM_AS_JUDGE_WIRE = {
|
|
146
|
+
validator: 'llm_as_judge',
|
|
147
|
+
allowedScopes: [
|
|
148
|
+
'Agent',
|
|
149
|
+
'Llm',
|
|
150
|
+
'Tool'
|
|
151
|
+
],
|
|
152
|
+
status: 'Available',
|
|
153
|
+
parameters: [
|
|
154
|
+
{
|
|
155
|
+
id: 'guardrailText',
|
|
156
|
+
type: 'text',
|
|
157
|
+
required: true,
|
|
158
|
+
defaultValue: null,
|
|
159
|
+
maxLength: 4000
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: 'model',
|
|
163
|
+
type: 'enum',
|
|
164
|
+
required: true,
|
|
165
|
+
defaultValue: null,
|
|
166
|
+
options: [
|
|
167
|
+
'gpt-4o-mini-2024-07-18',
|
|
168
|
+
'gpt-4o-2024-11-20'
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: 'positiveExamples',
|
|
173
|
+
type: 'text-list',
|
|
174
|
+
required: false,
|
|
175
|
+
maxItems: 5,
|
|
176
|
+
maxLength: 1000
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: 'negativeExamples',
|
|
180
|
+
type: 'text-list',
|
|
181
|
+
required: false,
|
|
182
|
+
defaultValue: null,
|
|
183
|
+
maxItems: 5,
|
|
184
|
+
maxLength: 1000
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: 'threshold',
|
|
188
|
+
type: 'number',
|
|
189
|
+
required: true,
|
|
190
|
+
defaultValue: 4,
|
|
191
|
+
min: 0,
|
|
192
|
+
max: 6,
|
|
193
|
+
step: 2
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
};
|
|
197
|
+
const BYO_WIRE = {
|
|
198
|
+
validator: 'pii_detection',
|
|
199
|
+
allowedScopes: [
|
|
200
|
+
'Llm'
|
|
201
|
+
],
|
|
202
|
+
status: 'Available',
|
|
203
|
+
displayName: 'Acme PII scan',
|
|
204
|
+
description: 'Runs the Acme detector over prompts and completions.',
|
|
205
|
+
byoValidatorName: 'acme-pii',
|
|
206
|
+
byoConnectorName: 'Acme AI Guardrails',
|
|
207
|
+
byoConnectorKey: 'acme',
|
|
208
|
+
byoGuardrailConnectionId: 'conn-1',
|
|
209
|
+
byoConfigurationId: 'cfg-1',
|
|
210
|
+
parameters: [
|
|
211
|
+
{
|
|
212
|
+
id: 'sensitivity',
|
|
213
|
+
type: 'enum',
|
|
214
|
+
required: true,
|
|
215
|
+
defaultValue: 'medium',
|
|
216
|
+
displayName: 'Sensitivity',
|
|
217
|
+
description: 'How aggressively to flag.',
|
|
218
|
+
options: [
|
|
219
|
+
'low',
|
|
220
|
+
'medium',
|
|
221
|
+
'high'
|
|
222
|
+
],
|
|
223
|
+
optionLabels: {
|
|
224
|
+
low: 'Low',
|
|
225
|
+
high: 'High'
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
};
|
|
230
|
+
const UNCURATED_WIRE = {
|
|
231
|
+
validator: 'topic_drift',
|
|
232
|
+
allowedScopes: [
|
|
233
|
+
'Llm'
|
|
234
|
+
],
|
|
235
|
+
status: 'Available',
|
|
236
|
+
parameters: [
|
|
237
|
+
{
|
|
238
|
+
id: 'maxDriftScore',
|
|
239
|
+
type: 'number',
|
|
240
|
+
required: true,
|
|
241
|
+
defaultValue: 0.5
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
id: 'allowedTopics',
|
|
245
|
+
type: 'enum-list',
|
|
246
|
+
required: false,
|
|
247
|
+
defaultValue: [],
|
|
248
|
+
options: [
|
|
249
|
+
'finance',
|
|
250
|
+
'legal'
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
};
|
|
255
|
+
const ALL_BUILT_IN_WIRE = [
|
|
256
|
+
PII_DETECTION_WIRE,
|
|
257
|
+
PROMPT_INJECTION_WIRE,
|
|
258
|
+
HARMFUL_CONTENT_WIRE,
|
|
259
|
+
USER_PROMPT_ATTACKS_WIRE,
|
|
260
|
+
INTELLECTUAL_PROPERTY_WIRE,
|
|
261
|
+
LLM_AS_JUDGE_WIRE
|
|
262
|
+
];
|
|
263
|
+
const RAW_PAYLOAD_WITH_NOISE = [
|
|
264
|
+
{
|
|
265
|
+
...PROMPT_INJECTION_WIRE,
|
|
266
|
+
executionStage: 'PreLlm',
|
|
267
|
+
internalRanking: 3,
|
|
268
|
+
displayName: '',
|
|
269
|
+
description: ''
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
validator: 'broken_validator',
|
|
273
|
+
allowedScopes: [
|
|
274
|
+
'Llm'
|
|
275
|
+
],
|
|
276
|
+
parameters: []
|
|
277
|
+
},
|
|
278
|
+
USER_PROMPT_ATTACKS_WIRE
|
|
279
|
+
];
|
|
280
|
+
export { ALL_BUILT_IN_WIRE, BYO_WIRE, HARMFUL_CONTENT_WIRE, INTELLECTUAL_PROPERTY_WIRE, LLM_AS_JUDGE_WIRE, PII_DETECTION_WIRE, PII_ENTITY_OPTIONS, PROMPT_INJECTION_WIRE, RAW_PAYLOAD_WITH_NOISE, UNCURATED_WIRE, USER_PROMPT_ATTACKS_WIRE };
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
AGENTS_COPY_EN: ()=>AGENTS_COPY_EN,
|
|
28
|
+
FLOW_COPY_EN: ()=>FLOW_COPY_EN
|
|
29
|
+
});
|
|
30
|
+
const SHARED_PII_ENTITY_LABELS = {
|
|
31
|
+
Person: 'Person',
|
|
32
|
+
Address: 'Address',
|
|
33
|
+
Date: 'Date',
|
|
34
|
+
PhoneNumber: 'Phone Number',
|
|
35
|
+
EugpsCoordinates: 'EU GPS Coordinates',
|
|
36
|
+
Email: 'Email',
|
|
37
|
+
CreditCardNumber: 'Credit Card Number',
|
|
38
|
+
InternationalBankingAccountNumber: 'International Banking Account Number (IBAN)',
|
|
39
|
+
SwiftCode: 'SWIFT Code',
|
|
40
|
+
ABARoutingNumber: 'ABA Routing Number',
|
|
41
|
+
USDriversLicenseNumber: "US Driver's License Number",
|
|
42
|
+
UKDriversLicenseNumber: "UK Driver's License Number",
|
|
43
|
+
USIndividualTaxpayerIdentification: 'US Individual Taxpayer Identification Number (ITIN)',
|
|
44
|
+
UKUniqueTaxpayerNumber: 'UK Unique Taxpayer Number (UTR)',
|
|
45
|
+
USBankAccountNumber: 'US Bank Account Number',
|
|
46
|
+
USSocialSecurityNumber: 'US Social Security Number (SSN)',
|
|
47
|
+
UsukPassportNumber: 'US/UK Passport Number',
|
|
48
|
+
NOIdentityNumber: 'Norway Identity Number',
|
|
49
|
+
FINationalID: 'Finland National ID',
|
|
50
|
+
SENationalID: 'Sweden National ID',
|
|
51
|
+
DKPersonalIdentificationNumber: 'Danish Personal Identification Number',
|
|
52
|
+
NLCitizensServiceNumber: 'Netherlands Citizens Service Number',
|
|
53
|
+
URL: 'URL',
|
|
54
|
+
IPAddress: 'IP Address'
|
|
55
|
+
};
|
|
56
|
+
const SHARED_LLM_AS_JUDGE_TOOLTIPS = {
|
|
57
|
+
guardrailText: 'Describe the rule the judge will enforce. Be specific about what should pass and what should fail.',
|
|
58
|
+
model: 'The model used to evaluate the policy against each payload.',
|
|
59
|
+
positiveExamples: 'Optional payloads that should pass the policy. Used by the judge as calibration anchors.',
|
|
60
|
+
negativeExamples: 'Optional payloads that should fail the policy. Used by the judge as calibration anchors.'
|
|
61
|
+
};
|
|
62
|
+
const AGENTS_COPY_EN = {
|
|
63
|
+
pii_detection: {
|
|
64
|
+
displayName: 'PII detection',
|
|
65
|
+
description: 'This validator is designed to detect personally identifiable information using Azure Cognitive Services',
|
|
66
|
+
paramLabels: {
|
|
67
|
+
entities: 'Entities to detect',
|
|
68
|
+
entityThresholds: 'Detection threshold'
|
|
69
|
+
},
|
|
70
|
+
paramTooltips: {
|
|
71
|
+
entityThresholds: 'Value between 0 and 1. The sensitivity level for PII detection. Higher thresholds detect more potential PII but may result in more false positives.'
|
|
72
|
+
},
|
|
73
|
+
optionLabels: {
|
|
74
|
+
entities: {
|
|
75
|
+
...SHARED_PII_ENTITY_LABELS,
|
|
76
|
+
FIPassportNumber: 'Finland Passport Number'
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
prompt_injection: {
|
|
81
|
+
displayName: 'Prompt injection',
|
|
82
|
+
description: 'This validator is provided by Noma Security and is built to detect malicious attack attempts (e.g. prompt injection, jailbreak) in LLM calls.',
|
|
83
|
+
paramLabels: {
|
|
84
|
+
threshold: 'Detection threshold'
|
|
85
|
+
},
|
|
86
|
+
paramTooltips: {
|
|
87
|
+
threshold: 'Value between 0 and 1. The sensitivity level for Prompt Injection detection. Higher thresholds detect more potential Prompt Injection but may result in more false positives.'
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
harmful_content: {
|
|
91
|
+
displayName: 'Harmful content',
|
|
92
|
+
description: 'This validator is provided by Microsoft Azure AI Content Safety and is built to detect harmful content (e.g. hate, violence, etc.) in LLM calls.',
|
|
93
|
+
paramLabels: {
|
|
94
|
+
harmfulContentEntities: 'Entities to detect',
|
|
95
|
+
harmfulContentEntityThresholds: 'Detection threshold'
|
|
96
|
+
},
|
|
97
|
+
paramTooltips: {
|
|
98
|
+
harmfulContentEntityThresholds: 'Integer value between 0 and 6 (step 2). The severity threshold for harmful content detection. Higher values require more severe content before triggering.'
|
|
99
|
+
},
|
|
100
|
+
optionLabels: {
|
|
101
|
+
harmfulContentEntities: {
|
|
102
|
+
Hate: 'Hate',
|
|
103
|
+
SelfHarm: 'SelfHarm',
|
|
104
|
+
Sexual: 'Sexual',
|
|
105
|
+
Violence: 'Violence'
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
user_prompt_attacks: {
|
|
110
|
+
displayName: 'User prompt attacks',
|
|
111
|
+
description: 'This validator is provided by Microsoft Azure AI Content Safety and is built to detect user prompt attacks (e.g. jailbreak, prompt injection) that attempt to bypass system instructions.',
|
|
112
|
+
paramLabels: {}
|
|
113
|
+
},
|
|
114
|
+
intellectual_property: {
|
|
115
|
+
displayName: 'Intellectual property',
|
|
116
|
+
description: 'This validator is provided by Microsoft Azure AI Content Safety and is built to detect potential intellectual property violations in text and code.',
|
|
117
|
+
paramLabels: {
|
|
118
|
+
ipEntities: 'Entities to detect'
|
|
119
|
+
},
|
|
120
|
+
optionLabels: {
|
|
121
|
+
ipEntities: {
|
|
122
|
+
Text: 'Text',
|
|
123
|
+
Code: 'Code'
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
llm_as_judge: {
|
|
128
|
+
displayName: 'LLM as Judge',
|
|
129
|
+
description: 'Detect violations of a rule you define, using an LLM as the judge.',
|
|
130
|
+
paramLabels: {
|
|
131
|
+
guardrailText: 'Rule prompt',
|
|
132
|
+
model: 'Judge model',
|
|
133
|
+
positiveExamples: 'Positive examples',
|
|
134
|
+
negativeExamples: 'Negative examples',
|
|
135
|
+
threshold: 'Threshold'
|
|
136
|
+
},
|
|
137
|
+
paramTooltips: {
|
|
138
|
+
...SHARED_LLM_AS_JUDGE_TOOLTIPS,
|
|
139
|
+
threshold: 'Integer value between 0 and 6 (step 2). Lower values are stricter — borderline payloads will fail. Higher values are more lenient — only clear violations are flagged.'
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
const FLOW_COPY_EN = {
|
|
144
|
+
pii_detection: {
|
|
145
|
+
displayName: 'PII detection',
|
|
146
|
+
description: 'Detect personally identifiable information using Azure Cognitive Services.',
|
|
147
|
+
paramLabels: {
|
|
148
|
+
entities: 'Entities to detect',
|
|
149
|
+
entityThresholds: 'Detection thresholds'
|
|
150
|
+
},
|
|
151
|
+
optionLabels: {
|
|
152
|
+
entities: SHARED_PII_ENTITY_LABELS
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
prompt_injection: {
|
|
156
|
+
displayName: 'Prompt injection',
|
|
157
|
+
description: 'Detect malicious attack attempts (e.g. prompt injection, jailbreak) in LLM calls.',
|
|
158
|
+
paramLabels: {
|
|
159
|
+
threshold: 'Detection threshold'
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
harmful_content: {
|
|
163
|
+
displayName: 'Harmful content',
|
|
164
|
+
description: 'Detect harmful content (e.g. hate, violence) using Azure AI Content Safety.',
|
|
165
|
+
paramLabels: {
|
|
166
|
+
harmfulContentEntities: 'Content categories',
|
|
167
|
+
harmfulContentEntityThresholds: 'Severity thresholds'
|
|
168
|
+
},
|
|
169
|
+
optionLabels: {
|
|
170
|
+
harmfulContentEntities: {
|
|
171
|
+
Hate: 'Hate',
|
|
172
|
+
SelfHarm: 'Self-harm',
|
|
173
|
+
Sexual: 'Sexual',
|
|
174
|
+
Violence: 'Violence'
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
user_prompt_attacks: {
|
|
179
|
+
displayName: 'User prompt attacks',
|
|
180
|
+
description: 'Detect user prompt attacks that attempt to bypass system instructions using Azure AI Content Safety.',
|
|
181
|
+
paramLabels: {}
|
|
182
|
+
},
|
|
183
|
+
intellectual_property: {
|
|
184
|
+
displayName: 'Intellectual property',
|
|
185
|
+
description: 'Detect potential intellectual property violations in text and code using Azure AI Content Safety.',
|
|
186
|
+
paramLabels: {
|
|
187
|
+
ipEntities: 'Content types'
|
|
188
|
+
},
|
|
189
|
+
optionLabels: {
|
|
190
|
+
ipEntities: {
|
|
191
|
+
Text: 'Text',
|
|
192
|
+
Code: 'Code'
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
llm_as_judge: {
|
|
197
|
+
displayName: 'LLM as Judge',
|
|
198
|
+
description: 'Detect violations of a rule you define, using an LLM as the judge.',
|
|
199
|
+
usageNote: "Judge model calls consume Agent units the same way the agent's own LLM calls do. Apply selectively to keep cost predictable, and choose the judge model with cost in mind — rates vary by model.",
|
|
200
|
+
paramLabels: {
|
|
201
|
+
guardrailText: 'Rule prompt',
|
|
202
|
+
model: 'Judge model',
|
|
203
|
+
positiveExamples: 'Positive examples',
|
|
204
|
+
negativeExamples: 'Negative examples',
|
|
205
|
+
threshold: 'Strictness'
|
|
206
|
+
},
|
|
207
|
+
paramTooltips: {
|
|
208
|
+
...SHARED_LLM_AS_JUDGE_TOOLTIPS,
|
|
209
|
+
threshold: 'Strictness on a 0–6 scale. Lower values are stricter — the judge flags anything that hints at a violation. Higher values are more lenient — only clear, unambiguous violations are flagged.'
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
exports.AGENTS_COPY_EN = __webpack_exports__.AGENTS_COPY_EN;
|
|
214
|
+
exports.FLOW_COPY_EN = __webpack_exports__.FLOW_COPY_EN;
|
|
215
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
216
|
+
"AGENTS_COPY_EN",
|
|
217
|
+
"FLOW_COPY_EN"
|
|
218
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
219
|
+
Object.defineProperty(exports, '__esModule', {
|
|
220
|
+
value: true
|
|
221
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-copy-baselines.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/Guardrails/__fixtures__/host-copy-baselines.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAgE9D,eAAO,MAAM,cAAc,EAAE,kBA6E5B,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,kBA+D1B,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
const SHARED_PII_ENTITY_LABELS = {
|
|
2
|
+
Person: 'Person',
|
|
3
|
+
Address: 'Address',
|
|
4
|
+
Date: 'Date',
|
|
5
|
+
PhoneNumber: 'Phone Number',
|
|
6
|
+
EugpsCoordinates: 'EU GPS Coordinates',
|
|
7
|
+
Email: 'Email',
|
|
8
|
+
CreditCardNumber: 'Credit Card Number',
|
|
9
|
+
InternationalBankingAccountNumber: 'International Banking Account Number (IBAN)',
|
|
10
|
+
SwiftCode: 'SWIFT Code',
|
|
11
|
+
ABARoutingNumber: 'ABA Routing Number',
|
|
12
|
+
USDriversLicenseNumber: "US Driver's License Number",
|
|
13
|
+
UKDriversLicenseNumber: "UK Driver's License Number",
|
|
14
|
+
USIndividualTaxpayerIdentification: 'US Individual Taxpayer Identification Number (ITIN)',
|
|
15
|
+
UKUniqueTaxpayerNumber: 'UK Unique Taxpayer Number (UTR)',
|
|
16
|
+
USBankAccountNumber: 'US Bank Account Number',
|
|
17
|
+
USSocialSecurityNumber: 'US Social Security Number (SSN)',
|
|
18
|
+
UsukPassportNumber: 'US/UK Passport Number',
|
|
19
|
+
NOIdentityNumber: 'Norway Identity Number',
|
|
20
|
+
FINationalID: 'Finland National ID',
|
|
21
|
+
SENationalID: 'Sweden National ID',
|
|
22
|
+
DKPersonalIdentificationNumber: 'Danish Personal Identification Number',
|
|
23
|
+
NLCitizensServiceNumber: 'Netherlands Citizens Service Number',
|
|
24
|
+
URL: 'URL',
|
|
25
|
+
IPAddress: 'IP Address'
|
|
26
|
+
};
|
|
27
|
+
const SHARED_LLM_AS_JUDGE_TOOLTIPS = {
|
|
28
|
+
guardrailText: 'Describe the rule the judge will enforce. Be specific about what should pass and what should fail.',
|
|
29
|
+
model: 'The model used to evaluate the policy against each payload.',
|
|
30
|
+
positiveExamples: 'Optional payloads that should pass the policy. Used by the judge as calibration anchors.',
|
|
31
|
+
negativeExamples: 'Optional payloads that should fail the policy. Used by the judge as calibration anchors.'
|
|
32
|
+
};
|
|
33
|
+
const AGENTS_COPY_EN = {
|
|
34
|
+
pii_detection: {
|
|
35
|
+
displayName: 'PII detection',
|
|
36
|
+
description: 'This validator is designed to detect personally identifiable information using Azure Cognitive Services',
|
|
37
|
+
paramLabels: {
|
|
38
|
+
entities: 'Entities to detect',
|
|
39
|
+
entityThresholds: 'Detection threshold'
|
|
40
|
+
},
|
|
41
|
+
paramTooltips: {
|
|
42
|
+
entityThresholds: 'Value between 0 and 1. The sensitivity level for PII detection. Higher thresholds detect more potential PII but may result in more false positives.'
|
|
43
|
+
},
|
|
44
|
+
optionLabels: {
|
|
45
|
+
entities: {
|
|
46
|
+
...SHARED_PII_ENTITY_LABELS,
|
|
47
|
+
FIPassportNumber: 'Finland Passport Number'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
prompt_injection: {
|
|
52
|
+
displayName: 'Prompt injection',
|
|
53
|
+
description: 'This validator is provided by Noma Security and is built to detect malicious attack attempts (e.g. prompt injection, jailbreak) in LLM calls.',
|
|
54
|
+
paramLabels: {
|
|
55
|
+
threshold: 'Detection threshold'
|
|
56
|
+
},
|
|
57
|
+
paramTooltips: {
|
|
58
|
+
threshold: 'Value between 0 and 1. The sensitivity level for Prompt Injection detection. Higher thresholds detect more potential Prompt Injection but may result in more false positives.'
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
harmful_content: {
|
|
62
|
+
displayName: 'Harmful content',
|
|
63
|
+
description: 'This validator is provided by Microsoft Azure AI Content Safety and is built to detect harmful content (e.g. hate, violence, etc.) in LLM calls.',
|
|
64
|
+
paramLabels: {
|
|
65
|
+
harmfulContentEntities: 'Entities to detect',
|
|
66
|
+
harmfulContentEntityThresholds: 'Detection threshold'
|
|
67
|
+
},
|
|
68
|
+
paramTooltips: {
|
|
69
|
+
harmfulContentEntityThresholds: 'Integer value between 0 and 6 (step 2). The severity threshold for harmful content detection. Higher values require more severe content before triggering.'
|
|
70
|
+
},
|
|
71
|
+
optionLabels: {
|
|
72
|
+
harmfulContentEntities: {
|
|
73
|
+
Hate: 'Hate',
|
|
74
|
+
SelfHarm: 'SelfHarm',
|
|
75
|
+
Sexual: 'Sexual',
|
|
76
|
+
Violence: 'Violence'
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
user_prompt_attacks: {
|
|
81
|
+
displayName: 'User prompt attacks',
|
|
82
|
+
description: 'This validator is provided by Microsoft Azure AI Content Safety and is built to detect user prompt attacks (e.g. jailbreak, prompt injection) that attempt to bypass system instructions.',
|
|
83
|
+
paramLabels: {}
|
|
84
|
+
},
|
|
85
|
+
intellectual_property: {
|
|
86
|
+
displayName: 'Intellectual property',
|
|
87
|
+
description: 'This validator is provided by Microsoft Azure AI Content Safety and is built to detect potential intellectual property violations in text and code.',
|
|
88
|
+
paramLabels: {
|
|
89
|
+
ipEntities: 'Entities to detect'
|
|
90
|
+
},
|
|
91
|
+
optionLabels: {
|
|
92
|
+
ipEntities: {
|
|
93
|
+
Text: 'Text',
|
|
94
|
+
Code: 'Code'
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
llm_as_judge: {
|
|
99
|
+
displayName: 'LLM as Judge',
|
|
100
|
+
description: 'Detect violations of a rule you define, using an LLM as the judge.',
|
|
101
|
+
paramLabels: {
|
|
102
|
+
guardrailText: 'Rule prompt',
|
|
103
|
+
model: 'Judge model',
|
|
104
|
+
positiveExamples: 'Positive examples',
|
|
105
|
+
negativeExamples: 'Negative examples',
|
|
106
|
+
threshold: 'Threshold'
|
|
107
|
+
},
|
|
108
|
+
paramTooltips: {
|
|
109
|
+
...SHARED_LLM_AS_JUDGE_TOOLTIPS,
|
|
110
|
+
threshold: 'Integer value between 0 and 6 (step 2). Lower values are stricter — borderline payloads will fail. Higher values are more lenient — only clear violations are flagged.'
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const FLOW_COPY_EN = {
|
|
115
|
+
pii_detection: {
|
|
116
|
+
displayName: 'PII detection',
|
|
117
|
+
description: 'Detect personally identifiable information using Azure Cognitive Services.',
|
|
118
|
+
paramLabels: {
|
|
119
|
+
entities: 'Entities to detect',
|
|
120
|
+
entityThresholds: 'Detection thresholds'
|
|
121
|
+
},
|
|
122
|
+
optionLabels: {
|
|
123
|
+
entities: SHARED_PII_ENTITY_LABELS
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
prompt_injection: {
|
|
127
|
+
displayName: 'Prompt injection',
|
|
128
|
+
description: 'Detect malicious attack attempts (e.g. prompt injection, jailbreak) in LLM calls.',
|
|
129
|
+
paramLabels: {
|
|
130
|
+
threshold: 'Detection threshold'
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
harmful_content: {
|
|
134
|
+
displayName: 'Harmful content',
|
|
135
|
+
description: 'Detect harmful content (e.g. hate, violence) using Azure AI Content Safety.',
|
|
136
|
+
paramLabels: {
|
|
137
|
+
harmfulContentEntities: 'Content categories',
|
|
138
|
+
harmfulContentEntityThresholds: 'Severity thresholds'
|
|
139
|
+
},
|
|
140
|
+
optionLabels: {
|
|
141
|
+
harmfulContentEntities: {
|
|
142
|
+
Hate: 'Hate',
|
|
143
|
+
SelfHarm: 'Self-harm',
|
|
144
|
+
Sexual: 'Sexual',
|
|
145
|
+
Violence: 'Violence'
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
user_prompt_attacks: {
|
|
150
|
+
displayName: 'User prompt attacks',
|
|
151
|
+
description: 'Detect user prompt attacks that attempt to bypass system instructions using Azure AI Content Safety.',
|
|
152
|
+
paramLabels: {}
|
|
153
|
+
},
|
|
154
|
+
intellectual_property: {
|
|
155
|
+
displayName: 'Intellectual property',
|
|
156
|
+
description: 'Detect potential intellectual property violations in text and code using Azure AI Content Safety.',
|
|
157
|
+
paramLabels: {
|
|
158
|
+
ipEntities: 'Content types'
|
|
159
|
+
},
|
|
160
|
+
optionLabels: {
|
|
161
|
+
ipEntities: {
|
|
162
|
+
Text: 'Text',
|
|
163
|
+
Code: 'Code'
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
llm_as_judge: {
|
|
168
|
+
displayName: 'LLM as Judge',
|
|
169
|
+
description: 'Detect violations of a rule you define, using an LLM as the judge.',
|
|
170
|
+
usageNote: "Judge model calls consume Agent units the same way the agent's own LLM calls do. Apply selectively to keep cost predictable, and choose the judge model with cost in mind — rates vary by model.",
|
|
171
|
+
paramLabels: {
|
|
172
|
+
guardrailText: 'Rule prompt',
|
|
173
|
+
model: 'Judge model',
|
|
174
|
+
positiveExamples: 'Positive examples',
|
|
175
|
+
negativeExamples: 'Negative examples',
|
|
176
|
+
threshold: 'Strictness'
|
|
177
|
+
},
|
|
178
|
+
paramTooltips: {
|
|
179
|
+
...SHARED_LLM_AS_JUDGE_TOOLTIPS,
|
|
180
|
+
threshold: 'Strictness on a 0–6 scale. Lower values are stricter — the judge flags anything that hints at a violation. Higher values are more lenient — only clear, unambiguous violations are flagged.'
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
export { AGENTS_COPY_EN, FLOW_COPY_EN };
|