@meetkai/mka1 0.53.9 → 0.53.11
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/bin/mcp-server.js +52 -24
- package/bin/mcp-server.js.map +9 -9
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js.map +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/models/components/computeaccelerator.d.ts +68 -8
- package/dist/commonjs/models/components/computeaccelerator.d.ts.map +1 -1
- package/dist/commonjs/models/components/computeaccelerator.js +49 -9
- package/dist/commonjs/models/components/computeaccelerator.js.map +1 -1
- package/dist/commonjs/models/components/computerequest.d.ts +8 -0
- package/dist/commonjs/models/components/computerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/computerequest.js +4 -0
- package/dist/commonjs/models/components/computerequest.js.map +1 -1
- package/dist/commonjs/models/operations/exchangeapikeytoken.d.ts +2 -2
- package/dist/commonjs/models/operations/exchangeapikeytoken.d.ts.map +1 -1
- package/dist/commonjs/models/operations/exchangeapikeytoken.js +2 -4
- package/dist/commonjs/models/operations/exchangeapikeytoken.js.map +1 -1
- package/dist/commonjs/models/operations/getjwtfromkey.d.ts +2 -2
- package/dist/commonjs/models/operations/getjwtfromkey.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getjwtfromkey.js +2 -2
- package/dist/commonjs/models/operations/getjwtfromkey.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/mcp-server.js.map +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/models/components/computeaccelerator.d.ts +68 -8
- package/dist/esm/models/components/computeaccelerator.d.ts.map +1 -1
- package/dist/esm/models/components/computeaccelerator.js +46 -8
- package/dist/esm/models/components/computeaccelerator.js.map +1 -1
- package/dist/esm/models/components/computerequest.d.ts +8 -0
- package/dist/esm/models/components/computerequest.d.ts.map +1 -1
- package/dist/esm/models/components/computerequest.js +4 -0
- package/dist/esm/models/components/computerequest.js.map +1 -1
- package/dist/esm/models/operations/exchangeapikeytoken.d.ts +2 -2
- package/dist/esm/models/operations/exchangeapikeytoken.d.ts.map +1 -1
- package/dist/esm/models/operations/exchangeapikeytoken.js +2 -4
- package/dist/esm/models/operations/exchangeapikeytoken.js.map +1 -1
- package/dist/esm/models/operations/getjwtfromkey.d.ts +2 -2
- package/dist/esm/models/operations/getjwtfromkey.d.ts.map +1 -1
- package/dist/esm/models/operations/getjwtfromkey.js +2 -2
- package/dist/esm/models/operations/getjwtfromkey.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/computeaccelerator.ts +114 -16
- package/src/models/components/computerequest.ts +12 -0
- package/src/models/operations/exchangeapikeytoken.ts +4 -6
- package/src/models/operations/getjwtfromkey.ts +4 -4
package/src/mcp-server/server.ts
CHANGED
|
@@ -9,21 +9,106 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
+
export const HardwareClass = {
|
|
13
|
+
Gpu: "gpu",
|
|
14
|
+
Cpu: "cpu",
|
|
15
|
+
} as const;
|
|
16
|
+
export type HardwareClass = ClosedEnum<typeof HardwareClass>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Present on every cpu-class entry, absent on gpu-class entries.
|
|
20
|
+
*/
|
|
21
|
+
export type Vcpu = {
|
|
22
|
+
max: number;
|
|
23
|
+
min: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Present on every gpu-class entry, absent on cpu-class entries.
|
|
28
|
+
*/
|
|
12
29
|
export const Vendor = {
|
|
13
30
|
Nvidia: "nvidia",
|
|
14
31
|
Amd: "amd",
|
|
15
32
|
} as const;
|
|
33
|
+
/**
|
|
34
|
+
* Present on every gpu-class entry, absent on cpu-class entries.
|
|
35
|
+
*/
|
|
16
36
|
export type Vendor = ClosedEnum<typeof Vendor>;
|
|
17
37
|
|
|
38
|
+
/**
|
|
39
|
+
* A catalogue entry. Each hardware class exposes what it has and omits what it lacks: gpu entries always carry vendor, memory_gb, gpu_counts and interconnects; cpu entries always carry vcpu and memory_gb_per_vcpu. Fields of the other class are absent, never reinterpreted.
|
|
40
|
+
*/
|
|
18
41
|
export type ComputeAccelerator = {
|
|
19
42
|
displayName: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Present on every gpu-class entry, absent on cpu-class entries.
|
|
45
|
+
*/
|
|
46
|
+
gpuCounts?: Array<number> | undefined;
|
|
47
|
+
hardwareClass: HardwareClass;
|
|
48
|
+
/**
|
|
49
|
+
* Present on every gpu-class entry, absent on cpu-class entries.
|
|
50
|
+
*/
|
|
51
|
+
interconnects?: Array<string> | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Present on every gpu-class entry, absent on cpu-class entries.
|
|
54
|
+
*/
|
|
55
|
+
memoryGb?: number | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Present on every cpu-class entry, absent on gpu-class entries.
|
|
58
|
+
*/
|
|
59
|
+
memoryGbPerVcpu?: number | undefined;
|
|
23
60
|
name: string;
|
|
24
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Present on every cpu-class entry, absent on gpu-class entries.
|
|
63
|
+
*/
|
|
64
|
+
vcpu?: Vcpu | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Present on every gpu-class entry, absent on cpu-class entries.
|
|
67
|
+
*/
|
|
68
|
+
vendor?: Vendor | undefined;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const HardwareClass$inboundSchema: z.ZodNativeEnum<
|
|
73
|
+
typeof HardwareClass
|
|
74
|
+
> = z.nativeEnum(HardwareClass);
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const HardwareClass$outboundSchema: z.ZodNativeEnum<
|
|
77
|
+
typeof HardwareClass
|
|
78
|
+
> = HardwareClass$inboundSchema;
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const Vcpu$inboundSchema: z.ZodType<Vcpu, z.ZodTypeDef, unknown> = z
|
|
82
|
+
.object({
|
|
83
|
+
max: z.number().int(),
|
|
84
|
+
min: z.number().int(),
|
|
85
|
+
});
|
|
86
|
+
/** @internal */
|
|
87
|
+
export type Vcpu$Outbound = {
|
|
88
|
+
max: number;
|
|
89
|
+
min: number;
|
|
25
90
|
};
|
|
26
91
|
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const Vcpu$outboundSchema: z.ZodType<Vcpu$Outbound, z.ZodTypeDef, Vcpu> =
|
|
94
|
+
z.object({
|
|
95
|
+
max: z.number().int(),
|
|
96
|
+
min: z.number().int(),
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export function vcpuToJSON(vcpu: Vcpu): string {
|
|
100
|
+
return JSON.stringify(Vcpu$outboundSchema.parse(vcpu));
|
|
101
|
+
}
|
|
102
|
+
export function vcpuFromJSON(
|
|
103
|
+
jsonString: string,
|
|
104
|
+
): SafeParseResult<Vcpu, SDKValidationError> {
|
|
105
|
+
return safeParse(
|
|
106
|
+
jsonString,
|
|
107
|
+
(x) => Vcpu$inboundSchema.parse(JSON.parse(x)),
|
|
108
|
+
`Failed to parse 'Vcpu' from JSON`,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
27
112
|
/** @internal */
|
|
28
113
|
export const Vendor$inboundSchema: z.ZodNativeEnum<typeof Vendor> = z
|
|
29
114
|
.nativeEnum(Vendor);
|
|
@@ -38,26 +123,34 @@ export const ComputeAccelerator$inboundSchema: z.ZodType<
|
|
|
38
123
|
unknown
|
|
39
124
|
> = z.object({
|
|
40
125
|
display_name: z.string(),
|
|
41
|
-
gpu_counts: z.array(z.number().int()),
|
|
42
|
-
|
|
43
|
-
|
|
126
|
+
gpu_counts: z.array(z.number().int()).optional(),
|
|
127
|
+
hardware_class: HardwareClass$inboundSchema,
|
|
128
|
+
interconnects: z.array(z.string()).optional(),
|
|
129
|
+
memory_gb: z.number().int().optional(),
|
|
130
|
+
memory_gb_per_vcpu: z.number().int().optional(),
|
|
44
131
|
name: z.string(),
|
|
45
|
-
|
|
132
|
+
vcpu: z.lazy(() => Vcpu$inboundSchema).optional(),
|
|
133
|
+
vendor: Vendor$inboundSchema.optional(),
|
|
46
134
|
}).transform((v) => {
|
|
47
135
|
return remap$(v, {
|
|
48
136
|
"display_name": "displayName",
|
|
49
137
|
"gpu_counts": "gpuCounts",
|
|
138
|
+
"hardware_class": "hardwareClass",
|
|
50
139
|
"memory_gb": "memoryGb",
|
|
140
|
+
"memory_gb_per_vcpu": "memoryGbPerVcpu",
|
|
51
141
|
});
|
|
52
142
|
});
|
|
53
143
|
/** @internal */
|
|
54
144
|
export type ComputeAccelerator$Outbound = {
|
|
55
145
|
display_name: string;
|
|
56
|
-
gpu_counts
|
|
57
|
-
|
|
58
|
-
|
|
146
|
+
gpu_counts?: Array<number> | undefined;
|
|
147
|
+
hardware_class: string;
|
|
148
|
+
interconnects?: Array<string> | undefined;
|
|
149
|
+
memory_gb?: number | undefined;
|
|
150
|
+
memory_gb_per_vcpu?: number | undefined;
|
|
59
151
|
name: string;
|
|
60
|
-
|
|
152
|
+
vcpu?: Vcpu$Outbound | undefined;
|
|
153
|
+
vendor?: string | undefined;
|
|
61
154
|
};
|
|
62
155
|
|
|
63
156
|
/** @internal */
|
|
@@ -67,16 +160,21 @@ export const ComputeAccelerator$outboundSchema: z.ZodType<
|
|
|
67
160
|
ComputeAccelerator
|
|
68
161
|
> = z.object({
|
|
69
162
|
displayName: z.string(),
|
|
70
|
-
gpuCounts: z.array(z.number().int()),
|
|
71
|
-
|
|
72
|
-
|
|
163
|
+
gpuCounts: z.array(z.number().int()).optional(),
|
|
164
|
+
hardwareClass: HardwareClass$outboundSchema,
|
|
165
|
+
interconnects: z.array(z.string()).optional(),
|
|
166
|
+
memoryGb: z.number().int().optional(),
|
|
167
|
+
memoryGbPerVcpu: z.number().int().optional(),
|
|
73
168
|
name: z.string(),
|
|
74
|
-
|
|
169
|
+
vcpu: z.lazy(() => Vcpu$outboundSchema).optional(),
|
|
170
|
+
vendor: Vendor$outboundSchema.optional(),
|
|
75
171
|
}).transform((v) => {
|
|
76
172
|
return remap$(v, {
|
|
77
173
|
displayName: "display_name",
|
|
78
174
|
gpuCounts: "gpu_counts",
|
|
175
|
+
hardwareClass: "hardware_class",
|
|
79
176
|
memoryGb: "memory_gb",
|
|
177
|
+
memoryGbPerVcpu: "memory_gb_per_vcpu",
|
|
80
178
|
});
|
|
81
179
|
});
|
|
82
180
|
|
|
@@ -11,12 +11,19 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
11
11
|
export type ComputeRequest = {
|
|
12
12
|
accelerator: string;
|
|
13
13
|
ephemeralDiskGb: number;
|
|
14
|
+
/**
|
|
15
|
+
* Attached GPUs. Zero is valid only for CPU-class catalogue entries and required for one.
|
|
16
|
+
*/
|
|
14
17
|
gpuCount: number;
|
|
15
18
|
/**
|
|
16
19
|
* Identical cooperating execution instances per allocation. Omission means one.
|
|
17
20
|
*/
|
|
18
21
|
instanceCount?: number | undefined;
|
|
19
22
|
interconnect?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Requested vCPUs. A general capability-gated axis honored only by backends that support it; a backend that bundles CPU with the GPU rejects it. Required for a CPU-class accelerator, where memory follows the family's per-vCPU ratio.
|
|
25
|
+
*/
|
|
26
|
+
vcpuCount?: number | undefined;
|
|
20
27
|
};
|
|
21
28
|
|
|
22
29
|
/** @internal */
|
|
@@ -30,11 +37,13 @@ export const ComputeRequest$inboundSchema: z.ZodType<
|
|
|
30
37
|
gpu_count: z.number().int(),
|
|
31
38
|
instance_count: z.number().int().optional(),
|
|
32
39
|
interconnect: z.string().optional(),
|
|
40
|
+
vcpu_count: z.number().int().optional(),
|
|
33
41
|
}).transform((v) => {
|
|
34
42
|
return remap$(v, {
|
|
35
43
|
"ephemeral_disk_gb": "ephemeralDiskGb",
|
|
36
44
|
"gpu_count": "gpuCount",
|
|
37
45
|
"instance_count": "instanceCount",
|
|
46
|
+
"vcpu_count": "vcpuCount",
|
|
38
47
|
});
|
|
39
48
|
});
|
|
40
49
|
/** @internal */
|
|
@@ -44,6 +53,7 @@ export type ComputeRequest$Outbound = {
|
|
|
44
53
|
gpu_count: number;
|
|
45
54
|
instance_count?: number | undefined;
|
|
46
55
|
interconnect?: string | undefined;
|
|
56
|
+
vcpu_count?: number | undefined;
|
|
47
57
|
};
|
|
48
58
|
|
|
49
59
|
/** @internal */
|
|
@@ -57,11 +67,13 @@ export const ComputeRequest$outboundSchema: z.ZodType<
|
|
|
57
67
|
gpuCount: z.number().int(),
|
|
58
68
|
instanceCount: z.number().int().optional(),
|
|
59
69
|
interconnect: z.string().optional(),
|
|
70
|
+
vcpuCount: z.number().int().optional(),
|
|
60
71
|
}).transform((v) => {
|
|
61
72
|
return remap$(v, {
|
|
62
73
|
ephemeralDiskGb: "ephemeral_disk_gb",
|
|
63
74
|
gpuCount: "gpu_count",
|
|
64
75
|
instanceCount: "instance_count",
|
|
76
|
+
vcpuCount: "vcpu_count",
|
|
65
77
|
});
|
|
66
78
|
});
|
|
67
79
|
|
|
@@ -32,7 +32,7 @@ export type ExchangeApiKeyTokenRequest = {
|
|
|
32
32
|
* Optional external end-user identifier forwarded by the API gateway.
|
|
33
33
|
*/
|
|
34
34
|
xOnBehalfOf?: string | undefined;
|
|
35
|
-
requestBody
|
|
35
|
+
requestBody: ExchangeApiKeyTokenRequestBody;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -102,8 +102,7 @@ export const ExchangeApiKeyTokenRequest$inboundSchema: z.ZodType<
|
|
|
102
102
|
unknown
|
|
103
103
|
> = z.object({
|
|
104
104
|
"X-On-Behalf-Of": z.string().optional(),
|
|
105
|
-
RequestBody: z.lazy(() => ExchangeApiKeyTokenRequestBody$inboundSchema)
|
|
106
|
-
.optional(),
|
|
105
|
+
RequestBody: z.lazy(() => ExchangeApiKeyTokenRequestBody$inboundSchema),
|
|
107
106
|
}).transform((v) => {
|
|
108
107
|
return remap$(v, {
|
|
109
108
|
"X-On-Behalf-Of": "xOnBehalfOf",
|
|
@@ -113,7 +112,7 @@ export const ExchangeApiKeyTokenRequest$inboundSchema: z.ZodType<
|
|
|
113
112
|
/** @internal */
|
|
114
113
|
export type ExchangeApiKeyTokenRequest$Outbound = {
|
|
115
114
|
"X-On-Behalf-Of"?: string | undefined;
|
|
116
|
-
RequestBody
|
|
115
|
+
RequestBody: ExchangeApiKeyTokenRequestBody$Outbound;
|
|
117
116
|
};
|
|
118
117
|
|
|
119
118
|
/** @internal */
|
|
@@ -123,8 +122,7 @@ export const ExchangeApiKeyTokenRequest$outboundSchema: z.ZodType<
|
|
|
123
122
|
ExchangeApiKeyTokenRequest
|
|
124
123
|
> = z.object({
|
|
125
124
|
xOnBehalfOf: z.string().optional(),
|
|
126
|
-
requestBody: z.lazy(() => ExchangeApiKeyTokenRequestBody$outboundSchema)
|
|
127
|
-
.optional(),
|
|
125
|
+
requestBody: z.lazy(() => ExchangeApiKeyTokenRequestBody$outboundSchema),
|
|
128
126
|
}).transform((v) => {
|
|
129
127
|
return remap$(v, {
|
|
130
128
|
xOnBehalfOf: "X-On-Behalf-Of",
|
|
@@ -32,7 +32,7 @@ export type GetJwtFromKeyRequest = {
|
|
|
32
32
|
* Optional external end-user identifier forwarded by the API gateway.
|
|
33
33
|
*/
|
|
34
34
|
xOnBehalfOf?: string | undefined;
|
|
35
|
-
requestBody
|
|
35
|
+
requestBody: GetJwtFromKeyRequestBody;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -100,7 +100,7 @@ export const GetJwtFromKeyRequest$inboundSchema: z.ZodType<
|
|
|
100
100
|
unknown
|
|
101
101
|
> = z.object({
|
|
102
102
|
"X-On-Behalf-Of": z.string().optional(),
|
|
103
|
-
RequestBody: z.lazy(() => GetJwtFromKeyRequestBody$inboundSchema)
|
|
103
|
+
RequestBody: z.lazy(() => GetJwtFromKeyRequestBody$inboundSchema),
|
|
104
104
|
}).transform((v) => {
|
|
105
105
|
return remap$(v, {
|
|
106
106
|
"X-On-Behalf-Of": "xOnBehalfOf",
|
|
@@ -110,7 +110,7 @@ export const GetJwtFromKeyRequest$inboundSchema: z.ZodType<
|
|
|
110
110
|
/** @internal */
|
|
111
111
|
export type GetJwtFromKeyRequest$Outbound = {
|
|
112
112
|
"X-On-Behalf-Of"?: string | undefined;
|
|
113
|
-
RequestBody
|
|
113
|
+
RequestBody: GetJwtFromKeyRequestBody$Outbound;
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
/** @internal */
|
|
@@ -120,7 +120,7 @@ export const GetJwtFromKeyRequest$outboundSchema: z.ZodType<
|
|
|
120
120
|
GetJwtFromKeyRequest
|
|
121
121
|
> = z.object({
|
|
122
122
|
xOnBehalfOf: z.string().optional(),
|
|
123
|
-
requestBody: z.lazy(() => GetJwtFromKeyRequestBody$outboundSchema)
|
|
123
|
+
requestBody: z.lazy(() => GetJwtFromKeyRequestBody$outboundSchema),
|
|
124
124
|
}).transform((v) => {
|
|
125
125
|
return remap$(v, {
|
|
126
126
|
xOnBehalfOf: "X-On-Behalf-Of",
|