@xpert-ai/contracts 3.17.6 → 3.18.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/index.cjs.js +125 -34
- package/index.esm.js +117 -35
- package/package.json +2 -2
- package/src/ai/assistant-model.model.d.ts +29 -0
- package/src/ai/assistant-user-preference.model.d.ts +26 -0
- package/src/ai/chat-message.model.d.ts +5 -0
- package/src/ai/index.d.ts +2 -0
- package/src/ai/knowledgebase.model.d.ts +5 -0
- package/src/ai/model-usage.model.d.ts +32 -0
- package/src/ai/skill.model.d.ts +13 -0
- package/src/ai/xpert-agent-execution.model.d.ts +5 -0
- package/src/ai/xpert-chat.model.d.ts +4 -1
- package/src/ai/xpert-project.model.d.ts +92 -3
- package/src/ai/xpert-task.model.d.ts +16 -0
- package/src/ai/xpert-template.model.d.ts +3 -1
- package/src/ai/xpert-workspace.model.d.ts +15 -2
- package/src/ai/xpert.model.d.ts +23 -1
- package/src/ai/xpert.utils.d.ts +2 -1
- package/src/artifact.model.d.ts +1 -1
- package/src/file-asset.model.d.ts +5 -1
- package/src/organization.model.d.ts +3 -0
- package/src/plugin.d.ts +184 -1
- package/src/view-extension/model.d.ts +90 -0
|
@@ -10,13 +10,72 @@ import { IXpertToolset } from './xpert-toolset.model';
|
|
|
10
10
|
import { IXpertWorkspace } from './xpert-workspace.model';
|
|
11
11
|
import { IXpert, TXpertTeamDraft } from './xpert.model';
|
|
12
12
|
export type TXpertProjectSettings = {
|
|
13
|
-
|
|
13
|
+
/** @deprecated Project instructions are stored in /project/<projectId>/project.md. */
|
|
14
|
+
instruction?: string;
|
|
14
15
|
mode?: '' | 'plan';
|
|
15
16
|
managementMode?: TXpertProjectManagementMode;
|
|
16
|
-
/**
|
|
17
|
+
/** @deprecated Project Xperts are peers and no default Project Assistant is selected. */
|
|
17
18
|
projectAssistantId?: string;
|
|
18
19
|
};
|
|
19
20
|
export type TXpertProjectManagementMode = 'simple' | 'advanced';
|
|
21
|
+
export type TXpertProjectMemberRole = 'manager' | 'editor' | 'member';
|
|
22
|
+
export type TXpertProjectAccessRole = 'owner' | TXpertProjectMemberRole;
|
|
23
|
+
export type TXpertProjectInvitationStatus = 'pending' | 'accepted' | 'declined' | 'revoked' | 'expired';
|
|
24
|
+
export type TXpertProjectAccessSummary = {
|
|
25
|
+
role: TXpertProjectAccessRole;
|
|
26
|
+
capabilities: {
|
|
27
|
+
canRead: boolean;
|
|
28
|
+
canEdit: boolean;
|
|
29
|
+
canManage: boolean;
|
|
30
|
+
canUse: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type TXpertProjectMemberSummary = {
|
|
34
|
+
id: string;
|
|
35
|
+
firstName?: string;
|
|
36
|
+
lastName?: string;
|
|
37
|
+
email?: string;
|
|
38
|
+
username?: string;
|
|
39
|
+
imageUrl?: string;
|
|
40
|
+
membershipId?: string;
|
|
41
|
+
projectRole: TXpertProjectAccessRole;
|
|
42
|
+
joinedAt?: Date;
|
|
43
|
+
};
|
|
44
|
+
export type TXpertProjectInstructions = {
|
|
45
|
+
content: string;
|
|
46
|
+
};
|
|
47
|
+
export type TXpertProjectSkillSource = 'repository' | 'upload' | 'legacy';
|
|
48
|
+
export type TXpertProjectSkillSummary = {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
path: string;
|
|
52
|
+
enabled: boolean;
|
|
53
|
+
source: TXpertProjectSkillSource;
|
|
54
|
+
description?: string;
|
|
55
|
+
version?: string;
|
|
56
|
+
};
|
|
57
|
+
export type TXpertProjectSkills = {
|
|
58
|
+
items: TXpertProjectSkillSummary[];
|
|
59
|
+
total: number;
|
|
60
|
+
};
|
|
61
|
+
export type TXpertProjectSkillFile = {
|
|
62
|
+
path: string;
|
|
63
|
+
content: string;
|
|
64
|
+
};
|
|
65
|
+
export type TXpertProjectMemberInput = {
|
|
66
|
+
userId: string;
|
|
67
|
+
role?: TXpertProjectMemberRole;
|
|
68
|
+
};
|
|
69
|
+
export type TXpertProjectMemberRoleInput = {
|
|
70
|
+
role: TXpertProjectMemberRole;
|
|
71
|
+
};
|
|
72
|
+
export type TXpertProjectInvitationInput = {
|
|
73
|
+
email: string;
|
|
74
|
+
role?: TXpertProjectMemberRole;
|
|
75
|
+
};
|
|
76
|
+
export type TXpertProjectInvitationTokenInput = {
|
|
77
|
+
token: string;
|
|
78
|
+
};
|
|
20
79
|
export type TXpertProjectStatus = 'active' | 'deprecated' | 'archived';
|
|
21
80
|
export type TXpertProjectPlanStatus = 'draft' | 'active' | 'completed' | 'archived';
|
|
22
81
|
export type TXpertProjectMilestoneStatus = 'planned' | 'in_progress' | 'completed' | 'blocked';
|
|
@@ -89,6 +148,7 @@ export type TXpertProject = {
|
|
|
89
148
|
* Expert Project
|
|
90
149
|
*/
|
|
91
150
|
export interface IXpertProject extends TXpertProject, IBasePerTenantAndOrganizationEntityModel {
|
|
151
|
+
/** @deprecated Projects are scoped by Organization and no longer bind runtime data to a Workspace. */
|
|
92
152
|
workspaceId?: string;
|
|
93
153
|
workspace?: IXpertWorkspace;
|
|
94
154
|
ownerId: string;
|
|
@@ -97,6 +157,7 @@ export interface IXpertProject extends TXpertProject, IBasePerTenantAndOrganizat
|
|
|
97
157
|
toolsets?: IXpertToolset[];
|
|
98
158
|
knowledges?: IKnowledgebase[];
|
|
99
159
|
members?: IUser[];
|
|
160
|
+
memberships?: IXpertProjectMembership[];
|
|
100
161
|
/**
|
|
101
162
|
* @deprecated Use project file volume / FileAsset workspace projection instead.
|
|
102
163
|
*/
|
|
@@ -107,6 +168,34 @@ export interface IXpertProject extends TXpertProject, IBasePerTenantAndOrganizat
|
|
|
107
168
|
attachments?: IStorageFile[];
|
|
108
169
|
vcs?: IXpertProjectVCS;
|
|
109
170
|
}
|
|
171
|
+
export interface IXpertProjectMembership extends IBasePerTenantAndOrganizationEntityModel {
|
|
172
|
+
projectId: string;
|
|
173
|
+
project?: IXpertProject;
|
|
174
|
+
userId: string;
|
|
175
|
+
user?: IUser;
|
|
176
|
+
role: TXpertProjectMemberRole;
|
|
177
|
+
invitedById?: string;
|
|
178
|
+
invitedBy?: IUser;
|
|
179
|
+
joinedAt: Date;
|
|
180
|
+
removedAt?: Date;
|
|
181
|
+
}
|
|
182
|
+
export interface IXpertProjectInvitation extends IBasePerTenantAndOrganizationEntityModel {
|
|
183
|
+
projectId: string;
|
|
184
|
+
project?: IXpertProject;
|
|
185
|
+
email: string;
|
|
186
|
+
normalizedEmail: string;
|
|
187
|
+
targetUserId?: string;
|
|
188
|
+
targetUser?: IUser;
|
|
189
|
+
role: TXpertProjectMemberRole;
|
|
190
|
+
status: TXpertProjectInvitationStatus;
|
|
191
|
+
expiresAt: Date;
|
|
192
|
+
invitedById: string;
|
|
193
|
+
invitedBy?: IUser;
|
|
194
|
+
acceptedById?: string;
|
|
195
|
+
acceptedBy?: IUser;
|
|
196
|
+
acceptedAt?: Date;
|
|
197
|
+
lastSentAt: Date;
|
|
198
|
+
}
|
|
110
199
|
export type IXpertProjectCreateInput = Partial<IXpertProject> & {
|
|
111
200
|
xpertIds?: string[];
|
|
112
201
|
toolsetIds?: string[];
|
|
@@ -127,7 +216,7 @@ export interface IXpertProjectTask extends IBasePerXpertProjectEntityModel {
|
|
|
127
216
|
priority?: TXpertProjectTaskPriority;
|
|
128
217
|
assigneeId?: string;
|
|
129
218
|
assignee?: IUser;
|
|
130
|
-
/** Project
|
|
219
|
+
/** Project Xpert responsible for executing this task. */
|
|
131
220
|
assigneeXpertId?: string;
|
|
132
221
|
dueDate?: Date;
|
|
133
222
|
planId?: string;
|
|
@@ -4,6 +4,8 @@ import type { TXpertChatState } from '@xpert-ai/chatkit-types';
|
|
|
4
4
|
import { IChatConversation } from './chat.model';
|
|
5
5
|
import { JsonSchemaObjectType } from './types';
|
|
6
6
|
import { IXpert } from './xpert.model';
|
|
7
|
+
import { IXpertProject } from './xpert-project.model';
|
|
8
|
+
import { IUser } from '../user.model';
|
|
7
9
|
export declare const XPERT_TASK_SCHEDULE_PROPERTY_PREFIX = "xpert_task_";
|
|
8
10
|
export declare const XPERT_TASK_SCHEDULE_IDEMPOTENCY_KEY = "__idempotency_key";
|
|
9
11
|
export type TXpertTaskScheduleCapabilities = {
|
|
@@ -31,10 +33,24 @@ export type XpertTaskType = {
|
|
|
31
33
|
timeZone?: string;
|
|
32
34
|
prompt?: string;
|
|
33
35
|
status?: ScheduleTaskStatus;
|
|
36
|
+
/** User-visible reason explaining why a scheduled task was paused. */
|
|
37
|
+
statusReason?: string | null;
|
|
34
38
|
runtimeState?: TXpertChatState | null;
|
|
35
39
|
xpert?: IXpert;
|
|
36
40
|
xpertId?: string;
|
|
37
41
|
agentKey?: string;
|
|
42
|
+
project?: IXpertProject;
|
|
43
|
+
projectId?: string;
|
|
44
|
+
/** Human identity whose permissions and personal Connector accounts are used at execution time. */
|
|
45
|
+
runAsUser?: IUser;
|
|
46
|
+
runAsUserId?: string;
|
|
47
|
+
/** Pending replacement identity; it becomes active only after this user accepts. */
|
|
48
|
+
pendingRunAsUserId?: string | null;
|
|
49
|
+
/** User who initiated the pending run-as transfer. */
|
|
50
|
+
pendingRunAsRequestedById?: string | null;
|
|
51
|
+
pendingRunAsRequestedAt?: Date | null;
|
|
52
|
+
/** Snapshot of the Xpert and Connector selection that the proposed run-as user is confirming. */
|
|
53
|
+
pendingRunAsConfigurationHash?: string | null;
|
|
38
54
|
conversations?: IChatConversation[];
|
|
39
55
|
job?: any;
|
|
40
56
|
scheduleDescription?: string;
|
|
@@ -4,7 +4,7 @@ import { TCopilotModel } from './copilot-model.model';
|
|
|
4
4
|
import { MCPServerType, TMCPServer } from './xpert-tool-mcp.model';
|
|
5
5
|
import { XpertTypeEnum } from './xpert.model';
|
|
6
6
|
import type { TPromptWorkflow } from './prompt-workflow.model';
|
|
7
|
-
import { PluginTargetApp, PluginTargetAppMeta, XpertTemplatePluginDependencies } from '../plugin';
|
|
7
|
+
import { PluginTargetApp, PluginTargetAppMeta, PluginTemplateApplicationSummary, XpertTemplatePluginDependencies } from '../plugin';
|
|
8
8
|
export interface IXpertTemplate extends IBasePerTenantEntityModel {
|
|
9
9
|
key: string;
|
|
10
10
|
name?: string;
|
|
@@ -96,6 +96,8 @@ export type TTemplate = {
|
|
|
96
96
|
releaseNotes?: string;
|
|
97
97
|
xpertName?: string;
|
|
98
98
|
dependencies?: XpertTemplatePluginDependencies;
|
|
99
|
+
/** Trusted plugin App explicitly linked to this Assistant template. */
|
|
100
|
+
application?: PluginTemplateApplicationSummary;
|
|
99
101
|
};
|
|
100
102
|
export type TXpertTemplate = TTemplate & {
|
|
101
103
|
avatar: TAvatar;
|
|
@@ -23,12 +23,19 @@ export type TXpertWorkspaceSettings = {
|
|
|
23
23
|
visibility?: TXpertWorkspaceVisibility;
|
|
24
24
|
};
|
|
25
25
|
system?: {
|
|
26
|
-
kind?: 'org-default' | 'tenant-default' | 'user-default';
|
|
26
|
+
kind?: 'org-default' | 'tenant-default' | 'user-default' | 'plugin-app';
|
|
27
27
|
userId?: string;
|
|
28
|
+
pluginName?: string;
|
|
29
|
+
appName?: string;
|
|
28
30
|
};
|
|
29
31
|
};
|
|
30
32
|
export type TXpertWorkspaceStatus = 'active' | 'deprecated' | 'archived';
|
|
31
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Authoring visibility of a workspace.
|
|
35
|
+
* `organization-shared` grants current organization members access without
|
|
36
|
+
* materializing a membership row for every existing or future member.
|
|
37
|
+
*/
|
|
38
|
+
export type TXpertWorkspaceVisibility = 'private' | 'tenant-shared' | 'organization-shared';
|
|
32
39
|
export type TXpertWorkspaceAccessPurpose = 'runtime' | 'authoring';
|
|
33
40
|
export type TXpertWorkspaceCapabilities = {
|
|
34
41
|
canRead: boolean;
|
|
@@ -36,8 +43,14 @@ export type TXpertWorkspaceCapabilities = {
|
|
|
36
43
|
canWrite: boolean;
|
|
37
44
|
canManage: boolean;
|
|
38
45
|
};
|
|
46
|
+
/** Normalizes missing or unknown persisted values to the secure `private` default. */
|
|
39
47
|
export declare function getXpertWorkspaceVisibility(workspace?: Pick<IXpertWorkspace, 'settings'> | null): TXpertWorkspaceVisibility;
|
|
40
48
|
export declare function isTenantSharedXpertWorkspace(workspace?: Pick<IXpertWorkspace, 'settings'> | null): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Returns whether an organization workspace is intentionally shared with all
|
|
51
|
+
* current organization members instead of an explicit member list.
|
|
52
|
+
*/
|
|
53
|
+
export declare function isOrganizationSharedXpertWorkspace(workspace?: Pick<IXpertWorkspace, 'settings'> | null): boolean;
|
|
41
54
|
export interface IBasePerWorkspaceEntityModel extends IBasePerTenantAndOrganizationEntityModel {
|
|
42
55
|
workspaceId?: string;
|
|
43
56
|
workspace?: IXpertWorkspace;
|
package/src/ai/xpert.model.d.ts
CHANGED
|
@@ -135,6 +135,11 @@ export type TXpert = {
|
|
|
135
135
|
* Expert description
|
|
136
136
|
*/
|
|
137
137
|
description?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Ownership of non-Project runtime files. This is selected when the Xpert is
|
|
140
|
+
* created and is immutable afterwards. Missing legacy values mean `shared`.
|
|
141
|
+
*/
|
|
142
|
+
workspaceDataScope?: XpertWorkspaceDataScope;
|
|
138
143
|
/**
|
|
139
144
|
* Is active
|
|
140
145
|
*/
|
|
@@ -224,11 +229,13 @@ export type TXpert = {
|
|
|
224
229
|
integrations?: IIntegration[];
|
|
225
230
|
tags?: ITag[];
|
|
226
231
|
};
|
|
232
|
+
export type XpertWorkspaceDataScope = 'shared' | 'user';
|
|
233
|
+
export declare const DEFAULT_XPERT_WORKSPACE_DATA_SCOPE: XpertWorkspaceDataScope;
|
|
227
234
|
/**
|
|
228
235
|
* Digital Expert
|
|
229
236
|
*/
|
|
230
237
|
export interface IXpert extends IBasePerWorkspaceEntityModel, TXpert {
|
|
231
|
-
environmentId?: string;
|
|
238
|
+
environmentId?: string | null;
|
|
232
239
|
environment?: IEnvironment;
|
|
233
240
|
/**
|
|
234
241
|
* When type is 'knowledge', it must binding a knowledgebase
|
|
@@ -245,6 +252,7 @@ export interface IXpertPrincipalReference {
|
|
|
245
252
|
}
|
|
246
253
|
export declare enum XpertWorkbenchInitialLayoutEnum {
|
|
247
254
|
TwoColumns = "two-columns",
|
|
255
|
+
OverlayDialog = "overlay-dialog",
|
|
248
256
|
ChatkitMaximized = "chatkit-maximized",
|
|
249
257
|
WorkbenchMaximized = "workbench-maximized"
|
|
250
258
|
}
|
|
@@ -285,6 +293,11 @@ export type TXpertDataXpertOptions = {
|
|
|
285
293
|
[key: string]: unknown;
|
|
286
294
|
};
|
|
287
295
|
export type TXpertOptions = {
|
|
296
|
+
/** Runtime-selectable Primary Agent models. The configured Primary model is added automatically. */
|
|
297
|
+
modelSelection?: {
|
|
298
|
+
/** Additional LLM models users may select. */
|
|
299
|
+
allowedModels: TCopilotModel[];
|
|
300
|
+
};
|
|
288
301
|
/** Declares how an Assistant resolves the workspace used by files and Agent runs. */
|
|
289
302
|
workspaceScope?: {
|
|
290
303
|
/** Require an explicit Project, or prefer one while preserving the legacy fallback. */
|
|
@@ -473,6 +486,7 @@ export declare enum XpertParameterTypeEnum {
|
|
|
473
486
|
ARRAY = "array[object]",
|
|
474
487
|
ARRAY_FILE = "array[file]",
|
|
475
488
|
ARRAY_DOCUMENT = "array[document]",
|
|
489
|
+
ARRAY_MESSAGE = "array[message]",
|
|
476
490
|
BOOLEAN = "boolean",
|
|
477
491
|
SECRET = "secret"
|
|
478
492
|
}
|
|
@@ -629,6 +643,14 @@ export type TChatOptions = {
|
|
|
629
643
|
* Per-request runtime context forwarded to agent middleware/tools.
|
|
630
644
|
*/
|
|
631
645
|
context?: Record<string, unknown>;
|
|
646
|
+
/** Resolved runtime override for the Assistant Primary Agent only. */
|
|
647
|
+
primaryCopilotModel?: TCopilotModel;
|
|
648
|
+
/** Opaque Assistant model option id recorded for audit and retry. */
|
|
649
|
+
primaryModelId?: string;
|
|
650
|
+
/** Published Primary Agent key to which the override is restricted. */
|
|
651
|
+
primaryAgentKey?: string;
|
|
652
|
+
/** How the effective Primary Agent model was selected. */
|
|
653
|
+
primaryModelSource?: import('./assistant-model.model').TAssistantPrimaryModelSelectionSource;
|
|
632
654
|
};
|
|
633
655
|
export type TChatRuntimePrincipal = {
|
|
634
656
|
type: 'assistant';
|
package/src/ai/xpert.utils.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { IPoint } from '../types';
|
|
|
2
2
|
import { IXpertAgent } from './xpert-agent.model';
|
|
3
3
|
import { IXpert, TXpertGraph, TXpertTeamConnection, TXpertTeamDraft, TXpertTeamNode } from './xpert.model';
|
|
4
4
|
export declare function omitXpertRelations(xpert: Partial<IXpert>): {
|
|
5
|
-
environmentId?: string;
|
|
5
|
+
environmentId?: string | null;
|
|
6
6
|
workspaceId?: string;
|
|
7
7
|
workspace?: import("./xpert-workspace.model").IXpertWorkspace;
|
|
8
8
|
publishAt?: Date;
|
|
@@ -24,6 +24,7 @@ export declare function omitXpertRelations(xpert: Partial<IXpert>): {
|
|
|
24
24
|
title?: string;
|
|
25
25
|
titleCN?: string;
|
|
26
26
|
description?: string;
|
|
27
|
+
workspaceDataScope?: import("./xpert.model").XpertWorkspaceDataScope;
|
|
27
28
|
active?: boolean;
|
|
28
29
|
avatar?: import("../types").TAvatar;
|
|
29
30
|
starters?: string[];
|
package/src/artifact.model.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export interface IArtifactWorkspaceFileReference {
|
|
|
35
35
|
workspacePath: string;
|
|
36
36
|
tenantId?: string | null;
|
|
37
37
|
userId?: string | null;
|
|
38
|
-
catalog?: 'projects' | 'users' | 'knowledges' | 'skills' | 'xperts' | null;
|
|
38
|
+
catalog?: 'projects' | 'users' | 'knowledges' | 'skills' | 'xperts' | 'user-xperts' | null;
|
|
39
39
|
scopeId?: string | null;
|
|
40
40
|
projectId?: string | null;
|
|
41
41
|
knowledgeId?: string | null;
|
|
@@ -2,7 +2,7 @@ import { IStorageFile } from './storage-file.model';
|
|
|
2
2
|
export type FileAssetStatus = 'success' | 'partial_success' | 'failed';
|
|
3
3
|
export type FileAssetDestinationKind = 'storage' | 'volume' | 'sandbox';
|
|
4
4
|
export type FileAssetSourceKind = 'multipart' | 'storage_file' | 'local_file' | 'buffer';
|
|
5
|
-
export type FileUploadVolumeCatalog = 'projects' | 'users' | 'knowledges' | 'skills' | 'xperts';
|
|
5
|
+
export type FileUploadVolumeCatalog = 'projects' | 'users' | 'knowledges' | 'skills' | 'xperts' | 'user-xperts';
|
|
6
6
|
export type FileUploadSandboxMode = 'mounted_workspace' | 'backend_upload';
|
|
7
7
|
export interface IFileAssetSource {
|
|
8
8
|
kind: FileAssetSourceKind;
|
|
@@ -62,6 +62,10 @@ export interface IUploadFileSandboxTarget {
|
|
|
62
62
|
strategy?: string;
|
|
63
63
|
mode: FileUploadSandboxMode;
|
|
64
64
|
workspacePath?: string;
|
|
65
|
+
/** Trusted server-side boundary for mounted workspace writes. */
|
|
66
|
+
workspaceBoundaryPath?: string;
|
|
67
|
+
/** Prevent generic uploads from mutating Project-authored instructions and skills. */
|
|
68
|
+
projectContentReadOnly?: boolean;
|
|
65
69
|
workspaceUrl?: string;
|
|
66
70
|
workspaceId?: string;
|
|
67
71
|
sandboxUrl?: string;
|
|
@@ -55,6 +55,7 @@ export interface IOrganization extends IBasePerTenantEntityModel {
|
|
|
55
55
|
employees?: IEmployee[];
|
|
56
56
|
invitesAllowed?: boolean;
|
|
57
57
|
inviteExpiryPeriod?: number;
|
|
58
|
+
sidebarExpandedByDefault?: boolean;
|
|
58
59
|
tags: ITag[];
|
|
59
60
|
futureDateAllowed?: boolean;
|
|
60
61
|
allowManualTime?: boolean;
|
|
@@ -124,6 +125,7 @@ export interface IOrganizationCreateInput extends IContact {
|
|
|
124
125
|
bonusPercentage?: number;
|
|
125
126
|
invitesAllowed?: boolean;
|
|
126
127
|
inviteExpiryPeriod?: number;
|
|
128
|
+
sidebarExpandedByDefault?: boolean;
|
|
127
129
|
tags?: ITag[];
|
|
128
130
|
tenant: ITenant;
|
|
129
131
|
contact?: IContact;
|
|
@@ -152,6 +154,7 @@ export declare enum OrganizationSelectInput {
|
|
|
152
154
|
createdAt = "createdAt",
|
|
153
155
|
updatedAt = "updatedAt",
|
|
154
156
|
isActive = "isActive",
|
|
157
|
+
sidebarExpandedByDefault = "sidebarExpandedByDefault",
|
|
155
158
|
tags = "tags"
|
|
156
159
|
}
|
|
157
160
|
export declare enum RegionsEnum {
|
package/src/plugin.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
+
import type { AiModelTypeEnum } from './agent';
|
|
2
3
|
import { JsonSchemaObjectType } from './ai/types';
|
|
3
|
-
import type { IXpert } from './ai/xpert.model';
|
|
4
|
+
import type { IXpert, XpertWorkspaceDataScope } from './ai/xpert.model';
|
|
4
5
|
import type { TMcpStdioRuntimePolicy } from './ai/xpert-tool-mcp.model';
|
|
5
6
|
import type { JSONValue } from './core.model';
|
|
6
7
|
import type { IPluginRuntimeConvergence, IRuntimePluginRequirement } from './runtime-control';
|
|
@@ -88,6 +89,185 @@ export type PluginTargetApp = 'xpert' | 'data-xpert' | (string & {});
|
|
|
88
89
|
export type PluginSdkCompatibilityWarningCode = 'plugin-sdk-peer-dependency-missing' | 'plugin-sdk-peer-range-invalid' | 'plugin-sdk-peer-range-incompatible' | 'plugin-sdk-peer-range-spans-major';
|
|
89
90
|
export type PluginMarketplaceContributionType = 'app' | 'view' | 'feature' | 'skill' | 'tool' | 'mcp' | 'hook' | 'assistant-template' | (string & {});
|
|
90
91
|
export type PluginMarketplaceOperationAccess = 'read' | 'write' | 'admin' | (string & {});
|
|
92
|
+
/** Stable placement scopes declared by plugin application contributions. */
|
|
93
|
+
export declare const PLUGIN_APPLICATION_SCOPE: {
|
|
94
|
+
readonly TENANT: "tenant";
|
|
95
|
+
readonly ORGANIZATION: "organization";
|
|
96
|
+
readonly PERSONAL: "personal";
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Lifecycle states persisted for a governed plugin application installation.
|
|
100
|
+
* `degraded` means the installation record exists but one or more managed
|
|
101
|
+
* resources failed the host health check.
|
|
102
|
+
*/
|
|
103
|
+
export declare const PLUGIN_APPLICATION_INSTALLATION_STATUS: {
|
|
104
|
+
readonly INITIALIZING: "initializing";
|
|
105
|
+
readonly READY: "ready";
|
|
106
|
+
readonly FAILED: "failed";
|
|
107
|
+
readonly DEGRADED: "degraded";
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Scope declared by a trusted plugin application contribution.
|
|
111
|
+
*
|
|
112
|
+
* The current host initializer supports `organization`; the other values are
|
|
113
|
+
* stable contract values for discovery and UI gating until their installers
|
|
114
|
+
* are implemented.
|
|
115
|
+
*/
|
|
116
|
+
export type PluginApplicationScope = (typeof PLUGIN_APPLICATION_SCOPE)[keyof typeof PLUGIN_APPLICATION_SCOPE];
|
|
117
|
+
export type PluginApplicationInstallationStatus = (typeof PLUGIN_APPLICATION_INSTALLATION_STATUS)[keyof typeof PLUGIN_APPLICATION_INSTALLATION_STATUS];
|
|
118
|
+
/** Product capability rendered on a plugin application's marketplace detail page. */
|
|
119
|
+
export interface PluginMarketplaceAppFeature {
|
|
120
|
+
key: string;
|
|
121
|
+
title: string | I18nObject;
|
|
122
|
+
description?: string | I18nObject;
|
|
123
|
+
icon?: IconDefinition;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Knowledge base resource that the host creates as part of an organization
|
|
127
|
+
* application installation. The plugin declares intent; the host supplies all
|
|
128
|
+
* tenant, organization, workspace, and actor scope.
|
|
129
|
+
*/
|
|
130
|
+
export interface PluginMarketplaceAppKnowledgebaseConfig {
|
|
131
|
+
key: string;
|
|
132
|
+
name: string | I18nObject;
|
|
133
|
+
description?: string | I18nObject;
|
|
134
|
+
permission: 'organization';
|
|
135
|
+
applicationTags?: string[];
|
|
136
|
+
graphRag?: {
|
|
137
|
+
enabled: boolean;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/** Model capabilities required before the host may initialize an application. */
|
|
141
|
+
export interface PluginMarketplaceAppModelRequirements {
|
|
142
|
+
primary?: boolean;
|
|
143
|
+
embedding?: boolean;
|
|
144
|
+
vision?: boolean;
|
|
145
|
+
embeddingLabel?: string | I18nObject;
|
|
146
|
+
visionLabel?: string | I18nObject;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Declarative, host-owned initialization contract for a trusted plugin App.
|
|
150
|
+
* The host only executes this contract from a loaded plugin contribution.
|
|
151
|
+
*/
|
|
152
|
+
export interface PluginMarketplaceAppConfig {
|
|
153
|
+
scope: PluginApplicationScope;
|
|
154
|
+
assistantTemplateKey: string;
|
|
155
|
+
workspace: {
|
|
156
|
+
mode: 'dedicated';
|
|
157
|
+
name: string | I18nObject;
|
|
158
|
+
description?: string | I18nObject;
|
|
159
|
+
sharing: 'organization';
|
|
160
|
+
};
|
|
161
|
+
knowledgebases?: PluginMarketplaceAppKnowledgebaseConfig[];
|
|
162
|
+
modelRequirements?: PluginMarketplaceAppModelRequirements;
|
|
163
|
+
presentation?: {
|
|
164
|
+
tagline?: string | I18nObject;
|
|
165
|
+
longDescription?: string | I18nObject;
|
|
166
|
+
developer?: string;
|
|
167
|
+
screenshots?: string[];
|
|
168
|
+
features?: PluginMarketplaceAppFeature[];
|
|
169
|
+
useCases?: Array<string | I18nObject>;
|
|
170
|
+
dataScope?: string | I18nObject;
|
|
171
|
+
initializationSummary?: string | I18nObject;
|
|
172
|
+
initializationSteps?: Array<string | I18nObject>;
|
|
173
|
+
};
|
|
174
|
+
entry?: {
|
|
175
|
+
type: 'assistant-chat';
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Trusted application metadata attached to an Assistant template after the
|
|
180
|
+
* host resolves an explicit `assistantTemplateKey` link from a loaded plugin.
|
|
181
|
+
*/
|
|
182
|
+
export interface PluginTemplateApplicationSummary {
|
|
183
|
+
id: string;
|
|
184
|
+
pluginName: string;
|
|
185
|
+
appName: string;
|
|
186
|
+
displayName: string | I18nObject;
|
|
187
|
+
description?: string | I18nObject;
|
|
188
|
+
icon?: IconDefinition;
|
|
189
|
+
color?: string;
|
|
190
|
+
scope: PluginApplicationScope;
|
|
191
|
+
assistantTemplateKey: string;
|
|
192
|
+
config: PluginMarketplaceAppConfig;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Persisted control-plane record for one plugin application in one declared
|
|
196
|
+
* scope. Managed resource identifiers are retained so health checks and
|
|
197
|
+
* retries never need to rediscover resources by display name.
|
|
198
|
+
*/
|
|
199
|
+
export interface IPluginApplicationInstallation extends IBasePerTenantAndOrganizationEntityModel {
|
|
200
|
+
pluginName: string;
|
|
201
|
+
appName: string;
|
|
202
|
+
declaredScope: PluginApplicationScope;
|
|
203
|
+
scopeKey: string;
|
|
204
|
+
status: PluginApplicationInstallationStatus;
|
|
205
|
+
pluginVersion?: string | null;
|
|
206
|
+
templateId?: string | null;
|
|
207
|
+
templateVersion?: string | null;
|
|
208
|
+
operationId?: string | null;
|
|
209
|
+
workspaceId?: string | null;
|
|
210
|
+
xpertId?: string | null;
|
|
211
|
+
knowledgebaseIds?: string[] | null;
|
|
212
|
+
resourceRefs?: Record<string, string> | null;
|
|
213
|
+
errorCode?: string | null;
|
|
214
|
+
errorMessage?: string | null;
|
|
215
|
+
}
|
|
216
|
+
/** Host-authorized model choice returned by application initialization preflight. */
|
|
217
|
+
export interface PluginApplicationModelOption {
|
|
218
|
+
id: string;
|
|
219
|
+
copilotId: string;
|
|
220
|
+
model: string;
|
|
221
|
+
label: string | I18nObject;
|
|
222
|
+
modelType: AiModelTypeEnum;
|
|
223
|
+
}
|
|
224
|
+
/** Read model used by marketplace cards to render installation health and actions. */
|
|
225
|
+
export interface PluginApplicationStatusSummary {
|
|
226
|
+
appId: string;
|
|
227
|
+
status: PluginApplicationInstallationStatus | 'not_installed';
|
|
228
|
+
initializationAccess?: 'allowed' | 'organization_required' | 'role_required' | 'unsupported';
|
|
229
|
+
installationId?: string;
|
|
230
|
+
workspaceId?: string | null;
|
|
231
|
+
xpertId?: string | null;
|
|
232
|
+
assistantSlug?: string | null;
|
|
233
|
+
errorCode?: string | null;
|
|
234
|
+
errorMessage?: string | null;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Server-computed initialization readiness. Clients may select only model IDs
|
|
238
|
+
* returned here and cannot provide tenant, organization, or workspace scope.
|
|
239
|
+
*/
|
|
240
|
+
export interface PluginApplicationPreflight {
|
|
241
|
+
supported: boolean;
|
|
242
|
+
scope: PluginApplicationScope;
|
|
243
|
+
canInitialize: boolean;
|
|
244
|
+
reason?: 'organization_scope_required' | 'role_required' | 'scope_not_supported' | 'primary_model_required' | 'embedding_model_required' | 'vision_model_required';
|
|
245
|
+
embeddingModels: PluginApplicationModelOption[];
|
|
246
|
+
visionModels: PluginApplicationModelOption[];
|
|
247
|
+
/** Organization Embedding-role default when it is present in embeddingModels. */
|
|
248
|
+
defaultEmbeddingModelId?: string | null;
|
|
249
|
+
/** Organization Primary-role default when it is vision-capable and present in visionModels. */
|
|
250
|
+
defaultVisionModelId?: string | null;
|
|
251
|
+
primaryModelAvailable: boolean;
|
|
252
|
+
modelRequirements: PluginMarketplaceAppModelRequirements;
|
|
253
|
+
}
|
|
254
|
+
/** Complete application detail assembled from trusted plugin metadata and scoped runtime state. */
|
|
255
|
+
export interface PluginApplicationDetail {
|
|
256
|
+
application: PluginTemplateApplicationSummary;
|
|
257
|
+
status: PluginApplicationStatusSummary;
|
|
258
|
+
preflight: PluginApplicationPreflight;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* User-selectable portion of an initialization request. Scope and target
|
|
262
|
+
* resources are intentionally absent and are derived from RequestContext.
|
|
263
|
+
*/
|
|
264
|
+
export interface PluginApplicationInitializeInput {
|
|
265
|
+
pluginName: string;
|
|
266
|
+
appName: string;
|
|
267
|
+
embeddingModelId?: string;
|
|
268
|
+
visionModelId?: string;
|
|
269
|
+
operationId: string;
|
|
270
|
+
}
|
|
91
271
|
export interface PluginMarketplaceOperation {
|
|
92
272
|
name: string;
|
|
93
273
|
displayName?: string | I18nObject;
|
|
@@ -242,6 +422,8 @@ export interface PluginMarketplaceContribution {
|
|
|
242
422
|
operations?: PluginMarketplaceOperation[];
|
|
243
423
|
tags?: string[];
|
|
244
424
|
metadata?: Record<string, unknown>;
|
|
425
|
+
/** Valid only when `type` is `app`. */
|
|
426
|
+
appConfig?: PluginMarketplaceAppConfig;
|
|
245
427
|
}
|
|
246
428
|
export interface PluginMarketplaceTrialShortcut {
|
|
247
429
|
id?: string;
|
|
@@ -672,5 +854,6 @@ export interface XpertTemplateInstallInput {
|
|
|
672
854
|
description?: string;
|
|
673
855
|
avatar?: JSONValue | null;
|
|
674
856
|
copilotModel?: JSONValue | null;
|
|
857
|
+
workspaceDataScope?: XpertWorkspaceDataScope;
|
|
675
858
|
};
|
|
676
859
|
}
|