@xpert-ai/contracts 3.21.1 → 3.21.3
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 +872 -170
- package/index.esm.js +985 -310
- package/package.json +1 -1
- package/src/agent-plugin.d.ts +17 -4
- package/src/ai/assistant-capability.model.d.ts +24 -0
- package/src/ai/assistant-template-dependencies.model.d.ts +51 -0
- package/src/ai/assistant-template-manifest.model.d.ts +1826 -0
- package/src/ai/assistant-template-overview.model.d.ts +44 -0
- package/src/ai/assistant-template-setup.model.d.ts +193 -0
- package/src/ai/assistant-template.model.d.ts +16 -0
- package/src/ai/assistant-user-preference.model.d.ts +4 -0
- package/src/ai/copilot-provider.model.d.ts +9 -2
- package/src/ai/execution-activity.model.d.ts +10 -10
- package/src/ai/index.d.ts +10 -0
- package/src/ai/model-discovery.model.d.ts +363 -0
- package/src/ai/project-task-runtime.model.d.ts +31 -31
- package/src/ai/template-activity.model.d.ts +24 -0
- package/src/ai/template-installation.model.d.ts +131 -0
- package/src/ai/template-lifecycle.model.d.ts +89 -0
- package/src/ai/template-manifest.model.d.ts +3 -0
- package/src/ai/xpert-project.model.d.ts +1 -0
- package/src/ai/xpert-template.model.d.ts +12 -8
- package/src/ai/xpert.model.d.ts +8 -0
- package/src/api-key.model.d.ts +12 -5
- package/src/index.d.ts +2 -0
- package/src/personal-api-key.model.d.ts +21 -0
- package/src/plugin-application.d.ts +8 -0
- package/src/plugin-management.d.ts +3 -0
- package/src/plugin.d.ts +11 -38
- package/src/role-permission-modules.d.ts +3 -0
- package/src/runtime-control.d.ts +4 -2
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { TAvatar } from '../types';
|
|
3
|
+
import type { TCopilotModel } from './copilot-model.model';
|
|
4
|
+
import type { RealtimeVoiceSelection } from './realtime-voice.model';
|
|
5
|
+
/** Reuse a key only for the same installation intent; a new key creates another Assistant. */
|
|
6
|
+
export interface TemplateInstallationInput {
|
|
7
|
+
idempotencyKey: string;
|
|
8
|
+
templateId: string;
|
|
9
|
+
workspaceId: string;
|
|
10
|
+
publish?: boolean;
|
|
11
|
+
locale?: string;
|
|
12
|
+
capabilities?: string[];
|
|
13
|
+
basic?: {
|
|
14
|
+
name?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
prompt?: string;
|
|
18
|
+
avatar?: Omit<TAvatar, 'appearance'>;
|
|
19
|
+
copilotModel?: Pick<TCopilotModel, 'copilotId' | 'model' | 'modelType' | 'options'>;
|
|
20
|
+
workspaceDataScope?: 'shared' | 'user';
|
|
21
|
+
realtimeVoice?: RealtimeVoiceSelection;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export type TemplateInstallationStage = 'importing' | 'dependencies' | 'publishing' | 'initializing' | 'completed';
|
|
25
|
+
export type TemplateInstallationStatus = 'running' | 'interrupted' | 'failed' | 'succeeded';
|
|
26
|
+
/** Public receipt, deliberately excluding stored input, source content and runtime errors. */
|
|
27
|
+
export interface TemplateInstallation {
|
|
28
|
+
dependencyLocks?: TemplateDependencyLock[];
|
|
29
|
+
id: string;
|
|
30
|
+
templateId: string;
|
|
31
|
+
workspaceId: string;
|
|
32
|
+
status: TemplateInstallationStatus;
|
|
33
|
+
stage: TemplateInstallationStage;
|
|
34
|
+
attempt: number;
|
|
35
|
+
assistantId: string | null;
|
|
36
|
+
publish: boolean;
|
|
37
|
+
retryable: boolean;
|
|
38
|
+
error: {
|
|
39
|
+
code: 'INSTALL_FAILED' | 'SOURCE_CHANGED';
|
|
40
|
+
message: string;
|
|
41
|
+
} | null;
|
|
42
|
+
resourceInstallationIds: string[];
|
|
43
|
+
pendingAuthInstallationIds: string[];
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
}
|
|
47
|
+
export declare const templateDependencyLocksSchema: z.ZodArray<z.ZodObject<{
|
|
48
|
+
pluginName: z.ZodString;
|
|
49
|
+
version: z.ZodString;
|
|
50
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
kind: z.ZodLiteral<"agent-plugin">;
|
|
52
|
+
name: z.ZodString;
|
|
53
|
+
digest: z.ZodString;
|
|
54
|
+
bindingId: z.ZodString;
|
|
55
|
+
bindingVersion: z.ZodString;
|
|
56
|
+
}, "strict", z.ZodTypeAny, {
|
|
57
|
+
name?: string;
|
|
58
|
+
kind?: "agent-plugin";
|
|
59
|
+
digest?: string;
|
|
60
|
+
bindingId?: string;
|
|
61
|
+
bindingVersion?: string;
|
|
62
|
+
}, {
|
|
63
|
+
name?: string;
|
|
64
|
+
kind?: "agent-plugin";
|
|
65
|
+
digest?: string;
|
|
66
|
+
bindingId?: string;
|
|
67
|
+
bindingVersion?: string;
|
|
68
|
+
}>>;
|
|
69
|
+
providers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
70
|
+
kind: z.ZodEnum<["middleware", "sandbox", "toolset"]>;
|
|
71
|
+
key: z.ZodString;
|
|
72
|
+
}, "strict", z.ZodTypeAny, {
|
|
73
|
+
key?: string;
|
|
74
|
+
kind?: "middleware" | "toolset" | "sandbox";
|
|
75
|
+
}, {
|
|
76
|
+
key?: string;
|
|
77
|
+
kind?: "middleware" | "toolset" | "sandbox";
|
|
78
|
+
}>, "many">>;
|
|
79
|
+
components: z.ZodArray<z.ZodObject<{
|
|
80
|
+
type: z.ZodEnum<["skill", "mcp_server", "toolset", "app", "hook", "asset"]>;
|
|
81
|
+
key: z.ZodString;
|
|
82
|
+
hash: z.ZodString;
|
|
83
|
+
}, "strict", z.ZodTypeAny, {
|
|
84
|
+
type?: "skill" | "toolset" | "app" | "asset" | "mcp_server" | "hook";
|
|
85
|
+
hash?: string;
|
|
86
|
+
key?: string;
|
|
87
|
+
}, {
|
|
88
|
+
type?: "skill" | "toolset" | "app" | "asset" | "mcp_server" | "hook";
|
|
89
|
+
hash?: string;
|
|
90
|
+
key?: string;
|
|
91
|
+
}>, "many">;
|
|
92
|
+
}, "strict", z.ZodTypeAny, {
|
|
93
|
+
version?: string;
|
|
94
|
+
components?: {
|
|
95
|
+
type?: "skill" | "toolset" | "app" | "asset" | "mcp_server" | "hook";
|
|
96
|
+
hash?: string;
|
|
97
|
+
key?: string;
|
|
98
|
+
}[];
|
|
99
|
+
source?: {
|
|
100
|
+
name?: string;
|
|
101
|
+
kind?: "agent-plugin";
|
|
102
|
+
digest?: string;
|
|
103
|
+
bindingId?: string;
|
|
104
|
+
bindingVersion?: string;
|
|
105
|
+
};
|
|
106
|
+
pluginName?: string;
|
|
107
|
+
providers?: {
|
|
108
|
+
key?: string;
|
|
109
|
+
kind?: "middleware" | "toolset" | "sandbox";
|
|
110
|
+
}[];
|
|
111
|
+
}, {
|
|
112
|
+
version?: string;
|
|
113
|
+
components?: {
|
|
114
|
+
type?: "skill" | "toolset" | "app" | "asset" | "mcp_server" | "hook";
|
|
115
|
+
hash?: string;
|
|
116
|
+
key?: string;
|
|
117
|
+
}[];
|
|
118
|
+
source?: {
|
|
119
|
+
name?: string;
|
|
120
|
+
kind?: "agent-plugin";
|
|
121
|
+
digest?: string;
|
|
122
|
+
bindingId?: string;
|
|
123
|
+
bindingVersion?: string;
|
|
124
|
+
};
|
|
125
|
+
pluginName?: string;
|
|
126
|
+
providers?: {
|
|
127
|
+
key?: string;
|
|
128
|
+
kind?: "middleware" | "toolset" | "sandbox";
|
|
129
|
+
}[];
|
|
130
|
+
}>, "many">;
|
|
131
|
+
export type TemplateDependencyLock = z.output<typeof templateDependencyLocksSchema>[number];
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const templatePublicationInputSchema: z.ZodObject<{
|
|
3
|
+
revision: z.ZodString;
|
|
4
|
+
contentHash: z.ZodString;
|
|
5
|
+
visibility: z.ZodEnum<["team", "public"]>;
|
|
6
|
+
version: z.ZodString;
|
|
7
|
+
releaseNotes: z.ZodDefault<z.ZodString>;
|
|
8
|
+
}, "strict", z.ZodTypeAny, {
|
|
9
|
+
version?: string;
|
|
10
|
+
revision?: string;
|
|
11
|
+
contentHash?: string;
|
|
12
|
+
visibility?: "public" | "team";
|
|
13
|
+
releaseNotes?: string;
|
|
14
|
+
}, {
|
|
15
|
+
version?: string;
|
|
16
|
+
revision?: string;
|
|
17
|
+
contentHash?: string;
|
|
18
|
+
visibility?: "public" | "team";
|
|
19
|
+
releaseNotes?: string;
|
|
20
|
+
}>;
|
|
21
|
+
export type TemplatePublicationInput = z.output<typeof templatePublicationInputSchema>;
|
|
22
|
+
export interface TemplatePublicationPreview {
|
|
23
|
+
revision: string;
|
|
24
|
+
contentHash: string;
|
|
25
|
+
content: string;
|
|
26
|
+
omitted: string[];
|
|
27
|
+
blocked: string[];
|
|
28
|
+
publication?: {
|
|
29
|
+
id: string;
|
|
30
|
+
version: string;
|
|
31
|
+
visibility: 'team' | 'public';
|
|
32
|
+
revoked: boolean;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export declare const templateUpgradeSectionSchema: z.ZodEnum<["presentation", "instructions", "runtime", "definition"]>;
|
|
36
|
+
export type TemplateUpgradeSection = z.output<typeof templateUpgradeSectionSchema>;
|
|
37
|
+
export declare const templateUpgradeInputSchema: z.ZodObject<{
|
|
38
|
+
targetTemplateId: z.ZodOptional<z.ZodString>;
|
|
39
|
+
revision: z.ZodString;
|
|
40
|
+
sourceHash: z.ZodString;
|
|
41
|
+
choices: z.ZodRecord<z.ZodEnum<["presentation", "instructions", "runtime", "definition"]>, z.ZodEnum<["keep", "replace"]>>;
|
|
42
|
+
}, "strict", z.ZodTypeAny, {
|
|
43
|
+
revision?: string;
|
|
44
|
+
sourceHash?: string;
|
|
45
|
+
targetTemplateId?: string;
|
|
46
|
+
choices?: Partial<Record<"runtime" | "instructions" | "presentation" | "definition", "replace" | "keep">>;
|
|
47
|
+
}, {
|
|
48
|
+
revision?: string;
|
|
49
|
+
sourceHash?: string;
|
|
50
|
+
targetTemplateId?: string;
|
|
51
|
+
choices?: Partial<Record<"runtime" | "instructions" | "presentation" | "definition", "replace" | "keep">>;
|
|
52
|
+
}>;
|
|
53
|
+
export type TemplateUpgradeInput = z.output<typeof templateUpgradeInputSchema>;
|
|
54
|
+
export interface TemplateUpgradeSource {
|
|
55
|
+
id: string;
|
|
56
|
+
title: string;
|
|
57
|
+
source?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface TemplateUpgradePreview {
|
|
60
|
+
previousTemplateId?: string;
|
|
61
|
+
revision: string;
|
|
62
|
+
sourceHash: string;
|
|
63
|
+
templateId: string;
|
|
64
|
+
version: string;
|
|
65
|
+
releaseNotes: string;
|
|
66
|
+
baselineAvailable: boolean;
|
|
67
|
+
blocked: string[];
|
|
68
|
+
changes: {
|
|
69
|
+
section: TemplateUpgradeSection;
|
|
70
|
+
conflict: boolean;
|
|
71
|
+
before: string;
|
|
72
|
+
after: string;
|
|
73
|
+
}[];
|
|
74
|
+
operation?: TemplateUpgradeOperation;
|
|
75
|
+
}
|
|
76
|
+
export interface TemplateUpgradeOperation {
|
|
77
|
+
id: string;
|
|
78
|
+
state: 'draft' | 'published' | 'failed' | 'rolled-back';
|
|
79
|
+
canResume: boolean;
|
|
80
|
+
canRollback: boolean;
|
|
81
|
+
}
|
|
82
|
+
export declare const templateUpgradeActionSchema: z.ZodObject<{
|
|
83
|
+
operationId: z.ZodString;
|
|
84
|
+
}, "strict", z.ZodTypeAny, {
|
|
85
|
+
operationId?: string;
|
|
86
|
+
}, {
|
|
87
|
+
operationId?: string;
|
|
88
|
+
}>;
|
|
89
|
+
export type TemplateUpgradeAction = z.output<typeof templateUpgradeActionSchema>;
|
|
@@ -168,6 +168,7 @@ export interface IXpertProject extends TXpertProject, IBasePerTenantAndOrganizat
|
|
|
168
168
|
xperts?: IXpert[];
|
|
169
169
|
toolsets?: IXpertToolset[];
|
|
170
170
|
knowledges?: IKnowledgebase[];
|
|
171
|
+
/** @deprecated Legacy relation. Use memberships and the Project membership API for access management. */
|
|
171
172
|
members?: IUser[];
|
|
172
173
|
memberships?: IXpertProjectMembership[];
|
|
173
174
|
/**
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { AssistantCapabilityDeclaration } from './assistant-capability.model';
|
|
2
|
+
import type { TemplateManifest, TemplateReadiness } from './template-manifest.model';
|
|
1
3
|
import { IBasePerTenantEntityModel } from '../base-entity.model';
|
|
2
4
|
import { IconDefinition, TAvatar } from '../types';
|
|
3
5
|
import { ModelSelectionMetadata, TCopilotModel } from './copilot-model.model';
|
|
@@ -5,7 +7,7 @@ import { ModelFeature } from './ai-model.model';
|
|
|
5
7
|
import { MCPServerType, TMCPServer } from './xpert-tool-mcp.model';
|
|
6
8
|
import { XpertTypeEnum } from './xpert.model';
|
|
7
9
|
import type { TPromptWorkflow } from './prompt-workflow.model';
|
|
8
|
-
import { PluginTargetApp, PluginTargetAppMeta, PluginTemplateApplicationSummary
|
|
10
|
+
import { PluginTargetApp, PluginTargetAppMeta, PluginTemplateApplicationSummary } from '../plugin';
|
|
9
11
|
export interface IXpertTemplate extends IBasePerTenantEntityModel {
|
|
10
12
|
key: string;
|
|
11
13
|
name?: string;
|
|
@@ -101,7 +103,8 @@ export type TTemplate = {
|
|
|
101
103
|
pluginVersion?: string;
|
|
102
104
|
contentHash?: string;
|
|
103
105
|
xpertName?: string;
|
|
104
|
-
|
|
106
|
+
manifest?: TemplateManifest;
|
|
107
|
+
dependencies?: import('./assistant-template-dependencies.model').AssistantTemplateDependencies;
|
|
105
108
|
/** Explicit capability requirements/options, implemented by registered providers. */
|
|
106
109
|
capabilities?: AssistantCapabilityDeclaration[];
|
|
107
110
|
/** Capabilities composed into this resolved template variant. */
|
|
@@ -116,14 +119,13 @@ export type TXpertTemplate = TTemplate & {
|
|
|
116
119
|
type: XpertTypeEnum | 'project';
|
|
117
120
|
copilotModel?: Partial<TCopilotModel>;
|
|
118
121
|
};
|
|
119
|
-
export type TXpertTemplateSummary = Omit<TXpertTemplate, 'export_data'
|
|
122
|
+
export type TXpertTemplateSummary = Omit<TXpertTemplate, 'export_data' | 'manifest'> & {
|
|
123
|
+
/** Catalog membership discriminator; full application configuration is detail-only. */
|
|
124
|
+
hasApplication?: boolean;
|
|
125
|
+
};
|
|
120
126
|
/** Opt-in capabilities offered by the serving distribution for a template. */
|
|
121
127
|
export type XpertTemplateCapability = string;
|
|
122
|
-
export
|
|
123
|
-
key: string;
|
|
124
|
-
/** Required capabilities cannot be disabled; optional capabilities default to off. */
|
|
125
|
-
required?: boolean;
|
|
126
|
-
}
|
|
128
|
+
export type { AssistantCapabilityDeclaration } from './assistant-capability.model';
|
|
127
129
|
/** Public model metadata for capability setup; never includes provider credentials or model configuration. */
|
|
128
130
|
export interface XpertTemplateModelOption extends ModelSelectionMetadata {
|
|
129
131
|
/** Opaque selection key; clients must submit it unchanged rather than reconstructing it. */
|
|
@@ -133,6 +135,7 @@ export interface XpertTemplateModelOption extends ModelSelectionMetadata {
|
|
|
133
135
|
copilotModel: TCopilotModel;
|
|
134
136
|
}
|
|
135
137
|
export interface XpertTemplateSetup {
|
|
138
|
+
readiness?: TemplateReadiness;
|
|
136
139
|
/** ID of a compatible organization default in `models`; absent if none qualifies. */
|
|
137
140
|
defaultModelId?: string;
|
|
138
141
|
realtimeModels?: import('./realtime-voice.model').RealtimeModelOption[];
|
|
@@ -148,6 +151,7 @@ export interface XpertTemplateSetup {
|
|
|
148
151
|
reason?: string;
|
|
149
152
|
}
|
|
150
153
|
export interface TXpertTemplateCatalogQuery {
|
|
154
|
+
assistantsOnly?: boolean;
|
|
151
155
|
search?: string;
|
|
152
156
|
category?: string;
|
|
153
157
|
pluginName?: string;
|
package/src/ai/xpert.model.d.ts
CHANGED
|
@@ -275,6 +275,10 @@ export type TXpertWorkbenchOptions = {
|
|
|
275
275
|
* `<plugin package>:<template key>` so a later sync resolves the same provider.
|
|
276
276
|
*/
|
|
277
277
|
export type TXpertTemplateSource = {
|
|
278
|
+
/** Portable section hashes at installation/update, used for three-way conflict detection. */
|
|
279
|
+
baseline?: Partial<Record<import('./template-lifecycle.model').TemplateUpgradeSection, string>>;
|
|
280
|
+
manifest?: import('./template-manifest.model').TemplateManifest;
|
|
281
|
+
dependencyLocks?: import('./template-manifest.model').TemplateDependencyLock[];
|
|
278
282
|
templateId: string;
|
|
279
283
|
templateKey: string;
|
|
280
284
|
pluginName?: string;
|
|
@@ -301,6 +305,9 @@ export type TXpertDataXpertOptions = {
|
|
|
301
305
|
[key: string]: unknown;
|
|
302
306
|
};
|
|
303
307
|
export type TXpertOptions = {
|
|
308
|
+
operationPolicy?: import('./assistant-template-setup.model').AssistantOperationPolicy;
|
|
309
|
+
templateDefinition?: import('./assistant-template.model').AssistantTemplateMetadata;
|
|
310
|
+
templateDependencyLocks?: import('./template-installation.model').TemplateDependencyLock[];
|
|
304
311
|
/** Default ChatKit message display for this Assistant. Omit to inherit the host application's default. */
|
|
305
312
|
messagePresentation?: {
|
|
306
313
|
mode?: 'transcript' | 'bubbles';
|
|
@@ -550,6 +557,7 @@ export type TXpertGraph = {
|
|
|
550
557
|
connections: TXpertTeamConnection[];
|
|
551
558
|
};
|
|
552
559
|
export type TXpertTeamDraft = TXpertGraph & {
|
|
560
|
+
template?: import('./assistant-template.model').AssistantTemplateMetadata;
|
|
553
561
|
team: Partial<IXpert>;
|
|
554
562
|
savedAt?: Date;
|
|
555
563
|
checklist?: ChecklistItem[];
|
package/src/api-key.model.d.ts
CHANGED
|
@@ -5,16 +5,18 @@ import { IUser } from './user.model';
|
|
|
5
5
|
* Represents an API key used for authentication and authorization.
|
|
6
6
|
*/
|
|
7
7
|
export interface IApiKey extends IBasePerTenantAndOrganizationEntityModel {
|
|
8
|
+
/** Plaintext for resource keys; SHA-256 digest for USER credentials. */
|
|
8
9
|
token: string;
|
|
9
10
|
name?: string;
|
|
10
11
|
/**
|
|
11
|
-
* Stable persisted binding kind for resolving the
|
|
12
|
+
* Stable persisted binding kind for resolving the human or resource principal behind this key.
|
|
12
13
|
* @deprecated Reading IApiPrincipal.apiKey.type for resource authorization is deprecated;
|
|
13
14
|
* use IApiPrincipal.resourceScope.kind. This persisted identity discriminator remains supported.
|
|
14
15
|
*/
|
|
15
16
|
type?: ApiKeyBindingType;
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
+
* Persisted identity binding. Examples:
|
|
19
|
+
* - user => human owner userId
|
|
18
20
|
* - assistant => xpertId
|
|
19
21
|
* - workspace => workspaceId
|
|
20
22
|
* - integration => integrationId
|
|
@@ -26,9 +28,12 @@ export interface IApiKey extends IBasePerTenantAndOrganizationEntityModel {
|
|
|
26
28
|
validUntil?: Date;
|
|
27
29
|
expired?: boolean;
|
|
28
30
|
lastUsedAt?: Date;
|
|
31
|
+
/** Display prefix for one-time personal credentials. */
|
|
32
|
+
prefix?: string | null;
|
|
33
|
+
revokedAt?: Date | null;
|
|
29
34
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
35
|
+
* Bound principal: a fixed human owner for USER keys, otherwise the technical principal.
|
|
36
|
+
* USER bindings must also match entityId; resource bindings prefer this explicit principal.
|
|
32
37
|
*/
|
|
33
38
|
userId?: string;
|
|
34
39
|
user?: IUser;
|
|
@@ -39,9 +44,11 @@ export interface IApiKey extends IBasePerTenantAndOrganizationEntityModel {
|
|
|
39
44
|
*/
|
|
40
45
|
export declare const API_PRINCIPAL_USER_ID_HEADER = "x-principal-user-id";
|
|
41
46
|
/**
|
|
42
|
-
* Stable binding kinds used to resolve
|
|
47
|
+
* Stable binding kinds used to resolve personal or resource credentials.
|
|
43
48
|
*/
|
|
44
49
|
export declare enum ApiKeyBindingType {
|
|
50
|
+
/** A fixed human owner, without an Assistant or workspace audience. */
|
|
51
|
+
USER = "user",
|
|
45
52
|
ASSISTANT = "assistant",
|
|
46
53
|
WORKSPACE = "workspace",
|
|
47
54
|
INTEGRATION = "integration",
|
package/src/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export * from './organization-team-employee-model';
|
|
|
26
26
|
export * from './organization-team-model';
|
|
27
27
|
export * from './organization.model';
|
|
28
28
|
export * from './role-permission.model';
|
|
29
|
+
export * from './role-permission-modules';
|
|
29
30
|
export * from './referral.model';
|
|
30
31
|
export * from './seed.model';
|
|
31
32
|
export * from './tag-entity.model';
|
|
@@ -54,6 +55,7 @@ export * from './integration/index';
|
|
|
54
55
|
export * from './ai/index';
|
|
55
56
|
export * from './agent/index';
|
|
56
57
|
export * from './api-key.model';
|
|
58
|
+
export * from './personal-api-key.model';
|
|
57
59
|
export * from './artifact.model';
|
|
58
60
|
export * from './business-area.model';
|
|
59
61
|
export * from './collaboration.model';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** A personal credential uses existing API-key endpoints as its human owner, subject to their current permissions. */
|
|
2
|
+
export declare const PERSONAL_API_KEY_LIFETIMES: readonly ["30", "90", "365", "never"];
|
|
3
|
+
export type PersonalApiKeyLifetime = (typeof PERSONAL_API_KEY_LIFETIMES)[number];
|
|
4
|
+
export interface PersonalApiKeyCreateInput {
|
|
5
|
+
name: string;
|
|
6
|
+
lifetime?: PersonalApiKeyLifetime;
|
|
7
|
+
}
|
|
8
|
+
/** Public metadata only; neither the secret nor its hash is returned by list endpoints. */
|
|
9
|
+
export interface PersonalApiKeySummary {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
prefix: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
expiresAt: string | null;
|
|
15
|
+
lastUsedAt: string | null;
|
|
16
|
+
revokedAt: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface PersonalApiKeyCreated {
|
|
19
|
+
key: PersonalApiKeySummary;
|
|
20
|
+
token: string;
|
|
21
|
+
}
|
|
@@ -228,7 +228,15 @@ export interface PluginApplicationPreflight {
|
|
|
228
228
|
toolsetRequirements?: PluginApplicationToolsetRequirement[];
|
|
229
229
|
}
|
|
230
230
|
/** Complete application detail assembled from trusted plugin metadata and scoped runtime state. */
|
|
231
|
+
export interface PluginApplicationCompositionItem {
|
|
232
|
+
key: string;
|
|
233
|
+
kind: 'assistant' | 'workspace' | 'knowledgebase';
|
|
234
|
+
role?: 'primary' | 'specialist' | 'standalone';
|
|
235
|
+
templateKey?: string;
|
|
236
|
+
title: string | I18nObject;
|
|
237
|
+
}
|
|
231
238
|
export interface PluginApplicationDetail {
|
|
239
|
+
composition: PluginApplicationCompositionItem[];
|
|
232
240
|
application: PluginTemplateApplicationSummary;
|
|
233
241
|
status: PluginApplicationStatusSummary;
|
|
234
242
|
preflight: PluginApplicationPreflight;
|
|
@@ -11,6 +11,9 @@ export interface IPlugin extends IBasePerTenantAndOrganizationEntityModel {
|
|
|
11
11
|
source?: PluginSource;
|
|
12
12
|
sourceConfig?: PluginSourceConfig | null;
|
|
13
13
|
level?: PluginLevel;
|
|
14
|
+
meta?: PluginMeta | null;
|
|
15
|
+
/** Persisted installation intent; live runtime reports determine actual availability. */
|
|
16
|
+
pendingRestart?: boolean;
|
|
14
17
|
config: Record<string, any>;
|
|
15
18
|
configurationStatus?: PluginConfigurationStatus | null;
|
|
16
19
|
configurationError?: string | null;
|
package/src/plugin.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare const PLUGIN_CONFIGURATION_STATUS: {
|
|
|
29
29
|
};
|
|
30
30
|
export declare const PLUGIN_LOAD_STATUS: {
|
|
31
31
|
readonly LOADED: "loaded";
|
|
32
|
+
readonly PENDING_RESTART: "pending_restart";
|
|
32
33
|
readonly FAILED: "failed";
|
|
33
34
|
};
|
|
34
35
|
export declare const PLUGIN_COMPONENT_TYPE: {
|
|
@@ -72,7 +73,7 @@ export declare const PLUGIN_RESOURCE_ERROR_CODE: {
|
|
|
72
73
|
/**
|
|
73
74
|
* Classifies plugin scope and governance.
|
|
74
75
|
* - `system`: built-in/platform-managed plugin that users cannot install/uninstall from org APIs.
|
|
75
|
-
* - `tenant`: tenant-owned plugin
|
|
76
|
+
* - `tenant`: tenant-owned plugin shared across organizations in its owning tenant.
|
|
76
77
|
* - `organization`: tenant/org-managed plugin that can be installed and removed per organization.
|
|
77
78
|
*/
|
|
78
79
|
export type PluginLevel = (typeof PLUGIN_LEVEL)[keyof typeof PLUGIN_LEVEL];
|
|
@@ -197,43 +198,8 @@ export interface XpertPluginBundleManifest {
|
|
|
197
198
|
targetApps?: PluginTargetApp[];
|
|
198
199
|
targetAppMeta?: PluginTargetAppMeta;
|
|
199
200
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
componentKey: string;
|
|
203
|
-
targetAgentKey?: string;
|
|
204
|
-
}
|
|
205
|
-
export interface XpertTemplatePluginMcpServerDependency {
|
|
206
|
-
pluginName?: PluginName;
|
|
207
|
-
componentKey: string;
|
|
208
|
-
targetAgentKey?: string;
|
|
209
|
-
policyOverrides?: XpertPluginMcpServerPolicy;
|
|
210
|
-
}
|
|
211
|
-
export interface XpertTemplatePluginHookDependency {
|
|
212
|
-
pluginName?: PluginName;
|
|
213
|
-
componentKey: string;
|
|
214
|
-
targetAgentKey?: string;
|
|
215
|
-
events?: string[];
|
|
216
|
-
}
|
|
217
|
-
export interface XpertTemplatePluginAppDependency {
|
|
218
|
-
pluginName?: PluginName;
|
|
219
|
-
componentKey: string;
|
|
220
|
-
auth?: 'on_install' | 'on_first_use';
|
|
221
|
-
}
|
|
222
|
-
export interface XpertTemplatePluginToolsetDependency {
|
|
223
|
-
pluginName?: PluginName;
|
|
224
|
-
provider: string;
|
|
225
|
-
templateNodeKey: string;
|
|
226
|
-
targetAgentKey?: string;
|
|
227
|
-
instanceName?: string;
|
|
228
|
-
}
|
|
229
|
-
export interface XpertTemplatePluginDependencies {
|
|
230
|
-
plugins?: PluginName[];
|
|
231
|
-
skills?: XpertTemplatePluginSkillDependency[];
|
|
232
|
-
mcpServers?: XpertTemplatePluginMcpServerDependency[];
|
|
233
|
-
hooks?: XpertTemplatePluginHookDependency[];
|
|
234
|
-
apps?: XpertTemplatePluginAppDependency[];
|
|
235
|
-
toolsets?: XpertTemplatePluginToolsetDependency[];
|
|
236
|
-
}
|
|
201
|
+
/** @deprecated Use the Assistant template domain contracts. */
|
|
202
|
+
export type { AssistantTemplateSkillDependency as XpertTemplatePluginSkillDependency, AssistantTemplateMcpServerDependency as XpertTemplatePluginMcpServerDependency, AssistantTemplateHookDependency as XpertTemplatePluginHookDependency, AssistantTemplateAppDependency as XpertTemplatePluginAppDependency, AssistantTemplateToolsetDependency as XpertTemplatePluginToolsetDependency, AssistantTemplateDependencies as XpertTemplatePluginDependencies } from './ai/assistant-template-dependencies.model';
|
|
237
203
|
export interface PluginMarketplaceContribution {
|
|
238
204
|
/** Project types defined by an App, separate from installation configuration. */
|
|
239
205
|
projectTypes?: import('./ai/xpert-project-type.model').XpertProjectTypeDefinition[];
|
|
@@ -309,7 +275,14 @@ export interface PluginCodeSourceConfig {
|
|
|
309
275
|
export interface PluginSourceConfig extends PluginCodeSourceConfig {
|
|
310
276
|
[key: string]: unknown;
|
|
311
277
|
}
|
|
278
|
+
export interface PluginRuntimePolicy {
|
|
279
|
+
install: 'hot' | 'restart';
|
|
280
|
+
update: 'hot' | 'restart';
|
|
281
|
+
uninstall: 'hot' | 'restart';
|
|
282
|
+
}
|
|
312
283
|
export interface PluginMeta {
|
|
284
|
+
/** Explicit lifecycle support, independent of scope. Declared in package.json xpert.plugin. */
|
|
285
|
+
runtimePolicy?: PluginRuntimePolicy;
|
|
313
286
|
name: PluginName;
|
|
314
287
|
version: string;
|
|
315
288
|
/**
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Display-only grouping. PermissionGroups remains the authority for access rules. */
|
|
2
|
+
export type RolePermissionModule = 'ai' | 'projects' | 'members' | 'billing' | 'data' | 'personal' | 'other';
|
|
3
|
+
export declare const ROLE_PERMISSION_MODULES: ReadonlyMap<string, RolePermissionModule>;
|
package/src/runtime-control.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface IRuntimeStreamInterruption {
|
|
|
6
6
|
message: string;
|
|
7
7
|
}
|
|
8
8
|
export type RuntimeRestartMode = 'self-signal' | 'rolling-self-signal';
|
|
9
|
-
export type RuntimeRestartStatus = 'in_progress' | 'completed' | 'failed';
|
|
9
|
+
export type RuntimeRestartStatus = 'in_progress' | 'completed' | 'failed' | 'awaiting_restart';
|
|
10
10
|
export interface IRuntimePluginRequirement {
|
|
11
11
|
scopeKey: string;
|
|
12
12
|
pluginName: string;
|
|
@@ -29,6 +29,8 @@ export interface IRuntimeRestartRequest {
|
|
|
29
29
|
confirmation: typeof RUNTIME_RESTART_CONFIRMATION;
|
|
30
30
|
/** Optional non-sensitive reason written to the structured server audit log. */
|
|
31
31
|
reason?: string;
|
|
32
|
+
/** Explicitly permit restarting the last healthy replica during an operator-approved outage. Defaults to false. */
|
|
33
|
+
allowDowntime?: boolean;
|
|
32
34
|
/** Plugin runtime state that every replacement process must confirm after boot. */
|
|
33
35
|
runtimeRequirements?: IRuntimePluginRequirement[];
|
|
34
36
|
}
|
|
@@ -64,7 +66,7 @@ export interface IPluginRuntimeConvergenceStatus {
|
|
|
64
66
|
error?: string;
|
|
65
67
|
}
|
|
66
68
|
export interface IRuntimeReadiness {
|
|
67
|
-
status: 'ready' | 'draining';
|
|
69
|
+
status: 'ready' | 'draining' | 'unready';
|
|
68
70
|
instanceId: string;
|
|
69
71
|
activeRequests: number;
|
|
70
72
|
restartId?: string;
|