@atlaskit/rovo-agent-analytics 2.1.0 → 2.2.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
+ ## 2.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`573b49ec9d02b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/573b49ec9d02b) -
8
+ Add create/publish/assignable/error analytics events to inline agent creation flow
9
+
10
+ ## 2.1.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [`026beed942749`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/026beed942749) -
15
+ Fix resumption flow analytics: fire toolsExecutionCancelled on cancel and include actionKey in
16
+ aiResult actioned event
17
+ - Updated dependencies
18
+
3
19
  ## 2.1.0
4
20
 
5
21
  ### Minor Changes
@@ -46,26 +46,51 @@
46
46
  * (see other files in this directory for the template)
47
47
  */
48
48
  import type { VersionedAgentAttributes } from '../../common/types';
49
- /**
50
- * Derives analytics attributes from a `StudioCreateAgentPlan`, mirroring
51
- * the shape produced by `getAgentPublishAnalytics` in agent-studio.
52
- */
53
- export type PlanAnalyticsAttributes = {
54
- agentToolCount: number;
55
- agentToolsList: string;
56
- agentMcpServerCount: number;
49
+ export type AgentPublishAnalyticsAttributes = {
50
+ agentId?: string;
51
+ /**
52
+ * Per-source knowledge map: keys are source identifiers (e.g. 'CONFLUENCE'),
53
+ * values carry `enabled` flag and a comma-joined list of active 3P filter keys.
54
+ */
57
55
  agentKnowledge: Record<string, {
58
56
  enabled: boolean;
57
+ filters: string;
59
58
  }> | null;
60
- scenarioList: ScenarioAnalytics[];
61
- };
62
- export type ScenarioAnalytics = {
63
- toolCount: number;
64
- toolsList: string;
65
- mcpServerCount: number;
66
- knowledgeType: 'custom' | 'disabled' | 'all';
67
- knowledge: string[] | null;
59
+ /**
60
+ * This is the total of mcpServerCount only in the base agent
61
+ */
62
+ agentMcpServerCount: number;
63
+ /**
64
+ * This is the total of agenticSkillCount only in the base agent
65
+ */
66
+ agentSkillCount: number;
67
+ /**
68
+ * This is the list of agenticSkillIds only in the base agent
69
+ */
70
+ agentSkillsList: string;
71
+ /**
72
+ * This is the total of toolCount only in the base agent
73
+ */
74
+ agentToolCount: number;
75
+ /**
76
+ * This is the list of toolIds only in the base agent
77
+ */
78
+ agentToolsList: string;
79
+ agentType: 'AgentStudioAssistant';
80
+ agentVersionNumber: number | null;
81
+ isFirstPublish: boolean | null;
82
+ scenarioList: ReadonlyArray<{
83
+ knowledge: string[] | null | undefined;
84
+ knowledgeType: 'custom' | 'disabled' | 'all';
85
+ mcpServerCount: number;
86
+ skillCount: number;
87
+ skillsList: string;
88
+ toolCount: number;
89
+ toolsList: string;
90
+ }>;
91
+ source?: string;
68
92
  };
93
+ export type AgentPlanAnalyticsAttributes = Omit<AgentPublishAnalyticsAttributes, 'agentId' | 'agentVersionNumber' | 'isFirstPublish'>;
69
94
  /**
70
95
  * Discriminated union payload type for create flow events.
71
96
  * Use with `trackAgentEvent()`.
@@ -125,13 +150,17 @@ export type CreateFlowEventPayload = {
125
150
  } | {
126
151
  actionSubject: 'rovoAgent';
127
152
  action: 'published';
128
- attributes: VersionedAgentAttributes & Record<string, unknown>;
153
+ attributes: AgentPublishAnalyticsAttributes & Record<string, unknown>;
129
154
  } | {
130
155
  actionSubject: 'rovoAgent';
131
156
  action: 'createFlowPlanGenerated';
132
- attributes: PlanAnalyticsAttributes & Record<string, unknown>;
157
+ attributes: AgentPlanAnalyticsAttributes & Record<string, unknown>;
133
158
  } | {
134
159
  actionSubject: 'rovoAgent';
135
160
  action: 'createFlowPlanViewed';
136
- attributes: PlanAnalyticsAttributes & Record<string, unknown>;
161
+ attributes: AgentPlanAnalyticsAttributes & Record<string, unknown>;
162
+ } | {
163
+ actionSubject: 'setIsAgentAssignable';
164
+ action: 'success';
165
+ attributes: Record<string, unknown>;
137
166
  };
@@ -23,6 +23,10 @@ export type ToolsEventPayload = {
23
23
  actionSubject: 'rovoAgent';
24
24
  action: 'toolsExecutionConfirmed';
25
25
  attributes: ToolsExecutionAttributesBase;
26
+ } | {
27
+ actionSubject: 'rovoAgent';
28
+ action: 'toolsExecutionCancelled';
29
+ attributes: ToolsExecutionAttributesBase;
26
30
  } | {
27
31
  actionSubject: 'rovoAgent';
28
32
  action: 'toolsExecutionStreamStopped';
@@ -46,26 +46,51 @@
46
46
  * (see other files in this directory for the template)
47
47
  */
48
48
  import type { VersionedAgentAttributes } from '../../common/types';
49
- /**
50
- * Derives analytics attributes from a `StudioCreateAgentPlan`, mirroring
51
- * the shape produced by `getAgentPublishAnalytics` in agent-studio.
52
- */
53
- export type PlanAnalyticsAttributes = {
54
- agentToolCount: number;
55
- agentToolsList: string;
56
- agentMcpServerCount: number;
49
+ export type AgentPublishAnalyticsAttributes = {
50
+ agentId?: string;
51
+ /**
52
+ * Per-source knowledge map: keys are source identifiers (e.g. 'CONFLUENCE'),
53
+ * values carry `enabled` flag and a comma-joined list of active 3P filter keys.
54
+ */
57
55
  agentKnowledge: Record<string, {
58
56
  enabled: boolean;
57
+ filters: string;
59
58
  }> | null;
60
- scenarioList: ScenarioAnalytics[];
61
- };
62
- export type ScenarioAnalytics = {
63
- toolCount: number;
64
- toolsList: string;
65
- mcpServerCount: number;
66
- knowledgeType: 'custom' | 'disabled' | 'all';
67
- knowledge: string[] | null;
59
+ /**
60
+ * This is the total of mcpServerCount only in the base agent
61
+ */
62
+ agentMcpServerCount: number;
63
+ /**
64
+ * This is the total of agenticSkillCount only in the base agent
65
+ */
66
+ agentSkillCount: number;
67
+ /**
68
+ * This is the list of agenticSkillIds only in the base agent
69
+ */
70
+ agentSkillsList: string;
71
+ /**
72
+ * This is the total of toolCount only in the base agent
73
+ */
74
+ agentToolCount: number;
75
+ /**
76
+ * This is the list of toolIds only in the base agent
77
+ */
78
+ agentToolsList: string;
79
+ agentType: 'AgentStudioAssistant';
80
+ agentVersionNumber: number | null;
81
+ isFirstPublish: boolean | null;
82
+ scenarioList: ReadonlyArray<{
83
+ knowledge: string[] | null | undefined;
84
+ knowledgeType: 'custom' | 'disabled' | 'all';
85
+ mcpServerCount: number;
86
+ skillCount: number;
87
+ skillsList: string;
88
+ toolCount: number;
89
+ toolsList: string;
90
+ }>;
91
+ source?: string;
68
92
  };
93
+ export type AgentPlanAnalyticsAttributes = Omit<AgentPublishAnalyticsAttributes, 'agentId' | 'agentVersionNumber' | 'isFirstPublish'>;
69
94
  /**
70
95
  * Discriminated union payload type for create flow events.
71
96
  * Use with `trackAgentEvent()`.
@@ -125,13 +150,17 @@ export type CreateFlowEventPayload = {
125
150
  } | {
126
151
  actionSubject: 'rovoAgent';
127
152
  action: 'published';
128
- attributes: VersionedAgentAttributes & Record<string, unknown>;
153
+ attributes: AgentPublishAnalyticsAttributes & Record<string, unknown>;
129
154
  } | {
130
155
  actionSubject: 'rovoAgent';
131
156
  action: 'createFlowPlanGenerated';
132
- attributes: PlanAnalyticsAttributes & Record<string, unknown>;
157
+ attributes: AgentPlanAnalyticsAttributes & Record<string, unknown>;
133
158
  } | {
134
159
  actionSubject: 'rovoAgent';
135
160
  action: 'createFlowPlanViewed';
136
- attributes: PlanAnalyticsAttributes & Record<string, unknown>;
161
+ attributes: AgentPlanAnalyticsAttributes & Record<string, unknown>;
162
+ } | {
163
+ actionSubject: 'setIsAgentAssignable';
164
+ action: 'success';
165
+ attributes: Record<string, unknown>;
137
166
  };
@@ -23,6 +23,10 @@ export type ToolsEventPayload = {
23
23
  actionSubject: 'rovoAgent';
24
24
  action: 'toolsExecutionConfirmed';
25
25
  attributes: ToolsExecutionAttributesBase;
26
+ } | {
27
+ actionSubject: 'rovoAgent';
28
+ action: 'toolsExecutionCancelled';
29
+ attributes: ToolsExecutionAttributesBase;
26
30
  } | {
27
31
  actionSubject: 'rovoAgent';
28
32
  action: 'toolsExecutionStreamStopped';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-analytics",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Rovo Agents analytics",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-monorepo",
6
6
  "atlassian": {
@@ -40,7 +40,7 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "@atlaskit/analytics-listeners": "^10.1.0",
43
- "@atlaskit/analytics-next": "^11.2.0",
43
+ "@atlaskit/analytics-next": "^11.3.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@compiled/react": "^0.20.0"
46
46
  },