@xpert-ai/contracts 3.26.2 → 3.28.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 +760 -290
- package/index.esm.js +726 -291
- package/package.json +2 -2
- package/src/agent-plugin.d.ts +2 -0
- package/src/ai/chat-recovery.model.d.ts +33 -0
- package/src/ai/chat.model.d.ts +16 -1
- package/src/ai/computer-codex-isolation.model.d.ts +12 -0
- package/src/ai/execution-control-evidence.schema.d.ts +294 -0
- package/src/ai/execution-control.model.d.ts +26 -0
- package/src/ai/index.d.ts +6 -0
- package/src/ai/mcp-execution-control.schema.d.ts +107 -0
- package/src/ai/mcp-operation.model.d.ts +60 -0
- package/src/ai/mcp-task.schema.d.ts +85 -0
- package/src/ai/model-execution-parameters.model.d.ts +46 -0
- package/src/ai/model-execution.model.d.ts +3 -0
- package/src/ai/project-pipeline/operation.schema.d.ts +1987 -2
- package/src/ai/project-task-runtime.model.d.ts +44 -44
- package/src/ai/run-display-snapshot.model.d.ts +24 -0
- package/src/ai/sandbox-execution-control.schema.d.ts +100 -0
- package/src/ai/thread-activity.model.d.ts +1 -0
- package/src/ai/thread-control-projection.model.d.ts +9 -0
- package/src/ai/thread-control-view.schema.d.ts +97 -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/api-key.model.d.ts +3 -1
- package/src/artifact.model.d.ts +3 -0
- package/src/content-document.model.d.ts +142 -0
- package/src/content-reference.model.d.ts +19 -0
- package/src/content-resource.model.d.ts +112 -0
- package/src/desktop-shell.model.d.ts +8 -0
- package/src/execution-control-admission.schema.d.ts +119 -0
- package/src/index.d.ts +12 -1
- package/src/plugin-application.d.ts +34 -7
- package/src/runtime-control.d.ts +9 -0
- package/src/secret-token.model.d.ts +33 -0
- package/src/task-control.model.d.ts +45 -0
- package/src/view-extension/model.d.ts +14 -0
|
@@ -0,0 +1,142 @@
|
|
|
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 | import('./content-resource.model').ResourceContentEditorRegistration;
|
|
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
|
+
/** Explicit choice, accepted only if the model and edit protocol are compatible. */
|
|
125
|
+
editorKey?: string;
|
|
126
|
+
}
|
|
127
|
+
export interface ContentEditorResolveResult {
|
|
128
|
+
success: true;
|
|
129
|
+
navigation: {
|
|
130
|
+
target: 'workbench.view';
|
|
131
|
+
viewKey: string;
|
|
132
|
+
selectionId: string;
|
|
133
|
+
parameters?: {
|
|
134
|
+
contentProvider: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export interface ContentEditorStatus {
|
|
139
|
+
resourceId: string;
|
|
140
|
+
dirty: boolean;
|
|
141
|
+
label: string;
|
|
142
|
+
}
|
|
@@ -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,112 @@
|
|
|
1
|
+
import type { I18nObject } from './i18n.model';
|
|
2
|
+
export type ContentAction = 'rename' | 'move' | 'trash' | 'restore' | 'duplicate';
|
|
3
|
+
export type ContentSourceLocation = {
|
|
4
|
+
kind: 'file';
|
|
5
|
+
path: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'bundle';
|
|
8
|
+
rootPath: string;
|
|
9
|
+
entryPath: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'managed';
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'external';
|
|
14
|
+
connectionRef: string;
|
|
15
|
+
externalResourceId: string;
|
|
16
|
+
};
|
|
17
|
+
/** Semantic types are open identifiers; model/protocol compatibility determines editability. */
|
|
18
|
+
export interface ContentModelIdentity {
|
|
19
|
+
typeId: string;
|
|
20
|
+
modelId: string;
|
|
21
|
+
schemaVersion: string;
|
|
22
|
+
editProtocol: {
|
|
23
|
+
id: string;
|
|
24
|
+
version: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface ContentTypeImplementation {
|
|
28
|
+
/** False when creation uses a dedicated workflow (e.g. page creation or file upload).
|
|
29
|
+
* The implementation remains discoverable and its resources can still be indexed. */
|
|
30
|
+
creatable?: boolean;
|
|
31
|
+
typeId: string;
|
|
32
|
+
title: I18nObject;
|
|
33
|
+
implementationKey: string;
|
|
34
|
+
implementationTitle: I18nObject;
|
|
35
|
+
/** Optional provider-owned creation presets. IDs are validated again on the server. */
|
|
36
|
+
templates?: Array<{
|
|
37
|
+
id: string;
|
|
38
|
+
title: I18nObject;
|
|
39
|
+
description?: I18nObject;
|
|
40
|
+
}>;
|
|
41
|
+
modelId: string;
|
|
42
|
+
schemaVersion: string;
|
|
43
|
+
defaultEditorKey: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ContentResourceSnapshot extends ContentModelIdentity {
|
|
46
|
+
/** Opt in only when all Project readers may read the source even without this provider.
|
|
47
|
+
* Resources with additional native ACLs must omit this field and fail closed offline. */
|
|
48
|
+
offlineAccess?: 'project';
|
|
49
|
+
sourceSync?: {
|
|
50
|
+
status: 'synced' | 'pending' | 'failed';
|
|
51
|
+
revision?: string;
|
|
52
|
+
};
|
|
53
|
+
/** Safe structural preview, never HTML, credentials or viewer-dependent query data. */
|
|
54
|
+
preview?: {
|
|
55
|
+
kind: 'outline';
|
|
56
|
+
revision: string;
|
|
57
|
+
lines: string[];
|
|
58
|
+
};
|
|
59
|
+
projectId: string;
|
|
60
|
+
title: string;
|
|
61
|
+
revision: string;
|
|
62
|
+
updatedAt: string;
|
|
63
|
+
deleted: boolean;
|
|
64
|
+
source: ContentSourceLocation;
|
|
65
|
+
/** Internal Project files represented by this resource. Library scanners suppress
|
|
66
|
+
* duplicate entries; this is presentation metadata, never a file access grant.
|
|
67
|
+
* Exported deliverables may remain independent and should not be listed here. */
|
|
68
|
+
containedPaths?: Array<{
|
|
69
|
+
path: string;
|
|
70
|
+
recursive: boolean;
|
|
71
|
+
}>;
|
|
72
|
+
defaultEditorKey: string;
|
|
73
|
+
allowedActions: ContentAction[];
|
|
74
|
+
}
|
|
75
|
+
export interface ContentCatalogItem extends ContentResourceSnapshot {
|
|
76
|
+
availability?: 'available' | 'provider-unavailable';
|
|
77
|
+
contentId: string;
|
|
78
|
+
resourceRef: {
|
|
79
|
+
providerKey: string;
|
|
80
|
+
resourceId: string;
|
|
81
|
+
};
|
|
82
|
+
canWrite: boolean;
|
|
83
|
+
bindingRevision: number;
|
|
84
|
+
}
|
|
85
|
+
/** Provider-owned, revision-bound public text only. Never include credentials, query
|
|
86
|
+
* payloads, live query results or executable markup in this shared search projection. */
|
|
87
|
+
export interface ContentSearchProjection {
|
|
88
|
+
revision: string;
|
|
89
|
+
sections: Array<{
|
|
90
|
+
anchor: {
|
|
91
|
+
kind: string;
|
|
92
|
+
id: string;
|
|
93
|
+
};
|
|
94
|
+
text: string;
|
|
95
|
+
}>;
|
|
96
|
+
}
|
|
97
|
+
/** A resource editor never owns a second copy of the resource's write protocol. */
|
|
98
|
+
export interface ResourceContentEditorRegistration {
|
|
99
|
+
kind: 'resource';
|
|
100
|
+
key: string;
|
|
101
|
+
protocolVersion: 2;
|
|
102
|
+
title: string;
|
|
103
|
+
view: {
|
|
104
|
+
providerKey: string;
|
|
105
|
+
viewKey: string;
|
|
106
|
+
entry: string;
|
|
107
|
+
};
|
|
108
|
+
supports: Array<ContentModelIdentity & {
|
|
109
|
+
access: Array<'view' | 'edit'>;
|
|
110
|
+
}>;
|
|
111
|
+
}
|
|
112
|
+
export declare const CONTENT_CATALOG_PROVIDER = "platform.content.catalog";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export type ShellState = 'pending' | 'running' | 'cancel_requested' | 'succeeded' | 'failed' | 'cancelled' | 'timed_out' | 'rejected' | 'unknown';
|
|
2
|
+
export interface ShellExecutionEvidence {
|
|
3
|
+
version: 1;
|
|
4
|
+
generation: string;
|
|
5
|
+
state: 'exited' | 'not_started';
|
|
6
|
+
coverage: 'descendants';
|
|
7
|
+
}
|
|
2
8
|
export interface ShellSettings {
|
|
3
9
|
name: string;
|
|
4
10
|
shell: '/bin/zsh' | '/bin/bash';
|
|
@@ -79,6 +85,7 @@ export interface ShellOutputReport extends WireBase {
|
|
|
79
85
|
data: string;
|
|
80
86
|
}
|
|
81
87
|
export interface ShellStateReport extends WireBase {
|
|
88
|
+
completion?: ShellExecutionEvidence;
|
|
82
89
|
type: 'state';
|
|
83
90
|
state: ShellState;
|
|
84
91
|
seq: number;
|
|
@@ -111,6 +118,7 @@ export interface IDesktopShellGrant extends ShellScope {
|
|
|
111
118
|
expiresAt: Date;
|
|
112
119
|
}
|
|
113
120
|
export interface IDesktopShellOperation extends ShellScope {
|
|
121
|
+
completion?: ShellExecutionEvidence | null;
|
|
114
122
|
id: string;
|
|
115
123
|
deviceId: string;
|
|
116
124
|
grantId: string;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Internal boot capabilities. Online/readiness and execution settlement remain separate facts. */
|
|
3
|
+
export declare const executionControlProtocols: {
|
|
4
|
+
readonly taskControl: 2;
|
|
5
|
+
readonly managedQueue: 3;
|
|
6
|
+
readonly threadControlView: 1;
|
|
7
|
+
readonly mcpControl: 1;
|
|
8
|
+
readonly sandboxControl: 1;
|
|
9
|
+
readonly invocationEvidence: 2;
|
|
10
|
+
};
|
|
11
|
+
export type ExecutionControlCapability = keyof typeof executionControlProtocols;
|
|
12
|
+
export declare const controlledHandlerSchema: z.ZodObject<{
|
|
13
|
+
pluginName: z.ZodString;
|
|
14
|
+
queueName: z.ZodString;
|
|
15
|
+
jobName: z.ZodString;
|
|
16
|
+
scopeKey: z.ZodNullable<z.ZodString>;
|
|
17
|
+
controlContract: z.ZodString;
|
|
18
|
+
}, "strict", z.ZodTypeAny, {
|
|
19
|
+
pluginName?: string;
|
|
20
|
+
scopeKey?: string;
|
|
21
|
+
queueName?: string;
|
|
22
|
+
jobName?: string;
|
|
23
|
+
controlContract?: string;
|
|
24
|
+
}, {
|
|
25
|
+
pluginName?: string;
|
|
26
|
+
scopeKey?: string;
|
|
27
|
+
queueName?: string;
|
|
28
|
+
jobName?: string;
|
|
29
|
+
controlContract?: string;
|
|
30
|
+
}>;
|
|
31
|
+
export type ControlledHandlerCapability = z.infer<typeof controlledHandlerSchema>;
|
|
32
|
+
export declare const executionControlCapabilitiesSchema: z.ZodObject<{
|
|
33
|
+
version: z.ZodLiteral<1>;
|
|
34
|
+
validUntil: z.ZodNumber;
|
|
35
|
+
protocols: z.ZodObject<{
|
|
36
|
+
taskControl: z.ZodOptional<z.ZodLiteral<2>>;
|
|
37
|
+
managedQueue: z.ZodOptional<z.ZodLiteral<3>>;
|
|
38
|
+
threadControlView: z.ZodOptional<z.ZodLiteral<1>>;
|
|
39
|
+
mcpControl: z.ZodOptional<z.ZodLiteral<1>>;
|
|
40
|
+
sandboxControl: z.ZodOptional<z.ZodLiteral<1>>;
|
|
41
|
+
invocationEvidence: z.ZodOptional<z.ZodLiteral<2>>;
|
|
42
|
+
}, "strict", z.ZodTypeAny, {
|
|
43
|
+
taskControl?: 2;
|
|
44
|
+
managedQueue?: 3;
|
|
45
|
+
threadControlView?: 1;
|
|
46
|
+
mcpControl?: 1;
|
|
47
|
+
sandboxControl?: 1;
|
|
48
|
+
invocationEvidence?: 2;
|
|
49
|
+
}, {
|
|
50
|
+
taskControl?: 2;
|
|
51
|
+
managedQueue?: 3;
|
|
52
|
+
threadControlView?: 1;
|
|
53
|
+
mcpControl?: 1;
|
|
54
|
+
sandboxControl?: 1;
|
|
55
|
+
invocationEvidence?: 2;
|
|
56
|
+
}>;
|
|
57
|
+
queuePrefix: z.ZodString;
|
|
58
|
+
queuePools: z.ZodArray<z.ZodEnum<["default", "sandbox-browser"]>, "many">;
|
|
59
|
+
handlers: z.ZodArray<z.ZodObject<{
|
|
60
|
+
pluginName: z.ZodString;
|
|
61
|
+
queueName: z.ZodString;
|
|
62
|
+
jobName: z.ZodString;
|
|
63
|
+
scopeKey: z.ZodNullable<z.ZodString>;
|
|
64
|
+
controlContract: z.ZodString;
|
|
65
|
+
}, "strict", z.ZodTypeAny, {
|
|
66
|
+
pluginName?: string;
|
|
67
|
+
scopeKey?: string;
|
|
68
|
+
queueName?: string;
|
|
69
|
+
jobName?: string;
|
|
70
|
+
controlContract?: string;
|
|
71
|
+
}, {
|
|
72
|
+
pluginName?: string;
|
|
73
|
+
scopeKey?: string;
|
|
74
|
+
queueName?: string;
|
|
75
|
+
jobName?: string;
|
|
76
|
+
controlContract?: string;
|
|
77
|
+
}>, "many">;
|
|
78
|
+
}, "strict", z.ZodTypeAny, {
|
|
79
|
+
version?: 1;
|
|
80
|
+
validUntil?: number;
|
|
81
|
+
protocols?: {
|
|
82
|
+
taskControl?: 2;
|
|
83
|
+
managedQueue?: 3;
|
|
84
|
+
threadControlView?: 1;
|
|
85
|
+
mcpControl?: 1;
|
|
86
|
+
sandboxControl?: 1;
|
|
87
|
+
invocationEvidence?: 2;
|
|
88
|
+
};
|
|
89
|
+
queuePrefix?: string;
|
|
90
|
+
queuePools?: ("default" | "sandbox-browser")[];
|
|
91
|
+
handlers?: {
|
|
92
|
+
pluginName?: string;
|
|
93
|
+
scopeKey?: string;
|
|
94
|
+
queueName?: string;
|
|
95
|
+
jobName?: string;
|
|
96
|
+
controlContract?: string;
|
|
97
|
+
}[];
|
|
98
|
+
}, {
|
|
99
|
+
version?: 1;
|
|
100
|
+
validUntil?: number;
|
|
101
|
+
protocols?: {
|
|
102
|
+
taskControl?: 2;
|
|
103
|
+
managedQueue?: 3;
|
|
104
|
+
threadControlView?: 1;
|
|
105
|
+
mcpControl?: 1;
|
|
106
|
+
sandboxControl?: 1;
|
|
107
|
+
invocationEvidence?: 2;
|
|
108
|
+
};
|
|
109
|
+
queuePrefix?: string;
|
|
110
|
+
queuePools?: ("default" | "sandbox-browser")[];
|
|
111
|
+
handlers?: {
|
|
112
|
+
pluginName?: string;
|
|
113
|
+
scopeKey?: string;
|
|
114
|
+
queueName?: string;
|
|
115
|
+
jobName?: string;
|
|
116
|
+
controlContract?: string;
|
|
117
|
+
}[];
|
|
118
|
+
}>;
|
|
119
|
+
export type ExecutionControlCapabilities = z.infer<typeof executionControlCapabilitiesSchema>;
|
package/src/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
export * from './task-control.model';
|
|
2
|
+
export * from './execution-control-admission.schema';
|
|
1
3
|
export * from './types';
|
|
4
|
+
export * from './ai/sandbox-execution-control.schema';
|
|
2
5
|
export * from './ai/project-task-graph.model';
|
|
3
6
|
export * from './ai/project-task-type.model';
|
|
4
7
|
export * from './ai/project-task-schedule';
|
|
@@ -68,14 +71,22 @@ export * from './plain-object.model';
|
|
|
68
71
|
export * from './plugin';
|
|
69
72
|
export * from './view-extension';
|
|
70
73
|
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';
|
|
74
|
+
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
75
|
export * from './desktop-shell.model';
|
|
73
76
|
export * from './ai/agent-output-delivery.model';
|
|
74
77
|
export * from './ai/execution-activity.model';
|
|
75
78
|
export * from './setup-plugins';
|
|
76
79
|
export * from './default-agent-plugins';
|
|
80
|
+
export * from './content-document.model';
|
|
81
|
+
export * from './content-reference.model';
|
|
77
82
|
export * from './agent-plugin-maintenance';
|
|
78
83
|
export * from './assistant-sharing.model';
|
|
79
84
|
export * from './artifact-presentation.model';
|
|
80
85
|
export * from './analytics-definition.model';
|
|
81
86
|
export * from './data-retention.model';
|
|
87
|
+
export * from './content-resource.model';
|
|
88
|
+
export * from './ai/mcp-execution-control.schema';
|
|
89
|
+
export * from './ai/thread-control-view.schema';
|
|
90
|
+
export * from './ai/thread-control-projection.model';
|
|
91
|
+
export * from './ai/mcp-operation.model';
|
|
92
|
+
export * from './ai/mcp-task.schema';
|
|
@@ -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;
|
|
@@ -238,16 +242,18 @@ export interface PluginApplicationCompositionItem {
|
|
|
238
242
|
title: string | I18nObject;
|
|
239
243
|
}
|
|
240
244
|
export interface PluginApplicationDetail {
|
|
245
|
+
canUpdate?: boolean;
|
|
241
246
|
composition: PluginApplicationCompositionItem[];
|
|
242
247
|
application: PluginTemplateApplicationSummary;
|
|
243
248
|
status: PluginApplicationStatusSummary;
|
|
244
249
|
preflight: PluginApplicationPreflight;
|
|
245
250
|
}
|
|
246
251
|
/**
|
|
247
|
-
*
|
|
248
|
-
*
|
|
252
|
+
* Clients select a declared installation scope; identity and target resource IDs
|
|
253
|
+
* are derived exclusively from the authenticated request context.
|
|
249
254
|
*/
|
|
250
255
|
export interface PluginApplicationInitializeInput {
|
|
256
|
+
installationScope?: PluginApplicationScope;
|
|
251
257
|
pluginName: string;
|
|
252
258
|
appName: string;
|
|
253
259
|
embeddingModelId?: string;
|
|
@@ -258,6 +264,7 @@ export interface PluginApplicationInitializeInput {
|
|
|
258
264
|
}
|
|
259
265
|
/** Prepares or discards configuration in the current request scope; never accepts a Workspace ID. */
|
|
260
266
|
export interface PluginApplicationSetupInput {
|
|
267
|
+
installationScope?: PluginApplicationScope;
|
|
261
268
|
pluginName: string;
|
|
262
269
|
appName: string;
|
|
263
270
|
}
|
|
@@ -266,3 +273,23 @@ export interface PluginApplicationBindToolsetInput extends PluginApplicationSetu
|
|
|
266
273
|
key: string;
|
|
267
274
|
toolsetId: string;
|
|
268
275
|
}
|
|
276
|
+
/** Validate portable metadata without inferring a scope from names or presentation text. */
|
|
277
|
+
export declare function getPluginApplicationScopes(value: unknown): PluginApplicationScope[];
|
|
278
|
+
export declare function isPluginApplicationScope(value: unknown): value is PluginApplicationScope;
|
|
279
|
+
/** A scoped, durable release; clients never select resource IDs or template versions. */
|
|
280
|
+
export interface PluginApplicationUpdateInput extends PluginApplicationSetupInput {
|
|
281
|
+
operationId: string;
|
|
282
|
+
resume?: boolean;
|
|
283
|
+
}
|
|
284
|
+
export interface PluginApplicationUpdateProgress {
|
|
285
|
+
operationId: string;
|
|
286
|
+
status: 'running' | 'failed' | 'completed';
|
|
287
|
+
updatedAt: string;
|
|
288
|
+
errorCode: 'UPDATE_FAILED' | null;
|
|
289
|
+
completed: number;
|
|
290
|
+
total: number;
|
|
291
|
+
entries: Array<{
|
|
292
|
+
key: string;
|
|
293
|
+
stage: 'pending' | 'preparing' | 'prepared' | 'binding' | 'publishing' | 'published';
|
|
294
|
+
}>;
|
|
295
|
+
}
|
package/src/runtime-control.d.ts
CHANGED
|
@@ -19,6 +19,13 @@ export interface IRuntimePluginRequirement {
|
|
|
19
19
|
export interface IPluginRuntimeConvergence {
|
|
20
20
|
generation: number;
|
|
21
21
|
}
|
|
22
|
+
/** Durable cluster target, independent of expiring operation history. */
|
|
23
|
+
export interface IPluginRuntimeSnapshot {
|
|
24
|
+
generation: number;
|
|
25
|
+
status: RuntimeRestartStatus | null;
|
|
26
|
+
requirements: IRuntimePluginRequirement[];
|
|
27
|
+
activeRestartId?: string;
|
|
28
|
+
}
|
|
22
29
|
export type RuntimeRestartCapabilityReason = 'allowed' | 'interactive-auth-required' | 'super-admin-required' | 'default-tenant-required';
|
|
23
30
|
export interface IRuntimeRestartCapability {
|
|
24
31
|
allowed: boolean;
|
|
@@ -34,6 +41,8 @@ export interface IRuntimeRestartRequest {
|
|
|
34
41
|
allowDowntime?: boolean;
|
|
35
42
|
/** Plugin runtime state that every replacement process must confirm after boot. */
|
|
36
43
|
runtimeRequirements?: IRuntimePluginRequirement[];
|
|
44
|
+
/** Compare-and-set fence for publishing an approved plugin restart. */
|
|
45
|
+
expectedGeneration?: number;
|
|
37
46
|
}
|
|
38
47
|
export interface IRuntimeRestartResponse {
|
|
39
48
|
accepted: true;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
3
|
import type { TEnterpriseH5Platform } from './ai/xpert.model';
|
|
3
4
|
/** Enterprise channel and integration to which an H5 session token is bound. */
|
|
@@ -5,6 +6,36 @@ export type TEnterpriseH5TokenScope = {
|
|
|
5
6
|
platform: TEnterpriseH5Platform;
|
|
6
7
|
integrationId: string;
|
|
7
8
|
};
|
|
9
|
+
/** Immutable authorization source; live access is rechecked on every delegated request. */
|
|
10
|
+
export declare const clientSecretGrantSourceSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
11
|
+
kind: z.ZodLiteral<"assistant">;
|
|
12
|
+
}, "strict", z.ZodTypeAny, {
|
|
13
|
+
kind?: "assistant";
|
|
14
|
+
}, {
|
|
15
|
+
kind?: "assistant";
|
|
16
|
+
}>, z.ZodObject<{
|
|
17
|
+
kind: z.ZodLiteral<"project">;
|
|
18
|
+
projectId: z.ZodString;
|
|
19
|
+
}, "strict", z.ZodTypeAny, {
|
|
20
|
+
kind?: "project";
|
|
21
|
+
projectId?: string;
|
|
22
|
+
}, {
|
|
23
|
+
kind?: "project";
|
|
24
|
+
projectId?: string;
|
|
25
|
+
}>, z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"conversation">;
|
|
27
|
+
conversationId: z.ZodString;
|
|
28
|
+
requesterXpertId: z.ZodString;
|
|
29
|
+
}, "strict", z.ZodTypeAny, {
|
|
30
|
+
kind?: "conversation";
|
|
31
|
+
conversationId?: string;
|
|
32
|
+
requesterXpertId?: string;
|
|
33
|
+
}, {
|
|
34
|
+
kind?: "conversation";
|
|
35
|
+
conversationId?: string;
|
|
36
|
+
requesterXpertId?: string;
|
|
37
|
+
}>]>;
|
|
38
|
+
export type TClientSecretGrantSource = z.infer<typeof clientSecretGrantSourceSchema>;
|
|
8
39
|
/**
|
|
9
40
|
* Selects how an opaque client secret is authorized and how entityId is
|
|
10
41
|
* interpreted. createdById alone does not distinguish
|
|
@@ -41,6 +72,8 @@ export interface ISecretToken extends IBasePerTenantAndOrganizationEntityModel {
|
|
|
41
72
|
token: string;
|
|
42
73
|
/** Exact enterprise channel that issued an ENTERPRISE_XPERT token. */
|
|
43
74
|
enterpriseH5Scope?: TEnterpriseH5TokenScope | null;
|
|
75
|
+
/** Authorization source for USER_XPERT grants; entityId remains the resource binding. */
|
|
76
|
+
grantSource?: TClientSecretGrantSource | null;
|
|
44
77
|
validUntil?: Date;
|
|
45
78
|
expired?: boolean;
|
|
46
79
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
+
/** Host-issued identity; never derive lifecycle ownership from wait/background mode. */
|
|
3
|
+
export type TaskControlRef = {
|
|
4
|
+
version: 2;
|
|
5
|
+
targetId: string;
|
|
6
|
+
};
|
|
7
|
+
export type TaskControlPolicy = 'attached' | 'detached' | 'shared';
|
|
8
|
+
export type TaskControlIntent = 'running' | 'paused' | 'terminated';
|
|
9
|
+
export type TaskControlKind = 'execution' | 'invocation' | 'handoff' | 'managed-queue' | 'desktop-shell' | 'sandbox-job' | 'sandbox-callback' | 'mcp-publication' | 'mcp-operation';
|
|
10
|
+
export type TaskControlState = 'queued' | 'running' | 'paused' | 'completed' | 'unknown';
|
|
11
|
+
/** Durable task identity and control facts, independent of a particular graph attempt. */
|
|
12
|
+
export interface IExecutionTaskControl extends IBasePerTenantAndOrganizationEntityModel {
|
|
13
|
+
id: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
rootId: string;
|
|
16
|
+
parentId: string | null;
|
|
17
|
+
kind: TaskControlKind;
|
|
18
|
+
resourceId: string;
|
|
19
|
+
policy: TaskControlPolicy;
|
|
20
|
+
ancestors: string[];
|
|
21
|
+
threadId: string | null;
|
|
22
|
+
currentExecutionId: string | null;
|
|
23
|
+
attempts: string[];
|
|
24
|
+
desired: TaskControlIntent;
|
|
25
|
+
revision: number;
|
|
26
|
+
state: TaskControlState;
|
|
27
|
+
claim: string | null;
|
|
28
|
+
drainOnPause: boolean;
|
|
29
|
+
nextCheckAt: Date;
|
|
30
|
+
deliveryToken: string | null;
|
|
31
|
+
deliveryUntil: Date | null;
|
|
32
|
+
observation: string | null;
|
|
33
|
+
outcome: 'succeeded' | 'failed' | null;
|
|
34
|
+
}
|
|
35
|
+
/** Durable outbox entry; scope is copied only from its registered task. */
|
|
36
|
+
export interface ITaskControlPublication extends IBasePerTenantAndOrganizationEntityModel {
|
|
37
|
+
tenantId: string;
|
|
38
|
+
targetId: string;
|
|
39
|
+
transport: TaskControlTransport;
|
|
40
|
+
payload: unknown;
|
|
41
|
+
result: unknown | null;
|
|
42
|
+
nextAttemptAt: Date;
|
|
43
|
+
publishedAt: Date | null;
|
|
44
|
+
}
|
|
45
|
+
export type TaskControlTransport = 'handoff' | 'managed-queue' | 'managed-queue-v3';
|