@atlaskit/rovo-agent-analytics 0.18.0 → 0.20.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 (67) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +103 -58
  3. package/actions/add-tools-prompt/package.json +17 -0
  4. package/actions/agent-interactions/package.json +17 -0
  5. package/actions/create-flow/package.json +17 -0
  6. package/actions/debug/package.json +17 -0
  7. package/actions/editing/package.json +17 -0
  8. package/actions/evaluation/package.json +17 -0
  9. package/actions/tool-actions/package.json +5 -5
  10. package/dist/cjs/actions/groups/add-tools-prompt.js +43 -0
  11. package/dist/cjs/actions/groups/agent-interactions.js +55 -0
  12. package/dist/cjs/actions/groups/create-flow.js +51 -0
  13. package/dist/cjs/actions/groups/debug.js +42 -0
  14. package/dist/cjs/actions/groups/editing.js +32 -0
  15. package/dist/cjs/actions/groups/evaluation.js +1 -0
  16. package/dist/cjs/actions/{tool-actions/index.js → groups/tools.js} +25 -2
  17. package/dist/cjs/actions/index.js +46 -36
  18. package/dist/cjs/actions/registry.js +26 -0
  19. package/dist/cjs/common/types.js +13 -1
  20. package/dist/cjs/create/index.js +12 -33
  21. package/dist/es2019/actions/groups/add-tools-prompt.js +37 -0
  22. package/dist/es2019/actions/groups/agent-interactions.js +50 -0
  23. package/dist/es2019/actions/groups/create-flow.js +45 -0
  24. package/dist/es2019/actions/groups/debug.js +37 -0
  25. package/dist/es2019/actions/groups/editing.js +27 -0
  26. package/dist/es2019/actions/groups/evaluation.js +0 -0
  27. package/dist/es2019/actions/{tool-actions/index.js → groups/tools.js} +27 -1
  28. package/dist/es2019/actions/index.js +48 -35
  29. package/dist/es2019/actions/registry.js +20 -0
  30. package/dist/es2019/common/types.js +7 -0
  31. package/dist/es2019/create/index.js +15 -32
  32. package/dist/esm/actions/groups/add-tools-prompt.js +37 -0
  33. package/dist/esm/actions/groups/agent-interactions.js +50 -0
  34. package/dist/esm/actions/groups/create-flow.js +45 -0
  35. package/dist/esm/actions/groups/debug.js +37 -0
  36. package/dist/esm/actions/groups/editing.js +27 -0
  37. package/dist/esm/actions/groups/evaluation.js +0 -0
  38. package/dist/esm/actions/{tool-actions/index.js → groups/tools.js} +27 -1
  39. package/dist/esm/actions/index.js +47 -36
  40. package/dist/esm/actions/registry.js +20 -0
  41. package/dist/esm/common/types.js +7 -0
  42. package/dist/esm/create/index.js +13 -33
  43. package/dist/types/actions/groups/add-tools-prompt.d.ts +39 -0
  44. package/dist/types/actions/groups/agent-interactions.d.ts +81 -0
  45. package/dist/types/actions/groups/create-flow.d.ts +65 -0
  46. package/dist/types/actions/groups/debug.d.ts +55 -0
  47. package/dist/types/actions/groups/editing.d.ts +33 -0
  48. package/dist/types/actions/groups/evaluation.d.ts +56 -0
  49. package/dist/types/actions/groups/tools.d.ts +69 -0
  50. package/dist/types/actions/index.d.ts +18 -47
  51. package/dist/types/actions/registry.d.ts +23 -0
  52. package/dist/types/common/types.d.ts +14 -0
  53. package/dist/types/create/index.d.ts +17 -15
  54. package/dist/types-ts4.5/actions/groups/add-tools-prompt.d.ts +39 -0
  55. package/dist/types-ts4.5/actions/groups/agent-interactions.d.ts +81 -0
  56. package/dist/types-ts4.5/actions/groups/create-flow.d.ts +65 -0
  57. package/dist/types-ts4.5/actions/groups/debug.d.ts +55 -0
  58. package/dist/types-ts4.5/actions/groups/editing.d.ts +33 -0
  59. package/dist/types-ts4.5/actions/groups/evaluation.d.ts +56 -0
  60. package/dist/types-ts4.5/actions/groups/tools.d.ts +69 -0
  61. package/dist/types-ts4.5/actions/index.d.ts +18 -47
  62. package/dist/types-ts4.5/actions/registry.d.ts +23 -0
  63. package/dist/types-ts4.5/common/types.d.ts +14 -0
  64. package/dist/types-ts4.5/create/index.d.ts +17 -15
  65. package/package.json +2 -2
  66. package/dist/types/actions/tool-actions/index.d.ts +0 -18
  67. package/dist/types-ts4.5/actions/tool-actions/index.d.ts +0 -18
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/rovo-agent-analytics
2
2
 
3
+ ## 0.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`30edbd0d978ea`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/30edbd0d978ea) -
8
+ Deprecate trackAgentAction() and enums exports, introduce trackAgentEvent()
9
+
10
+ ## 0.19.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`2ccb8729cef96`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2ccb8729cef96) -
15
+ Reorg agent action enums to different files, add the actionGroup to the analytics
16
+
3
17
  ## 0.18.0
4
18
 
5
19
  ### Minor Changes
package/README.md CHANGED
@@ -1,17 +1,21 @@
1
1
  # RovoAgentAnalytics
2
2
 
3
- Rovo Agents analytics
3
+ Rovo Agents analytics library for composing and sending typed analytics events.
4
4
 
5
5
  ## Usage
6
6
 
7
- `import RovoAgentAnalytics from '@atlaskit/rovo-agent-analytics';`
7
+ ```typescript
8
+ import { useRovoAgentActionAnalytics } from '@atlaskit/rovo-agent-analytics/actions';
9
+ ```
8
10
 
9
11
  Detailed docs and example usage can be found
10
12
  [here](https://atlaskit.atlassian.com/packages/ai-mate/rovo-agent-analytics).
11
13
 
12
14
  ## Examples
13
15
 
14
- ### Basic usage with common attributes
16
+ ### Basic usage with `trackAgentAction()` (deprecated)
17
+
18
+ For simple actions with default `actionSubject: 'rovoAgent'`:
15
19
 
16
20
  ```typescript
17
21
  import { useRovoAgentActionAnalytics, AgentCommonActions } from '@atlaskit/rovo-agent-analytics';
@@ -25,91 +29,132 @@ const { trackAgentAction } = useRovoAgentActionAnalytics({
25
29
  trackAgentAction(AgentCommonActions.DUPLICATE, {});
26
30
  ```
27
31
 
28
- ### Usage with debug actions (no attributes required)
32
+ > **Note:** `trackAgentAction()` is deprecated. Prefer `trackAgentEvent()` for new code.
29
33
 
30
- ```typescript
31
- import { useRovoAgentActionAnalytics, AgentDebugActions } from '@atlaskit/rovo-agent-analytics';
34
+ ### Full Event Tracking with `trackAgentEvent()` (recommended)
32
35
 
33
- const { trackAgentAction } = useRovoAgentActionAnalytics({});
36
+ For fully-typed events with explicit `action`, `actionSubject`, and `attributes`:
34
37
 
35
- // Debug actions don't require any attributes
36
- trackAgentAction(AgentDebugActions.VIEW, {});
37
- trackAgentAction(AgentDebugActions.COPY, {});
38
+ ```typescript
39
+ import { useRovoAgentActionAnalytics } from '@atlaskit/rovo-agent-analytics/actions';
40
+
41
+ const { trackAgentEvent } = useRovoAgentActionAnalytics({});
42
+
43
+ // Full control over event properties — all fields are type-checked
44
+ trackAgentEvent({
45
+ action: 'created',
46
+ actionSubject: 'batchEvaluationDataset',
47
+ attributes: {
48
+ totalQuestions: 5
49
+ },
50
+ objectType: 'batchEvaluationDataset',
51
+ objectId: 'dataset-123',
52
+ });
38
53
  ```
39
54
 
40
- ## Adding New Actions
55
+ ### When to use `trackAgentEvent()` vs `trackAgentAction()`
41
56
 
42
- ### Step 1: Add the action to the appropriate enum
57
+ | Use Case | Function |
58
+ | --- | --- |
59
+ | New code (recommended) | `trackAgentEvent()` |
60
+ | Events with custom `actionSubject` | `trackAgentEvent()` |
61
+ | Events with `source`, `objectType`, `objectId`, etc. | `trackAgentEvent()` |
62
+ | Legacy code with default `actionSubject: 'rovoAgent'` | `trackAgentAction()` (deprecated) |
43
63
 
44
- Add your new action to either `AgentCommonActions` or `AgentDebugActions` in
45
- `src/actions/index.tsx`:
64
+ ## Payload Types
46
65
 
47
- ```typescript
48
- export enum AgentCommonActions {
49
- // ... existing actions
50
- /* My new action - https://data-portal.internal.atlassian.com/analytics/registry/XXXXX */
51
- MY_NEW_ACTION = 'myNewAction',
52
- }
53
- ```
66
+ Each group file in `src/actions/groups/` exports a **discriminated union payload type** that defines all valid event shapes for that group.
67
+
68
+ | File | Payload Type | Description |
69
+ | --- | --- | --- |
70
+ | `agent-interactions.ts` | `AgentInteractionsEventPayload` | User-initiated interactions (view, edit, delete, duplicate, star, chat, verify…) |
71
+ | `editing.ts` | `EditingEventPayload` | Agent save/mutation events (updated) |
72
+ | `debug.ts` | `DebugEventPayload` | Debug modal actions (view, copy, toggle skill info) |
73
+ | `tools.ts` | `ToolsEventPayload` | Tool execution actions (confirm, stream stop, result viewed, error) |
74
+ | `evaluation.ts` | `EvaluationEventPayload` | Batch evaluation events (dataset CRUD, job lifecycle, results viewed) |
75
+ | `create-flow.ts` | `CreateFlowEventPayload` | Create agent funnel steps |
76
+ | `add-tools-prompt.ts` | `AddToolsPromptEventPayload` | Add tools prompt modal events |
77
+
78
+ The combined `EventPayload` type (exported from `types.ts`) is a union of all these payload types.
79
+
80
+ ## Adding a New Action
54
81
 
55
- ### Step 2: Define attributes for the action
82
+ ### To an existing payload type
56
83
 
57
- Add an entry to `ActionAttributes` to specify which attributes this action requires:
84
+ 1. Open the group file (e.g. `src/actions/groups/agent-interactions.ts`)
85
+ 2. Add a new variant to the payload union type with a data-portal registry link:
58
86
 
59
87
  ```typescript
60
- type ActionAttributes = {
61
- // ... existing actions
62
- [AgentCommonActions.MY_NEW_ACTION]: CommonAnalyticsAttributes;
63
- };
88
+ export type AgentInteractionsEventPayload =
89
+ | {
90
+ // https://data-portal.internal.atlassian.com/analytics/registry/XXXXX
91
+ actionSubject: 'rovoAgent';
92
+ action: 'myNewAction';
93
+ attributes: BaseAgentAnalyticsAttributes & {
94
+ myCustomField: string;
95
+ };
96
+ }
97
+ | // ... existing variants
64
98
  ```
65
99
 
66
- ## Defining Custom Attributes Per Action
100
+ That's it TypeScript will enforce the correct shape when calling `trackAgentEvent()`.
67
101
 
68
- Each action can have its own specific attributes. The `trackAgentAction` function is generic and
69
- will enforce the correct attributes based on the action you pass.
102
+ ### To a new group
70
103
 
71
- ### Using CommonAnalyticsAttributes
104
+ If your action doesn't fit any existing group, create a new one:
72
105
 
73
- For actions that only need `touchPoint` and `agentId`:
106
+ 1. Create a new file in `src/actions/groups/` following the existing template
107
+ 2. Export a discriminated union payload type (e.g. `MyFeatureEventPayload`)
108
+ 3. Add the new type to the `EventPayload` union in `src/common/types.ts`:
74
109
 
75
110
  ```typescript
76
- type ActionAttributes = {
77
- [AgentCommonActions.VIEW]: CommonAnalyticsAttributes;
78
- };
111
+ import type { MyFeatureEventPayload } from '../actions/groups/my-feature';
112
+
113
+ export type EventPayload =
114
+ | EditingEventPayload
115
+ | AgentInteractionsEventPayload
116
+ // ... existing types
117
+ | MyFeatureEventPayload;
79
118
  ```
80
119
 
81
- ### Using Custom Attributes
120
+ ## Defining Custom Attributes
82
121
 
83
- For actions that need additional attributes beyond the common ones:
122
+ Each action variant in a payload type can have its own specific attributes:
84
123
 
85
- ```typescript
86
- type ActionAttributes = {
87
- [AgentCommonActions.STAR]: CommonAnalyticsAttributes & { isStarred: boolean };
88
- };
89
- ```
124
+ ### Using BaseAgentAnalyticsAttributes
90
125
 
91
- When calling `trackAgentAction`, TypeScript will enforce the custom attributes:
126
+ For actions that need `touchPoint` and `agentId`:
92
127
 
93
128
  ```typescript
94
- // TypeScript will require isStarred to be provided
95
- trackAgentAction(AgentCommonActions.STAR, { isStarred: true });
129
+ {
130
+ actionSubject: 'rovoAgent';
131
+ action: 'view';
132
+ attributes: BaseAgentAnalyticsAttributes;
133
+ }
96
134
  ```
97
135
 
98
- ### How Type Inference Works
136
+ ### Using Custom Attributes
137
+
138
+ For actions that need additional attributes:
99
139
 
100
- The `trackAgentAction` function uses generics to infer required attributes:
140
+ ```typescript
141
+ {
142
+ actionSubject: 'rovoAgent';
143
+ action: 'updated';
144
+ attributes: BaseAgentAnalyticsAttributes & {
145
+ agentType: string;
146
+ field: string;
147
+ };
148
+ }
149
+ ```
101
150
 
102
- 1. When you call `trackAgentAction(action, attributes)`, TypeScript infers the action type
103
- 2. It looks up `ActionAttributes[action]` to get the required attributes for that action
104
- 3. It subtracts any attributes already provided in `commonAttributes` (via `RemainingRequired`)
105
- 4. The remaining attributes must be provided in the `attributes` parameter
151
+ ## Backwards Compatibility
106
152
 
107
- Example:
153
+ The following exports are **deprecated** but still available for existing consumers:
108
154
 
109
- ```typescript
110
- // If commonAttributes already includes agentId
111
- const { trackAgentAction } = useRovoAgentActionAnalytics({ agentId: '123' });
155
+ - `trackAgentAction()` — use `trackAgentEvent()` instead
156
+ - `trackAgentActionError()` use `trackAgentEvent()` instead
157
+ - Enum exports (e.g. `AgentEditingActions`, `AgentEvalActions`) use string literals instead
158
+ - `ActionAttributes` type — use `EventPayload` instead
112
159
 
113
- // Only touchPoint is required since agentId was already provided
114
- trackAgentAction(AgentCommonActions.VIEW, { touchPoint: 'my-touchpoint' });
115
- ```
160
+ These will be removed in a future major version.
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/rovo-agent-analytics/actions/add-tools-prompt",
3
+ "main": "../../dist/cjs/actions/groups/add-tools-prompt.js",
4
+ "module": "../../dist/esm/actions/groups/add-tools-prompt.js",
5
+ "module:es2019": "../../dist/es2019/actions/groups/add-tools-prompt.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/actions/groups/add-tools-prompt.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../../dist/types-ts4.5/actions/groups/add-tools-prompt.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/rovo-agent-analytics/actions/agent-interactions",
3
+ "main": "../../dist/cjs/actions/groups/agent-interactions.js",
4
+ "module": "../../dist/esm/actions/groups/agent-interactions.js",
5
+ "module:es2019": "../../dist/es2019/actions/groups/agent-interactions.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/actions/groups/agent-interactions.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../../dist/types-ts4.5/actions/groups/agent-interactions.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/rovo-agent-analytics/actions/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
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/rovo-agent-analytics/actions/debug",
3
+ "main": "../../dist/cjs/actions/groups/debug.js",
4
+ "module": "../../dist/esm/actions/groups/debug.js",
5
+ "module:es2019": "../../dist/es2019/actions/groups/debug.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/actions/groups/debug.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../../dist/types-ts4.5/actions/groups/debug.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/rovo-agent-analytics/actions/editing",
3
+ "main": "../../dist/cjs/actions/groups/editing.js",
4
+ "module": "../../dist/esm/actions/groups/editing.js",
5
+ "module:es2019": "../../dist/es2019/actions/groups/editing.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/actions/groups/editing.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../../dist/types-ts4.5/actions/groups/editing.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/rovo-agent-analytics/actions/evaluation",
3
+ "main": "../../dist/cjs/actions/groups/evaluation.js",
4
+ "module": "../../dist/esm/actions/groups/evaluation.js",
5
+ "module:es2019": "../../dist/es2019/actions/groups/evaluation.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/actions/groups/evaluation.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../../dist/types-ts4.5/actions/groups/evaluation.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-analytics/actions/tool-actions",
3
- "main": "../../dist/cjs/actions/tool-actions/index.js",
4
- "module": "../../dist/esm/actions/tool-actions/index.js",
5
- "module:es2019": "../../dist/es2019/actions/tool-actions/index.js",
3
+ "main": "../../dist/cjs/actions/groups/tools.js",
4
+ "module": "../../dist/esm/actions/groups/tools.js",
5
+ "module:es2019": "../../dist/es2019/actions/groups/tools.js",
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../../dist/types/actions/tool-actions/index.d.ts",
9
+ "types": "../../dist/types/actions/groups/tools.d.ts",
10
10
  "typesVersions": {
11
11
  ">=4.5 <5.9": {
12
12
  "*": [
13
- "../../dist/types-ts4.5/actions/tool-actions/index.d.ts"
13
+ "../../dist/types-ts4.5/actions/groups/tools.d.ts"
14
14
  ]
15
15
  }
16
16
  }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AddToolsPromptActions = exports.ACTION_GROUP = void 0;
7
+ /**
8
+ * Action Group: addToolsPrompt
9
+ *
10
+ * Add tools prompt modal — shown when a user tries to activate/publish an agent that has no tools.
11
+ * The user can browse tools or dismiss and proceed without them.
12
+ *
13
+ * This group is intentionally flow-agnostic so the action values stay stable
14
+ * regardless of whether the prompt fires from the create flow or a future publish flow.
15
+ *
16
+ * ## Adding a new action
17
+ * 1. Add a new variant to the `AddToolsPromptEventPayload` union type below with a data-portal link
18
+ * 2. If this action doesn't fit this group, consider creating a new group file instead
19
+ * (see other files in this directory for the template)
20
+ */
21
+
22
+ /**
23
+ * Discriminated union payload type for add tools prompt events.
24
+ * Use with `trackAgentEvent()`.
25
+ */
26
+
27
+ // ============================================================================
28
+ // BACKWARDS COMPAT (deprecated): Keep enum and attributes for trackAgentAction() consumers
29
+ // ============================================================================
30
+
31
+ /** @deprecated Use AddToolsPromptEventPayload with trackAgentEvent() instead */
32
+ var ACTION_GROUP = exports.ACTION_GROUP = 'addToolsPrompt';
33
+
34
+ /** @deprecated Use AddToolsPromptEventPayload with trackAgentEvent() instead */
35
+ var AddToolsPromptActions = exports.AddToolsPromptActions = /*#__PURE__*/function (AddToolsPromptActions) {
36
+ /* Add tools prompt shown (agent has no tools) - https://data-portal.internal.atlassian.com/analytics/registry/98106 */
37
+ AddToolsPromptActions["SHOWN"] = "addToolsPromptShown";
38
+ /* User clicked "Browse skills" on the add tools prompt - https://data-portal.internal.atlassian.com/analytics/registry/98107 */
39
+ AddToolsPromptActions["BROWSE"] = "addToolsPromptBrowse";
40
+ /* User dismissed the add tools prompt ("No thanks") and proceeded anyway - https://data-portal.internal.atlassian.com/analytics/registry/98108 */
41
+ AddToolsPromptActions["DISMISS"] = "addToolsPromptDismiss";
42
+ return AddToolsPromptActions;
43
+ }({});
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AgentInteractionActions = exports.ACTION_GROUP = void 0;
7
+ /**
8
+ * Action Group: agentInteractions
9
+ *
10
+ * User-initiated interactions with an agent — typically from the overflow menu ("...")
11
+ * or agent profile surfaces (viewing, editing, deleting, duplicating, starring, sharing, verifying).
12
+ *
13
+ * NOTE: This is about UI interactions, not backend "actions" (which are being replaced by "tools").
14
+ *
15
+ * ## Adding a new action
16
+ * 1. Add a new variant to the `AgentInteractionsEventPayload` union type below with a data-portal link
17
+ * 2. If this action doesn't fit user interactions, create a new group file instead
18
+ * (see other files in this directory for the template)
19
+ */
20
+
21
+ /**
22
+ * Discriminated union payload type for agent interaction events.
23
+ * Use with `trackAgentEvent()`.
24
+ */
25
+
26
+ // ============================================================================
27
+ // BACKWARDS COMPAT (deprecated): Keep enum and attributes for trackAgentAction() consumers
28
+ // ============================================================================
29
+
30
+ /** @deprecated Use AgentInteractionsEventPayload with trackAgentEvent() instead */
31
+ var ACTION_GROUP = exports.ACTION_GROUP = 'agentInteractions';
32
+
33
+ /** @deprecated Use AgentInteractionsEventPayload with trackAgentEvent() instead */
34
+ var AgentInteractionActions = exports.AgentInteractionActions = /*#__PURE__*/function (AgentInteractionActions) {
35
+ /* View agent clicked - https://data-portal.internal.atlassian.com/analytics/registry/97125 */
36
+ AgentInteractionActions["VIEW"] = "view";
37
+ /* Edit agent clicked - https://data-portal.internal.atlassian.com/analytics/registry/97126 */
38
+ AgentInteractionActions["EDIT"] = "edit";
39
+ /* Copy link clicked - https://data-portal.internal.atlassian.com/analytics/registry/97128 */
40
+ AgentInteractionActions["COPY_LINK"] = "copyLink";
41
+ /* Delete agent clicked - https://data-portal.internal.atlassian.com/analytics/registry/97129 */
42
+ AgentInteractionActions["DELETE"] = "delete";
43
+ /* Duplicate agent clicked - https://data-portal.internal.atlassian.com/analytics/registry/97130 */
44
+ AgentInteractionActions["DUPLICATE"] = "duplicate";
45
+ /* Star agent clicked - https://data-portal.internal.atlassian.com/analytics/registry/97133 */
46
+ AgentInteractionActions["STAR"] = "star";
47
+ /* Chat with agent clicked - https://data-portal.internal.atlassian.com/analytics/registry/97095 */
48
+ AgentInteractionActions["CHAT"] = "chat";
49
+ /* Verify agent clicked - https://data-portal.internal.atlassian.com/analytics/registry/97134 */
50
+ AgentInteractionActions["VERIFY"] = "verify";
51
+ /* Unverify agent clicked - https://data-portal.internal.atlassian.com/analytics/registry/97135 */
52
+ AgentInteractionActions["UNVERIFY"] = "unverify";
53
+ return AgentInteractionActions;
54
+ }({});
55
+ /** @deprecated Use AgentInteractionsEventPayload with trackAgentEvent() instead */
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CreateFlowActions = exports.ACTION_GROUP = void 0;
7
+ /**
8
+ * Action Group: createFlow
9
+ *
10
+ * Create agent funnel steps — from clicking "Create agent" through to activation or discard,
11
+ *
12
+ * ## Adding a new action
13
+ * 1. Add a new variant to the `CreateFlowEventPayload` union type below with a data-portal link
14
+ * 2. If this action doesn't fit this group, consider creating a new group file instead
15
+ * (see other files in this directory for the template)
16
+ */
17
+
18
+ /**
19
+ * Discriminated union payload type for create flow events.
20
+ * Use with `trackAgentEvent()`.
21
+ */
22
+
23
+ // ============================================================================
24
+ // BACKWARDS COMPAT (deprecated): Keep enum and attributes for trackAgentAction() consumers
25
+ // ============================================================================
26
+
27
+ /** @deprecated Use CreateFlowEventPayload with trackAgentEvent() instead */
28
+ var ACTION_GROUP = exports.ACTION_GROUP = 'createFlow';
29
+
30
+ /** @deprecated Use CreateFlowEventPayload with trackAgentEvent() instead */
31
+ var CreateFlowActions = exports.CreateFlowActions = /*#__PURE__*/function (CreateFlowActions) {
32
+ /* Start create flow when user clicks on "Create agent" button - https://data-portal.internal.atlassian.com/analytics/registry/97089 */
33
+ CreateFlowActions["START"] = "createFlowStart";
34
+ /* Skip natural language - https://data-portal.internal.atlassian.com/analytics/registry/97127 */
35
+ CreateFlowActions["SKIP_NL"] = "createFlowSkipNL";
36
+ /* Review natural language - https://data-portal.internal.atlassian.com/analytics/registry/97124 */
37
+ CreateFlowActions["REVIEW_NL"] = "createFlowReviewNL";
38
+ /* Activate agent - https://data-portal.internal.atlassian.com/analytics/registry/97123 */
39
+ CreateFlowActions["ACTIVATE"] = "createFlowActivate";
40
+ /* Restart create flow - https://data-portal.internal.atlassian.com/analytics/registry/97131 */
41
+ CreateFlowActions["RESTART"] = "createFlowRestart";
42
+ /* Error occurred - https://data-portal.internal.atlassian.com/analytics/registry/97132 */
43
+ CreateFlowActions["ERROR"] = "createFlowError";
44
+ /* Land in studio - https://data-portal.internal.atlassian.com/analytics/registry/97136 */
45
+ CreateFlowActions["LAND"] = "createLandInStudio";
46
+ /* Discard agent - https://data-portal.internal.atlassian.com/analytics/registry/97137 */
47
+ CreateFlowActions["DISCARD"] = "createDiscard";
48
+ /* Draft created from solution architect plan card - https://data-portal.internal.atlassian.com/analytics/registry/97924 */
49
+ CreateFlowActions["SA_DRAFT"] = "saDraft";
50
+ return CreateFlowActions;
51
+ }({});
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AgentDebugActions = exports.ACTION_GROUP = void 0;
7
+ /**
8
+ * Action Group: debug
9
+ *
10
+ * Actions related to the agent debug modal (viewing, copying debug data, toggling skill info).
11
+ *
12
+ * ## Adding a new action
13
+ * 1. Add a new variant to the `DebugEventPayload` union type below with a data-portal link
14
+ * 2. If this action doesn't fit this group, consider creating a new group file instead
15
+ * (see other files in this directory for the template)
16
+ */
17
+
18
+ /**
19
+ * Discriminated union payload type for debug events.
20
+ * Use with `trackAgentEvent()`.
21
+ */
22
+
23
+ // ============================================================================
24
+ // BACKWARDS COMPAT (deprecated): Keep enum and attributes for trackAgentAction() consumers
25
+ // ============================================================================
26
+
27
+ /** @deprecated Use DebugEventPayload with trackAgentEvent() instead */
28
+ var ACTION_GROUP = exports.ACTION_GROUP = 'debug';
29
+
30
+ /** @deprecated Use DebugEventPayload with trackAgentEvent() instead */
31
+ var AgentDebugActions = exports.AgentDebugActions = /*#__PURE__*/function (AgentDebugActions) {
32
+ /* View debug modal - https://data-portal.internal.atlassian.com/analytics/registry/97183 */
33
+ AgentDebugActions["VIEW"] = "debugView";
34
+ /* Copy all debug data - https://data-portal.internal.atlassian.com/analytics/registry/97186 */
35
+ AgentDebugActions["COPY_ALL"] = "debugCopyAll";
36
+ /* Copy debug data - https://data-portal.internal.atlassian.com/analytics/registry/97184 */
37
+ AgentDebugActions["COPY"] = "debugCopy";
38
+ /* Toggle skill info - https://data-portal.internal.atlassian.com/analytics/registry/97185 */
39
+ AgentDebugActions["TOGGLE_SKILL_INFO"] = "debugToggleSkillInfo";
40
+ return AgentDebugActions;
41
+ }({});
42
+ /** @deprecated Use DebugEventPayload with trackAgentEvent() instead */
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AgentEditingActions = exports.ACTION_GROUP = void 0;
7
+ /**
8
+ * Action Group: editing
9
+ *
10
+ * Agent editing/mutation events — fired when an agent's configuration is saved or modified.
11
+ * Unlike agentInteractions (user clicks), these track actual data changes.
12
+ *
13
+ * ## Adding a new action
14
+ * 1. Add a new variant to the `EditingEventPayload` union type below with a data-portal link
15
+ * 2. If this action doesn't fit editing/mutation events, create a new group file instead
16
+ * (see other files in this directory for the template)
17
+ */
18
+
19
+ // ============================================================================
20
+ // BACKWARDS COMPAT (deprecated): Keep enum and attributes for trackAgentAction() consumers
21
+ // ============================================================================
22
+
23
+ /** @deprecated Use EditingEventPayload with trackAgentEvent() instead */
24
+ var ACTION_GROUP = exports.ACTION_GROUP = 'editing';
25
+
26
+ /** @deprecated Use EditingEventPayload with trackAgentEvent() instead */
27
+ var AgentEditingActions = exports.AgentEditingActions = /*#__PURE__*/function (AgentEditingActions) {
28
+ /* Agent updated - https://data-portal.internal.atlassian.com/analytics/registry/97122 */
29
+ AgentEditingActions["UPDATED"] = "updated";
30
+ return AgentEditingActions;
31
+ }({});
32
+ /** @deprecated Use EditingEventPayload with trackAgentEvent() instead */
@@ -0,0 +1 @@
1
+ "use strict";
@@ -3,7 +3,27 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.AgentToolActions = void 0;
6
+ exports.AgentToolActions = exports.ACTION_GROUP = void 0;
7
+ /**
8
+ * Action Group: tools
9
+ *
10
+ * Actions related to agent tool execution during chat
11
+ * (confirming, streaming, viewing results, errors).
12
+ *
13
+ * ## Adding a new action
14
+ * 1. Add a new variant to the `ToolsEventPayload` union type below with a data-portal link
15
+ * 2. If this action doesn't fit this group, consider creating a new group file instead
16
+ * (see other files in this directory for the template)
17
+ */
18
+
19
+ // ============================================================================
20
+ // BACKWARDS COMPAT (deprecated): Keep enum and attributes for trackAgentAction() consumers
21
+ // ============================================================================
22
+
23
+ /** @deprecated Use ToolsEventPayload with trackAgentEvent() instead */
24
+ var ACTION_GROUP = exports.ACTION_GROUP = 'tools';
25
+
26
+ /** @deprecated Use ToolsEventPayload with trackAgentEvent() instead */
7
27
  var AgentToolActions = exports.AgentToolActions = /*#__PURE__*/function (AgentToolActions) {
8
28
  /* When chatting with an agent, and tools confirmation being shown, then user click proceed with the possible actions (e.g. confirm, dismiss etc) https://data-portal.internal.atlassian.com/analytics/registry/97675 */
9
29
  AgentToolActions["TOOLS_EXECUTION_CONFIRMED"] = "toolsExecutionConfirmed";
@@ -14,4 +34,7 @@ var AgentToolActions = exports.AgentToolActions = /*#__PURE__*/function (AgentTo
14
34
  /* When tools execution result streaming fails https://data-portal.internal.atlassian.com/analytics/registry/97752 */
15
35
  AgentToolActions["TOOLS_EXECUTION_RESULT_ERROR"] = "toolsExecutionResultError";
16
36
  return AgentToolActions;
17
- }({});
37
+ }({});
38
+ /** @deprecated Use ToolsEventPayload with trackAgentEvent() instead */
39
+ /** @deprecated Use ToolsEventPayload with trackAgentEvent() instead */
40
+ /** @deprecated Use ToolsEventPayload with trackAgentEvent() instead */