@atlaskit/rovo-agent-analytics 1.6.0 → 1.8.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,21 @@
1
1
  # @atlaskit/rovo-agent-analytics
2
2
 
3
+ ## 1.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0cf21efc19163`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0cf21efc19163) -
8
+ Added 'ModelPreferencesEventPayload' as a new event type
9
+
10
+ ## 1.7.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`b72d0152846b8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b72d0152846b8) -
15
+ Fire knowledgeFilters analytics events: 'saved' on successful update and 'closed' on cancel from
16
+ ConnectorFilters; 'updated' from SelectFilter when the selection changes (filterOrControlId as
17
+ filter id, comma-joined option values).
18
+
3
19
  ## 1.6.0
4
20
 
5
21
  ### Minor Changes
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
File without changes
@@ -0,0 +1,33 @@
1
+ import type { BaseAgentAnalyticsAttributes } from '../../common/types';
2
+ type FilterAttributes = {
3
+ id: string;
4
+ selectedOptionsCount: number;
5
+ };
6
+ type KnowledgeSourceAttributes = BaseAgentAnalyticsAttributes & {
7
+ productKey: string;
8
+ };
9
+ export type KnowledgeFiltersEventPayload = {
10
+ actionSubject: 'rovoAgent';
11
+ action: 'knowledgeFiltersOpened';
12
+ attributes: KnowledgeSourceAttributes;
13
+ } | {
14
+ actionSubject: 'rovoAgent';
15
+ action: 'knowledgeFiltersClosed';
16
+ attributes: KnowledgeSourceAttributes;
17
+ } | {
18
+ actionSubject: 'rovoAgent';
19
+ action: 'knowledgeFiltersSaved';
20
+ attributes: KnowledgeSourceAttributes & {
21
+ filterCount: number;
22
+ filters: {
23
+ [key: string]: Omit<FilterAttributes, 'id'>;
24
+ };
25
+ };
26
+ } | {
27
+ actionSubject: 'rovoAgent';
28
+ action: 'knowledgeFiltersUpdated';
29
+ attributes: KnowledgeSourceAttributes & {
30
+ filter: FilterAttributes;
31
+ };
32
+ };
33
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Action Group: modelPreferences
3
+ *
4
+ * Events fired when a user changes execution tier or model selection
5
+ * in the model preferences field.
6
+ *
7
+ * ## Adding a new action
8
+ * 1. Add a new variant to the `ModelPreferencesEventPayload` union type below with a data-portal link
9
+ * 2. If this action doesn't fit model preferences, create a new group file instead
10
+ * (see other files in this directory for the template)
11
+ */
12
+ export type ModelPreferencesEventPayload = {
13
+ actionSubject: 'rovoAgent';
14
+ action: 'executionTierChanged';
15
+ attributes: {
16
+ executionTier: string;
17
+ };
18
+ } | {
19
+ actionSubject: 'rovoAgent';
20
+ action: 'executionModelChanged';
21
+ attributes: {
22
+ modelId: string | null;
23
+ executionTier: string;
24
+ };
25
+ };
@@ -3,6 +3,8 @@ import type { DebugEventPayload } from '../actions/groups/debug';
3
3
  import type { EditingEventPayload } from '../actions/groups/editing';
4
4
  import type { EvaluationEventPayload } from '../actions/groups/evaluation';
5
5
  import type { InsightsEventPayload } from '../actions/groups/insights';
6
+ import type { KnowledgeFiltersEventPayload } from '../actions/groups/knowledge-filters';
7
+ import type { ModelPreferencesEventPayload } from '../actions/groups/model-preferences';
6
8
  import type { SubagentInteractionsEventPayload } from '../actions/groups/subagent-interactions';
7
9
  import type { ToolsEventPayload } from '../actions/groups/tools';
8
10
  export type RemainingRequired<T, P extends Partial<T>> = Required<Omit<T, keyof P>>;
@@ -50,4 +52,4 @@ export type ErrorEventPayload = {
50
52
  * Union of all event payload types.
51
53
  * Use with `trackAgentEvent()` for typed event tracking.
52
54
  */
53
- export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload;
55
+ export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload | KnowledgeFiltersEventPayload | ModelPreferencesEventPayload;
@@ -0,0 +1,33 @@
1
+ import type { BaseAgentAnalyticsAttributes } from '../../common/types';
2
+ type FilterAttributes = {
3
+ id: string;
4
+ selectedOptionsCount: number;
5
+ };
6
+ type KnowledgeSourceAttributes = BaseAgentAnalyticsAttributes & {
7
+ productKey: string;
8
+ };
9
+ export type KnowledgeFiltersEventPayload = {
10
+ actionSubject: 'rovoAgent';
11
+ action: 'knowledgeFiltersOpened';
12
+ attributes: KnowledgeSourceAttributes;
13
+ } | {
14
+ actionSubject: 'rovoAgent';
15
+ action: 'knowledgeFiltersClosed';
16
+ attributes: KnowledgeSourceAttributes;
17
+ } | {
18
+ actionSubject: 'rovoAgent';
19
+ action: 'knowledgeFiltersSaved';
20
+ attributes: KnowledgeSourceAttributes & {
21
+ filterCount: number;
22
+ filters: {
23
+ [key: string]: Omit<FilterAttributes, 'id'>;
24
+ };
25
+ };
26
+ } | {
27
+ actionSubject: 'rovoAgent';
28
+ action: 'knowledgeFiltersUpdated';
29
+ attributes: KnowledgeSourceAttributes & {
30
+ filter: FilterAttributes;
31
+ };
32
+ };
33
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Action Group: modelPreferences
3
+ *
4
+ * Events fired when a user changes execution tier or model selection
5
+ * in the model preferences field.
6
+ *
7
+ * ## Adding a new action
8
+ * 1. Add a new variant to the `ModelPreferencesEventPayload` union type below with a data-portal link
9
+ * 2. If this action doesn't fit model preferences, create a new group file instead
10
+ * (see other files in this directory for the template)
11
+ */
12
+ export type ModelPreferencesEventPayload = {
13
+ actionSubject: 'rovoAgent';
14
+ action: 'executionTierChanged';
15
+ attributes: {
16
+ executionTier: string;
17
+ };
18
+ } | {
19
+ actionSubject: 'rovoAgent';
20
+ action: 'executionModelChanged';
21
+ attributes: {
22
+ modelId: string | null;
23
+ executionTier: string;
24
+ };
25
+ };
@@ -3,6 +3,8 @@ import type { DebugEventPayload } from '../actions/groups/debug';
3
3
  import type { EditingEventPayload } from '../actions/groups/editing';
4
4
  import type { EvaluationEventPayload } from '../actions/groups/evaluation';
5
5
  import type { InsightsEventPayload } from '../actions/groups/insights';
6
+ import type { KnowledgeFiltersEventPayload } from '../actions/groups/knowledge-filters';
7
+ import type { ModelPreferencesEventPayload } from '../actions/groups/model-preferences';
6
8
  import type { SubagentInteractionsEventPayload } from '../actions/groups/subagent-interactions';
7
9
  import type { ToolsEventPayload } from '../actions/groups/tools';
8
10
  export type RemainingRequired<T, P extends Partial<T>> = Required<Omit<T, keyof P>>;
@@ -50,4 +52,4 @@ export type ErrorEventPayload = {
50
52
  * Union of all event payload types.
51
53
  * Use with `trackAgentEvent()` for typed event tracking.
52
54
  */
53
- export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload;
55
+ export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload | KnowledgeFiltersEventPayload | ModelPreferencesEventPayload;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-analytics",
3
- "version": "1.6.0",
3
+ "version": "1.8.0",
4
4
  "description": "Rovo Agents analytics",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-monorepo",
6
6
  "atlassian": {
@@ -39,7 +39,7 @@
39
39
  "*.compiled.css"
40
40
  ],
41
41
  "dependencies": {
42
- "@atlaskit/analytics-listeners": "^10.0.0",
42
+ "@atlaskit/analytics-listeners": "^10.1.0",
43
43
  "@atlaskit/analytics-next": "^11.2.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@compiled/react": "^0.20.0"