@xpert-ai/contracts 3.20.0 → 3.21.1
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 +65 -18
- package/index.esm.js +61 -19
- package/package.json +2 -2
- package/src/agent-plugin.d.ts +10 -3
- package/src/ai/assistant-task-context.model.d.ts +26 -0
- package/src/ai/chat-group-entity.model.d.ts +93 -0
- package/src/ai/chat-group.model.d.ts +338 -0
- package/src/ai/chat-message.model.d.ts +6 -0
- package/src/ai/chat.model.d.ts +16 -0
- package/src/ai/clawxpert-recovery.model.d.ts +10 -0
- package/src/ai/conversation-entry.model.d.ts +18 -0
- package/src/ai/copilot-model.model.d.ts +13 -0
- package/src/ai/index.d.ts +5 -0
- package/src/ai/project-task-runtime.model.d.ts +383 -3
- package/src/ai/realtime-voice.model.d.ts +2 -2
- package/src/ai/sandbox-terminal.model.d.ts +1 -0
- package/src/ai/xpert-template.model.d.ts +2 -13
- package/src/api-key.model.d.ts +37 -2
- package/src/default-agent-plugins.d.ts +19 -0
- package/src/index.d.ts +3 -1
- package/src/plugin-application.d.ts +257 -0
- package/src/plugin-management.d.ts +112 -0
- package/src/plugin.d.ts +3 -319
- package/src/runtime-control.d.ts +19 -0
- package/src/secret-token.model.d.ts +8 -1
- package/src/setup-plugins.d.ts +75 -0
- package/src/storage-file.model.d.ts +5 -0
package/src/plugin.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
-
import type {
|
|
3
|
-
import { JsonSchemaObjectType } from './ai/types';
|
|
2
|
+
import type { PluginMarketplaceAppConfig } from './plugin-application';
|
|
4
3
|
import type { IXpert, XpertWorkspaceDataScope } from './ai/xpert.model';
|
|
5
4
|
import type { TMcpStdioRuntimePolicy } from './ai/xpert-tool-mcp.model';
|
|
6
5
|
import type { IMcpApiKey } from './ai/mcp-auth.model';
|
|
7
6
|
import type { IMcpPublication, McpPublicationStatus } from './ai/mcp-publication.model';
|
|
8
7
|
import type { JSONValue } from './core.model';
|
|
9
|
-
|
|
8
|
+
export type * from './plugin-management';
|
|
10
9
|
import { IconDefinition, I18nObject } from './types';
|
|
10
|
+
export * from './plugin-application';
|
|
11
11
|
export type PluginName = string;
|
|
12
12
|
export declare const PLUGIN_LEVEL: {
|
|
13
13
|
readonly SYSTEM: "system";
|
|
@@ -91,216 +91,6 @@ export type PluginTargetApp = 'xpert' | 'data-xpert' | (string & {});
|
|
|
91
91
|
export type PluginSdkCompatibilityWarningCode = 'plugin-sdk-peer-dependency-missing' | 'plugin-sdk-peer-range-invalid' | 'plugin-sdk-peer-range-incompatible' | 'plugin-sdk-peer-range-spans-major';
|
|
92
92
|
export type PluginMarketplaceContributionType = 'app' | 'view' | 'feature' | 'skill' | 'tool' | 'mcp' | 'hook' | 'assistant-template' | (string & {});
|
|
93
93
|
export type PluginMarketplaceOperationAccess = 'read' | 'write' | 'admin' | (string & {});
|
|
94
|
-
/** Stable placement scopes declared by plugin application contributions. */
|
|
95
|
-
export declare const PLUGIN_APPLICATION_SCOPE: {
|
|
96
|
-
readonly TENANT: "tenant";
|
|
97
|
-
readonly ORGANIZATION: "organization";
|
|
98
|
-
readonly PERSONAL: "personal";
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Lifecycle states persisted for a governed plugin application installation.
|
|
102
|
-
* `degraded` means the installation record exists but one or more managed
|
|
103
|
-
* resources failed the host health check.
|
|
104
|
-
*/
|
|
105
|
-
export declare const PLUGIN_APPLICATION_INSTALLATION_STATUS: {
|
|
106
|
-
readonly INITIALIZING: "initializing";
|
|
107
|
-
readonly READY: "ready";
|
|
108
|
-
readonly FAILED: "failed";
|
|
109
|
-
readonly DEGRADED: "degraded";
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* Scope declared by a trusted plugin application contribution.
|
|
113
|
-
*
|
|
114
|
-
* The current host initializer supports `organization`; the other values are
|
|
115
|
-
* stable contract values for discovery and UI gating until their installers
|
|
116
|
-
* are implemented.
|
|
117
|
-
*/
|
|
118
|
-
export type PluginApplicationScope = (typeof PLUGIN_APPLICATION_SCOPE)[keyof typeof PLUGIN_APPLICATION_SCOPE];
|
|
119
|
-
export type PluginApplicationInstallationStatus = (typeof PLUGIN_APPLICATION_INSTALLATION_STATUS)[keyof typeof PLUGIN_APPLICATION_INSTALLATION_STATUS];
|
|
120
|
-
/** Product capability rendered on a plugin application's marketplace detail page. */
|
|
121
|
-
export interface PluginMarketplaceAppFeature {
|
|
122
|
-
key: string;
|
|
123
|
-
title: string | I18nObject;
|
|
124
|
-
description?: string | I18nObject;
|
|
125
|
-
icon?: IconDefinition;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Knowledge base resource that the host creates as part of an organization
|
|
129
|
-
* application installation. The plugin declares intent; the host supplies all
|
|
130
|
-
* tenant, organization, workspace, and actor scope.
|
|
131
|
-
*/
|
|
132
|
-
export interface PluginMarketplaceAppKnowledgebaseConfig {
|
|
133
|
-
key: string;
|
|
134
|
-
name: string | I18nObject;
|
|
135
|
-
description?: string | I18nObject;
|
|
136
|
-
permission: 'organization';
|
|
137
|
-
applicationTags?: string[];
|
|
138
|
-
graphRag?: {
|
|
139
|
-
enabled: boolean;
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
/** Model capabilities required before the host may initialize an application. */
|
|
143
|
-
export interface PluginMarketplaceAppModelRequirements {
|
|
144
|
-
primary?: boolean;
|
|
145
|
-
embedding?: boolean;
|
|
146
|
-
vision?: boolean;
|
|
147
|
-
embeddingLabel?: string | I18nObject;
|
|
148
|
-
visionLabel?: string | I18nObject;
|
|
149
|
-
}
|
|
150
|
-
export interface PluginMarketplaceAppAssistantDefinition {
|
|
151
|
-
key: string;
|
|
152
|
-
templateKey: string;
|
|
153
|
-
primaryAgentKey: string;
|
|
154
|
-
title?: string | I18nObject;
|
|
155
|
-
}
|
|
156
|
-
/** Portable independent Assistant topology owned by a trusted App. Instance IDs are host-managed. */
|
|
157
|
-
export interface PluginMarketplaceAppAssistantSuite {
|
|
158
|
-
version: string;
|
|
159
|
-
coordinatorAgentKey: string;
|
|
160
|
-
/** Published Assistants connected to the coordinator as required External Xperts. */
|
|
161
|
-
roles: PluginMarketplaceAppAssistantDefinition[];
|
|
162
|
-
/** Published in the same workspace without granting coordinator delegation. */
|
|
163
|
-
standaloneAssistants?: PluginMarketplaceAppAssistantDefinition[];
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Declarative, host-owned initialization contract for a trusted plugin App.
|
|
167
|
-
* The host only executes this contract from a loaded plugin contribution.
|
|
168
|
-
*/
|
|
169
|
-
export interface PluginMarketplaceAppConfig {
|
|
170
|
-
scope: PluginApplicationScope;
|
|
171
|
-
assistantTemplateKey: string;
|
|
172
|
-
assistantSuite?: PluginMarketplaceAppAssistantSuite;
|
|
173
|
-
workspace: {
|
|
174
|
-
mode: 'dedicated';
|
|
175
|
-
name: string | I18nObject;
|
|
176
|
-
description?: string | I18nObject;
|
|
177
|
-
/** New app workspaces are private. Legacy 'organization' is accepted but does not grant sharing. */
|
|
178
|
-
sharing?: 'private' | 'organization';
|
|
179
|
-
};
|
|
180
|
-
knowledgebases?: PluginMarketplaceAppKnowledgebaseConfig[];
|
|
181
|
-
modelRequirements?: PluginMarketplaceAppModelRequirements;
|
|
182
|
-
presentation?: {
|
|
183
|
-
tagline?: string | I18nObject;
|
|
184
|
-
longDescription?: string | I18nObject;
|
|
185
|
-
developer?: string;
|
|
186
|
-
screenshots?: string[];
|
|
187
|
-
features?: PluginMarketplaceAppFeature[];
|
|
188
|
-
useCases?: Array<string | I18nObject>;
|
|
189
|
-
dataScope?: string | I18nObject;
|
|
190
|
-
initializationSummary?: string | I18nObject;
|
|
191
|
-
initializationSteps?: Array<string | I18nObject>;
|
|
192
|
-
};
|
|
193
|
-
entry?: {
|
|
194
|
-
type: 'assistant-chat';
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Trusted application metadata attached to an Assistant template after the
|
|
199
|
-
* host resolves an explicit `assistantTemplateKey` link from a loaded plugin.
|
|
200
|
-
*/
|
|
201
|
-
export interface PluginTemplateApplicationSummary {
|
|
202
|
-
id: string;
|
|
203
|
-
pluginName: string;
|
|
204
|
-
appName: string;
|
|
205
|
-
displayName: string | I18nObject;
|
|
206
|
-
description?: string | I18nObject;
|
|
207
|
-
icon?: IconDefinition;
|
|
208
|
-
color?: string;
|
|
209
|
-
scope: PluginApplicationScope;
|
|
210
|
-
assistantTemplateKey: string;
|
|
211
|
-
config: PluginMarketplaceAppConfig;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Persisted control-plane record for one plugin application in one declared
|
|
215
|
-
* scope. Managed resource identifiers are retained so health checks and
|
|
216
|
-
* retries never need to rediscover resources by display name.
|
|
217
|
-
*/
|
|
218
|
-
export interface IPluginApplicationInstallation extends IBasePerTenantAndOrganizationEntityModel {
|
|
219
|
-
pluginName: string;
|
|
220
|
-
appName: string;
|
|
221
|
-
declaredScope: PluginApplicationScope;
|
|
222
|
-
scopeKey: string;
|
|
223
|
-
status: PluginApplicationInstallationStatus;
|
|
224
|
-
pluginVersion?: string | null;
|
|
225
|
-
templateId?: string | null;
|
|
226
|
-
templateVersion?: string | null;
|
|
227
|
-
operationId?: string | null;
|
|
228
|
-
workspaceId?: string | null;
|
|
229
|
-
xpertId?: string | null;
|
|
230
|
-
knowledgebaseIds?: string[] | null;
|
|
231
|
-
resourceRefs?: Record<string, string> | null;
|
|
232
|
-
errorCode?: string | null;
|
|
233
|
-
errorMessage?: string | null;
|
|
234
|
-
}
|
|
235
|
-
/** Host-authorized model choice returned by application initialization preflight. */
|
|
236
|
-
export interface PluginApplicationModelOption {
|
|
237
|
-
id: string;
|
|
238
|
-
copilotId: string;
|
|
239
|
-
model: string;
|
|
240
|
-
label: string | I18nObject;
|
|
241
|
-
modelType: AiModelTypeEnum;
|
|
242
|
-
}
|
|
243
|
-
/** Read model used by marketplace cards to render installation health and actions. */
|
|
244
|
-
export interface PluginApplicationStatusSummary {
|
|
245
|
-
appId: string;
|
|
246
|
-
status: PluginApplicationInstallationStatus | 'not_installed';
|
|
247
|
-
initializationAccess?: 'allowed' | 'organization_required' | 'role_required' | 'unsupported';
|
|
248
|
-
installationId?: string;
|
|
249
|
-
workspaceId?: string | null;
|
|
250
|
-
xpertId?: string | null;
|
|
251
|
-
assistantSlug?: string | null;
|
|
252
|
-
errorCode?: string | null;
|
|
253
|
-
errorMessage?: string | null;
|
|
254
|
-
}
|
|
255
|
-
/** Marketplace metadata paired with a trusted plugin App contribution. */
|
|
256
|
-
export interface PluginApplicationCatalogMetadata {
|
|
257
|
-
category?: PluginMarketplaceCategory;
|
|
258
|
-
subcategory?: string;
|
|
259
|
-
featured?: boolean;
|
|
260
|
-
tags: string[];
|
|
261
|
-
updatedAt?: string;
|
|
262
|
-
}
|
|
263
|
-
/** Card-sized App definition and scoped runtime status for marketplace discovery. */
|
|
264
|
-
export interface PluginApplicationCatalogItem {
|
|
265
|
-
application: PluginTemplateApplicationSummary;
|
|
266
|
-
status: PluginApplicationStatusSummary;
|
|
267
|
-
marketplace: PluginApplicationCatalogMetadata;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Server-computed initialization readiness. Clients may select only model IDs
|
|
271
|
-
* returned here and cannot provide tenant, organization, or workspace scope.
|
|
272
|
-
*/
|
|
273
|
-
export interface PluginApplicationPreflight {
|
|
274
|
-
supported: boolean;
|
|
275
|
-
scope: PluginApplicationScope;
|
|
276
|
-
canInitialize: boolean;
|
|
277
|
-
reason?: 'organization_scope_required' | 'role_required' | 'scope_not_supported' | 'primary_model_required' | 'embedding_model_required' | 'vision_model_required';
|
|
278
|
-
embeddingModels: PluginApplicationModelOption[];
|
|
279
|
-
visionModels: PluginApplicationModelOption[];
|
|
280
|
-
/** Organization Embedding-role default when it is present in embeddingModels. */
|
|
281
|
-
defaultEmbeddingModelId?: string | null;
|
|
282
|
-
/** Organization Primary-role default when it is vision-capable and present in visionModels. */
|
|
283
|
-
defaultVisionModelId?: string | null;
|
|
284
|
-
primaryModelAvailable: boolean;
|
|
285
|
-
modelRequirements: PluginMarketplaceAppModelRequirements;
|
|
286
|
-
}
|
|
287
|
-
/** Complete application detail assembled from trusted plugin metadata and scoped runtime state. */
|
|
288
|
-
export interface PluginApplicationDetail {
|
|
289
|
-
application: PluginTemplateApplicationSummary;
|
|
290
|
-
status: PluginApplicationStatusSummary;
|
|
291
|
-
preflight: PluginApplicationPreflight;
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* User-selectable portion of an initialization request. Scope and target
|
|
295
|
-
* resources are intentionally absent and are derived from RequestContext.
|
|
296
|
-
*/
|
|
297
|
-
export interface PluginApplicationInitializeInput {
|
|
298
|
-
pluginName: string;
|
|
299
|
-
appName: string;
|
|
300
|
-
embeddingModelId?: string;
|
|
301
|
-
visionModelId?: string;
|
|
302
|
-
operationId: string;
|
|
303
|
-
}
|
|
304
94
|
export interface PluginMarketplaceOperation {
|
|
305
95
|
name: string;
|
|
306
96
|
displayName?: string | I18nObject;
|
|
@@ -726,112 +516,6 @@ export interface PluginMarketplaceResponse {
|
|
|
726
516
|
message: string;
|
|
727
517
|
}>;
|
|
728
518
|
}
|
|
729
|
-
export interface IPlugin extends IBasePerTenantAndOrganizationEntityModel {
|
|
730
|
-
scopeKey?: string | null;
|
|
731
|
-
pluginName: string;
|
|
732
|
-
packageName: string;
|
|
733
|
-
version?: string;
|
|
734
|
-
source?: PluginSource;
|
|
735
|
-
sourceConfig?: PluginSourceConfig | null;
|
|
736
|
-
level?: PluginLevel;
|
|
737
|
-
config: Record<string, any>;
|
|
738
|
-
configurationStatus?: PluginConfigurationStatus | null;
|
|
739
|
-
configurationError?: string | null;
|
|
740
|
-
}
|
|
741
|
-
export interface IPluginInstallInput {
|
|
742
|
-
pluginName: PluginName;
|
|
743
|
-
version?: string;
|
|
744
|
-
source?: PluginSource;
|
|
745
|
-
config?: Record<string, any>;
|
|
746
|
-
sourceConfig?: PluginSourceConfig;
|
|
747
|
-
}
|
|
748
|
-
export interface IPluginInstallResult {
|
|
749
|
-
success: boolean;
|
|
750
|
-
name: PluginName;
|
|
751
|
-
packageName: string;
|
|
752
|
-
organizationId: string;
|
|
753
|
-
currentVersion?: string;
|
|
754
|
-
/**
|
|
755
|
-
* The plugin package was installed and persisted, but automatic runtime convergence is either
|
|
756
|
-
* intentionally deferred or unavailable. All API replicas must be gracefully replaced before
|
|
757
|
-
* this version is considered active.
|
|
758
|
-
*/
|
|
759
|
-
restartRequired?: boolean;
|
|
760
|
-
/** Automatic organization-level convergence that the client should wait for before refreshing runtime data. */
|
|
761
|
-
runtimeConvergence?: IPluginRuntimeConvergence;
|
|
762
|
-
/** Expected runtime state used when an explicit restart is required. */
|
|
763
|
-
runtimeRequirements?: IRuntimePluginRequirement[];
|
|
764
|
-
}
|
|
765
|
-
export interface IPluginUpdateResult extends IPluginInstallResult {
|
|
766
|
-
latestVersion?: string;
|
|
767
|
-
updated: boolean;
|
|
768
|
-
previousVersion?: string;
|
|
769
|
-
}
|
|
770
|
-
export interface IPluginUninstallResult {
|
|
771
|
-
success: boolean;
|
|
772
|
-
/**
|
|
773
|
-
* The persisted registration was removed, but process-global Nest artifacts
|
|
774
|
-
* remain active until the API process is gracefully replaced.
|
|
775
|
-
*/
|
|
776
|
-
restartRequired?: boolean;
|
|
777
|
-
runtimeRequirements?: IRuntimePluginRequirement[];
|
|
778
|
-
}
|
|
779
|
-
export interface IPluginDescriptor {
|
|
780
|
-
scopeKey?: string;
|
|
781
|
-
organizationId?: string;
|
|
782
|
-
name: PluginName;
|
|
783
|
-
meta: PluginMeta;
|
|
784
|
-
packageName?: string;
|
|
785
|
-
source?: PluginSource;
|
|
786
|
-
currentVersion?: string;
|
|
787
|
-
latestVersion?: string;
|
|
788
|
-
isGlobal: boolean;
|
|
789
|
-
level: PluginLevel;
|
|
790
|
-
canConfigure?: boolean;
|
|
791
|
-
canRefresh?: boolean;
|
|
792
|
-
canUninstall?: boolean;
|
|
793
|
-
canUpdate?: boolean;
|
|
794
|
-
hasUpdate?: boolean;
|
|
795
|
-
configSchema?: JsonSchemaObjectType;
|
|
796
|
-
configurationStatus?: PluginConfigurationStatus | null;
|
|
797
|
-
configurationError?: string | null;
|
|
798
|
-
sdkCompatibilityWarnings?: PluginSdkCompatibilityWarning[];
|
|
799
|
-
loadStatus?: PluginLoadStatus | null;
|
|
800
|
-
loadError?: string | null;
|
|
801
|
-
effectiveInCurrentScope: boolean;
|
|
802
|
-
scopeRelation?: PluginScopeRelation;
|
|
803
|
-
componentSummary?: PluginComponentSummary;
|
|
804
|
-
}
|
|
805
|
-
export interface IPluginLatestVersionStatus {
|
|
806
|
-
organizationId?: string;
|
|
807
|
-
name: PluginName;
|
|
808
|
-
packageName?: string;
|
|
809
|
-
latestVersion?: string;
|
|
810
|
-
hasUpdate: boolean;
|
|
811
|
-
}
|
|
812
|
-
export interface IPluginConfiguration<TConfig extends Record<string, any> = Record<string, any>> {
|
|
813
|
-
pluginName: PluginName;
|
|
814
|
-
config: TConfig;
|
|
815
|
-
configSchema?: JsonSchemaObjectType;
|
|
816
|
-
configurationStatus?: PluginConfigurationStatus | null;
|
|
817
|
-
configurationError?: string | null;
|
|
818
|
-
}
|
|
819
|
-
export interface PluginComponentSummary {
|
|
820
|
-
total: number;
|
|
821
|
-
skills: number;
|
|
822
|
-
mcpServers: number;
|
|
823
|
-
toolsets: number;
|
|
824
|
-
apps: number;
|
|
825
|
-
hooks: number;
|
|
826
|
-
}
|
|
827
|
-
export interface IPluginComponentDefinition {
|
|
828
|
-
componentType: PluginComponentType;
|
|
829
|
-
componentKey: string;
|
|
830
|
-
sourcePath?: string | null;
|
|
831
|
-
config?: JSONValue | null;
|
|
832
|
-
metadata?: JSONValue | null;
|
|
833
|
-
definitionHash: string;
|
|
834
|
-
}
|
|
835
519
|
export interface IPluginComponentDocument {
|
|
836
520
|
pluginName: PluginName;
|
|
837
521
|
componentType: PluginComponentType;
|
package/src/runtime-control.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export declare const RUNTIME_RESTART_CONFIRMATION: "RESTART";
|
|
2
|
+
/** Terminal transport interruption; it does not indicate that the background task completed or failed. */
|
|
3
|
+
export declare const RUNTIME_STREAM_INTERRUPTED_EVENT: "runtime-interrupted";
|
|
4
|
+
export interface IRuntimeStreamInterruption {
|
|
5
|
+
code: 'RUNTIME_RESTARTING';
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
2
8
|
export type RuntimeRestartMode = 'self-signal' | 'rolling-self-signal';
|
|
3
9
|
export type RuntimeRestartStatus = 'in_progress' | 'completed' | 'failed';
|
|
4
10
|
export interface IRuntimePluginRequirement {
|
|
@@ -64,3 +70,16 @@ export interface IRuntimeReadiness {
|
|
|
64
70
|
restartId?: string;
|
|
65
71
|
requestedAt?: string;
|
|
66
72
|
}
|
|
73
|
+
/** Registry membership is distinct from liveness; missing heartbeats do not prove retirement. */
|
|
74
|
+
export interface IRuntimeInstanceRegistration {
|
|
75
|
+
instanceId: string;
|
|
76
|
+
bootId: string;
|
|
77
|
+
lastSeenAt: string;
|
|
78
|
+
online: boolean;
|
|
79
|
+
}
|
|
80
|
+
export interface IRuntimeInstanceRetirementRequest {
|
|
81
|
+
expectedBootId: string;
|
|
82
|
+
}
|
|
83
|
+
export interface IRuntimeInstanceRetirementResult {
|
|
84
|
+
status: 'retired' | 'not-found' | 'boot-changed' | 'online';
|
|
85
|
+
}
|
|
@@ -7,7 +7,7 @@ export type TEnterpriseH5TokenScope = {
|
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Selects how an opaque client secret is authorized and how entityId is
|
|
10
|
-
* interpreted. createdById
|
|
10
|
+
* interpreted. createdById alone does not distinguish
|
|
11
11
|
* an API-key grant, a delegated user session, or a public assistant session.
|
|
12
12
|
*/
|
|
13
13
|
export declare enum SecretTokenBindingType {
|
|
@@ -18,6 +18,12 @@ export declare enum SecretTokenBindingType {
|
|
|
18
18
|
* as the acting business user for the interactive ChatKit run.
|
|
19
19
|
*/
|
|
20
20
|
USER_XPERT = "user_xpert",
|
|
21
|
+
/**
|
|
22
|
+
* entityId is one conversation, initially a group. createdById is the real
|
|
23
|
+
* authenticated human. This grant never authorizes unrelated conversations,
|
|
24
|
+
* direct Assistant APIs or session issuance; live domain access still applies.
|
|
25
|
+
*/
|
|
26
|
+
USER_CONVERSATION = "user_conversation",
|
|
21
27
|
/**
|
|
22
28
|
* entityId is the only Xpert this verified enterprise identity may access;
|
|
23
29
|
* createdById is the AccountBinding-resolved Xpert user.
|
|
@@ -31,6 +37,7 @@ export interface ISecretToken extends IBasePerTenantAndOrganizationEntityModel {
|
|
|
31
37
|
entityId?: string;
|
|
32
38
|
/** Explicit grant/binding semantics for this opaque token. */
|
|
33
39
|
type?: SecretTokenBindingType;
|
|
40
|
+
/** Stored representation: existing opaque secret or sha256:<digest> written by createHashed. Never send a digest as a bearer secret. */
|
|
34
41
|
token: string;
|
|
35
42
|
/** Exact enterprise channel that issued an ENTERPRISE_XPERT token. */
|
|
36
43
|
enterpriseH5Scope?: TEnterpriseH5TokenScope | null;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { DefaultAgentPluginsImportResult } from './default-agent-plugins';
|
|
2
|
+
import type { IRuntimePluginRequirement } from './runtime-control';
|
|
3
|
+
import type { PluginLevel, PluginMarketplaceCategory, PluginMarketplaceItem, PluginMarketplaceResponse } from './plugin';
|
|
4
|
+
import type { I18nObject } from './types';
|
|
5
|
+
export interface SetupPluginChoice {
|
|
6
|
+
packageName: string;
|
|
7
|
+
title: string | I18nObject;
|
|
8
|
+
level?: PluginLevel;
|
|
9
|
+
version?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SetupPluginCatalogItem extends SetupPluginChoice {
|
|
12
|
+
description?: PluginMarketplaceItem['description'];
|
|
13
|
+
icon?: PluginMarketplaceItem['icon'];
|
|
14
|
+
author?: PluginMarketplaceItem['author'];
|
|
15
|
+
sourceName?: string;
|
|
16
|
+
type?: string;
|
|
17
|
+
businessCategory?: PluginMarketplaceCategory;
|
|
18
|
+
installed: boolean;
|
|
19
|
+
deprecated?: boolean;
|
|
20
|
+
deprecationMessage?: PluginMarketplaceItem['deprecationMessage'];
|
|
21
|
+
unavailableReason?: 'unsupported-source' | 'organization-required';
|
|
22
|
+
}
|
|
23
|
+
export interface SetupPluginCatalogQuery {
|
|
24
|
+
page?: number;
|
|
25
|
+
pageSize?: number;
|
|
26
|
+
search?: string;
|
|
27
|
+
type?: string;
|
|
28
|
+
businessCategory?: PluginMarketplaceCategory;
|
|
29
|
+
level?: PluginLevel;
|
|
30
|
+
groupBy?: 'none' | 'type' | 'business';
|
|
31
|
+
}
|
|
32
|
+
export interface SetupPluginCatalogResponse {
|
|
33
|
+
items: SetupPluginCatalogItem[];
|
|
34
|
+
total: number;
|
|
35
|
+
page: number;
|
|
36
|
+
pageSize: number;
|
|
37
|
+
/** Lightweight selection identities for all matching pages, excluding installed/unavailable plugins. */
|
|
38
|
+
selectableNames: string[];
|
|
39
|
+
facets: {
|
|
40
|
+
types: Array<{
|
|
41
|
+
value: string;
|
|
42
|
+
count: number;
|
|
43
|
+
}>;
|
|
44
|
+
businessCategories: Array<{
|
|
45
|
+
value: PluginMarketplaceCategory;
|
|
46
|
+
count: number;
|
|
47
|
+
}>;
|
|
48
|
+
};
|
|
49
|
+
errors: PluginMarketplaceResponse['errors'];
|
|
50
|
+
}
|
|
51
|
+
export type SetupPluginItemStatus = 'pending' | 'installing' | 'installed' | 'existing' | 'failed';
|
|
52
|
+
export interface SetupPluginItem extends SetupPluginChoice {
|
|
53
|
+
status: SetupPluginItemStatus;
|
|
54
|
+
error?: string;
|
|
55
|
+
runtimeRequirements: IRuntimePluginRequirement[];
|
|
56
|
+
}
|
|
57
|
+
export interface SetupPluginProgress {
|
|
58
|
+
phase: 'idle' | 'installing' | 'restarting' | 'completed' | 'attention';
|
|
59
|
+
items: SetupPluginItem[];
|
|
60
|
+
defaultAgentPlugins?: {
|
|
61
|
+
status: 'pending' | 'importing' | 'completed' | 'failed';
|
|
62
|
+
result?: DefaultAgentPluginsImportResult;
|
|
63
|
+
error?: string;
|
|
64
|
+
};
|
|
65
|
+
/** Pin organization-level installations when a persisted job is resumed. */
|
|
66
|
+
organizationId?: string | null;
|
|
67
|
+
updatedAt: string;
|
|
68
|
+
restartId?: string;
|
|
69
|
+
generation?: number;
|
|
70
|
+
error?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface SetupPluginsResponse {
|
|
73
|
+
progress: SetupPluginProgress;
|
|
74
|
+
automaticRestart: boolean;
|
|
75
|
+
}
|
|
@@ -3,6 +3,11 @@ import { _TFile } from './types';
|
|
|
3
3
|
export type TFile = _TFile & {
|
|
4
4
|
fileType?: string;
|
|
5
5
|
contents?: string;
|
|
6
|
+
/** Authority resolved by the file service for this request, never inferred from MIME or identity. */
|
|
7
|
+
capabilities?: {
|
|
8
|
+
canRead: boolean;
|
|
9
|
+
canWrite: boolean;
|
|
10
|
+
};
|
|
6
11
|
previewText?: string;
|
|
7
12
|
description?: string;
|
|
8
13
|
size?: number;
|