@gooddata/sdk-pluggable-application-model 11.45.0-alpha.0 → 11.45.0-alpha.1

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/esm/__version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // (C) 2026 GoodData Corporation
2
2
  // DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD
3
3
  /** @alpha */
4
- export const LIB_VERSION = "11.45.0-alpha.0";
4
+ export const LIB_VERSION = "11.45.0-alpha.1";
5
5
  /** @alpha */
6
6
  export const LIB_DESCRIPTION = "GoodData SDK model contracts for pluggable applications";
7
7
  /** @alpha */
package/esm/hostUi.d.ts CHANGED
@@ -45,14 +45,23 @@ export interface IHostUiMountOptions {
45
45
  */
46
46
  replace: (url: string) => void;
47
47
  /**
48
- * Reports the host-owned AI assistant chat open-state whenever it changes.
48
+ * Requests the host to toggle its AI assistant chat open/closed.
49
49
  *
50
50
  * @remarks
51
- * The host UI owns the single chat instance on hosted routes; the host runtime forwards this
52
- * open-state to the active pluggable application (via its mount handle) so app-side assistant
53
- * controls stay aligned with what the user sees.
51
+ * The single chat instance is owned by the host runtime (outside the host UI module), so it
52
+ * survives a custom UI module and stays mounted when the chrome is hidden (embedded/export).
53
+ * The host UI's header chat button calls this to toggle that chat. The current open-state and
54
+ * button visibility are pushed back via {@link IHostUiMountHandle.updateChatState}.
54
55
  */
55
- onAiAssistantOpenChange?: (open: boolean) => void;
56
+ onChatToggleRequested?: () => void;
57
+ /**
58
+ * Requests the host to open its AI assistant chat seeded with a question.
59
+ *
60
+ * @remarks
61
+ * Used by host UI affordances that hand a question to the assistant (e.g. the header semantic
62
+ * search "ask AI" action). `userContext` carries the user's current location when available.
63
+ */
64
+ onAskAiAssistant?: (question: string, userContext?: IGenAIUserContext) => void;
56
65
  }
57
66
  /**
58
67
  * Notification dispatched when the host runtime detects that a newer build of the host
@@ -77,61 +86,6 @@ export interface INewDeploymentAvailableHostUiNotification {
77
86
  */
78
87
  commitHash: string;
79
88
  }
80
- /**
81
- * Notification requesting the host UI to open its AI assistant chat.
82
- *
83
- * @remarks
84
- * Emitted when the active pluggable application requests the assistant (see
85
- * `IOpenAiAssistantRequestedEvent`). The host UI owns the single chat instance on
86
- * hosted-application routes and opens it, optionally seeded with a question and user context.
87
- *
88
- * @alpha
89
- */
90
- export interface IOpenAiAssistantHostUiNotification {
91
- type: "openAiAssistant";
92
- /**
93
- * Question to seed the chat with. When omitted, the chat just opens.
94
- */
95
- question?: string;
96
- /**
97
- * Context of the user's current location (e.g. the active dashboard), passed to the
98
- * assistant alongside the seeded question.
99
- */
100
- userContext?: IGenAIUserContext;
101
- }
102
- /**
103
- * Notification requesting the host UI to close its AI assistant chat.
104
- *
105
- * @remarks
106
- * Emitted when the active pluggable application closes the assistant from one of its own controls
107
- * (see `ICloseAiAssistantRequestedEvent`). The host UI closes its single chat instance.
108
- *
109
- * @alpha
110
- */
111
- export interface ICloseAiAssistantHostUiNotification {
112
- type: "closeAiAssistant";
113
- }
114
- /**
115
- * Notification informing the host UI of the active application's current AI-assistant tag scope.
116
- *
117
- * @remarks
118
- * Emitted when the active pluggable application's tag scope changes (see
119
- * `IAiAssistantContextChangedEvent`). The host UI keeps the latest scope and applies it to its
120
- * chat so the assistant's object search stays within the same scope the application enforces.
121
- *
122
- * @alpha
123
- */
124
- export interface IAiAssistantContextHostUiNotification {
125
- type: "aiAssistantContext";
126
- /**
127
- * Tag identifiers the assistant's object search should be restricted to.
128
- */
129
- includeTags?: string[];
130
- /**
131
- * Tag identifiers the assistant's object search should exclude.
132
- */
133
- excludeTags?: string[];
134
- }
135
89
  /**
136
90
  * Discriminated union of out-of-band notifications the host runtime can push into the
137
91
  * host UI module after mount. Lets the runtime signal events that should affect the UI
@@ -142,9 +96,13 @@ export interface IAiAssistantContextHostUiNotification {
142
96
  * {@link IHostUiMountHandle.notify} may safely no-op for notification types they do not
143
97
  * handle, so adding a new variant is a backward-compatible change.
144
98
  *
99
+ * AI-assistant open/close/context signals are intentionally NOT host UI notifications: the chat
100
+ * is owned by the host runtime (outside the UI module), so the runtime drives it directly rather
101
+ * than routing through the UI module.
102
+ *
145
103
  * @alpha
146
104
  */
147
- export type IHostUiNotification = INewDeploymentAvailableHostUiNotification | IOpenAiAssistantHostUiNotification | ICloseAiAssistantHostUiNotification | IAiAssistantContextHostUiNotification;
105
+ export type IHostUiNotification = INewDeploymentAvailableHostUiNotification;
148
106
  /**
149
107
  * Handle returned from a host UI mount for lifecycle management.
150
108
  *
@@ -197,6 +155,19 @@ export interface IHostUiMountHandle {
197
155
  * active application's manifest title.
198
156
  */
199
157
  updateDocumentTitle?(pageTitle: string | undefined): void;
158
+ /**
159
+ * Pushes the host-owned AI assistant chat state into the host UI.
160
+ *
161
+ * @remarks
162
+ * The chat itself is owned by the host runtime; this lets the UI module reflect it — show/hide
163
+ * the header chat button (`showChatItem`, gated by feature flag, permissions and a runtime LLM
164
+ * availability probe) and reflect its open-state for active styling. Called after mount and on
165
+ * every change.
166
+ */
167
+ updateChatState?(state: {
168
+ showChatItem: boolean;
169
+ isOpen: boolean;
170
+ }): void;
200
171
  /**
201
172
  * Returns the DOM element where the active pluggable application should be rendered.
202
173
  *
@@ -1 +1 @@
1
- {"version":3,"file":"hostUi.d.ts","sourceRoot":"","sources":["../src/hostUi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAEpG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC;IAEvB;;OAEG;IACH,GAAG,EAAE,gBAAgB,CAAC;IAEtB;;OAEG;IACH,oBAAoB,EAAE,gCAAgC,EAAE,CAAC;IAEz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B,GAAG,IAAI,CAAC;CACpD;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,mBAAmB,KAAK,kBAAkB,CAAC;AAE/E;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,WAAW,CAAC;CACtB"}
package/esm/index.d.ts CHANGED
@@ -9,5 +9,5 @@ export { type EmbeddingMode, type IApiTokenAuthCredentials, type IAuthCredential
9
9
  export { type ILocale } from "@gooddata/sdk-model";
10
10
  export { type IAppHeaderOptions, type IAppInstance, type KnownPluggableAppEventTypeName, type IDocumentTitleChangedEvent, type IOpenAiAssistantRequestedEvent, type ICloseAiAssistantRequestedEvent, type IAiAssistantContextChangedEvent, type IPluggableApp, type IPluggableApplicationMountHandle, type IPluggableApplicationMountOptions, type IPluggableAppEvent, type IPluggableAppLogRecord, type IPluggableAppTelemetryCallbacks, type IPluggableAppTelemetryEventData, type IReloadPlatformContextRequestedEvent, type ITelemetryEventOptions, documentTitleChanged, isDocumentTitleChangedEvent, isOpenAiAssistantRequestedEvent, isCloseAiAssistantRequestedEvent, isAiAssistantContextChangedEvent, isReloadPlatformContextRequestedEvent, openAiAssistantRequested, closeAiAssistantRequested, aiAssistantContextChanged, type PluggableApplicationMount, PluggableAppEventType, type PluggableAppEventTypeName, reloadPlatformContextRequested, type TelemetryChannel, } from "./mount.js";
11
11
  export { type ITelemetryPropertySlot, type TelemetryPropertyScope, TELEMETRY_PROPERTIES, } from "./telemetry/telemetryProperties.js";
12
- export { type IHostUiModule, type IHostUiMountHandle, type IHostUiMountOptions, type IHostUiNotification, type INewDeploymentAvailableHostUiNotification, type IOpenAiAssistantHostUiNotification, type ICloseAiAssistantHostUiNotification, type IAiAssistantContextHostUiNotification, type HostUiMount, } from "./hostUi.js";
12
+ export { type IHostUiModule, type IHostUiMountHandle, type IHostUiMountOptions, type IHostUiNotification, type INewDeploymentAvailableHostUiNotification, type HostUiMount, } from "./hostUi.js";
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,WAAW,EACX,mBAAmB,EACnB,yBAAyB,GAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,aAAa,EAClB,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,oCAAoC,EACzC,KAAK,sBAAsB,EAC3B,oBAAoB,EACpB,2BAA2B,EAC3B,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,EAChC,qCAAqC,EACrC,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,yBAAyB,EAC9B,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,8BAA8B,EAC9B,KAAK,gBAAgB,GACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,sBAAsB,E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,EAC/B,gCAAgC,EAChC,gCAAgC,EAChC,qCAAqC,EACrC,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,yBAAyB,EAC9B,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,8BAA8B,EAC9B,KAAK,gBAAgB,GACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,oBAAoB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,yCAAyC,EAC9C,KAAK,WAAW,GACnB,MAAM,aAAa,CAAC"}
package/esm/mount.d.ts CHANGED
@@ -193,6 +193,16 @@ export interface IAiAssistantContextChangedEvent extends IPluggableAppEvent {
193
193
  * exclude filter.
194
194
  */
195
195
  readonly excludeTags?: string[];
196
+ /**
197
+ * Where the application wants the host chat positioned (e.g. an embedded dashboard places it
198
+ * left/right via the `showassistant` URL param). Omitted leaves the default placement.
199
+ */
200
+ readonly dialogPosition?: "left" | "right";
201
+ /**
202
+ * Whether the application is running embedded (no host chrome). The host uses this to apply
203
+ * the embedded chat presentation and to delegate link clicks back to the application.
204
+ */
205
+ readonly embedded?: boolean;
196
206
  };
197
207
  }
198
208
  /**
@@ -203,6 +213,8 @@ export interface IAiAssistantContextChangedEvent extends IPluggableAppEvent {
203
213
  export declare function aiAssistantContextChanged(payload?: {
204
214
  includeTags?: string[];
205
215
  excludeTags?: string[];
216
+ dialogPosition?: "left" | "right";
217
+ embedded?: boolean;
206
218
  }): IAiAssistantContextChangedEvent;
207
219
  /**
208
220
  * Type guard for {@link IAiAssistantContextChangedEvent}.
@@ -445,6 +457,22 @@ export interface IPluggableApplicationMountHandle {
445
457
  * whenever its chat opens or closes. Applications without such controls may omit it.
446
458
  */
447
459
  setAiAssistantOpen?: (open: boolean) => void;
460
+ /**
461
+ * Delegates an AI-assistant link click to the application so it can handle navigation in-app.
462
+ *
463
+ * @remarks
464
+ * On hosted routes the host owns the chat, so links clicked inside it are handled by the host by
465
+ * default (open in a tab / navigate). An embedded application can intercept them instead — e.g. an
466
+ * embedded dashboard opening a visualization as an in-place overlay rather than navigating away.
467
+ * Return `true` if the application handled it (the host suppresses its own navigation); return
468
+ * `false` to let the host perform default link handling.
469
+ */
470
+ onAiAssistantLinkClicked?: (link: {
471
+ type?: string;
472
+ id?: string;
473
+ itemUrl?: string;
474
+ newTab?: boolean;
475
+ }) => boolean;
448
476
  }
449
477
  /**
450
478
  * Pluggable application mount function signature.
@@ -1 +1 @@
1
- {"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../src/mount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;CAMxB,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GACtC,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEvE;;;;;;;;;GASG;AACH,MAAM,MAAM,yBAAyB,GAAG,8BAA8B,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEvF;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,oCAAqC,SAAQ,kBAAkB;IAC5E,QAAQ,CAAC,IAAI,EAAE,yDAAyD,CAAC;CAC5E;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,IAAI,oCAAoC,CAErF;AAED;;;;GAIG;AACH,wBAAgB,qCAAqC,CACjD,GAAG,EAA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,CAAC;IAE7C;;;;;;;;;OASG;IACH,wBAAwB,CAAC,EAAE,CAAC,IAAI,EAAE;QAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,OAAO,CAAC;KACpB,KAAK,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACpC,OAAO,EAAE,iCAAiC,KACzC,gCAAgC,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,YAAa,SAAQ,gCAAgC;IAClE,EAAE,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,yBAAyB,CAAC;IAEjC;;;;;;;;;;;OAWG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B"}
package/esm/mount.js CHANGED
@@ -137,7 +137,10 @@ export function isAiAssistantContextChangedEvent(obj) {
137
137
  if (typeof payload !== "object" || payload === null || Array.isArray(payload)) {
138
138
  return false;
139
139
  }
140
- const { includeTags, excludeTags } = payload;
140
+ const { includeTags, excludeTags, dialogPosition, embedded } = payload;
141
141
  const isStringArrayOrUndefined = (value) => value === undefined || (Array.isArray(value) && value.every((item) => typeof item === "string"));
142
- return isStringArrayOrUndefined(includeTags) && isStringArrayOrUndefined(excludeTags);
142
+ return (isStringArrayOrUndefined(includeTags) &&
143
+ isStringArrayOrUndefined(excludeTags) &&
144
+ (dialogPosition === undefined || dialogPosition === "left" || dialogPosition === "right") &&
145
+ (embedded === undefined || typeof embedded === "boolean"));
143
146
  }
@@ -26,6 +26,8 @@ import { PluggableApplicationRegistryItem } from '@gooddata/sdk-model';
26
26
  export declare function aiAssistantContextChanged(payload?: {
27
27
  includeTags?: string[];
28
28
  excludeTags?: string[];
29
+ dialogPosition?: "left" | "right";
30
+ embedded?: boolean;
29
31
  }): IAiAssistantContextChangedEvent;
30
32
 
31
33
  /**
@@ -108,31 +110,19 @@ export declare interface IAiAssistantContextChangedEvent extends IPluggableAppEv
108
110
  * exclude filter.
109
111
  */
110
112
  readonly excludeTags?: string[];
113
+ /**
114
+ * Where the application wants the host chat positioned (e.g. an embedded dashboard places it
115
+ * left/right via the `showassistant` URL param). Omitted leaves the default placement.
116
+ */
117
+ readonly dialogPosition?: "left" | "right";
118
+ /**
119
+ * Whether the application is running embedded (no host chrome). The host uses this to apply
120
+ * the embedded chat presentation and to delegate link clicks back to the application.
121
+ */
122
+ readonly embedded?: boolean;
111
123
  };
112
124
  }
113
125
 
114
- /**
115
- * Notification informing the host UI of the active application's current AI-assistant tag scope.
116
- *
117
- * @remarks
118
- * Emitted when the active pluggable application's tag scope changes (see
119
- * `IAiAssistantContextChangedEvent`). The host UI keeps the latest scope and applies it to its
120
- * chat so the assistant's object search stays within the same scope the application enforces.
121
- *
122
- * @alpha
123
- */
124
- export declare interface IAiAssistantContextHostUiNotification {
125
- type: "aiAssistantContext";
126
- /**
127
- * Tag identifiers the assistant's object search should be restricted to.
128
- */
129
- includeTags?: string[];
130
- /**
131
- * Tag identifiers the assistant's object search should exclude.
132
- */
133
- excludeTags?: string[];
134
- }
135
-
136
126
  /**
137
127
  * GoodData API-token authentication.
138
128
  *
@@ -197,19 +187,6 @@ export declare interface IAppInstance extends IPluggableApplicationMountHandle {
197
187
  */
198
188
  export declare type IAuthCredentials = IContextDeferredAuthCredentials | IApiTokenAuthCredentials | IJwtAuthCredentials;
199
189
 
200
- /**
201
- * Notification requesting the host UI to close its AI assistant chat.
202
- *
203
- * @remarks
204
- * Emitted when the active pluggable application closes the assistant from one of its own controls
205
- * (see `ICloseAiAssistantRequestedEvent`). The host UI closes its single chat instance.
206
- *
207
- * @alpha
208
- */
209
- export declare interface ICloseAiAssistantHostUiNotification {
210
- type: "closeAiAssistant";
211
- }
212
-
213
190
  /**
214
191
  * Event requesting the host to close its AI assistant chat.
215
192
  *
@@ -341,6 +318,19 @@ export declare interface IHostUiMountHandle {
341
318
  * active application's manifest title.
342
319
  */
343
320
  updateDocumentTitle?(pageTitle: string | undefined): void;
321
+ /**
322
+ * Pushes the host-owned AI assistant chat state into the host UI.
323
+ *
324
+ * @remarks
325
+ * The chat itself is owned by the host runtime; this lets the UI module reflect it — show/hide
326
+ * the header chat button (`showChatItem`, gated by feature flag, permissions and a runtime LLM
327
+ * availability probe) and reflect its open-state for active styling. Called after mount and on
328
+ * every change.
329
+ */
330
+ updateChatState?(state: {
331
+ showChatItem: boolean;
332
+ isOpen: boolean;
333
+ }): void;
344
334
  /**
345
335
  * Returns the DOM element where the active pluggable application should be rendered.
346
336
  *
@@ -404,14 +394,23 @@ export declare interface IHostUiMountOptions {
404
394
  */
405
395
  replace: (url: string) => void;
406
396
  /**
407
- * Reports the host-owned AI assistant chat open-state whenever it changes.
397
+ * Requests the host to toggle its AI assistant chat open/closed.
398
+ *
399
+ * @remarks
400
+ * The single chat instance is owned by the host runtime (outside the host UI module), so it
401
+ * survives a custom UI module and stays mounted when the chrome is hidden (embedded/export).
402
+ * The host UI's header chat button calls this to toggle that chat. The current open-state and
403
+ * button visibility are pushed back via {@link IHostUiMountHandle.updateChatState}.
404
+ */
405
+ onChatToggleRequested?: () => void;
406
+ /**
407
+ * Requests the host to open its AI assistant chat seeded with a question.
408
408
  *
409
409
  * @remarks
410
- * The host UI owns the single chat instance on hosted routes; the host runtime forwards this
411
- * open-state to the active pluggable application (via its mount handle) so app-side assistant
412
- * controls stay aligned with what the user sees.
410
+ * Used by host UI affordances that hand a question to the assistant (e.g. the header semantic
411
+ * search "ask AI" action). `userContext` carries the user's current location when available.
413
412
  */
414
- onAiAssistantOpenChange?: (open: boolean) => void;
413
+ onAskAiAssistant?: (question: string, userContext?: IGenAIUserContext) => void;
415
414
  }
416
415
 
417
416
  /**
@@ -424,9 +423,13 @@ export declare interface IHostUiMountOptions {
424
423
  * {@link IHostUiMountHandle.notify} may safely no-op for notification types they do not
425
424
  * handle, so adding a new variant is a backward-compatible change.
426
425
  *
426
+ * AI-assistant open/close/context signals are intentionally NOT host UI notifications: the chat
427
+ * is owned by the host runtime (outside the UI module), so the runtime drives it directly rather
428
+ * than routing through the UI module.
429
+ *
427
430
  * @alpha
428
431
  */
429
- export declare type IHostUiNotification = INewDeploymentAvailableHostUiNotification | IOpenAiAssistantHostUiNotification | ICloseAiAssistantHostUiNotification | IAiAssistantContextHostUiNotification;
432
+ export declare type IHostUiNotification = INewDeploymentAvailableHostUiNotification;
430
433
 
431
434
  /**
432
435
  * JWT-based authentication.
@@ -465,29 +468,6 @@ export declare interface INewDeploymentAvailableHostUiNotification {
465
468
  commitHash: string;
466
469
  }
467
470
 
468
- /**
469
- * Notification requesting the host UI to open its AI assistant chat.
470
- *
471
- * @remarks
472
- * Emitted when the active pluggable application requests the assistant (see
473
- * `IOpenAiAssistantRequestedEvent`). The host UI owns the single chat instance on
474
- * hosted-application routes and opens it, optionally seeded with a question and user context.
475
- *
476
- * @alpha
477
- */
478
- export declare interface IOpenAiAssistantHostUiNotification {
479
- type: "openAiAssistant";
480
- /**
481
- * Question to seed the chat with. When omitted, the chat just opens.
482
- */
483
- question?: string;
484
- /**
485
- * Context of the user's current location (e.g. the active dashboard), passed to the
486
- * assistant alongside the seeded question.
487
- */
488
- userContext?: IGenAIUserContext;
489
- }
490
-
491
471
  /**
492
472
  * Event requesting the host to open its AI assistant chat.
493
473
  *
@@ -692,6 +672,22 @@ export declare interface IPluggableApplicationMountHandle {
692
672
  * whenever its chat opens or closes. Applications without such controls may omit it.
693
673
  */
694
674
  setAiAssistantOpen?: (open: boolean) => void;
675
+ /**
676
+ * Delegates an AI-assistant link click to the application so it can handle navigation in-app.
677
+ *
678
+ * @remarks
679
+ * On hosted routes the host owns the chat, so links clicked inside it are handled by the host by
680
+ * default (open in a tab / navigate). An embedded application can intercept them instead — e.g. an
681
+ * embedded dashboard opening a visualization as an in-place overlay rather than navigating away.
682
+ * Return `true` if the application handled it (the host suppresses its own navigation); return
683
+ * `false` to let the host perform default link handling.
684
+ */
685
+ onAiAssistantLinkClicked?: (link: {
686
+ type?: string;
687
+ id?: string;
688
+ itemUrl?: string;
689
+ newTab?: boolean;
690
+ }) => boolean;
695
691
  }
696
692
 
697
693
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-pluggable-application-model",
3
- "version": "11.45.0-alpha.0",
3
+ "version": "11.45.0-alpha.1",
4
4
  "description": "GoodData SDK model contracts for pluggable applications",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "ts-invariant": "0.10.3",
25
25
  "tslib": "2.8.1",
26
- "@gooddata/sdk-model": "11.45.0-alpha.0"
26
+ "@gooddata/sdk-model": "11.45.0-alpha.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@microsoft/api-documenter": "^7.17.0",
@@ -47,8 +47,8 @@
47
47
  "oxlint-tsgolint": "0.15.0",
48
48
  "typescript": "5.9.3",
49
49
  "vitest": "4.1.8",
50
- "@gooddata/oxlint-config": "11.45.0-alpha.0",
51
- "@gooddata/eslint-config": "11.45.0-alpha.0"
50
+ "@gooddata/eslint-config": "11.45.0-alpha.1",
51
+ "@gooddata/oxlint-config": "11.45.0-alpha.1"
52
52
  },
53
53
  "scripts": {
54
54
  "_phase:build": "npm run build",