@atlaskit/rovo-agent-components 4.7.0 → 5.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @atlaskit/rovo-agent-components
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`b0222d13caefe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b0222d13caefe) -
8
+ Replace `@typescript-eslint/no-explicit-any` suppressions with real types across
9
+ rovo-content-bridge and rovo-platform packages (TREX-1392).
10
+
11
+ Key changes:
12
+ - `rovo-content-bridge-api`: Replace `any` in `CommandConstructor`, type guards, handlers,
13
+ debugger, and desktop transport with `unknown`, typed event interfaces, and a new `WebContents`
14
+ interface.
15
+ - `rovo-content-bridge-api-commands`: Replace `any` fields with `SerializableValue` in chart,
16
+ Jira, and content commands.
17
+ - `rovo-playground`: Replace `any` in plugin config, settings store, and ADF utilities with
18
+ `unknown` and recursive typed nodes.
19
+ - `rovo-platform-ui-components`, `rovo-navigation`, `rovo-spaces`, `rovo-triggers`,
20
+ `rovo-agent-analytics`, `rovo-agent-components`, `rovo-chat-side-by-side-evaluation`,
21
+ `rovo-agent-debug-modal`: Replace remaining `any` occurrences with `unknown`, typed interfaces,
22
+ or properly inferred types.
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies
27
+
3
28
  ## 4.7.0
4
29
 
5
30
  ### Minor Changes
@@ -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,
@@ -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,
@@ -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,
@@ -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
  */
@@ -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
  */
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.0.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",