@atlaskit/rovo-agent-analytics 1.11.0 → 2.1.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,34 @@
1
1
  # @atlaskit/rovo-agent-analytics
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`b4a8990eab900`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b4a8990eab900) -
8
+ Add createFlowPlanGenerated and createFlowPlanViewed analytics events for inline create-agent plan
9
+ card
10
+
11
+ ## 2.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - [`b0222d13caefe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b0222d13caefe) -
16
+ Replace `@typescript-eslint/no-explicit-any` suppressions with real types across
17
+ rovo-content-bridge and rovo-platform packages (TREX-1392).
18
+
19
+ Key changes:
20
+ - `rovo-content-bridge-api`: Replace `any` in `CommandConstructor`, type guards, handlers,
21
+ debugger, and desktop transport with `unknown`, typed event interfaces, and a new `WebContents`
22
+ interface.
23
+ - `rovo-content-bridge-api-commands`: Replace `any` fields with `SerializableValue` in chart,
24
+ Jira, and content commands.
25
+ - `rovo-playground`: Replace `any` in plugin config, settings store, and ADF utilities with
26
+ `unknown` and recursive typed nodes.
27
+ - `rovo-platform-ui-components`, `rovo-navigation`, `rovo-spaces`, `rovo-triggers`,
28
+ `rovo-agent-analytics`, `rovo-agent-components`, `rovo-chat-side-by-side-evaluation`,
29
+ `rovo-agent-debug-modal`: Replace remaining `any` occurrences with `unknown`, typed interfaces,
30
+ or properly inferred types.
31
+
3
32
  ## 1.11.0
4
33
 
5
34
  ### Minor Changes
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/rovo-agent-analytics/actions/groups/create-flow",
3
+ "main": "../../../dist/cjs/actions/groups/create-flow.js",
4
+ "module": "../../../dist/esm/actions/groups/create-flow.js",
5
+ "module:es2019": "../../../dist/es2019/actions/groups/create-flow.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../../../dist/types/actions/groups/create-flow.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../../../dist/types-ts4.5/actions/groups/create-flow.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -14,8 +14,6 @@ var getDefaultTrackEventConfig = exports.getDefaultTrackEventConfig = function g
14
14
  tags: ['atlaskit']
15
15
  };
16
16
  };
17
-
18
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
17
  var getAttributesFromContexts = exports.getAttributesFromContexts = function getAttributesFromContexts(context) {
20
18
  if (!context || !Array.isArray(context)) {
21
19
  return {};
@@ -2,8 +2,6 @@ export const getDefaultTrackEventConfig = () => ({
2
2
  eventType: 'track',
3
3
  tags: ['atlaskit']
4
4
  });
5
-
6
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
5
  export const getAttributesFromContexts = context => {
8
6
  if (!context || !Array.isArray(context)) {
9
7
  return {};
@@ -7,8 +7,6 @@ export var getDefaultTrackEventConfig = function getDefaultTrackEventConfig() {
7
7
  tags: ['atlaskit']
8
8
  };
9
9
  };
10
-
11
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
10
  export var getAttributesFromContexts = function getAttributesFromContexts(context) {
13
11
  if (!context || !Array.isArray(context)) {
14
12
  return {};
@@ -46,6 +46,26 @@
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;
57
+ agentKnowledge: Record<string, {
58
+ enabled: boolean;
59
+ }> | 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;
68
+ };
49
69
  /**
50
70
  * Discriminated union payload type for create flow events.
51
71
  * Use with `trackAgentEvent()`.
@@ -106,4 +126,12 @@ export type CreateFlowEventPayload = {
106
126
  actionSubject: 'rovoAgent';
107
127
  action: 'published';
108
128
  attributes: VersionedAgentAttributes & Record<string, unknown>;
129
+ } | {
130
+ actionSubject: 'rovoAgent';
131
+ action: 'createFlowPlanGenerated';
132
+ attributes: PlanAnalyticsAttributes & Record<string, unknown>;
133
+ } | {
134
+ actionSubject: 'rovoAgent';
135
+ action: 'createFlowPlanViewed';
136
+ attributes: PlanAnalyticsAttributes & Record<string, unknown>;
109
137
  };
@@ -1,4 +1,5 @@
1
1
  import type { AgentInteractionsEventPayload } from '../actions/groups/agent-interactions';
2
+ import type { CreateFlowEventPayload } from '../actions/groups/create-flow';
2
3
  import type { DebugEventPayload } from '../actions/groups/debug';
3
4
  import type { EditingEventPayload } from '../actions/groups/editing';
4
5
  import type { EvaluationEventPayload } from '../actions/groups/evaluation';
@@ -52,4 +53,4 @@ export type ErrorEventPayload = {
52
53
  * Union of all event payload types.
53
54
  * Use with `trackAgentEvent()` for typed event tracking.
54
55
  */
55
- export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload | KnowledgeFiltersEventPayload | ModelPreferencesEventPayload;
56
+ export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload | KnowledgeFiltersEventPayload | ModelPreferencesEventPayload | CreateFlowEventPayload;
@@ -2,4 +2,4 @@ export declare const getDefaultTrackEventConfig: () => {
2
2
  eventType: string;
3
3
  tags: string[];
4
4
  };
5
- export declare const getAttributesFromContexts: (context: unknown) => Record<string, any>;
5
+ export declare const getAttributesFromContexts: (context: unknown) => Record<string, unknown>;
@@ -8,7 +8,7 @@ import type { CreateFlowEventPayload } from '../actions/groups/create-flow';
8
8
  type AgentCreateAction = CreateFlowEventPayload['action'] | AddToolsPromptEventPayload['action'];
9
9
  type CommonAnalyticsAttributes = {
10
10
  touchPoint?: string;
11
- } & Record<string, any>;
11
+ } & Record<string, unknown>;
12
12
  export declare const useRovoAgentCreateAnalytics: (commonAttributes: CommonAnalyticsAttributes) => readonly [string | null, {
13
13
  readonly trackCreateSession: (action: AgentCreateAction, attributes?: CommonAnalyticsAttributes) => void;
14
14
  readonly trackCreateSessionStart: (attributes?: CommonAnalyticsAttributes) => void;
@@ -46,6 +46,26 @@
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;
57
+ agentKnowledge: Record<string, {
58
+ enabled: boolean;
59
+ }> | 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;
68
+ };
49
69
  /**
50
70
  * Discriminated union payload type for create flow events.
51
71
  * Use with `trackAgentEvent()`.
@@ -106,4 +126,12 @@ export type CreateFlowEventPayload = {
106
126
  actionSubject: 'rovoAgent';
107
127
  action: 'published';
108
128
  attributes: VersionedAgentAttributes & Record<string, unknown>;
129
+ } | {
130
+ actionSubject: 'rovoAgent';
131
+ action: 'createFlowPlanGenerated';
132
+ attributes: PlanAnalyticsAttributes & Record<string, unknown>;
133
+ } | {
134
+ actionSubject: 'rovoAgent';
135
+ action: 'createFlowPlanViewed';
136
+ attributes: PlanAnalyticsAttributes & Record<string, unknown>;
109
137
  };
@@ -1,4 +1,5 @@
1
1
  import type { AgentInteractionsEventPayload } from '../actions/groups/agent-interactions';
2
+ import type { CreateFlowEventPayload } from '../actions/groups/create-flow';
2
3
  import type { DebugEventPayload } from '../actions/groups/debug';
3
4
  import type { EditingEventPayload } from '../actions/groups/editing';
4
5
  import type { EvaluationEventPayload } from '../actions/groups/evaluation';
@@ -52,4 +53,4 @@ export type ErrorEventPayload = {
52
53
  * Union of all event payload types.
53
54
  * Use with `trackAgentEvent()` for typed event tracking.
54
55
  */
55
- export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload | KnowledgeFiltersEventPayload | ModelPreferencesEventPayload;
56
+ export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload | KnowledgeFiltersEventPayload | ModelPreferencesEventPayload | CreateFlowEventPayload;
@@ -2,4 +2,4 @@ export declare const getDefaultTrackEventConfig: () => {
2
2
  eventType: string;
3
3
  tags: string[];
4
4
  };
5
- export declare const getAttributesFromContexts: (context: unknown) => Record<string, any>;
5
+ export declare const getAttributesFromContexts: (context: unknown) => Record<string, unknown>;
@@ -8,7 +8,7 @@ import type { CreateFlowEventPayload } from '../actions/groups/create-flow';
8
8
  type AgentCreateAction = CreateFlowEventPayload['action'] | AddToolsPromptEventPayload['action'];
9
9
  type CommonAnalyticsAttributes = {
10
10
  touchPoint?: string;
11
- } & Record<string, any>;
11
+ } & Record<string, unknown>;
12
12
  export declare const useRovoAgentCreateAnalytics: (commonAttributes: CommonAnalyticsAttributes) => readonly [
13
13
  string | null,
14
14
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-analytics",
3
- "version": "1.11.0",
3
+ "version": "2.1.0",
4
4
  "description": "Rovo Agents analytics",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-monorepo",
6
6
  "atlassian": {