@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,44 @@
|
|
|
1
|
+
import type { AssistantCapabilitySummary } from './assistant-capability.model';
|
|
2
|
+
import type { AssistantOperationPolicy } from './assistant-template-setup.model';
|
|
3
|
+
import type { AssistantTemplateManifest } from './assistant-template-manifest.model';
|
|
4
|
+
/** Catalog content only: never installed Assistant memories, credentials or runtime bindings. */
|
|
5
|
+
export interface AssistantTemplateOverview {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
publisher: string;
|
|
10
|
+
version?: string;
|
|
11
|
+
instructions: string;
|
|
12
|
+
memories: {
|
|
13
|
+
title: string;
|
|
14
|
+
content?: string;
|
|
15
|
+
}[];
|
|
16
|
+
skills: AssistantCapabilitySummary['skills'];
|
|
17
|
+
agents: AssistantCapabilitySummary['agents'];
|
|
18
|
+
onboarding?: Required<NonNullable<AssistantTemplateManifest['onboarding']>>;
|
|
19
|
+
routines: Required<NonNullable<AssistantTemplateManifest['routines']>[number]>[];
|
|
20
|
+
integrations: {
|
|
21
|
+
key: string;
|
|
22
|
+
kind: 'connector' | 'mcp' | 'app' | 'toolset';
|
|
23
|
+
label: string;
|
|
24
|
+
description: string;
|
|
25
|
+
required: boolean;
|
|
26
|
+
permissions: string[];
|
|
27
|
+
}[];
|
|
28
|
+
files?: {
|
|
29
|
+
scope: 'shared' | 'user';
|
|
30
|
+
paths: string[];
|
|
31
|
+
};
|
|
32
|
+
operationPolicy?: {
|
|
33
|
+
default: NonNullable<AssistantOperationPolicy['default']>;
|
|
34
|
+
rules: {
|
|
35
|
+
tool: string;
|
|
36
|
+
decision: 'allow' | 'approve' | 'deny';
|
|
37
|
+
reason?: string;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
application?: {
|
|
41
|
+
appName: string;
|
|
42
|
+
pluginName: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { TemplateManifest } from './assistant-template-manifest.model';
|
|
3
|
+
export declare const templatePreferenceValuesSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>;
|
|
4
|
+
export declare const assistantTemplateSetupStateSchema: z.ZodObject<{
|
|
5
|
+
revision: z.ZodNumber;
|
|
6
|
+
preferences: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>;
|
|
7
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
8
|
+
firstResult: z.ZodOptional<z.ZodString>;
|
|
9
|
+
connectors: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"choice", [z.ZodObject<{
|
|
10
|
+
choice: z.ZodLiteral<"binding">;
|
|
11
|
+
bindingId: z.ZodString;
|
|
12
|
+
}, "strict", z.ZodTypeAny, {
|
|
13
|
+
bindingId?: string;
|
|
14
|
+
choice?: "binding";
|
|
15
|
+
}, {
|
|
16
|
+
bindingId?: string;
|
|
17
|
+
choice?: "binding";
|
|
18
|
+
}>, z.ZodObject<{
|
|
19
|
+
choice: z.ZodLiteral<"skip">;
|
|
20
|
+
}, "strict", z.ZodTypeAny, {
|
|
21
|
+
choice?: "skip";
|
|
22
|
+
}, {
|
|
23
|
+
choice?: "skip";
|
|
24
|
+
}>]>>;
|
|
25
|
+
}, "strict", z.ZodTypeAny, {
|
|
26
|
+
preferences?: Record<string, string>;
|
|
27
|
+
connectors?: Record<string, {
|
|
28
|
+
bindingId?: string;
|
|
29
|
+
choice?: "binding";
|
|
30
|
+
} | {
|
|
31
|
+
choice?: "skip";
|
|
32
|
+
}>;
|
|
33
|
+
completedAt?: string;
|
|
34
|
+
revision?: number;
|
|
35
|
+
firstResult?: string;
|
|
36
|
+
}, {
|
|
37
|
+
preferences?: Record<string, string>;
|
|
38
|
+
connectors?: Record<string, {
|
|
39
|
+
bindingId?: string;
|
|
40
|
+
choice?: "binding";
|
|
41
|
+
} | {
|
|
42
|
+
choice?: "skip";
|
|
43
|
+
}>;
|
|
44
|
+
completedAt?: string;
|
|
45
|
+
revision?: number;
|
|
46
|
+
firstResult?: string;
|
|
47
|
+
}>;
|
|
48
|
+
export type AssistantTemplateSetupState = z.output<typeof assistantTemplateSetupStateSchema>;
|
|
49
|
+
export declare const templateSetupUpdateSchema: z.ZodObject<{
|
|
50
|
+
revision: z.ZodNumber;
|
|
51
|
+
preferences: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>>;
|
|
52
|
+
firstResult: z.ZodOptional<z.ZodString>;
|
|
53
|
+
connector: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
key: z.ZodString;
|
|
55
|
+
selection: z.ZodDiscriminatedUnion<"choice", [z.ZodObject<{
|
|
56
|
+
choice: z.ZodLiteral<"binding">;
|
|
57
|
+
bindingId: z.ZodString;
|
|
58
|
+
}, "strict", z.ZodTypeAny, {
|
|
59
|
+
bindingId?: string;
|
|
60
|
+
choice?: "binding";
|
|
61
|
+
}, {
|
|
62
|
+
bindingId?: string;
|
|
63
|
+
choice?: "binding";
|
|
64
|
+
}>, z.ZodObject<{
|
|
65
|
+
choice: z.ZodLiteral<"skip">;
|
|
66
|
+
}, "strict", z.ZodTypeAny, {
|
|
67
|
+
choice?: "skip";
|
|
68
|
+
}, {
|
|
69
|
+
choice?: "skip";
|
|
70
|
+
}>]>;
|
|
71
|
+
}, "strict", z.ZodTypeAny, {
|
|
72
|
+
selection?: {
|
|
73
|
+
bindingId?: string;
|
|
74
|
+
choice?: "binding";
|
|
75
|
+
} | {
|
|
76
|
+
choice?: "skip";
|
|
77
|
+
};
|
|
78
|
+
key?: string;
|
|
79
|
+
}, {
|
|
80
|
+
selection?: {
|
|
81
|
+
bindingId?: string;
|
|
82
|
+
choice?: "binding";
|
|
83
|
+
} | {
|
|
84
|
+
choice?: "skip";
|
|
85
|
+
};
|
|
86
|
+
key?: string;
|
|
87
|
+
}>>;
|
|
88
|
+
}, "strict", z.ZodTypeAny, {
|
|
89
|
+
preferences?: Record<string, string>;
|
|
90
|
+
revision?: number;
|
|
91
|
+
connector?: {
|
|
92
|
+
selection?: {
|
|
93
|
+
bindingId?: string;
|
|
94
|
+
choice?: "binding";
|
|
95
|
+
} | {
|
|
96
|
+
choice?: "skip";
|
|
97
|
+
};
|
|
98
|
+
key?: string;
|
|
99
|
+
};
|
|
100
|
+
firstResult?: string;
|
|
101
|
+
}, {
|
|
102
|
+
preferences?: Record<string, string>;
|
|
103
|
+
revision?: number;
|
|
104
|
+
connector?: {
|
|
105
|
+
selection?: {
|
|
106
|
+
bindingId?: string;
|
|
107
|
+
choice?: "binding";
|
|
108
|
+
} | {
|
|
109
|
+
choice?: "skip";
|
|
110
|
+
};
|
|
111
|
+
key?: string;
|
|
112
|
+
};
|
|
113
|
+
firstResult?: string;
|
|
114
|
+
}>;
|
|
115
|
+
export type TemplateSetupUpdate = z.output<typeof templateSetupUpdateSchema>;
|
|
116
|
+
export interface AssistantTemplateSetup {
|
|
117
|
+
assistantId: string;
|
|
118
|
+
state: AssistantTemplateSetupState;
|
|
119
|
+
onboarding?: TemplateManifest['onboarding'];
|
|
120
|
+
connectors: {
|
|
121
|
+
key: string;
|
|
122
|
+
provider: string;
|
|
123
|
+
required: boolean;
|
|
124
|
+
purpose: string;
|
|
125
|
+
permissions: string[];
|
|
126
|
+
status: 'ready' | 'skipped' | 'requires_auth' | 'expired' | 'unavailable';
|
|
127
|
+
options: {
|
|
128
|
+
bindingId: string;
|
|
129
|
+
label: string;
|
|
130
|
+
status: string;
|
|
131
|
+
runtimeUsage?: 'middleware' | 'credential';
|
|
132
|
+
}[];
|
|
133
|
+
}[];
|
|
134
|
+
managementUrl?: string;
|
|
135
|
+
routines: TemplateRoutineStatus[];
|
|
136
|
+
}
|
|
137
|
+
export interface TemplateRoutineStatus {
|
|
138
|
+
key: string;
|
|
139
|
+
supported: boolean;
|
|
140
|
+
skill: string;
|
|
141
|
+
output: string;
|
|
142
|
+
taskId?: string;
|
|
143
|
+
enabled: boolean;
|
|
144
|
+
expression: string;
|
|
145
|
+
timeZone?: string;
|
|
146
|
+
nextRunAt?: string;
|
|
147
|
+
}
|
|
148
|
+
/** Assistant execution policy, independent of template delivery metadata. Exact tool names only. */
|
|
149
|
+
export declare const assistantOperationPolicySchema: z.ZodEffects<z.ZodObject<{
|
|
150
|
+
default: z.ZodEnum<["allow", "approve", "deny"]>;
|
|
151
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
152
|
+
tool: z.ZodString;
|
|
153
|
+
decision: z.ZodEnum<["allow", "approve", "deny"]>;
|
|
154
|
+
reason: z.ZodString;
|
|
155
|
+
}, "strict", z.ZodTypeAny, {
|
|
156
|
+
reason?: string;
|
|
157
|
+
tool?: string;
|
|
158
|
+
decision?: "allow" | "deny" | "approve";
|
|
159
|
+
}, {
|
|
160
|
+
reason?: string;
|
|
161
|
+
tool?: string;
|
|
162
|
+
decision?: "allow" | "deny" | "approve";
|
|
163
|
+
}>, "many">;
|
|
164
|
+
}, "strict", z.ZodTypeAny, {
|
|
165
|
+
default?: "allow" | "deny" | "approve";
|
|
166
|
+
rules?: {
|
|
167
|
+
reason?: string;
|
|
168
|
+
tool?: string;
|
|
169
|
+
decision?: "allow" | "deny" | "approve";
|
|
170
|
+
}[];
|
|
171
|
+
}, {
|
|
172
|
+
default?: "allow" | "deny" | "approve";
|
|
173
|
+
rules?: {
|
|
174
|
+
reason?: string;
|
|
175
|
+
tool?: string;
|
|
176
|
+
decision?: "allow" | "deny" | "approve";
|
|
177
|
+
}[];
|
|
178
|
+
}>, {
|
|
179
|
+
default?: "allow" | "deny" | "approve";
|
|
180
|
+
rules?: {
|
|
181
|
+
reason?: string;
|
|
182
|
+
tool?: string;
|
|
183
|
+
decision?: "allow" | "deny" | "approve";
|
|
184
|
+
}[];
|
|
185
|
+
}, {
|
|
186
|
+
default?: "allow" | "deny" | "approve";
|
|
187
|
+
rules?: {
|
|
188
|
+
reason?: string;
|
|
189
|
+
tool?: string;
|
|
190
|
+
decision?: "allow" | "deny" | "approve";
|
|
191
|
+
}[];
|
|
192
|
+
}>;
|
|
193
|
+
export type AssistantOperationPolicy = z.output<typeof assistantOperationPolicySchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TXpertTeamDraft } from './xpert.model';
|
|
2
|
+
import type { AssistantTemplateDependencies } from './assistant-template-dependencies.model';
|
|
3
|
+
import type { AssistantTemplateManifest } from './assistant-template-manifest.model';
|
|
4
|
+
/** Portable metadata carried by both ordinary DSL exports and plugin distribution. */
|
|
5
|
+
export interface AssistantTemplateMetadata {
|
|
6
|
+
schemaVersion: 2;
|
|
7
|
+
dependencies?: AssistantTemplateDependencies;
|
|
8
|
+
manifest?: AssistantTemplateManifest;
|
|
9
|
+
}
|
|
10
|
+
export type AssistantTemplateDefinition = TXpertTeamDraft & {
|
|
11
|
+
template?: AssistantTemplateMetadata;
|
|
12
|
+
memories?: {
|
|
13
|
+
prefix: string;
|
|
14
|
+
value: unknown;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
@@ -12,6 +12,10 @@ export type TAssistantModelSelectionPreference = {
|
|
|
12
12
|
* another single-purpose preference entity.
|
|
13
13
|
*/
|
|
14
14
|
export type TAssistantUserPreferenceDomainMap = {
|
|
15
|
+
templateActivity: {
|
|
16
|
+
read: string[];
|
|
17
|
+
};
|
|
18
|
+
templateSetup: import('./assistant-template-setup.model').AssistantTemplateSetupState;
|
|
15
19
|
modelSelection: TAssistantModelSelectionPreference;
|
|
16
20
|
conversationSidebar: Record<string, TChatConversationSidebarState>;
|
|
17
21
|
};
|
|
@@ -2,6 +2,7 @@ import { AiModelTypeEnum } from '../agent';
|
|
|
2
2
|
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
3
3
|
import { IAiProviderEntity } from './ai-model.model';
|
|
4
4
|
import { ICopilot } from './copilot.model';
|
|
5
|
+
import type { ModelConfiguration, ModelDiscoveryState } from './model-discovery.model';
|
|
5
6
|
export interface ICopilotProvider extends IBasePerTenantAndOrganizationEntityModel {
|
|
6
7
|
providerName?: string;
|
|
7
8
|
providerType?: string;
|
|
@@ -13,7 +14,9 @@ export interface ICopilotProvider extends IBasePerTenantAndOrganizationEntityMod
|
|
|
13
14
|
quotaUsed?: number;
|
|
14
15
|
/**
|
|
15
16
|
*/
|
|
16
|
-
options?:
|
|
17
|
+
options?: Record<string, unknown> & {
|
|
18
|
+
modelDiscovery?: ModelDiscoveryState;
|
|
19
|
+
};
|
|
17
20
|
copilot?: ICopilot;
|
|
18
21
|
copilotId?: string;
|
|
19
22
|
models?: ICopilotProviderModel[];
|
|
@@ -23,7 +26,11 @@ export interface ICopilotProviderModel extends IBasePerTenantAndOrganizationEnti
|
|
|
23
26
|
providerName?: string;
|
|
24
27
|
modelName?: string;
|
|
25
28
|
modelType?: AiModelTypeEnum;
|
|
26
|
-
modelProperties?: Record<string, any
|
|
29
|
+
modelProperties?: Record<string, any> & {
|
|
30
|
+
model_configuration?: ModelConfiguration;
|
|
31
|
+
discovery_model_id?: string;
|
|
32
|
+
configuration_source?: 'discovered' | 'manual';
|
|
33
|
+
};
|
|
27
34
|
isValid?: boolean;
|
|
28
35
|
provider?: ICopilotProvider;
|
|
29
36
|
providerId?: string;
|
|
@@ -89,7 +89,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
|
|
|
89
89
|
}[];
|
|
90
90
|
}>]>>;
|
|
91
91
|
}, "strict", z.ZodTypeAny, {
|
|
92
|
-
status?: "
|
|
92
|
+
status?: "unknown" | "succeeded" | "failed" | "running";
|
|
93
93
|
name?: string;
|
|
94
94
|
input?: string;
|
|
95
95
|
output?: string;
|
|
@@ -114,7 +114,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
|
|
|
114
114
|
key?: string;
|
|
115
115
|
};
|
|
116
116
|
}, {
|
|
117
|
-
status?: "
|
|
117
|
+
status?: "unknown" | "succeeded" | "failed" | "running";
|
|
118
118
|
name?: string;
|
|
119
119
|
input?: string;
|
|
120
120
|
output?: string;
|
|
@@ -157,7 +157,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
|
|
|
157
157
|
text?: string;
|
|
158
158
|
kind?: "message";
|
|
159
159
|
} | {
|
|
160
|
-
status?: "
|
|
160
|
+
status?: "unknown" | "succeeded" | "failed" | "running";
|
|
161
161
|
name?: string;
|
|
162
162
|
input?: string;
|
|
163
163
|
output?: string;
|
|
@@ -193,7 +193,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
|
|
|
193
193
|
text?: string;
|
|
194
194
|
kind?: "message";
|
|
195
195
|
} | {
|
|
196
|
-
status?: "
|
|
196
|
+
status?: "unknown" | "succeeded" | "failed" | "running";
|
|
197
197
|
name?: string;
|
|
198
198
|
input?: string;
|
|
199
199
|
output?: string;
|
|
@@ -304,7 +304,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
304
304
|
}[];
|
|
305
305
|
}>]>>;
|
|
306
306
|
}, "strict", z.ZodTypeAny, {
|
|
307
|
-
status?: "
|
|
307
|
+
status?: "unknown" | "succeeded" | "failed" | "running";
|
|
308
308
|
name?: string;
|
|
309
309
|
input?: string;
|
|
310
310
|
output?: string;
|
|
@@ -329,7 +329,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
329
329
|
key?: string;
|
|
330
330
|
};
|
|
331
331
|
}, {
|
|
332
|
-
status?: "
|
|
332
|
+
status?: "unknown" | "succeeded" | "failed" | "running";
|
|
333
333
|
name?: string;
|
|
334
334
|
input?: string;
|
|
335
335
|
output?: string;
|
|
@@ -372,7 +372,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
372
372
|
text?: string;
|
|
373
373
|
kind?: "message";
|
|
374
374
|
} | {
|
|
375
|
-
status?: "
|
|
375
|
+
status?: "unknown" | "succeeded" | "failed" | "running";
|
|
376
376
|
name?: string;
|
|
377
377
|
input?: string;
|
|
378
378
|
output?: string;
|
|
@@ -408,7 +408,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
408
408
|
text?: string;
|
|
409
409
|
kind?: "message";
|
|
410
410
|
} | {
|
|
411
|
-
status?: "
|
|
411
|
+
status?: "unknown" | "succeeded" | "failed" | "running";
|
|
412
412
|
name?: string;
|
|
413
413
|
input?: string;
|
|
414
414
|
output?: string;
|
|
@@ -451,7 +451,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
451
451
|
text?: string;
|
|
452
452
|
kind?: "message";
|
|
453
453
|
} | {
|
|
454
|
-
status?: "
|
|
454
|
+
status?: "unknown" | "succeeded" | "failed" | "running";
|
|
455
455
|
name?: string;
|
|
456
456
|
input?: string;
|
|
457
457
|
output?: string;
|
|
@@ -493,7 +493,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
493
493
|
text?: string;
|
|
494
494
|
kind?: "message";
|
|
495
495
|
} | {
|
|
496
|
-
status?: "
|
|
496
|
+
status?: "unknown" | "succeeded" | "failed" | "running";
|
|
497
497
|
name?: string;
|
|
498
498
|
input?: string;
|
|
499
499
|
output?: string;
|
package/src/ai/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from './assistant-order';
|
|
|
13
13
|
export * from './assistant-model.model';
|
|
14
14
|
export * from './assistant-user-preference.model';
|
|
15
15
|
export * from './ai-model.model';
|
|
16
|
+
export * from './model-discovery.model';
|
|
16
17
|
export * from './ai.model';
|
|
17
18
|
export * from './chat-event.model';
|
|
18
19
|
export { createResourceCardContent, isResourceCardContent, parseResourceCard, parseResourceCardContent, resourceCardId, upsertResourceCardContent } from './resource-card';
|
|
@@ -108,3 +109,12 @@ export * from './chat-group.model';
|
|
|
108
109
|
export * from './chat-group-entity.model';
|
|
109
110
|
export * from './conversation-entry.model';
|
|
110
111
|
export type { ThreadActivitySnapshot } from './thread-activity.model';
|
|
112
|
+
export * from './template-installation.model';
|
|
113
|
+
export * from './template-manifest.model';
|
|
114
|
+
export * from './assistant-template.model';
|
|
115
|
+
export * from './assistant-template-dependencies.model';
|
|
116
|
+
export type { AssistantCapabilitySummary } from './assistant-capability.model';
|
|
117
|
+
export * from './assistant-template-setup.model';
|
|
118
|
+
export * from './template-activity.model';
|
|
119
|
+
export * from './template-lifecycle.model';
|
|
120
|
+
export * from './assistant-template-overview.model';
|