@xpert-ai/contracts 3.17.3 → 3.17.5
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 +203 -2
- package/index.esm.js +184 -3
- package/package.json +2 -2
- package/src/ai/ai-model.model.d.ts +1 -0
- package/src/ai/feature.model.d.ts +1 -0
- package/src/ai/index.d.ts +4 -0
- package/src/ai/mcp-audit.model.d.ts +23 -0
- package/src/ai/mcp-auth.model.d.ts +46 -0
- package/src/ai/mcp-capability.model.d.ts +102 -0
- package/src/ai/mcp-publication.model.d.ts +101 -0
- package/src/ai/membership.model.d.ts +1 -0
- package/src/ai/role-permissions.d.ts +4 -0
- package/src/ai/xpert-project.model.d.ts +210 -1
- package/src/ai/xpert-tool-mcp.model.d.ts +79 -0
- package/src/ai/xpert-tool.model.d.ts +1 -1
- package/src/ai/xpert-toolset.model.d.ts +5 -0
- package/src/ai/xpert.model.d.ts +7 -0
- package/src/ai/xpert.utils.d.ts +2 -0
- package/src/business-area.model.d.ts +23 -0
- package/src/index.d.ts +1 -0
- package/src/plugin.d.ts +18 -5
- package/src/role-permission.model.d.ts +3 -0
- package/src/runtime-control.d.ts +37 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
2
|
+
import type { McpAuthMethod } from './mcp-publication.model';
|
|
3
|
+
export declare const MCP_API_KEY_SUBJECT_TYPES: readonly ["user", "service_account"];
|
|
4
|
+
export type McpApiKeySubjectType = (typeof MCP_API_KEY_SUBJECT_TYPES)[number];
|
|
5
|
+
export interface IMcpApiKey extends IBasePerTenantAndOrganizationEntityModel {
|
|
6
|
+
publicationId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
keyPrefix: string;
|
|
9
|
+
keyHash: string;
|
|
10
|
+
subjectType: McpApiKeySubjectType;
|
|
11
|
+
subjectId: string;
|
|
12
|
+
scopes: string[];
|
|
13
|
+
expiresAt?: Date | null;
|
|
14
|
+
lastUsedAt?: Date | null;
|
|
15
|
+
revokedAt?: Date | null;
|
|
16
|
+
revokedById?: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface McpOAuthSubjectMapping {
|
|
19
|
+
subjectClaim: string;
|
|
20
|
+
emailClaim?: string;
|
|
21
|
+
clientIdClaim?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IMcpOAuthPolicy extends IBasePerTenantAndOrganizationEntityModel {
|
|
24
|
+
publicationId: string;
|
|
25
|
+
issuer: string;
|
|
26
|
+
audience: string;
|
|
27
|
+
requiredScopes: string[];
|
|
28
|
+
subjectMapping: McpOAuthSubjectMapping;
|
|
29
|
+
introspectionEnabled: boolean;
|
|
30
|
+
introspectionEndpoint?: string | null;
|
|
31
|
+
introspectionClientId?: string | null;
|
|
32
|
+
introspectionClientSecretConfigured: boolean;
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface McpPrincipal {
|
|
36
|
+
authMethod: McpAuthMethod;
|
|
37
|
+
credentialPrefix?: string;
|
|
38
|
+
subjectType: McpApiKeySubjectType;
|
|
39
|
+
subjectId: string;
|
|
40
|
+
userId?: string;
|
|
41
|
+
clientId?: string;
|
|
42
|
+
tenantId: string;
|
|
43
|
+
organizationId?: string;
|
|
44
|
+
publicationId: string;
|
|
45
|
+
scopes: string[];
|
|
46
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { JSONValue } from '../core.model';
|
|
2
|
+
export declare const MCP_CAPABILITY_DESCRIPTOR_VERSION: 1;
|
|
3
|
+
export declare const MCP_CAPABILITY_TYPES: readonly ["tool", "resource", "resource_template", "prompt", "app"];
|
|
4
|
+
export type McpCapabilityType = (typeof MCP_CAPABILITY_TYPES)[number];
|
|
5
|
+
export declare const MCP_TOOL_RISKS: readonly ["read", "write", "dangerous"];
|
|
6
|
+
export type McpToolRisk = (typeof MCP_TOOL_RISKS)[number];
|
|
7
|
+
export declare const MCP_TOOL_SIDE_EFFECTS: readonly ["none", "reversible", "irreversible"];
|
|
8
|
+
export type McpToolSideEffect = (typeof MCP_TOOL_SIDE_EFFECTS)[number];
|
|
9
|
+
export declare const MCP_TOOL_IDEMPOTENCY: readonly ["safe", "idempotent", "non_idempotent"];
|
|
10
|
+
export type McpToolIdempotency = (typeof MCP_TOOL_IDEMPOTENCY)[number];
|
|
11
|
+
export declare const MCP_REQUIRED_CONTEXTS: readonly ["tenant", "organization", "workspace", "principal", "project", "conversation", "agent", "execution", "store", "checkpoint"];
|
|
12
|
+
export type McpRequiredContext = (typeof MCP_REQUIRED_CONTEXTS)[number];
|
|
13
|
+
export declare const MCP_CAPABILITY_VISIBILITIES: readonly ["model", "app"];
|
|
14
|
+
export type McpCapabilityVisibility = (typeof MCP_CAPABILITY_VISIBILITIES)[number];
|
|
15
|
+
/** JSON Schema 2020-12 document stored and transported without framework-specific schema objects. */
|
|
16
|
+
export type McpJsonSchema = {
|
|
17
|
+
[keyword: string]: JSONValue;
|
|
18
|
+
};
|
|
19
|
+
export interface McpToolBehavior {
|
|
20
|
+
risk: McpToolRisk;
|
|
21
|
+
sideEffect: McpToolSideEffect;
|
|
22
|
+
idempotency: McpToolIdempotency;
|
|
23
|
+
}
|
|
24
|
+
export interface McpToolAnnotations {
|
|
25
|
+
title?: string;
|
|
26
|
+
readOnlyHint?: boolean;
|
|
27
|
+
destructiveHint?: boolean;
|
|
28
|
+
idempotentHint?: boolean;
|
|
29
|
+
openWorldHint?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface McpCapabilitySource {
|
|
32
|
+
toolsetId: string;
|
|
33
|
+
pluginName?: string;
|
|
34
|
+
pluginVersion?: string;
|
|
35
|
+
/** Configured server within a multi-server MCP Consumer toolset. */
|
|
36
|
+
serverName?: string;
|
|
37
|
+
/** Capability name used on the remote MCP server before host-side disambiguation. */
|
|
38
|
+
remoteName?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface McpCapabilityDescriptorBase {
|
|
41
|
+
descriptorVersion: typeof MCP_CAPABILITY_DESCRIPTOR_VERSION;
|
|
42
|
+
capabilityType: McpCapabilityType;
|
|
43
|
+
capabilityKey: string;
|
|
44
|
+
title?: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
/** Lower-priority guidance supplied by the plugin or remote MCP server. */
|
|
47
|
+
providerInstructions?: string;
|
|
48
|
+
source: McpCapabilitySource;
|
|
49
|
+
requiredContext: McpRequiredContext[];
|
|
50
|
+
visibility: McpCapabilityVisibility[];
|
|
51
|
+
}
|
|
52
|
+
export interface McpToolCapabilityDescriptor extends McpCapabilityDescriptorBase {
|
|
53
|
+
capabilityType: 'tool';
|
|
54
|
+
inputSchema: McpJsonSchema;
|
|
55
|
+
outputSchema?: McpJsonSchema;
|
|
56
|
+
behavior: McpToolBehavior;
|
|
57
|
+
annotations?: McpToolAnnotations;
|
|
58
|
+
appResourceKey?: string;
|
|
59
|
+
taskMode?: 'optional' | 'required';
|
|
60
|
+
taskMaxLifetimeMs?: number;
|
|
61
|
+
}
|
|
62
|
+
export interface McpResourceCapabilityDescriptor extends McpCapabilityDescriptorBase {
|
|
63
|
+
capabilityType: 'resource';
|
|
64
|
+
uri: string;
|
|
65
|
+
mimeType?: string;
|
|
66
|
+
cacheTtlMs?: number;
|
|
67
|
+
}
|
|
68
|
+
export interface McpResourceTemplateCapabilityDescriptor extends McpCapabilityDescriptorBase {
|
|
69
|
+
capabilityType: 'resource_template';
|
|
70
|
+
uriTemplate: string;
|
|
71
|
+
mimeType?: string;
|
|
72
|
+
argumentSchema: McpJsonSchema;
|
|
73
|
+
supportsCompletion: boolean;
|
|
74
|
+
cacheTtlMs?: number;
|
|
75
|
+
}
|
|
76
|
+
export interface McpPromptCapabilityDescriptor extends McpCapabilityDescriptorBase {
|
|
77
|
+
capabilityType: 'prompt';
|
|
78
|
+
name: string;
|
|
79
|
+
argumentSchema: McpJsonSchema;
|
|
80
|
+
supportsCompletion?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface McpAppCapabilityDescriptor extends McpCapabilityDescriptorBase {
|
|
83
|
+
capabilityType: 'app';
|
|
84
|
+
entry: string;
|
|
85
|
+
csp?: {
|
|
86
|
+
connectDomains?: string[];
|
|
87
|
+
resourceDomains?: string[];
|
|
88
|
+
};
|
|
89
|
+
permissions?: {
|
|
90
|
+
clipboardWrite?: boolean;
|
|
91
|
+
camera?: boolean;
|
|
92
|
+
microphone?: boolean;
|
|
93
|
+
geolocation?: boolean;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export type McpCapabilityDescriptor = McpToolCapabilityDescriptor | McpResourceCapabilityDescriptor | McpResourceTemplateCapabilityDescriptor | McpPromptCapabilityDescriptor | McpAppCapabilityDescriptor;
|
|
97
|
+
type McpCapabilityDeclarationOf<TDescriptor extends McpCapabilityDescriptor> = TDescriptor extends McpCapabilityDescriptor ? Omit<TDescriptor, 'source'> & {
|
|
98
|
+
source?: Omit<McpCapabilitySource, 'toolsetId'>;
|
|
99
|
+
} : never;
|
|
100
|
+
/** Plugin-side declaration before the host binds it to a concrete toolset instance. */
|
|
101
|
+
export type McpCapabilityDeclaration = McpCapabilityDeclarationOf<McpCapabilityDescriptor>;
|
|
102
|
+
export {};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
2
|
+
import type { JSONValue } from '../core.model';
|
|
3
|
+
import type { McpApiKeySubjectType } from './mcp-auth.model';
|
|
4
|
+
import type { McpCapabilityDescriptor, McpCapabilityType } from './mcp-capability.model';
|
|
5
|
+
export declare const MCP_PROTOCOL_VERSION: "2026-07-28";
|
|
6
|
+
export declare const MCP_TASK_EXTENSION_ID: "io.modelcontextprotocol/tasks";
|
|
7
|
+
export declare const MCP_HTTP_CORS_REQUEST_HEADERS: readonly ["MCP-Protocol-Version", "Mcp-Method", "Mcp-Name", "Traceparent", "Tracestate", "Baggage", "X-Request-Id"];
|
|
8
|
+
export declare const MCP_HTTP_CORS_EXPOSED_HEADERS: readonly ["WWW-Authenticate", "MCP-Protocol-Version", "X-Request-Id"];
|
|
9
|
+
export declare const MCP_PUBLICATION_STATUSES: readonly ["draft", "active", "disabled"];
|
|
10
|
+
export type McpPublicationStatus = (typeof MCP_PUBLICATION_STATUSES)[number];
|
|
11
|
+
export declare const MCP_PUBLICATION_REVIEW_STATUSES: readonly ["current", "required"];
|
|
12
|
+
export type McpPublicationReviewStatus = (typeof MCP_PUBLICATION_REVIEW_STATUSES)[number];
|
|
13
|
+
export declare const MCP_AUTH_METHODS: readonly ["api_key", "oauth"];
|
|
14
|
+
export type McpAuthMethod = (typeof MCP_AUTH_METHODS)[number];
|
|
15
|
+
export declare const MCP_CAPABILITY_APPROVAL_MODES: readonly ["deny", "allow", "confirm"];
|
|
16
|
+
export type McpCapabilityApprovalMode = (typeof MCP_CAPABILITY_APPROVAL_MODES)[number];
|
|
17
|
+
export interface McpCapabilityPolicy {
|
|
18
|
+
approvalMode?: McpCapabilityApprovalMode;
|
|
19
|
+
timeoutMs?: number;
|
|
20
|
+
rateLimit?: {
|
|
21
|
+
requests: number;
|
|
22
|
+
windowSeconds: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface IMcpPublication extends IBasePerTenantAndOrganizationEntityModel {
|
|
26
|
+
name: string;
|
|
27
|
+
slug: string;
|
|
28
|
+
status: McpPublicationStatus;
|
|
29
|
+
authMethods: McpAuthMethod[];
|
|
30
|
+
instructions?: string | null;
|
|
31
|
+
protocolVersion: typeof MCP_PROTOCOL_VERSION;
|
|
32
|
+
reviewStatus: McpPublicationReviewStatus;
|
|
33
|
+
reviewReason?: string | null;
|
|
34
|
+
reviewedAt?: Date | null;
|
|
35
|
+
reviewedById?: string | null;
|
|
36
|
+
}
|
|
37
|
+
/** Management-list projection used to render publication health without per-card follow-up requests. */
|
|
38
|
+
export interface IMcpPublicationSummary extends IMcpPublication {
|
|
39
|
+
capabilityCount: number;
|
|
40
|
+
apiKeyCount: number;
|
|
41
|
+
oauthEnabled: boolean;
|
|
42
|
+
recentInvocationAt?: Date | null;
|
|
43
|
+
recentErrorAt?: Date | null;
|
|
44
|
+
}
|
|
45
|
+
export interface IMcpPublicationCapability extends IBasePerTenantAndOrganizationEntityModel {
|
|
46
|
+
publicationId: string;
|
|
47
|
+
toolsetId: string;
|
|
48
|
+
capabilityType: McpCapabilityType;
|
|
49
|
+
capabilityKey: string;
|
|
50
|
+
publicName: string;
|
|
51
|
+
enabled: boolean;
|
|
52
|
+
policy?: McpCapabilityPolicy | null;
|
|
53
|
+
descriptorHash: string;
|
|
54
|
+
descriptorSnapshot: McpCapabilityDescriptor;
|
|
55
|
+
pluginVersion?: string | null;
|
|
56
|
+
}
|
|
57
|
+
/** Current plugin-declared capability catalog for a concrete toolset instance. */
|
|
58
|
+
export interface IMcpCapabilityCatalog extends IBasePerTenantAndOrganizationEntityModel {
|
|
59
|
+
toolsetId: string;
|
|
60
|
+
capabilityType: McpCapabilityType;
|
|
61
|
+
capabilityKey: string;
|
|
62
|
+
descriptorHash: string;
|
|
63
|
+
descriptor: McpCapabilityDescriptor;
|
|
64
|
+
enabled: boolean;
|
|
65
|
+
}
|
|
66
|
+
/** Selectable capability source summary used to lazily load one toolset catalog at a time. */
|
|
67
|
+
export interface IMcpCapabilitySourceSummary {
|
|
68
|
+
toolsetId: string;
|
|
69
|
+
name: string;
|
|
70
|
+
pluginName?: string;
|
|
71
|
+
capabilityCount: number;
|
|
72
|
+
}
|
|
73
|
+
export declare const MCP_TASK_STATUSES: readonly ["working", "input_required", "completed", "failed", "cancelled"];
|
|
74
|
+
export type McpTaskStatus = (typeof MCP_TASK_STATUSES)[number];
|
|
75
|
+
export interface IMcpTask extends IBasePerTenantAndOrganizationEntityModel {
|
|
76
|
+
taskId: string;
|
|
77
|
+
publicationId: string;
|
|
78
|
+
capabilityId: string;
|
|
79
|
+
executionId: string;
|
|
80
|
+
requestId: string;
|
|
81
|
+
toolName: string;
|
|
82
|
+
idempotencyKey: string;
|
|
83
|
+
inputHash: string;
|
|
84
|
+
subjectType: McpApiKeySubjectType;
|
|
85
|
+
subjectId: string;
|
|
86
|
+
queueJobId?: string | null;
|
|
87
|
+
status: McpTaskStatus;
|
|
88
|
+
statusMessage?: string | null;
|
|
89
|
+
progress?: number | null;
|
|
90
|
+
pollIntervalMs?: number | null;
|
|
91
|
+
inputRequests?: JSONValue | null;
|
|
92
|
+
inputResponses?: JSONValue | null;
|
|
93
|
+
requestPayload?: JSONValue | null;
|
|
94
|
+
resultRef?: JSONValue | null;
|
|
95
|
+
error?: {
|
|
96
|
+
code?: string;
|
|
97
|
+
message: string;
|
|
98
|
+
} | null;
|
|
99
|
+
revision: number;
|
|
100
|
+
expiresAt: Date;
|
|
101
|
+
}
|
|
@@ -19,6 +19,10 @@ export declare enum AIPermissionsEnum {
|
|
|
19
19
|
* Create or edit Xperts in organization.
|
|
20
20
|
*/
|
|
21
21
|
XPERT_EDIT = "XPERT_EDIT",
|
|
22
|
+
XPERT_PROJECT_VIEW = "XPERT_PROJECT_VIEW",
|
|
23
|
+
XPERT_PROJECT_CREATE = "XPERT_PROJECT_CREATE",
|
|
24
|
+
XPERT_PROJECT_EDIT = "XPERT_PROJECT_EDIT",
|
|
25
|
+
XPERT_PROJECT_MANAGE = "XPERT_PROJECT_MANAGE",
|
|
22
26
|
CHAT_VIEW = "CHAT_VIEW",
|
|
23
27
|
EVOLUTION_VIEW = "EVOLUTION_VIEW",
|
|
24
28
|
EVOLUTION_MANAGE = "EVOLUTION_MANAGE"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
2
|
+
import { IPagination } from '../core.model';
|
|
2
3
|
import { IIntegration } from '../integration.model';
|
|
3
4
|
import { IStorageFile, TFile } from '../storage-file.model';
|
|
4
5
|
import { TAvatar } from '../types';
|
|
@@ -11,8 +12,69 @@ import { IXpert, TXpertTeamDraft } from './xpert.model';
|
|
|
11
12
|
export type TXpertProjectSettings = {
|
|
12
13
|
instruction: string;
|
|
13
14
|
mode?: '' | 'plan';
|
|
15
|
+
managementMode?: TXpertProjectManagementMode;
|
|
16
|
+
/** Explicit default Assistant used by the Project assistant panel and task orchestration. */
|
|
17
|
+
projectAssistantId?: string;
|
|
14
18
|
};
|
|
19
|
+
export type TXpertProjectManagementMode = 'simple' | 'advanced';
|
|
15
20
|
export type TXpertProjectStatus = 'active' | 'deprecated' | 'archived';
|
|
21
|
+
export type TXpertProjectPlanStatus = 'draft' | 'active' | 'completed' | 'archived';
|
|
22
|
+
export type TXpertProjectMilestoneStatus = 'planned' | 'in_progress' | 'completed' | 'blocked';
|
|
23
|
+
export type TXpertProjectTaskStatus = 'todo' | 'in_progress' | 'review' | 'paused' | 'done' | 'blocked' | 'cancelled';
|
|
24
|
+
export type TXpertProjectTaskPriority = 'urgent' | 'high' | 'medium' | 'low';
|
|
25
|
+
export type TXpertProjectPlanView = 'board' | 'table' | 'gantt' | 'calendar' | 'list';
|
|
26
|
+
export type TXpertProjectSprintStatus = 'planned' | 'running' | 'review' | 'done';
|
|
27
|
+
export type TXpertProjectSprintStrategy = 'software_delivery' | 'data_analysis';
|
|
28
|
+
export type TXpertProjectSwimlaneKind = 'backlog' | 'execution';
|
|
29
|
+
export type TXpertProjectAgentRole = 'planner' | 'coder' | 'reviewer' | 'operator' | 'researcher' | 'analyst' | 'visualizer';
|
|
30
|
+
export type TXpertProjectExecutionEnvironment = 'browser' | 'container' | 'terminal';
|
|
31
|
+
export type TXpertProjectTaskConversationRelation = 'origin' | 'discussion' | 'execution' | 'review';
|
|
32
|
+
export type TXpertProjectTaskExecutionStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled';
|
|
33
|
+
export type TXpertProjectAssetKind = 'file' | 'folder';
|
|
34
|
+
export type TXpertProjectAssetSource = 'upload' | 'ai_output' | 'conversation' | 'import';
|
|
35
|
+
export type TXpertProjectAutomationTrigger = 'schedule' | 'task.status_changed' | 'asset.created' | 'conversation.completed';
|
|
36
|
+
export type TXpertProjectAutomationRunStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled';
|
|
37
|
+
export declare enum XpertProjectTaskStatusEnum {
|
|
38
|
+
TODO = "todo",
|
|
39
|
+
IN_PROGRESS = "in_progress",
|
|
40
|
+
REVIEW = "review",
|
|
41
|
+
PAUSED = "paused",
|
|
42
|
+
DONE = "done",
|
|
43
|
+
BLOCKED = "blocked",
|
|
44
|
+
CANCELLED = "cancelled"
|
|
45
|
+
}
|
|
46
|
+
export declare enum XpertProjectTaskPriorityEnum {
|
|
47
|
+
URGENT = "urgent",
|
|
48
|
+
HIGH = "high",
|
|
49
|
+
MEDIUM = "medium",
|
|
50
|
+
LOW = "low"
|
|
51
|
+
}
|
|
52
|
+
export declare enum XpertProjectPlanViewEnum {
|
|
53
|
+
BOARD = "board",
|
|
54
|
+
TABLE = "table",
|
|
55
|
+
GANTT = "gantt",
|
|
56
|
+
CALENDAR = "calendar",
|
|
57
|
+
LIST = "list"
|
|
58
|
+
}
|
|
59
|
+
export declare enum XpertProjectAssetSourceEnum {
|
|
60
|
+
UPLOAD = "upload",
|
|
61
|
+
AI_OUTPUT = "ai_output",
|
|
62
|
+
CONVERSATION = "conversation",
|
|
63
|
+
IMPORT = "import"
|
|
64
|
+
}
|
|
65
|
+
export declare enum XpertProjectAutomationTriggerEnum {
|
|
66
|
+
SCHEDULE = "schedule",
|
|
67
|
+
TASK_STATUS_CHANGED = "task.status_changed",
|
|
68
|
+
ASSET_CREATED = "asset.created",
|
|
69
|
+
CONVERSATION_COMPLETED = "conversation.completed"
|
|
70
|
+
}
|
|
71
|
+
export declare enum XpertProjectAutomationRunStatusEnum {
|
|
72
|
+
QUEUED = "queued",
|
|
73
|
+
RUNNING = "running",
|
|
74
|
+
SUCCEEDED = "succeeded",
|
|
75
|
+
FAILED = "failed",
|
|
76
|
+
CANCELLED = "cancelled"
|
|
77
|
+
}
|
|
16
78
|
export type TXpertProject = {
|
|
17
79
|
name: string;
|
|
18
80
|
avatar?: TAvatar;
|
|
@@ -45,6 +107,12 @@ export interface IXpertProject extends TXpertProject, IBasePerTenantAndOrganizat
|
|
|
45
107
|
attachments?: IStorageFile[];
|
|
46
108
|
vcs?: IXpertProjectVCS;
|
|
47
109
|
}
|
|
110
|
+
export type IXpertProjectCreateInput = Partial<IXpertProject> & {
|
|
111
|
+
xpertIds?: string[];
|
|
112
|
+
toolsetIds?: string[];
|
|
113
|
+
knowledgebaseIds?: string[];
|
|
114
|
+
memberIds?: string[];
|
|
115
|
+
};
|
|
48
116
|
export interface IBasePerXpertProjectEntityModel extends IBasePerTenantAndOrganizationEntityModel {
|
|
49
117
|
projectId?: string;
|
|
50
118
|
project?: IXpertProject;
|
|
@@ -52,9 +120,49 @@ export interface IBasePerXpertProjectEntityModel extends IBasePerTenantAndOrgani
|
|
|
52
120
|
export interface IXpertProjectTask extends IBasePerXpertProjectEntityModel {
|
|
53
121
|
threadId?: string;
|
|
54
122
|
name: string;
|
|
123
|
+
title?: string;
|
|
124
|
+
description?: string;
|
|
55
125
|
type?: string;
|
|
56
|
-
status:
|
|
126
|
+
status: TXpertProjectTaskStatus | 'pending' | 'completed' | 'failed';
|
|
127
|
+
priority?: TXpertProjectTaskPriority;
|
|
128
|
+
assigneeId?: string;
|
|
129
|
+
assignee?: IUser;
|
|
130
|
+
/** Project Assistant responsible for executing this task. */
|
|
131
|
+
assigneeXpertId?: string;
|
|
132
|
+
dueDate?: Date;
|
|
133
|
+
planId?: string;
|
|
134
|
+
milestoneId?: string;
|
|
135
|
+
column?: string;
|
|
136
|
+
order?: number;
|
|
137
|
+
plan?: IXpertProjectPlan;
|
|
138
|
+
milestone?: IXpertProjectMilestone;
|
|
57
139
|
steps: IXpertProjectTaskStep[];
|
|
140
|
+
conversations?: IXpertProjectTaskConversation[];
|
|
141
|
+
executions?: IXpertProjectTaskExecution[];
|
|
142
|
+
}
|
|
143
|
+
export interface IXpertProjectTaskConversation extends IBasePerXpertProjectEntityModel {
|
|
144
|
+
taskId: string;
|
|
145
|
+
conversationId: string;
|
|
146
|
+
relationType: TXpertProjectTaskConversationRelation;
|
|
147
|
+
isPrimary?: boolean;
|
|
148
|
+
sourceMessageId?: string;
|
|
149
|
+
sourceExecutionId?: string;
|
|
150
|
+
}
|
|
151
|
+
export interface IXpertProjectTaskExecution extends IBasePerXpertProjectEntityModel {
|
|
152
|
+
taskId: string;
|
|
153
|
+
conversationId?: string;
|
|
154
|
+
threadId?: string;
|
|
155
|
+
agentExecutionId?: string;
|
|
156
|
+
xpertId?: string;
|
|
157
|
+
agentKey?: string;
|
|
158
|
+
attempt: number;
|
|
159
|
+
status: TXpertProjectTaskExecutionStatus;
|
|
160
|
+
inputSummary?: string;
|
|
161
|
+
outputSummary?: string;
|
|
162
|
+
error?: string;
|
|
163
|
+
artifactIds?: string[];
|
|
164
|
+
startedAt?: Date;
|
|
165
|
+
completedAt?: Date;
|
|
58
166
|
}
|
|
59
167
|
export interface IXpertProjectTaskStep extends IBasePerXpertProjectEntityModel {
|
|
60
168
|
taskId: string;
|
|
@@ -89,4 +197,105 @@ export interface IXpertProjectFile extends IBasePerXpertProjectEntityModel, Omit
|
|
|
89
197
|
}
|
|
90
198
|
export type TXpertProjectDSL = IXpertProject & {
|
|
91
199
|
xperts?: TXpertTeamDraft[];
|
|
200
|
+
plans?: IXpertProjectPlan[];
|
|
201
|
+
milestones?: IXpertProjectMilestone[];
|
|
202
|
+
automations?: IXpertProjectAutomation[];
|
|
92
203
|
};
|
|
204
|
+
export interface IXpertProjectPlan extends IBasePerXpertProjectEntityModel {
|
|
205
|
+
name: string;
|
|
206
|
+
description?: string;
|
|
207
|
+
status: TXpertProjectPlanStatus;
|
|
208
|
+
view?: TXpertProjectPlanView;
|
|
209
|
+
startDate?: Date;
|
|
210
|
+
dueDate?: Date;
|
|
211
|
+
order?: number;
|
|
212
|
+
milestones?: IXpertProjectMilestone[];
|
|
213
|
+
sprints?: IXpertProjectSprint[];
|
|
214
|
+
}
|
|
215
|
+
export interface IXpertProjectMilestone extends IBasePerXpertProjectEntityModel {
|
|
216
|
+
planId: string;
|
|
217
|
+
plan?: IXpertProjectPlan;
|
|
218
|
+
name: string;
|
|
219
|
+
description?: string;
|
|
220
|
+
status: TXpertProjectMilestoneStatus;
|
|
221
|
+
dueDate?: Date;
|
|
222
|
+
order?: number;
|
|
223
|
+
}
|
|
224
|
+
export interface IXpertProjectSprint extends IBasePerXpertProjectEntityModel {
|
|
225
|
+
planId?: string;
|
|
226
|
+
plan?: IXpertProjectPlan;
|
|
227
|
+
goal: string;
|
|
228
|
+
status: TXpertProjectSprintStatus;
|
|
229
|
+
strategyType: TXpertProjectSprintStrategy;
|
|
230
|
+
startAt?: Date;
|
|
231
|
+
endAt?: Date;
|
|
232
|
+
retrospective?: string;
|
|
233
|
+
swimlanes?: IXpertProjectSwimlane[];
|
|
234
|
+
}
|
|
235
|
+
export interface IXpertProjectSwimlane extends IBasePerXpertProjectEntityModel {
|
|
236
|
+
sprintId: string;
|
|
237
|
+
sprint?: IXpertProjectSprint;
|
|
238
|
+
key: string;
|
|
239
|
+
name: string;
|
|
240
|
+
kind: TXpertProjectSwimlaneKind;
|
|
241
|
+
priority: number;
|
|
242
|
+
weight: number;
|
|
243
|
+
concurrencyLimit: number;
|
|
244
|
+
wipLimit: number;
|
|
245
|
+
agentRole: TXpertProjectAgentRole;
|
|
246
|
+
environmentType: TXpertProjectExecutionEnvironment;
|
|
247
|
+
sortOrder: number;
|
|
248
|
+
sourceStrategyType: TXpertProjectSprintStrategy;
|
|
249
|
+
}
|
|
250
|
+
export interface IXpertProjectActivity extends IBasePerXpertProjectEntityModel {
|
|
251
|
+
type: string;
|
|
252
|
+
entityType?: string;
|
|
253
|
+
entityId?: string;
|
|
254
|
+
summary: string;
|
|
255
|
+
payload?: Record<string, unknown>;
|
|
256
|
+
actor?: IUser;
|
|
257
|
+
}
|
|
258
|
+
export interface IXpertProjectAsset extends IBasePerXpertProjectEntityModel {
|
|
259
|
+
parentId?: string;
|
|
260
|
+
parent?: IXpertProjectAsset;
|
|
261
|
+
name: string;
|
|
262
|
+
path: string;
|
|
263
|
+
kind: TXpertProjectAssetKind;
|
|
264
|
+
mimeType?: string;
|
|
265
|
+
size?: number;
|
|
266
|
+
source: TXpertProjectAssetSource;
|
|
267
|
+
taskId?: string;
|
|
268
|
+
conversationId?: string;
|
|
269
|
+
status?: 'available' | 'processing' | 'failed';
|
|
270
|
+
}
|
|
271
|
+
export interface IXpertProjectAutomation extends IBasePerXpertProjectEntityModel {
|
|
272
|
+
name: string;
|
|
273
|
+
enabled: boolean;
|
|
274
|
+
trigger: {
|
|
275
|
+
type: TXpertProjectAutomationTrigger;
|
|
276
|
+
cron?: string;
|
|
277
|
+
timezone?: string;
|
|
278
|
+
eventType?: string;
|
|
279
|
+
};
|
|
280
|
+
actions: Array<Record<string, unknown>>;
|
|
281
|
+
lastRunAt?: Date;
|
|
282
|
+
nextRunAt?: Date;
|
|
283
|
+
runs?: IXpertProjectAutomationRun[];
|
|
284
|
+
}
|
|
285
|
+
export interface IXpertProjectAutomationRun extends IBasePerXpertProjectEntityModel {
|
|
286
|
+
automationId: string;
|
|
287
|
+
automation?: IXpertProjectAutomation;
|
|
288
|
+
status: TXpertProjectAutomationRunStatus;
|
|
289
|
+
occurrenceKey: string;
|
|
290
|
+
jobId?: string;
|
|
291
|
+
startedAt?: Date;
|
|
292
|
+
completedAt?: Date;
|
|
293
|
+
error?: string;
|
|
294
|
+
output?: Record<string, unknown>;
|
|
295
|
+
}
|
|
296
|
+
export type TXpertProjectPage<T> = IPagination<T>;
|
|
297
|
+
export type IXpertProjectPlanInput = Partial<Omit<IXpertProjectPlan, 'id' | 'projectId' | 'project' | 'milestones'>>;
|
|
298
|
+
export type IXpertProjectMilestoneInput = Partial<Omit<IXpertProjectMilestone, 'id' | 'projectId' | 'project' | 'plan'>>;
|
|
299
|
+
export type IXpertProjectActivityInput = Pick<IXpertProjectActivity, 'type' | 'summary'> & Partial<Pick<IXpertProjectActivity, 'entityType' | 'entityId' | 'payload'>>;
|
|
300
|
+
export type IXpertProjectAssetInput = Partial<Omit<IXpertProjectAsset, 'id' | 'projectId' | 'project' | 'parent'>>;
|
|
301
|
+
export type IXpertProjectAutomationInput = Partial<Omit<IXpertProjectAutomation, 'id' | 'projectId' | 'project' | 'runs'>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TMcpAppCsp, TMcpAppPermissions, TMcpAppToolResult, TMcpAppVisibility } from '@xpert-ai/chatkit-types';
|
|
2
2
|
import type { I18nObject } from '../i18n.model';
|
|
3
3
|
import type { IconDefinition } from '../types';
|
|
4
|
+
import type { McpCapabilityVisibility, McpJsonSchema, McpToolAnnotations } from './mcp-capability.model';
|
|
4
5
|
export declare enum MCPServerType {
|
|
5
6
|
SSE = "sse",
|
|
6
7
|
STDIO = "stdio",
|
|
@@ -55,6 +56,78 @@ export type TMCPServerReconnect = {
|
|
|
55
56
|
*/
|
|
56
57
|
delayMs?: number;
|
|
57
58
|
};
|
|
59
|
+
export declare const MCP_CONSUMER_AUTH_TYPES: readonly ["none", "manual_header", "api_key", "oauth"];
|
|
60
|
+
export type McpConsumerAuthType = (typeof MCP_CONSUMER_AUTH_TYPES)[number];
|
|
61
|
+
export type TMcpConsumerAuth = {
|
|
62
|
+
type: 'none';
|
|
63
|
+
} | {
|
|
64
|
+
type: 'manual_header';
|
|
65
|
+
} | {
|
|
66
|
+
type: 'api_key';
|
|
67
|
+
/** Header used by the remote MCP server, for example Authorization or x-api-key. */
|
|
68
|
+
headerName: string;
|
|
69
|
+
/** Environment expression or value resolved by the existing MCP header resolver. */
|
|
70
|
+
value: string;
|
|
71
|
+
} | {
|
|
72
|
+
type: 'oauth';
|
|
73
|
+
/** OAuth tokens are encrypted server-side and bound to this subject scope. */
|
|
74
|
+
binding: 'user' | 'organization';
|
|
75
|
+
scopes?: string[];
|
|
76
|
+
};
|
|
77
|
+
export interface IMcpConsumerOAuthStatus {
|
|
78
|
+
status: 'disconnected' | 'pending' | 'connected' | 'expired' | 'error';
|
|
79
|
+
authorizationUrl?: string | null;
|
|
80
|
+
expiresAt?: string | null;
|
|
81
|
+
scopes?: string[];
|
|
82
|
+
message?: string | null;
|
|
83
|
+
}
|
|
84
|
+
export interface IMcpConsumerServerCapabilities {
|
|
85
|
+
serverName: string;
|
|
86
|
+
serverInfo?: {
|
|
87
|
+
name: string;
|
|
88
|
+
version: string;
|
|
89
|
+
};
|
|
90
|
+
instructions?: string;
|
|
91
|
+
tools: Array<{
|
|
92
|
+
name: string;
|
|
93
|
+
title?: string;
|
|
94
|
+
description?: string;
|
|
95
|
+
inputSchema: McpJsonSchema;
|
|
96
|
+
outputSchema?: McpJsonSchema;
|
|
97
|
+
annotations?: McpToolAnnotations;
|
|
98
|
+
taskSupport?: 'required' | 'optional' | 'forbidden';
|
|
99
|
+
/** MCP Apps visibility from Tool._meta.ui; omitted only for older persisted discovery payloads. */
|
|
100
|
+
visibility?: McpCapabilityVisibility[];
|
|
101
|
+
}>;
|
|
102
|
+
resources: Array<{
|
|
103
|
+
uri: string;
|
|
104
|
+
name: string;
|
|
105
|
+
title?: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
mimeType?: string;
|
|
108
|
+
}>;
|
|
109
|
+
resourceTemplates: Array<{
|
|
110
|
+
uriTemplate: string;
|
|
111
|
+
name: string;
|
|
112
|
+
title?: string;
|
|
113
|
+
description?: string;
|
|
114
|
+
mimeType?: string;
|
|
115
|
+
argumentSchema: McpJsonSchema;
|
|
116
|
+
}>;
|
|
117
|
+
prompts: Array<{
|
|
118
|
+
name: string;
|
|
119
|
+
title?: string;
|
|
120
|
+
description?: string;
|
|
121
|
+
argumentSchema: McpJsonSchema;
|
|
122
|
+
}>;
|
|
123
|
+
apps: Array<{
|
|
124
|
+
toolName: string;
|
|
125
|
+
title?: string;
|
|
126
|
+
resourceUri: string;
|
|
127
|
+
}>;
|
|
128
|
+
supportsCompletion?: boolean;
|
|
129
|
+
errors?: Partial<Record<'tools' | 'resources' | 'resourceTemplates' | 'prompts' | 'apps', string>>;
|
|
130
|
+
}
|
|
58
131
|
export type TMcpStdioRuntimePolicy = {
|
|
59
132
|
/**
|
|
60
133
|
* Runtime provider requested by the toolset or plugin. v1 supports
|
|
@@ -93,6 +166,8 @@ export type TMCPServer = {
|
|
|
93
166
|
reconnect?: TMCPServerReconnect;
|
|
94
167
|
url?: string;
|
|
95
168
|
headers?: Record<string, string>;
|
|
169
|
+
/** Explicit authentication mode for external MCP Consumer connections. */
|
|
170
|
+
auth?: TMcpConsumerAuth;
|
|
96
171
|
useNodeEventSource?: boolean;
|
|
97
172
|
/**
|
|
98
173
|
* Whether to automatically fallback to SSE if Streamable HTTP is not available.
|
|
@@ -143,6 +218,9 @@ export type TMcpAppUiMeta = {
|
|
|
143
218
|
domain?: string;
|
|
144
219
|
prefersBorder?: boolean;
|
|
145
220
|
};
|
|
221
|
+
export type TMcpToolExecution = {
|
|
222
|
+
taskSupport?: 'required' | 'optional' | 'forbidden';
|
|
223
|
+
};
|
|
146
224
|
export type TMcpToolAppMeta = {
|
|
147
225
|
serverName: string;
|
|
148
226
|
name: string;
|
|
@@ -151,6 +229,7 @@ export type TMcpToolAppMeta = {
|
|
|
151
229
|
visibility: TMcpAppVisibility[];
|
|
152
230
|
ui?: TMcpAppUiMeta;
|
|
153
231
|
annotations?: Record<string, unknown>;
|
|
232
|
+
execution?: TMcpToolExecution;
|
|
154
233
|
_meta?: Record<string, unknown>;
|
|
155
234
|
};
|
|
156
235
|
export type TMcpAppComponentData = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONSchema4 } from
|
|
1
|
+
import type { JSONSchema4 } from 'json-schema';
|
|
2
2
|
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
3
3
|
import { I18nObject } from '../types';
|
|
4
4
|
import { AiProviderRole } from './copilot.model';
|
|
@@ -64,6 +64,11 @@ export type TXpertToolsetOptions = {
|
|
|
64
64
|
toolPositions?: Record<string, number>;
|
|
65
65
|
disableToolDefault?: boolean;
|
|
66
66
|
needSandbox?: boolean;
|
|
67
|
+
/** Installed plugin component metadata for organization-scoped native MCP toolsets. */
|
|
68
|
+
pluginManaged?: boolean;
|
|
69
|
+
pluginName?: string;
|
|
70
|
+
componentKey?: string;
|
|
71
|
+
definitionHash?: string;
|
|
67
72
|
/**
|
|
68
73
|
* Runtime policy requested for MCP stdio toolsets. The server clamps this
|
|
69
74
|
* policy against platform and tenant-level security settings.
|
package/src/ai/xpert.model.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { IEnvironment } from './environment.model';
|
|
|
17
17
|
import { TXpertCommandProfile } from './prompt-workflow.model';
|
|
18
18
|
import type { TXpertMarketplaceProfile } from './xpert-marketplace.model';
|
|
19
19
|
import type { KnowledgeFilterNode } from './knowledge-filter.model';
|
|
20
|
+
import type { IBusinessArea } from '../business-area.model';
|
|
20
21
|
export type ToolCall = LToolCall;
|
|
21
22
|
export declare enum XpertTypeEnum {
|
|
22
23
|
/**
|
|
@@ -165,6 +166,12 @@ export type TXpert = {
|
|
|
165
166
|
features?: TXpertFeatures;
|
|
166
167
|
commandProfile?: TXpertCommandProfile;
|
|
167
168
|
marketplace?: TXpertMarketplaceProfile;
|
|
169
|
+
/**
|
|
170
|
+
* Organization business taxonomy used to group this assistant in product menus.
|
|
171
|
+
* This is independent from marketplace business categories.
|
|
172
|
+
*/
|
|
173
|
+
businessAreaId?: string | null;
|
|
174
|
+
businessArea?: IBusinessArea | null;
|
|
168
175
|
/**
|
|
169
176
|
* Version of role: '1' '2' '2.1' '2.2'...
|
|
170
177
|
*/
|
package/src/ai/xpert.utils.d.ts
CHANGED
|
@@ -34,6 +34,8 @@ export declare function omitXpertRelations(xpert: Partial<IXpert>): {
|
|
|
34
34
|
features?: import("./xpert.model").TXpertFeatures;
|
|
35
35
|
commandProfile?: import("./prompt-workflow.model").TXpertCommandProfile;
|
|
36
36
|
marketplace?: import("./xpert-marketplace.model").TXpertMarketplaceProfile;
|
|
37
|
+
businessAreaId?: string | null;
|
|
38
|
+
businessArea?: import("..").IBusinessArea | null;
|
|
37
39
|
version?: string;
|
|
38
40
|
latest?: boolean;
|
|
39
41
|
releaseNotes?: string;
|