@atlaskit/rovo-agent-analytics 1.7.0 → 1.9.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
+ ## 1.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`5ad26dd7ae450`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5ad26dd7ae450) -
8
+ Make `agentType` optional and add required `subagentId: string | null` attribute to
9
+ `EditingEventPayload`. Use `subagentId` to differentiate events fired at the scenario/subagent
10
+ level vs the agent level.
11
+
12
+ ## 1.8.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [`0cf21efc19163`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0cf21efc19163) -
17
+ Added 'ModelPreferencesEventPayload' as a new event type
18
+
3
19
  ## 1.7.0
4
20
 
5
21
  ### Minor Changes
@@ -0,0 +1 @@
1
+ "use strict";
File without changes
@@ -14,7 +14,14 @@ export type EditingEventPayload = {
14
14
  actionSubject: 'rovoAgent';
15
15
  action: 'updated';
16
16
  attributes: VersionedAgentAttributes & {
17
- agentType: string;
17
+ agentType?: string;
18
18
  field: string;
19
+ /**
20
+ * Identifies the subagent (formerly "scenario") whose configuration was updated.
21
+ * Pass the scenario/subagent id when the analytics event is fired at the
22
+ * scenario/subagent level. Pass `null` when the event is fired at the agent
23
+ * level (i.e. not scoped to any specific subagent).
24
+ */
25
+ subagentId: string | null;
19
26
  };
20
27
  };
@@ -0,0 +1,25 @@
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
+ };
@@ -4,6 +4,7 @@ import type { EditingEventPayload } from '../actions/groups/editing';
4
4
  import type { EvaluationEventPayload } from '../actions/groups/evaluation';
5
5
  import type { InsightsEventPayload } from '../actions/groups/insights';
6
6
  import type { KnowledgeFiltersEventPayload } from '../actions/groups/knowledge-filters';
7
+ import type { ModelPreferencesEventPayload } from '../actions/groups/model-preferences';
7
8
  import type { SubagentInteractionsEventPayload } from '../actions/groups/subagent-interactions';
8
9
  import type { ToolsEventPayload } from '../actions/groups/tools';
9
10
  export type RemainingRequired<T, P extends Partial<T>> = Required<Omit<T, keyof P>>;
@@ -51,4 +52,4 @@ export type ErrorEventPayload = {
51
52
  * Union of all event payload types.
52
53
  * Use with `trackAgentEvent()` for typed event tracking.
53
54
  */
54
- export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload | KnowledgeFiltersEventPayload;
55
+ export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload | KnowledgeFiltersEventPayload | ModelPreferencesEventPayload;
@@ -14,7 +14,14 @@ export type EditingEventPayload = {
14
14
  actionSubject: 'rovoAgent';
15
15
  action: 'updated';
16
16
  attributes: VersionedAgentAttributes & {
17
- agentType: string;
17
+ agentType?: string;
18
18
  field: string;
19
+ /**
20
+ * Identifies the subagent (formerly "scenario") whose configuration was updated.
21
+ * Pass the scenario/subagent id when the analytics event is fired at the
22
+ * scenario/subagent level. Pass `null` when the event is fired at the agent
23
+ * level (i.e. not scoped to any specific subagent).
24
+ */
25
+ subagentId: string | null;
19
26
  };
20
27
  };
@@ -0,0 +1,25 @@
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
+ };
@@ -4,6 +4,7 @@ import type { EditingEventPayload } from '../actions/groups/editing';
4
4
  import type { EvaluationEventPayload } from '../actions/groups/evaluation';
5
5
  import type { InsightsEventPayload } from '../actions/groups/insights';
6
6
  import type { KnowledgeFiltersEventPayload } from '../actions/groups/knowledge-filters';
7
+ import type { ModelPreferencesEventPayload } from '../actions/groups/model-preferences';
7
8
  import type { SubagentInteractionsEventPayload } from '../actions/groups/subagent-interactions';
8
9
  import type { ToolsEventPayload } from '../actions/groups/tools';
9
10
  export type RemainingRequired<T, P extends Partial<T>> = Required<Omit<T, keyof P>>;
@@ -51,4 +52,4 @@ export type ErrorEventPayload = {
51
52
  * Union of all event payload types.
52
53
  * Use with `trackAgentEvent()` for typed event tracking.
53
54
  */
54
- export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload | KnowledgeFiltersEventPayload;
55
+ export type EventPayload = EditingEventPayload | AgentInteractionsEventPayload | SubagentInteractionsEventPayload | DebugEventPayload | ToolsEventPayload | EvaluationEventPayload | InsightsEventPayload | ErrorEventPayload | KnowledgeFiltersEventPayload | ModelPreferencesEventPayload;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-analytics",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "description": "Rovo Agents analytics",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-monorepo",
6
6
  "atlassian": {
@@ -39,7 +39,7 @@
39
39
  "*.compiled.css"
40
40
  ],
41
41
  "dependencies": {
42
- "@atlaskit/analytics-listeners": "^10.0.0",
42
+ "@atlaskit/analytics-listeners": "^10.1.0",
43
43
  "@atlaskit/analytics-next": "^11.2.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@compiled/react": "^0.20.0"
@@ -50,6 +50,7 @@
50
50
  "@atlaskit/ssr": "workspace:^",
51
51
  "@atlassian/react-compiler-gating": "workspace:^",
52
52
  "@testing-library/react": "^16.3.0",
53
+ "react": "^18.2.0",
53
54
  "react-dom": "^18.2.0"
54
55
  },
55
56
  "peerDependencies": {