@xpert-ai/contracts 3.29.0 → 3.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +2691 -1499
- package/index.esm.js +3771 -2629
- package/package.json +2 -2
- package/src/ai/ai-model.model.d.ts +9 -0
- package/src/ai/chat-activity.model.d.ts +6 -0
- package/src/ai/chat.model.d.ts +7 -2
- package/src/ai/conversation-trail.model.d.ts +417 -0
- package/src/ai/copilot-model.model.d.ts +3 -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-execution-parameters.model.d.ts +14 -14
- package/src/ai/model-gateway.model.d.ts +9 -1
- 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 +21 -5
- 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/plugin.d.ts +7 -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
|
@@ -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;
|
|
@@ -411,15 +411,15 @@ export declare const executionObservationAvatarSchema: z.ZodObject<{
|
|
|
411
411
|
id?: string;
|
|
412
412
|
unified?: string;
|
|
413
413
|
};
|
|
414
|
-
url?: string;
|
|
415
414
|
background?: string;
|
|
415
|
+
url?: string;
|
|
416
416
|
}, {
|
|
417
417
|
emoji?: {
|
|
418
418
|
id?: string;
|
|
419
419
|
unified?: string;
|
|
420
420
|
};
|
|
421
|
-
url?: string;
|
|
422
421
|
background?: string;
|
|
422
|
+
url?: string;
|
|
423
423
|
}>;
|
|
424
424
|
export declare const executionObservationAssistantSchema: z.ZodObject<{
|
|
425
425
|
id: z.ZodNullable<z.ZodString>;
|
|
@@ -444,15 +444,15 @@ export declare const executionObservationAssistantSchema: z.ZodObject<{
|
|
|
444
444
|
id?: string;
|
|
445
445
|
unified?: string;
|
|
446
446
|
};
|
|
447
|
-
url?: string;
|
|
448
447
|
background?: string;
|
|
448
|
+
url?: string;
|
|
449
449
|
}, {
|
|
450
450
|
emoji?: {
|
|
451
451
|
id?: string;
|
|
452
452
|
unified?: string;
|
|
453
453
|
};
|
|
454
|
-
url?: string;
|
|
455
454
|
background?: string;
|
|
455
|
+
url?: string;
|
|
456
456
|
}>>;
|
|
457
457
|
total: z.ZodNumber;
|
|
458
458
|
running: z.ZodNumber;
|
|
@@ -497,8 +497,8 @@ export declare const executionObservationAssistantSchema: z.ZodObject<{
|
|
|
497
497
|
id?: string;
|
|
498
498
|
unified?: string;
|
|
499
499
|
};
|
|
500
|
-
url?: string;
|
|
501
500
|
background?: string;
|
|
501
|
+
url?: string;
|
|
502
502
|
};
|
|
503
503
|
workspaceName?: string;
|
|
504
504
|
overlap?: {
|
|
@@ -525,8 +525,8 @@ export declare const executionObservationAssistantSchema: z.ZodObject<{
|
|
|
525
525
|
id?: string;
|
|
526
526
|
unified?: string;
|
|
527
527
|
};
|
|
528
|
-
url?: string;
|
|
529
528
|
background?: string;
|
|
529
|
+
url?: string;
|
|
530
530
|
};
|
|
531
531
|
workspaceName?: string;
|
|
532
532
|
overlap?: {
|
|
@@ -800,15 +800,15 @@ export declare const executionObservationOverviewSchema: z.ZodObject<{
|
|
|
800
800
|
id?: string;
|
|
801
801
|
unified?: string;
|
|
802
802
|
};
|
|
803
|
-
url?: string;
|
|
804
803
|
background?: string;
|
|
804
|
+
url?: string;
|
|
805
805
|
}, {
|
|
806
806
|
emoji?: {
|
|
807
807
|
id?: string;
|
|
808
808
|
unified?: string;
|
|
809
809
|
};
|
|
810
|
-
url?: string;
|
|
811
810
|
background?: string;
|
|
811
|
+
url?: string;
|
|
812
812
|
}>>;
|
|
813
813
|
total: z.ZodNumber;
|
|
814
814
|
running: z.ZodNumber;
|
|
@@ -853,8 +853,8 @@ export declare const executionObservationOverviewSchema: z.ZodObject<{
|
|
|
853
853
|
id?: string;
|
|
854
854
|
unified?: string;
|
|
855
855
|
};
|
|
856
|
-
url?: string;
|
|
857
856
|
background?: string;
|
|
857
|
+
url?: string;
|
|
858
858
|
};
|
|
859
859
|
workspaceName?: string;
|
|
860
860
|
overlap?: {
|
|
@@ -881,8 +881,8 @@ export declare const executionObservationOverviewSchema: z.ZodObject<{
|
|
|
881
881
|
id?: string;
|
|
882
882
|
unified?: string;
|
|
883
883
|
};
|
|
884
|
-
url?: string;
|
|
885
884
|
background?: string;
|
|
885
|
+
url?: string;
|
|
886
886
|
};
|
|
887
887
|
workspaceName?: string;
|
|
888
888
|
overlap?: {
|
|
@@ -963,8 +963,8 @@ export declare const executionObservationOverviewSchema: z.ZodObject<{
|
|
|
963
963
|
id?: string;
|
|
964
964
|
unified?: string;
|
|
965
965
|
};
|
|
966
|
-
url?: string;
|
|
967
966
|
background?: string;
|
|
967
|
+
url?: string;
|
|
968
968
|
};
|
|
969
969
|
workspaceName?: string;
|
|
970
970
|
overlap?: {
|
|
@@ -1044,8 +1044,8 @@ export declare const executionObservationOverviewSchema: z.ZodObject<{
|
|
|
1044
1044
|
id?: string;
|
|
1045
1045
|
unified?: string;
|
|
1046
1046
|
};
|
|
1047
|
-
url?: string;
|
|
1048
1047
|
background?: string;
|
|
1048
|
+
url?: string;
|
|
1049
1049
|
};
|
|
1050
1050
|
workspaceName?: string;
|
|
1051
1051
|
overlap?: {
|
package/src/ai/index.d.ts
CHANGED
|
@@ -128,3 +128,6 @@ export * from './run-display-snapshot.model';
|
|
|
128
128
|
export * from './execution-control.model';
|
|
129
129
|
export * from './execution-control-evidence.schema';
|
|
130
130
|
export * from './execution-observability.model';
|
|
131
|
+
export * from './model-management.model';
|
|
132
|
+
export * from './model-replacement.model';
|
|
133
|
+
export * from './default-model-role';
|
|
@@ -70,6 +70,8 @@ export interface IMembershipModelMultiplier {
|
|
|
70
70
|
multiplier: number;
|
|
71
71
|
}
|
|
72
72
|
export interface IMembershipAllowedModel {
|
|
73
|
+
/** Missing on historical rules: retains their original type scope. */
|
|
74
|
+
modelType?: AiModelTypeEnum;
|
|
73
75
|
provider: string;
|
|
74
76
|
model: string;
|
|
75
77
|
copilotId?: string;
|
|
@@ -138,6 +138,7 @@ export interface ProviderModelCatalog {
|
|
|
138
138
|
builtin: Array<ProviderModel & Partial<Pick<AIModelEntity, 'parameter_rules'>>>;
|
|
139
139
|
discoverySupported: boolean;
|
|
140
140
|
modelDiscovery?: ModelDiscoveryState;
|
|
141
|
+
enabledModels?: import('./model-management.model').EnabledModelSelection[];
|
|
141
142
|
}
|
|
142
143
|
export declare const modelImportSchema: z.ZodEffects<z.ZodObject<{
|
|
143
144
|
models: z.ZodArray<z.ZodObject<{
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod/v3';
|
|
2
|
-
/** Credential-free tuning snapshot.
|
|
2
|
+
/** Credential-free tuning snapshot. Null persists an explicit opt-out of optional provider defaults. */
|
|
3
3
|
export declare const modelExecutionParametersSchema: z.ZodObject<{
|
|
4
|
-
temperature: z.ZodOptional<z.ZodNumber
|
|
5
|
-
top_p: z.ZodOptional<z.ZodNumber
|
|
6
|
-
top_k: z.ZodOptional<z.ZodNumber
|
|
7
|
-
presence_penalty: z.ZodOptional<z.ZodNumber
|
|
8
|
-
frequency_penalty: z.ZodOptional<z.ZodNumber
|
|
9
|
-
repetition_penalty: z.ZodOptional<z.ZodNumber
|
|
10
|
-
seed: z.ZodOptional<z.ZodNumber
|
|
11
|
-
max_tokens: z.ZodOptional<z.ZodNumber
|
|
12
|
-
enable_thinking: z.ZodOptional<z.ZodBoolean
|
|
13
|
-
thinking_budget: z.ZodOptional<z.ZodNumber
|
|
14
|
-
reasoning_effort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh", "max"]
|
|
15
|
-
thinking: z.ZodOptional<z.ZodEnum<["enabled", "disabled", "adaptive"]
|
|
16
|
-
budget_tokens: z.ZodOptional<z.ZodNumber
|
|
4
|
+
temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5
|
+
top_p: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6
|
+
top_k: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
7
|
+
presence_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
8
|
+
frequency_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
9
|
+
repetition_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
10
|
+
seed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
11
|
+
max_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12
|
+
enable_thinking: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
13
|
+
thinking_budget: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
14
|
+
reasoning_effort: z.ZodOptional<z.ZodNullable<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh", "max"]>>>;
|
|
15
|
+
thinking: z.ZodOptional<z.ZodNullable<z.ZodEnum<["enabled", "disabled", "adaptive"]>>>;
|
|
16
|
+
budget_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17
17
|
}, "strict", z.ZodTypeAny, {
|
|
18
18
|
max_tokens?: number;
|
|
19
19
|
temperature?: number;
|
|
@@ -35,6 +35,8 @@ export declare enum ModelGatewayUsageChannelEnum {
|
|
|
35
35
|
Shell = "shell"
|
|
36
36
|
}
|
|
37
37
|
export declare const MODEL_GATEWAY_REQUESTS_PER_MINUTE_SETTING = "modelGatewayRequestsPerMinute";
|
|
38
|
+
export declare const MODEL_GATEWAY_EXTERNAL_API_BASE_URL_SETTING = "modelGatewayExternalApiBaseUrl";
|
|
39
|
+
export declare const MAX_MODEL_GATEWAY_EXTERNAL_API_BASE_URL_LENGTH = 2048;
|
|
38
40
|
export declare const DEFAULT_MODEL_GATEWAY_REQUESTS_PER_MINUTE = 60;
|
|
39
41
|
export declare const MIN_MODEL_GATEWAY_REQUESTS_PER_MINUTE = 1;
|
|
40
42
|
export declare const MAX_MODEL_GATEWAY_REQUESTS_PER_MINUTE = 10000;
|
|
@@ -79,7 +81,12 @@ export interface IModelGatewaySettings extends IBasePerTenantEntityModel {
|
|
|
79
81
|
storeBodies: boolean;
|
|
80
82
|
bodyRetentionDays: number;
|
|
81
83
|
}
|
|
82
|
-
export interface
|
|
84
|
+
export interface IModelGatewayClientConfig {
|
|
85
|
+
externalApiBaseUrl: string | null;
|
|
86
|
+
}
|
|
87
|
+
/** Client-facing HTTP(S) base URL; an empty value restores the deployment default. */
|
|
88
|
+
export declare function isModelGatewayExternalApiBaseUrl(value: string): boolean;
|
|
89
|
+
export interface IModelGatewayAdminSettings extends IModelGatewaySettings, IModelGatewayClientConfig {
|
|
83
90
|
requestsPerMinute: number;
|
|
84
91
|
maxConcurrentRequests: number;
|
|
85
92
|
}
|
|
@@ -162,6 +169,7 @@ export type TModelGatewayExternalRequestCreateInput = {
|
|
|
162
169
|
reason: string;
|
|
163
170
|
};
|
|
164
171
|
export type TModelGatewaySettingsUpdateInput = {
|
|
172
|
+
externalApiBaseUrl?: string | null;
|
|
165
173
|
storeBodies: boolean;
|
|
166
174
|
bodyRetentionDays?: number;
|
|
167
175
|
requestsPerMinute: number;
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AiModelTypeEnum } from '../agent';
|
|
3
|
+
import { DefaultModelRole } from './default-model-role';
|
|
4
|
+
import { ParameterRule } from './ai-model.model';
|
|
5
|
+
import type { ICopilotProvider } from './copilot-provider.model';
|
|
6
|
+
export declare const modelIdentitySchema: z.ZodObject<{
|
|
7
|
+
copilotId: z.ZodString;
|
|
8
|
+
modelType: z.ZodNativeEnum<typeof AiModelTypeEnum>;
|
|
9
|
+
model: z.ZodString;
|
|
10
|
+
}, "strict", z.ZodTypeAny, {
|
|
11
|
+
copilotId?: string;
|
|
12
|
+
modelType?: AiModelTypeEnum;
|
|
13
|
+
model?: string;
|
|
14
|
+
}, {
|
|
15
|
+
copilotId?: string;
|
|
16
|
+
modelType?: AiModelTypeEnum;
|
|
17
|
+
model?: string;
|
|
18
|
+
}>;
|
|
19
|
+
export type ModelIdentity = z.output<typeof modelIdentitySchema>;
|
|
20
|
+
export declare const modelBindingSchema: z.ZodObject<{
|
|
21
|
+
copilotId: z.ZodString;
|
|
22
|
+
modelType: z.ZodNativeEnum<typeof AiModelTypeEnum>;
|
|
23
|
+
model: z.ZodString;
|
|
24
|
+
} & {
|
|
25
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
26
|
+
}, "strict", z.ZodTypeAny, {
|
|
27
|
+
options?: Record<string, string | number | boolean>;
|
|
28
|
+
copilotId?: string;
|
|
29
|
+
modelType?: AiModelTypeEnum;
|
|
30
|
+
model?: string;
|
|
31
|
+
}, {
|
|
32
|
+
options?: Record<string, string | number | boolean>;
|
|
33
|
+
copilotId?: string;
|
|
34
|
+
modelType?: AiModelTypeEnum;
|
|
35
|
+
model?: string;
|
|
36
|
+
}>;
|
|
37
|
+
export type ModelBinding = z.output<typeof modelBindingSchema>;
|
|
38
|
+
export declare const roleDefaultInputSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
|
|
39
|
+
role: z.ZodNativeEnum<{
|
|
40
|
+
readonly Primary: "primary";
|
|
41
|
+
readonly Secondary: "secondary";
|
|
42
|
+
readonly Reasoning: "reasoning";
|
|
43
|
+
readonly Embedding: "embedding";
|
|
44
|
+
readonly Realtime: "realtime";
|
|
45
|
+
readonly TextToSpeech: "tts";
|
|
46
|
+
readonly SpeechToText: "speech2text";
|
|
47
|
+
readonly ImageGeneration: "image";
|
|
48
|
+
readonly VideoGeneration: "video";
|
|
49
|
+
readonly Rerank: "rerank";
|
|
50
|
+
readonly Moderation: "moderation";
|
|
51
|
+
}>;
|
|
52
|
+
mode: z.ZodLiteral<"fixed">;
|
|
53
|
+
binding: z.ZodObject<{
|
|
54
|
+
copilotId: z.ZodString;
|
|
55
|
+
modelType: z.ZodNativeEnum<typeof AiModelTypeEnum>;
|
|
56
|
+
model: z.ZodString;
|
|
57
|
+
} & {
|
|
58
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
59
|
+
}, "strict", z.ZodTypeAny, {
|
|
60
|
+
options?: Record<string, string | number | boolean>;
|
|
61
|
+
copilotId?: string;
|
|
62
|
+
modelType?: AiModelTypeEnum;
|
|
63
|
+
model?: string;
|
|
64
|
+
}, {
|
|
65
|
+
options?: Record<string, string | number | boolean>;
|
|
66
|
+
copilotId?: string;
|
|
67
|
+
modelType?: AiModelTypeEnum;
|
|
68
|
+
model?: string;
|
|
69
|
+
}>;
|
|
70
|
+
}, "strict", z.ZodTypeAny, {
|
|
71
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
72
|
+
mode?: "fixed";
|
|
73
|
+
binding?: {
|
|
74
|
+
options?: Record<string, string | number | boolean>;
|
|
75
|
+
copilotId?: string;
|
|
76
|
+
modelType?: AiModelTypeEnum;
|
|
77
|
+
model?: string;
|
|
78
|
+
};
|
|
79
|
+
}, {
|
|
80
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
81
|
+
mode?: "fixed";
|
|
82
|
+
binding?: {
|
|
83
|
+
options?: Record<string, string | number | boolean>;
|
|
84
|
+
copilotId?: string;
|
|
85
|
+
modelType?: AiModelTypeEnum;
|
|
86
|
+
model?: string;
|
|
87
|
+
};
|
|
88
|
+
}>, z.ZodObject<{
|
|
89
|
+
role: z.ZodNativeEnum<{
|
|
90
|
+
readonly Primary: "primary";
|
|
91
|
+
readonly Secondary: "secondary";
|
|
92
|
+
readonly Reasoning: "reasoning";
|
|
93
|
+
readonly Embedding: "embedding";
|
|
94
|
+
readonly Realtime: "realtime";
|
|
95
|
+
readonly TextToSpeech: "tts";
|
|
96
|
+
readonly SpeechToText: "speech2text";
|
|
97
|
+
readonly ImageGeneration: "image";
|
|
98
|
+
readonly VideoGeneration: "video";
|
|
99
|
+
readonly Rerank: "rerank";
|
|
100
|
+
readonly Moderation: "moderation";
|
|
101
|
+
}>;
|
|
102
|
+
mode: z.ZodLiteral<"inherit">;
|
|
103
|
+
}, "strict", z.ZodTypeAny, {
|
|
104
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
105
|
+
mode?: "inherit";
|
|
106
|
+
}, {
|
|
107
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
108
|
+
mode?: "inherit";
|
|
109
|
+
}>, z.ZodObject<{
|
|
110
|
+
role: z.ZodNativeEnum<{
|
|
111
|
+
readonly Primary: "primary";
|
|
112
|
+
readonly Secondary: "secondary";
|
|
113
|
+
readonly Reasoning: "reasoning";
|
|
114
|
+
readonly Embedding: "embedding";
|
|
115
|
+
readonly Realtime: "realtime";
|
|
116
|
+
readonly TextToSpeech: "tts";
|
|
117
|
+
readonly SpeechToText: "speech2text";
|
|
118
|
+
readonly ImageGeneration: "image";
|
|
119
|
+
readonly VideoGeneration: "video";
|
|
120
|
+
readonly Rerank: "rerank";
|
|
121
|
+
readonly Moderation: "moderation";
|
|
122
|
+
}>;
|
|
123
|
+
mode: z.ZodLiteral<"disabled">;
|
|
124
|
+
}, "strict", z.ZodTypeAny, {
|
|
125
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
126
|
+
mode?: "disabled";
|
|
127
|
+
}, {
|
|
128
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
129
|
+
mode?: "disabled";
|
|
130
|
+
}>]>;
|
|
131
|
+
export declare const saveRoleDefaultsSchema: z.ZodEffects<z.ZodObject<{
|
|
132
|
+
defaults: z.ZodArray<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
|
|
133
|
+
role: z.ZodNativeEnum<{
|
|
134
|
+
readonly Primary: "primary";
|
|
135
|
+
readonly Secondary: "secondary";
|
|
136
|
+
readonly Reasoning: "reasoning";
|
|
137
|
+
readonly Embedding: "embedding";
|
|
138
|
+
readonly Realtime: "realtime";
|
|
139
|
+
readonly TextToSpeech: "tts";
|
|
140
|
+
readonly SpeechToText: "speech2text";
|
|
141
|
+
readonly ImageGeneration: "image";
|
|
142
|
+
readonly VideoGeneration: "video";
|
|
143
|
+
readonly Rerank: "rerank";
|
|
144
|
+
readonly Moderation: "moderation";
|
|
145
|
+
}>;
|
|
146
|
+
mode: z.ZodLiteral<"fixed">;
|
|
147
|
+
binding: z.ZodObject<{
|
|
148
|
+
copilotId: z.ZodString;
|
|
149
|
+
modelType: z.ZodNativeEnum<typeof AiModelTypeEnum>;
|
|
150
|
+
model: z.ZodString;
|
|
151
|
+
} & {
|
|
152
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
153
|
+
}, "strict", z.ZodTypeAny, {
|
|
154
|
+
options?: Record<string, string | number | boolean>;
|
|
155
|
+
copilotId?: string;
|
|
156
|
+
modelType?: AiModelTypeEnum;
|
|
157
|
+
model?: string;
|
|
158
|
+
}, {
|
|
159
|
+
options?: Record<string, string | number | boolean>;
|
|
160
|
+
copilotId?: string;
|
|
161
|
+
modelType?: AiModelTypeEnum;
|
|
162
|
+
model?: string;
|
|
163
|
+
}>;
|
|
164
|
+
}, "strict", z.ZodTypeAny, {
|
|
165
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
166
|
+
mode?: "fixed";
|
|
167
|
+
binding?: {
|
|
168
|
+
options?: Record<string, string | number | boolean>;
|
|
169
|
+
copilotId?: string;
|
|
170
|
+
modelType?: AiModelTypeEnum;
|
|
171
|
+
model?: string;
|
|
172
|
+
};
|
|
173
|
+
}, {
|
|
174
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
175
|
+
mode?: "fixed";
|
|
176
|
+
binding?: {
|
|
177
|
+
options?: Record<string, string | number | boolean>;
|
|
178
|
+
copilotId?: string;
|
|
179
|
+
modelType?: AiModelTypeEnum;
|
|
180
|
+
model?: string;
|
|
181
|
+
};
|
|
182
|
+
}>, z.ZodObject<{
|
|
183
|
+
role: z.ZodNativeEnum<{
|
|
184
|
+
readonly Primary: "primary";
|
|
185
|
+
readonly Secondary: "secondary";
|
|
186
|
+
readonly Reasoning: "reasoning";
|
|
187
|
+
readonly Embedding: "embedding";
|
|
188
|
+
readonly Realtime: "realtime";
|
|
189
|
+
readonly TextToSpeech: "tts";
|
|
190
|
+
readonly SpeechToText: "speech2text";
|
|
191
|
+
readonly ImageGeneration: "image";
|
|
192
|
+
readonly VideoGeneration: "video";
|
|
193
|
+
readonly Rerank: "rerank";
|
|
194
|
+
readonly Moderation: "moderation";
|
|
195
|
+
}>;
|
|
196
|
+
mode: z.ZodLiteral<"inherit">;
|
|
197
|
+
}, "strict", z.ZodTypeAny, {
|
|
198
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
199
|
+
mode?: "inherit";
|
|
200
|
+
}, {
|
|
201
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
202
|
+
mode?: "inherit";
|
|
203
|
+
}>, z.ZodObject<{
|
|
204
|
+
role: z.ZodNativeEnum<{
|
|
205
|
+
readonly Primary: "primary";
|
|
206
|
+
readonly Secondary: "secondary";
|
|
207
|
+
readonly Reasoning: "reasoning";
|
|
208
|
+
readonly Embedding: "embedding";
|
|
209
|
+
readonly Realtime: "realtime";
|
|
210
|
+
readonly TextToSpeech: "tts";
|
|
211
|
+
readonly SpeechToText: "speech2text";
|
|
212
|
+
readonly ImageGeneration: "image";
|
|
213
|
+
readonly VideoGeneration: "video";
|
|
214
|
+
readonly Rerank: "rerank";
|
|
215
|
+
readonly Moderation: "moderation";
|
|
216
|
+
}>;
|
|
217
|
+
mode: z.ZodLiteral<"disabled">;
|
|
218
|
+
}, "strict", z.ZodTypeAny, {
|
|
219
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
220
|
+
mode?: "disabled";
|
|
221
|
+
}, {
|
|
222
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
223
|
+
mode?: "disabled";
|
|
224
|
+
}>]>, "many">;
|
|
225
|
+
}, "strict", z.ZodTypeAny, {
|
|
226
|
+
defaults?: ({
|
|
227
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
228
|
+
mode?: "fixed";
|
|
229
|
+
binding?: {
|
|
230
|
+
options?: Record<string, string | number | boolean>;
|
|
231
|
+
copilotId?: string;
|
|
232
|
+
modelType?: AiModelTypeEnum;
|
|
233
|
+
model?: string;
|
|
234
|
+
};
|
|
235
|
+
} | {
|
|
236
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
237
|
+
mode?: "inherit";
|
|
238
|
+
} | {
|
|
239
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
240
|
+
mode?: "disabled";
|
|
241
|
+
})[];
|
|
242
|
+
}, {
|
|
243
|
+
defaults?: ({
|
|
244
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
245
|
+
mode?: "fixed";
|
|
246
|
+
binding?: {
|
|
247
|
+
options?: Record<string, string | number | boolean>;
|
|
248
|
+
copilotId?: string;
|
|
249
|
+
modelType?: AiModelTypeEnum;
|
|
250
|
+
model?: string;
|
|
251
|
+
};
|
|
252
|
+
} | {
|
|
253
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
254
|
+
mode?: "inherit";
|
|
255
|
+
} | {
|
|
256
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
257
|
+
mode?: "disabled";
|
|
258
|
+
})[];
|
|
259
|
+
}>, {
|
|
260
|
+
defaults?: ({
|
|
261
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
262
|
+
mode?: "fixed";
|
|
263
|
+
binding?: {
|
|
264
|
+
options?: Record<string, string | number | boolean>;
|
|
265
|
+
copilotId?: string;
|
|
266
|
+
modelType?: AiModelTypeEnum;
|
|
267
|
+
model?: string;
|
|
268
|
+
};
|
|
269
|
+
} | {
|
|
270
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
271
|
+
mode?: "inherit";
|
|
272
|
+
} | {
|
|
273
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
274
|
+
mode?: "disabled";
|
|
275
|
+
})[];
|
|
276
|
+
}, {
|
|
277
|
+
defaults?: ({
|
|
278
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
279
|
+
mode?: "fixed";
|
|
280
|
+
binding?: {
|
|
281
|
+
options?: Record<string, string | number | boolean>;
|
|
282
|
+
copilotId?: string;
|
|
283
|
+
modelType?: AiModelTypeEnum;
|
|
284
|
+
model?: string;
|
|
285
|
+
};
|
|
286
|
+
} | {
|
|
287
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
288
|
+
mode?: "inherit";
|
|
289
|
+
} | {
|
|
290
|
+
role?: "image" | "primary" | "realtime" | "rerank" | "speech2text" | "moderation" | "tts" | "video" | "secondary" | "reasoning" | "embedding";
|
|
291
|
+
mode?: "disabled";
|
|
292
|
+
})[];
|
|
293
|
+
}>;
|
|
294
|
+
export type RoleDefaultInput = z.output<typeof roleDefaultInputSchema>;
|
|
295
|
+
export interface RoleDefaultSetting {
|
|
296
|
+
role: DefaultModelRole;
|
|
297
|
+
mode: 'fixed' | 'inherit' | 'disabled' | 'legacy';
|
|
298
|
+
binding: ModelBinding | null;
|
|
299
|
+
sourceOrganizationId: string | null;
|
|
300
|
+
connectionName?: string;
|
|
301
|
+
inheritedBinding?: ModelBinding | null;
|
|
302
|
+
inheritedAvailable?: boolean;
|
|
303
|
+
available: boolean;
|
|
304
|
+
}
|
|
305
|
+
export declare function modelIdentityKey(model: Pick<ModelIdentity, 'modelType' | 'model'>): string;
|
|
306
|
+
export declare function sameModelIdentity(left?: Partial<ModelIdentity> | null, right?: Partial<ModelIdentity> | null): boolean;
|
|
307
|
+
export type ModelParameterPolicy = 'reset' | 'compatible';
|
|
308
|
+
export interface ModelParameterChange {
|
|
309
|
+
name: string;
|
|
310
|
+
before: unknown;
|
|
311
|
+
after: unknown;
|
|
312
|
+
action: 'retained' | 'reset' | 'removed';
|
|
313
|
+
}
|
|
314
|
+
/** Switching uses the target schema only; missing rules never preserve arbitrary old keys. */
|
|
315
|
+
export declare function transitionModelParameters(previous: Record<string, unknown> | undefined, rules: ParameterRule[], policy: ModelParameterPolicy): {
|
|
316
|
+
options: Record<string, string | number | boolean>;
|
|
317
|
+
missing: string[];
|
|
318
|
+
changes: ModelParameterChange[];
|
|
319
|
+
};
|
|
320
|
+
export interface EnabledModelSelection {
|
|
321
|
+
model: string;
|
|
322
|
+
modelType: AiModelTypeEnum;
|
|
323
|
+
}
|
|
324
|
+
/** Undefined is a legacy catalog; an empty array deliberately enables nothing. */
|
|
325
|
+
export declare function isProviderModelEnabled(provider: Pick<ICopilotProvider, 'options'>, model: EnabledModelSelection): boolean;
|
|
326
|
+
export declare const enabledModelsSchema: z.ZodEffects<z.ZodObject<{
|
|
327
|
+
models: z.ZodArray<z.ZodObject<Omit<{
|
|
328
|
+
copilotId: z.ZodString;
|
|
329
|
+
modelType: z.ZodNativeEnum<typeof AiModelTypeEnum>;
|
|
330
|
+
model: z.ZodString;
|
|
331
|
+
}, "copilotId">, "strict", z.ZodTypeAny, {
|
|
332
|
+
modelType?: AiModelTypeEnum;
|
|
333
|
+
model?: string;
|
|
334
|
+
}, {
|
|
335
|
+
modelType?: AiModelTypeEnum;
|
|
336
|
+
model?: string;
|
|
337
|
+
}>, "many">;
|
|
338
|
+
}, "strict", z.ZodTypeAny, {
|
|
339
|
+
models?: {
|
|
340
|
+
modelType?: AiModelTypeEnum;
|
|
341
|
+
model?: string;
|
|
342
|
+
}[];
|
|
343
|
+
}, {
|
|
344
|
+
models?: {
|
|
345
|
+
modelType?: AiModelTypeEnum;
|
|
346
|
+
model?: string;
|
|
347
|
+
}[];
|
|
348
|
+
}>, {
|
|
349
|
+
models?: {
|
|
350
|
+
modelType?: AiModelTypeEnum;
|
|
351
|
+
model?: string;
|
|
352
|
+
}[];
|
|
353
|
+
}, {
|
|
354
|
+
models?: {
|
|
355
|
+
modelType?: AiModelTypeEnum;
|
|
356
|
+
model?: string;
|
|
357
|
+
}[];
|
|
358
|
+
}>;
|