@xpert-ai/contracts 3.18.6 → 3.19.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 +1001 -222
- package/index.esm.js +982 -223
- package/package.json +3 -3
- package/src/agent-plugin.d.ts +192 -0
- package/src/ai/assistant-configuration.model.d.ts +45 -0
- package/src/ai/assistant-order.d.ts +5 -0
- package/src/ai/assistant-trigger.model.d.ts +56 -0
- package/src/ai/chat-activity.model.d.ts +14 -0
- package/src/ai/chat-message.model.d.ts +10 -1
- package/src/ai/chat-task-summary.model.d.ts +4 -3
- package/src/ai/chat.model.d.ts +100 -13
- package/src/ai/clawxpert-conversation-scope.model.d.ts +2 -0
- package/src/ai/evolution/baseline.d.ts +40 -0
- package/src/ai/evolution/change.d.ts +53 -0
- package/src/ai/evolution/index.d.ts +1 -0
- package/src/ai/evolution/persistence.d.ts +2 -0
- package/src/ai/evolution/provider.d.ts +1 -1
- package/src/ai/index.d.ts +9 -0
- package/src/ai/knowledge-keyword-analyzer.model.d.ts +18 -0
- package/src/ai/knowledgebase.model.d.ts +5 -0
- package/src/ai/mcp-publication.model.d.ts +1 -1
- package/src/ai/middleware.model.d.ts +1 -0
- package/src/ai/mobile.model.d.ts +5 -0
- package/src/ai/project-selection.model.d.ts +9 -0
- package/src/ai/project-task-graph.model.d.ts +58 -0
- package/src/ai/project-task-schedule.d.ts +24 -0
- package/src/ai/prompt-workflow-capabilities.model.d.ts +15 -0
- package/src/ai/prompt-workflow.model.d.ts +13 -0
- package/src/ai/sandbox-file-output.model.d.ts +9 -0
- package/src/ai/xpert-agent-execution.model.d.ts +33 -0
- package/src/ai/xpert-chat.model.d.ts +2 -0
- package/src/ai/xpert-marketplace.model.d.ts +5 -0
- package/src/ai/xpert-project-type.model.d.ts +56 -0
- package/src/ai/xpert-project.model.d.ts +25 -1
- package/src/ai/xpert-template.model.d.ts +30 -0
- package/src/ai/xpert-tool-mcp.model.d.ts +15 -1
- package/src/ai/xpert-workflow.model.d.ts +15 -1
- package/src/ai/xpert.model.d.ts +15 -1
- package/src/desktop-shell.model.d.ts +159 -0
- package/src/index.d.ts +4 -0
- package/src/integration.model.d.ts +19 -0
- package/src/plugin.d.ts +26 -7
- package/src/tag-entity.model.d.ts +1 -1
- package/src/view-extension/index.d.ts +2 -0
- package/src/view-extension/model.d.ts +20 -1
- package/src/view-extension/workbench-open.d.ts +10 -0
- package/src/view-extension/workbench.d.ts +2 -0
|
@@ -6,7 +6,7 @@ export interface EvolutionCandidateBuilder {
|
|
|
6
6
|
buildCandidate(request: BuildEvolutionCandidateRequest): Promise<CandidateBuildResult>;
|
|
7
7
|
validateCandidate(request: ValidateEvolutionCandidateRequest): Promise<CandidateValidationResult>;
|
|
8
8
|
}
|
|
9
|
-
export interface EvolutionBaselineExporter {
|
|
9
|
+
export interface EvolutionBaselineExporter extends Partial<import('./baseline').EvolutionBaselineReader> {
|
|
10
10
|
exportBaseline(request: ExportEvolutionBaselineRequest): Promise<ExportEvolutionBaselineResult>;
|
|
11
11
|
}
|
|
12
12
|
export interface EvolutionReplayEvaluator {
|
package/src/ai/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export declare const STATE_VARIABLE_HUMAN = "human";
|
|
2
|
+
export * from './prompt-workflow-capabilities.model';
|
|
2
3
|
export { ChatMessageEventTypeEnum, ChatMessageStepCategory, ChatMessageTypeEnum } from './ai.model';
|
|
3
4
|
export type * from '@xpert-ai/chatkit-types';
|
|
4
5
|
export type { IconDefinition, IconType } from '../types';
|
|
5
6
|
export type { TChatRequest } from './xpert-chat.model';
|
|
7
|
+
export type { ProjectSelection } from './project-selection.model';
|
|
6
8
|
export { CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED } from './chat-event.model';
|
|
7
9
|
export * from './assistant-binding.model';
|
|
10
|
+
export * from './assistant-order';
|
|
8
11
|
export * from './assistant-model.model';
|
|
9
12
|
export * from './assistant-user-preference.model';
|
|
10
13
|
export * from './ai-model.model';
|
|
@@ -61,6 +64,7 @@ export * from './xpert-workflow.model';
|
|
|
61
64
|
export * from './xpert-workflow-task.prompt';
|
|
62
65
|
export * from './xpert-tool-mcp.model';
|
|
63
66
|
export * from './xpert-project.model';
|
|
67
|
+
export * from './xpert-project-type.model';
|
|
64
68
|
export * from './environment.model';
|
|
65
69
|
export * from './knowledgebase-task.model';
|
|
66
70
|
export * from './knowledge-pipeline';
|
|
@@ -76,6 +80,7 @@ export * from './middleware.model';
|
|
|
76
80
|
export * from './context-compression.model';
|
|
77
81
|
export * from './sandbox';
|
|
78
82
|
export * from './message-content.utils';
|
|
83
|
+
export * from './sandbox-file-output.model';
|
|
79
84
|
export * from './mobile.model';
|
|
80
85
|
export * from './evolution';
|
|
81
86
|
export * from './mcp-capability.model';
|
|
@@ -86,3 +91,7 @@ export * from './knowledge-wiki-organization.model';
|
|
|
86
91
|
export * from './knowledge-question.model';
|
|
87
92
|
export * from './knowledge-tag.model';
|
|
88
93
|
export * from './knowledge-parser-selection';
|
|
94
|
+
export * from './clawxpert-conversation-scope.model';
|
|
95
|
+
export * from './knowledge-keyword-analyzer.model';
|
|
96
|
+
export * from './assistant-configuration.model';
|
|
97
|
+
export * from './assistant-trigger.model';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const DEFAULT_KNOWLEDGE_KEYWORD_ANALYZER = "basic";
|
|
2
|
+
/** Persisted analysis identity. A revision covers algorithm, normalization and dictionaries. */
|
|
3
|
+
export interface KnowledgeKeywordAnalyzer {
|
|
4
|
+
provider: string;
|
|
5
|
+
revision: string;
|
|
6
|
+
source: {
|
|
7
|
+
kind: 'builtin';
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'plugin';
|
|
10
|
+
pluginName: string;
|
|
11
|
+
scopeKey: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface KnowledgeKeywordAnalyzerOption {
|
|
15
|
+
label: string;
|
|
16
|
+
languages: string[];
|
|
17
|
+
analyzer: KnowledgeKeywordAnalyzer;
|
|
18
|
+
}
|
|
@@ -2,6 +2,7 @@ import type { KnowledgeAutomaticTaggingConfig } from './knowledge-tag.model';
|
|
|
2
2
|
import type { KnowledgeChunkLanguageHint } from './knowledge-chunking.model';
|
|
3
3
|
import type { KnowledgeQuestionGenerationConfig } from './knowledge-question.model';
|
|
4
4
|
import type { TKBRetrievalSettings } from './xpert.model';
|
|
5
|
+
import type { KnowledgeKeywordAnalyzer } from './knowledge-keyword-analyzer.model';
|
|
5
6
|
import { VectorTypeEnum } from './rag';
|
|
6
7
|
import { ICopilotModel } from './copilot-model.model';
|
|
7
8
|
import { I18nObject, TAvatar } from '../types';
|
|
@@ -203,6 +204,10 @@ export type TKnowledgebase = {
|
|
|
203
204
|
*/
|
|
204
205
|
parserId?: string;
|
|
205
206
|
parserConfig?: KnowledgebaseParserConfig;
|
|
207
|
+
/** Null retains the legacy PostgreSQL simple/trigram retrieval path. */
|
|
208
|
+
keywordAnalyzer?: KnowledgeKeywordAnalyzer | null;
|
|
209
|
+
/** Set by the server when the first document is inserted. */
|
|
210
|
+
keywordAnalyzerLocked?: boolean;
|
|
206
211
|
/**
|
|
207
212
|
* Index structure determines how the knowledge base organizes and indexes your document content.
|
|
208
213
|
* @deprecated
|
|
@@ -5,7 +5,7 @@ import type { McpCapabilityDescriptor, McpCapabilityType } from './mcp-capabilit
|
|
|
5
5
|
export declare const MCP_PROTOCOL_VERSION: "2026-07-28";
|
|
6
6
|
export declare const MCP_TASK_EXTENSION_ID: "io.modelcontextprotocol/tasks";
|
|
7
7
|
export declare const MCP_HTTP_CORS_REQUEST_HEADERS: readonly ["MCP-Protocol-Version", "Mcp-Session-Id", "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", "Mcp-Session-Id", "X-Request-Id"];
|
|
8
|
+
export declare const MCP_HTTP_CORS_EXPOSED_HEADERS: readonly ["Content-Location", "WWW-Authenticate", "MCP-Protocol-Version", "Mcp-Session-Id", "X-Request-Id"];
|
|
9
9
|
export declare const MCP_PUBLICATION_STATUSES: readonly ["draft", "active", "disabled"];
|
|
10
10
|
export type McpPublicationStatus = (typeof MCP_PUBLICATION_STATUSES)[number];
|
|
11
11
|
export declare const MCP_PUBLICATION_REVIEW_STATUSES: readonly ["current", "required"];
|
|
@@ -5,6 +5,7 @@ import { JsonSchemaObjectType } from './types';
|
|
|
5
5
|
import type { SkillSlashCommand } from './skill.model';
|
|
6
6
|
export declare const LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME = "SandboxCompressionMiddleware";
|
|
7
7
|
export declare const CONTEXT_COMPRESSION_MIDDLEWARE_NAME = "ContextCompressionMiddleware";
|
|
8
|
+
export declare const SKILLS_MIDDLEWARE_NAME = "skillsMiddleware";
|
|
8
9
|
export interface IWFNMiddleware extends IWorkflowNode {
|
|
9
10
|
type: WorkflowNodeTypeEnum.MIDDLEWARE;
|
|
10
11
|
provider: string;
|
package/src/ai/mobile.model.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export interface XpertMobileBootstrap {
|
|
|
57
57
|
}
|
|
58
58
|
export interface XpertMobileXpertSummary {
|
|
59
59
|
id: string;
|
|
60
|
+
createdAt?: Date | string | null;
|
|
60
61
|
slug: string;
|
|
61
62
|
name: string;
|
|
62
63
|
type: XpertTypeEnum | string;
|
|
@@ -69,6 +70,10 @@ export interface XpertMobileXpertSummary {
|
|
|
69
70
|
workspaceId?: string | null;
|
|
70
71
|
organizationId?: string | null;
|
|
71
72
|
publishAt?: Date | string | null;
|
|
73
|
+
businessArea?: {
|
|
74
|
+
id: string;
|
|
75
|
+
name: string;
|
|
76
|
+
} | null;
|
|
72
77
|
starters?: string[] | null;
|
|
73
78
|
}
|
|
74
79
|
export interface XpertMobileXpertsResponse {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { TXpertProjectTaskStatus, IXpertProjectTaskExecution } from './xpert-project.model';
|
|
2
|
+
import type { TAvatar } from '../types';
|
|
3
|
+
/** Stable logical work identity. Attempts and conversations never substitute for a task. */
|
|
4
|
+
export interface ProjectTaskNode {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
status: TXpertProjectTaskStatus;
|
|
8
|
+
kind: 'task' | 'summary' | 'milestone';
|
|
9
|
+
parentTaskId: string | null;
|
|
10
|
+
predecessorIds: string[];
|
|
11
|
+
providerKey: string | null;
|
|
12
|
+
sourceKey: string | null;
|
|
13
|
+
revision: number;
|
|
14
|
+
plannedStartAt: string | null;
|
|
15
|
+
plannedEndAt: string | null;
|
|
16
|
+
estimatedDurationMs: number | null;
|
|
17
|
+
actualStartAt: string | null;
|
|
18
|
+
actualEndAt: string | null;
|
|
19
|
+
diagnostic: string | null;
|
|
20
|
+
assigneeXpertId: string | null;
|
|
21
|
+
/** Display identity resolved by the platform, never inferred from a task title. */
|
|
22
|
+
assigneeName?: string | null;
|
|
23
|
+
/** Assistant avatar resolved within the same authorized scope as its display name. */
|
|
24
|
+
assigneeAvatar?: TAvatar | null;
|
|
25
|
+
}
|
|
26
|
+
export interface ProjectTaskGraph {
|
|
27
|
+
projectId: string;
|
|
28
|
+
projectTitle?: string;
|
|
29
|
+
/** Server-derived capability. Mutations must still authorize on the server. */
|
|
30
|
+
canEditPlan?: boolean;
|
|
31
|
+
cursor: string;
|
|
32
|
+
tasks: ProjectTaskNode[];
|
|
33
|
+
executions: IXpertProjectTaskExecution[];
|
|
34
|
+
/** Provider failures remain visible; a partial refresh must not look complete. */
|
|
35
|
+
diagnostics: Array<{
|
|
36
|
+
providerKey: string;
|
|
37
|
+
message: string;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
export interface ProjectTaskGraphChange {
|
|
41
|
+
taskId: string;
|
|
42
|
+
expectedRevision: number;
|
|
43
|
+
parentTaskId?: string | null;
|
|
44
|
+
predecessorIds?: string[];
|
|
45
|
+
plannedStartAt?: string | null;
|
|
46
|
+
plannedEndAt?: string | null;
|
|
47
|
+
estimatedDurationMs?: number | null;
|
|
48
|
+
}
|
|
49
|
+
export type { ProjectTaskForecast } from './project-task-schedule';
|
|
50
|
+
export interface ProjectTaskExecutionTarget {
|
|
51
|
+
projectId: string;
|
|
52
|
+
taskId: string;
|
|
53
|
+
taskExecutionId: string;
|
|
54
|
+
conversationId: string;
|
|
55
|
+
threadId: string;
|
|
56
|
+
agentExecutionId: string;
|
|
57
|
+
xpertId: string;
|
|
58
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Minimal, browser-safe scheduling contract, independent of server or Agent contracts. */
|
|
2
|
+
export interface ProjectTaskScheduleNode {
|
|
3
|
+
id: string;
|
|
4
|
+
status: string;
|
|
5
|
+
kind: 'task' | 'summary' | 'milestone';
|
|
6
|
+
parentTaskId: string | null;
|
|
7
|
+
predecessorIds: string[];
|
|
8
|
+
plannedStartAt: string | null;
|
|
9
|
+
plannedEndAt: string | null;
|
|
10
|
+
estimatedDurationMs: number | null;
|
|
11
|
+
actualStartAt: string | null;
|
|
12
|
+
actualEndAt: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface ProjectTaskForecast {
|
|
15
|
+
taskId: string;
|
|
16
|
+
startAt: string | null;
|
|
17
|
+
endAt: string | null;
|
|
18
|
+
affected: boolean;
|
|
19
|
+
critical: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** Tree containment and finish-to-start dependencies are separate acyclic graphs. */
|
|
22
|
+
export declare function validateProjectTaskGraph(tasks: readonly ProjectTaskScheduleNode[]): void;
|
|
23
|
+
/** Unknown estimates stay unknown. Summary rows never contribute another duration. */
|
|
24
|
+
export declare function forecastProjectTasks(tasks: readonly ProjectTaskScheduleNode[], changedId?: string): ProjectTaskForecast[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RuntimeCapabilitiesSelection } from '@xpert-ai/chatkit-types';
|
|
2
|
+
/** Expert node keys are local to their graph. Resolve this config before sending it to ChatKit. */
|
|
3
|
+
export type PromptWorkflowCapabilityConfig = {
|
|
4
|
+
type: 'expert_scoped_capabilities';
|
|
5
|
+
version: 1;
|
|
6
|
+
defaults?: RuntimeCapabilitiesSelection | null;
|
|
7
|
+
experts: Array<{
|
|
8
|
+
xpertId: string;
|
|
9
|
+
selection: RuntimeCapabilitiesSelection | null;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export declare function parsePromptCapabilitySelection(value: unknown): RuntimeCapabilitiesSelection | null;
|
|
13
|
+
export declare function isScopedPromptCapabilityConfig(value: unknown): boolean;
|
|
14
|
+
export declare function parsePromptCapabilityConfig(value: unknown): PromptWorkflowCapabilityConfig | null;
|
|
15
|
+
export declare function resolvePromptWorkflowCapabilities(value: unknown, xpertId?: string): unknown;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { IconDefinition } from '../types';
|
|
2
2
|
import { IBasePerWorkspaceEntityModel } from './xpert-workspace.model';
|
|
3
3
|
import { SkillSlashCommandAvailability } from './skill.model';
|
|
4
|
+
import { ITag } from '../tag-entity.model';
|
|
5
|
+
import type { ChatKitPromptScenario } from '@xpert-ai/chatkit-types';
|
|
6
|
+
export type PromptWorkflowScenario = ChatKitPromptScenario;
|
|
7
|
+
/** Boundary validation for persisted and API-provided scenario lists. */
|
|
8
|
+
export declare function isPromptWorkflowScenarios(value: unknown): value is PromptWorkflowScenario[];
|
|
4
9
|
export type PromptWorkflowVisibility = 'private' | 'team' | 'tenant';
|
|
5
10
|
export type PromptWorkflowSourceType = 'xpert' | 'workspace_prompt_workflow' | 'skill';
|
|
6
11
|
export type PromptWorkflowCommandPriority = 'normal' | 'preferred';
|
|
@@ -13,13 +18,21 @@ export type TPromptWorkflow = {
|
|
|
13
18
|
aliases?: string[];
|
|
14
19
|
argsHint?: string;
|
|
15
20
|
template: string;
|
|
21
|
+
scenarios?: PromptWorkflowScenario[];
|
|
16
22
|
tags?: string[];
|
|
17
23
|
visibility?: PromptWorkflowVisibility;
|
|
18
24
|
runtimeCapabilities?: unknown;
|
|
19
25
|
archivedAt?: Date | string | null;
|
|
20
26
|
};
|
|
21
27
|
export interface IPromptWorkflow extends IBasePerWorkspaceEntityModel, TPromptWorkflow {
|
|
28
|
+
organizationTags?: ITag[];
|
|
29
|
+
/** Empty means every expert in this workspace. Stale IDs must not broaden the scope. */
|
|
30
|
+
associatedXpertIds?: string[] | null;
|
|
22
31
|
}
|
|
32
|
+
export type PromptWorkflowInput = Partial<TPromptWorkflow> & {
|
|
33
|
+
organizationTagIds?: string[];
|
|
34
|
+
associatedXpertIds?: string[];
|
|
35
|
+
};
|
|
23
36
|
export type TPromptWorkflowCommandSnapshot = TPromptWorkflow & {
|
|
24
37
|
workflowId?: string;
|
|
25
38
|
workspaceId?: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChatTaskSummaryOutputKind } from '@xpert-ai/chatkit-types';
|
|
2
|
+
/** Display and validation formats for explicitly presented files; never automatic delivery policy. */
|
|
3
|
+
export type SandboxFileOutputRule = {
|
|
4
|
+
extension: string;
|
|
5
|
+
kind: ChatTaskSummaryOutputKind;
|
|
6
|
+
mimeType: string;
|
|
7
|
+
format: 'docx' | 'xlsx' | 'pptx' | 'pdf' | 'json' | 'utf8' | 'png' | 'jpeg' | 'binary';
|
|
8
|
+
};
|
|
9
|
+
export declare const SANDBOX_FILE_OUTPUT_RULES: readonly SandboxFileOutputRule[];
|
|
@@ -5,6 +5,7 @@ import { IXpertAgent } from './xpert-agent.model';
|
|
|
5
5
|
import { TSensitiveOperation } from './chat.model';
|
|
6
6
|
import { WorkflowNodeTypeEnum } from './xpert-workflow.model';
|
|
7
7
|
import type { IModelUsageDetails } from './model-usage.model';
|
|
8
|
+
import type { TAvatar } from '../types';
|
|
8
9
|
export type TXpertExecution = {
|
|
9
10
|
category?: TXpertTeamNodeType;
|
|
10
11
|
type?: WorkflowNodeTypeEnum | string;
|
|
@@ -96,6 +97,12 @@ export declare enum XpertAgentExecutionStatusEnum {
|
|
|
96
97
|
INTERRUPTED = "interrupted"
|
|
97
98
|
}
|
|
98
99
|
export type TAgentExecutionMetadata = {
|
|
100
|
+
/** Recorded by the invocation boundary; never inferred from agent names. */
|
|
101
|
+
invocationKind?: 'external_assistant' | 'sub_agent';
|
|
102
|
+
/** Tool call in the parent execution that started this run. Omit for workflow-driven runs. */
|
|
103
|
+
sourceToolCallId?: string;
|
|
104
|
+
assistantName?: string;
|
|
105
|
+
assistantAvatar?: TAvatar;
|
|
99
106
|
/**
|
|
100
107
|
* AI model provider
|
|
101
108
|
*/
|
|
@@ -129,5 +136,31 @@ export type TAgentExecutionMetadata = {
|
|
|
129
136
|
handoffParentMessageId?: string;
|
|
130
137
|
runtimePrincipalType?: string;
|
|
131
138
|
runtimePrincipalXpertId?: string;
|
|
139
|
+
/** Root execution this run continued after a durable thread pause. */
|
|
140
|
+
resumedFromExecutionId?: string;
|
|
132
141
|
[key: string]: unknown;
|
|
133
142
|
};
|
|
143
|
+
/** Public execution summary shared by live events and conversation history. */
|
|
144
|
+
export type TChatAgentRunSummary = {
|
|
145
|
+
/** Identifies the main reply and its total duration without inferring identity from agent names. */
|
|
146
|
+
isRoot?: boolean;
|
|
147
|
+
id: string;
|
|
148
|
+
parentId?: string;
|
|
149
|
+
type?: string;
|
|
150
|
+
category?: TXpertTeamNodeType;
|
|
151
|
+
agentKey?: string;
|
|
152
|
+
xpertId?: string;
|
|
153
|
+
xpertName?: string;
|
|
154
|
+
avatar?: TAvatar;
|
|
155
|
+
title?: string;
|
|
156
|
+
invocationKind?: TAgentExecutionMetadata['invocationKind'];
|
|
157
|
+
/** Matches the Tool component id within parentId; never match by tool name or provider. */
|
|
158
|
+
sourceToolCallId?: TAgentExecutionMetadata['sourceToolCallId'];
|
|
159
|
+
model?: string;
|
|
160
|
+
status?: string;
|
|
161
|
+
elapsedTime?: number;
|
|
162
|
+
inputs?: unknown;
|
|
163
|
+
error?: string;
|
|
164
|
+
createdAt?: string;
|
|
165
|
+
updatedAt?: string;
|
|
166
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FollowUpBehavior, TChatRequestHuman as ChatKitRequestHuman, TXpertChatInterruptPatch, TXpertChatResumeDecision, TXpertChatResumeRequest, TXpertChatState, TXpertChatTarget } from '@xpert-ai/chatkit-types';
|
|
2
|
+
import type { ProjectSelection } from './project-selection.model';
|
|
2
3
|
export type TXpertFollowUpMode = FollowUpBehavior;
|
|
3
4
|
export type TXpertChatRequestHuman = ChatKitRequestHuman & {
|
|
4
5
|
/** Opaque Assistant model option id for this run. */
|
|
@@ -12,6 +13,7 @@ export type TXpertChatSendRequest = {
|
|
|
12
13
|
action: 'send';
|
|
13
14
|
conversationId?: string;
|
|
14
15
|
projectId?: string;
|
|
16
|
+
projectSelection?: ProjectSelection;
|
|
15
17
|
environmentId?: string;
|
|
16
18
|
sandboxEnvironmentId?: string;
|
|
17
19
|
message: {
|
|
@@ -52,6 +52,7 @@ export interface IXpertAccessRequest extends IBasePerTenantAndOrganizationEntity
|
|
|
52
52
|
}
|
|
53
53
|
export type TXpertMarketplaceQuery = {
|
|
54
54
|
search?: string | null;
|
|
55
|
+
businessAreaIds?: string[];
|
|
55
56
|
businessCategories?: TXpertMarketplaceBusinessCategory[];
|
|
56
57
|
capabilityTags?: string[];
|
|
57
58
|
collaborationModes?: TXpertMarketplaceCollaborationMode[];
|
|
@@ -77,6 +78,10 @@ export type IXpertMarketplaceItem = {
|
|
|
77
78
|
};
|
|
78
79
|
export type IXpertMarketplaceListResponse = {
|
|
79
80
|
items: IXpertMarketplaceItem[];
|
|
81
|
+
businessAreas?: {
|
|
82
|
+
id: string;
|
|
83
|
+
name: string;
|
|
84
|
+
}[];
|
|
80
85
|
recommendedTemplates: TXpertTemplate[];
|
|
81
86
|
total: number;
|
|
82
87
|
reviewableCount: number;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { I18nObject, IconDefinition } from '../types';
|
|
2
|
+
/** Stable identity, independent of installation ids, labels and plugin versions. */
|
|
3
|
+
export interface XpertProjectTypeRef {
|
|
4
|
+
applicationKey: string;
|
|
5
|
+
projectTypeKey: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const GENERAL_PROJECT_TYPE: XpertProjectTypeRef;
|
|
8
|
+
export interface XpertProjectTypeDefinition {
|
|
9
|
+
key: string;
|
|
10
|
+
title: string | I18nObject;
|
|
11
|
+
icon?: IconDefinition;
|
|
12
|
+
/** Entity types delegate creation and lifecycle to their registered provider. */
|
|
13
|
+
binding: {
|
|
14
|
+
kind: 'project';
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'entity';
|
|
17
|
+
providerKey: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface XpertProjectTypeSummary extends XpertProjectTypeRef {
|
|
21
|
+
applicationTitle: string | I18nObject;
|
|
22
|
+
title: string | I18nObject;
|
|
23
|
+
icon?: IconDefinition;
|
|
24
|
+
binding: XpertProjectTypeDefinition['binding'];
|
|
25
|
+
available: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface XpertProjectClassification {
|
|
28
|
+
applicationKey?: string | null;
|
|
29
|
+
projectTypeKey?: string | null;
|
|
30
|
+
applicationInstallationId?: string | null;
|
|
31
|
+
/** Display-only snapshot survives plugin removal; never used for authorization. */
|
|
32
|
+
projectTypeSnapshot?: Pick<XpertProjectTypeSummary, 'applicationTitle' | 'title' | 'binding'> | null;
|
|
33
|
+
}
|
|
34
|
+
export interface XpertProjectListFilter {
|
|
35
|
+
search?: string;
|
|
36
|
+
applicationKey?: string;
|
|
37
|
+
projectTypeKey?: string;
|
|
38
|
+
unclassified?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** Resolved by the host and a trusted provider, never an arbitrary URL. */
|
|
41
|
+
export type XpertProjectEntry = {
|
|
42
|
+
kind: 'project';
|
|
43
|
+
projectId?: string;
|
|
44
|
+
projectType: XpertProjectTypeRef;
|
|
45
|
+
} | {
|
|
46
|
+
kind: 'assistant';
|
|
47
|
+
xpertId: string;
|
|
48
|
+
slug: string;
|
|
49
|
+
projectId?: string;
|
|
50
|
+
viewKey: string;
|
|
51
|
+
selectionId?: string;
|
|
52
|
+
};
|
|
53
|
+
export interface XpertProjectTypeCatalog {
|
|
54
|
+
items: XpertProjectTypeSummary[];
|
|
55
|
+
defaultProjectType?: XpertProjectTypeRef;
|
|
56
|
+
}
|
|
@@ -9,11 +9,18 @@ import { IKnowledgebase } from './knowledgebase.model';
|
|
|
9
9
|
import { IXpertToolset } from './xpert-toolset.model';
|
|
10
10
|
import { IXpertWorkspace } from './xpert-workspace.model';
|
|
11
11
|
import { IXpert, TXpertTeamDraft } from './xpert.model';
|
|
12
|
+
import type { XpertProjectClassification, XpertProjectTypeRef } from './xpert-project-type.model';
|
|
12
13
|
export type TXpertProjectSettings = {
|
|
13
14
|
/** @deprecated Project instructions are stored in /project/<projectId>/project.md. */
|
|
14
15
|
instruction?: string;
|
|
15
16
|
mode?: '' | 'plan';
|
|
16
17
|
managementMode?: TXpertProjectManagementMode;
|
|
18
|
+
/** Server-owned first-send provenance; the provisional name may be reconciled once by the business app. */
|
|
19
|
+
conversationBootstrap?: {
|
|
20
|
+
conversationId: string;
|
|
21
|
+
initialName: string;
|
|
22
|
+
nameResolved?: boolean;
|
|
23
|
+
};
|
|
17
24
|
/** @deprecated Project Xperts are peers and no default Project Assistant is selected. */
|
|
18
25
|
projectAssistantId?: string;
|
|
19
26
|
};
|
|
@@ -134,7 +141,7 @@ export declare enum XpertProjectAutomationRunStatusEnum {
|
|
|
134
141
|
FAILED = "failed",
|
|
135
142
|
CANCELLED = "cancelled"
|
|
136
143
|
}
|
|
137
|
-
export type TXpertProject = {
|
|
144
|
+
export type TXpertProject = XpertProjectClassification & {
|
|
138
145
|
name: string;
|
|
139
146
|
avatar?: TAvatar;
|
|
140
147
|
description?: string;
|
|
@@ -197,6 +204,7 @@ export interface IXpertProjectInvitation extends IBasePerTenantAndOrganizationEn
|
|
|
197
204
|
lastSentAt: Date;
|
|
198
205
|
}
|
|
199
206
|
export type IXpertProjectCreateInput = Partial<IXpertProject> & {
|
|
207
|
+
projectType?: XpertProjectTypeRef;
|
|
200
208
|
xpertIds?: string[];
|
|
201
209
|
toolsetIds?: string[];
|
|
202
210
|
knowledgebaseIds?: string[];
|
|
@@ -207,6 +215,17 @@ export interface IBasePerXpertProjectEntityModel extends IBasePerTenantAndOrgani
|
|
|
207
215
|
project?: IXpertProject;
|
|
208
216
|
}
|
|
209
217
|
export interface IXpertProjectTask extends IBasePerXpertProjectEntityModel {
|
|
218
|
+
providerKey?: string | null;
|
|
219
|
+
sourceKey?: string | null;
|
|
220
|
+
sourceRevision?: string | null;
|
|
221
|
+
revision?: number;
|
|
222
|
+
kind?: 'task' | 'summary' | 'milestone';
|
|
223
|
+
parentTaskId?: string | null;
|
|
224
|
+
predecessorIds?: string[];
|
|
225
|
+
plannedStartAt?: Date | null;
|
|
226
|
+
plannedEndAt?: Date | null;
|
|
227
|
+
estimatedDurationMs?: number | null;
|
|
228
|
+
diagnostic?: string | null;
|
|
210
229
|
threadId?: string;
|
|
211
230
|
name: string;
|
|
212
231
|
title?: string;
|
|
@@ -238,6 +257,11 @@ export interface IXpertProjectTaskConversation extends IBasePerXpertProjectEntit
|
|
|
238
257
|
sourceExecutionId?: string;
|
|
239
258
|
}
|
|
240
259
|
export interface IXpertProjectTaskExecution extends IBasePerXpertProjectEntityModel {
|
|
260
|
+
/** Observed runtime status, independent from the business task acceptance status. */
|
|
261
|
+
runtimeStartedAt?: string | null;
|
|
262
|
+
runtimeCompletedAt?: string | null;
|
|
263
|
+
runtimeStatus?: 'running' | 'success' | 'error' | 'pending' | 'timeout' | 'interrupted' | 'unknown';
|
|
264
|
+
sourceKey?: string | null;
|
|
241
265
|
taskId: string;
|
|
242
266
|
conversationId?: string;
|
|
243
267
|
threadId?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IBasePerTenantEntityModel } from '../base-entity.model';
|
|
2
2
|
import { IconDefinition, TAvatar } from '../types';
|
|
3
3
|
import { TCopilotModel } from './copilot-model.model';
|
|
4
|
+
import { ModelFeature } from './ai-model.model';
|
|
4
5
|
import { MCPServerType, TMCPServer } from './xpert-tool-mcp.model';
|
|
5
6
|
import { XpertTypeEnum } from './xpert.model';
|
|
6
7
|
import type { TPromptWorkflow } from './prompt-workflow.model';
|
|
@@ -101,6 +102,12 @@ export type TTemplate = {
|
|
|
101
102
|
contentHash?: string;
|
|
102
103
|
xpertName?: string;
|
|
103
104
|
dependencies?: XpertTemplatePluginDependencies;
|
|
105
|
+
/** Explicit capability requirements/options, implemented by registered providers. */
|
|
106
|
+
capabilities?: AssistantCapabilityDeclaration[];
|
|
107
|
+
/** Capabilities composed into this resolved template variant. */
|
|
108
|
+
enabledCapabilities?: string[];
|
|
109
|
+
/** Require an explicitly selected, authorized LLM even without capability constraints. */
|
|
110
|
+
requiresModelSelection?: boolean;
|
|
104
111
|
/** Trusted plugin App explicitly linked to this Assistant template. */
|
|
105
112
|
application?: PluginTemplateApplicationSummary;
|
|
106
113
|
};
|
|
@@ -110,6 +117,29 @@ export type TXpertTemplate = TTemplate & {
|
|
|
110
117
|
copilotModel?: Partial<TCopilotModel>;
|
|
111
118
|
};
|
|
112
119
|
export type TXpertTemplateSummary = Omit<TXpertTemplate, 'export_data'>;
|
|
120
|
+
/** Opt-in capabilities offered by the serving distribution for a template. */
|
|
121
|
+
export type XpertTemplateCapability = string;
|
|
122
|
+
export interface AssistantCapabilityDeclaration {
|
|
123
|
+
key: string;
|
|
124
|
+
/** Required capabilities cannot be disabled; optional capabilities default to off. */
|
|
125
|
+
required?: boolean;
|
|
126
|
+
}
|
|
127
|
+
export interface XpertTemplateSetup {
|
|
128
|
+
requiresModel?: boolean;
|
|
129
|
+
optionalCapabilities: {
|
|
130
|
+
key: XpertTemplateCapability;
|
|
131
|
+
label: string;
|
|
132
|
+
description: string;
|
|
133
|
+
}[];
|
|
134
|
+
requiredModelFeatures: ModelFeature[];
|
|
135
|
+
models: {
|
|
136
|
+
id: string;
|
|
137
|
+
label: string;
|
|
138
|
+
copilotModel: TCopilotModel;
|
|
139
|
+
}[];
|
|
140
|
+
canInstall: boolean;
|
|
141
|
+
reason?: string;
|
|
142
|
+
}
|
|
113
143
|
export interface TXpertTemplateCatalogQuery {
|
|
114
144
|
search?: string;
|
|
115
145
|
category?: string;
|
|
@@ -56,9 +56,23 @@ export type TMCPServerReconnect = {
|
|
|
56
56
|
*/
|
|
57
57
|
delayMs?: number;
|
|
58
58
|
};
|
|
59
|
-
|
|
59
|
+
/** Supported authentication modes for a host-consumed MCP server. */
|
|
60
|
+
export declare const MCP_CONSUMER_AUTH_TYPES: readonly ["none", "manual_header", "api_key", "oauth", "connector"];
|
|
61
|
+
/** Discriminator for MCP consumer authentication configuration. */
|
|
60
62
|
export type McpConsumerAuthType = (typeof MCP_CONSUMER_AUTH_TYPES)[number];
|
|
63
|
+
/** MCP authentication by mode; Connector credentials remain host-managed. */
|
|
61
64
|
export type TMcpConsumerAuth = {
|
|
65
|
+
/** Use the caller's Connector authorization. */
|
|
66
|
+
type: 'connector';
|
|
67
|
+
/** Administrator-resolved binding. Never a token or a package-supplied machine ID. */
|
|
68
|
+
bindingId: string;
|
|
69
|
+
/** Registered Connector strategy key matching this binding. */
|
|
70
|
+
provider: string;
|
|
71
|
+
/** Resource/audience understood by the Connector provider. */
|
|
72
|
+
resource?: string;
|
|
73
|
+
/** Required scopes, revalidated by the Connector. */
|
|
74
|
+
scopes?: string[];
|
|
75
|
+
} | {
|
|
62
76
|
type: 'none';
|
|
63
77
|
} | {
|
|
64
78
|
type: 'manual_header';
|
|
@@ -3,6 +3,7 @@ import { ICopilotModel } from './copilot-model.model';
|
|
|
3
3
|
import { TKBRecallParams } from './knowledgebase.model';
|
|
4
4
|
import { ApiAuthType, JsonSchemaObjectType, TErrorHandling, TXpertRefParameter } from './types';
|
|
5
5
|
import { TKBRetrievalSettings, TStateVariable, TXpertParameter } from './xpert.model';
|
|
6
|
+
import type { AssistantTriggerPresentation } from './assistant-trigger.model';
|
|
6
7
|
export type TWorkflowNodeMeta = {
|
|
7
8
|
name: string;
|
|
8
9
|
label: I18nObject;
|
|
@@ -10,7 +11,20 @@ export type TWorkflowNodeMeta = {
|
|
|
10
11
|
deprecated?: boolean;
|
|
11
12
|
configSchema: JsonSchemaObjectType;
|
|
12
13
|
};
|
|
13
|
-
export type TWorkflowTriggerMeta = TWorkflowNodeMeta
|
|
14
|
+
export type TWorkflowTriggerMeta = TWorkflowNodeMeta & {
|
|
15
|
+
assistant?: AssistantTriggerPresentation;
|
|
16
|
+
quickConnect?: {
|
|
17
|
+
method: 'qr';
|
|
18
|
+
integrationProvider: string;
|
|
19
|
+
configField: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type TWorkflowTriggerConnectionStatus = {
|
|
23
|
+
provider: string;
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
connected: boolean;
|
|
26
|
+
state: 'disconnected' | 'connecting' | 'connected' | 'failed';
|
|
27
|
+
};
|
|
14
28
|
export declare enum WorkflowNodeTypeEnum {
|
|
15
29
|
START = "start",
|
|
16
30
|
END = "end",
|
package/src/ai/xpert.model.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { IXpertAgent } from './xpert-agent.model';
|
|
|
11
11
|
import { IXpertToolset } from './xpert-toolset.model';
|
|
12
12
|
import { IBasePerWorkspaceEntityModel } from './xpert-workspace.model';
|
|
13
13
|
import { IIntegration } from '../integration.model';
|
|
14
|
-
import { TChatFrom } from './chat.model';
|
|
14
|
+
import { TChatCheckpointReference, TChatFrom } from './chat.model';
|
|
15
15
|
import { IWorkflowNode, TVariableAssigner, VariableOperationEnum } from './xpert-workflow.model';
|
|
16
16
|
import { IEnvironment } from './environment.model';
|
|
17
17
|
import { TXpertCommandProfile } from './prompt-workflow.model';
|
|
@@ -42,6 +42,10 @@ export type TXpertTitleFeature = {
|
|
|
42
42
|
instruction?: string;
|
|
43
43
|
};
|
|
44
44
|
export type TXpertFeatures = {
|
|
45
|
+
/** Generate start-screen questions from recurring intents in conversation history. */
|
|
46
|
+
frequentQuestions?: {
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
};
|
|
45
49
|
opener: {
|
|
46
50
|
enabled: boolean;
|
|
47
51
|
message: string;
|
|
@@ -296,6 +300,7 @@ export type TXpertDataXpertOptions = {
|
|
|
296
300
|
[key: string]: unknown;
|
|
297
301
|
};
|
|
298
302
|
export type TXpertOptions = {
|
|
303
|
+
assistantCapabilities?: import('./assistant-configuration.model').AssistantCapabilityState;
|
|
299
304
|
/** Runtime-selectable Primary Agent models. The configured Primary model is added automatically. */
|
|
300
305
|
modelSelection?: {
|
|
301
306
|
/** Additional LLM models users may select. */
|
|
@@ -305,6 +310,10 @@ export type TXpertOptions = {
|
|
|
305
310
|
workspaceScope?: {
|
|
306
311
|
/** Require an explicit Project, or prefer one while preserving the legacy fallback. */
|
|
307
312
|
mode: 'project-required' | 'project-preferred';
|
|
313
|
+
/** Opt in to creating a Project on the first send of an empty conversation, under the caller's permissions. */
|
|
314
|
+
onMissing?: 'create';
|
|
315
|
+
/** Explicit application context for discovery and governed Project creation. */
|
|
316
|
+
projectType?: import('./xpert-project-type.model').XpertProjectTypeRef;
|
|
308
317
|
};
|
|
309
318
|
/** Legacy template key retained for existing plugin-authored DSL files. */
|
|
310
319
|
templateKey?: string;
|
|
@@ -356,6 +365,8 @@ export type TXpertAgentConfig = {
|
|
|
356
365
|
* Sensitive tools and agents
|
|
357
366
|
*/
|
|
358
367
|
interruptBefore?: string[];
|
|
368
|
+
/** Pause after these tools finish, before the next model turn. Resume never reruns the tool. */
|
|
369
|
+
interruptAfter?: string[];
|
|
359
370
|
/**
|
|
360
371
|
* End nodes
|
|
361
372
|
*/
|
|
@@ -610,6 +621,9 @@ export type TChatOptions = {
|
|
|
610
621
|
messageId?: string;
|
|
611
622
|
thread_id?: string;
|
|
612
623
|
checkpointId?: string;
|
|
624
|
+
/** Server-resolved pause checkpoint; never an arbitrary client state patch. */
|
|
625
|
+
resumeCheckpoint?: TChatCheckpointReference;
|
|
626
|
+
inputMessageId?: string;
|
|
613
627
|
/**
|
|
614
628
|
* The language used by the current browser page
|
|
615
629
|
*/
|