@uipath/apollo-react 3.54.1 → 3.55.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/AgentCanvas/AgentFlow.cjs +6 -1
- package/dist/canvas/components/AgentCanvas/AgentFlow.constants.cjs +5 -2
- package/dist/canvas/components/AgentCanvas/AgentFlow.constants.d.ts +2 -1
- package/dist/canvas/components/AgentCanvas/AgentFlow.constants.d.ts.map +1 -1
- package/dist/canvas/components/AgentCanvas/AgentFlow.constants.js +5 -2
- package/dist/canvas/components/AgentCanvas/AgentFlow.d.ts.map +1 -1
- package/dist/canvas/components/AgentCanvas/AgentFlow.js +6 -1
- package/dist/canvas/components/AgentCanvas/AgentFlow.stories.cjs +29 -0
- package/dist/canvas/components/AgentCanvas/AgentFlow.stories.d.ts.map +1 -1
- package/dist/canvas/components/AgentCanvas/AgentFlow.stories.js +29 -0
- package/dist/canvas/components/AgentCanvas/agent-flow.manifest.cjs +35 -1
- package/dist/canvas/components/AgentCanvas/agent-flow.manifest.d.ts +1 -0
- package/dist/canvas/components/AgentCanvas/agent-flow.manifest.d.ts.map +1 -1
- package/dist/canvas/components/AgentCanvas/agent-flow.manifest.js +33 -2
- package/dist/canvas/components/AgentCanvas/nodes/AgentNode.cjs +10 -4
- package/dist/canvas/components/AgentCanvas/nodes/AgentNode.d.ts +3 -1
- package/dist/canvas/components/AgentCanvas/nodes/AgentNode.d.ts.map +1 -1
- package/dist/canvas/components/AgentCanvas/nodes/AgentNode.js +10 -4
- package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.cjs +10 -2
- package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.d.ts.map +1 -1
- package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.js +11 -3
- package/dist/canvas/icons/A2aIcon.cjs +83 -0
- package/dist/canvas/icons/A2aIcon.d.ts +5 -0
- package/dist/canvas/icons/A2aIcon.d.ts.map +1 -0
- package/dist/canvas/icons/A2aIcon.js +49 -0
- package/dist/canvas/icons/index.cjs +6 -2
- package/dist/canvas/icons/index.d.ts +1 -0
- package/dist/canvas/icons/index.d.ts.map +1 -1
- package/dist/canvas/icons/index.js +2 -1
- package/dist/canvas/storybook-utils/mocks/resources.cjs +28 -0
- package/dist/canvas/storybook-utils/mocks/resources.d.ts +9 -1
- package/dist/canvas/storybook-utils/mocks/resources.d.ts.map +1 -1
- package/dist/canvas/storybook-utils/mocks/resources.js +26 -1
- package/dist/canvas/types.d.ts +21 -3
- package/dist/canvas/types.d.ts.map +1 -1
- package/dist/canvas/utils/auto-layout.cjs +4 -2
- package/dist/canvas/utils/auto-layout.d.ts.map +1 -1
- package/dist/canvas/utils/auto-layout.js +4 -2
- package/dist/canvas/utils/props-helpers.cjs +17 -2
- package/dist/canvas/utils/props-helpers.d.ts.map +1 -1
- package/dist/canvas/utils/props-helpers.js +17 -2
- package/dist/core/tokens/css/theme-variables.css +4 -4
- package/dist/core/tokens/scss/theme-variables.scss +4 -4
- package/package.json +3 -3
|
@@ -52,13 +52,14 @@ const getResourceNodeId = (resource)=>resource.id;
|
|
|
52
52
|
const normalizeToolName = (resource)=>{
|
|
53
53
|
if ('escalation' === resource.type) return `escalate_${resource.name.toLowerCase().replace(/\s/g, '_')}`;
|
|
54
54
|
if ('mcp' === resource.type) return `mcp_${resource.name.toLowerCase().replace(/\s/g, '_')}`;
|
|
55
|
+
if ('a2a' === resource.type) return `a2a_${resource.name.toLowerCase().replace(/\s/g, '_')}`;
|
|
55
56
|
return resource.name.replace(/\s+/g, '_');
|
|
56
57
|
};
|
|
57
58
|
const hasResourceStatus = (resource, spans, targetStatus)=>{
|
|
58
59
|
for (const span of spans){
|
|
59
60
|
const attributes = span.Attributes ? JSON.parse(span.Attributes) : null;
|
|
60
61
|
if (attributes) {
|
|
61
|
-
if ('context' === resource.type || 'escalation' === resource.type || 'tool' === resource.type || 'mcp' === resource.type) {
|
|
62
|
+
if ('context' === resource.type || 'escalation' === resource.type || 'tool' === resource.type || 'mcp' === resource.type || 'a2a' === resource.type) {
|
|
62
63
|
const normalizedToolName = normalizeToolName(resource);
|
|
63
64
|
if (attributes.toolName === normalizedToolName && span.Status === targetStatus) return true;
|
|
64
65
|
}
|
|
@@ -189,6 +190,13 @@ const createResourceNode = (resource, index, props, parentNodeId)=>{
|
|
|
189
190
|
type: 'memorySpace',
|
|
190
191
|
parentNodeId
|
|
191
192
|
});
|
|
193
|
+
case 'a2a':
|
|
194
|
+
return createBaseNode({
|
|
195
|
+
...baseData,
|
|
196
|
+
type: 'a2a',
|
|
197
|
+
projectId: resource.projectId,
|
|
198
|
+
parentNodeId
|
|
199
|
+
});
|
|
192
200
|
case 'escalation':
|
|
193
201
|
default:
|
|
194
202
|
return createBaseNode({
|
|
@@ -219,6 +227,9 @@ const calculateOptimalHandles = (agentNode, resourceNode)=>{
|
|
|
219
227
|
case 'mcp':
|
|
220
228
|
sourceHandle = AgentFlow_constants_cjs_namespaceObject.ResourceNodeType.Tool;
|
|
221
229
|
break;
|
|
230
|
+
case 'a2a':
|
|
231
|
+
sourceHandle = AgentFlow_constants_cjs_namespaceObject.ResourceNodeType.Tool;
|
|
232
|
+
break;
|
|
222
233
|
case 'memorySpace':
|
|
223
234
|
sourceHandle = AgentFlow_constants_cjs_namespaceObject.ResourceNodeType.MemorySpace;
|
|
224
235
|
break;
|
|
@@ -253,7 +264,11 @@ const createResourceEdge = (agentNode, resourceNode, props)=>{
|
|
|
253
264
|
};
|
|
254
265
|
const computeNodesAndEdges = (props, parentNodeId, existingNodes)=>{
|
|
255
266
|
const agentNode = createAgentNode(props, parentNodeId);
|
|
256
|
-
const filteredResources =
|
|
267
|
+
const filteredResources = props.resources.filter((resource)=>{
|
|
268
|
+
if ('mcp' === resource.type && false === props.enableMcpTools) return false;
|
|
269
|
+
if ('a2a' === resource.type && true !== props.enableA2a) return false;
|
|
270
|
+
return true;
|
|
271
|
+
});
|
|
257
272
|
const existingOrderMap = new Map();
|
|
258
273
|
let maxExistingOrder = -1;
|
|
259
274
|
if (existingNodes) for (const node of existingNodes){
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props-helpers.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/props-helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAUlB,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,iBAAiB,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"props-helpers.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/props-helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAUlB,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAiDtC,eAAO,MAAM,kBAAkB,GAAI,UAAU,iBAAiB,EAAE,OAAO,QAAQ,EAAE,KAAG,OAEnF,CAAC;AAGF,eAAO,MAAM,gBAAgB,GAAI,UAAU,iBAAiB,EAAE,OAAO,QAAQ,EAAE,KAAG,OAEjF,CAAC;AAGF,eAAO,MAAM,kBAAkB,GAAI,UAAU,iBAAiB,EAAE,OAAO,QAAQ,EAAE,KAAG,OAMnF,CAAC;AAqBF,eAAO,MAAM,aAAa,GAAI,OAAO,cAAc,EAAE,OAAO,QAAQ,EAAE,KAAG,OAExE,CAAC;AAGF,eAAO,MAAM,eAAe,GAAI,OAAO,cAAc,EAAE,OAAO,QAAQ,EAAE,KAAG,OAE1E,CAAC;AAGF,eAAO,MAAM,eAAe,GAAI,OAAO,cAAc,EAAE,OAAO,QAAQ,EAAE,KAAG,OAM1E,CAAC;AAGF,eAAO,MAAM,eAAe,GAAI,OAAO,QAAQ,EAAE,KAAG,OAYnD,CAAC;AA+KF,eAAO,MAAM,kBAAkB,GAC7B,WAAW,aAAa,EACxB,cAAc,qBAAqB,EACnC,OAAO,cAAc,KACpB,mBAqBF,CAAC;AAQF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,cAAc,EACrB,eAAe,MAAM,EACrB,gBAAgB,mBAAmB,EAAE,KACpC;IAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAAC,KAAK,EAAE,mBAAmB,EAAE,CAAA;CAmE9D,CAAC;AAWF,eAAO,MAAM,8BAA8B,GACzC,iBAAiB,wBAAwB,EACzC,OAAO,cAAc,EACrB,WAAW,aAAa,EACxB,mBAAmB,iBAAiB,EAAE,EACtC,gBAAgB,mBAAmB,EAAE,KACpC;IAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAAC,KAAK,EAAE,mBAAmB,EAAE,CAAA;CAqEhE,CAAC"}
|
|
@@ -13,13 +13,14 @@ const getResourceNodeId = (resource)=>resource.id;
|
|
|
13
13
|
const normalizeToolName = (resource)=>{
|
|
14
14
|
if ('escalation' === resource.type) return `escalate_${resource.name.toLowerCase().replace(/\s/g, '_')}`;
|
|
15
15
|
if ('mcp' === resource.type) return `mcp_${resource.name.toLowerCase().replace(/\s/g, '_')}`;
|
|
16
|
+
if ('a2a' === resource.type) return `a2a_${resource.name.toLowerCase().replace(/\s/g, '_')}`;
|
|
16
17
|
return resource.name.replace(/\s+/g, '_');
|
|
17
18
|
};
|
|
18
19
|
const hasResourceStatus = (resource, spans, targetStatus)=>{
|
|
19
20
|
for (const span of spans){
|
|
20
21
|
const attributes = span.Attributes ? JSON.parse(span.Attributes) : null;
|
|
21
22
|
if (attributes) {
|
|
22
|
-
if ('context' === resource.type || 'escalation' === resource.type || 'tool' === resource.type || 'mcp' === resource.type) {
|
|
23
|
+
if ('context' === resource.type || 'escalation' === resource.type || 'tool' === resource.type || 'mcp' === resource.type || 'a2a' === resource.type) {
|
|
23
24
|
const normalizedToolName = normalizeToolName(resource);
|
|
24
25
|
if (attributes.toolName === normalizedToolName && span.Status === targetStatus) return true;
|
|
25
26
|
}
|
|
@@ -150,6 +151,13 @@ const createResourceNode = (resource, index, props, parentNodeId)=>{
|
|
|
150
151
|
type: 'memorySpace',
|
|
151
152
|
parentNodeId
|
|
152
153
|
});
|
|
154
|
+
case 'a2a':
|
|
155
|
+
return createBaseNode({
|
|
156
|
+
...baseData,
|
|
157
|
+
type: 'a2a',
|
|
158
|
+
projectId: resource.projectId,
|
|
159
|
+
parentNodeId
|
|
160
|
+
});
|
|
153
161
|
case 'escalation':
|
|
154
162
|
default:
|
|
155
163
|
return createBaseNode({
|
|
@@ -180,6 +188,9 @@ const calculateOptimalHandles = (agentNode, resourceNode)=>{
|
|
|
180
188
|
case 'mcp':
|
|
181
189
|
sourceHandle = ResourceNodeType.Tool;
|
|
182
190
|
break;
|
|
191
|
+
case 'a2a':
|
|
192
|
+
sourceHandle = ResourceNodeType.Tool;
|
|
193
|
+
break;
|
|
183
194
|
case 'memorySpace':
|
|
184
195
|
sourceHandle = ResourceNodeType.MemorySpace;
|
|
185
196
|
break;
|
|
@@ -214,7 +225,11 @@ const createResourceEdge = (agentNode, resourceNode, props)=>{
|
|
|
214
225
|
};
|
|
215
226
|
const computeNodesAndEdges = (props, parentNodeId, existingNodes)=>{
|
|
216
227
|
const agentNode = createAgentNode(props, parentNodeId);
|
|
217
|
-
const filteredResources =
|
|
228
|
+
const filteredResources = props.resources.filter((resource)=>{
|
|
229
|
+
if ('mcp' === resource.type && false === props.enableMcpTools) return false;
|
|
230
|
+
if ('a2a' === resource.type && true !== props.enableA2a) return false;
|
|
231
|
+
return true;
|
|
232
|
+
});
|
|
218
233
|
const existingOrderMap = new Map();
|
|
219
234
|
let maxExistingOrder = -1;
|
|
220
235
|
if (existingNodes) for (const node of existingNodes){
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import "./variables.css";
|
|
2
2
|
|
|
3
|
-
body.light {
|
|
3
|
+
body.light, .light {
|
|
4
4
|
--color-background: #ffffff;
|
|
5
5
|
--color-background-secondary: #f4f5f7;
|
|
6
6
|
--color-background-inverse: #182027;
|
|
@@ -125,7 +125,7 @@ body.light {
|
|
|
125
125
|
color-scheme: light;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
body.light-hc {
|
|
128
|
+
body.light-hc, .light-hc {
|
|
129
129
|
--color-background: #ffffff;
|
|
130
130
|
--color-background-secondary: #f4f5f7;
|
|
131
131
|
--color-background-inverse: #182027;
|
|
@@ -250,7 +250,7 @@ body.light-hc {
|
|
|
250
250
|
color-scheme: light;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
body.dark {
|
|
253
|
+
body.dark, .dark {
|
|
254
254
|
--color-background: #182027;
|
|
255
255
|
--color-background-secondary: #273139;
|
|
256
256
|
--color-background-inverse: #f8f9fa;
|
|
@@ -375,7 +375,7 @@ body.dark {
|
|
|
375
375
|
color-scheme: dark;
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
-
body.dark-hc {
|
|
378
|
+
body.dark-hc, .dark-hc {
|
|
379
379
|
--color-background: #182027;
|
|
380
380
|
--color-background-secondary: #273139;
|
|
381
381
|
--color-background-inverse: #f8f9fa;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import "./variables";
|
|
2
2
|
|
|
3
|
-
body.light {
|
|
3
|
+
body.light, .light {
|
|
4
4
|
--color-background: #{$color-background-light};
|
|
5
5
|
--color-background-secondary: #{$color-background-secondary-light};
|
|
6
6
|
--color-background-inverse: #{$color-background-inverse-light};
|
|
@@ -125,7 +125,7 @@ body.light {
|
|
|
125
125
|
color-scheme: light;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
body.light-hc {
|
|
128
|
+
body.light-hc, .light-hc {
|
|
129
129
|
--color-background: #{$color-background-light-hc};
|
|
130
130
|
--color-background-secondary: #{$color-background-secondary-light-hc};
|
|
131
131
|
--color-background-inverse: #{$color-background-inverse-light-hc};
|
|
@@ -250,7 +250,7 @@ body.light-hc {
|
|
|
250
250
|
color-scheme: light;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
body.dark {
|
|
253
|
+
body.dark, .dark {
|
|
254
254
|
--color-background: #{$color-background-dark};
|
|
255
255
|
--color-background-secondary: #{$color-background-secondary-dark};
|
|
256
256
|
--color-background-inverse: #{$color-background-inverse-dark};
|
|
@@ -375,7 +375,7 @@ body.dark {
|
|
|
375
375
|
color-scheme: dark;
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
-
body.dark-hc {
|
|
378
|
+
body.dark-hc, .dark-hc {
|
|
379
379
|
--color-background: #{$color-background-dark-hc};
|
|
380
380
|
--color-background-secondary: #{$color-background-secondary-dark-hc};
|
|
381
381
|
--color-background-inverse: #{$color-background-inverse-dark-hc};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.55.0",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -200,8 +200,8 @@
|
|
|
200
200
|
"use-sync-external-store": "^1.2.0",
|
|
201
201
|
"zod": "^4.3.5",
|
|
202
202
|
"zustand": "^5.0.9",
|
|
203
|
-
"@uipath/apollo-core": "5.7.
|
|
204
|
-
"@uipath/apollo-wind": "0.15.
|
|
203
|
+
"@uipath/apollo-core": "5.7.3",
|
|
204
|
+
"@uipath/apollo-wind": "0.15.3"
|
|
205
205
|
},
|
|
206
206
|
"devDependencies": {
|
|
207
207
|
"@lingui/cli": "^5.6.1",
|