@atlaskit/rovo-agent-components 3.38.1 → 3.40.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 (55) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/common/utils/is-forge-agent/package.json +17 -0
  3. package/dist/cjs/common/ui/agent-chat-icon/index.js +1 -1
  4. package/dist/cjs/common/ui/chat-pill/index.js +1 -1
  5. package/dist/cjs/common/ui/link-icon-button/index.js +1 -1
  6. package/dist/cjs/common/ui/star-icon-button/index.js +1 -1
  7. package/dist/cjs/common/utils/is-forge-agent.js +10 -0
  8. package/dist/cjs/ui/agent-avatar/agent-avatar-skeleton/index.js +1 -1
  9. package/dist/cjs/ui/agent-avatar/generated-avatars/index.js +1 -1
  10. package/dist/cjs/ui/agent-avatar/index.js +2 -6
  11. package/dist/cjs/ui/agent-conversation-starters/index.js +1 -1
  12. package/dist/cjs/ui/agent-dropdown-menu/index.js +1 -1
  13. package/dist/cjs/ui/agent-menu-item-skeleton/index.js +1 -1
  14. package/dist/cjs/ui/agent-name-side-nav/index.js +1 -1
  15. package/dist/cjs/ui/agent-profile-info/agent-star-count/index.js +1 -1
  16. package/dist/cjs/ui/agent-profile-info/index.js +3 -3
  17. package/dist/cjs/ui/agent-verification-dropdown-item/index.js +25 -8
  18. package/dist/cjs/ui/agent-verified/index.js +1 -1
  19. package/dist/es2019/common/ui/agent-chat-icon/index.js +1 -1
  20. package/dist/es2019/common/ui/chat-pill/index.js +1 -1
  21. package/dist/es2019/common/ui/link-icon-button/index.js +1 -1
  22. package/dist/es2019/common/ui/star-icon-button/index.js +1 -1
  23. package/dist/es2019/common/utils/is-forge-agent.js +2 -0
  24. package/dist/es2019/ui/agent-avatar/agent-avatar-skeleton/index.js +1 -1
  25. package/dist/es2019/ui/agent-avatar/generated-avatars/index.js +1 -1
  26. package/dist/es2019/ui/agent-avatar/index.js +2 -4
  27. package/dist/es2019/ui/agent-conversation-starters/index.js +1 -1
  28. package/dist/es2019/ui/agent-dropdown-menu/index.js +1 -1
  29. package/dist/es2019/ui/agent-menu-item-skeleton/index.js +1 -1
  30. package/dist/es2019/ui/agent-name-side-nav/index.js +1 -1
  31. package/dist/es2019/ui/agent-profile-info/agent-star-count/index.js +1 -1
  32. package/dist/es2019/ui/agent-profile-info/index.js +2 -2
  33. package/dist/es2019/ui/agent-verification-dropdown-item/index.js +26 -9
  34. package/dist/es2019/ui/agent-verified/index.js +1 -1
  35. package/dist/esm/common/ui/agent-chat-icon/index.js +1 -1
  36. package/dist/esm/common/ui/chat-pill/index.js +1 -1
  37. package/dist/esm/common/ui/link-icon-button/index.js +1 -1
  38. package/dist/esm/common/ui/star-icon-button/index.js +1 -1
  39. package/dist/esm/common/utils/is-forge-agent.js +4 -0
  40. package/dist/esm/ui/agent-avatar/agent-avatar-skeleton/index.js +1 -1
  41. package/dist/esm/ui/agent-avatar/generated-avatars/index.js +1 -1
  42. package/dist/esm/ui/agent-avatar/index.js +1 -5
  43. package/dist/esm/ui/agent-conversation-starters/index.js +1 -1
  44. package/dist/esm/ui/agent-dropdown-menu/index.js +1 -1
  45. package/dist/esm/ui/agent-menu-item-skeleton/index.js +1 -1
  46. package/dist/esm/ui/agent-name-side-nav/index.js +1 -1
  47. package/dist/esm/ui/agent-profile-info/agent-star-count/index.js +1 -1
  48. package/dist/esm/ui/agent-profile-info/index.js +2 -2
  49. package/dist/esm/ui/agent-verification-dropdown-item/index.js +26 -9
  50. package/dist/esm/ui/agent-verified/index.js +1 -1
  51. package/dist/types/common/utils/is-forge-agent.d.ts +2 -0
  52. package/dist/types/ui/agent-avatar/index.d.ts +0 -2
  53. package/dist/types-ts4.5/common/utils/is-forge-agent.d.ts +2 -0
  54. package/dist/types-ts4.5/ui/agent-avatar/index.d.ts +0 -2
  55. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @atlaskit/rovo-agent-components
2
2
 
3
+ ## 3.40.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`e4034958fc116`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e4034958fc116) -
8
+ Adjust event tracking for agent analytics to use new trackAgentEvent() method. Remove deprecated
9
+ trackAgentAction() export and exported action const enums
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 3.39.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [`e72179b379afd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e72179b379afd) -
20
+ Update isForgeAgentByCreatorType import
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
3
26
  ## 3.38.1
4
27
 
5
28
  ### Patch Changes
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/rovo-agent-components/common/utils/is-forge-agent",
3
+ "main": "../../../dist/cjs/common/utils/is-forge-agent.js",
4
+ "module": "../../../dist/esm/common/utils/is-forge-agent.js",
5
+ "module:es2019": "../../../dist/es2019/common/utils/is-forge-agent.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../../../dist/types/common/utils/is-forge-agent.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../../../dist/types-ts4.5/common/utils/is-forge-agent.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isForgeAgentByCreatorType = void 0;
7
+ // BE will deprecate THIRD_PARTY and use FORGE instead
8
+ var isForgeAgentByCreatorType = exports.isForgeAgentByCreatorType = function isForgeAgentByCreatorType(creatorType) {
9
+ return creatorType === 'THIRD_PARTY' || creatorType === 'FORGE' || creatorType === 'REMOTE_A2A';
10
+ };
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -6,7 +6,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
6
6
  Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
- exports.isForgeAgentByCreatorType = exports.AgentAvatar = exports.AGENT_AVATAR_CLIP_PATH = void 0;
9
+ exports.AgentAvatar = exports.AGENT_AVATAR_CLIP_PATH = void 0;
10
10
  require("./index.compiled.css");
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _runtime = require("@compiled/react/runtime");
@@ -85,8 +85,4 @@ var AgentAvatar = exports.AgentAvatar = function AgentAvatar(_ref) {
85
85
  isRovoDev: isRovoDev,
86
86
  size: size
87
87
  }))));
88
- };
89
- // BE will deprecate THIRD_PARTY and use FORGE instead
90
- var isForgeAgentByCreatorType = exports.isForgeAgentByCreatorType = function isForgeAgentByCreatorType(creatorType) {
91
- return creatorType === 'THIRD_PARTY' || creatorType === 'FORGE' || creatorType === 'REMOTE_A2A';
92
88
  };
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -19,7 +19,7 @@ var _skeleton = _interopRequireDefault(require("@atlaskit/skeleton"));
19
19
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
20
20
  var _hiddenIcon = require("../../common/ui/hidden-icon");
21
21
  var _starIconButton = require("../../common/ui/star-icon-button");
22
- var _agentAvatar = require("../agent-avatar");
22
+ var _isForgeAgent = require("../../common/utils/is-forge-agent");
23
23
  var _messages = require("./messages");
24
24
  var styles = {
25
25
  clickableItem: "_zulp1b66 _1e0c1txw _4cvr1h6o",
@@ -39,7 +39,7 @@ var getAgentCreator = exports.getAgentCreator = function getAgentCreator(_ref) {
39
39
  type: 'SYSTEM'
40
40
  };
41
41
  }
42
- if ((0, _platformFeatureFlags.fg)('rovo_agent_support_a2a_avatar') ? (0, _agentAvatar.isForgeAgentByCreatorType)(creatorType) : creatorType === 'FORGE' || creatorType === 'THIRD_PARTY' // THIRD_PARTY is deprecated in convo-ai, use FORGE instead
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
45
  type: 'FORGE',
@@ -47,8 +47,7 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
47
47
  agentId: agentId,
48
48
  isAbleToGovernAgents: isAbleToGovernAgents
49
49
  }),
50
- trackAgentAction = _useRovoAgentActionAn.trackAgentAction,
51
- trackAgentActionError = _useRovoAgentActionAn.trackAgentActionError;
50
+ trackAgentEvent = _useRovoAgentActionAn.trackAgentEvent;
52
51
  var _useMutation = (0, _reactRelay.useMutation)(_agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation2.default),
53
52
  _useMutation2 = (0, _slicedToArray2.default)(_useMutation, 2),
54
53
  commitUpdateVerification = _useMutation2[0],
@@ -80,7 +79,11 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
80
79
  var payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
81
80
  if (payload !== null && payload !== void 0 && payload.success) {
82
81
  onVerificationSuccess === null || onVerificationSuccess === void 0 || onVerificationSuccess(verified);
83
- trackAgentAction(verified ? _actions.AgentCommonActions.VERIFY : _actions.AgentCommonActions.UNVERIFY, {});
82
+ trackAgentEvent({
83
+ action: verified ? 'verify' : 'unverify',
84
+ actionSubject: 'rovoAgent',
85
+ attributes: {}
86
+ });
84
87
  showFlag({
85
88
  title: formatMessage(verified ? _messages.default.verifySuccessTitle : _messages.default.unverifySuccessTitle),
86
89
  appearance: 'success',
@@ -94,21 +97,35 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
94
97
  var _payload$errors;
95
98
  var errorMessage = payload === null || payload === void 0 || (_payload$errors = payload.errors) === null || _payload$errors === void 0 || (_payload$errors = _payload$errors[0]) === null || _payload$errors === void 0 ? void 0 : _payload$errors.message;
96
99
  if (errorMessage) {
97
- trackAgentActionError(verified ? _actions.AgentCommonActions.VERIFY : _actions.AgentCommonActions.UNVERIFY, new Error(errorMessage), {
98
- agentId: agentId
100
+ trackAgentEvent({
101
+ action: verified ? 'verify' : 'unverify',
102
+ actionSubject: 'rovoAgentError',
103
+ attributes: {
104
+ agentId: agentId,
105
+ error: {
106
+ message: errorMessage
107
+ }
108
+ }
99
109
  });
100
110
  handleError(verified, errorMessage);
101
111
  }
102
112
  }
103
113
  },
104
114
  onError: function onError(error) {
105
- trackAgentActionError(verified ? _actions.AgentCommonActions.VERIFY : _actions.AgentCommonActions.UNVERIFY, error, {
106
- agentId: agentId
115
+ trackAgentEvent({
116
+ action: verified ? 'verify' : 'unverify',
117
+ actionSubject: 'rovoAgentError',
118
+ attributes: {
119
+ agentId: agentId,
120
+ error: {
121
+ message: error.message
122
+ }
123
+ }
107
124
  });
108
125
  handleError(verified, error.message);
109
126
  }
110
127
  });
111
- }, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentAction, trackAgentActionError]);
128
+ }, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentEvent]);
112
129
  var labelText = formatMessage(isVerified ? _messages.default.unverifyAgentLabel : _messages.default.verifyAgentLabel);
113
130
  var handleOnClick = function handleOnClick() {
114
131
  return handleUpdateVerification(!isVerified);
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./index.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./index.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -0,0 +1,2 @@
1
+ // BE will deprecate THIRD_PARTY and use FORGE instead
2
+ export const isForgeAgentByCreatorType = creatorType => creatorType === 'THIRD_PARTY' || creatorType === 'FORGE' || creatorType === 'REMOTE_A2A';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { AVATAR_SIZES } from '@atlaskit/avatar';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { lazy, Suspense, useEffect } from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -77,6 +77,4 @@ export const AgentAvatar = ({
77
77
  isRovoDev: isRovoDev,
78
78
  size: size
79
79
  }))));
80
- };
81
- // BE will deprecate THIRD_PARTY and use FORGE instead
82
- export const isForgeAgentByCreatorType = creatorType => creatorType === 'THIRD_PARTY' || creatorType === 'FORGE' || creatorType === 'REMOTE_A2A';
80
+ };
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./index.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./index.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -12,7 +12,7 @@ import Skeleton from '@atlaskit/skeleton';
12
12
  import Tooltip from '@atlaskit/tooltip';
13
13
  import { HiddenIcon } from '../../common/ui/hidden-icon';
14
14
  import { StarIconButton } from '../../common/ui/star-icon-button';
15
- import { isForgeAgentByCreatorType } from '../agent-avatar';
15
+ import { isForgeAgentByCreatorType } from '../../common/utils/is-forge-agent';
16
16
  import { messages } from './messages';
17
17
  const styles = {
18
18
  clickableItem: "_zulp1b66 _1e0c1txw _4cvr1h6o",
@@ -8,7 +8,7 @@ import { DropdownItem } from '@atlaskit/dropdown-menu';
8
8
  import { useFlags } from '@atlaskit/flag';
9
9
  import ErrorIcon from '@atlaskit/icon/core/status-error';
10
10
  import SuccessIcon from '@atlaskit/icon/core/status-success';
11
- import { AgentCommonActions, useRovoAgentActionAnalytics } from '@atlaskit/rovo-agent-analytics/actions';
11
+ import { useRovoAgentActionAnalytics } from '@atlaskit/rovo-agent-analytics/actions';
12
12
  import messages from './messages';
13
13
  /**
14
14
  * A dropdown item for verifying or unverifying an agent.
@@ -36,8 +36,7 @@ export const AgentVerificationDropdownItem = ({
36
36
  const isVerified = (_agentData$isVerified = agentData === null || agentData === void 0 ? void 0 : agentData.isVerified) !== null && _agentData$isVerified !== void 0 ? _agentData$isVerified : false;
37
37
  const agentId = agentData === null || agentData === void 0 ? void 0 : agentData.id;
38
38
  const {
39
- trackAgentAction,
40
- trackAgentActionError
39
+ trackAgentEvent
41
40
  } = useRovoAgentActionAnalytics({
42
41
  touchPoint: 'agent-verification-dropdown-item',
43
42
  agentId,
@@ -71,7 +70,11 @@ export const AgentVerificationDropdownItem = ({
71
70
  const payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
72
71
  if (payload !== null && payload !== void 0 && payload.success) {
73
72
  onVerificationSuccess === null || onVerificationSuccess === void 0 ? void 0 : onVerificationSuccess(verified);
74
- trackAgentAction(verified ? AgentCommonActions.VERIFY : AgentCommonActions.UNVERIFY, {});
73
+ trackAgentEvent({
74
+ action: verified ? 'verify' : 'unverify',
75
+ actionSubject: 'rovoAgent',
76
+ attributes: {}
77
+ });
75
78
  showFlag({
76
79
  title: formatMessage(verified ? messages.verifySuccessTitle : messages.unverifySuccessTitle),
77
80
  appearance: 'success',
@@ -85,21 +88,35 @@ export const AgentVerificationDropdownItem = ({
85
88
  var _payload$errors, _payload$errors$;
86
89
  const errorMessage = payload === null || payload === void 0 ? void 0 : (_payload$errors = payload.errors) === null || _payload$errors === void 0 ? void 0 : (_payload$errors$ = _payload$errors[0]) === null || _payload$errors$ === void 0 ? void 0 : _payload$errors$.message;
87
90
  if (errorMessage) {
88
- trackAgentActionError(verified ? AgentCommonActions.VERIFY : AgentCommonActions.UNVERIFY, new Error(errorMessage), {
89
- agentId
91
+ trackAgentEvent({
92
+ action: verified ? 'verify' : 'unverify',
93
+ actionSubject: 'rovoAgentError',
94
+ attributes: {
95
+ agentId,
96
+ error: {
97
+ message: errorMessage
98
+ }
99
+ }
90
100
  });
91
101
  handleError(verified, errorMessage);
92
102
  }
93
103
  }
94
104
  },
95
105
  onError: error => {
96
- trackAgentActionError(verified ? AgentCommonActions.VERIFY : AgentCommonActions.UNVERIFY, error, {
97
- agentId
106
+ trackAgentEvent({
107
+ action: verified ? 'verify' : 'unverify',
108
+ actionSubject: 'rovoAgentError',
109
+ attributes: {
110
+ agentId,
111
+ error: {
112
+ message: error.message
113
+ }
114
+ }
98
115
  });
99
116
  handleError(verified, error.message);
100
117
  }
101
118
  });
102
- }, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentAction, trackAgentActionError]);
119
+ }, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentEvent]);
103
120
  const labelText = formatMessage(isVerified ? messages.unverifyAgentLabel : messages.verifyAgentLabel);
104
121
  const handleOnClick = () => handleUpdateVerification(!isVerified);
105
122
  if (
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import _agentVerified_AtlaskitRovoAgentComponents from "./__generated__/agentVerified_AtlaskitRovoAgentComponents.graphql";
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["children", "whiteSpacePreWrap", "renderIcon"];
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./index.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./index.compiled.css";
4
4
  import * as React from 'react';
@@ -0,0 +1,4 @@
1
+ // BE will deprecate THIRD_PARTY and use FORGE instead
2
+ export var isForgeAgentByCreatorType = function isForgeAgentByCreatorType(creatorType) {
3
+ return creatorType === 'THIRD_PARTY' || creatorType === 'FORGE' || creatorType === 'REMOTE_A2A';
4
+ };
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { AVATAR_SIZES } from '@atlaskit/avatar';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { lazy, Suspense, useEffect } from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import "./index.compiled.css";
4
4
  import * as React from 'react';
@@ -76,8 +76,4 @@ export var AgentAvatar = function AgentAvatar(_ref) {
76
76
  isRovoDev: isRovoDev,
77
77
  size: size
78
78
  }))));
79
- };
80
- // BE will deprecate THIRD_PARTY and use FORGE instead
81
- export var isForgeAgentByCreatorType = function isForgeAgentByCreatorType(creatorType) {
82
- return creatorType === 'THIRD_PARTY' || creatorType === 'FORGE' || creatorType === 'REMOTE_A2A';
83
79
  };
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -12,7 +12,7 @@ import Skeleton from '@atlaskit/skeleton';
12
12
  import Tooltip from '@atlaskit/tooltip';
13
13
  import { HiddenIcon } from '../../common/ui/hidden-icon';
14
14
  import { StarIconButton } from '../../common/ui/star-icon-button';
15
- import { isForgeAgentByCreatorType } from '../agent-avatar';
15
+ import { isForgeAgentByCreatorType } from '../../common/utils/is-forge-agent';
16
16
  import { messages } from './messages';
17
17
  var styles = {
18
18
  clickableItem: "_zulp1b66 _1e0c1txw _4cvr1h6o",
@@ -9,7 +9,7 @@ import { DropdownItem } from '@atlaskit/dropdown-menu';
9
9
  import { useFlags } from '@atlaskit/flag';
10
10
  import ErrorIcon from '@atlaskit/icon/core/status-error';
11
11
  import SuccessIcon from '@atlaskit/icon/core/status-success';
12
- import { AgentCommonActions, useRovoAgentActionAnalytics } from '@atlaskit/rovo-agent-analytics/actions';
12
+ import { useRovoAgentActionAnalytics } from '@atlaskit/rovo-agent-analytics/actions';
13
13
  import messages from './messages';
14
14
  /**
15
15
  * A dropdown item for verifying or unverifying an agent.
@@ -38,8 +38,7 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
38
38
  agentId: agentId,
39
39
  isAbleToGovernAgents: isAbleToGovernAgents
40
40
  }),
41
- trackAgentAction = _useRovoAgentActionAn.trackAgentAction,
42
- trackAgentActionError = _useRovoAgentActionAn.trackAgentActionError;
41
+ trackAgentEvent = _useRovoAgentActionAn.trackAgentEvent;
43
42
  var _useMutation = useMutation(_agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation),
44
43
  _useMutation2 = _slicedToArray(_useMutation, 2),
45
44
  commitUpdateVerification = _useMutation2[0],
@@ -71,7 +70,11 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
71
70
  var payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
72
71
  if (payload !== null && payload !== void 0 && payload.success) {
73
72
  onVerificationSuccess === null || onVerificationSuccess === void 0 || onVerificationSuccess(verified);
74
- trackAgentAction(verified ? AgentCommonActions.VERIFY : AgentCommonActions.UNVERIFY, {});
73
+ trackAgentEvent({
74
+ action: verified ? 'verify' : 'unverify',
75
+ actionSubject: 'rovoAgent',
76
+ attributes: {}
77
+ });
75
78
  showFlag({
76
79
  title: formatMessage(verified ? messages.verifySuccessTitle : messages.unverifySuccessTitle),
77
80
  appearance: 'success',
@@ -85,21 +88,35 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
85
88
  var _payload$errors;
86
89
  var errorMessage = payload === null || payload === void 0 || (_payload$errors = payload.errors) === null || _payload$errors === void 0 || (_payload$errors = _payload$errors[0]) === null || _payload$errors === void 0 ? void 0 : _payload$errors.message;
87
90
  if (errorMessage) {
88
- trackAgentActionError(verified ? AgentCommonActions.VERIFY : AgentCommonActions.UNVERIFY, new Error(errorMessage), {
89
- agentId: agentId
91
+ trackAgentEvent({
92
+ action: verified ? 'verify' : 'unverify',
93
+ actionSubject: 'rovoAgentError',
94
+ attributes: {
95
+ agentId: agentId,
96
+ error: {
97
+ message: errorMessage
98
+ }
99
+ }
90
100
  });
91
101
  handleError(verified, errorMessage);
92
102
  }
93
103
  }
94
104
  },
95
105
  onError: function onError(error) {
96
- trackAgentActionError(verified ? AgentCommonActions.VERIFY : AgentCommonActions.UNVERIFY, error, {
97
- agentId: agentId
106
+ trackAgentEvent({
107
+ action: verified ? 'verify' : 'unverify',
108
+ actionSubject: 'rovoAgentError',
109
+ attributes: {
110
+ agentId: agentId,
111
+ error: {
112
+ message: error.message
113
+ }
114
+ }
98
115
  });
99
116
  handleError(verified, error.message);
100
117
  }
101
118
  });
102
- }, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentAction, trackAgentActionError]);
119
+ }, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, onVerificationSuccess, showFlag, trackAgentEvent]);
103
120
  var labelText = formatMessage(isVerified ? messages.unverifyAgentLabel : messages.verifyAgentLabel);
104
121
  var handleOnClick = function handleOnClick() {
105
122
  return handleUpdateVerification(!isVerified);
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import _agentVerified_AtlaskitRovoAgentComponents from "./__generated__/agentVerified_AtlaskitRovoAgentComponents.graphql";
@@ -0,0 +1,2 @@
1
+ export type AgentCreatorType = 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY' | 'FORGE' | 'OOTB' | 'REMOTE_A2A';
2
+ export declare const isForgeAgentByCreatorType: (creatorType: AgentCreatorType) => boolean;
@@ -21,6 +21,4 @@ type AgentAvatarProps = {
21
21
  * @param agentId - This is agent.id
22
22
  */
23
23
  export declare const AgentAvatar: ({ imageUrl, size, label, name, agentId, agentIdentityAccountId, agentNamedId, showBorder, isRovoDev, isForgeAgent, forgeAgentIconUrl, }: AgentAvatarProps) => JSX.Element;
24
- export type AgentCreatorType = 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY' | 'FORGE' | 'OOTB' | 'REMOTE_A2A';
25
- export declare const isForgeAgentByCreatorType: (creatorType: AgentCreatorType) => boolean;
26
24
  export {};
@@ -0,0 +1,2 @@
1
+ export type AgentCreatorType = 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY' | 'FORGE' | 'OOTB' | 'REMOTE_A2A';
2
+ export declare const isForgeAgentByCreatorType: (creatorType: AgentCreatorType) => boolean;
@@ -21,6 +21,4 @@ type AgentAvatarProps = {
21
21
  * @param agentId - This is agent.id
22
22
  */
23
23
  export declare const AgentAvatar: ({ imageUrl, size, label, name, agentId, agentIdentityAccountId, agentNamedId, showBorder, isRovoDev, isForgeAgent, forgeAgentIconUrl, }: AgentAvatarProps) => JSX.Element;
24
- export type AgentCreatorType = 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY' | 'FORGE' | 'OOTB' | 'REMOTE_A2A';
25
- export declare const isForgeAgentByCreatorType: (creatorType: AgentCreatorType) => boolean;
26
24
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-components",
3
- "version": "3.38.1",
3
+ "version": "3.40.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
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -45,9 +45,9 @@
45
45
  "@atlaskit/logo": "^19.10.0",
46
46
  "@atlaskit/platform-feature-flags": "^1.1.0",
47
47
  "@atlaskit/primitives": "^18.0.0",
48
- "@atlaskit/rovo-agent-analytics": "^0.20.0",
48
+ "@atlaskit/rovo-agent-analytics": "^1.0.0",
49
49
  "@atlaskit/skeleton": "^2.1.0",
50
- "@atlaskit/tokens": "^11.0.0",
50
+ "@atlaskit/tokens": "^11.1.0",
51
51
  "@atlaskit/tooltip": "^20.14.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "@compiled/react": "^0.20.0",