@atlaskit/rovo-agent-analytics 2.3.2 → 3.0.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.
Files changed (28) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/actions/groups/create-flow/package.json +1 -8
  3. package/actions/package.json +1 -8
  4. package/create/package.json +1 -8
  5. package/dist/types/actions/groups/agent-interactions.d.ts +0 -8
  6. package/dist/types/actions/groups/editing.d.ts +7 -4
  7. package/dist/types/actions/groups/subagent-interactions.d.ts +0 -8
  8. package/package.json +1 -1
  9. package/dist/types-ts4.5/actions/groups/add-tools-prompt.d.ts +0 -26
  10. package/dist/types-ts4.5/actions/groups/agent-interactions.d.ts +0 -63
  11. package/dist/types-ts4.5/actions/groups/create-flow.d.ts +0 -166
  12. package/dist/types-ts4.5/actions/groups/debug.d.ts +0 -34
  13. package/dist/types-ts4.5/actions/groups/editing.d.ts +0 -75
  14. package/dist/types-ts4.5/actions/groups/evaluation.d.ts +0 -56
  15. package/dist/types-ts4.5/actions/groups/insights.d.ts +0 -22
  16. package/dist/types-ts4.5/actions/groups/knowledge-filters.d.ts +0 -33
  17. package/dist/types-ts4.5/actions/groups/model-preferences.d.ts +0 -25
  18. package/dist/types-ts4.5/actions/groups/subagent-interactions.d.ts +0 -39
  19. package/dist/types-ts4.5/actions/groups/tools.d.ts +0 -45
  20. package/dist/types-ts4.5/actions/index.d.ts +0 -4
  21. package/dist/types-ts4.5/common/ANALYTICS_CHANNEL.d.ts +0 -2
  22. package/dist/types-ts4.5/common/CSID_QUERY_PARAM.d.ts +0 -1
  23. package/dist/types-ts4.5/common/csid/index.d.ts +0 -15
  24. package/dist/types-ts4.5/common/types.d.ts +0 -56
  25. package/dist/types-ts4.5/common/utils/getAttributesFromContexts.d.ts +0 -1
  26. package/dist/types-ts4.5/common/utils/getDefaultTrackEventConfig.d.ts +0 -4
  27. package/dist/types-ts4.5/create/index.d.ts +0 -21
  28. package/dist/types-ts4.5/index.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/rovo-agent-analytics
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f56e7f95fadad`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f56e7f95fadad) -
8
+ Remove redundant `rovoAgent` interaction events `editTools`, `subagentEditTools`,
9
+ `editToolConfiguration`, `subagentEditToolConfiguration` — these are fully covered by the typed
10
+ `rovoAgent updated` events. Add a new `field: 'toolConfiguration'` variant to the
11
+ `rovoAgent updated` event payload, with a required `toolId: string` attribute.
12
+
13
+ ## 2.4.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [`a220a9993d915`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a220a9993d915) -
18
+ Consolidate tools and skills variants of the `rovoAgent updated` event payload: removed the legacy
19
+ `'tools' | 'actions'` and `'actionsAndMcpServers'` field variants in favour of a single `'tools'`
20
+ variant discriminated by `operation: 'remove' | 'change'`. The `'agenticSkills'` variant now also
21
+ requires `operation: 'remove' | 'change'`. `mcpServersCount` and `mcpToolsCount` are required on
22
+ the `'tools'` variant.
23
+
3
24
  ## 2.3.2
4
25
 
5
26
  ### Patch Changes
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
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
- }
9
+ "types": "../../../dist/types/actions/groups/create-flow.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/actions/index.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/actions/index.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/actions/index.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/create/index.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/create/index.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/create/index.d.ts"
17
10
  }
@@ -52,12 +52,4 @@ export type AgentInteractionsEventPayload = {
52
52
  actionSubject: 'rovoAgent';
53
53
  action: 'unverify';
54
54
  attributes: BaseAgentAnalyticsAttributes;
55
- } | {
56
- actionSubject: 'rovoAgent';
57
- action: 'editTools';
58
- attributes: BaseAgentAnalyticsAttributes;
59
- } | {
60
- actionSubject: 'rovoAgent';
61
- action: 'editToolConfiguration';
62
- attributes: BaseAgentAnalyticsAttributes;
63
55
  };
@@ -18,15 +18,18 @@ type FieldAttributes = {
18
18
  isWebSearchEnabled: boolean;
19
19
  } | {
20
20
  field: 'agenticSkills';
21
+ operation: 'remove' | 'change';
21
22
  skillCount: number;
22
23
  } | {
23
- field: 'tools' | 'actions';
24
- toolsCount: number;
25
- } | {
26
- field: 'actionsAndMcpServers';
24
+ field: 'tools';
25
+ operation: 'remove' | 'change';
27
26
  toolsCount: number;
27
+ toolsList: string;
28
28
  mcpServersCount: number;
29
29
  mcpToolsCount: number;
30
+ } | {
31
+ field: 'toolConfiguration';
32
+ toolId: string;
30
33
  } | {
31
34
  field: 'knowledgeSources';
32
35
  knowledgeSourcesCount: number;
@@ -28,12 +28,4 @@ export type SubagentInteractionsEventPayload = {
28
28
  actionSubject: 'rovoAgent';
29
29
  action: 'subagentDelete';
30
30
  attributes: BaseAgentAnalyticsAttributes;
31
- } | {
32
- actionSubject: 'rovoAgent';
33
- action: 'subagentEditTools';
34
- attributes: BaseAgentAnalyticsAttributes;
35
- } | {
36
- actionSubject: 'rovoAgent';
37
- action: 'subagentEditToolConfiguration';
38
- attributes: BaseAgentAnalyticsAttributes;
39
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-analytics",
3
- "version": "2.3.2",
3
+ "version": "3.0.0",
4
4
  "description": "Rovo Agents analytics",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-monorepo",
6
6
  "atlassian": {
@@ -1,26 +0,0 @@
1
- /**
2
- * Action Group: addToolsPrompt
3
- *
4
- * Events related to the "Add Tools" prompt shown during agent creation.
5
- *
6
- * ## Adding a new action
7
- * 1. Add a new variant to the `AddToolsPromptEventPayload` union type below with a data-portal link
8
- * 2. If this action doesn't fit this group, consider creating a new group file instead
9
- */
10
- /**
11
- * Discriminated union payload type for add tools prompt events.
12
- * Use with `trackAgentEvent()`.
13
- */
14
- export type AddToolsPromptEventPayload = {
15
- actionSubject: 'rovoAgent';
16
- action: 'addToolsPromptShown';
17
- attributes: {};
18
- } | {
19
- actionSubject: 'rovoAgent';
20
- action: 'addToolsPromptBrowse';
21
- attributes: {};
22
- } | {
23
- actionSubject: 'rovoAgent';
24
- action: 'addToolsPromptDismiss';
25
- attributes: {};
26
- };
@@ -1,63 +0,0 @@
1
- /**
2
- * Action Group: agentInteractions
3
- *
4
- * User-initiated interactions with an agent — typically from the overflow menu ("...")
5
- * or agent profile surfaces (viewing, editing, deleting, duplicating, starring, sharing, verifying).
6
- *
7
- * NOTE: This is about UI interactions, not backend "actions" (which are being replaced by "tools").
8
- *
9
- * ## Adding a new action
10
- * 1. Add a new variant to the `AgentInteractionsEventPayload` union type below with a data-portal link
11
- * 2. If this action doesn't fit user interactions, create a new group file instead
12
- * (see other files in this directory for the template)
13
- */
14
- import type { BaseAgentAnalyticsAttributes } from '../../common/types';
15
- /**
16
- * Discriminated union payload type for agent interaction events.
17
- * Use with `trackAgentEvent()`.
18
- */
19
- export type AgentInteractionsEventPayload = {
20
- actionSubject: 'rovoAgent';
21
- action: 'view';
22
- attributes: BaseAgentAnalyticsAttributes;
23
- } | {
24
- actionSubject: 'rovoAgent';
25
- action: 'edit';
26
- attributes: BaseAgentAnalyticsAttributes;
27
- } | {
28
- actionSubject: 'rovoAgent';
29
- action: 'copyLink';
30
- attributes: BaseAgentAnalyticsAttributes;
31
- } | {
32
- actionSubject: 'rovoAgent';
33
- action: 'delete';
34
- attributes: BaseAgentAnalyticsAttributes;
35
- } | {
36
- actionSubject: 'rovoAgent';
37
- action: 'duplicate';
38
- attributes: BaseAgentAnalyticsAttributes;
39
- } | {
40
- actionSubject: 'rovoAgent';
41
- action: 'star';
42
- attributes: BaseAgentAnalyticsAttributes;
43
- } | {
44
- actionSubject: 'rovoAgent';
45
- action: 'chat';
46
- attributes: BaseAgentAnalyticsAttributes;
47
- } | {
48
- actionSubject: 'rovoAgent';
49
- action: 'verify';
50
- attributes: BaseAgentAnalyticsAttributes;
51
- } | {
52
- actionSubject: 'rovoAgent';
53
- action: 'unverify';
54
- attributes: BaseAgentAnalyticsAttributes;
55
- } | {
56
- actionSubject: 'rovoAgent';
57
- action: 'editTools';
58
- attributes: BaseAgentAnalyticsAttributes;
59
- } | {
60
- actionSubject: 'rovoAgent';
61
- action: 'editToolConfiguration';
62
- attributes: BaseAgentAnalyticsAttributes;
63
- };
@@ -1,166 +0,0 @@
1
- /**
2
- * Action Group: createFlow
3
- *
4
- * Create agent funnel steps — from clicking "Create agent" through to activation /
5
- * publish.
6
- *
7
- * See LDR for the full reasoning behind the post-versioning funnel:
8
- * https://hello.atlassian.net/wiki/spaces/778dcad2d8a34a91b8ebe71c18678e0c/pages/6851055849
9
- *
10
- * ## Funnel overview
11
- *
12
- * | Step | v1 / NL (today) | v1 / NL + versioning | v2 / SA (today) | v2 / SA + versioning |
13
- * |-------------------------------------|-------------------------|---------------------------------|-------------------------|---------------------------------|
14
- * | Intent to create | createFlowStart | createFlowStart | saDraft | saDraft |
15
- * | Land in NL page | createLandInStudio | createLandInStudio | — | — |
16
- * | NL interaction | createFlowReviewNL / | createFlowReviewNL / | — | — |
17
- * | | createFlowSkipNL | createFlowSkipNL | | |
18
- * | Land on landing w/ SA modal | — | — | createLandIn- | createLandIn- |
19
- * | | | | AgentLandingWithSA | AgentLandingWithSA |
20
- * | Land in configure screen | createLandInConfigure | dropped (no FE draft anymore; | createLandInConfigure | createLandInConfigure |
21
- * | | | createAgentRecord replaces it) | | |
22
- * | Discard | createDiscard | dropped (no FE draft) | — | — |
23
- * | Agent record created (BE mutation) | createFlowActivate | createAgentRecord (NEW) + | createFlowActivate | createFlowActivate |
24
- * | | | createFlowActivate (kept until | | (SA still on FE drafts pre- |
25
- * | | | rollout — RAGE-3459) | | migration) |
26
- * | Published | — | published (NEW) | — | ❓ owned by SA team |
27
- * | Generic error | createFlowError | createFlowError | createFlowError | createFlowError |
28
- *
29
- * Funnel completion (first publish) is derived from `published` events with
30
- * `agentIsPublished === false` in the attributes (i.e. the pre-mutation state).
31
- *
32
- * ## CSID (Create Session ID)
33
- *
34
- * CSID links all events in a single agent creation session.
35
- * - `trackCreateSessionStart()` fires `createFlowStart` with the current CSID
36
- * - `trackCreateSession()` uses the existing CSID (for all other steps including `saDraft`)
37
- *
38
- * With versioning the user can leave and come back days later to keep editing,
39
- * so the in-memory linear "session" assumption breaks. Post-mutation events
40
- * carry `agentId` (via `VersionedAgentAttributes`) which can be used as the
41
- * stable correlation key across sessions. See LDR for the full discussion.
42
- *
43
- * ## Adding a new action
44
- * 1. Add a new variant to the `CreateFlowEventPayload` union type below with a data-portal link
45
- * 2. If this action doesn't fit this group, consider creating a new group file instead
46
- * (see other files in this directory for the template)
47
- */
48
- import type { VersionedAgentAttributes } from '../../common/types';
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
- */
55
- agentKnowledge: Record<string, {
56
- enabled: boolean;
57
- filters: string;
58
- }> | 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;
92
- };
93
- export type AgentPlanAnalyticsAttributes = Omit<AgentPublishAnalyticsAttributes, 'agentId' | 'agentVersionNumber' | 'isFirstPublish'>;
94
- /**
95
- * Discriminated union payload type for create flow events.
96
- * Use with `trackAgentEvent()`.
97
- */
98
- export type CreateFlowEventPayload = {
99
- actionSubject: 'rovoAgent';
100
- action: 'createFlowStart';
101
- attributes: {};
102
- } | {
103
- actionSubject: 'rovoAgent';
104
- action: 'createFlowSkipNL';
105
- attributes: {};
106
- } | {
107
- actionSubject: 'rovoAgent';
108
- action: 'createFlowReviewNL';
109
- attributes: {};
110
- } | {
111
- actionSubject: 'rovoAgent';
112
- action: 'createFlowActivate';
113
- attributes: {};
114
- } | {
115
- actionSubject: 'rovoAgent';
116
- action: 'createFlowRestart';
117
- attributes: {};
118
- } | {
119
- actionSubject: 'rovoAgent';
120
- action: 'createFlowError';
121
- attributes: {};
122
- } | {
123
- actionSubject: 'rovoAgent';
124
- action: 'createLandInStudio';
125
- attributes: {};
126
- } | {
127
- actionSubject: 'rovoAgent';
128
- action: 'createDiscard';
129
- attributes: {};
130
- } | {
131
- actionSubject: 'rovoAgent';
132
- action: 'saDraft';
133
- attributes: {};
134
- } | {
135
- actionSubject: 'rovoAgent';
136
- action: 'createLandInConfigure';
137
- attributes: {};
138
- } | {
139
- actionSubject: 'rovoAgent';
140
- action: 'createSubpathRedirect';
141
- attributes: {};
142
- } | {
143
- actionSubject: 'rovoAgent';
144
- action: 'createLandInAgentLandingWithSA';
145
- attributes: {};
146
- } | {
147
- actionSubject: 'rovoAgent';
148
- action: 'createAgentRecord';
149
- attributes: VersionedAgentAttributes & Record<string, unknown>;
150
- } | {
151
- actionSubject: 'rovoAgent';
152
- action: 'published';
153
- attributes: AgentPublishAnalyticsAttributes & Record<string, unknown>;
154
- } | {
155
- actionSubject: 'rovoAgent';
156
- action: 'createFlowPlanGenerated';
157
- attributes: AgentPlanAnalyticsAttributes & Record<string, unknown>;
158
- } | {
159
- actionSubject: 'rovoAgent';
160
- action: 'createFlowPlanViewed';
161
- attributes: AgentPlanAnalyticsAttributes & Record<string, unknown>;
162
- } | {
163
- actionSubject: 'setIsAgentAssignable';
164
- action: 'success';
165
- attributes: Record<string, unknown>;
166
- };
@@ -1,34 +0,0 @@
1
- /**
2
- * Action Group: debug
3
- *
4
- * Actions related to the agent debug modal (viewing, copying debug data, toggling skill info).
5
- *
6
- * ## Adding a new action
7
- * 1. Add a new variant to the `DebugEventPayload` union type below with a data-portal link
8
- * 2. If this action doesn't fit this group, consider creating a new group file instead
9
- * (see other files in this directory for the template)
10
- */
11
- /**
12
- * Discriminated union payload type for debug events.
13
- * Use with `trackAgentEvent()`.
14
- */
15
- export type DebugEventPayload = {
16
- actionSubject: 'rovoAgent';
17
- action: 'debugView';
18
- attributes: {};
19
- } | {
20
- actionSubject: 'rovoAgent';
21
- action: 'debugCopyAll';
22
- attributes: {};
23
- } | {
24
- actionSubject: 'rovoAgent';
25
- action: 'debugCopy';
26
- attributes: {};
27
- } | {
28
- actionSubject: 'rovoAgent';
29
- action: 'debugToggleSkillInfo';
30
- attributes: {
31
- toolId: string;
32
- isExpanded: boolean;
33
- };
34
- };
@@ -1,75 +0,0 @@
1
- /**
2
- * Action Group: editing
3
- *
4
- * Agent editing/mutation events — fired when an agent's configuration is saved or modified.
5
- * Unlike agentInteractions (user clicks), these track actual data changes.
6
- *
7
- * ## Adding a new action
8
- * 1. Add a new variant to the `EditingEventPayload` union type below with a data-portal link
9
- * 2. If this action doesn't fit editing/mutation events, create a new group file instead
10
- * (see other files in this directory for the template)
11
- */
12
- import type { VersionedAgentAttributes } from '../../common/types';
13
- type FieldAttributes = {
14
- field: 'deepResearch';
15
- isDeepResearchEnabled: boolean;
16
- } | {
17
- field: 'webSearch';
18
- isWebSearchEnabled: boolean;
19
- } | {
20
- field: 'agenticSkills';
21
- skillCount: number;
22
- } | {
23
- field: 'tools' | 'actions';
24
- toolsCount: number;
25
- } | {
26
- field: 'actionsAndMcpServers';
27
- toolsCount: number;
28
- mcpServersCount: number;
29
- mcpToolsCount: number;
30
- } | {
31
- field: 'knowledgeSources';
32
- knowledgeSourcesCount: number;
33
- } | {
34
- field: 'knowledgeScope';
35
- isKnowledgeEnabled: boolean;
36
- } | {
37
- field: 'name';
38
- } | {
39
- field: 'description';
40
- } | {
41
- field: 'instructions';
42
- } | {
43
- field: 'behaviour';
44
- } | {
45
- field: 'invocationDescription';
46
- } | {
47
- field: 'authoringTeam';
48
- } | {
49
- field: 'authoringTeamId';
50
- } | {
51
- field: 'creatorId';
52
- } | {
53
- field: 'isActive';
54
- } | {
55
- field: 'isDefault';
56
- } | {
57
- field: 'responseStrategy';
58
- } | {
59
- field: 'executionConfig';
60
- };
61
- export type EditingEventPayload = {
62
- actionSubject: 'rovoAgent';
63
- action: 'updated';
64
- attributes: VersionedAgentAttributes & {
65
- agentType?: string;
66
- /**
67
- * Identifies the subagent (formerly "scenario") whose configuration was updated.
68
- * Pass the scenario/subagent id when the analytics event is fired at the
69
- * scenario/subagent level. Pass `null` when the event is fired at the agent
70
- * level (i.e. not scoped to any specific subagent).
71
- */
72
- subagentId: string | null;
73
- } & FieldAttributes;
74
- };
75
- export {};
@@ -1,56 +0,0 @@
1
- /**
2
- * Action Group: evaluation
3
- *
4
- * Batch evaluation events — dataset CRUD, job lifecycle, and validation UI events
5
- * fired from the shared `agent-evaluation` package.
6
- *
7
- * ## Adding a new action
8
- * 1. Add a new variant to the `EvaluationEventPayload` union type below with a data-portal link
9
- * 2. If this action doesn't fit this group, consider creating a new group file instead
10
- * (see other files in this directory for the template)
11
- */
12
- type EvalAttributesBase = {
13
- objectType?: string;
14
- objectId?: string;
15
- containerType?: string;
16
- containerId?: string;
17
- actionSubjectId?: string;
18
- };
19
- export type EvaluationEventPayload = ({
20
- actionSubject: 'batchEvaluationDataset';
21
- action: 'created';
22
- attributes: {
23
- totalQuestions: number;
24
- };
25
- } & EvalAttributesBase) | ({
26
- actionSubject: 'batchEvaluationJob';
27
- action: 'created';
28
- attributes: {
29
- datasetSize: number;
30
- isDraftAgent: boolean;
31
- judgeMode: string | undefined;
32
- };
33
- } & EvalAttributesBase) | ({
34
- actionSubject: 'batchEvaluationDataset';
35
- action: 'deleted';
36
- attributes: {};
37
- } & EvalAttributesBase) | ({
38
- actionSubject: 'batchEvaluationDatasetQuestion';
39
- action: 'deleted';
40
- attributes: {};
41
- } & EvalAttributesBase) | ({
42
- actionSubject: 'evalResultsModal';
43
- action: 'viewed';
44
- attributes: {
45
- trigger: 'row_action' | 'flag_action';
46
- };
47
- } & EvalAttributesBase) | ({
48
- actionSubject: 'batchEvaluationJob';
49
- action: 'completed';
50
- attributes: {
51
- status: string | null;
52
- durationMs: number | null;
53
- datasetSize: number | null | undefined;
54
- };
55
- } & EvalAttributesBase);
56
- export {};
@@ -1,22 +0,0 @@
1
- /**
2
- * Action Group: insights
3
- *
4
- * Actions related to the insights page (viewing, filtering, sorting data).
5
- *
6
- * ## Adding a new action
7
- * 1. Add a new variant to the `InsightsEventPayload` union type below with a data-portal link
8
- * 2. If this action doesn't fit this group, consider creating a new group file instead
9
- * (see other files in this directory for the template)
10
- */
11
- /**
12
- * Discriminated union payload type for insights events.
13
- * Use with `trackAgentEvent()`.
14
- */
15
- export type InsightsEventPayload = {
16
- actionSubject: 'rovoAgent';
17
- action: 'insightsDateFilterChanged';
18
- attributes: {
19
- filterType: 'preset' | 'custom';
20
- days?: number;
21
- };
22
- };
@@ -1,33 +0,0 @@
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 {};
@@ -1,25 +0,0 @@
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
- };
@@ -1,39 +0,0 @@
1
- /**
2
- * Action Group: agentInteractions
3
- *
4
- * User-initiated interactions with an agent — typically from the overflow menu ("...")
5
- * or agent profile surfaces (viewing, editing, deleting, duplicating, starring, sharing, verifying).
6
- *
7
- * NOTE: This is about UI interactions, not backend "actions" (which are being replaced by "tools").
8
- *
9
- * ## Adding a new action
10
- * 1. Add a new variant to the `AgentInteractionsEventPayload` union type below with a data-portal link
11
- * 2. If this action doesn't fit user interactions, create a new group file instead
12
- * (see other files in this directory for the template)
13
- */
14
- import type { BaseAgentAnalyticsAttributes } from '../../common/types';
15
- /**
16
- * Discriminated union payload type for agent interaction events.
17
- * Use with `trackAgentEvent()`.
18
- */
19
- export type SubagentInteractionsEventPayload = {
20
- actionSubject: 'rovoAgent';
21
- action: 'subagentCreate';
22
- attributes: BaseAgentAnalyticsAttributes;
23
- } | {
24
- actionSubject: 'rovoAgent';
25
- action: 'subagentEdit';
26
- attributes: BaseAgentAnalyticsAttributes;
27
- } | {
28
- actionSubject: 'rovoAgent';
29
- action: 'subagentDelete';
30
- attributes: BaseAgentAnalyticsAttributes;
31
- } | {
32
- actionSubject: 'rovoAgent';
33
- action: 'subagentEditTools';
34
- attributes: BaseAgentAnalyticsAttributes;
35
- } | {
36
- actionSubject: 'rovoAgent';
37
- action: 'subagentEditToolConfiguration';
38
- attributes: BaseAgentAnalyticsAttributes;
39
- };
@@ -1,45 +0,0 @@
1
- /**
2
- * Action Group: tools
3
- *
4
- * Actions related to agent tool execution during chat
5
- * (confirming, streaming, viewing results, errors).
6
- *
7
- * ## Adding a new action
8
- * 1. Add a new variant to the `ToolsEventPayload` union type below with a data-portal link
9
- * 2. If this action doesn't fit this group, consider creating a new group file instead
10
- * (see other files in this directory for the template)
11
- */
12
- import type { BaseAgentAnalyticsAttributes } from '../../common/types';
13
- type ToolsExecutionAttributesBase = BaseAgentAnalyticsAttributes & {
14
- tools: {
15
- toolId: string;
16
- toolKey?: string;
17
- toolDefinitionSource: string | null;
18
- resolutionType: string;
19
- }[];
20
- singleInstrumentationId: string | undefined;
21
- };
22
- export type ToolsEventPayload = {
23
- actionSubject: 'rovoAgent';
24
- action: 'toolsExecutionConfirmed';
25
- attributes: ToolsExecutionAttributesBase;
26
- } | {
27
- actionSubject: 'rovoAgent';
28
- action: 'toolsExecutionCancelled';
29
- attributes: ToolsExecutionAttributesBase;
30
- } | {
31
- actionSubject: 'rovoAgent';
32
- action: 'toolsExecutionStreamStopped';
33
- attributes: ToolsExecutionAttributesBase;
34
- } | {
35
- actionSubject: 'rovoAgent';
36
- action: 'toolsExecutionResultViewed';
37
- attributes: ToolsExecutionAttributesBase & {
38
- scenarioId: string | null | undefined;
39
- };
40
- } | {
41
- actionSubject: 'rovoAgent';
42
- action: 'toolsExecutionResultError';
43
- attributes: ToolsExecutionAttributesBase;
44
- };
45
- export {};
@@ -1,4 +0,0 @@
1
- import { type EventPayload } from '../common/types';
2
- export declare const useRovoAgentActionAnalytics: <T extends {}>(commonAttributes: T) => {
3
- trackAgentEvent: (payload: EventPayload) => void;
4
- };
@@ -1,2 +0,0 @@
1
- import { FabricChannel } from '@atlaskit/analytics-listeners';
2
- export declare const ANALYTICS_CHANNEL: FabricChannel.aiMate;
@@ -1 +0,0 @@
1
- export declare const CSID_QUERY_PARAM = "csid";
@@ -1,15 +0,0 @@
1
- /**
2
- * Hook to manage CSID state for entry point components.
3
- * The returned csid is used in href attributes and by trackCreateSessionStart.
4
- * After trackCreateSessionStart fires, it calls refresh() to generate a new CSID
5
- * for the next session — the component re-renders and the href updates.
6
- */
7
- export declare const useRovoAgentCSID: () => readonly [
8
- {
9
- readonly csid: string | null;
10
- readonly globalCSID: string | null;
11
- },
12
- {
13
- refresh: () => `${string}-${string}-${string}-${string}-${string}`;
14
- }
15
- ];
@@ -1,56 +0,0 @@
1
- import type { AgentInteractionsEventPayload } from '../actions/groups/agent-interactions';
2
- import type { CreateFlowEventPayload } from '../actions/groups/create-flow';
3
- import type { DebugEventPayload } from '../actions/groups/debug';
4
- import type { EditingEventPayload } from '../actions/groups/editing';
5
- import type { EvaluationEventPayload } from '../actions/groups/evaluation';
6
- import type { InsightsEventPayload } from '../actions/groups/insights';
7
- import type { KnowledgeFiltersEventPayload } from '../actions/groups/knowledge-filters';
8
- import type { ModelPreferencesEventPayload } from '../actions/groups/model-preferences';
9
- import type { SubagentInteractionsEventPayload } from '../actions/groups/subagent-interactions';
10
- import type { ToolsEventPayload } from '../actions/groups/tools';
11
- export type RemainingRequired<T, P extends Partial<T>> = Required<Omit<T, keyof P>>;
12
- export type BaseAgentAnalyticsAttributes = {
13
- touchPoint?: string;
14
- agentId?: string;
15
- };
16
- /**
17
- * Common attributes for events scoped to a single versioned agent.
18
- *
19
- * Extends `BaseAgentAnalyticsAttributes` with versioning state so DS can
20
- * distinguish first-publish vs republish, edits-on-draft vs edits-after-publish,
21
- * etc. without needing a separate event per state.
22
- *
23
- * - `agentIsPublished` — sourced from the BE `AgentStudioAssistant.isPublished`
24
- * field. Whether the agent has at least one published version.
25
- * - `agentVersionNumber` — the version number the event relates to (e.g. the
26
- * version being edited or published). Sourced from the BE
27
- * `AgentStudioAssistant.version.versionNumber` field.
28
- *
29
- * Apply to every event scoped to a single agent (CRUD, publish, AND usage events).
30
- * Pre-mutation create-flow events stay attribute-free — no `agentId` exists yet.
31
- */
32
- export type VersionedAgentAttributes = BaseAgentAnalyticsAttributes & {
33
- agentIsPublished?: boolean | null;
34
- agentVersionNumber?: number | null;
35
- };
36
- /** Common library attribute injected into all events */
37
- export declare const LIBRARY_ATTRIBUTE: "agents-analytics";
38
- /**
39
- * Generic error event payload type.
40
- * Use with `trackAgentEvent()` to track error events.
41
- */
42
- export type ErrorEventPayload = {
43
- actionSubject: 'rovoAgentError';
44
- action: string;
45
- attributes: {
46
- error: {
47
- message: string;
48
- };
49
- [key: string]: unknown;
50
- };
51
- };
52
- /**
53
- * Union of all event payload types.
54
- * Use with `trackAgentEvent()` for typed event tracking.
55
- */
56
- export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload | KnowledgeFiltersEventPayload | ModelPreferencesEventPayload | CreateFlowEventPayload;
@@ -1 +0,0 @@
1
- export declare const getAttributesFromContexts: (context: unknown) => Record<string, unknown>;
@@ -1,4 +0,0 @@
1
- export declare const getDefaultTrackEventConfig: () => {
2
- eventType: string;
3
- tags: string[];
4
- };
@@ -1,21 +0,0 @@
1
- import type { AddToolsPromptEventPayload } from '../actions/groups/add-tools-prompt';
2
- import type { CreateFlowEventPayload } from '../actions/groups/create-flow';
3
- /**
4
- * Union of all valid actions for the create agent analytics hook.
5
- * Derived from the event payload types in the action group files.
6
- * To add a new action, update the payload type in the relevant group file.
7
- */
8
- type AgentCreateAction = CreateFlowEventPayload['action'] | AddToolsPromptEventPayload['action'];
9
- type CommonAnalyticsAttributes = {
10
- touchPoint?: string;
11
- } & Record<string, unknown>;
12
- export declare const useRovoAgentCreateAnalytics: (commonAttributes: CommonAnalyticsAttributes) => readonly [
13
- string | null,
14
- {
15
- readonly trackCreateSession: (action: AgentCreateAction, attributes?: CommonAnalyticsAttributes) => void;
16
- readonly trackCreateSessionStart: (attributes?: CommonAnalyticsAttributes) => void;
17
- readonly trackCreateSessionError: (error: Error, attributes?: CommonAnalyticsAttributes) => void;
18
- readonly refreshCSID: () => string;
19
- }
20
- ];
21
- export {};
@@ -1 +0,0 @@
1
- export declare const useRovoAgentActionAnalytics: () => void;