@atlaskit/rovo-agent-analytics 2.0.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,13 @@
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
+
3
11
  ## 2.0.0
4
12
 
5
13
  ### Major 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
+ }
@@ -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;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-analytics",
3
- "version": "2.0.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": {