@atlaskit/rovo-agent-components 4.7.0 → 5.1.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 (25) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/cjs/ui/agent-avatar/generated-avatars/index.compiled.css +2 -1
  3. package/dist/cjs/ui/agent-avatar/generated-avatars/index.js +6 -3
  4. package/dist/cjs/ui/agent-identity/derive-agent-identity.js +13 -9
  5. package/dist/cjs/ui/agent-profile-info/index.js +20 -1
  6. package/dist/cjs/ui/agent-profile-info/messages.js +5 -0
  7. package/dist/es2019/ui/agent-avatar/generated-avatars/index.compiled.css +2 -1
  8. package/dist/es2019/ui/agent-avatar/generated-avatars/index.js +6 -3
  9. package/dist/es2019/ui/agent-identity/derive-agent-identity.js +13 -9
  10. package/dist/es2019/ui/agent-profile-info/index.js +20 -1
  11. package/dist/es2019/ui/agent-profile-info/messages.js +5 -0
  12. package/dist/esm/ui/agent-avatar/generated-avatars/index.compiled.css +2 -1
  13. package/dist/esm/ui/agent-avatar/generated-avatars/index.js +6 -3
  14. package/dist/esm/ui/agent-identity/derive-agent-identity.js +13 -9
  15. package/dist/esm/ui/agent-profile-info/index.js +20 -1
  16. package/dist/esm/ui/agent-profile-info/messages.js +5 -0
  17. package/dist/types/ui/agent-avatar/generated-avatars/index.d.ts +6 -2
  18. package/dist/types/ui/agent-identity/derive-agent-identity.d.ts +9 -7
  19. package/dist/types/ui/agent-profile-info/index.d.ts +1 -1
  20. package/dist/types/ui/agent-profile-info/messages.d.ts +5 -0
  21. package/dist/types-ts4.5/ui/agent-avatar/generated-avatars/index.d.ts +6 -2
  22. package/dist/types-ts4.5/ui/agent-identity/derive-agent-identity.d.ts +9 -7
  23. package/dist/types-ts4.5/ui/agent-profile-info/index.d.ts +1 -1
  24. package/dist/types-ts4.5/ui/agent-profile-info/messages.d.ts +5 -0
  25. package/package.json +6 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @atlaskit/rovo-agent-components
2
2
 
3
+ ## 5.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`2a6f508e4e6d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2a6f508e4e6d2) -
8
+ Hide Rovo logo, hide behaviour, and show 'Agent by …' for REMOTE_A2A agents on the agent profile
9
+ card and the browse agents modal view-agent panel.
10
+
11
+ ## 5.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - [`b0222d13caefe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b0222d13caefe) -
16
+ Replace `@typescript-eslint/no-explicit-any` suppressions with real types across
17
+ rovo-content-bridge and rovo-platform packages (TREX-1392).
18
+
19
+ Key changes:
20
+ - `rovo-content-bridge-api`: Replace `any` in `CommandConstructor`, type guards, handlers,
21
+ debugger, and desktop transport with `unknown`, typed event interfaces, and a new `WebContents`
22
+ interface.
23
+ - `rovo-content-bridge-api-commands`: Replace `any` fields with `SerializableValue` in chart,
24
+ Jira, and content commands.
25
+ - `rovo-playground`: Replace `any` in plugin config, settings store, and ADF utilities with
26
+ `unknown` and recursive typed nodes.
27
+ - `rovo-platform-ui-components`, `rovo-navigation`, `rovo-spaces`, `rovo-triggers`,
28
+ `rovo-agent-analytics`, `rovo-agent-components`, `rovo-chat-side-by-side-evaluation`,
29
+ `rovo-agent-debug-modal`: Replace remaining `any` occurrences with `unknown`, typed interfaces,
30
+ or properly inferred types.
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies
35
+
3
36
  ## 4.7.0
4
37
 
5
38
  ### Minor Changes
@@ -3,4 +3,5 @@
3
3
  ._1e0c1txw{display:flex}
4
4
  ._4cvr1h6o{align-items:center}
5
5
  ._4t3i1osq{height:100%}
6
- ._5ral1dfr{object-fit:cover}
6
+ ._5ral1dfr{object-fit:cover}
7
+ ._bfhk7qp0{background-color:var(--ds-background-accent-gray-subtler,#dddee1)}
@@ -18,7 +18,8 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
18
18
  var styles = {
19
19
  image: "_5ral1dfr _4t3i1osq _1bsb1osq _1e0c1txw _1bah1h6o _4cvr1h6o",
20
20
  banner: "_1bsb1osq",
21
- bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr"
21
+ bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr",
22
+ bannerRemoteA2A: "_bfhk7qp0"
22
23
  };
23
24
  var Observer = function Observer(_ref) {
24
25
  var onLoad = _ref.onLoad;
@@ -633,6 +634,7 @@ var AgentBanner = exports.AgentBanner = function AgentBanner(_ref4) {
633
634
  agentId = _ref4.agentId,
634
635
  agentIdentityAccountId = _ref4.agentIdentityAccountId,
635
636
  isRovoDev = _ref4.isRovoDev,
637
+ creatorType = _ref4.creatorType,
636
638
  height = _ref4.height,
637
639
  fillSpace = _ref4.fillSpace;
638
640
  var _getAvatarRender = getAvatarRender({
@@ -643,10 +645,11 @@ var AgentBanner = exports.AgentBanner = function AgentBanner(_ref4) {
643
645
  size: 'medium'
644
646
  }),
645
647
  color = _getAvatarRender.color;
648
+ var isRemoteA2A = (0, _platformFeatureFlags.fg)('jira_improve_agent_profile_for_a2a') && creatorType === 'REMOTE_A2A';
646
649
  return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
647
- xcss: (0, _css.cx)(styles.banner, fillSpace ? styles.bannerFillSpace : undefined),
650
+ xcss: (0, _css.cx)(styles.banner, fillSpace ? styles.bannerFillSpace : undefined, isRemoteA2A ? styles.bannerRemoteA2A : undefined),
648
651
  style: {
649
- backgroundColor: color.primary,
652
+ backgroundColor: isRemoteA2A ? undefined : color.primary,
650
653
  height: height ? "".concat(height, "px") : undefined
651
654
  }
652
655
  });
@@ -24,12 +24,12 @@ var _isForgeAgent = require("../../common/utils/is-forge-agent");
24
24
  * Derive `AgentAvatar` inputs and visible/accessible labels from raw identity.
25
25
  *
26
26
  * Behaviour:
27
- * - Specialist path (`agentId` is a non-empty string): visible text is the
28
- * supplied `agentName`, omitted entirely if absent (no "Rovo" text next to
29
- * a specialist avatar). Accessible label falls back to the agent id so the
30
- * avatar is never announced as "Rovo".
31
- * - Default Rovo path (no `agentId`): visible and accessible labels are the
32
- * localized default name (typically "Rovo").
27
+ * - Specialist path (`agentId` or `agentNamedId` is a non-empty string):
28
+ * visible text is the supplied `agentName`, omitted entirely if absent (no
29
+ * "Rovo" text next to a specialist avatar). Accessible label falls back to
30
+ * the UUID id, then named id, so the avatar is never announced as "Rovo".
31
+ * - Default Rovo path (no `agentId` or `agentNamedId`): visible and accessible
32
+ * labels are the localized default name (typically "Rovo").
33
33
  * - Forge identity props are gated internally via `rovo_agent_support_a2a_avatar`
34
34
  * so callers don't have to.
35
35
  */
@@ -45,21 +45,25 @@ function deriveAgentIdentity(_ref) {
45
45
  defaultName = _ref.defaultName;
46
46
  var trimmedAgentId = typeof agentId === 'string' ? agentId.trim() : undefined;
47
47
  var specialistAgentId = trimmedAgentId && trimmedAgentId.length > 0 ? trimmedAgentId : undefined;
48
+ var trimmedAgentNamedId = typeof agentNamedId === 'string' ? agentNamedId.trim() : undefined;
49
+ var specialistAgentNamedId = trimmedAgentNamedId && trimmedAgentNamedId.length > 0 ? trimmedAgentNamedId : undefined;
50
+ var specialistIdentity = specialistAgentId !== null && specialistAgentId !== void 0 ? specialistAgentId : specialistAgentNamedId;
48
51
  var trimmedAgentName = agentName === null || agentName === void 0 ? void 0 : agentName.trim();
49
- var visibleName = specialistAgentId ? trimmedAgentName || undefined : defaultName;
50
- var accessibleName = specialistAgentId ? trimmedAgentName || specialistAgentId : defaultName;
52
+ var visibleName = specialistIdentity ? trimmedAgentName || undefined : defaultName;
53
+ var accessibleName = specialistIdentity ? trimmedAgentName || specialistIdentity : defaultName;
51
54
  var a2aGateOn = (0, _platformFeatureFlags.fg)('rovo_agent_support_a2a_avatar');
52
55
 
53
56
  // Prefer the explicit override; otherwise validate creatorType via the
54
57
  // type guard so the call site doesn't need an unsafe cast.
55
58
  var isForgeAgent = isForgeAgentOverride !== undefined ? isForgeAgentOverride : creatorType && (0, _isAgentCreatorType.isAgentCreatorType)(creatorType) ? (0, _isForgeAgent.isForgeAgentByCreatorType)(creatorType) : undefined;
56
59
  return {
60
+ hasSpecialistIdentity: Boolean(specialistIdentity),
57
61
  specialistAgentId: specialistAgentId,
58
62
  visibleName: visibleName,
59
63
  accessibleName: accessibleName,
60
64
  avatarProps: {
61
65
  agentId: specialistAgentId,
62
- agentNamedId: agentNamedId,
66
+ agentNamedId: specialistAgentNamedId,
63
67
  agentIdentityAccountId: agentIdentityAccountId,
64
68
  imageUrl: imageUrl,
65
69
  isForgeAgent: a2aGateOn ? isForgeAgent : undefined,
@@ -42,7 +42,8 @@ var getAgentCreator = exports.getAgentCreator = function getAgentCreator(_ref) {
42
42
  if ((0, _platformFeatureFlags.fg)('rovo_agent_support_a2a_avatar') ? (0, _isForgeAgent.isForgeAgentByCreatorType)(creatorType) : creatorType === 'FORGE' || creatorType === 'THIRD_PARTY' // THIRD_PARTY is deprecated in convo-ai, use FORGE instead
43
43
  ) {
44
44
  return {
45
- type: 'FORGE',
45
+ // @todo: remove cast in rovo_agent_support_a2a_avatar cleanup
46
+ type: (0, _platformFeatureFlags.fg)('jira_improve_agent_profile_for_a2a') ? creatorType : 'FORGE',
46
47
  name: forgeCreator !== null && forgeCreator !== void 0 ? forgeCreator : ''
47
48
  };
48
49
  }
@@ -115,6 +116,11 @@ var AgentProfileCreator = exports.AgentProfileCreator = function AgentProfileCre
115
116
  }, creator.name, ' ', creator.status === 'inactive' && formatMessage(_messages.messages.agentDeactivated))
116
117
  });
117
118
  }
119
+ if (creator.type === 'REMOTE_A2A') {
120
+ return formatMessage(_messages.messages.remoteAgentCreatedBy, {
121
+ creatorNameWithLink: creator.name
122
+ });
123
+ }
118
124
 
119
125
  // THIRD_PARTY is deprecated in convo-ai, use FORGE instead
120
126
  if (creator.type === 'THIRD_PARTY' || creator.type === 'FORGE') {
@@ -125,6 +131,19 @@ var AgentProfileCreator = exports.AgentProfileCreator = function AgentProfileCre
125
131
  return null;
126
132
  };
127
133
  var creatorRender = getCreatorRender();
134
+ if ((0, _platformFeatureFlags.fg)('jira_improve_agent_profile_for_a2a')) {
135
+ var showRovoIcon = (creator === null || creator === void 0 ? void 0 : creator.type) !== 'REMOTE_A2A';
136
+ return creatorRender ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
137
+ xcss: styles.clickableItem
138
+ }, showRovoIcon ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
139
+ xcss: styles.rovoIconWrapper,
140
+ testId: "rovo-icon-wrapper",
141
+ "aria-hidden": "true"
142
+ }, /*#__PURE__*/_react.default.createElement(_logo.RovoIcon, {
143
+ appearance: "brand",
144
+ size: "small"
145
+ })) : null, creatorRender) : null;
146
+ }
128
147
  return creatorRender ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
129
148
  xcss: styles.clickableItem
130
149
  }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
@@ -11,6 +11,11 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
11
11
  defaultMessage: 'Rovo Agent by {creatorNameWithLink}',
12
12
  description: 'Message to show who created this Rovo agent'
13
13
  },
14
+ remoteAgentCreatedBy: {
15
+ id: 'ai-mate.agent-profile-info.agent-by',
16
+ defaultMessage: 'Agent by {creatorNameWithLink}',
17
+ description: 'Message to show who built a remote (third-party) agent, shown without the Rovo logo'
18
+ },
14
19
  agentDeactivated: {
15
20
  id: 'ai-mate.agent-profile-info.deactivated',
16
21
  defaultMessage: '(deactivated)',
@@ -3,4 +3,5 @@
3
3
  ._1e0c1txw{display:flex}
4
4
  ._4cvr1h6o{align-items:center}
5
5
  ._4t3i1osq{height:100%}
6
- ._5ral1dfr{object-fit:cover}
6
+ ._5ral1dfr{object-fit:cover}
7
+ ._bfhk7qp0{background-color:var(--ds-background-accent-gray-subtler,#dddee1)}
@@ -9,7 +9,8 @@ import { Box } from '@atlaskit/primitives/compiled';
9
9
  const styles = {
10
10
  image: "_5ral1dfr _4t3i1osq _1bsb1osq _1e0c1txw _1bah1h6o _4cvr1h6o",
11
11
  banner: "_1bsb1osq",
12
- bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr"
12
+ bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr",
13
+ bannerRemoteA2A: "_bfhk7qp0"
13
14
  };
14
15
  const Observer = ({
15
16
  onLoad
@@ -425,6 +426,7 @@ export const AgentBanner = ({
425
426
  agentId,
426
427
  agentIdentityAccountId,
427
428
  isRovoDev,
429
+ creatorType,
428
430
  height,
429
431
  fillSpace
430
432
  }) => {
@@ -437,10 +439,11 @@ export const AgentBanner = ({
437
439
  isRovoDev,
438
440
  size: 'medium'
439
441
  });
442
+ const isRemoteA2A = fg('jira_improve_agent_profile_for_a2a') && creatorType === 'REMOTE_A2A';
440
443
  return /*#__PURE__*/React.createElement(Box, {
441
- xcss: cx(styles.banner, fillSpace ? styles.bannerFillSpace : undefined),
444
+ xcss: cx(styles.banner, fillSpace ? styles.bannerFillSpace : undefined, isRemoteA2A ? styles.bannerRemoteA2A : undefined),
442
445
  style: {
443
- backgroundColor: color.primary,
446
+ backgroundColor: isRemoteA2A ? undefined : color.primary,
444
447
  height: height ? `${height}px` : undefined
445
448
  }
446
449
  });
@@ -19,12 +19,12 @@ import { isForgeAgentByCreatorType } from '../../common/utils/is-forge-agent';
19
19
  * Derive `AgentAvatar` inputs and visible/accessible labels from raw identity.
20
20
  *
21
21
  * Behaviour:
22
- * - Specialist path (`agentId` is a non-empty string): visible text is the
23
- * supplied `agentName`, omitted entirely if absent (no "Rovo" text next to
24
- * a specialist avatar). Accessible label falls back to the agent id so the
25
- * avatar is never announced as "Rovo".
26
- * - Default Rovo path (no `agentId`): visible and accessible labels are the
27
- * localized default name (typically "Rovo").
22
+ * - Specialist path (`agentId` or `agentNamedId` is a non-empty string):
23
+ * visible text is the supplied `agentName`, omitted entirely if absent (no
24
+ * "Rovo" text next to a specialist avatar). Accessible label falls back to
25
+ * the UUID id, then named id, so the avatar is never announced as "Rovo".
26
+ * - Default Rovo path (no `agentId` or `agentNamedId`): visible and accessible
27
+ * labels are the localized default name (typically "Rovo").
28
28
  * - Forge identity props are gated internally via `rovo_agent_support_a2a_avatar`
29
29
  * so callers don't have to.
30
30
  */
@@ -41,21 +41,25 @@ export function deriveAgentIdentity({
41
41
  }) {
42
42
  const trimmedAgentId = typeof agentId === 'string' ? agentId.trim() : undefined;
43
43
  const specialistAgentId = trimmedAgentId && trimmedAgentId.length > 0 ? trimmedAgentId : undefined;
44
+ const trimmedAgentNamedId = typeof agentNamedId === 'string' ? agentNamedId.trim() : undefined;
45
+ const specialistAgentNamedId = trimmedAgentNamedId && trimmedAgentNamedId.length > 0 ? trimmedAgentNamedId : undefined;
46
+ const specialistIdentity = specialistAgentId !== null && specialistAgentId !== void 0 ? specialistAgentId : specialistAgentNamedId;
44
47
  const trimmedAgentName = agentName === null || agentName === void 0 ? void 0 : agentName.trim();
45
- const visibleName = specialistAgentId ? trimmedAgentName || undefined : defaultName;
46
- const accessibleName = specialistAgentId ? trimmedAgentName || specialistAgentId : defaultName;
48
+ const visibleName = specialistIdentity ? trimmedAgentName || undefined : defaultName;
49
+ const accessibleName = specialistIdentity ? trimmedAgentName || specialistIdentity : defaultName;
47
50
  const a2aGateOn = fg('rovo_agent_support_a2a_avatar');
48
51
 
49
52
  // Prefer the explicit override; otherwise validate creatorType via the
50
53
  // type guard so the call site doesn't need an unsafe cast.
51
54
  const isForgeAgent = isForgeAgentOverride !== undefined ? isForgeAgentOverride : creatorType && isAgentCreatorType(creatorType) ? isForgeAgentByCreatorType(creatorType) : undefined;
52
55
  return {
56
+ hasSpecialistIdentity: Boolean(specialistIdentity),
53
57
  specialistAgentId,
54
58
  visibleName,
55
59
  accessibleName,
56
60
  avatarProps: {
57
61
  agentId: specialistAgentId,
58
- agentNamedId,
62
+ agentNamedId: specialistAgentNamedId,
59
63
  agentIdentityAccountId,
60
64
  imageUrl,
61
65
  isForgeAgent: a2aGateOn ? isForgeAgent : undefined,
@@ -36,7 +36,8 @@ export const getAgentCreator = ({
36
36
  if (fg('rovo_agent_support_a2a_avatar') ? isForgeAgentByCreatorType(creatorType) : creatorType === 'FORGE' || creatorType === 'THIRD_PARTY' // THIRD_PARTY is deprecated in convo-ai, use FORGE instead
37
37
  ) {
38
38
  return {
39
- type: 'FORGE',
39
+ // @todo: remove cast in rovo_agent_support_a2a_avatar cleanup
40
+ type: fg('jira_improve_agent_profile_for_a2a') ? creatorType : 'FORGE',
40
41
  name: forgeCreator !== null && forgeCreator !== void 0 ? forgeCreator : ''
41
42
  };
42
43
  }
@@ -109,6 +110,11 @@ export const AgentProfileCreator = ({
109
110
  }, creator.name, ' ', creator.status === 'inactive' && formatMessage(messages.agentDeactivated))
110
111
  });
111
112
  }
113
+ if (creator.type === 'REMOTE_A2A') {
114
+ return formatMessage(messages.remoteAgentCreatedBy, {
115
+ creatorNameWithLink: creator.name
116
+ });
117
+ }
112
118
 
113
119
  // THIRD_PARTY is deprecated in convo-ai, use FORGE instead
114
120
  if (creator.type === 'THIRD_PARTY' || creator.type === 'FORGE') {
@@ -119,6 +125,19 @@ export const AgentProfileCreator = ({
119
125
  return null;
120
126
  };
121
127
  const creatorRender = getCreatorRender();
128
+ if (fg('jira_improve_agent_profile_for_a2a')) {
129
+ const showRovoIcon = (creator === null || creator === void 0 ? void 0 : creator.type) !== 'REMOTE_A2A';
130
+ return creatorRender ? /*#__PURE__*/React.createElement(Box, {
131
+ xcss: styles.clickableItem
132
+ }, showRovoIcon ? /*#__PURE__*/React.createElement(Box, {
133
+ xcss: styles.rovoIconWrapper,
134
+ testId: "rovo-icon-wrapper",
135
+ "aria-hidden": "true"
136
+ }, /*#__PURE__*/React.createElement(RovoIcon, {
137
+ appearance: "brand",
138
+ size: "small"
139
+ })) : null, creatorRender) : null;
140
+ }
122
141
  return creatorRender ? /*#__PURE__*/React.createElement(Box, {
123
142
  xcss: styles.clickableItem
124
143
  }, /*#__PURE__*/React.createElement(Box, {
@@ -5,6 +5,11 @@ export const messages = defineMessages({
5
5
  defaultMessage: 'Rovo Agent by {creatorNameWithLink}',
6
6
  description: 'Message to show who created this Rovo agent'
7
7
  },
8
+ remoteAgentCreatedBy: {
9
+ id: 'ai-mate.agent-profile-info.agent-by',
10
+ defaultMessage: 'Agent by {creatorNameWithLink}',
11
+ description: 'Message to show who built a remote (third-party) agent, shown without the Rovo logo'
12
+ },
8
13
  agentDeactivated: {
9
14
  id: 'ai-mate.agent-profile-info.deactivated',
10
15
  defaultMessage: '(deactivated)',
@@ -3,4 +3,5 @@
3
3
  ._1e0c1txw{display:flex}
4
4
  ._4cvr1h6o{align-items:center}
5
5
  ._4t3i1osq{height:100%}
6
- ._5ral1dfr{object-fit:cover}
6
+ ._5ral1dfr{object-fit:cover}
7
+ ._bfhk7qp0{background-color:var(--ds-background-accent-gray-subtler,#dddee1)}
@@ -9,7 +9,8 @@ import { Box } from '@atlaskit/primitives/compiled';
9
9
  var styles = {
10
10
  image: "_5ral1dfr _4t3i1osq _1bsb1osq _1e0c1txw _1bah1h6o _4cvr1h6o",
11
11
  banner: "_1bsb1osq",
12
- bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr"
12
+ bannerFillSpace: "_1bsb1osq _4t3i1osq _5ral1dfr",
13
+ bannerRemoteA2A: "_bfhk7qp0"
13
14
  };
14
15
  var Observer = function Observer(_ref) {
15
16
  var onLoad = _ref.onLoad;
@@ -552,6 +553,7 @@ export var AgentBanner = function AgentBanner(_ref4) {
552
553
  agentId = _ref4.agentId,
553
554
  agentIdentityAccountId = _ref4.agentIdentityAccountId,
554
555
  isRovoDev = _ref4.isRovoDev,
556
+ creatorType = _ref4.creatorType,
555
557
  height = _ref4.height,
556
558
  fillSpace = _ref4.fillSpace;
557
559
  var _getAvatarRender = getAvatarRender({
@@ -562,10 +564,11 @@ export var AgentBanner = function AgentBanner(_ref4) {
562
564
  size: 'medium'
563
565
  }),
564
566
  color = _getAvatarRender.color;
567
+ var isRemoteA2A = fg('jira_improve_agent_profile_for_a2a') && creatorType === 'REMOTE_A2A';
565
568
  return /*#__PURE__*/React.createElement(Box, {
566
- xcss: cx(styles.banner, fillSpace ? styles.bannerFillSpace : undefined),
569
+ xcss: cx(styles.banner, fillSpace ? styles.bannerFillSpace : undefined, isRemoteA2A ? styles.bannerRemoteA2A : undefined),
567
570
  style: {
568
- backgroundColor: color.primary,
571
+ backgroundColor: isRemoteA2A ? undefined : color.primary,
569
572
  height: height ? "".concat(height, "px") : undefined
570
573
  }
571
574
  });
@@ -19,12 +19,12 @@ import { isForgeAgentByCreatorType } from '../../common/utils/is-forge-agent';
19
19
  * Derive `AgentAvatar` inputs and visible/accessible labels from raw identity.
20
20
  *
21
21
  * Behaviour:
22
- * - Specialist path (`agentId` is a non-empty string): visible text is the
23
- * supplied `agentName`, omitted entirely if absent (no "Rovo" text next to
24
- * a specialist avatar). Accessible label falls back to the agent id so the
25
- * avatar is never announced as "Rovo".
26
- * - Default Rovo path (no `agentId`): visible and accessible labels are the
27
- * localized default name (typically "Rovo").
22
+ * - Specialist path (`agentId` or `agentNamedId` is a non-empty string):
23
+ * visible text is the supplied `agentName`, omitted entirely if absent (no
24
+ * "Rovo" text next to a specialist avatar). Accessible label falls back to
25
+ * the UUID id, then named id, so the avatar is never announced as "Rovo".
26
+ * - Default Rovo path (no `agentId` or `agentNamedId`): visible and accessible
27
+ * labels are the localized default name (typically "Rovo").
28
28
  * - Forge identity props are gated internally via `rovo_agent_support_a2a_avatar`
29
29
  * so callers don't have to.
30
30
  */
@@ -40,21 +40,25 @@ export function deriveAgentIdentity(_ref) {
40
40
  defaultName = _ref.defaultName;
41
41
  var trimmedAgentId = typeof agentId === 'string' ? agentId.trim() : undefined;
42
42
  var specialistAgentId = trimmedAgentId && trimmedAgentId.length > 0 ? trimmedAgentId : undefined;
43
+ var trimmedAgentNamedId = typeof agentNamedId === 'string' ? agentNamedId.trim() : undefined;
44
+ var specialistAgentNamedId = trimmedAgentNamedId && trimmedAgentNamedId.length > 0 ? trimmedAgentNamedId : undefined;
45
+ var specialistIdentity = specialistAgentId !== null && specialistAgentId !== void 0 ? specialistAgentId : specialistAgentNamedId;
43
46
  var trimmedAgentName = agentName === null || agentName === void 0 ? void 0 : agentName.trim();
44
- var visibleName = specialistAgentId ? trimmedAgentName || undefined : defaultName;
45
- var accessibleName = specialistAgentId ? trimmedAgentName || specialistAgentId : defaultName;
47
+ var visibleName = specialistIdentity ? trimmedAgentName || undefined : defaultName;
48
+ var accessibleName = specialistIdentity ? trimmedAgentName || specialistIdentity : defaultName;
46
49
  var a2aGateOn = fg('rovo_agent_support_a2a_avatar');
47
50
 
48
51
  // Prefer the explicit override; otherwise validate creatorType via the
49
52
  // type guard so the call site doesn't need an unsafe cast.
50
53
  var isForgeAgent = isForgeAgentOverride !== undefined ? isForgeAgentOverride : creatorType && isAgentCreatorType(creatorType) ? isForgeAgentByCreatorType(creatorType) : undefined;
51
54
  return {
55
+ hasSpecialistIdentity: Boolean(specialistIdentity),
52
56
  specialistAgentId: specialistAgentId,
53
57
  visibleName: visibleName,
54
58
  accessibleName: accessibleName,
55
59
  avatarProps: {
56
60
  agentId: specialistAgentId,
57
- agentNamedId: agentNamedId,
61
+ agentNamedId: specialistAgentNamedId,
58
62
  agentIdentityAccountId: agentIdentityAccountId,
59
63
  imageUrl: imageUrl,
60
64
  isForgeAgent: a2aGateOn ? isForgeAgent : undefined,
@@ -35,7 +35,8 @@ export var getAgentCreator = function getAgentCreator(_ref) {
35
35
  if (fg('rovo_agent_support_a2a_avatar') ? isForgeAgentByCreatorType(creatorType) : creatorType === 'FORGE' || creatorType === 'THIRD_PARTY' // THIRD_PARTY is deprecated in convo-ai, use FORGE instead
36
36
  ) {
37
37
  return {
38
- type: 'FORGE',
38
+ // @todo: remove cast in rovo_agent_support_a2a_avatar cleanup
39
+ type: fg('jira_improve_agent_profile_for_a2a') ? creatorType : 'FORGE',
39
40
  name: forgeCreator !== null && forgeCreator !== void 0 ? forgeCreator : ''
40
41
  };
41
42
  }
@@ -108,6 +109,11 @@ export var AgentProfileCreator = function AgentProfileCreator(_ref2) {
108
109
  }, creator.name, ' ', creator.status === 'inactive' && formatMessage(messages.agentDeactivated))
109
110
  });
110
111
  }
112
+ if (creator.type === 'REMOTE_A2A') {
113
+ return formatMessage(messages.remoteAgentCreatedBy, {
114
+ creatorNameWithLink: creator.name
115
+ });
116
+ }
111
117
 
112
118
  // THIRD_PARTY is deprecated in convo-ai, use FORGE instead
113
119
  if (creator.type === 'THIRD_PARTY' || creator.type === 'FORGE') {
@@ -118,6 +124,19 @@ export var AgentProfileCreator = function AgentProfileCreator(_ref2) {
118
124
  return null;
119
125
  };
120
126
  var creatorRender = getCreatorRender();
127
+ if (fg('jira_improve_agent_profile_for_a2a')) {
128
+ var showRovoIcon = (creator === null || creator === void 0 ? void 0 : creator.type) !== 'REMOTE_A2A';
129
+ return creatorRender ? /*#__PURE__*/React.createElement(Box, {
130
+ xcss: styles.clickableItem
131
+ }, showRovoIcon ? /*#__PURE__*/React.createElement(Box, {
132
+ xcss: styles.rovoIconWrapper,
133
+ testId: "rovo-icon-wrapper",
134
+ "aria-hidden": "true"
135
+ }, /*#__PURE__*/React.createElement(RovoIcon, {
136
+ appearance: "brand",
137
+ size: "small"
138
+ })) : null, creatorRender) : null;
139
+ }
121
140
  return creatorRender ? /*#__PURE__*/React.createElement(Box, {
122
141
  xcss: styles.clickableItem
123
142
  }, /*#__PURE__*/React.createElement(Box, {
@@ -5,6 +5,11 @@ export var messages = defineMessages({
5
5
  defaultMessage: 'Rovo Agent by {creatorNameWithLink}',
6
6
  description: 'Message to show who created this Rovo agent'
7
7
  },
8
+ remoteAgentCreatedBy: {
9
+ id: 'ai-mate.agent-profile-info.agent-by',
10
+ defaultMessage: 'Agent by {creatorNameWithLink}',
11
+ description: 'Message to show who built a remote (third-party) agent, shown without the Rovo logo'
12
+ },
8
13
  agentDeactivated: {
9
14
  id: 'ai-mate.agent-profile-info.deactivated',
10
15
  defaultMessage: '(deactivated)',
@@ -1,4 +1,5 @@
1
1
  import { type SizeType } from '@atlaskit/avatar';
2
+ import type { AgentCreatorType } from '../../../common/types';
2
3
  export declare const yellowColor: {
3
4
  primary: string;
4
5
  secondary: string;
@@ -33,9 +34,12 @@ type GeneratedAvatarProps = {
33
34
  * cd002f25-46e4-4023-80ff-32e4d90849b4
34
35
  */
35
36
  export declare const getNumberIdForAvatar: ({ agentIdentityAccountId, agentId, }: Pick<GeneratedAvatarProps, "agentIdentityAccountId" | "agentId">) => number | null;
36
- export declare const AgentBanner: ({ agentNamedId, agentId, agentIdentityAccountId, isRovoDev, height, fillSpace, }: Pick<GeneratedAvatarProps, "agentId" | "agentNamedId" | "agentIdentityAccountId" | "isRovoDev"> & {
37
+ type AgentBannerCreatorType = AgentCreatorType | 'ROVO_DEV';
38
+ type AgentBannerProps = Pick<GeneratedAvatarProps, 'agentId' | 'agentNamedId' | 'agentIdentityAccountId' | 'isRovoDev'> & {
39
+ creatorType?: AgentBannerCreatorType | null;
37
40
  height?: number;
38
41
  fillSpace?: boolean;
39
- }) => JSX.Element;
42
+ };
43
+ export declare const AgentBanner: ({ agentNamedId, agentId, agentIdentityAccountId, isRovoDev, creatorType, height, fillSpace, }: AgentBannerProps) => JSX.Element;
40
44
  export declare const GeneratedAvatar: (props: GeneratedAvatarProps) => JSX.Element;
41
45
  export {};
@@ -28,7 +28,9 @@ export type AgentIdentityInput = {
28
28
  };
29
29
  /** Derived props ready to forward to AgentAvatar + the visible name slot. */
30
30
  export type DerivedAgentIdentity = {
31
- /** Non-empty agentId when on the specialist path; undefined otherwise. */
31
+ /** True when either UUID id or named id selects the specialist path. */
32
+ hasSpecialistIdentity: boolean;
33
+ /** Non-empty UUID agentId when available; undefined for namedId-only specialists. */
32
34
  specialistAgentId: string | undefined;
33
35
  /** Visible label to render in the hat's text slot, or undefined to omit. */
34
36
  visibleName: string | undefined;
@@ -48,12 +50,12 @@ export type DerivedAgentIdentity = {
48
50
  * Derive `AgentAvatar` inputs and visible/accessible labels from raw identity.
49
51
  *
50
52
  * Behaviour:
51
- * - Specialist path (`agentId` is a non-empty string): visible text is the
52
- * supplied `agentName`, omitted entirely if absent (no "Rovo" text next to
53
- * a specialist avatar). Accessible label falls back to the agent id so the
54
- * avatar is never announced as "Rovo".
55
- * - Default Rovo path (no `agentId`): visible and accessible labels are the
56
- * localized default name (typically "Rovo").
53
+ * - Specialist path (`agentId` or `agentNamedId` is a non-empty string):
54
+ * visible text is the supplied `agentName`, omitted entirely if absent (no
55
+ * "Rovo" text next to a specialist avatar). Accessible label falls back to
56
+ * the UUID id, then named id, so the avatar is never announced as "Rovo".
57
+ * - Default Rovo path (no `agentId` or `agentNamedId`): visible and accessible
58
+ * labels are the localized default name (typically "Rovo").
57
59
  * - Forge identity props are gated internally via `rovo_agent_support_a2a_avatar`
58
60
  * so callers don't have to.
59
61
  */
@@ -11,7 +11,7 @@ type AgentCreator = {
11
11
  } | {
12
12
  type: 'SYSTEM';
13
13
  } | {
14
- type: 'THIRD_PARTY' | 'FORGE';
14
+ type: 'THIRD_PARTY' | 'FORGE' | 'REMOTE_A2A';
15
15
  name: string;
16
16
  } | {
17
17
  type: 'OOTB';
@@ -4,6 +4,11 @@ export declare const messages: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ remoteAgentCreatedBy: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  agentDeactivated: {
8
13
  id: string;
9
14
  defaultMessage: string;
@@ -1,4 +1,5 @@
1
1
  import { type SizeType } from '@atlaskit/avatar';
2
+ import type { AgentCreatorType } from '../../../common/types';
2
3
  export declare const yellowColor: {
3
4
  primary: string;
4
5
  secondary: string;
@@ -33,9 +34,12 @@ type GeneratedAvatarProps = {
33
34
  * cd002f25-46e4-4023-80ff-32e4d90849b4
34
35
  */
35
36
  export declare const getNumberIdForAvatar: ({ agentIdentityAccountId, agentId, }: Pick<GeneratedAvatarProps, "agentIdentityAccountId" | "agentId">) => number | null;
36
- export declare const AgentBanner: ({ agentNamedId, agentId, agentIdentityAccountId, isRovoDev, height, fillSpace, }: Pick<GeneratedAvatarProps, "agentId" | "agentNamedId" | "agentIdentityAccountId" | "isRovoDev"> & {
37
+ type AgentBannerCreatorType = AgentCreatorType | 'ROVO_DEV';
38
+ type AgentBannerProps = Pick<GeneratedAvatarProps, 'agentId' | 'agentNamedId' | 'agentIdentityAccountId' | 'isRovoDev'> & {
39
+ creatorType?: AgentBannerCreatorType | null;
37
40
  height?: number;
38
41
  fillSpace?: boolean;
39
- }) => JSX.Element;
42
+ };
43
+ export declare const AgentBanner: ({ agentNamedId, agentId, agentIdentityAccountId, isRovoDev, creatorType, height, fillSpace, }: AgentBannerProps) => JSX.Element;
40
44
  export declare const GeneratedAvatar: (props: GeneratedAvatarProps) => JSX.Element;
41
45
  export {};
@@ -28,7 +28,9 @@ export type AgentIdentityInput = {
28
28
  };
29
29
  /** Derived props ready to forward to AgentAvatar + the visible name slot. */
30
30
  export type DerivedAgentIdentity = {
31
- /** Non-empty agentId when on the specialist path; undefined otherwise. */
31
+ /** True when either UUID id or named id selects the specialist path. */
32
+ hasSpecialistIdentity: boolean;
33
+ /** Non-empty UUID agentId when available; undefined for namedId-only specialists. */
32
34
  specialistAgentId: string | undefined;
33
35
  /** Visible label to render in the hat's text slot, or undefined to omit. */
34
36
  visibleName: string | undefined;
@@ -48,12 +50,12 @@ export type DerivedAgentIdentity = {
48
50
  * Derive `AgentAvatar` inputs and visible/accessible labels from raw identity.
49
51
  *
50
52
  * Behaviour:
51
- * - Specialist path (`agentId` is a non-empty string): visible text is the
52
- * supplied `agentName`, omitted entirely if absent (no "Rovo" text next to
53
- * a specialist avatar). Accessible label falls back to the agent id so the
54
- * avatar is never announced as "Rovo".
55
- * - Default Rovo path (no `agentId`): visible and accessible labels are the
56
- * localized default name (typically "Rovo").
53
+ * - Specialist path (`agentId` or `agentNamedId` is a non-empty string):
54
+ * visible text is the supplied `agentName`, omitted entirely if absent (no
55
+ * "Rovo" text next to a specialist avatar). Accessible label falls back to
56
+ * the UUID id, then named id, so the avatar is never announced as "Rovo".
57
+ * - Default Rovo path (no `agentId` or `agentNamedId`): visible and accessible
58
+ * labels are the localized default name (typically "Rovo").
57
59
  * - Forge identity props are gated internally via `rovo_agent_support_a2a_avatar`
58
60
  * so callers don't have to.
59
61
  */
@@ -11,7 +11,7 @@ type AgentCreator = {
11
11
  } | {
12
12
  type: 'SYSTEM';
13
13
  } | {
14
- type: 'THIRD_PARTY' | 'FORGE';
14
+ type: 'THIRD_PARTY' | 'FORGE' | 'REMOTE_A2A';
15
15
  name: string;
16
16
  } | {
17
17
  type: 'OOTB';
@@ -4,6 +4,11 @@ export declare const messages: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ remoteAgentCreatedBy: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  agentDeactivated: {
8
13
  id: string;
9
14
  defaultMessage: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-components",
3
- "version": "4.7.0",
3
+ "version": "5.1.0",
4
4
  "description": "This package host public components related to rovo agents, the components here are needed for other public atlaskit packages",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-monorepo",
6
6
  "atlassian": {
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/avatar": "^25.15.0",
45
45
  "@atlaskit/button": "^23.11.0",
46
46
  "@atlaskit/css": "^0.19.0",
47
- "@atlaskit/dropdown-menu": "^16.9.0",
47
+ "@atlaskit/dropdown-menu": "^16.10.0",
48
48
  "@atlaskit/flag": "^17.12.0",
49
49
  "@atlaskit/heading": "^5.4.0",
50
50
  "@atlaskit/icon": "^35.3.0",
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/logo": "^20.1.0",
53
53
  "@atlaskit/platform-feature-flags": "^1.1.0",
54
54
  "@atlaskit/primitives": "^19.0.0",
55
- "@atlaskit/rovo-agent-analytics": "^1.10.0",
55
+ "@atlaskit/rovo-agent-analytics": "^2.0.0",
56
56
  "@atlaskit/skeleton": "^2.1.0",
57
57
  "@atlaskit/spinner": "^19.1.0",
58
58
  "@atlaskit/tokens": "^13.1.0",
@@ -137,6 +137,9 @@
137
137
  "rovo_agent_support_a2a_avatar": {
138
138
  "type": "boolean"
139
139
  },
140
+ "jira_improve_agent_profile_for_a2a": {
141
+ "type": "boolean"
142
+ },
140
143
  "jira_browse_agents_modal": {
141
144
  "type": "boolean"
142
145
  }