@xpert-ai/contracts 3.19.0 → 3.21.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 (51) hide show
  1. package/index.cjs.js +425 -20
  2. package/index.esm.js +372 -22
  3. package/package.json +5 -2
  4. package/src/agent/ai-model.d.ts +1 -0
  5. package/src/agent/token.d.ts +4 -0
  6. package/src/ai/agent-output-delivery.model.d.ts +31 -0
  7. package/src/ai/agent-runtime.model.d.ts +53 -0
  8. package/src/ai/ai-model.model.d.ts +3 -0
  9. package/src/ai/assistant-binding.model.d.ts +3 -0
  10. package/src/ai/assistant-configuration.model.d.ts +31 -0
  11. package/src/ai/bosi.model.d.ts +73 -0
  12. package/src/ai/chat-group-entity.model.d.ts +93 -0
  13. package/src/ai/chat-group.model.d.ts +298 -0
  14. package/src/ai/chat-message-envelope.model.d.ts +55 -0
  15. package/src/ai/chat-message.model.d.ts +10 -0
  16. package/src/ai/chat.model.d.ts +26 -0
  17. package/src/ai/conversation-entry.model.d.ts +18 -0
  18. package/src/ai/execution-activity.model.d.ts +547 -0
  19. package/src/ai/index.d.ts +11 -0
  20. package/src/ai/mcp-capability.model.d.ts +5 -1
  21. package/src/ai/membership.model.d.ts +5 -0
  22. package/src/ai/model-execution.model.d.ts +265 -0
  23. package/src/ai/model-gateway.model.d.ts +15 -3
  24. package/src/ai/model-usage.model.d.ts +19 -0
  25. package/src/ai/project-task-graph.model.d.ts +12 -0
  26. package/src/ai/project-task-runtime.model.d.ts +1106 -0
  27. package/src/ai/project-task-type.model.d.ts +13 -0
  28. package/src/ai/prompt-workflow.model.d.ts +4 -0
  29. package/src/ai/realtime-voice.model.d.ts +90 -0
  30. package/src/ai/realtime-voice.transport.d.ts +54 -0
  31. package/src/ai/resource-card.d.ts +2 -0
  32. package/src/ai/sandbox-terminal.model.d.ts +1 -0
  33. package/src/ai/thread-activity.model.d.ts +14 -0
  34. package/src/ai/xpert-agent-execution.model.d.ts +4 -0
  35. package/src/ai/xpert-project.model.d.ts +21 -0
  36. package/src/ai/xpert-template.model.d.ts +23 -5
  37. package/src/ai/xpert-tool-mcp.model.d.ts +6 -0
  38. package/src/ai/xpert.model.d.ts +7 -2
  39. package/src/api-key.model.d.ts +37 -2
  40. package/src/default-agent-plugins.d.ts +19 -0
  41. package/src/i18n.model.d.ts +1 -0
  42. package/src/index.d.ts +5 -0
  43. package/src/plugin-application.d.ts +256 -0
  44. package/src/plugin-management.d.ts +112 -0
  45. package/src/plugin.d.ts +3 -319
  46. package/src/runtime-control.d.ts +13 -0
  47. package/src/secret-token.model.d.ts +8 -1
  48. package/src/setup-plugins.d.ts +75 -0
  49. package/src/types.d.ts +4 -0
  50. package/src/view-extension/model.d.ts +22 -1
  51. package/src/view-extension/workbench.d.ts +6 -2
package/src/plugin.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
2
- import type { AiModelTypeEnum } from './agent';
3
- import { JsonSchemaObjectType } from './ai/types';
2
+ import type { PluginMarketplaceAppConfig } from './plugin-application';
4
3
  import type { IXpert, XpertWorkspaceDataScope } from './ai/xpert.model';
5
4
  import type { TMcpStdioRuntimePolicy } from './ai/xpert-tool-mcp.model';
6
5
  import type { IMcpApiKey } from './ai/mcp-auth.model';
7
6
  import type { IMcpPublication, McpPublicationStatus } from './ai/mcp-publication.model';
8
7
  import type { JSONValue } from './core.model';
9
- import type { IPluginRuntimeConvergence, IRuntimePluginRequirement } from './runtime-control';
8
+ export type * from './plugin-management';
10
9
  import { IconDefinition, I18nObject } from './types';
10
+ export * from './plugin-application';
11
11
  export type PluginName = string;
12
12
  export declare const PLUGIN_LEVEL: {
13
13
  readonly SYSTEM: "system";
@@ -91,216 +91,6 @@ export type PluginTargetApp = 'xpert' | 'data-xpert' | (string & {});
91
91
  export type PluginSdkCompatibilityWarningCode = 'plugin-sdk-peer-dependency-missing' | 'plugin-sdk-peer-range-invalid' | 'plugin-sdk-peer-range-incompatible' | 'plugin-sdk-peer-range-spans-major';
92
92
  export type PluginMarketplaceContributionType = 'app' | 'view' | 'feature' | 'skill' | 'tool' | 'mcp' | 'hook' | 'assistant-template' | (string & {});
93
93
  export type PluginMarketplaceOperationAccess = 'read' | 'write' | 'admin' | (string & {});
94
- /** Stable placement scopes declared by plugin application contributions. */
95
- export declare const PLUGIN_APPLICATION_SCOPE: {
96
- readonly TENANT: "tenant";
97
- readonly ORGANIZATION: "organization";
98
- readonly PERSONAL: "personal";
99
- };
100
- /**
101
- * Lifecycle states persisted for a governed plugin application installation.
102
- * `degraded` means the installation record exists but one or more managed
103
- * resources failed the host health check.
104
- */
105
- export declare const PLUGIN_APPLICATION_INSTALLATION_STATUS: {
106
- readonly INITIALIZING: "initializing";
107
- readonly READY: "ready";
108
- readonly FAILED: "failed";
109
- readonly DEGRADED: "degraded";
110
- };
111
- /**
112
- * Scope declared by a trusted plugin application contribution.
113
- *
114
- * The current host initializer supports `organization`; the other values are
115
- * stable contract values for discovery and UI gating until their installers
116
- * are implemented.
117
- */
118
- export type PluginApplicationScope = (typeof PLUGIN_APPLICATION_SCOPE)[keyof typeof PLUGIN_APPLICATION_SCOPE];
119
- export type PluginApplicationInstallationStatus = (typeof PLUGIN_APPLICATION_INSTALLATION_STATUS)[keyof typeof PLUGIN_APPLICATION_INSTALLATION_STATUS];
120
- /** Product capability rendered on a plugin application's marketplace detail page. */
121
- export interface PluginMarketplaceAppFeature {
122
- key: string;
123
- title: string | I18nObject;
124
- description?: string | I18nObject;
125
- icon?: IconDefinition;
126
- }
127
- /**
128
- * Knowledge base resource that the host creates as part of an organization
129
- * application installation. The plugin declares intent; the host supplies all
130
- * tenant, organization, workspace, and actor scope.
131
- */
132
- export interface PluginMarketplaceAppKnowledgebaseConfig {
133
- key: string;
134
- name: string | I18nObject;
135
- description?: string | I18nObject;
136
- permission: 'organization';
137
- applicationTags?: string[];
138
- graphRag?: {
139
- enabled: boolean;
140
- };
141
- }
142
- /** Model capabilities required before the host may initialize an application. */
143
- export interface PluginMarketplaceAppModelRequirements {
144
- primary?: boolean;
145
- embedding?: boolean;
146
- vision?: boolean;
147
- embeddingLabel?: string | I18nObject;
148
- visionLabel?: string | I18nObject;
149
- }
150
- export interface PluginMarketplaceAppAssistantDefinition {
151
- key: string;
152
- templateKey: string;
153
- primaryAgentKey: string;
154
- title?: string | I18nObject;
155
- }
156
- /** Portable independent Assistant topology owned by a trusted App. Instance IDs are host-managed. */
157
- export interface PluginMarketplaceAppAssistantSuite {
158
- version: string;
159
- coordinatorAgentKey: string;
160
- /** Published Assistants connected to the coordinator as required External Xperts. */
161
- roles: PluginMarketplaceAppAssistantDefinition[];
162
- /** Published in the same workspace without granting coordinator delegation. */
163
- standaloneAssistants?: PluginMarketplaceAppAssistantDefinition[];
164
- }
165
- /**
166
- * Declarative, host-owned initialization contract for a trusted plugin App.
167
- * The host only executes this contract from a loaded plugin contribution.
168
- */
169
- export interface PluginMarketplaceAppConfig {
170
- scope: PluginApplicationScope;
171
- assistantTemplateKey: string;
172
- assistantSuite?: PluginMarketplaceAppAssistantSuite;
173
- workspace: {
174
- mode: 'dedicated';
175
- name: string | I18nObject;
176
- description?: string | I18nObject;
177
- /** New app workspaces are private. Legacy 'organization' is accepted but does not grant sharing. */
178
- sharing?: 'private' | 'organization';
179
- };
180
- knowledgebases?: PluginMarketplaceAppKnowledgebaseConfig[];
181
- modelRequirements?: PluginMarketplaceAppModelRequirements;
182
- presentation?: {
183
- tagline?: string | I18nObject;
184
- longDescription?: string | I18nObject;
185
- developer?: string;
186
- screenshots?: string[];
187
- features?: PluginMarketplaceAppFeature[];
188
- useCases?: Array<string | I18nObject>;
189
- dataScope?: string | I18nObject;
190
- initializationSummary?: string | I18nObject;
191
- initializationSteps?: Array<string | I18nObject>;
192
- };
193
- entry?: {
194
- type: 'assistant-chat';
195
- };
196
- }
197
- /**
198
- * Trusted application metadata attached to an Assistant template after the
199
- * host resolves an explicit `assistantTemplateKey` link from a loaded plugin.
200
- */
201
- export interface PluginTemplateApplicationSummary {
202
- id: string;
203
- pluginName: string;
204
- appName: string;
205
- displayName: string | I18nObject;
206
- description?: string | I18nObject;
207
- icon?: IconDefinition;
208
- color?: string;
209
- scope: PluginApplicationScope;
210
- assistantTemplateKey: string;
211
- config: PluginMarketplaceAppConfig;
212
- }
213
- /**
214
- * Persisted control-plane record for one plugin application in one declared
215
- * scope. Managed resource identifiers are retained so health checks and
216
- * retries never need to rediscover resources by display name.
217
- */
218
- export interface IPluginApplicationInstallation extends IBasePerTenantAndOrganizationEntityModel {
219
- pluginName: string;
220
- appName: string;
221
- declaredScope: PluginApplicationScope;
222
- scopeKey: string;
223
- status: PluginApplicationInstallationStatus;
224
- pluginVersion?: string | null;
225
- templateId?: string | null;
226
- templateVersion?: string | null;
227
- operationId?: string | null;
228
- workspaceId?: string | null;
229
- xpertId?: string | null;
230
- knowledgebaseIds?: string[] | null;
231
- resourceRefs?: Record<string, string> | null;
232
- errorCode?: string | null;
233
- errorMessage?: string | null;
234
- }
235
- /** Host-authorized model choice returned by application initialization preflight. */
236
- export interface PluginApplicationModelOption {
237
- id: string;
238
- copilotId: string;
239
- model: string;
240
- label: string | I18nObject;
241
- modelType: AiModelTypeEnum;
242
- }
243
- /** Read model used by marketplace cards to render installation health and actions. */
244
- export interface PluginApplicationStatusSummary {
245
- appId: string;
246
- status: PluginApplicationInstallationStatus | 'not_installed';
247
- initializationAccess?: 'allowed' | 'organization_required' | 'role_required' | 'unsupported';
248
- installationId?: string;
249
- workspaceId?: string | null;
250
- xpertId?: string | null;
251
- assistantSlug?: string | null;
252
- errorCode?: string | null;
253
- errorMessage?: string | null;
254
- }
255
- /** Marketplace metadata paired with a trusted plugin App contribution. */
256
- export interface PluginApplicationCatalogMetadata {
257
- category?: PluginMarketplaceCategory;
258
- subcategory?: string;
259
- featured?: boolean;
260
- tags: string[];
261
- updatedAt?: string;
262
- }
263
- /** Card-sized App definition and scoped runtime status for marketplace discovery. */
264
- export interface PluginApplicationCatalogItem {
265
- application: PluginTemplateApplicationSummary;
266
- status: PluginApplicationStatusSummary;
267
- marketplace: PluginApplicationCatalogMetadata;
268
- }
269
- /**
270
- * Server-computed initialization readiness. Clients may select only model IDs
271
- * returned here and cannot provide tenant, organization, or workspace scope.
272
- */
273
- export interface PluginApplicationPreflight {
274
- supported: boolean;
275
- scope: PluginApplicationScope;
276
- canInitialize: boolean;
277
- reason?: 'organization_scope_required' | 'role_required' | 'scope_not_supported' | 'primary_model_required' | 'embedding_model_required' | 'vision_model_required';
278
- embeddingModels: PluginApplicationModelOption[];
279
- visionModels: PluginApplicationModelOption[];
280
- /** Organization Embedding-role default when it is present in embeddingModels. */
281
- defaultEmbeddingModelId?: string | null;
282
- /** Organization Primary-role default when it is vision-capable and present in visionModels. */
283
- defaultVisionModelId?: string | null;
284
- primaryModelAvailable: boolean;
285
- modelRequirements: PluginMarketplaceAppModelRequirements;
286
- }
287
- /** Complete application detail assembled from trusted plugin metadata and scoped runtime state. */
288
- export interface PluginApplicationDetail {
289
- application: PluginTemplateApplicationSummary;
290
- status: PluginApplicationStatusSummary;
291
- preflight: PluginApplicationPreflight;
292
- }
293
- /**
294
- * User-selectable portion of an initialization request. Scope and target
295
- * resources are intentionally absent and are derived from RequestContext.
296
- */
297
- export interface PluginApplicationInitializeInput {
298
- pluginName: string;
299
- appName: string;
300
- embeddingModelId?: string;
301
- visionModelId?: string;
302
- operationId: string;
303
- }
304
94
  export interface PluginMarketplaceOperation {
305
95
  name: string;
306
96
  displayName?: string | I18nObject;
@@ -726,112 +516,6 @@ export interface PluginMarketplaceResponse {
726
516
  message: string;
727
517
  }>;
728
518
  }
729
- export interface IPlugin extends IBasePerTenantAndOrganizationEntityModel {
730
- scopeKey?: string | null;
731
- pluginName: string;
732
- packageName: string;
733
- version?: string;
734
- source?: PluginSource;
735
- sourceConfig?: PluginSourceConfig | null;
736
- level?: PluginLevel;
737
- config: Record<string, any>;
738
- configurationStatus?: PluginConfigurationStatus | null;
739
- configurationError?: string | null;
740
- }
741
- export interface IPluginInstallInput {
742
- pluginName: PluginName;
743
- version?: string;
744
- source?: PluginSource;
745
- config?: Record<string, any>;
746
- sourceConfig?: PluginSourceConfig;
747
- }
748
- export interface IPluginInstallResult {
749
- success: boolean;
750
- name: PluginName;
751
- packageName: string;
752
- organizationId: string;
753
- currentVersion?: string;
754
- /**
755
- * The plugin package was installed and persisted, but automatic runtime convergence is either
756
- * intentionally deferred or unavailable. All API replicas must be gracefully replaced before
757
- * this version is considered active.
758
- */
759
- restartRequired?: boolean;
760
- /** Automatic organization-level convergence that the client should wait for before refreshing runtime data. */
761
- runtimeConvergence?: IPluginRuntimeConvergence;
762
- /** Expected runtime state used when an explicit restart is required. */
763
- runtimeRequirements?: IRuntimePluginRequirement[];
764
- }
765
- export interface IPluginUpdateResult extends IPluginInstallResult {
766
- latestVersion?: string;
767
- updated: boolean;
768
- previousVersion?: string;
769
- }
770
- export interface IPluginUninstallResult {
771
- success: boolean;
772
- /**
773
- * The persisted registration was removed, but process-global Nest artifacts
774
- * remain active until the API process is gracefully replaced.
775
- */
776
- restartRequired?: boolean;
777
- runtimeRequirements?: IRuntimePluginRequirement[];
778
- }
779
- export interface IPluginDescriptor {
780
- scopeKey?: string;
781
- organizationId?: string;
782
- name: PluginName;
783
- meta: PluginMeta;
784
- packageName?: string;
785
- source?: PluginSource;
786
- currentVersion?: string;
787
- latestVersion?: string;
788
- isGlobal: boolean;
789
- level: PluginLevel;
790
- canConfigure?: boolean;
791
- canRefresh?: boolean;
792
- canUninstall?: boolean;
793
- canUpdate?: boolean;
794
- hasUpdate?: boolean;
795
- configSchema?: JsonSchemaObjectType;
796
- configurationStatus?: PluginConfigurationStatus | null;
797
- configurationError?: string | null;
798
- sdkCompatibilityWarnings?: PluginSdkCompatibilityWarning[];
799
- loadStatus?: PluginLoadStatus | null;
800
- loadError?: string | null;
801
- effectiveInCurrentScope: boolean;
802
- scopeRelation?: PluginScopeRelation;
803
- componentSummary?: PluginComponentSummary;
804
- }
805
- export interface IPluginLatestVersionStatus {
806
- organizationId?: string;
807
- name: PluginName;
808
- packageName?: string;
809
- latestVersion?: string;
810
- hasUpdate: boolean;
811
- }
812
- export interface IPluginConfiguration<TConfig extends Record<string, any> = Record<string, any>> {
813
- pluginName: PluginName;
814
- config: TConfig;
815
- configSchema?: JsonSchemaObjectType;
816
- configurationStatus?: PluginConfigurationStatus | null;
817
- configurationError?: string | null;
818
- }
819
- export interface PluginComponentSummary {
820
- total: number;
821
- skills: number;
822
- mcpServers: number;
823
- toolsets: number;
824
- apps: number;
825
- hooks: number;
826
- }
827
- export interface IPluginComponentDefinition {
828
- componentType: PluginComponentType;
829
- componentKey: string;
830
- sourcePath?: string | null;
831
- config?: JSONValue | null;
832
- metadata?: JSONValue | null;
833
- definitionHash: string;
834
- }
835
519
  export interface IPluginComponentDocument {
836
520
  pluginName: PluginName;
837
521
  componentType: PluginComponentType;
@@ -64,3 +64,16 @@ export interface IRuntimeReadiness {
64
64
  restartId?: string;
65
65
  requestedAt?: string;
66
66
  }
67
+ /** Registry membership is distinct from liveness; missing heartbeats do not prove retirement. */
68
+ export interface IRuntimeInstanceRegistration {
69
+ instanceId: string;
70
+ bootId: string;
71
+ lastSeenAt: string;
72
+ online: boolean;
73
+ }
74
+ export interface IRuntimeInstanceRetirementRequest {
75
+ expectedBootId: string;
76
+ }
77
+ export interface IRuntimeInstanceRetirementResult {
78
+ status: 'retired' | 'not-found' | 'boot-changed' | 'online';
79
+ }
@@ -7,7 +7,7 @@ export type TEnterpriseH5TokenScope = {
7
7
  };
8
8
  /**
9
9
  * Selects how an opaque client secret is authorized and how entityId is
10
- * interpreted. createdById only records provenance; it does not distinguish
10
+ * interpreted. createdById alone does not distinguish
11
11
  * an API-key grant, a delegated user session, or a public assistant session.
12
12
  */
13
13
  export declare enum SecretTokenBindingType {
@@ -18,6 +18,12 @@ export declare enum SecretTokenBindingType {
18
18
  * as the acting business user for the interactive ChatKit run.
19
19
  */
20
20
  USER_XPERT = "user_xpert",
21
+ /**
22
+ * entityId is one conversation, initially a group. createdById is the real
23
+ * authenticated human. This grant never authorizes unrelated conversations,
24
+ * direct Assistant APIs or session issuance; live domain access still applies.
25
+ */
26
+ USER_CONVERSATION = "user_conversation",
21
27
  /**
22
28
  * entityId is the only Xpert this verified enterprise identity may access;
23
29
  * createdById is the AccountBinding-resolved Xpert user.
@@ -31,6 +37,7 @@ export interface ISecretToken extends IBasePerTenantAndOrganizationEntityModel {
31
37
  entityId?: string;
32
38
  /** Explicit grant/binding semantics for this opaque token. */
33
39
  type?: SecretTokenBindingType;
40
+ /** Stored representation: existing opaque secret or sha256:<digest> written by createHashed. Never send a digest as a bearer secret. */
34
41
  token: string;
35
42
  /** Exact enterprise channel that issued an ENTERPRISE_XPERT token. */
36
43
  enterpriseH5Scope?: TEnterpriseH5TokenScope | null;
@@ -0,0 +1,75 @@
1
+ import type { DefaultAgentPluginsImportResult } from './default-agent-plugins';
2
+ import type { IRuntimePluginRequirement } from './runtime-control';
3
+ import type { PluginLevel, PluginMarketplaceCategory, PluginMarketplaceItem, PluginMarketplaceResponse } from './plugin';
4
+ import type { I18nObject } from './types';
5
+ export interface SetupPluginChoice {
6
+ packageName: string;
7
+ title: string | I18nObject;
8
+ level?: PluginLevel;
9
+ version?: string;
10
+ }
11
+ export interface SetupPluginCatalogItem extends SetupPluginChoice {
12
+ description?: PluginMarketplaceItem['description'];
13
+ icon?: PluginMarketplaceItem['icon'];
14
+ author?: PluginMarketplaceItem['author'];
15
+ sourceName?: string;
16
+ type?: string;
17
+ businessCategory?: PluginMarketplaceCategory;
18
+ installed: boolean;
19
+ deprecated?: boolean;
20
+ deprecationMessage?: PluginMarketplaceItem['deprecationMessage'];
21
+ unavailableReason?: 'unsupported-source' | 'organization-required';
22
+ }
23
+ export interface SetupPluginCatalogQuery {
24
+ page?: number;
25
+ pageSize?: number;
26
+ search?: string;
27
+ type?: string;
28
+ businessCategory?: PluginMarketplaceCategory;
29
+ level?: PluginLevel;
30
+ groupBy?: 'none' | 'type' | 'business';
31
+ }
32
+ export interface SetupPluginCatalogResponse {
33
+ items: SetupPluginCatalogItem[];
34
+ total: number;
35
+ page: number;
36
+ pageSize: number;
37
+ /** Lightweight selection identities for all matching pages, excluding installed/unavailable plugins. */
38
+ selectableNames: string[];
39
+ facets: {
40
+ types: Array<{
41
+ value: string;
42
+ count: number;
43
+ }>;
44
+ businessCategories: Array<{
45
+ value: PluginMarketplaceCategory;
46
+ count: number;
47
+ }>;
48
+ };
49
+ errors: PluginMarketplaceResponse['errors'];
50
+ }
51
+ export type SetupPluginItemStatus = 'pending' | 'installing' | 'installed' | 'existing' | 'failed';
52
+ export interface SetupPluginItem extends SetupPluginChoice {
53
+ status: SetupPluginItemStatus;
54
+ error?: string;
55
+ runtimeRequirements: IRuntimePluginRequirement[];
56
+ }
57
+ export interface SetupPluginProgress {
58
+ phase: 'idle' | 'installing' | 'restarting' | 'completed' | 'attention';
59
+ items: SetupPluginItem[];
60
+ defaultAgentPlugins?: {
61
+ status: 'pending' | 'importing' | 'completed' | 'failed';
62
+ result?: DefaultAgentPluginsImportResult;
63
+ error?: string;
64
+ };
65
+ /** Pin organization-level installations when a persisted job is resumed. */
66
+ organizationId?: string | null;
67
+ updatedAt: string;
68
+ restartId?: string;
69
+ generation?: number;
70
+ error?: string;
71
+ }
72
+ export interface SetupPluginsResponse {
73
+ progress: SetupPluginProgress;
74
+ automaticRestart: boolean;
75
+ }
package/src/types.d.ts CHANGED
@@ -1,7 +1,9 @@
1
+ import type { AssistantAppearance } from '@xpert-ai/chatkit-types';
1
2
  import ShortUniqueId from 'short-unique-id';
2
3
  import type * as z3 from 'zod/v3';
3
4
  import type * as z4 from 'zod/v4/core';
4
5
  import type { I18nObject } from './i18n.model';
6
+ export type { AssistantAppearance as TAssistantAppearance, AssistantCharacterConfig as TAssistantCharacterConfig } from '@xpert-ai/chatkit-types';
5
7
  export type { I18nObject, I18nText } from './i18n.model';
6
8
  export { resolveI18nText } from './i18n.model';
7
9
  declare const uuidGenerator: ShortUniqueId;
@@ -15,6 +17,8 @@ export declare const uuid: (...args: Parameters<(typeof uuidGenerator)["randomUU
15
17
  */
16
18
  export type ID = string;
17
19
  export type TAvatar = {
20
+ /** Optional animated Assistant presentation; legacy renderers continue to use url/emoji. */
21
+ appearance?: AssistantAppearance;
18
22
  emoji?: {
19
23
  id: string;
20
24
  set?: '' | 'apple' | 'google' | 'twitter' | 'facebook';
@@ -144,6 +144,8 @@ export interface XpertWorkbenchViewOptions {
144
144
  * menu, navigation or live Agent request. This does not grant view access.
145
145
  */
146
146
  openMode?: 'auto' | 'on-demand';
147
+ /** Opt into conversation changes while retaining the mounted Remote View. */
148
+ contextScope?: 'project' | 'conversation';
147
149
  menu?: {
148
150
  /** Controls the manual entry only; does not disable the view or navigation. */
149
151
  enabled?: boolean;
@@ -409,6 +411,10 @@ export interface WorkbenchNavigationOpenPayload {
409
411
  viewKey?: string;
410
412
  selectionId?: string;
411
413
  parameters?: Record<string, XpertViewScalar | XpertViewScalar[]>;
414
+ /** Exact visible message in the requested branch. */
415
+ messageId?: string;
416
+ /** Keep the originating Workbench view open during navigation. */
417
+ preserveView?: boolean;
412
418
  }
413
419
  export interface WorkbenchAssistantConversationOpenRequest {
414
420
  conversationId: string;
@@ -418,6 +424,10 @@ export interface WorkbenchAssistantConversationOpenRequest {
418
424
  xpertId?: string;
419
425
  /** Untrusted hint; the host must resolve the canonical Project from `conversationId`. */
420
426
  projectId?: string;
427
+ /** Exact visible message in the requested branch. */
428
+ messageId?: string;
429
+ /** Keep the originating Workbench view open during navigation. */
430
+ preserveView?: boolean;
421
431
  }
422
432
  /** Server-authorized runtime scope used to rebuild ChatKit for one persisted Assistant conversation. */
423
433
  export interface WorkbenchAssistantConversationResolution {
@@ -426,11 +436,12 @@ export interface WorkbenchAssistantConversationResolution {
426
436
  xpertId: string;
427
437
  projectId: string | null;
428
438
  isExternalAssistant: boolean;
439
+ messageId?: string;
429
440
  }
430
441
  export interface WorkbenchAssistantProjectOpenRequest {
431
442
  /** Trusted platform Chat Project id; this is distinct from plugin business ids. */
432
443
  projectId: string;
433
- /** Open a business selection atomically with the Project route. */
444
+ /** Inspect a View in this Project without changing the active conversation. */
434
445
  view?: WorkbenchExtensionViewOpenRequest;
435
446
  }
436
447
  export interface WorkbenchExtensionViewOpenRequest {
@@ -524,6 +535,16 @@ export interface XpertRemoteViewHostEventMessage {
524
535
  /** Optional visualization metadata used by manifest filters and remote views. */
525
536
  visualization?: XpertViewHostEventVisualization;
526
537
  }
538
+ /** Sent to every mounted View after an authorized runtime context change, including hidden Views. */
539
+ export interface XpertRemoteViewContextChangedEvent extends XpertRemoteViewHostEventMessage {
540
+ type: 'view.context.changed';
541
+ data: {
542
+ /** Monotonic within this View instance; stale asynchronous results must be ignored. */
543
+ revision: number;
544
+ /** Complete target scope. Null means no binding, never a scope still being resolved. */
545
+ runtimeScope: Required<XpertViewRuntimeScopeInput>;
546
+ };
547
+ }
527
548
  /**
528
549
  * Host-internal event message. `hostType` and `hostId` are routing fields and
529
550
  * must be stripped before forwarding to remote components.
@@ -1,2 +1,6 @@
1
- /** Existing Assistant Workbench slot; openMode controls initial tab opening separately. */
2
- export declare const AGENT_WORKBENCH_SLOT = "agent.workbench.fixed";
1
+ /** Assistant Workbench slot; openMode controls initial tab opening separately. */
2
+ export declare const AGENT_WORKBENCH_SLOT = "agent.workbench";
3
+ /** Legacy plugin declarations and client requests; normalized to AGENT_WORKBENCH_SLOT by the host. */
4
+ export declare const LEGACY_AGENT_WORKBENCH_SLOTS: readonly ["agent.workbench.fixed", "agent.workbench.main"];
5
+ /** Platform-provided navigation, available without Assistant middleware. */
6
+ export declare const CONVERSATION_MAP_FEATURE = "platform.conversation-map";