@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.
Files changed (57) hide show
  1. package/bin/mcp-server.js +52 -24
  2. package/bin/mcp-server.js.map +9 -9
  3. package/dist/commonjs/lib/config.d.ts +2 -2
  4. package/dist/commonjs/lib/config.js +2 -2
  5. package/dist/commonjs/lib/config.js.map +1 -1
  6. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  7. package/dist/commonjs/mcp-server/mcp-server.js.map +1 -1
  8. package/dist/commonjs/mcp-server/server.js +1 -1
  9. package/dist/commonjs/mcp-server/server.js.map +1 -1
  10. package/dist/commonjs/models/components/computeaccelerator.d.ts +68 -8
  11. package/dist/commonjs/models/components/computeaccelerator.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/computeaccelerator.js +49 -9
  13. package/dist/commonjs/models/components/computeaccelerator.js.map +1 -1
  14. package/dist/commonjs/models/components/computerequest.d.ts +8 -0
  15. package/dist/commonjs/models/components/computerequest.d.ts.map +1 -1
  16. package/dist/commonjs/models/components/computerequest.js +4 -0
  17. package/dist/commonjs/models/components/computerequest.js.map +1 -1
  18. package/dist/commonjs/models/operations/exchangeapikeytoken.d.ts +2 -2
  19. package/dist/commonjs/models/operations/exchangeapikeytoken.d.ts.map +1 -1
  20. package/dist/commonjs/models/operations/exchangeapikeytoken.js +2 -4
  21. package/dist/commonjs/models/operations/exchangeapikeytoken.js.map +1 -1
  22. package/dist/commonjs/models/operations/getjwtfromkey.d.ts +2 -2
  23. package/dist/commonjs/models/operations/getjwtfromkey.d.ts.map +1 -1
  24. package/dist/commonjs/models/operations/getjwtfromkey.js +2 -2
  25. package/dist/commonjs/models/operations/getjwtfromkey.js.map +1 -1
  26. package/dist/esm/lib/config.d.ts +2 -2
  27. package/dist/esm/lib/config.js +2 -2
  28. package/dist/esm/lib/config.js.map +1 -1
  29. package/dist/esm/mcp-server/mcp-server.js +1 -1
  30. package/dist/esm/mcp-server/mcp-server.js.map +1 -1
  31. package/dist/esm/mcp-server/server.js +1 -1
  32. package/dist/esm/mcp-server/server.js.map +1 -1
  33. package/dist/esm/models/components/computeaccelerator.d.ts +68 -8
  34. package/dist/esm/models/components/computeaccelerator.d.ts.map +1 -1
  35. package/dist/esm/models/components/computeaccelerator.js +46 -8
  36. package/dist/esm/models/components/computeaccelerator.js.map +1 -1
  37. package/dist/esm/models/components/computerequest.d.ts +8 -0
  38. package/dist/esm/models/components/computerequest.d.ts.map +1 -1
  39. package/dist/esm/models/components/computerequest.js +4 -0
  40. package/dist/esm/models/components/computerequest.js.map +1 -1
  41. package/dist/esm/models/operations/exchangeapikeytoken.d.ts +2 -2
  42. package/dist/esm/models/operations/exchangeapikeytoken.d.ts.map +1 -1
  43. package/dist/esm/models/operations/exchangeapikeytoken.js +2 -4
  44. package/dist/esm/models/operations/exchangeapikeytoken.js.map +1 -1
  45. package/dist/esm/models/operations/getjwtfromkey.d.ts +2 -2
  46. package/dist/esm/models/operations/getjwtfromkey.d.ts.map +1 -1
  47. package/dist/esm/models/operations/getjwtfromkey.js +2 -2
  48. package/dist/esm/models/operations/getjwtfromkey.js.map +1 -1
  49. package/jsr.json +1 -1
  50. package/package.json +1 -1
  51. package/src/lib/config.ts +2 -2
  52. package/src/mcp-server/mcp-server.ts +1 -1
  53. package/src/mcp-server/server.ts +1 -1
  54. package/src/models/components/computeaccelerator.ts +114 -16
  55. package/src/models/components/computerequest.ts +12 -0
  56. package/src/models/operations/exchangeapikeytoken.ts +4 -6
  57. package/src/models/operations/getjwtfromkey.ts +4 -4
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.53.9",
22
+ currentVersion: "0.53.11",
23
23
  },
24
24
  });
25
25
 
@@ -347,7 +347,7 @@ export function createMCPServer(deps: {
347
347
  }) {
348
348
  const server = new McpServer({
349
349
  name: "SDK",
350
- version: "0.53.9",
350
+ version: "0.53.11",
351
351
  });
352
352
 
353
353
  const client = new SDKCore({
@@ -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
- gpuCounts: Array<number>;
21
- interconnects: Array<string>;
22
- memoryGb: number;
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
- vendor: Vendor;
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
- interconnects: z.array(z.string()),
43
- memory_gb: z.number().int(),
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
- vendor: Vendor$inboundSchema,
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: Array<number>;
57
- interconnects: Array<string>;
58
- memory_gb: number;
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
- vendor: string;
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
- interconnects: z.array(z.string()),
72
- memoryGb: z.number().int(),
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
- vendor: Vendor$outboundSchema,
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?: ExchangeApiKeyTokenRequestBody | undefined;
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?: ExchangeApiKeyTokenRequestBody$Outbound | undefined;
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?: GetJwtFromKeyRequestBody | undefined;
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).optional(),
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?: GetJwtFromKeyRequestBody$Outbound | undefined;
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).optional(),
123
+ requestBody: z.lazy(() => GetJwtFromKeyRequestBody$outboundSchema),
124
124
  }).transform((v) => {
125
125
  return remap$(v, {
126
126
  xOnBehalfOf: "X-On-Behalf-Of",