@atlaskit/rovo-triggers 10.2.0 → 10.4.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,64 @@
1
1
  # @atlaskit/rovo-triggers
2
2
 
3
+ ## 10.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`d42ba7ed56112`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d42ba7ed56112) -
8
+ Add the public and transport contracts for gated Rovo Space source mode.
9
+
10
+ ```ts
11
+ const sourceMode: RovoChatSourceMode = 'STRICT';
12
+ await assistanceService.sendMessageStream({ sourceMode });
13
+ ```
14
+
15
+ ## 10.3.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [`a9757a562bdda`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a9757a562bdda) -
20
+ Add optional issue-type information (`id`, `name`, `iconUrl`) to the `jira-work-items-creating`
21
+ draft payload so subscribers can render the issue-type icon on optimistic rows immediately.
22
+ Populated behind the `aiwc_add_issuetype_icon_to_optimistic_updates` feature gate;
23
+
24
+ `@atlaskit/rovo-triggers`: `JiraWorkItemCreatingDraft` now carries an optional `issueType`.
25
+ Subscribers can read it to render the icon:
26
+
27
+ ```ts
28
+ import { useSubscribe } from '@atlaskit/rovo-triggers/main';
29
+ import { JIRA_WORK_ITEMS_CREATING_EVENT } from '@atlaskit/rovo-triggers/types';
30
+
31
+ useSubscribe({ topic: 'ai-mate' }, (payload) => {
32
+ if (payload.type === JIRA_WORK_ITEMS_CREATING_EVENT) {
33
+ payload.data.draftWorkItems.forEach((draft) => {
34
+ // `issueType` is only present when the gate is on; always guard for its absence.
35
+ if (draft.issueType) {
36
+ const { id, name, iconUrl } = draft.issueType;
37
+ renderOptimisticRow({
38
+ summary: draft.summary,
39
+ issueTypeName: name,
40
+ issueTypeIcon: iconUrl,
41
+ });
42
+ }
43
+ });
44
+ }
45
+ });
46
+ ```
47
+
48
+ `@atlassian/jira-create-work-items`: `JiraDraftDataForCreateAllCommandResult.context` now also
49
+ exposes `issueTypeToFieldsConfigMap`, the issue-type metadata resolved during validation (keyed by
50
+ issue type id):
51
+
52
+ ```ts
53
+ const result = await validateIssuesToCreate({ draftWorkItems });
54
+ const issueType = result.context.issueTypeToFieldsConfigMap[issueTypeId];
55
+ // issueType?.name, issueType?.avatarUrl — used to enrich the `creating` draft payload.
56
+ ```
57
+
58
+ ### Patch Changes
59
+
60
+ - Updated dependencies
61
+
3
62
  ## 10.2.0
4
63
 
5
64
  ### Minor Changes
package/dist/cjs/types.js CHANGED
@@ -14,6 +14,13 @@ var Topics = exports.Topics = {
14
14
 
15
15
  // Can only specify either `agentId` or `agentExternalConfigReference`, not both
16
16
 
17
+ /**
18
+ * Source-selection behavior requested when opening a chat.
19
+ *
20
+ * This public package owns the transport type so consumers do not depend on an internal package.
21
+ * A test keeps it aligned with the assistance service contract.
22
+ */
23
+
17
24
  /**
18
25
  * Opens the Rovo conversation assistant and seeds a chat from a Rovo Insight,
19
26
  * reproducing the same experience as clicking an insight inside the in-panel
@@ -8,6 +8,13 @@ export const Topics = {
8
8
 
9
9
  // Can only specify either `agentId` or `agentExternalConfigReference`, not both
10
10
 
11
+ /**
12
+ * Source-selection behavior requested when opening a chat.
13
+ *
14
+ * This public package owns the transport type so consumers do not depend on an internal package.
15
+ * A test keeps it aligned with the assistance service contract.
16
+ */
17
+
11
18
  /**
12
19
  * Opens the Rovo conversation assistant and seeds a chat from a Rovo Insight,
13
20
  * reproducing the same experience as clicking an insight inside the in-panel
package/dist/esm/types.js CHANGED
@@ -8,6 +8,13 @@ export var Topics = {
8
8
 
9
9
  // Can only specify either `agentId` or `agentExternalConfigReference`, not both
10
10
 
11
+ /**
12
+ * Source-selection behavior requested when opening a chat.
13
+ *
14
+ * This public package owns the transport type so consumers do not depend on an internal package.
15
+ * A test keeps it aligned with the assistance service contract.
16
+ */
17
+
11
18
  /**
12
19
  * Opens the Rovo conversation assistant and seeds a chat from a Rovo Insight,
13
20
  * reproducing the same experience as clicking an insight inside the in-panel
@@ -5,11 +5,11 @@ import type { SolutionArchitectAgentActivationFlowStoppedPayload, SolutionArchit
5
5
  import type { ChatContextPayload } from './common/utils/chat-context/types';
6
6
  import type { RovoChatOpenMode } from './common/utils/params/types';
7
7
  export declare const Topics: {
8
- readonly AI_MATE: "ai-mate";
9
- readonly AI_MATE_ACTIONS: "ai-mate-actions";
10
- readonly AI_MATE_INSERT_URLS: "ai-mate-chat-inserts";
11
- readonly AI_MATE_CHAT_INPUT_OVERLAY: "ai-mate-chat-input-overlay";
12
- readonly AVP: "avp";
8
+ readonly AI_MATE: 'ai-mate';
9
+ readonly AI_MATE_ACTIONS: 'ai-mate-actions';
10
+ readonly AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts';
11
+ readonly AI_MATE_CHAT_INPUT_OVERLAY: 'ai-mate-chat-input-overlay';
12
+ readonly AVP: 'avp';
13
13
  };
14
14
  export type Topic = (typeof Topics)[keyof typeof Topics];
15
15
  export type PayloadCore<TKey extends string, TData = void> = {
@@ -53,12 +53,20 @@ type TargetAgentParam = {
53
53
  type PlaceholderParam = {
54
54
  placeholderType?: 'person' | 'link' | 'generic' | 'skill';
55
55
  };
56
+ /**
57
+ * Source-selection behavior requested when opening a chat.
58
+ *
59
+ * This public package owns the transport type so consumers do not depend on an internal package.
60
+ * A test keeps it aligned with the assistance service contract.
61
+ */
62
+ export type RovoChatSourceMode = 'GENERAL' | 'STRICT';
56
63
  type ChatModeParam = {
57
64
  deepResearchEnabled?: boolean;
58
65
  thinkDeeperEnabled?: boolean;
59
66
  fastModeEnabled?: boolean;
60
67
  taskModeEnabled?: boolean;
61
68
  webSearchEnabled?: boolean;
69
+ sourceMode?: RovoChatSourceMode;
62
70
  useCurrentPageContext?: boolean;
63
71
  appFilters?: unknown[];
64
72
  };
@@ -124,6 +132,13 @@ export type ChatNewPayload = PayloadCore<'chat-new', {
124
132
  * and comment:<commentId> so the backend can create a SessionAssociationPublic record.
125
133
  */
126
134
  tags?: string[];
135
+ /**
136
+ * Optimistic agent metadata for the editor agent mention flow.
137
+ * Allows showing the agent avatar telepointer immediately during AI streaming
138
+ * without an extra network round-trip to fetch agent details.
139
+ */
140
+ agentName?: string;
141
+ agentIdentityAccountId?: string;
127
142
  } & Partial<TargetAgentParam> & PlaceholderParam>;
128
143
  export type RovoSpaceEntryPoint = 'leftNav' | 'sidebar' | 'zeroQuery' | 'typeahead' | 'inChatRecommendation';
129
144
  /**
@@ -613,7 +628,7 @@ export type TaskModifyPlanSubmittedPayload = PayloadCore<'task-modify-plan-submi
613
628
  invocationId: string;
614
629
  prompt: DocNode;
615
630
  }>;
616
- export declare const JIRA_INLINE_AGENT_CREATION_AGENT_ASSIGNED_EVENT: "jira-inline-agent-creation-agent-assigned";
631
+ export declare const JIRA_INLINE_AGENT_CREATION_AGENT_ASSIGNED_EVENT: 'jira-inline-agent-creation-agent-assigned';
617
632
  export type JiraInlineAgentCreationAgentAssignedPayload = PayloadCore<typeof JIRA_INLINE_AGENT_CREATION_AGENT_ASSIGNED_EVENT, {
618
633
  issueId: string;
619
634
  }>;
@@ -624,12 +639,18 @@ export type JiraInlineAgentCreationAgentAssignedPayload = PayloadCore<typeof JIR
624
639
  * batch with the follow-up {@link JIRA_WORK_ITEMS_CREATED_EVENT} / {@link JIRA_WORK_ITEMS_CREATE_FAILED_EVENT}
625
640
  * via `invocationId`.
626
641
  */
627
- export declare const JIRA_WORK_ITEMS_CREATING_EVENT: "jira-work-items-creating";
642
+ export declare const JIRA_WORK_ITEMS_CREATING_EVENT: 'jira-work-items-creating';
628
643
  export type JiraWorkItemCreatingDraft = {
629
644
  /** Skill invocation id of this draft; used as the optimistic row's stable id. */
630
645
  invocationId: string;
631
646
  /** Draft summary, used to render the optimistic row immediately. */
632
647
  summary: string;
648
+ /** Optional Issue type of this draft, used to render the optimistic row's issue-type icon immediately. */
649
+ issueType?: {
650
+ id: string;
651
+ name: string;
652
+ iconUrl: string;
653
+ };
633
654
  };
634
655
  export type JiraWorkItemsCreatingPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CREATING_EVENT, {
635
656
  /**
@@ -642,7 +663,7 @@ export type JiraWorkItemsCreatingPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CR
642
663
  /** Draft work items submitted for creation (parents and their children, flattened). */
643
664
  draftWorkItems: JiraWorkItemCreatingDraft[];
644
665
  }>;
645
- export declare const JIRA_WORK_ITEMS_CREATED_EVENT: "jira-work-items-created";
666
+ export declare const JIRA_WORK_ITEMS_CREATED_EVENT: 'jira-work-items-created';
646
667
  export type JiraWorkItemsCreatedPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CREATED_EVENT, {
647
668
  /** Identifies the batch; matches the {@link JIRA_WORK_ITEMS_CREATING_EVENT} `invocationId`. */
648
669
  invocationId: string;
@@ -654,7 +675,7 @@ export type JiraWorkItemsCreatedPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CRE
654
675
  * {@link JIRA_WORK_ITEMS_CREATING_EVENT}. Subscribers use `invocationId` to revert any optimistic
655
676
  * rows they rendered for that batch.
656
677
  */
657
- export declare const JIRA_WORK_ITEMS_CREATE_FAILED_EVENT: "jira-work-items-create-failed";
678
+ export declare const JIRA_WORK_ITEMS_CREATE_FAILED_EVENT: 'jira-work-items-create-failed';
658
679
  export type JiraWorkItemsCreateFailedPayload = PayloadCore<typeof JIRA_WORK_ITEMS_CREATE_FAILED_EVENT, {
659
680
  /** Identifies the batch; matches the {@link JIRA_WORK_ITEMS_CREATING_EVENT} `invocationId` to revert its optimistic rows. */
660
681
  invocationId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "10.2.0",
3
+ "version": "10.4.0",
4
4
  "description": "Provides various trigger events to drive Rovo Chat functionality, such as a publish-subscribe and URL parameter hooks",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "atlaskit:src": "src/index.ts",
30
30
  "dependencies": {
31
- "@atlaskit/adf-schema": "^56.1.0",
31
+ "@atlaskit/adf-schema": "^56.6.0",
32
32
  "@atlaskit/platform-feature-flags": "^2.1.0",
33
33
  "@atlaskit/react-compiler-gating": "^0.2.0",
34
34
  "@babel/runtime": "^7.0.0",
@@ -41,9 +41,10 @@
41
41
  "@af/integration-testing": "workspace:^",
42
42
  "@af/visual-regression": "workspace:^",
43
43
  "@atlaskit/css": "^1.0.0",
44
- "@atlaskit/primitives": "^22.1.0",
44
+ "@atlaskit/primitives": "^22.2.0",
45
45
  "@atlaskit/ssr": "workspace:^",
46
- "@atlassian/a11y-jest-testing": "^0.13.0",
46
+ "@atlassian/a11y-jest-testing": "^0.14.0",
47
+ "@atlassian/conversation-assistant-service-api": "^15.1.0",
47
48
  "@atlassian/feature-flags-test-utils": "^1.2.0",
48
49
  "@testing-library/react": "^16.3.0",
49
50
  "react": "^18.2.0",