@xpert-ai/contracts 3.18.5 → 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 +1045 -216
- package/index.esm.js +1023 -217
- 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-doc.model.d.ts +18 -1
- package/src/ai/knowledge-filter.model.d.ts +26 -1
- package/src/ai/knowledge-graph.model.d.ts +18 -1
- package/src/ai/knowledge-keyword-analyzer.model.d.ts +18 -0
- package/src/ai/knowledge-parser-selection.d.ts +6 -0
- package/src/ai/knowledgebase.model.d.ts +18 -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';
|
|
@@ -345,16 +345,25 @@ export type DocumentParserDiagnostics = {
|
|
|
345
345
|
imagePaths: string[];
|
|
346
346
|
}[];
|
|
347
347
|
};
|
|
348
|
+
export type KnowledgeImageUnderstandingWarning = {
|
|
349
|
+
type: 'image_understanding_skipped' | 'image_understanding_failed';
|
|
350
|
+
message: string;
|
|
351
|
+
assetCount?: number;
|
|
352
|
+
imagePath?: string;
|
|
353
|
+
imageUrl?: string;
|
|
354
|
+
parentChunkId?: string;
|
|
355
|
+
};
|
|
348
356
|
export interface KnowledgeDocumentMetadata extends StandardDocumentMetadata {
|
|
349
357
|
/** Server-owned identity and label of the last completed document conversion. */
|
|
350
358
|
parser?: string;
|
|
351
359
|
parserLabel?: I18nObject;
|
|
352
360
|
parserDiagnostics?: DocumentParserDiagnostics;
|
|
361
|
+
imageUnderstandingWarnings?: KnowledgeImageUnderstandingWarning[];
|
|
353
362
|
/** Server-owned generated table descriptions and publication state. */
|
|
354
363
|
tableMetadata?: KnowledgeTableMetadata;
|
|
355
364
|
/** Existing source summary, available to optional document classifiers. */
|
|
356
365
|
summary?: string;
|
|
357
|
-
/**
|
|
366
|
+
/** Ownership is independent of visibility in the document browser. */
|
|
358
367
|
systemManaged?: boolean;
|
|
359
368
|
systemManagedType?: string;
|
|
360
369
|
transformSnapshot?: KnowledgeDocumentTransformSnapshotRef;
|
|
@@ -362,6 +371,9 @@ export interface KnowledgeDocumentMetadata extends StandardDocumentMetadata {
|
|
|
362
371
|
documentAnalysis?: DocumentAnalysisMetadata;
|
|
363
372
|
[key: string]: any;
|
|
364
373
|
}
|
|
374
|
+
export declare const KNOWLEDGE_DOCUMENT_AGENT_WRITER_TYPE = "agent-writer";
|
|
375
|
+
/** Agent publications are inspectable; internal Wiki/FAQ backing indexes stay hidden. */
|
|
376
|
+
export declare function isKnowledgeDocumentVisible(metadata?: KnowledgeDocumentMetadata | null): boolean;
|
|
365
377
|
export interface IKnowledgeDocumentCreateInput extends IKnowledgeDocument, IBasePerTenantAndOrganizationEntityModel {
|
|
366
378
|
}
|
|
367
379
|
export interface IKnowledgeDocumentUpdateInput extends Partial<IKnowledgeDocumentCreateInput> {
|
|
@@ -383,3 +395,8 @@ export declare const STANDARD_METADATA_FIELDS: {
|
|
|
383
395
|
fields: KBMetadataFieldDef[];
|
|
384
396
|
}[];
|
|
385
397
|
export type StandardMetadataFieldKey = (typeof STANDARD_METADATA_FIELDS)[number]['fields'][number]['key'];
|
|
398
|
+
/** Bulk import keeps the legacy document array valid; tags apply to the whole batch. */
|
|
399
|
+
export type KnowledgeDocumentBulkCreateInput = Partial<IKnowledgeDocument>[] | {
|
|
400
|
+
documents: Partial<IKnowledgeDocument>[];
|
|
401
|
+
tagIds: string[];
|
|
402
|
+
};
|
|
@@ -53,8 +53,33 @@ export type KnowledgeFilterSources = {
|
|
|
53
53
|
dynamic?: KnowledgeFilterNode;
|
|
54
54
|
};
|
|
55
55
|
export type KnowledgeFilterStatus = 'not_applied' | 'applied' | 'dynamic_fallback' | 'failed';
|
|
56
|
-
export type KnowledgeFilterErrorCode = 'invalid_filter' | 'unknown_field' | 'invalid_operator' | 'invalid_value' | 'missing_fixed_variable' | 'filter_too_complex' | 'graph_search_failed' | 'keyword_index_missing' | 'keyword_query_failed' | 'rerank_failed' | 'unsupported_backend' | 'unsupported_retrieval_mode';
|
|
56
|
+
export type KnowledgeFilterErrorCode = 'invalid_filter' | 'unknown_field' | 'invalid_operator' | 'invalid_value' | 'missing_fixed_variable' | 'filter_too_complex' | 'graph_search_failed' | 'keyword_index_missing' | 'keyword_query_failed' | 'rerank_failed' | 'faq_semantic_failed' | 'unsupported_backend' | 'unsupported_retrieval_mode';
|
|
57
57
|
export type KnowledgeFilterDiagnostics = {
|
|
58
|
+
faqExclusion?: {
|
|
59
|
+
mode: 'semantic';
|
|
60
|
+
threshold: number;
|
|
61
|
+
margin: number;
|
|
62
|
+
modelFingerprint?: string;
|
|
63
|
+
compared: number;
|
|
64
|
+
reused: number;
|
|
65
|
+
excluded: number;
|
|
66
|
+
cacheHits: number;
|
|
67
|
+
encodedTexts: number;
|
|
68
|
+
cacheErrors: number;
|
|
69
|
+
coalescedTexts: number;
|
|
70
|
+
rounds: number;
|
|
71
|
+
candidateSlots: number;
|
|
72
|
+
retrievalCalls: number;
|
|
73
|
+
stopReason?: 'target_reached' | 'exhausted' | 'budget_exhausted';
|
|
74
|
+
failureReason?: string;
|
|
75
|
+
decisions: Array<{
|
|
76
|
+
faqId: string;
|
|
77
|
+
action: 'keep' | 'exclude';
|
|
78
|
+
reason: string;
|
|
79
|
+
positiveScore?: number;
|
|
80
|
+
negativeScore?: number;
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
58
83
|
contentScope?: KnowledgeRetrievalContentScope;
|
|
59
84
|
filterVersion: typeof KNOWLEDGE_FILTER_VERSION;
|
|
60
85
|
fixedFilter?: KnowledgeFilterNode;
|
|
@@ -34,7 +34,7 @@ export type KnowledgeGraphDocumentProgress = {
|
|
|
34
34
|
error?: string | null;
|
|
35
35
|
};
|
|
36
36
|
export type GraphRagRetrievalMode = 'vector' | 'keyword' | 'graph' | 'hybrid';
|
|
37
|
-
export type KnowledgeGraphItemOrigin = 'extracted' | 'manual' | 'curated';
|
|
37
|
+
export type KnowledgeGraphItemOrigin = 'extracted' | 'structured' | 'manual' | 'curated';
|
|
38
38
|
export type KnowledgeGraphVisibility = 'active' | 'hidden';
|
|
39
39
|
export type GraphRagConfig = {
|
|
40
40
|
enabled?: boolean;
|
|
@@ -164,6 +164,7 @@ export type KnowledgeGraphViewNode = {
|
|
|
164
164
|
confidence?: number | null;
|
|
165
165
|
symbolSize?: number;
|
|
166
166
|
value?: number;
|
|
167
|
+
unloadedNeighborCount?: number;
|
|
167
168
|
};
|
|
168
169
|
export type KnowledgeGraphViewEdge = {
|
|
169
170
|
id: string;
|
|
@@ -182,6 +183,17 @@ export type KnowledgeGraphViewResponse = {
|
|
|
182
183
|
relationTypes: string[];
|
|
183
184
|
totalNodes: number;
|
|
184
185
|
totalEdges: number;
|
|
186
|
+
remainingNodes?: number;
|
|
187
|
+
relations?: IKnowledgeGraphRelation[];
|
|
188
|
+
};
|
|
189
|
+
export type KnowledgeGraphCatalog = {
|
|
190
|
+
sources: Array<{
|
|
191
|
+
id: string;
|
|
192
|
+
name: string;
|
|
193
|
+
}>;
|
|
194
|
+
entities: Array<Pick<IKnowledgeGraphEntity, 'id' | 'name' | 'type'>>;
|
|
195
|
+
hiddenNodes: number;
|
|
196
|
+
hiddenRelations: number;
|
|
185
197
|
};
|
|
186
198
|
export type KnowledgeGraphVisualizationQuery = {
|
|
187
199
|
search?: string | null;
|
|
@@ -192,6 +204,11 @@ export type KnowledgeGraphVisualizationQuery = {
|
|
|
192
204
|
focusEntityId?: string | null;
|
|
193
205
|
depth?: number | null;
|
|
194
206
|
take?: number | null;
|
|
207
|
+
sourceDocumentId?: string | null;
|
|
208
|
+
loadAll?: boolean;
|
|
209
|
+
expandedEntityIds?: string[];
|
|
210
|
+
visibleEntityIds?: string[];
|
|
211
|
+
includeHidden?: boolean;
|
|
195
212
|
};
|
|
196
213
|
export type KnowledgeGraphMentionListQuery = {
|
|
197
214
|
entityId?: string | null;
|
|
@@ -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
|
+
}
|
|
@@ -5,3 +5,9 @@ export declare const BUILTIN_KNOWLEDGE_PARSER = "builtin";
|
|
|
5
5
|
export declare const BUILTIN_KNOWLEDGE_FILE_TYPES: string[];
|
|
6
6
|
export declare function knowledgeDocumentFileType(document: Partial<Pick<IKnowledgeDocument, 'type' | 'mimeType'>>): string;
|
|
7
7
|
export declare function knowledgebaseParserSelection(config: Partial<KnowledgebaseParserConfig> | null | undefined, documentType: string): KnowledgeParserSelection | undefined;
|
|
8
|
+
/** Existing uploader/importer defaults plus capabilities advertised by installed document parsers.
|
|
9
|
+
* Explicit caller restrictions remain authoritative; this does not grant builtin parsing support.
|
|
10
|
+
*/
|
|
11
|
+
export declare function knowledgeUploadFileTypes(defaults: readonly string[], providers: readonly {
|
|
12
|
+
supportedFileTypes?: string[];
|
|
13
|
+
}[], accepts?: readonly string[] | null): string[];
|
|
@@ -2,6 +2,8 @@ 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';
|
|
6
|
+
import { VectorTypeEnum } from './rag';
|
|
5
7
|
import { ICopilotModel } from './copilot-model.model';
|
|
6
8
|
import { I18nObject, TAvatar } from '../types';
|
|
7
9
|
import { IBasePerWorkspaceEntityModel } from './xpert-workspace.model';
|
|
@@ -34,6 +36,10 @@ export type KnowledgebaseFAQConfig = {
|
|
|
34
36
|
questionIndexMode: KnowledgebaseFAQQuestionIndexMode;
|
|
35
37
|
/** Optional for knowledge bases created before negative matching was configurable. */
|
|
36
38
|
negativeMatchMode?: KnowledgebaseFAQNegativeMatchMode;
|
|
39
|
+
/** Required for semantic mode; cosine similarity in [0, 1]. Immutable after creation. */
|
|
40
|
+
semanticThreshold?: number;
|
|
41
|
+
/** Required for semantic mode; negative minus positive similarity in (0, 2]. */
|
|
42
|
+
semanticMargin?: number;
|
|
37
43
|
};
|
|
38
44
|
export declare const DEFAULT_KNOWLEDGEBASE_FAQ_CONFIG: {
|
|
39
45
|
readonly indexMode: "question_only";
|
|
@@ -94,7 +100,15 @@ export type KnowledgebaseParserConfig = {
|
|
|
94
100
|
/**
|
|
95
101
|
* Type of rag knowledgebase
|
|
96
102
|
*/
|
|
103
|
+
export interface KnowledgeVectorStoreOptions {
|
|
104
|
+
default: VectorTypeEnum;
|
|
105
|
+
stores: {
|
|
106
|
+
type: VectorTypeEnum;
|
|
107
|
+
}[];
|
|
108
|
+
}
|
|
97
109
|
export type TKnowledgebase = {
|
|
110
|
+
/** Null on legacy knowledgebases: use the deployment default. */
|
|
111
|
+
vectorStore?: VectorTypeEnum | null;
|
|
98
112
|
/**
|
|
99
113
|
* KB name
|
|
100
114
|
*/
|
|
@@ -190,6 +204,10 @@ export type TKnowledgebase = {
|
|
|
190
204
|
*/
|
|
191
205
|
parserId?: string;
|
|
192
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;
|
|
193
211
|
/**
|
|
194
212
|
* Index structure determines how the knowledge base organizes and indexes your document content.
|
|
195
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;
|