@atlaskit/rovo-agent-analytics 0.15.1 → 0.16.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,12 @@
1
1
  # @atlaskit/rovo-agent-analytics
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`1778d733b1d68`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1778d733b1d68) -
8
+ Adding analytics to confirmed tools, including using the rovo agent analytics library
9
+
3
10
  ## 0.15.1
4
11
 
5
12
  ### Patch Changes
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/rovo-agent-analytics/actions/tool-actions",
3
+ "main": "../../dist/cjs/actions/tool-actions/index.js",
4
+ "module": "../../dist/esm/actions/tool-actions/index.js",
5
+ "module:es2019": "../../dist/es2019/actions/tool-actions/index.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/actions/tool-actions/index.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../../dist/types-ts4.5/actions/tool-actions/index.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AgentToolActions = void 0;
7
+ var AgentToolActions = exports.AgentToolActions = /*#__PURE__*/function (AgentToolActions) {
8
+ /* When chatting with an agent, and tools confirmation being shown, then user click proceed with the possible actions (e.g. confirm, dismiss etc) https://data-portal.internal.atlassian.com/analytics/registry/97675 */
9
+ AgentToolActions["TOOLS_EXECUTION_CONFIRMED"] = "toolsExecutionConfirmed";
10
+ /* When tools execution result is being streamed and user stops the stream e.g. by clicking stop button https://data-portal.internal.atlassian.com/analytics/registry/97750 */
11
+ AgentToolActions["TOOLS_EXECUTION_STREAM_STOPPED"] = "toolsExecutionStreamStopped";
12
+ /* When tools execution result is done streaming and user sees the result https://data-portal.internal.atlassian.com/analytics/registry/97751*/
13
+ AgentToolActions["TOOLS_EXECUTION_RESULT_VIEWED"] = "toolsExecutionResultViewed";
14
+ /* When tools execution result streaming fails https://data-portal.internal.atlassian.com/analytics/registry/97752 */
15
+ AgentToolActions["TOOLS_EXECUTION_RESULT_ERROR"] = "toolsExecutionResultError";
16
+ return AgentToolActions;
17
+ }({});
@@ -0,0 +1,11 @@
1
+ export let AgentToolActions = /*#__PURE__*/function (AgentToolActions) {
2
+ /* When chatting with an agent, and tools confirmation being shown, then user click proceed with the possible actions (e.g. confirm, dismiss etc) https://data-portal.internal.atlassian.com/analytics/registry/97675 */
3
+ AgentToolActions["TOOLS_EXECUTION_CONFIRMED"] = "toolsExecutionConfirmed";
4
+ /* When tools execution result is being streamed and user stops the stream e.g. by clicking stop button https://data-portal.internal.atlassian.com/analytics/registry/97750 */
5
+ AgentToolActions["TOOLS_EXECUTION_STREAM_STOPPED"] = "toolsExecutionStreamStopped";
6
+ /* When tools execution result is done streaming and user sees the result https://data-portal.internal.atlassian.com/analytics/registry/97751*/
7
+ AgentToolActions["TOOLS_EXECUTION_RESULT_VIEWED"] = "toolsExecutionResultViewed";
8
+ /* When tools execution result streaming fails https://data-portal.internal.atlassian.com/analytics/registry/97752 */
9
+ AgentToolActions["TOOLS_EXECUTION_RESULT_ERROR"] = "toolsExecutionResultError";
10
+ return AgentToolActions;
11
+ }({});
@@ -0,0 +1,11 @@
1
+ export var AgentToolActions = /*#__PURE__*/function (AgentToolActions) {
2
+ /* When chatting with an agent, and tools confirmation being shown, then user click proceed with the possible actions (e.g. confirm, dismiss etc) https://data-portal.internal.atlassian.com/analytics/registry/97675 */
3
+ AgentToolActions["TOOLS_EXECUTION_CONFIRMED"] = "toolsExecutionConfirmed";
4
+ /* When tools execution result is being streamed and user stops the stream e.g. by clicking stop button https://data-portal.internal.atlassian.com/analytics/registry/97750 */
5
+ AgentToolActions["TOOLS_EXECUTION_STREAM_STOPPED"] = "toolsExecutionStreamStopped";
6
+ /* When tools execution result is done streaming and user sees the result https://data-portal.internal.atlassian.com/analytics/registry/97751*/
7
+ AgentToolActions["TOOLS_EXECUTION_RESULT_VIEWED"] = "toolsExecutionResultViewed";
8
+ /* When tools execution result streaming fails https://data-portal.internal.atlassian.com/analytics/registry/97752 */
9
+ AgentToolActions["TOOLS_EXECUTION_RESULT_ERROR"] = "toolsExecutionResultError";
10
+ return AgentToolActions;
11
+ }({});
@@ -1,4 +1,5 @@
1
- import type { RemainingRequired } from '../common/types';
1
+ import type { BaseAgentAnalyticsAttributes, RemainingRequired } from '../common/types';
2
+ import type { AgentToolActions, ToolsExecutionAttributes } from './tool-actions';
2
3
  export declare enum AgentDebugActions {
3
4
  VIEW = "debugView",
4
5
  COPY_ALL = "debugCopyAll",
@@ -17,25 +18,21 @@ export declare enum AgentCommonActions {
17
18
  VERIFY = "verify",
18
19
  UNVERIFY = "unverify"
19
20
  }
20
- type CommonAnalyticsAttributes = {
21
- touchPoint: string;
22
- agentId: string;
23
- };
24
21
  type EmptyAttributes = {};
25
22
  type ActionAttributes = {
26
- [AgentCommonActions.VIEW]: CommonAnalyticsAttributes;
27
- [AgentCommonActions.EDIT]: CommonAnalyticsAttributes;
28
- [AgentCommonActions.UPDATED]: CommonAnalyticsAttributes & {
23
+ [AgentCommonActions.VIEW]: BaseAgentAnalyticsAttributes;
24
+ [AgentCommonActions.EDIT]: BaseAgentAnalyticsAttributes;
25
+ [AgentCommonActions.UPDATED]: BaseAgentAnalyticsAttributes & {
29
26
  agentType: string;
30
27
  field: string;
31
28
  };
32
- [AgentCommonActions.COPY_LINK]: CommonAnalyticsAttributes;
33
- [AgentCommonActions.DELETE]: CommonAnalyticsAttributes;
34
- [AgentCommonActions.DUPLICATE]: CommonAnalyticsAttributes;
35
- [AgentCommonActions.STAR]: CommonAnalyticsAttributes;
36
- [AgentCommonActions.CHAT]: CommonAnalyticsAttributes;
37
- [AgentCommonActions.VERIFY]: CommonAnalyticsAttributes;
38
- [AgentCommonActions.UNVERIFY]: CommonAnalyticsAttributes;
29
+ [AgentCommonActions.COPY_LINK]: BaseAgentAnalyticsAttributes;
30
+ [AgentCommonActions.DELETE]: BaseAgentAnalyticsAttributes;
31
+ [AgentCommonActions.DUPLICATE]: BaseAgentAnalyticsAttributes;
32
+ [AgentCommonActions.STAR]: BaseAgentAnalyticsAttributes;
33
+ [AgentCommonActions.CHAT]: BaseAgentAnalyticsAttributes;
34
+ [AgentCommonActions.VERIFY]: BaseAgentAnalyticsAttributes;
35
+ [AgentCommonActions.UNVERIFY]: BaseAgentAnalyticsAttributes;
39
36
  [AgentDebugActions.COPY_ALL]: EmptyAttributes;
40
37
  [AgentDebugActions.COPY]: EmptyAttributes;
41
38
  [AgentDebugActions.TOGGLE_SKILL_INFO]: {
@@ -43,6 +40,10 @@ type ActionAttributes = {
43
40
  isExpanded: boolean;
44
41
  };
45
42
  [AgentDebugActions.VIEW]: EmptyAttributes;
43
+ [AgentToolActions.TOOLS_EXECUTION_CONFIRMED]: ToolsExecutionAttributes;
44
+ [AgentToolActions.TOOLS_EXECUTION_STREAM_STOPPED]: ToolsExecutionAttributes;
45
+ [AgentToolActions.TOOLS_EXECUTION_RESULT_VIEWED]: ToolsExecutionAttributes;
46
+ [AgentToolActions.TOOLS_EXECUTION_RESULT_ERROR]: ToolsExecutionAttributes;
46
47
  };
47
48
  export declare const useRovoAgentActionAnalytics: <T extends {}>(commonAttributes: T) => {
48
49
  trackAgentAction: <A extends keyof ActionAttributes>(action: A, attributes: RemainingRequired<ActionAttributes[A], T>) => void;
@@ -0,0 +1,14 @@
1
+ import type { BaseAgentAnalyticsAttributes } from '../../common/types';
2
+ export declare enum AgentToolActions {
3
+ TOOLS_EXECUTION_CONFIRMED = "toolsExecutionConfirmed",
4
+ TOOLS_EXECUTION_STREAM_STOPPED = "toolsExecutionStreamStopped",
5
+ TOOLS_EXECUTION_RESULT_VIEWED = "toolsExecutionResultViewed",
6
+ TOOLS_EXECUTION_RESULT_ERROR = "toolsExecutionResultError"
7
+ }
8
+ export type ToolsExecutionAttributes = BaseAgentAnalyticsAttributes & {
9
+ tools: {
10
+ toolId: string;
11
+ toolSource: string;
12
+ resolutionType: string;
13
+ }[];
14
+ };
@@ -1 +1,5 @@
1
1
  export type RemainingRequired<T, P extends Partial<T>> = Required<Omit<T, keyof P>>;
2
+ export type BaseAgentAnalyticsAttributes = {
3
+ touchPoint: string;
4
+ agentId: string;
5
+ };
@@ -1,4 +1,5 @@
1
- import type { RemainingRequired } from '../common/types';
1
+ import type { BaseAgentAnalyticsAttributes, RemainingRequired } from '../common/types';
2
+ import type { AgentToolActions, ToolsExecutionAttributes } from './tool-actions';
2
3
  export declare enum AgentDebugActions {
3
4
  VIEW = "debugView",
4
5
  COPY_ALL = "debugCopyAll",
@@ -17,25 +18,21 @@ export declare enum AgentCommonActions {
17
18
  VERIFY = "verify",
18
19
  UNVERIFY = "unverify"
19
20
  }
20
- type CommonAnalyticsAttributes = {
21
- touchPoint: string;
22
- agentId: string;
23
- };
24
21
  type EmptyAttributes = {};
25
22
  type ActionAttributes = {
26
- [AgentCommonActions.VIEW]: CommonAnalyticsAttributes;
27
- [AgentCommonActions.EDIT]: CommonAnalyticsAttributes;
28
- [AgentCommonActions.UPDATED]: CommonAnalyticsAttributes & {
23
+ [AgentCommonActions.VIEW]: BaseAgentAnalyticsAttributes;
24
+ [AgentCommonActions.EDIT]: BaseAgentAnalyticsAttributes;
25
+ [AgentCommonActions.UPDATED]: BaseAgentAnalyticsAttributes & {
29
26
  agentType: string;
30
27
  field: string;
31
28
  };
32
- [AgentCommonActions.COPY_LINK]: CommonAnalyticsAttributes;
33
- [AgentCommonActions.DELETE]: CommonAnalyticsAttributes;
34
- [AgentCommonActions.DUPLICATE]: CommonAnalyticsAttributes;
35
- [AgentCommonActions.STAR]: CommonAnalyticsAttributes;
36
- [AgentCommonActions.CHAT]: CommonAnalyticsAttributes;
37
- [AgentCommonActions.VERIFY]: CommonAnalyticsAttributes;
38
- [AgentCommonActions.UNVERIFY]: CommonAnalyticsAttributes;
29
+ [AgentCommonActions.COPY_LINK]: BaseAgentAnalyticsAttributes;
30
+ [AgentCommonActions.DELETE]: BaseAgentAnalyticsAttributes;
31
+ [AgentCommonActions.DUPLICATE]: BaseAgentAnalyticsAttributes;
32
+ [AgentCommonActions.STAR]: BaseAgentAnalyticsAttributes;
33
+ [AgentCommonActions.CHAT]: BaseAgentAnalyticsAttributes;
34
+ [AgentCommonActions.VERIFY]: BaseAgentAnalyticsAttributes;
35
+ [AgentCommonActions.UNVERIFY]: BaseAgentAnalyticsAttributes;
39
36
  [AgentDebugActions.COPY_ALL]: EmptyAttributes;
40
37
  [AgentDebugActions.COPY]: EmptyAttributes;
41
38
  [AgentDebugActions.TOGGLE_SKILL_INFO]: {
@@ -43,6 +40,10 @@ type ActionAttributes = {
43
40
  isExpanded: boolean;
44
41
  };
45
42
  [AgentDebugActions.VIEW]: EmptyAttributes;
43
+ [AgentToolActions.TOOLS_EXECUTION_CONFIRMED]: ToolsExecutionAttributes;
44
+ [AgentToolActions.TOOLS_EXECUTION_STREAM_STOPPED]: ToolsExecutionAttributes;
45
+ [AgentToolActions.TOOLS_EXECUTION_RESULT_VIEWED]: ToolsExecutionAttributes;
46
+ [AgentToolActions.TOOLS_EXECUTION_RESULT_ERROR]: ToolsExecutionAttributes;
46
47
  };
47
48
  export declare const useRovoAgentActionAnalytics: <T extends {}>(commonAttributes: T) => {
48
49
  trackAgentAction: <A extends keyof ActionAttributes>(action: A, attributes: RemainingRequired<ActionAttributes[A], T>) => void;
@@ -0,0 +1,14 @@
1
+ import type { BaseAgentAnalyticsAttributes } from '../../common/types';
2
+ export declare enum AgentToolActions {
3
+ TOOLS_EXECUTION_CONFIRMED = "toolsExecutionConfirmed",
4
+ TOOLS_EXECUTION_STREAM_STOPPED = "toolsExecutionStreamStopped",
5
+ TOOLS_EXECUTION_RESULT_VIEWED = "toolsExecutionResultViewed",
6
+ TOOLS_EXECUTION_RESULT_ERROR = "toolsExecutionResultError"
7
+ }
8
+ export type ToolsExecutionAttributes = BaseAgentAnalyticsAttributes & {
9
+ tools: {
10
+ toolId: string;
11
+ toolSource: string;
12
+ resolutionType: string;
13
+ }[];
14
+ };
@@ -1 +1,5 @@
1
1
  export type RemainingRequired<T, P extends Partial<T>> = Required<Omit<T, keyof P>>;
2
+ export type BaseAgentAnalyticsAttributes = {
3
+ touchPoint: string;
4
+ agentId: string;
5
+ };
package/package.json CHANGED
@@ -83,7 +83,7 @@
83
83
  ]
84
84
  },
85
85
  "name": "@atlaskit/rovo-agent-analytics",
86
- "version": "0.15.1",
86
+ "version": "0.16.0",
87
87
  "description": "Rovo Agents analytics",
88
88
  "author": "Atlassian Pty Ltd",
89
89
  "license": "Apache-2.0",