@xpert-ai/contracts 3.18.2 → 3.18.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.
Files changed (42) hide show
  1. package/index.cjs.js +614 -93
  2. package/index.esm.js +563 -94
  3. package/package.json +2 -2
  4. package/src/ai/context-compression.model.d.ts +2 -1
  5. package/src/ai/evolution/candidate.d.ts +3 -0
  6. package/src/ai/evolution/change.d.ts +221 -0
  7. package/src/ai/evolution/evaluation.d.ts +1 -0
  8. package/src/ai/evolution/governance.d.ts +3 -1
  9. package/src/ai/evolution/index.d.ts +3 -0
  10. package/src/ai/evolution/learning-event.d.ts +2 -0
  11. package/src/ai/evolution/persistence.d.ts +82 -0
  12. package/src/ai/evolution/provider.d.ts +4 -0
  13. package/src/ai/evolution/release.d.ts +2 -0
  14. package/src/ai/evolution/strategy.d.ts +62 -0
  15. package/src/ai/evolution/target.d.ts +8 -5
  16. package/src/ai/index.d.ts +11 -0
  17. package/src/ai/knowledge-chunking.model.d.ts +59 -0
  18. package/src/ai/knowledge-deletion.model.d.ts +25 -0
  19. package/src/ai/knowledge-doc-chunk.model.d.ts +23 -0
  20. package/src/ai/knowledge-doc.model.d.ts +61 -0
  21. package/src/ai/knowledge-filter.model.d.ts +3 -1
  22. package/src/ai/knowledge-graph.model.d.ts +22 -0
  23. package/src/ai/knowledge-identity.model.d.ts +42 -0
  24. package/src/ai/knowledge-parser-selection.d.ts +7 -0
  25. package/src/ai/knowledge-parser.model.d.ts +18 -0
  26. package/src/ai/knowledge-pipeline.d.ts +15 -0
  27. package/src/ai/knowledge-question.model.d.ts +26 -0
  28. package/src/ai/knowledge-table.model.d.ts +72 -0
  29. package/src/ai/knowledge-tag.model.d.ts +32 -0
  30. package/src/ai/knowledge-wiki-identity.model.d.ts +11 -0
  31. package/src/ai/knowledge-wiki-organization.model.d.ts +110 -0
  32. package/src/ai/knowledge-wiki.model.d.ts +202 -0
  33. package/src/ai/knowledgebase-task.model.d.ts +2 -0
  34. package/src/ai/knowledgebase.model.d.ts +65 -3
  35. package/src/ai/mcp-capability.model.d.ts +7 -0
  36. package/src/ai/mcp-publication.model.d.ts +9 -2
  37. package/src/ai/middleware.model.d.ts +2 -0
  38. package/src/ai/xpert-agent-execution.model.d.ts +1 -1
  39. package/src/ai/xpert-template.model.d.ts +20 -0
  40. package/src/ai/xpert.model.d.ts +5 -2
  41. package/src/tag-entity.model.d.ts +22 -0
  42. package/src/view-extension/model.d.ts +20 -0
@@ -0,0 +1,202 @@
1
+ import type { IDocChunkMetadata } from './knowledge-doc-chunk.model';
2
+ export declare const KNOWLEDGE_WIKI_SCHEMA_VERSION = 1;
3
+ export type KnowledgeWikiExtractionGranularity = 'focused' | 'standard' | 'exhaustive';
4
+ export type KnowledgebaseWikiConfig = {
5
+ enabled: boolean;
6
+ extractionGranularity: KnowledgeWikiExtractionGranularity;
7
+ contentGenerationRequirements?: string;
8
+ extractionFocus?: string;
9
+ };
10
+ export type ResolvedKnowledgebaseWikiConfig = KnowledgebaseWikiConfig & {
11
+ contentGenerationRequirements: string;
12
+ extractionFocus: string;
13
+ };
14
+ export declare const KNOWLEDGE_WIKI_MAX_CUSTOM_INSTRUCTION_LENGTH = 4000;
15
+ export declare const DEFAULT_KNOWLEDGEBASE_WIKI_CONFIG: {
16
+ readonly enabled: false;
17
+ readonly extractionGranularity: "standard";
18
+ readonly contentGenerationRequirements: "";
19
+ readonly extractionFocus: "";
20
+ };
21
+ export declare function normalizeKnowledgebaseWikiConfig(config?: Partial<KnowledgebaseWikiConfig> | null): ResolvedKnowledgebaseWikiConfig;
22
+ export type KnowledgeWikiStatus = 'disabled' | 'indexing' | 'ready' | 'failed' | 'rebuild_required';
23
+ export type KnowledgeWikiAvailability = 'unavailable' | 'ready' | 'degraded';
24
+ export type KnowledgeWikiPageType = 'summary' | 'entity' | 'concept' | 'index';
25
+ export type KnowledgeWikiMappedPageType = Exclude<KnowledgeWikiPageType, 'index'>;
26
+ export type KnowledgeWikiPageStatus = 'building' | 'ready' | 'stale' | 'failed' | 'archived';
27
+ export type KnowledgeWikiProjectionStatus = 'pending' | 'ready' | 'failed' | 'disabled';
28
+ export type KnowledgeWikiJobType = 'classify' | 'source_map' | 'identity_resolve' | 'page_reduce' | 'retract' | 'rebuild' | 'finalize';
29
+ export type KnowledgeWikiJobStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'stale' | 'cancelled';
30
+ export type KnowledgeWikiInvocationStatus = 'prepared' | 'running' | 'reconciling' | 'succeeded' | 'failed' | 'indeterminate';
31
+ export type KnowledgeWikiRecoveryAction = {
32
+ jobId: string;
33
+ invocationId: string;
34
+ reconciliationStatus: 'not_available' | 'pending' | 'recovered' | 'not_executed' | 'indeterminate';
35
+ failureReason?: 'preparation_failed' | 'request_rejected';
36
+ canRetry: boolean;
37
+ requiresAdditionalChargeConfirmation: boolean;
38
+ inputCurrent: boolean;
39
+ recommendedAction: 'wait' | 'retry_job' | 'full_rebuild';
40
+ };
41
+ export type KnowledgeWikiReaderStatus = {
42
+ canManage: false;
43
+ enabled: boolean;
44
+ status: KnowledgeWikiStatus;
45
+ availability: KnowledgeWikiAvailability;
46
+ readyPageCount: number;
47
+ requiresManagement: boolean;
48
+ errorCode?: string | null;
49
+ };
50
+ export type KnowledgeWikiJobCounts = {
51
+ queued: number;
52
+ running: number;
53
+ failed: number;
54
+ };
55
+ export type KnowledgeWikiPageCounts = {
56
+ ready: number;
57
+ stale: number;
58
+ failed: number;
59
+ archived: number;
60
+ projectionFailed: number;
61
+ };
62
+ export type KnowledgeWikiManagementStatus = Omit<KnowledgeWikiReaderStatus, 'canManage'> & {
63
+ canManage: true;
64
+ activeRevision?: number | null;
65
+ stagedRevision?: number | null;
66
+ activeConfigFingerprint?: string | null;
67
+ targetConfigFingerprint?: string | null;
68
+ rebuildRequiredReason?: 'generator_upgrade' | null;
69
+ generationJobs: KnowledgeWikiJobCounts;
70
+ pages: KnowledgeWikiPageCounts;
71
+ indeterminateInvocationCount: number;
72
+ billingRecoveryCount: number;
73
+ cleanupPendingCount: number;
74
+ cleanupFailedCount: number;
75
+ recoveryActions: KnowledgeWikiRecoveryAction[];
76
+ };
77
+ export type KnowledgeWikiStatusResponse = KnowledgeWikiReaderStatus | KnowledgeWikiManagementStatus;
78
+ export declare const KNOWLEDGE_WIKI_DOCUMENT_STATUS_BATCH_SIZE = 100;
79
+ export type KnowledgeWikiDocumentStatusResponse = {
80
+ /** Sources of currently published, usable Wiki pages, not merely completed parsing jobs. */
81
+ indexedDocumentIds: string[];
82
+ documents?: KnowledgeWikiDocumentProgress[];
83
+ };
84
+ export type KnowledgeWikiDocumentProgressState = 'not_started' | 'queued' | 'generating' | 'indexing' | 'publishing' | 'ready' | 'failed' | 'outdated' | 'no_content';
85
+ export type KnowledgeWikiDocumentStageState = 'pending' | 'running' | 'complete' | 'failed' | 'skipped';
86
+ export type KnowledgeWikiDocumentProgress = {
87
+ documentId: string;
88
+ state: KnowledgeWikiDocumentProgressState;
89
+ stages: {
90
+ generation: KnowledgeWikiDocumentStageState;
91
+ indexing: KnowledgeWikiDocumentStageState;
92
+ publication: KnowledgeWikiDocumentStageState;
93
+ };
94
+ /** A full rebuild publishes as a batch; another source can block publication. */
95
+ waitingForBatch?: boolean;
96
+ error?: string;
97
+ errorCode?: string;
98
+ retry?: {
99
+ jobId: string;
100
+ requiresAdditionalChargeConfirmation: boolean;
101
+ };
102
+ canView: boolean;
103
+ };
104
+ export type KnowledgeWikiPageContributionPayload = {
105
+ schemaVersion: typeof KNOWLEDGE_WIKI_SCHEMA_VERSION;
106
+ pageType: KnowledgeWikiMappedPageType;
107
+ canonicalName: string;
108
+ aliases: string[];
109
+ summary: string;
110
+ facts: Array<{
111
+ text: string;
112
+ sourceChunkIds: string[];
113
+ }>;
114
+ suggestedLinks: Array<{
115
+ targetType: KnowledgeWikiPageType;
116
+ targetCanonicalName: string;
117
+ label?: string;
118
+ }>;
119
+ };
120
+ /** One source's contributions after identity resolution. Aggregate counts may exceed Map output limits. */
121
+ export type KnowledgeWikiPageSourcePayload = KnowledgeWikiPageContributionPayload;
122
+ export declare const KNOWLEDGE_WIKI_MAX_ALIASES = 20;
123
+ export declare const KNOWLEDGE_WIKI_MAX_FACTS = 100;
124
+ export declare const KNOWLEDGE_WIKI_MAX_SUGGESTED_LINKS = 50;
125
+ export declare const KNOWLEDGE_WIKI_MAX_SOURCE_CHUNKS_PER_FACT = 50;
126
+ export declare const KNOWLEDGE_WIKI_MAX_CANONICAL_NAME_LENGTH = 512;
127
+ export declare const KNOWLEDGE_WIKI_MAX_SUMMARY_LENGTH = 8000;
128
+ export declare const KNOWLEDGE_WIKI_MAX_FACT_LENGTH = 4000;
129
+ export declare function isKnowledgeWikiPageContributionPayload(value: unknown): value is KnowledgeWikiPageContributionPayload;
130
+ export declare function isKnowledgeWikiPageSourcePayload(value: unknown): value is KnowledgeWikiPageSourcePayload;
131
+ export type KnowledgeWikiPageGroup = 'knowledge' | 'summary';
132
+ export type KnowledgeWikiPageListParams = {
133
+ pageGroup?: KnowledgeWikiPageGroup;
134
+ folderId?: string;
135
+ unclassified?: boolean;
136
+ search?: string;
137
+ pageType?: KnowledgeWikiPageType;
138
+ status?: KnowledgeWikiPageStatus;
139
+ skip?: number;
140
+ take?: number;
141
+ };
142
+ export type KnowledgeWikiPageListItem = {
143
+ identityId?: string | null;
144
+ placement?: import('./knowledge-wiki-organization.model').KnowledgeWikiPlacement;
145
+ id: string;
146
+ pageKey: string;
147
+ pageType: KnowledgeWikiPageType;
148
+ canonicalName: string;
149
+ title: string;
150
+ slug: string;
151
+ summary: string;
152
+ aliases: string[];
153
+ status: KnowledgeWikiPageStatus;
154
+ projectionStatus: KnowledgeWikiProjectionStatus;
155
+ updatedAt?: Date;
156
+ };
157
+ export type KnowledgeWikiPageListResult = {
158
+ items: KnowledgeWikiPageListItem[];
159
+ total: number;
160
+ };
161
+ export type KnowledgeWikiPageEvidence = {
162
+ id: string;
163
+ sourceDocumentId: string;
164
+ sourceChunkId: string;
165
+ quote: string;
166
+ ordinal: number;
167
+ sectionAnchor?: string | null;
168
+ sourceAvailable: boolean;
169
+ };
170
+ export type KnowledgeWikiPageLink = {
171
+ pageId: string;
172
+ pageType: KnowledgeWikiPageType;
173
+ title: string;
174
+ slug: string;
175
+ sectionAnchor?: string | null;
176
+ label?: string | null;
177
+ };
178
+ export type KnowledgeWikiPageDetail = KnowledgeWikiPageListItem & {
179
+ markdown: string;
180
+ revision: number;
181
+ links: KnowledgeWikiPageLink[];
182
+ backlinks: KnowledgeWikiPageLink[];
183
+ evidence: KnowledgeWikiPageEvidence[];
184
+ };
185
+ export interface IKnowledgeWikiChunkMetadata extends IDocChunkMetadata {
186
+ contentKind: 'wiki';
187
+ wikiPageId: string;
188
+ wikiPageVersionId: string;
189
+ wikiPageKey: string;
190
+ wikiPageType: KnowledgeWikiPageType;
191
+ wikiRevision: number;
192
+ sectionAnchor: string;
193
+ projectionStatus: KnowledgeWikiProjectionStatus;
194
+ }
195
+ export declare function isKnowledgeWikiChunkMetadata(value: unknown): value is IKnowledgeWikiChunkMetadata;
196
+ export declare const KNOWLEDGE_WIKI_DEFAULT_PAGE_SIZE = 50;
197
+ export declare const KNOWLEDGE_WIKI_MAX_PAGE_SIZE = 100;
198
+ export declare const KNOWLEDGE_WIKI_MAX_SEARCH_LENGTH = 200;
199
+ export declare const KNOWLEDGE_WIKI_FAILED_CONTENT_RETENTION_DAYS = 7;
200
+ export declare const KNOWLEDGE_WIKI_OPERATION_RETENTION_DAYS = 30;
201
+ export declare const KNOWLEDGE_WIKI_DELETION_RECEIPT_RETENTION_DAYS = 90;
202
+ export declare const KNOWLEDGE_WIKI_STALE_VECTOR_CLEANUP_SLO_HOURS = 24;
@@ -24,6 +24,8 @@ export interface IKnowledgebaseTask extends IBasePerTenantAndOrganizationEntityM
24
24
  documents?: Partial<IKnowledgeDocument>[];
25
25
  /** Propagates full conversion vs. snapshot-only rechunking through the background task. */
26
26
  processingMode?: KnowledgeDocumentProcessingMode;
27
+ /** Server-created preview ID -> saved document ID bindings, grouped by source node. */
28
+ materializedSources?: Record<string, Record<string, string>>;
27
29
  };
28
30
  /**
29
31
  * Many to Many of documents in task
@@ -1,11 +1,16 @@
1
+ import type { KnowledgeAutomaticTaggingConfig } from './knowledge-tag.model';
2
+ import type { KnowledgeChunkLanguageHint } from './knowledge-chunking.model';
3
+ import type { KnowledgeQuestionGenerationConfig } from './knowledge-question.model';
4
+ import type { TKBRetrievalSettings } from './xpert.model';
1
5
  import { ICopilotModel } from './copilot-model.model';
2
6
  import { I18nObject, TAvatar } from '../types';
3
7
  import { IBasePerWorkspaceEntityModel } from './xpert-workspace.model';
4
- import { IKnowledgeDocument } from './knowledge-doc.model';
8
+ import { IKnowledgeDocument, type DocumentSpreadsheetParserConfig } from './knowledge-doc.model';
5
9
  import { IXpert } from './xpert.model';
6
10
  import { IIntegration } from '../integration.model';
7
11
  import { IDocChunkMetadata } from './knowledge-doc-chunk.model';
8
12
  import type { GraphRagConfig, KnowledgeGraphStatus } from './knowledge-graph.model';
13
+ import type { KnowledgebaseWikiConfig, KnowledgeWikiStatus, KnowledgeWikiAvailability } from './knowledge-wiki.model';
9
14
  /**
10
15
  * Non-internal types should remain the same as IntegrationEnum.
11
16
  */
@@ -36,6 +41,8 @@ export declare const DEFAULT_KNOWLEDGEBASE_FAQ_CONFIG: {
36
41
  readonly negativeMatchMode: "exact";
37
42
  };
38
43
  export type KnowledgeRetrievalMode = 'vector' | 'keyword' | 'graph' | 'hybrid';
44
+ /** Request-local content selection, independent of algorithms and persisted recall settings. */
45
+ export type KnowledgeRetrievalContentScope = 'all' | 'original' | 'wiki';
39
46
  export declare enum KnowledgebaseStatusEnum {
40
47
  READY = "ready",
41
48
  REBUILD_REQUIRED = "rebuild_required",
@@ -47,12 +54,42 @@ export declare enum KnowledgeStructureEnum {
47
54
  ParentChild = "parent-child",
48
55
  QA = "qa"
49
56
  }
57
+ export type KnowledgeParserSelection = {
58
+ transformerType: string;
59
+ transformerIntegration?: string;
60
+ transformer?: {
61
+ [key: string]: unknown;
62
+ };
63
+ };
50
64
  export type KnowledgebaseParserConfig = {
65
+ /** Canonical extension -> parser. Null explicitly restores system defaults, including legacy PDF settings. */
66
+ parsers?: {
67
+ [format: string]: KnowledgeParserSelection | null;
68
+ };
69
+ spreadsheet?: Pick<DocumentSpreadsheetParserConfig, 'firstRowAsHeader'>;
70
+ tableMetadataRequirements?: string;
71
+ /** Additional cl100k_base token cap for text retrieval chunks; 0 disables it. Context parents are retained. */
72
+ maxChunkTokens?: number;
73
+ /** Public natural-language boundary hint; absence means auto. */
74
+ chunkLanguageHint?: KnowledgeChunkLanguageHint;
75
+ questionGeneration?: KnowledgeQuestionGenerationConfig;
51
76
  pages?: number[][];
52
77
  embeddingBatchSize?: number;
53
78
  chunkSize: number | null;
54
79
  chunkOverlap: number | null;
55
80
  delimiter: string | null;
81
+ /** Legacy PDF selection; parsers.pdf takes precedence when present. */
82
+ pdfParser?: KnowledgeParserSelection;
83
+ textSplitterType?: string;
84
+ textSplitter?: {
85
+ [key: string]: unknown;
86
+ };
87
+ separators?: string[];
88
+ imageUnderstandingEnabled?: boolean;
89
+ imageUnderstandingType?: string;
90
+ imageUnderstanding?: {
91
+ [key: string]: unknown;
92
+ };
56
93
  };
57
94
  /**
58
95
  * Type of rag knowledgebase
@@ -70,6 +107,19 @@ export type TKnowledgebase = {
70
107
  * Creation-time indexing behavior for FAQ knowledge bases.
71
108
  */
72
109
  faqConfig?: KnowledgebaseFAQConfig | null;
110
+ /** Optional generated Wiki capability for Standard knowledgebases. */
111
+ wikiConfig?: KnowledgebaseWikiConfig | null;
112
+ wikiStatus?: KnowledgeWikiStatus | null;
113
+ wikiAvailability?: KnowledgeWikiAvailability | null;
114
+ wikiRevision?: number | null;
115
+ wikiActiveRevision?: number | null;
116
+ wikiStagedRevision?: number | null;
117
+ wikiBuildError?: string | null;
118
+ wikiRebuildRequiredReason?: 'generator_upgrade' | null;
119
+ wikiGeneratorVersion?: string | null;
120
+ wikiConfigFingerprint?: string | null;
121
+ canManageWiki?: boolean;
122
+ canManageDocumentDeletions?: boolean;
73
123
  /**
74
124
  * English | Chinese
75
125
  */
@@ -87,6 +137,7 @@ export type TKnowledgebase = {
87
137
  * These are machine-readable identifiers, not user-facing search tags.
88
138
  */
89
139
  applicationTags?: string[];
140
+ automaticTagging?: KnowledgeAutomaticTaggingConfig | null;
90
141
  /**
91
142
  * Public in tenant or in organization or private
92
143
  * @default private
@@ -102,6 +153,9 @@ export type TKnowledgebase = {
102
153
  */
103
154
  chatModel?: ICopilotModel | null;
104
155
  chatModelId?: string | null;
156
+ /** Optional dedicated LLM for Wiki generation. Falls back to chatModel when unset. */
157
+ wikiModel?: ICopilotModel | null;
158
+ wikiModelId?: string | null;
105
159
  embeddingCollectionName?: string | null;
106
160
  embeddingModelFingerprint?: string | null;
107
161
  embeddingDimensions?: number | null;
@@ -193,6 +247,8 @@ export declare enum KnowledgebasePermission {
193
247
  * Recall parameters
194
248
  */
195
249
  export type TKBRecallParams = {
250
+ /** Default content selection, used only when Wiki is enabled. */
251
+ contentScope?: KnowledgeRetrievalContentScope;
196
252
  /**
197
253
  * Default retrieval mode for this knowledgebase.
198
254
  */
@@ -202,9 +258,13 @@ export type TKBRecallParams = {
202
258
  */
203
259
  topK?: number;
204
260
  /**
205
- * At least the similarity threshold
261
+ * Minimum vector similarity. Null disables the threshold.
206
262
  */
207
- score?: number;
263
+ score?: number | null;
264
+ /**
265
+ * Minimum relevance score returned by the rerank model. Null disables the threshold.
266
+ */
267
+ rerankThreshold?: number | null;
208
268
  /**
209
269
  * Weight in EnsembleRetriever
210
270
  */
@@ -280,3 +340,5 @@ export declare const KNOWLEDGE_PROCESSING_MODE_NAME = "processing_mode";
280
340
  export declare const KNOWLEDGE_DOCUMENTS_NAME = "documents";
281
341
  export declare const KNOWLEDGE_FOLDER_ID_NAME = "folder_id";
282
342
  export declare const KNOWLEDGE_STAGE_NAME = "stage";
343
+ /** Check the sources that can execute within the selected content scope. */
344
+ export declare function hasEnabledKnowledgeRetrievalSource(retrieval: Partial<IKnowledgebase & TKBRetrievalSettings> | null | undefined, allowGraphRetrieval?: boolean, contentScope?: KnowledgeRetrievalContentScope): boolean;
@@ -1,3 +1,4 @@
1
+ import type { McpCapabilityApprovalMode } from './mcp-publication.model';
1
2
  import type { JSONValue } from '../core.model';
2
3
  export declare const MCP_CAPABILITY_DESCRIPTOR_VERSION: 1;
3
4
  export declare const MCP_CAPABILITY_TYPES: readonly ["tool", "resource", "resource_template", "prompt", "app"];
@@ -54,6 +55,8 @@ export interface McpToolCapabilityDescriptor extends McpCapabilityDescriptorBase
54
55
  inputSchema: McpJsonSchema;
55
56
  outputSchema?: McpJsonSchema;
56
57
  behavior: McpToolBehavior;
58
+ /** Plugin default used when a Publication has no explicit approval override. */
59
+ defaultApprovalMode?: McpCapabilityApprovalMode;
57
60
  annotations?: McpToolAnnotations;
58
61
  appResourceKey?: string;
59
62
  taskMode?: 'optional' | 'required';
@@ -99,4 +102,8 @@ type McpCapabilityDeclarationOf<TDescriptor extends McpCapabilityDescriptor> = T
99
102
  } : never;
100
103
  /** Plugin-side declaration before the host binds it to a concrete toolset instance. */
101
104
  export type McpCapabilityDeclaration = McpCapabilityDeclarationOf<McpCapabilityDescriptor>;
105
+ /** Resolve the declaration default; callers must apply explicit Publication policy first. */
106
+ export declare function defaultMcpToolApprovalMode(descriptor: Pick<McpToolCapabilityDescriptor, 'behavior' | 'defaultApprovalMode'>): McpCapabilityApprovalMode;
107
+ /** Dangerous tools may run directly only when their owner explicitly declares that policy. */
108
+ export declare function canAllowMcpToolDirectly(descriptor: Pick<McpToolCapabilityDescriptor, 'behavior' | 'defaultApprovalMode'>): boolean;
102
109
  export {};
@@ -4,8 +4,8 @@ import type { McpApiKeySubjectType } from './mcp-auth.model';
4
4
  import type { McpCapabilityDescriptor, McpCapabilityType } from './mcp-capability.model';
5
5
  export declare const MCP_PROTOCOL_VERSION: "2026-07-28";
6
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"];
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"];
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"];
@@ -22,12 +22,19 @@ export interface McpCapabilityPolicy {
22
22
  windowSeconds: number;
23
23
  };
24
24
  }
25
+ /** Host-owned execution configuration. Tool arguments cannot override these bindings. */
26
+ export interface McpPublicationRuntimeConfiguration {
27
+ files?: {
28
+ type: 'user';
29
+ };
30
+ }
25
31
  export interface IMcpPublication extends IBasePerTenantAndOrganizationEntityModel {
26
32
  name: string;
27
33
  slug: string;
28
34
  status: McpPublicationStatus;
29
35
  authMethods: McpAuthMethod[];
30
36
  instructions?: string | null;
37
+ runtime?: McpPublicationRuntimeConfiguration | null;
31
38
  protocolVersion: typeof MCP_PROTOCOL_VERSION;
32
39
  reviewStatus: McpPublicationReviewStatus;
33
40
  reviewReason?: string | null;
@@ -31,6 +31,8 @@ export type TAgentMiddlewareMeta = {
31
31
  description?: I18nObject;
32
32
  configSchema?: JsonSchemaObjectType;
33
33
  features?: Array<TXpertFeatureKey | string>;
34
+ /** Optional display labels keyed by declared Feature identifier; never grants capabilities. */
35
+ featureLabels?: Record<string, I18nObject>;
34
36
  slashCommands?: SkillSlashCommand[];
35
37
  builtin?: boolean;
36
38
  /**
@@ -104,7 +104,7 @@ export type TAgentExecutionMetadata = {
104
104
  * AI Model
105
105
  */
106
106
  model?: string;
107
- /** Opaque Assistant model option used by the Primary Agent. */
107
+ /** Opaque Assistant model option used by the base and Primary models. */
108
108
  primaryModelId?: string;
109
109
  primaryModelSource?: import('./assistant-model.model').TAssistantPrimaryModelSelectionSource;
110
110
  /** Sanitized model snapshot used to keep resume and retry deterministic. */
@@ -94,6 +94,11 @@ export type TTemplate = {
94
94
  startPrompts?: string[];
95
95
  promptWorkflows?: TPromptWorkflow[];
96
96
  releaseNotes?: string;
97
+ availableLocales?: string[];
98
+ defaultLocale?: string;
99
+ locale?: string;
100
+ pluginVersion?: string;
101
+ contentHash?: string;
97
102
  xpertName?: string;
98
103
  dependencies?: XpertTemplatePluginDependencies;
99
104
  /** Trusted plugin App explicitly linked to this Assistant template. */
@@ -104,6 +109,21 @@ export type TXpertTemplate = TTemplate & {
104
109
  type: XpertTypeEnum | 'project';
105
110
  copilotModel?: Partial<TCopilotModel>;
106
111
  };
112
+ export type TXpertTemplateSummary = Omit<TXpertTemplate, 'export_data'>;
113
+ export interface TXpertTemplateCatalogQuery {
114
+ search?: string;
115
+ category?: string;
116
+ pluginName?: string;
117
+ offset?: number;
118
+ limit?: number;
119
+ }
120
+ export interface TXpertTemplateCatalogPage {
121
+ items: TXpertTemplateSummary[];
122
+ total: number;
123
+ offset: number;
124
+ limit: number;
125
+ categories: string[];
126
+ }
107
127
  export interface IXpertMCPTemplate extends TTemplate {
108
128
  /**
109
129
  * string is the backward compatible image file URL format
@@ -278,6 +278,9 @@ export type TXpertTemplateSource = {
278
278
  installedAt?: string;
279
279
  lastSyncedAt?: string;
280
280
  releaseNotes?: string;
281
+ locale?: string;
282
+ pluginVersion?: string;
283
+ contentHash?: string;
281
284
  };
282
285
  export type TXpertTemplateSyncResult = {
283
286
  xpertId: string;
@@ -643,9 +646,9 @@ export type TChatOptions = {
643
646
  * Per-request runtime context forwarded to agent middleware/tools.
644
647
  */
645
648
  context?: Record<string, unknown>;
646
- /** Resolved runtime override for the Assistant Primary Agent only. */
649
+ /** Resolved Primary model; explicit and preference selections also supply Assistant base inheritance. */
647
650
  primaryCopilotModel?: TCopilotModel;
648
- /** Opaque Assistant model option id recorded for audit and retry. */
651
+ /** Trusted Assistant model selection, also recorded for audit and retry. */
649
652
  primaryModelId?: string;
650
653
  /** Published Primary Agent key to which the override is restricted. */
651
654
  primaryAgentKey?: string;
@@ -8,6 +8,27 @@ export interface ITag extends IBasePerTenantAndOrganizationEntityModel {
8
8
  color?: string;
9
9
  isSelected?: boolean;
10
10
  icon?: string;
11
+ targets?: TagTarget[];
12
+ isActive?: boolean;
13
+ isSystem?: boolean;
14
+ }
15
+ export type TagTarget = TagCategoryEnum | 'knowledgebase' | 'people' | 'integration';
16
+ export declare function getTagTargets(tag: ITag): TagTarget[];
17
+ export interface ITagUsage {
18
+ target: TagTarget;
19
+ count: number;
20
+ }
21
+ export interface ITagDirectoryItem extends ITag {
22
+ editable: boolean;
23
+ usage: ITagUsage[];
24
+ }
25
+ /** A visible expert version associated with a tag; excludes private expert configuration. */
26
+ export interface ITagXpertUsage {
27
+ id: string;
28
+ name: string;
29
+ version: string | null;
30
+ latest: boolean;
31
+ deleted: boolean;
11
32
  }
12
33
  export interface ITagName {
13
34
  name?: string;
@@ -18,3 +39,4 @@ export declare enum TagCategoryEnum {
18
39
  TOOLSET = "toolset",
19
40
  XPERT = "xpert"
20
41
  }
42
+ export declare const TAG_TARGETS: TagTarget[];
@@ -561,3 +561,23 @@ export interface XpertViewActionResult<TData = unknown> {
561
561
  data?: TData;
562
562
  refresh?: boolean;
563
563
  }
564
+ /** Append text selections to the current draft without sending or replacing it. */
565
+ export declare const ASSISTANT_COMPOSER_APPEND_REFERENCES_COMMAND = "assistant.composer.append_references";
566
+ export type AssistantComposerReference = {
567
+ id?: string;
568
+ label?: string;
569
+ text: string;
570
+ } & ({
571
+ type: 'code';
572
+ path: string;
573
+ startLine: number;
574
+ endLine: number;
575
+ language?: string;
576
+ } | {
577
+ type: 'quote';
578
+ source?: string;
579
+ messageId?: string;
580
+ });
581
+ export type AssistantComposerAppendReferencesPayload = {
582
+ references: AssistantComposerReference[];
583
+ };