@xpert-ai/contracts 3.29.1 → 3.30.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 +2599 -1489
- package/index.esm.js +3698 -2635
- package/package.json +2 -2
- package/src/ai/ai-model.model.d.ts +8 -0
- package/src/ai/chat-activity.model.d.ts +6 -0
- package/src/ai/chat.model.d.ts +1 -1
- package/src/ai/conversation-trail.model.d.ts +417 -0
- package/src/ai/copilot-provider.model.d.ts +2 -0
- package/src/ai/copilot.model.d.ts +7 -4
- package/src/ai/default-model-role.d.ts +41 -0
- package/src/ai/execution-activity.model.d.ts +12 -0
- package/src/ai/execution-observability.model.d.ts +12 -12
- package/src/ai/index.d.ts +3 -0
- package/src/ai/membership.model.d.ts +2 -0
- package/src/ai/model-discovery.model.d.ts +1 -0
- package/src/ai/model-management.model.d.ts +358 -0
- package/src/ai/model-replacement.model.d.ts +291 -0
- package/src/ai/role-permissions.d.ts +59 -2
- package/src/ai/thread-activity.model.d.ts +1 -0
- package/src/ai/xpert-tool.model.d.ts +4 -3
- package/src/ai/xpert-toolset.model.d.ts +4 -3
- package/src/ai/xpert.model.d.ts +10 -1
- package/src/analytics-definition.model.d.ts +2 -0
- package/src/app-platform.d.ts +666 -0
- package/src/artifact.model.d.ts +1 -1
- package/src/index.d.ts +4 -0
- package/src/integration-sharing.model.d.ts +12 -0
- package/src/integration.model.d.ts +2 -0
- package/src/plugin-application.d.ts +13 -0
- package/src/role-permission-modules.d.ts +13 -1
- package/src/role-permission.model.d.ts +1 -0
- package/src/role.model.d.ts +19 -0
- package/src/types.d.ts +1 -0
- package/src/user-notification.schema.d.ts +721 -0
- package/src/user.model.d.ts +2 -0
- package/src/view-extension/model.d.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xpert-ai/contracts",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.30.1",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@octokit/types": "13.10.0",
|
|
23
23
|
"@types/json-schema": "^7.0.15",
|
|
24
|
-
"@xpert-ai/chatkit-types": "~0.
|
|
24
|
+
"@xpert-ai/chatkit-types": "~0.20.0",
|
|
25
25
|
"zod-to-json-schema": "^3.25.2"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
@@ -51,6 +51,12 @@ export interface ICopilotWithProvider extends ICopilot {
|
|
|
51
51
|
}
|
|
52
52
|
export interface IAiProviderEntity {
|
|
53
53
|
provider: string;
|
|
54
|
+
/** Runtime registry provenance; never infer a plugin package from the provider name. */
|
|
55
|
+
plugin?: {
|
|
56
|
+
name: string;
|
|
57
|
+
version?: string;
|
|
58
|
+
scopeKey: string;
|
|
59
|
+
};
|
|
54
60
|
label: I18nObject;
|
|
55
61
|
description: I18nObject;
|
|
56
62
|
icon_small: I18nObject;
|
|
@@ -67,6 +73,8 @@ export interface IAiProviderEntity {
|
|
|
67
73
|
*/
|
|
68
74
|
not_implemented?: boolean;
|
|
69
75
|
}
|
|
76
|
+
/** Custom-model providers without a shared credential schema validate credentials per model. */
|
|
77
|
+
export declare function usesModelScopedCredentials(provider: Partial<IAiProviderEntity> | null | undefined): boolean;
|
|
70
78
|
export interface ProviderHelpInfo {
|
|
71
79
|
title: I18nObject;
|
|
72
80
|
url: I18nObject;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type TChatConversationStatus = 'idle' | 'busy' | 'pausing' | 'paused' | 'interrupted' | 'error';
|
|
2
2
|
export interface IChatConversationUnreadXpertSummary {
|
|
3
3
|
xpertId: string;
|
|
4
|
+
/** Includes running conversations other than the most recently updated one. */
|
|
5
|
+
hasActiveRuns?: boolean;
|
|
4
6
|
unreadMessages: number;
|
|
5
7
|
unreadConversations: number;
|
|
6
8
|
latestUnreadAt?: Date | string | null;
|
|
@@ -12,3 +14,7 @@ export interface IChatConversationUnreadXpertSummary {
|
|
|
12
14
|
latestConversationTitle?: string | null;
|
|
13
15
|
latestConversationStatus?: TChatConversationStatus | null;
|
|
14
16
|
}
|
|
17
|
+
export interface IChatConversationUnreadSnapshot {
|
|
18
|
+
version: string;
|
|
19
|
+
items: IChatConversationUnreadXpertSummary[];
|
|
20
|
+
}
|
package/src/ai/chat.model.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TChatConversationStatus } from './chat-activity.model';
|
|
2
|
-
export type { TChatConversationStatus, IChatConversationUnreadXpertSummary } from './chat-activity.model';
|
|
2
|
+
export type { TChatConversationStatus, IChatConversationUnreadXpertSummary, IChatConversationUnreadSnapshot } from './chat-activity.model';
|
|
3
3
|
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
4
4
|
import { IXpertAgentExecution } from './xpert-agent-execution.model';
|
|
5
5
|
import { IXpert } from './xpert.model';
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import { z } from 'zod/v3';
|
|
2
|
+
/** Runtime-owned activity semantics. Display names and model prose are never classifiers. */
|
|
3
|
+
export declare const trailActivityKindSchema: z.ZodEnum<["task", "explore", "change", "verify", "answer", "other"]>;
|
|
4
|
+
export type TrailActivityKind = z.infer<typeof trailActivityKindSchema>;
|
|
5
|
+
export declare const trailStatusSchema: z.ZodEnum<["running", "success", "error", "pending", "waiting", "cancelling", "idle", "interrupted", "unknown"]>;
|
|
6
|
+
export type TrailStatus = z.infer<typeof trailStatusSchema>;
|
|
7
|
+
export declare const trailStepSchema: z.ZodObject<{
|
|
8
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
9
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
10
|
+
endedAt: z.ZodOptional<z.ZodString>;
|
|
11
|
+
preview: z.ZodOptional<z.ZodString>;
|
|
12
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
13
|
+
input: z.ZodOptional<z.ZodString>;
|
|
14
|
+
output: z.ZodOptional<z.ZodString>;
|
|
15
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
16
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
laneId: z.ZodString;
|
|
20
|
+
kind: z.ZodEnum<["turn", "tool", "message"]>;
|
|
21
|
+
activity: z.ZodEnum<["task", "explore", "change", "verify", "answer", "other"]>;
|
|
22
|
+
title: z.ZodString;
|
|
23
|
+
status: z.ZodEnum<["running", "success", "error", "pending", "waiting", "cancelling", "idle", "interrupted", "unknown"]>;
|
|
24
|
+
order: z.ZodNumber;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
27
|
+
id?: string;
|
|
28
|
+
kind?: "message" | "tool" | "turn";
|
|
29
|
+
startedAt?: string;
|
|
30
|
+
input?: string;
|
|
31
|
+
output?: string;
|
|
32
|
+
title?: string;
|
|
33
|
+
executionId?: string;
|
|
34
|
+
answer?: string;
|
|
35
|
+
preview?: string;
|
|
36
|
+
order?: number;
|
|
37
|
+
threadId?: string;
|
|
38
|
+
messageId?: string;
|
|
39
|
+
endedAt?: string;
|
|
40
|
+
laneId?: string;
|
|
41
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
42
|
+
toolCallId?: string;
|
|
43
|
+
}, {
|
|
44
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
45
|
+
id?: string;
|
|
46
|
+
kind?: "message" | "tool" | "turn";
|
|
47
|
+
startedAt?: string;
|
|
48
|
+
input?: string;
|
|
49
|
+
output?: string;
|
|
50
|
+
title?: string;
|
|
51
|
+
executionId?: string;
|
|
52
|
+
answer?: string;
|
|
53
|
+
preview?: string;
|
|
54
|
+
order?: number;
|
|
55
|
+
threadId?: string;
|
|
56
|
+
messageId?: string;
|
|
57
|
+
endedAt?: string;
|
|
58
|
+
laneId?: string;
|
|
59
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
60
|
+
toolCallId?: string;
|
|
61
|
+
}>;
|
|
62
|
+
export declare const trailLaneSchema: z.ZodObject<{
|
|
63
|
+
invocationKind: z.ZodOptional<z.ZodEnum<["sub_agent", "external_assistant", "activity"]>>;
|
|
64
|
+
purpose: z.ZodOptional<z.ZodEnum<["side-chat", "message-edit"]>>;
|
|
65
|
+
elapsedMs: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
outcome: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
status: z.ZodString;
|
|
68
|
+
accepted: z.ZodBoolean;
|
|
69
|
+
message: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
status?: string;
|
|
72
|
+
message?: string;
|
|
73
|
+
accepted?: boolean;
|
|
74
|
+
}, {
|
|
75
|
+
status?: string;
|
|
76
|
+
message?: string;
|
|
77
|
+
accepted?: boolean;
|
|
78
|
+
}>>;
|
|
79
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
80
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
parentId: z.ZodNullable<z.ZodString>;
|
|
84
|
+
spawnStepId: z.ZodOptional<z.ZodString>;
|
|
85
|
+
title: z.ZodString;
|
|
86
|
+
primary: z.ZodBoolean;
|
|
87
|
+
status: z.ZodEnum<["running", "success", "error", "pending", "waiting", "cancelling", "idle", "interrupted", "unknown"]>;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
90
|
+
id?: string;
|
|
91
|
+
parentId?: string;
|
|
92
|
+
primary?: boolean;
|
|
93
|
+
title?: string;
|
|
94
|
+
executionId?: string;
|
|
95
|
+
outcome?: {
|
|
96
|
+
status?: string;
|
|
97
|
+
message?: string;
|
|
98
|
+
accepted?: boolean;
|
|
99
|
+
};
|
|
100
|
+
purpose?: "side-chat" | "message-edit";
|
|
101
|
+
threadId?: string;
|
|
102
|
+
invocationKind?: "external_assistant" | "sub_agent" | "activity";
|
|
103
|
+
messageId?: string;
|
|
104
|
+
spawnStepId?: string;
|
|
105
|
+
elapsedMs?: number;
|
|
106
|
+
}, {
|
|
107
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
108
|
+
id?: string;
|
|
109
|
+
parentId?: string;
|
|
110
|
+
primary?: boolean;
|
|
111
|
+
title?: string;
|
|
112
|
+
executionId?: string;
|
|
113
|
+
outcome?: {
|
|
114
|
+
status?: string;
|
|
115
|
+
message?: string;
|
|
116
|
+
accepted?: boolean;
|
|
117
|
+
};
|
|
118
|
+
purpose?: "side-chat" | "message-edit";
|
|
119
|
+
threadId?: string;
|
|
120
|
+
invocationKind?: "external_assistant" | "sub_agent" | "activity";
|
|
121
|
+
messageId?: string;
|
|
122
|
+
spawnStepId?: string;
|
|
123
|
+
elapsedMs?: number;
|
|
124
|
+
}>;
|
|
125
|
+
export declare const trailEpisodeSchema: z.ZodObject<{
|
|
126
|
+
id: z.ZodString;
|
|
127
|
+
laneId: z.ZodString;
|
|
128
|
+
activity: z.ZodEnum<["task", "explore", "change", "verify", "answer", "other"]>;
|
|
129
|
+
stepIds: z.ZodArray<z.ZodString, "many">;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
id?: string;
|
|
132
|
+
laneId?: string;
|
|
133
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
134
|
+
stepIds?: string[];
|
|
135
|
+
}, {
|
|
136
|
+
id?: string;
|
|
137
|
+
laneId?: string;
|
|
138
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
139
|
+
stepIds?: string[];
|
|
140
|
+
}>;
|
|
141
|
+
export declare const trailGraphSchema: z.ZodObject<{
|
|
142
|
+
version: z.ZodLiteral<1>;
|
|
143
|
+
layer: z.ZodEnum<["conversation", "execution"]>;
|
|
144
|
+
conversationId: z.ZodString;
|
|
145
|
+
threadId: z.ZodString;
|
|
146
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
147
|
+
title: z.ZodString;
|
|
148
|
+
lanes: z.ZodArray<z.ZodObject<{
|
|
149
|
+
invocationKind: z.ZodOptional<z.ZodEnum<["sub_agent", "external_assistant", "activity"]>>;
|
|
150
|
+
purpose: z.ZodOptional<z.ZodEnum<["side-chat", "message-edit"]>>;
|
|
151
|
+
elapsedMs: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
outcome: z.ZodOptional<z.ZodObject<{
|
|
153
|
+
status: z.ZodString;
|
|
154
|
+
accepted: z.ZodBoolean;
|
|
155
|
+
message: z.ZodOptional<z.ZodString>;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
status?: string;
|
|
158
|
+
message?: string;
|
|
159
|
+
accepted?: boolean;
|
|
160
|
+
}, {
|
|
161
|
+
status?: string;
|
|
162
|
+
message?: string;
|
|
163
|
+
accepted?: boolean;
|
|
164
|
+
}>>;
|
|
165
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
166
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
167
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
parentId: z.ZodNullable<z.ZodString>;
|
|
170
|
+
spawnStepId: z.ZodOptional<z.ZodString>;
|
|
171
|
+
title: z.ZodString;
|
|
172
|
+
primary: z.ZodBoolean;
|
|
173
|
+
status: z.ZodEnum<["running", "success", "error", "pending", "waiting", "cancelling", "idle", "interrupted", "unknown"]>;
|
|
174
|
+
}, "strip", z.ZodTypeAny, {
|
|
175
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
176
|
+
id?: string;
|
|
177
|
+
parentId?: string;
|
|
178
|
+
primary?: boolean;
|
|
179
|
+
title?: string;
|
|
180
|
+
executionId?: string;
|
|
181
|
+
outcome?: {
|
|
182
|
+
status?: string;
|
|
183
|
+
message?: string;
|
|
184
|
+
accepted?: boolean;
|
|
185
|
+
};
|
|
186
|
+
purpose?: "side-chat" | "message-edit";
|
|
187
|
+
threadId?: string;
|
|
188
|
+
invocationKind?: "external_assistant" | "sub_agent" | "activity";
|
|
189
|
+
messageId?: string;
|
|
190
|
+
spawnStepId?: string;
|
|
191
|
+
elapsedMs?: number;
|
|
192
|
+
}, {
|
|
193
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
194
|
+
id?: string;
|
|
195
|
+
parentId?: string;
|
|
196
|
+
primary?: boolean;
|
|
197
|
+
title?: string;
|
|
198
|
+
executionId?: string;
|
|
199
|
+
outcome?: {
|
|
200
|
+
status?: string;
|
|
201
|
+
message?: string;
|
|
202
|
+
accepted?: boolean;
|
|
203
|
+
};
|
|
204
|
+
purpose?: "side-chat" | "message-edit";
|
|
205
|
+
threadId?: string;
|
|
206
|
+
invocationKind?: "external_assistant" | "sub_agent" | "activity";
|
|
207
|
+
messageId?: string;
|
|
208
|
+
spawnStepId?: string;
|
|
209
|
+
elapsedMs?: number;
|
|
210
|
+
}>, "many">;
|
|
211
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
212
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
213
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
214
|
+
endedAt: z.ZodOptional<z.ZodString>;
|
|
215
|
+
preview: z.ZodOptional<z.ZodString>;
|
|
216
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
217
|
+
input: z.ZodOptional<z.ZodString>;
|
|
218
|
+
output: z.ZodOptional<z.ZodString>;
|
|
219
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
220
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
221
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
222
|
+
id: z.ZodString;
|
|
223
|
+
laneId: z.ZodString;
|
|
224
|
+
kind: z.ZodEnum<["turn", "tool", "message"]>;
|
|
225
|
+
activity: z.ZodEnum<["task", "explore", "change", "verify", "answer", "other"]>;
|
|
226
|
+
title: z.ZodString;
|
|
227
|
+
status: z.ZodEnum<["running", "success", "error", "pending", "waiting", "cancelling", "idle", "interrupted", "unknown"]>;
|
|
228
|
+
order: z.ZodNumber;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
231
|
+
id?: string;
|
|
232
|
+
kind?: "message" | "tool" | "turn";
|
|
233
|
+
startedAt?: string;
|
|
234
|
+
input?: string;
|
|
235
|
+
output?: string;
|
|
236
|
+
title?: string;
|
|
237
|
+
executionId?: string;
|
|
238
|
+
answer?: string;
|
|
239
|
+
preview?: string;
|
|
240
|
+
order?: number;
|
|
241
|
+
threadId?: string;
|
|
242
|
+
messageId?: string;
|
|
243
|
+
endedAt?: string;
|
|
244
|
+
laneId?: string;
|
|
245
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
246
|
+
toolCallId?: string;
|
|
247
|
+
}, {
|
|
248
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
249
|
+
id?: string;
|
|
250
|
+
kind?: "message" | "tool" | "turn";
|
|
251
|
+
startedAt?: string;
|
|
252
|
+
input?: string;
|
|
253
|
+
output?: string;
|
|
254
|
+
title?: string;
|
|
255
|
+
executionId?: string;
|
|
256
|
+
answer?: string;
|
|
257
|
+
preview?: string;
|
|
258
|
+
order?: number;
|
|
259
|
+
threadId?: string;
|
|
260
|
+
messageId?: string;
|
|
261
|
+
endedAt?: string;
|
|
262
|
+
laneId?: string;
|
|
263
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
264
|
+
toolCallId?: string;
|
|
265
|
+
}>, "many">;
|
|
266
|
+
episodes: z.ZodArray<z.ZodObject<{
|
|
267
|
+
id: z.ZodString;
|
|
268
|
+
laneId: z.ZodString;
|
|
269
|
+
activity: z.ZodEnum<["task", "explore", "change", "verify", "answer", "other"]>;
|
|
270
|
+
stepIds: z.ZodArray<z.ZodString, "many">;
|
|
271
|
+
}, "strip", z.ZodTypeAny, {
|
|
272
|
+
id?: string;
|
|
273
|
+
laneId?: string;
|
|
274
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
275
|
+
stepIds?: string[];
|
|
276
|
+
}, {
|
|
277
|
+
id?: string;
|
|
278
|
+
laneId?: string;
|
|
279
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
280
|
+
stepIds?: string[];
|
|
281
|
+
}>, "many">;
|
|
282
|
+
coverage: z.ZodArray<z.ZodEnum<["record_limit", "missing_identity", "no_execution", "timing_unavailable", "activity_unavailable", "historical"]>, "many">;
|
|
283
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
284
|
+
conversationId: z.ZodString;
|
|
285
|
+
threadId: z.ZodString;
|
|
286
|
+
messageId: z.ZodString;
|
|
287
|
+
}, "strip", z.ZodTypeAny, {
|
|
288
|
+
conversationId?: string;
|
|
289
|
+
threadId?: string;
|
|
290
|
+
messageId?: string;
|
|
291
|
+
}, {
|
|
292
|
+
conversationId?: string;
|
|
293
|
+
threadId?: string;
|
|
294
|
+
messageId?: string;
|
|
295
|
+
}>>;
|
|
296
|
+
live: z.ZodBoolean;
|
|
297
|
+
}, "strip", z.ZodTypeAny, {
|
|
298
|
+
version?: 1;
|
|
299
|
+
source?: {
|
|
300
|
+
conversationId?: string;
|
|
301
|
+
threadId?: string;
|
|
302
|
+
messageId?: string;
|
|
303
|
+
};
|
|
304
|
+
title?: string;
|
|
305
|
+
conversationId?: string;
|
|
306
|
+
steps?: {
|
|
307
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
308
|
+
id?: string;
|
|
309
|
+
kind?: "message" | "tool" | "turn";
|
|
310
|
+
startedAt?: string;
|
|
311
|
+
input?: string;
|
|
312
|
+
output?: string;
|
|
313
|
+
title?: string;
|
|
314
|
+
executionId?: string;
|
|
315
|
+
answer?: string;
|
|
316
|
+
preview?: string;
|
|
317
|
+
order?: number;
|
|
318
|
+
threadId?: string;
|
|
319
|
+
messageId?: string;
|
|
320
|
+
endedAt?: string;
|
|
321
|
+
laneId?: string;
|
|
322
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
323
|
+
toolCallId?: string;
|
|
324
|
+
}[];
|
|
325
|
+
threadId?: string;
|
|
326
|
+
messageId?: string;
|
|
327
|
+
lanes?: {
|
|
328
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
329
|
+
id?: string;
|
|
330
|
+
parentId?: string;
|
|
331
|
+
primary?: boolean;
|
|
332
|
+
title?: string;
|
|
333
|
+
executionId?: string;
|
|
334
|
+
outcome?: {
|
|
335
|
+
status?: string;
|
|
336
|
+
message?: string;
|
|
337
|
+
accepted?: boolean;
|
|
338
|
+
};
|
|
339
|
+
purpose?: "side-chat" | "message-edit";
|
|
340
|
+
threadId?: string;
|
|
341
|
+
invocationKind?: "external_assistant" | "sub_agent" | "activity";
|
|
342
|
+
messageId?: string;
|
|
343
|
+
spawnStepId?: string;
|
|
344
|
+
elapsedMs?: number;
|
|
345
|
+
}[];
|
|
346
|
+
coverage?: ("historical" | "record_limit" | "missing_identity" | "no_execution" | "timing_unavailable" | "activity_unavailable")[];
|
|
347
|
+
layer?: "conversation" | "execution";
|
|
348
|
+
episodes?: {
|
|
349
|
+
id?: string;
|
|
350
|
+
laneId?: string;
|
|
351
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
352
|
+
stepIds?: string[];
|
|
353
|
+
}[];
|
|
354
|
+
live?: boolean;
|
|
355
|
+
}, {
|
|
356
|
+
version?: 1;
|
|
357
|
+
source?: {
|
|
358
|
+
conversationId?: string;
|
|
359
|
+
threadId?: string;
|
|
360
|
+
messageId?: string;
|
|
361
|
+
};
|
|
362
|
+
title?: string;
|
|
363
|
+
conversationId?: string;
|
|
364
|
+
steps?: {
|
|
365
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
366
|
+
id?: string;
|
|
367
|
+
kind?: "message" | "tool" | "turn";
|
|
368
|
+
startedAt?: string;
|
|
369
|
+
input?: string;
|
|
370
|
+
output?: string;
|
|
371
|
+
title?: string;
|
|
372
|
+
executionId?: string;
|
|
373
|
+
answer?: string;
|
|
374
|
+
preview?: string;
|
|
375
|
+
order?: number;
|
|
376
|
+
threadId?: string;
|
|
377
|
+
messageId?: string;
|
|
378
|
+
endedAt?: string;
|
|
379
|
+
laneId?: string;
|
|
380
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
381
|
+
toolCallId?: string;
|
|
382
|
+
}[];
|
|
383
|
+
threadId?: string;
|
|
384
|
+
messageId?: string;
|
|
385
|
+
lanes?: {
|
|
386
|
+
status?: "idle" | "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "waiting" | "cancelling";
|
|
387
|
+
id?: string;
|
|
388
|
+
parentId?: string;
|
|
389
|
+
primary?: boolean;
|
|
390
|
+
title?: string;
|
|
391
|
+
executionId?: string;
|
|
392
|
+
outcome?: {
|
|
393
|
+
status?: string;
|
|
394
|
+
message?: string;
|
|
395
|
+
accepted?: boolean;
|
|
396
|
+
};
|
|
397
|
+
purpose?: "side-chat" | "message-edit";
|
|
398
|
+
threadId?: string;
|
|
399
|
+
invocationKind?: "external_assistant" | "sub_agent" | "activity";
|
|
400
|
+
messageId?: string;
|
|
401
|
+
spawnStepId?: string;
|
|
402
|
+
elapsedMs?: number;
|
|
403
|
+
}[];
|
|
404
|
+
coverage?: ("historical" | "record_limit" | "missing_identity" | "no_execution" | "timing_unavailable" | "activity_unavailable")[];
|
|
405
|
+
layer?: "conversation" | "execution";
|
|
406
|
+
episodes?: {
|
|
407
|
+
id?: string;
|
|
408
|
+
laneId?: string;
|
|
409
|
+
activity?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
410
|
+
stepIds?: string[];
|
|
411
|
+
}[];
|
|
412
|
+
live?: boolean;
|
|
413
|
+
}>;
|
|
414
|
+
export type TrailStep = z.infer<typeof trailStepSchema>;
|
|
415
|
+
export type TrailLane = z.infer<typeof trailLaneSchema>;
|
|
416
|
+
export type TrailEpisode = z.infer<typeof trailEpisodeSchema>;
|
|
417
|
+
export type TrailGraph = z.infer<typeof trailGraphSchema>;
|
|
@@ -3,6 +3,7 @@ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
|
3
3
|
import { IAiProviderEntity } from './ai-model.model';
|
|
4
4
|
import { ICopilot } from './copilot.model';
|
|
5
5
|
import type { ModelConfiguration, ModelDiscoveryState } from './model-discovery.model';
|
|
6
|
+
import type { EnabledModelSelection } from './model-management.model';
|
|
6
7
|
export interface ICopilotProvider extends IBasePerTenantAndOrganizationEntityModel {
|
|
7
8
|
providerName?: string;
|
|
8
9
|
providerType?: string;
|
|
@@ -16,6 +17,7 @@ export interface ICopilotProvider extends IBasePerTenantAndOrganizationEntityMod
|
|
|
16
17
|
*/
|
|
17
18
|
options?: Record<string, unknown> & {
|
|
18
19
|
modelDiscovery?: ModelDiscoveryState;
|
|
20
|
+
enabledModels?: EnabledModelSelection[];
|
|
19
21
|
};
|
|
20
22
|
copilot?: ICopilot;
|
|
21
23
|
copilotId?: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { DefaultModelRole, LegacyProviderRole } from './default-model-role';
|
|
1
2
|
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
2
3
|
import { ICopilotModel } from './copilot-model.model';
|
|
3
4
|
import { ICopilotProvider } from './copilot-provider.model';
|
|
4
5
|
export interface ICopilot extends IBasePerTenantAndOrganizationEntityModel {
|
|
5
6
|
name?: string;
|
|
6
|
-
|
|
7
|
+
/** @deprecated Connection roles are read only for legacy defaults and setup compatibility. */
|
|
8
|
+
role?: LegacyProviderRole;
|
|
7
9
|
enabled?: boolean;
|
|
8
10
|
showTokenizer?: boolean;
|
|
9
11
|
/**
|
|
@@ -17,10 +19,11 @@ export interface ICopilot extends IBasePerTenantAndOrganizationEntityModel {
|
|
|
17
19
|
modelProvider?: ICopilotProvider;
|
|
18
20
|
copilotModel?: ICopilotModel;
|
|
19
21
|
usage?: TCopilotTokenUsage;
|
|
22
|
+
/** Explicit role defaults projected into the public catalog, independent of the legacy connection role. */
|
|
23
|
+
defaultModels?: Partial<Record<DefaultModelRole, ICopilotModel>>;
|
|
24
|
+
configuredDefaultRoles?: DefaultModelRole[];
|
|
20
25
|
}
|
|
21
|
-
/**
|
|
22
|
-
* The order of priority is: `Embedding`, `Secondary`, `Primary`
|
|
23
|
-
*/
|
|
26
|
+
/** @deprecated Use DefaultModelRole for default assignments; connections have no default purpose. */
|
|
24
27
|
export declare enum AiProviderRole {
|
|
25
28
|
Primary = "primary",
|
|
26
29
|
Secondary = "secondary",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AiModelTypeEnum } from '../agent/ai-model';
|
|
3
|
+
/** A default assignment's purpose, independent of connection identity and model type. */
|
|
4
|
+
export declare const DefaultModelRole: {
|
|
5
|
+
readonly Primary: "primary";
|
|
6
|
+
readonly Secondary: "secondary";
|
|
7
|
+
readonly Reasoning: "reasoning";
|
|
8
|
+
readonly Embedding: "embedding";
|
|
9
|
+
readonly Realtime: "realtime";
|
|
10
|
+
readonly TextToSpeech: "tts";
|
|
11
|
+
readonly SpeechToText: "speech2text";
|
|
12
|
+
readonly ImageGeneration: "image";
|
|
13
|
+
readonly VideoGeneration: "video";
|
|
14
|
+
readonly Rerank: "rerank";
|
|
15
|
+
readonly Moderation: "moderation";
|
|
16
|
+
};
|
|
17
|
+
export declare const defaultModelRoleSchema: z.ZodNativeEnum<{
|
|
18
|
+
readonly Primary: "primary";
|
|
19
|
+
readonly Secondary: "secondary";
|
|
20
|
+
readonly Reasoning: "reasoning";
|
|
21
|
+
readonly Embedding: "embedding";
|
|
22
|
+
readonly Realtime: "realtime";
|
|
23
|
+
readonly TextToSpeech: "tts";
|
|
24
|
+
readonly SpeechToText: "speech2text";
|
|
25
|
+
readonly ImageGeneration: "image";
|
|
26
|
+
readonly VideoGeneration: "video";
|
|
27
|
+
readonly Rerank: "rerank";
|
|
28
|
+
readonly Moderation: "moderation";
|
|
29
|
+
}>;
|
|
30
|
+
export type DefaultModelRole = z.output<typeof defaultModelRoleSchema>;
|
|
31
|
+
export declare const legacyProviderRoleSchema: z.ZodEnum<["primary", "secondary", "reasoning", "embedding"]>;
|
|
32
|
+
export type LegacyProviderRole = z.output<typeof legacyProviderRoleSchema>;
|
|
33
|
+
export interface DefaultModelDefinition {
|
|
34
|
+
role: DefaultModelRole;
|
|
35
|
+
modelType: AiModelTypeEnum;
|
|
36
|
+
group: 'roles' | 'types';
|
|
37
|
+
/** Only the compatibility adapter may use this legacy connection field. */
|
|
38
|
+
legacyRole?: LegacyProviderRole;
|
|
39
|
+
}
|
|
40
|
+
export declare const DEFAULT_MODEL_DEFINITIONS: readonly DefaultModelDefinition[];
|
|
41
|
+
export declare function defaultModelDefinition(role: DefaultModelRole): DefaultModelDefinition;
|
|
@@ -25,6 +25,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
|
|
|
25
25
|
text?: string;
|
|
26
26
|
}>, z.ZodObject<{
|
|
27
27
|
kind: z.ZodLiteral<"tool">;
|
|
28
|
+
activityKind: z.ZodOptional<z.ZodEnum<["task", "explore", "change", "verify", "answer", "other"]>>;
|
|
28
29
|
name: z.ZodOptional<z.ZodString>;
|
|
29
30
|
status: z.ZodEnum<["running", "succeeded", "failed", "unknown"]>;
|
|
30
31
|
input: z.ZodOptional<z.ZodString>;
|
|
@@ -109,6 +110,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
|
|
|
109
110
|
}[];
|
|
110
111
|
};
|
|
111
112
|
truncated?: boolean;
|
|
113
|
+
activityKind?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
112
114
|
outputRef?: {
|
|
113
115
|
length?: number;
|
|
114
116
|
key?: string;
|
|
@@ -134,6 +136,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
|
|
|
134
136
|
}[];
|
|
135
137
|
};
|
|
136
138
|
truncated?: boolean;
|
|
139
|
+
activityKind?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
137
140
|
outputRef?: {
|
|
138
141
|
length?: number;
|
|
139
142
|
key?: string;
|
|
@@ -177,6 +180,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
|
|
|
177
180
|
}[];
|
|
178
181
|
};
|
|
179
182
|
truncated?: boolean;
|
|
183
|
+
activityKind?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
180
184
|
outputRef?: {
|
|
181
185
|
length?: number;
|
|
182
186
|
key?: string;
|
|
@@ -213,6 +217,7 @@ export declare const executionActivityItemSchema: z.ZodObject<{
|
|
|
213
217
|
}[];
|
|
214
218
|
};
|
|
215
219
|
truncated?: boolean;
|
|
220
|
+
activityKind?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
216
221
|
outputRef?: {
|
|
217
222
|
length?: number;
|
|
218
223
|
key?: string;
|
|
@@ -240,6 +245,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
240
245
|
text?: string;
|
|
241
246
|
}>, z.ZodObject<{
|
|
242
247
|
kind: z.ZodLiteral<"tool">;
|
|
248
|
+
activityKind: z.ZodOptional<z.ZodEnum<["task", "explore", "change", "verify", "answer", "other"]>>;
|
|
243
249
|
name: z.ZodOptional<z.ZodString>;
|
|
244
250
|
status: z.ZodEnum<["running", "succeeded", "failed", "unknown"]>;
|
|
245
251
|
input: z.ZodOptional<z.ZodString>;
|
|
@@ -324,6 +330,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
324
330
|
}[];
|
|
325
331
|
};
|
|
326
332
|
truncated?: boolean;
|
|
333
|
+
activityKind?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
327
334
|
outputRef?: {
|
|
328
335
|
length?: number;
|
|
329
336
|
key?: string;
|
|
@@ -349,6 +356,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
349
356
|
}[];
|
|
350
357
|
};
|
|
351
358
|
truncated?: boolean;
|
|
359
|
+
activityKind?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
352
360
|
outputRef?: {
|
|
353
361
|
length?: number;
|
|
354
362
|
key?: string;
|
|
@@ -392,6 +400,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
392
400
|
}[];
|
|
393
401
|
};
|
|
394
402
|
truncated?: boolean;
|
|
403
|
+
activityKind?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
395
404
|
outputRef?: {
|
|
396
405
|
length?: number;
|
|
397
406
|
key?: string;
|
|
@@ -428,6 +437,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
428
437
|
}[];
|
|
429
438
|
};
|
|
430
439
|
truncated?: boolean;
|
|
440
|
+
activityKind?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
431
441
|
outputRef?: {
|
|
432
442
|
length?: number;
|
|
433
443
|
key?: string;
|
|
@@ -471,6 +481,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
471
481
|
}[];
|
|
472
482
|
};
|
|
473
483
|
truncated?: boolean;
|
|
484
|
+
activityKind?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
474
485
|
outputRef?: {
|
|
475
486
|
length?: number;
|
|
476
487
|
key?: string;
|
|
@@ -513,6 +524,7 @@ export declare const executionActivityBatchSchema: z.ZodObject<{
|
|
|
513
524
|
}[];
|
|
514
525
|
};
|
|
515
526
|
truncated?: boolean;
|
|
527
|
+
activityKind?: "other" | "task" | "answer" | "explore" | "change" | "verify";
|
|
516
528
|
outputRef?: {
|
|
517
529
|
length?: number;
|
|
518
530
|
key?: string;
|