@atlaskit/rovo-agent-analytics 0.15.1 → 0.17.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,20 @@
1
1
  # @atlaskit/rovo-agent-analytics
2
2
 
3
+ ## 0.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0f9bf8c0ac300`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0f9bf8c0ac300) -
8
+ Add examplePromptKey attribute in analytics context for when example prompt is used. Add SA_DRAFT
9
+ event for rovo agent analytics"
10
+
11
+ ## 0.16.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`1778d733b1d68`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1778d733b1d68) -
16
+ Adding analytics to confirmed tools, including using the rovo agent analytics library
17
+
3
18
  ## 0.15.1
4
19
 
5
20
  ### 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
+ }({});
@@ -37,6 +37,8 @@ var AgentCreateActions = exports.AgentCreateActions = /*#__PURE__*/function (Age
37
37
  AgentCreateActions["BROWSE_CLICK_NO_SKILLS_MODAL"] = "browseClickNoSkillsModal";
38
38
  /* Discard no skills modal - https://data-portal.internal.atlassian.com/analytics/registry/97437 */
39
39
  AgentCreateActions["DISCARD_NO_SKILLS_MODAL"] = "discardNoSkillsModal";
40
+ /* Draft created from solution architect plan card - https://data-portal.internal.atlassian.com/analytics/registry/97924 */
41
+ AgentCreateActions["SA_DRAFT"] = "saDraft";
40
42
  return AgentCreateActions;
41
43
  }({});
42
44
  var globalEventConfig = (0, _utils.getDefaultTrackEventConfig)();
@@ -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
+ }({});
@@ -26,6 +26,8 @@ export let AgentCreateActions = /*#__PURE__*/function (AgentCreateActions) {
26
26
  AgentCreateActions["BROWSE_CLICK_NO_SKILLS_MODAL"] = "browseClickNoSkillsModal";
27
27
  /* Discard no skills modal - https://data-portal.internal.atlassian.com/analytics/registry/97437 */
28
28
  AgentCreateActions["DISCARD_NO_SKILLS_MODAL"] = "discardNoSkillsModal";
29
+ /* Draft created from solution architect plan card - https://data-portal.internal.atlassian.com/analytics/registry/97924 */
30
+ AgentCreateActions["SA_DRAFT"] = "saDraft";
29
31
  return AgentCreateActions;
30
32
  }({});
31
33
  const globalEventConfig = getDefaultTrackEventConfig();
@@ -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
+ }({});
@@ -30,6 +30,8 @@ export var AgentCreateActions = /*#__PURE__*/function (AgentCreateActions) {
30
30
  AgentCreateActions["BROWSE_CLICK_NO_SKILLS_MODAL"] = "browseClickNoSkillsModal";
31
31
  /* Discard no skills modal - https://data-portal.internal.atlassian.com/analytics/registry/97437 */
32
32
  AgentCreateActions["DISCARD_NO_SKILLS_MODAL"] = "discardNoSkillsModal";
33
+ /* Draft created from solution architect plan card - https://data-portal.internal.atlassian.com/analytics/registry/97924 */
34
+ AgentCreateActions["SA_DRAFT"] = "saDraft";
33
35
  return AgentCreateActions;
34
36
  }({});
35
37
  var globalEventConfig = getDefaultTrackEventConfig();
@@ -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
+ };
@@ -12,7 +12,8 @@ export declare enum AgentCreateActions {
12
12
  DISCARD = "createDiscard",
13
13
  SHOW_NO_SKILLS_MODAL = "showNoSkillsModal",
14
14
  BROWSE_CLICK_NO_SKILLS_MODAL = "browseClickNoSkillsModal",
15
- DISCARD_NO_SKILLS_MODAL = "discardNoSkillsModal"
15
+ DISCARD_NO_SKILLS_MODAL = "discardNoSkillsModal",
16
+ SA_DRAFT = "saDraft"
16
17
  }
17
18
  export declare const useRovoAgentCreateAnalytics: (commonAttributes: CommonAnalyticsAttributes) => readonly [string | null, {
18
19
  readonly trackCreateSession: (action: Omit<AgentCreateActions, AgentCreateActions.START>, attributes?: CommonAnalyticsAttributes) => void;
@@ -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
+ };
@@ -12,7 +12,8 @@ export declare enum AgentCreateActions {
12
12
  DISCARD = "createDiscard",
13
13
  SHOW_NO_SKILLS_MODAL = "showNoSkillsModal",
14
14
  BROWSE_CLICK_NO_SKILLS_MODAL = "browseClickNoSkillsModal",
15
- DISCARD_NO_SKILLS_MODAL = "discardNoSkillsModal"
15
+ DISCARD_NO_SKILLS_MODAL = "discardNoSkillsModal",
16
+ SA_DRAFT = "saDraft"
16
17
  }
17
18
  export declare const useRovoAgentCreateAnalytics: (commonAttributes: CommonAnalyticsAttributes) => readonly [
18
19
  string | null,
package/package.json CHANGED
@@ -41,9 +41,6 @@
41
41
  },
42
42
  "techstack": {
43
43
  "@atlassian/frontend": {
44
- "code-structure": [
45
- "tangerine-next"
46
- ],
47
44
  "import-structure": [
48
45
  "atlassian-conventions"
49
46
  ],
@@ -77,13 +74,8 @@
77
74
  ]
78
75
  }
79
76
  },
80
- "techstackIgnore": {
81
- "stricter": [
82
- "@atlassian/tangerine/project-structure"
83
- ]
84
- },
85
77
  "name": "@atlaskit/rovo-agent-analytics",
86
- "version": "0.15.1",
78
+ "version": "0.17.0",
87
79
  "description": "Rovo Agents analytics",
88
80
  "author": "Atlassian Pty Ltd",
89
81
  "license": "Apache-2.0",