@xpert-ai/contracts 3.26.1 → 3.27.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 +174 -92
- package/index.esm.js +165 -93
- package/package.json +2 -2
- package/src/agent-plugin.d.ts +2 -0
- package/src/ai/chat-recovery.model.d.ts +32 -0
- package/src/ai/chat.model.d.ts +4 -0
- package/src/ai/index.d.ts +2 -0
- package/src/ai/project-pipeline/commands.schema.d.ts +112 -0
- package/src/ai/project-pipeline/configuration-form.d.ts +376 -0
- package/src/ai/project-pipeline/configuration.schema.d.ts +96 -0
- package/src/ai/project-pipeline/contribution.schema.d.ts +128 -0
- package/src/ai/project-pipeline/definition.schema.d.ts +112 -0
- package/src/ai/project-pipeline/index.d.ts +1 -0
- package/src/ai/project-pipeline/project-types.d.ts +23 -0
- package/src/ai/project-pipeline/projection.schema.d.ts +96 -0
- package/src/ai/run-display-snapshot.model.d.ts +24 -0
- package/src/ai/xpert-agent-execution.model.d.ts +2 -0
- package/src/ai/xpert-project-type.model.d.ts +2 -0
- package/src/ai/xpert-template.model.d.ts +2 -0
- package/src/ai/xpert-workspace.model.d.ts +1 -0
- package/src/ai/xpert.model.d.ts +4 -0
- package/src/artifact.model.d.ts +3 -0
- package/src/content-document.model.d.ts +140 -0
- package/src/content-reference.model.d.ts +19 -0
- package/src/data-retention.model.d.ts +24 -0
- package/src/index.d.ts +4 -1
- package/src/plugin-application.d.ts +16 -7
- package/src/runtime-control.d.ts +18 -1
- package/src/view-extension/model.d.ts +10 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/** A file-backed editor resource has one identity across paths, Assistants and Views. */
|
|
2
|
+
export interface ContentDocumentDescriptor {
|
|
3
|
+
id: string;
|
|
4
|
+
resourceRef: {
|
|
5
|
+
providerKey: 'platform.project.file';
|
|
6
|
+
resourceId: string;
|
|
7
|
+
};
|
|
8
|
+
projectId: string;
|
|
9
|
+
path: string;
|
|
10
|
+
title: string;
|
|
11
|
+
modelKey: string;
|
|
12
|
+
schemaVersion: number;
|
|
13
|
+
epoch: number;
|
|
14
|
+
headRevisionId: string;
|
|
15
|
+
fileHash: string;
|
|
16
|
+
sequence: number;
|
|
17
|
+
status: 'ready' | 'pending' | 'conflict' | 'failed' | 'deleted' | 'moving';
|
|
18
|
+
}
|
|
19
|
+
export interface ContentDocumentBlock {
|
|
20
|
+
id: string;
|
|
21
|
+
type: string;
|
|
22
|
+
text: string;
|
|
23
|
+
}
|
|
24
|
+
/** Logical page hierarchy is independent of Project file folders and never grants access. */
|
|
25
|
+
export interface ContentPageEntry {
|
|
26
|
+
resourceId: string;
|
|
27
|
+
title: string;
|
|
28
|
+
path: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ContentPageHierarchy {
|
|
31
|
+
supported: boolean;
|
|
32
|
+
canCreate: boolean;
|
|
33
|
+
parent: ContentPageEntry | null;
|
|
34
|
+
children: ContentPageEntry[];
|
|
35
|
+
hasMore: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface ContentDocumentSelection {
|
|
38
|
+
type: 'text';
|
|
39
|
+
resourceId: string;
|
|
40
|
+
epoch: number;
|
|
41
|
+
sequence: number;
|
|
42
|
+
blockId: string;
|
|
43
|
+
text: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ContentDocumentRevision {
|
|
46
|
+
id: string;
|
|
47
|
+
resourceId: string;
|
|
48
|
+
parentId: string | null;
|
|
49
|
+
hash: string;
|
|
50
|
+
sequence: number;
|
|
51
|
+
epoch: number;
|
|
52
|
+
label: string;
|
|
53
|
+
createdAt: string;
|
|
54
|
+
createdById: string;
|
|
55
|
+
}
|
|
56
|
+
export interface ContentDocumentProposal {
|
|
57
|
+
id: string;
|
|
58
|
+
resourceId: string;
|
|
59
|
+
mutationId: string;
|
|
60
|
+
epoch: number;
|
|
61
|
+
sequence: number;
|
|
62
|
+
blockId: string;
|
|
63
|
+
before: string;
|
|
64
|
+
after: string;
|
|
65
|
+
status: 'pending' | 'accepted' | 'rejected' | 'stale';
|
|
66
|
+
createdById: string;
|
|
67
|
+
assistantId: string | null;
|
|
68
|
+
}
|
|
69
|
+
export interface ContentDocumentComment {
|
|
70
|
+
id: string;
|
|
71
|
+
resourceId: string;
|
|
72
|
+
blockId: string | null;
|
|
73
|
+
epoch: number;
|
|
74
|
+
body: string;
|
|
75
|
+
resolved: boolean;
|
|
76
|
+
createdById: string;
|
|
77
|
+
createdAt: string;
|
|
78
|
+
}
|
|
79
|
+
/** Discovery/navigation metadata is independent of an editor's document model. */
|
|
80
|
+
export interface ContentEditorMetadata {
|
|
81
|
+
key: string;
|
|
82
|
+
protocolVersion: 2;
|
|
83
|
+
title: string;
|
|
84
|
+
formatId: string;
|
|
85
|
+
mimeType: string;
|
|
86
|
+
extension: string;
|
|
87
|
+
view: {
|
|
88
|
+
providerKey: string;
|
|
89
|
+
viewKey: string;
|
|
90
|
+
entry: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export interface TextContentEditorRegistration extends ContentEditorMetadata {
|
|
94
|
+
kind: 'text-document';
|
|
95
|
+
schemaVersion: number;
|
|
96
|
+
concurrency: 'crdt';
|
|
97
|
+
engine: 'yjs';
|
|
98
|
+
}
|
|
99
|
+
export interface FileContentEditorRegistration extends ContentEditorMetadata {
|
|
100
|
+
kind: 'file';
|
|
101
|
+
concurrency: 'versioned';
|
|
102
|
+
}
|
|
103
|
+
export type ContentEditorRegistration = TextContentEditorRegistration | FileContentEditorRegistration;
|
|
104
|
+
/**
|
|
105
|
+
* Resolve an authorized resource to its registered editor, without opening UI.
|
|
106
|
+
* Send the returned navigation through workbench.navigation.open in the same
|
|
107
|
+
* Remote View bridge so the Workbench that contains the caller owns the tab.
|
|
108
|
+
*/
|
|
109
|
+
export declare const CONTENT_EDITOR_RESOLVE_COMMAND = "workbench.content.resolve";
|
|
110
|
+
/** Authorize a document and return its stable URL without changing navigation or clipboard. */
|
|
111
|
+
export declare const CONTENT_EDITOR_LINK_COMMAND = "workbench.content.link";
|
|
112
|
+
export interface ContentEditorLinkResult {
|
|
113
|
+
success: true;
|
|
114
|
+
url: string;
|
|
115
|
+
}
|
|
116
|
+
/** Explicit document-reference discriminator in share URLs; consumers must reauthorize the ID. */
|
|
117
|
+
export declare const CONTENT_DOCUMENT_LINK_RESOURCE_PARAM = "contentResource";
|
|
118
|
+
export declare const ASSISTANT_CONTENT_REVIEW_COMMAND = "assistant.content.review";
|
|
119
|
+
export declare const CONTENT_EDITOR_STATUS_COMMAND = "workbench.content.status";
|
|
120
|
+
export interface ContentEditorOpenRequest {
|
|
121
|
+
/** Omit for a platform text document; resource providers are reauthorized server-side. */
|
|
122
|
+
providerKey?: string;
|
|
123
|
+
resourceId: string;
|
|
124
|
+
}
|
|
125
|
+
export interface ContentEditorResolveResult {
|
|
126
|
+
success: true;
|
|
127
|
+
navigation: {
|
|
128
|
+
target: 'workbench.view';
|
|
129
|
+
viewKey: string;
|
|
130
|
+
selectionId: string;
|
|
131
|
+
parameters?: {
|
|
132
|
+
contentProvider: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
export interface ContentEditorStatus {
|
|
137
|
+
resourceId: string;
|
|
138
|
+
dirty: boolean;
|
|
139
|
+
label: string;
|
|
140
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Persistent identity only. Never serialize signed URLs or connector credentials into a document.
|
|
2
|
+
* Markdown representation: xpert-resource://v1/{kind}/{providerKey}/{resourceId}.
|
|
3
|
+
* Resolving a reference does not grant access; the source and containing project are checked again.
|
|
4
|
+
*/
|
|
5
|
+
export interface ContentReferenceTarget {
|
|
6
|
+
kind: 'image' | 'file' | 'page';
|
|
7
|
+
providerKey: string;
|
|
8
|
+
resourceId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ContentReferenceEntry extends ContentReferenceTarget {
|
|
11
|
+
title: string;
|
|
12
|
+
path: string;
|
|
13
|
+
mimeType: string;
|
|
14
|
+
size: number | null;
|
|
15
|
+
}
|
|
16
|
+
export interface ContentReferencePage {
|
|
17
|
+
items: ContentReferenceEntry[];
|
|
18
|
+
nextCursor: string | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type ManualRetentionTarget = 'copilot_checkpoint' | 'model_gateway_call';
|
|
2
|
+
export interface ManualRetentionRange {
|
|
3
|
+
target: ManualRetentionTarget;
|
|
4
|
+
/** Inclusive ISO timestamp. */
|
|
5
|
+
start: string;
|
|
6
|
+
/** Exclusive ISO timestamp. */
|
|
7
|
+
end: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ManualRetentionPreview extends ManualRetentionRange {
|
|
10
|
+
previewToken: string;
|
|
11
|
+
expiresAt: string;
|
|
12
|
+
scope: 'all_tenants';
|
|
13
|
+
matchedCount: number;
|
|
14
|
+
protectedCount: number;
|
|
15
|
+
eligibleCount: number;
|
|
16
|
+
selectedCount: number;
|
|
17
|
+
relatedWriteCount: number;
|
|
18
|
+
batchLimit: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ManualRetentionResult {
|
|
21
|
+
deletedCount: number;
|
|
22
|
+
deletedWriteCount: number;
|
|
23
|
+
skippedCount: number;
|
|
24
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -68,13 +68,16 @@ export * from './plain-object.model';
|
|
|
68
68
|
export * from './plugin';
|
|
69
69
|
export * from './view-extension';
|
|
70
70
|
export * from './runtime-control';
|
|
71
|
-
export type { RuntimeResourceKind, AgentPluginRole, RuntimeResourceCatalogPurpose, RuntimeResourceStatus, RuntimeResourceReference, TemplateAgentSource, RuntimeResourcesSelection, AgentPluginDiagnostic, RuntimeResourceCatalogItem, RuntimeResourceView, RuntimeResourceCatalog, AgentPluginXpertExtension, AgentPluginCommand, AgentPluginCommandPresentation, RuntimeResourceCommand, RuntimeResourceSkillReference, AgentPluginConnectorAuth, AgentPluginConnectorBinding, RuntimeResourceDefinition, RuntimeResourceBindingInput, WorkspaceAgentPlugin, WorkspaceAgentPluginOptions, WorkspaceAgentPluginAddInput, WorkspaceAgentPluginAddResult, InstalledAgentPlugin } from './agent-plugin';
|
|
71
|
+
export type { RuntimeResourceKind, AgentPluginRole, RuntimeResourceCatalogPurpose, RuntimeResourceStatus, RuntimeResourceReference, TemplateAgentSource, RuntimeResourcesSelection, AgentPluginDiagnostic, AgentPluginStorageErrorCode, RuntimeResourceCatalogItem, RuntimeResourceView, RuntimeResourceCatalog, AgentPluginXpertExtension, AgentPluginCommand, AgentPluginCommandPresentation, RuntimeResourceCommand, RuntimeResourceSkillReference, AgentPluginConnectorAuth, AgentPluginConnectorBinding, RuntimeResourceDefinition, RuntimeResourceBindingInput, WorkspaceAgentPlugin, WorkspaceAgentPluginOptions, WorkspaceAgentPluginAddInput, WorkspaceAgentPluginAddResult, InstalledAgentPlugin } from './agent-plugin';
|
|
72
72
|
export * from './desktop-shell.model';
|
|
73
73
|
export * from './ai/agent-output-delivery.model';
|
|
74
74
|
export * from './ai/execution-activity.model';
|
|
75
75
|
export * from './setup-plugins';
|
|
76
76
|
export * from './default-agent-plugins';
|
|
77
|
+
export * from './content-document.model';
|
|
78
|
+
export * from './content-reference.model';
|
|
77
79
|
export * from './agent-plugin-maintenance';
|
|
78
80
|
export * from './assistant-sharing.model';
|
|
79
81
|
export * from './artifact-presentation.model';
|
|
80
82
|
export * from './analytics-definition.model';
|
|
83
|
+
export * from './data-retention.model';
|
|
@@ -24,9 +24,8 @@ export declare const PLUGIN_APPLICATION_INSTALLATION_STATUS: {
|
|
|
24
24
|
/**
|
|
25
25
|
* Scope declared by a trusted plugin application contribution.
|
|
26
26
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* are implemented.
|
|
27
|
+
* Organization and personal installations remain inside the current organization.
|
|
28
|
+
* Tenant is reserved for discovery until a tenant initializer is implemented.
|
|
30
29
|
*/
|
|
31
30
|
export type PluginApplicationScope = (typeof PLUGIN_APPLICATION_SCOPE)[keyof typeof PLUGIN_APPLICATION_SCOPE];
|
|
32
31
|
export type PluginApplicationInstallationStatus = (typeof PLUGIN_APPLICATION_INSTALLATION_STATUS)[keyof typeof PLUGIN_APPLICATION_INSTALLATION_STATUS];
|
|
@@ -46,7 +45,8 @@ export interface PluginMarketplaceAppKnowledgebaseConfig {
|
|
|
46
45
|
key: string;
|
|
47
46
|
name: string | I18nObject;
|
|
48
47
|
description?: string | I18nObject;
|
|
49
|
-
|
|
48
|
+
/** Personal installations always create private knowledge bases. */
|
|
49
|
+
permission: 'organization' | 'private';
|
|
50
50
|
applicationTags?: string[];
|
|
51
51
|
graphRag?: {
|
|
52
52
|
enabled: boolean;
|
|
@@ -85,7 +85,8 @@ export interface PluginMarketplaceAppAssistantSuite {
|
|
|
85
85
|
* The host only executes this contract from a loaded plugin contribution.
|
|
86
86
|
*/
|
|
87
87
|
export interface PluginMarketplaceAppConfig {
|
|
88
|
-
scope
|
|
88
|
+
/** A single scope or ordered choices. The first choice is the backward-compatible default. */
|
|
89
|
+
scope: PluginApplicationScope | PluginApplicationScope[];
|
|
89
90
|
assistantTemplateKey: string;
|
|
90
91
|
assistantSuite?: PluginMarketplaceAppAssistantSuite;
|
|
91
92
|
workspace: {
|
|
@@ -136,7 +137,9 @@ export interface PluginTemplateApplicationSummary {
|
|
|
136
137
|
export interface IPluginApplicationInstallation extends IBasePerTenantAndOrganizationEntityModel {
|
|
137
138
|
pluginName: string;
|
|
138
139
|
appName: string;
|
|
140
|
+
/** Actual scope selected for this installation, independent of the App declaration. */
|
|
139
141
|
declaredScope: PluginApplicationScope;
|
|
142
|
+
ownerUserId?: string | null;
|
|
140
143
|
scopeKey: string;
|
|
141
144
|
status: PluginApplicationInstallationStatus;
|
|
142
145
|
pluginVersion?: string | null;
|
|
@@ -184,6 +187,7 @@ export interface PluginApplicationToolsetSelection {
|
|
|
184
187
|
/** Read model used by marketplace cards to render installation health and actions. */
|
|
185
188
|
export interface PluginApplicationStatusSummary {
|
|
186
189
|
appId: string;
|
|
190
|
+
installationScope?: PluginApplicationScope;
|
|
187
191
|
status: PluginApplicationInstallationStatus | 'not_installed';
|
|
188
192
|
initializationAccess?: 'allowed' | 'organization_required' | 'role_required' | 'unsupported';
|
|
189
193
|
installationId?: string;
|
|
@@ -244,10 +248,11 @@ export interface PluginApplicationDetail {
|
|
|
244
248
|
preflight: PluginApplicationPreflight;
|
|
245
249
|
}
|
|
246
250
|
/**
|
|
247
|
-
*
|
|
248
|
-
*
|
|
251
|
+
* Clients select a declared installation scope; identity and target resource IDs
|
|
252
|
+
* are derived exclusively from the authenticated request context.
|
|
249
253
|
*/
|
|
250
254
|
export interface PluginApplicationInitializeInput {
|
|
255
|
+
installationScope?: PluginApplicationScope;
|
|
251
256
|
pluginName: string;
|
|
252
257
|
appName: string;
|
|
253
258
|
embeddingModelId?: string;
|
|
@@ -258,6 +263,7 @@ export interface PluginApplicationInitializeInput {
|
|
|
258
263
|
}
|
|
259
264
|
/** Prepares or discards configuration in the current request scope; never accepts a Workspace ID. */
|
|
260
265
|
export interface PluginApplicationSetupInput {
|
|
266
|
+
installationScope?: PluginApplicationScope;
|
|
261
267
|
pluginName: string;
|
|
262
268
|
appName: string;
|
|
263
269
|
}
|
|
@@ -266,3 +272,6 @@ export interface PluginApplicationBindToolsetInput extends PluginApplicationSetu
|
|
|
266
272
|
key: string;
|
|
267
273
|
toolsetId: string;
|
|
268
274
|
}
|
|
275
|
+
/** Validate portable metadata without inferring a scope from names or presentation text. */
|
|
276
|
+
export declare function getPluginApplicationScopes(value: unknown): PluginApplicationScope[];
|
|
277
|
+
export declare function isPluginApplicationScope(value: unknown): value is PluginApplicationScope;
|
package/src/runtime-control.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface IRuntimeStreamInterruption {
|
|
|
5
5
|
code: 'RUNTIME_RESTARTING';
|
|
6
6
|
message: string;
|
|
7
7
|
}
|
|
8
|
+
/** Process-supervisor execution modes; neither implies Pod/deployment orchestration. */
|
|
8
9
|
export type RuntimeRestartMode = 'self-signal' | 'rolling-self-signal';
|
|
9
10
|
export type RuntimeRestartStatus = 'in_progress' | 'completed' | 'failed' | 'awaiting_restart';
|
|
10
11
|
export interface IRuntimePluginRequirement {
|
|
@@ -48,9 +49,11 @@ export interface IRuntimeRestartResponse {
|
|
|
48
49
|
export interface IRuntimeRestartStatus {
|
|
49
50
|
restartId: string;
|
|
50
51
|
mode: RuntimeRestartMode;
|
|
52
|
+
/** completed confirms target runtime requirements and replacement readiness, not ingress acknowledgement. */
|
|
51
53
|
status: RuntimeRestartStatus;
|
|
52
54
|
requestedAt: string;
|
|
53
55
|
targetReplicaCount: number;
|
|
56
|
+
/** Includes already-current targets; not a count of ingress-confirmed serving replicas. */
|
|
54
57
|
completedReplicaCount: number;
|
|
55
58
|
failedReplicaCount: number;
|
|
56
59
|
pluginGeneration: number;
|
|
@@ -58,6 +61,7 @@ export interface IRuntimeRestartStatus {
|
|
|
58
61
|
}
|
|
59
62
|
export interface IPluginRuntimeConvergenceStatus {
|
|
60
63
|
generation: number;
|
|
64
|
+
/** Runtime convergence outcome; completed does not attest ingress routing or business acceptance. */
|
|
61
65
|
status: RuntimeRestartStatus;
|
|
62
66
|
restartId?: string;
|
|
63
67
|
targetReplicaCount: number;
|
|
@@ -65,10 +69,23 @@ export interface IPluginRuntimeConvergenceStatus {
|
|
|
65
69
|
failedReplicaCount: number;
|
|
66
70
|
error?: string;
|
|
67
71
|
}
|
|
72
|
+
export type RuntimeAdmissionReason = 'ready' | 'startup-not-listening' | 'plugin-not-admitted' | 'validation-expired' | 'lease-expired';
|
|
73
|
+
export interface IRuntimeAdmissionDiagnostics {
|
|
74
|
+
reason: RuntimeAdmissionReason;
|
|
75
|
+
validationAgeMs: number | null;
|
|
76
|
+
validationRemainingMs: number;
|
|
77
|
+
leaseRemainingMs?: number;
|
|
78
|
+
checkDurationMs: number | null;
|
|
79
|
+
checkInFlight: boolean;
|
|
80
|
+
lastCheckFailed: boolean;
|
|
81
|
+
eventLoopDelayMaxMs?: number;
|
|
82
|
+
eventLoopDelayP99Ms?: number;
|
|
83
|
+
}
|
|
68
84
|
export interface IRuntimeReadiness {
|
|
69
|
-
status: 'ready' | 'draining' | 'unready';
|
|
85
|
+
status: 'ready' | 'withdrawing' | 'draining' | 'unready';
|
|
70
86
|
instanceId: string;
|
|
71
87
|
activeRequests: number;
|
|
88
|
+
admission?: IRuntimeAdmissionDiagnostics;
|
|
72
89
|
restartId?: string;
|
|
73
90
|
requestedAt?: string;
|
|
74
91
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PluginApplicationScope } from '../plugin-application';
|
|
1
2
|
import type { I18nObject, IconDefinition } from '../types';
|
|
2
3
|
import type { JsonSchemaObjectType } from '../ai/types';
|
|
3
4
|
import type { XpertViewAssistantIdentity } from './assistant-profile';
|
|
@@ -104,6 +105,13 @@ export interface XpertViewRuntimeScope {
|
|
|
104
105
|
}
|
|
105
106
|
export type XpertViewHostState = Record<string, unknown>;
|
|
106
107
|
export interface XpertResolvedViewHostContext extends XpertViewHostContext {
|
|
108
|
+
application?: {
|
|
109
|
+
installationId: string;
|
|
110
|
+
pluginName: string;
|
|
111
|
+
appName: string;
|
|
112
|
+
scope: PluginApplicationScope;
|
|
113
|
+
ownerUserId: string | null;
|
|
114
|
+
} | null;
|
|
107
115
|
assistant?: XpertViewAssistantIdentity;
|
|
108
116
|
slots: XpertViewSlot[];
|
|
109
117
|
hostSnapshot?: unknown;
|
|
@@ -312,6 +320,8 @@ export interface XpertViewActionDefinition {
|
|
|
312
320
|
requiredHostAccess?: XpertViewHostAccessLevel;
|
|
313
321
|
}
|
|
314
322
|
export interface XpertViewClientCommandDefinition {
|
|
323
|
+
/** A host must implement this command before mounting the view. Optional actions may omit this. */
|
|
324
|
+
required?: boolean;
|
|
315
325
|
key: string;
|
|
316
326
|
label?: I18nObject;
|
|
317
327
|
description?: I18nObject;
|