@uipath/apollo-react 6.49.0 → 6.51.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.
Files changed (84) hide show
  1. package/dist/canvas/components/AgentCanvas/agent-flow.manifest.d.ts +3 -3
  2. package/dist/canvas/components/BaseNode/BaseNode.cjs +4 -3
  3. package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
  4. package/dist/canvas/components/BaseNode/BaseNode.js +4 -3
  5. package/dist/canvas/components/BaseNode/BaseNodeContainer.cjs +16 -3
  6. package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts +1 -1
  7. package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts.map +1 -1
  8. package/dist/canvas/components/BaseNode/BaseNodeContainer.js +17 -4
  9. package/dist/canvas/components/BaseNode/BaseNodeOutline.cjs +131 -0
  10. package/dist/canvas/components/BaseNode/BaseNodeOutline.d.ts +17 -0
  11. package/dist/canvas/components/BaseNode/BaseNodeOutline.d.ts.map +1 -0
  12. package/dist/canvas/components/BaseNode/BaseNodeOutline.js +91 -0
  13. package/dist/canvas/components/BaseNode/NodeLabel.cjs +8 -7
  14. package/dist/canvas/components/BaseNode/NodeLabel.d.ts +1 -1
  15. package/dist/canvas/components/BaseNode/NodeLabel.d.ts.map +1 -1
  16. package/dist/canvas/components/BaseNode/NodeLabel.js +8 -7
  17. package/dist/canvas/components/CaseFlow/case-flow.manifest.d.ts +3 -3
  18. package/dist/canvas/components/Guardrails/__fixtures__/dnd-geometry.d.ts +3 -0
  19. package/dist/canvas/components/Guardrails/__fixtures__/dnd-geometry.d.ts.map +1 -0
  20. package/dist/canvas/components/Guardrails/__fixtures__/guardrail-list.fixtures.d.ts +9 -0
  21. package/dist/canvas/components/Guardrails/__fixtures__/guardrail-list.fixtures.d.ts.map +1 -0
  22. package/dist/canvas/components/Guardrails/components/guardrail-list-row.cjs +218 -0
  23. package/dist/canvas/components/Guardrails/components/guardrail-list-row.d.ts +26 -0
  24. package/dist/canvas/components/Guardrails/components/guardrail-list-row.d.ts.map +1 -0
  25. package/dist/canvas/components/Guardrails/components/guardrail-list-row.js +184 -0
  26. package/dist/canvas/components/Guardrails/components/guardrail-status-banner.cjs +2 -0
  27. package/dist/canvas/components/Guardrails/components/guardrail-status-banner.d.ts.map +1 -1
  28. package/dist/canvas/components/Guardrails/components/guardrail-status-banner.js +2 -0
  29. package/dist/canvas/components/Guardrails/components/mixed-scopes-banner.cjs +1 -0
  30. package/dist/canvas/components/Guardrails/components/mixed-scopes-banner.d.ts.map +1 -1
  31. package/dist/canvas/components/Guardrails/components/mixed-scopes-banner.js +1 -0
  32. package/dist/canvas/components/Guardrails/guardrail-list-utils.cjs +103 -0
  33. package/dist/canvas/components/Guardrails/guardrail-list-utils.d.ts +10 -0
  34. package/dist/canvas/components/Guardrails/guardrail-list-utils.d.ts.map +1 -0
  35. package/dist/canvas/components/Guardrails/guardrail-list-utils.js +60 -0
  36. package/dist/canvas/components/Guardrails/guardrail-list.cjs +214 -0
  37. package/dist/canvas/components/Guardrails/guardrail-list.d.ts +33 -0
  38. package/dist/canvas/components/Guardrails/guardrail-list.d.ts.map +1 -0
  39. package/dist/canvas/components/Guardrails/guardrail-list.js +180 -0
  40. package/dist/canvas/components/Guardrails/i18n.cjs +124 -16
  41. package/dist/canvas/components/Guardrails/i18n.d.ts +25 -0
  42. package/dist/canvas/components/Guardrails/i18n.d.ts.map +1 -1
  43. package/dist/canvas/components/Guardrails/i18n.js +110 -14
  44. package/dist/canvas/components/Guardrails/index.cjs +40 -3
  45. package/dist/canvas/components/Guardrails/index.d.ts +10 -2
  46. package/dist/canvas/components/Guardrails/index.d.ts.map +1 -1
  47. package/dist/canvas/components/Guardrails/index.js +6 -2
  48. package/dist/canvas/components/Guardrails/list-types.cjs +18 -0
  49. package/dist/canvas/components/Guardrails/list-types.d.ts +51 -0
  50. package/dist/canvas/components/Guardrails/list-types.d.ts.map +1 -0
  51. package/dist/canvas/components/Guardrails/list-types.js +0 -0
  52. package/dist/canvas/locales/en.cjs +1 -1
  53. package/dist/canvas/locales/en.d.ts.map +1 -1
  54. package/dist/canvas/locales/en.js +1 -1
  55. package/dist/canvas/schema/node-definition/index.cjs +17 -5
  56. package/dist/canvas/schema/node-definition/index.d.ts +2 -2
  57. package/dist/canvas/schema/node-definition/index.d.ts.map +1 -1
  58. package/dist/canvas/schema/node-definition/index.js +2 -2
  59. package/dist/canvas/schema/node-definition/node-manifest.d.ts +12 -0
  60. package/dist/canvas/schema/node-definition/node-manifest.d.ts.map +1 -1
  61. package/dist/canvas/schema/node-definition/shape.cjs +29 -2
  62. package/dist/canvas/schema/node-definition/shape.d.ts +9 -0
  63. package/dist/canvas/schema/node-definition/shape.d.ts.map +1 -1
  64. package/dist/canvas/schema/node-definition/shape.js +17 -2
  65. package/dist/canvas/schema/node-instance/base.d.ts +3 -0
  66. package/dist/canvas/schema/node-instance/base.d.ts.map +1 -1
  67. package/dist/canvas/schema/node-instance/node.d.ts +3 -0
  68. package/dist/canvas/schema/node-instance/node.d.ts.map +1 -1
  69. package/dist/canvas/schema/toolbar.d.ts +15 -0
  70. package/dist/canvas/schema/toolbar.d.ts.map +1 -1
  71. package/dist/canvas/storybook-utils/manifests/index.d.ts +3 -3
  72. package/dist/canvas/styles/tailwind.canvas.css +1 -1
  73. package/dist/canvas/styles/variables.css +8 -0
  74. package/dist/canvas/utils/node-size.cjs +2 -1
  75. package/dist/canvas/utils/node-size.d.ts +1 -1
  76. package/dist/canvas/utils/node-size.d.ts.map +1 -1
  77. package/dist/canvas/utils/node-size.js +2 -1
  78. package/package.json +4 -3
  79. package/dist/canvas/components/Guardrails/__fixtures__/catalog-coverage.cjs +0 -83
  80. package/dist/canvas/components/Guardrails/__fixtures__/catalog-coverage.js +0 -37
  81. package/dist/canvas/components/Guardrails/__fixtures__/definitions-wire.fixtures.cjs +0 -344
  82. package/dist/canvas/components/Guardrails/__fixtures__/definitions-wire.fixtures.js +0 -280
  83. package/dist/canvas/components/Guardrails/__fixtures__/host-copy-baselines.cjs +0 -221
  84. package/dist/canvas/components/Guardrails/__fixtures__/host-copy-baselines.js +0 -184
@@ -35,10 +35,14 @@ body.light, body.dark, body.light-hc, body.dark-hc {
35
35
  --canvas-node-shadow-rest: 0 2px 8px #0000002e;
36
36
  --canvas-node-shadow-hover: 0 4px 16px #0000005c;
37
37
  --canvas-node-shadow-lifted: 0 16px 48px #000000b8, 0 4px 16px #0006;
38
+ --canvas-node-filter-rest: drop-shadow(0 2px 8px #0000002e);
39
+ --canvas-node-filter-hover: drop-shadow(0 4px 16px #0000005c);
40
+ --canvas-node-filter-lifted: drop-shadow(0 16px 48px #000000b8) drop-shadow(0 4px 16px #0006);
38
41
  }
39
42
 
40
43
  body.light, body.light-hc {
41
44
  --canvas-node-shadow-lifted: 0 8px 24px #0000001f, 0 2px 8px #0000000f;
45
+ --canvas-node-filter-lifted: drop-shadow(0 8px 24px #0000001f) drop-shadow(0 2px 8px #0000000f);
42
46
  }
43
47
 
44
48
  .future-light, .future-dark, .wireframe, .vertex, .canvas {
@@ -78,9 +82,13 @@ body.light, body.light-hc {
78
82
  --canvas-node-shadow-rest: 0 2px 8px #0000002e;
79
83
  --canvas-node-shadow-hover: 0 4px 16px #0000005c;
80
84
  --canvas-node-shadow-lifted: 0 16px 48px #000000b8, 0 4px 16px #0006;
85
+ --canvas-node-filter-rest: drop-shadow(0 2px 8px #0000002e);
86
+ --canvas-node-filter-hover: drop-shadow(0 4px 16px #0000005c);
87
+ --canvas-node-filter-lifted: drop-shadow(0 16px 48px #000000b8) drop-shadow(0 4px 16px #0006);
81
88
  }
82
89
 
83
90
  .future-light, .wireframe {
84
91
  --canvas-node-shadow-lifted: 0 8px 24px #0000001f, 0 2px 8px #0000000f;
92
+ --canvas-node-filter-lifted: drop-shadow(0 8px 24px #0000001f) drop-shadow(0 2px 8px #0000000f);
85
93
  }
86
94
 
@@ -28,6 +28,7 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  COLLAPSED_NODE_SIZE: ()=>COLLAPSED_NODE_SIZE,
29
29
  getExpandedSize: ()=>getExpandedSize
30
30
  });
31
+ const index_cjs_namespaceObject = require("../schema/node-definition/index.cjs");
31
32
  const external_container_cjs_namespaceObject = require("./container.cjs");
32
33
  const COLLAPSED_NODE_SIZE = 96;
33
34
  const EXPANDED_RECTANGLE_WIDTH = 288;
@@ -37,7 +38,7 @@ const getExpandedSize = (shape)=>{
37
38
  height: external_container_cjs_namespaceObject.DEFAULT_CONTAINER_HEIGHT
38
39
  };
39
40
  return {
40
- width: 'rectangle' === shape ? EXPANDED_RECTANGLE_WIDTH : COLLAPSED_NODE_SIZE,
41
+ width: (0, index_cjs_namespaceObject.isWideNodeShape)(shape) ? EXPANDED_RECTANGLE_WIDTH : COLLAPSED_NODE_SIZE,
41
42
  height: COLLAPSED_NODE_SIZE
42
43
  };
43
44
  };
@@ -1,4 +1,4 @@
1
- import type { NodeShape } from '../schema/node-definition';
1
+ import { type NodeShape } from '../schema/node-definition';
2
2
  export declare const COLLAPSED_NODE_SIZE = 96;
3
3
  export declare const EXPANDED_RECTANGLE_WIDTH = 288;
4
4
  export declare const getExpandedSize: (shape?: NodeShape) => {
@@ -1 +1 @@
1
- {"version":3,"file":"node-size.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/node-size.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAM3D,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAKtC,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAK5C,eAAO,MAAM,eAAe,GAAI,QAAQ,SAAS,KAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAYlF,CAAC"}
1
+ {"version":3,"file":"node-size.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/node-size.ts"],"names":[],"mappings":"AAOA,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAM5E,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAKtC,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAK5C,eAAO,MAAM,eAAe,GAAI,QAAQ,SAAS,KAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAYlF,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { isWideNodeShape } from "../schema/node-definition/index.js";
1
2
  import { DEFAULT_CONTAINER_HEIGHT, DEFAULT_CONTAINER_WIDTH } from "./container.js";
2
3
  const COLLAPSED_NODE_SIZE = 96;
3
4
  const EXPANDED_RECTANGLE_WIDTH = 288;
@@ -7,7 +8,7 @@ const getExpandedSize = (shape)=>{
7
8
  height: DEFAULT_CONTAINER_HEIGHT
8
9
  };
9
10
  return {
10
- width: 'rectangle' === shape ? EXPANDED_RECTANGLE_WIDTH : COLLAPSED_NODE_SIZE,
11
+ width: isWideNodeShape(shape) ? EXPANDED_RECTANGLE_WIDTH : COLLAPSED_NODE_SIZE,
11
12
  height: COLLAPSED_NODE_SIZE
12
13
  };
13
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-react",
3
- "version": "6.49.0",
3
+ "version": "6.51.0",
4
4
  "description": "Apollo Design System - React component library with Material UI theming",
5
5
  "repository": {
6
6
  "type": "git",
@@ -157,6 +157,7 @@
157
157
  },
158
158
  "dependencies": {
159
159
  "@dnd-kit/core": "^6.3.1",
160
+ "@dnd-kit/modifiers": "^9.0.0",
160
161
  "@dnd-kit/sortable": "^10.0.0",
161
162
  "@dnd-kit/utilities": "^3.2.2",
162
163
  "@emotion/cache": "^11.14.0",
@@ -226,8 +227,8 @@
226
227
  "use-sync-external-store": "^1.2.0",
227
228
  "zod": "^4.3.5",
228
229
  "zustand": "^5.0.9",
229
- "@uipath/apollo-ui-icons": "1.1.0",
230
230
  "@uipath/apollo-core": "5.14.1",
231
+ "@uipath/apollo-ui-icons": "1.1.0",
231
232
  "@uipath/apollo-wind": "2.53.2"
232
233
  },
233
234
  "devDependencies": {
@@ -278,7 +279,7 @@
278
279
  "typescript": "^5.9.3",
279
280
  "use-sync-external-store": "^1.2.0",
280
281
  "vite-tsconfig-paths": "^5.1.4",
281
- "vitest": "^4.1.5",
282
+ "vitest": "^4.1.11",
282
283
  "webpack-bundle-analyzer": "^5.3.0"
283
284
  },
284
285
  "scripts": {
@@ -1,83 +0,0 @@
1
- "use strict";
2
- const __rslib_import_meta_url__ = /*#__PURE__*/ function() {
3
- return "u" < typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
4
- }();
5
- var __webpack_require__ = {};
6
- (()=>{
7
- __webpack_require__.d = (exports1, definition)=>{
8
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
9
- enumerable: true,
10
- get: definition[key]
11
- });
12
- };
13
- })();
14
- (()=>{
15
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
16
- })();
17
- (()=>{
18
- __webpack_require__.r = (exports1)=>{
19
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
20
- value: 'Module'
21
- });
22
- Object.defineProperty(exports1, '__esModule', {
23
- value: true
24
- });
25
- };
26
- })();
27
- var __webpack_exports__ = {};
28
- __webpack_require__.r(__webpack_exports__);
29
- __webpack_require__.d(__webpack_exports__, {
30
- findCatalogDrift: ()=>findCatalogDrift,
31
- readCanvasCatalog: ()=>readCanvasCatalog,
32
- findCatalogOrphans: ()=>findCatalogOrphans,
33
- CANVAS_LOCALES: ()=>CANVAS_LOCALES
34
- });
35
- const external_node_fs_namespaceObject = require("node:fs");
36
- const external_node_path_namespaceObject = require("node:path");
37
- const external_node_url_namespaceObject = require("node:url");
38
- const CANVAS_LOCALES = [
39
- 'en',
40
- 'ru',
41
- 'de',
42
- 'es',
43
- 'es-MX',
44
- 'fr',
45
- 'ja',
46
- 'ko',
47
- 'pt',
48
- 'pt-BR',
49
- 'ro',
50
- 'tr',
51
- 'zh-CN',
52
- 'zh-TW'
53
- ];
54
- const localesDir = (0, external_node_path_namespaceObject.join)((0, external_node_path_namespaceObject.dirname)((0, external_node_url_namespaceObject.fileURLToPath)(__rslib_import_meta_url__)), '../../../locales');
55
- const readCanvasCatalog = (locale)=>JSON.parse((0, external_node_fs_namespaceObject.readFileSync)((0, external_node_path_namespaceObject.join)(localesDir, `${locale}.json`), 'utf8'));
56
- function findCatalogDrift(messages) {
57
- const catalog = readCanvasCatalog('en');
58
- const missing = [];
59
- const drifted = [];
60
- for (const [id, message] of Object.entries(messages))if (id in catalog) {
61
- if (catalog[id] !== message) drifted.push(`${id}\n src: ${message}\n en: ${catalog[id]}`);
62
- } else missing.push(id);
63
- return {
64
- missing,
65
- drifted
66
- };
67
- }
68
- function findCatalogOrphans(messages, prefix) {
69
- return CANVAS_LOCALES.flatMap((locale)=>Object.keys(readCanvasCatalog(locale)).filter((id)=>id.startsWith(prefix)).filter((id)=>!(id in messages)).map((id)=>`${locale}: ${id}`));
70
- }
71
- exports.CANVAS_LOCALES = __webpack_exports__.CANVAS_LOCALES;
72
- exports.findCatalogDrift = __webpack_exports__.findCatalogDrift;
73
- exports.findCatalogOrphans = __webpack_exports__.findCatalogOrphans;
74
- exports.readCanvasCatalog = __webpack_exports__.readCanvasCatalog;
75
- for(var __rspack_i in __webpack_exports__)if (-1 === [
76
- "CANVAS_LOCALES",
77
- "findCatalogDrift",
78
- "findCatalogOrphans",
79
- "readCanvasCatalog"
80
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
81
- Object.defineProperty(exports, '__esModule', {
82
- value: true
83
- });
@@ -1,37 +0,0 @@
1
- import { readFileSync } from "node:fs";
2
- import { dirname, join } from "node:path";
3
- import { fileURLToPath } from "node:url";
4
- const CANVAS_LOCALES = [
5
- 'en',
6
- 'ru',
7
- 'de',
8
- 'es',
9
- 'es-MX',
10
- 'fr',
11
- 'ja',
12
- 'ko',
13
- 'pt',
14
- 'pt-BR',
15
- 'ro',
16
- 'tr',
17
- 'zh-CN',
18
- 'zh-TW'
19
- ];
20
- const localesDir = join(dirname(fileURLToPath(import.meta.url)), '../../../locales');
21
- const readCanvasCatalog = (locale)=>JSON.parse(readFileSync(join(localesDir, `${locale}.json`), 'utf8'));
22
- function findCatalogDrift(messages) {
23
- const catalog = readCanvasCatalog('en');
24
- const missing = [];
25
- const drifted = [];
26
- for (const [id, message] of Object.entries(messages))if (id in catalog) {
27
- if (catalog[id] !== message) drifted.push(`${id}\n src: ${message}\n en: ${catalog[id]}`);
28
- } else missing.push(id);
29
- return {
30
- missing,
31
- drifted
32
- };
33
- }
34
- function findCatalogOrphans(messages, prefix) {
35
- return CANVAS_LOCALES.flatMap((locale)=>Object.keys(readCanvasCatalog(locale)).filter((id)=>id.startsWith(prefix)).filter((id)=>!(id in messages)).map((id)=>`${locale}: ${id}`));
36
- }
37
- export { CANVAS_LOCALES, findCatalogDrift, findCatalogOrphans, readCanvasCatalog };
@@ -1,344 +0,0 @@
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
- ALL_BUILT_IN_WIRE: ()=>ALL_BUILT_IN_WIRE,
28
- BYO_WIRE: ()=>BYO_WIRE,
29
- HARMFUL_CONTENT_WIRE: ()=>HARMFUL_CONTENT_WIRE,
30
- INTELLECTUAL_PROPERTY_WIRE: ()=>INTELLECTUAL_PROPERTY_WIRE,
31
- LLM_AS_JUDGE_WIRE: ()=>LLM_AS_JUDGE_WIRE,
32
- PII_DETECTION_WIRE: ()=>PII_DETECTION_WIRE,
33
- PII_ENTITY_OPTIONS: ()=>PII_ENTITY_OPTIONS,
34
- PROMPT_INJECTION_WIRE: ()=>PROMPT_INJECTION_WIRE,
35
- RAW_PAYLOAD_WITH_NOISE: ()=>RAW_PAYLOAD_WITH_NOISE,
36
- UNCURATED_WIRE: ()=>UNCURATED_WIRE,
37
- USER_PROMPT_ATTACKS_WIRE: ()=>USER_PROMPT_ATTACKS_WIRE
38
- });
39
- const PII_ENTITY_OPTIONS = [
40
- 'Person',
41
- 'Address',
42
- 'Date',
43
- 'PhoneNumber',
44
- 'EugpsCoordinates',
45
- 'Email',
46
- 'CreditCardNumber',
47
- 'InternationalBankingAccountNumber',
48
- 'SwiftCode',
49
- 'ABARoutingNumber',
50
- 'USDriversLicenseNumber',
51
- 'UKDriversLicenseNumber',
52
- 'USIndividualTaxpayerIdentification',
53
- 'UKUniqueTaxpayerNumber',
54
- 'USBankAccountNumber',
55
- 'USSocialSecurityNumber',
56
- 'UsukPassportNumber',
57
- 'NOIdentityNumber',
58
- 'FINationalID',
59
- 'FIPassportNumber',
60
- 'SENationalID',
61
- 'DKPersonalIdentificationNumber',
62
- 'NLCitizensServiceNumber',
63
- 'URL',
64
- 'IPAddress'
65
- ];
66
- const PII_DETECTION_WIRE = {
67
- validator: 'pii_detection',
68
- allowedScopes: [
69
- 'Agent',
70
- 'Llm',
71
- 'Tool'
72
- ],
73
- status: 'Available',
74
- parameters: [
75
- {
76
- id: 'entities',
77
- type: 'enum-list',
78
- required: true,
79
- defaultValue: [
80
- 'Email',
81
- 'CreditCardNumber'
82
- ],
83
- options: PII_ENTITY_OPTIONS
84
- },
85
- {
86
- id: 'entityThresholds',
87
- type: 'map-enum',
88
- required: false,
89
- defaultValue: {
90
- Email: 0.8,
91
- CreditCardNumber: 0.8
92
- },
93
- keySource: 'entities'
94
- }
95
- ]
96
- };
97
- const HARMFUL_CONTENT_WIRE = {
98
- validator: 'harmful_content',
99
- allowedScopes: [
100
- 'Llm',
101
- 'Tool'
102
- ],
103
- status: 'Available',
104
- parameters: [
105
- {
106
- id: 'harmfulContentEntities',
107
- type: 'enum-list',
108
- required: true,
109
- defaultValue: [
110
- 'Hate',
111
- 'Violence'
112
- ],
113
- options: [
114
- 'Hate',
115
- 'SelfHarm',
116
- 'Sexual',
117
- 'Violence'
118
- ]
119
- },
120
- {
121
- id: 'harmfulContentEntityThresholds',
122
- type: 'map-enum',
123
- required: false,
124
- defaultValue: {
125
- Hate: 2,
126
- Violence: 2
127
- },
128
- keySource: 'harmfulContentEntities',
129
- min: 0,
130
- max: 6,
131
- step: 2
132
- }
133
- ]
134
- };
135
- const PROMPT_INJECTION_WIRE = {
136
- validator: 'prompt_injection',
137
- allowedScopes: [
138
- 'Llm'
139
- ],
140
- status: 'Available',
141
- parameters: [
142
- {
143
- id: 'threshold',
144
- type: 'number',
145
- required: true,
146
- defaultValue: 0.7,
147
- min: 0,
148
- max: 1,
149
- step: 0.1
150
- }
151
- ]
152
- };
153
- const USER_PROMPT_ATTACKS_WIRE = {
154
- validator: 'user_prompt_attacks',
155
- allowedScopes: [
156
- 'Llm'
157
- ],
158
- status: 'Available',
159
- parameters: []
160
- };
161
- const INTELLECTUAL_PROPERTY_WIRE = {
162
- validator: 'intellectual_property',
163
- allowedScopes: [
164
- 'Llm',
165
- 'Tool'
166
- ],
167
- status: 'FeatureDisabled',
168
- parameters: [
169
- {
170
- id: 'ipEntities',
171
- type: 'enum-list',
172
- required: true,
173
- defaultValue: [
174
- 'Text'
175
- ],
176
- options: [
177
- 'Text',
178
- 'Code'
179
- ]
180
- }
181
- ]
182
- };
183
- const LLM_AS_JUDGE_WIRE = {
184
- validator: 'llm_as_judge',
185
- allowedScopes: [
186
- 'Agent',
187
- 'Llm',
188
- 'Tool'
189
- ],
190
- status: 'Available',
191
- parameters: [
192
- {
193
- id: 'guardrailText',
194
- type: 'text',
195
- required: true,
196
- defaultValue: null,
197
- maxLength: 4000
198
- },
199
- {
200
- id: 'model',
201
- type: 'enum',
202
- required: true,
203
- defaultValue: null,
204
- options: [
205
- 'gpt-4o-mini-2024-07-18',
206
- 'gpt-4o-2024-11-20'
207
- ]
208
- },
209
- {
210
- id: 'positiveExamples',
211
- type: 'text-list',
212
- required: false,
213
- maxItems: 5,
214
- maxLength: 1000
215
- },
216
- {
217
- id: 'negativeExamples',
218
- type: 'text-list',
219
- required: false,
220
- defaultValue: null,
221
- maxItems: 5,
222
- maxLength: 1000
223
- },
224
- {
225
- id: 'threshold',
226
- type: 'number',
227
- required: true,
228
- defaultValue: 4,
229
- min: 0,
230
- max: 6,
231
- step: 2
232
- }
233
- ]
234
- };
235
- const BYO_WIRE = {
236
- validator: 'pii_detection',
237
- allowedScopes: [
238
- 'Llm'
239
- ],
240
- status: 'Available',
241
- displayName: 'Acme PII scan',
242
- description: 'Runs the Acme detector over prompts and completions.',
243
- byoValidatorName: 'acme-pii',
244
- byoConnectorName: 'Acme AI Guardrails',
245
- byoConnectorKey: 'acme',
246
- byoGuardrailConnectionId: 'conn-1',
247
- byoConfigurationId: 'cfg-1',
248
- parameters: [
249
- {
250
- id: 'sensitivity',
251
- type: 'enum',
252
- required: true,
253
- defaultValue: 'medium',
254
- displayName: 'Sensitivity',
255
- description: 'How aggressively to flag.',
256
- options: [
257
- 'low',
258
- 'medium',
259
- 'high'
260
- ],
261
- optionLabels: {
262
- low: 'Low',
263
- high: 'High'
264
- }
265
- }
266
- ]
267
- };
268
- const UNCURATED_WIRE = {
269
- validator: 'topic_drift',
270
- allowedScopes: [
271
- 'Llm'
272
- ],
273
- status: 'Available',
274
- parameters: [
275
- {
276
- id: 'maxDriftScore',
277
- type: 'number',
278
- required: true,
279
- defaultValue: 0.5
280
- },
281
- {
282
- id: 'allowedTopics',
283
- type: 'enum-list',
284
- required: false,
285
- defaultValue: [],
286
- options: [
287
- 'finance',
288
- 'legal'
289
- ]
290
- }
291
- ]
292
- };
293
- const ALL_BUILT_IN_WIRE = [
294
- PII_DETECTION_WIRE,
295
- PROMPT_INJECTION_WIRE,
296
- HARMFUL_CONTENT_WIRE,
297
- USER_PROMPT_ATTACKS_WIRE,
298
- INTELLECTUAL_PROPERTY_WIRE,
299
- LLM_AS_JUDGE_WIRE
300
- ];
301
- const RAW_PAYLOAD_WITH_NOISE = [
302
- {
303
- ...PROMPT_INJECTION_WIRE,
304
- executionStage: 'PreLlm',
305
- internalRanking: 3,
306
- displayName: '',
307
- description: ''
308
- },
309
- {
310
- validator: 'broken_validator',
311
- allowedScopes: [
312
- 'Llm'
313
- ],
314
- parameters: []
315
- },
316
- USER_PROMPT_ATTACKS_WIRE
317
- ];
318
- exports.ALL_BUILT_IN_WIRE = __webpack_exports__.ALL_BUILT_IN_WIRE;
319
- exports.BYO_WIRE = __webpack_exports__.BYO_WIRE;
320
- exports.HARMFUL_CONTENT_WIRE = __webpack_exports__.HARMFUL_CONTENT_WIRE;
321
- exports.INTELLECTUAL_PROPERTY_WIRE = __webpack_exports__.INTELLECTUAL_PROPERTY_WIRE;
322
- exports.LLM_AS_JUDGE_WIRE = __webpack_exports__.LLM_AS_JUDGE_WIRE;
323
- exports.PII_DETECTION_WIRE = __webpack_exports__.PII_DETECTION_WIRE;
324
- exports.PII_ENTITY_OPTIONS = __webpack_exports__.PII_ENTITY_OPTIONS;
325
- exports.PROMPT_INJECTION_WIRE = __webpack_exports__.PROMPT_INJECTION_WIRE;
326
- exports.RAW_PAYLOAD_WITH_NOISE = __webpack_exports__.RAW_PAYLOAD_WITH_NOISE;
327
- exports.UNCURATED_WIRE = __webpack_exports__.UNCURATED_WIRE;
328
- exports.USER_PROMPT_ATTACKS_WIRE = __webpack_exports__.USER_PROMPT_ATTACKS_WIRE;
329
- for(var __rspack_i in __webpack_exports__)if (-1 === [
330
- "ALL_BUILT_IN_WIRE",
331
- "BYO_WIRE",
332
- "HARMFUL_CONTENT_WIRE",
333
- "INTELLECTUAL_PROPERTY_WIRE",
334
- "LLM_AS_JUDGE_WIRE",
335
- "PII_DETECTION_WIRE",
336
- "PII_ENTITY_OPTIONS",
337
- "PROMPT_INJECTION_WIRE",
338
- "RAW_PAYLOAD_WITH_NOISE",
339
- "UNCURATED_WIRE",
340
- "USER_PROMPT_ATTACKS_WIRE"
341
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
342
- Object.defineProperty(exports, '__esModule', {
343
- value: true
344
- });