@meetkai/mka1 0.51.14 → 0.51.16
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/README.md +230 -227
- package/bin/mcp-server.js +316 -121
- package/bin/mcp-server.js.map +20 -17
- package/dist/commonjs/funcs/servingFinetuneJobsCreate.js +1 -1
- package/dist/commonjs/funcs/servingFinetuneJobsCreate.js.map +1 -1
- package/dist/commonjs/funcs/servingSecretsGet.d.ts +19 -0
- package/dist/commonjs/funcs/servingSecretsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/servingSecretsGet.js +136 -0
- package/dist/commonjs/funcs/servingSecretsGet.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/servingSecretsGet.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/servingSecretsGet.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/servingSecretsGet.js +64 -0
- package/dist/commonjs/mcp-server/tools/servingSecretsGet.js.map +1 -0
- package/dist/commonjs/models/components/deploymentcreate.d.ts +3 -0
- package/dist/commonjs/models/components/deploymentcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/deploymentcreate.js.map +1 -1
- package/dist/commonjs/models/components/finetunejobcreate.d.ts +3 -0
- package/dist/commonjs/models/components/finetunejobcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/finetunejobcreate.js.map +1 -1
- package/dist/commonjs/models/components/metrics.d.ts +3 -5
- package/dist/commonjs/models/components/metrics.d.ts.map +1 -1
- package/dist/commonjs/models/components/metrics.js +4 -8
- package/dist/commonjs/models/components/metrics.js.map +1 -1
- package/dist/commonjs/models/components/model.d.ts +5 -0
- package/dist/commonjs/models/components/model.d.ts.map +1 -1
- package/dist/commonjs/models/components/model.js +4 -0
- package/dist/commonjs/models/components/model.js.map +1 -1
- package/dist/commonjs/models/components/replica.d.ts +30 -3
- package/dist/commonjs/models/components/replica.d.ts.map +1 -1
- package/dist/commonjs/models/components/replica.js +17 -3
- package/dist/commonjs/models/components/replica.js.map +1 -1
- package/dist/commonjs/models/components/secret.d.ts +15 -0
- package/dist/commonjs/models/components/secret.d.ts.map +1 -1
- package/dist/commonjs/models/components/secret.js +14 -1
- package/dist/commonjs/models/components/secret.js.map +1 -1
- package/dist/commonjs/models/components/secretcreate.d.ts +15 -0
- package/dist/commonjs/models/components/secretcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/secretcreate.js +20 -1
- package/dist/commonjs/models/components/secretcreate.js.map +1 -1
- package/dist/commonjs/models/components/spendsummary.d.ts +3 -3
- package/dist/commonjs/models/components/spendsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/spendsummary.js +2 -2
- package/dist/commonjs/models/components/spendsummary.js.map +1 -1
- package/dist/commonjs/models/components/volume.d.ts +26 -0
- package/dist/commonjs/models/components/volume.d.ts.map +1 -1
- package/dist/commonjs/models/components/volume.js +18 -1
- package/dist/commonjs/models/components/volume.js.map +1 -1
- package/dist/commonjs/models/operations/getsecret.d.ts +22 -0
- package/dist/commonjs/models/operations/getsecret.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getsecret.js +71 -0
- package/dist/commonjs/models/operations/getsecret.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/react-query/index.d.ts +1 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/servingSecretsGet.core.d.ts +15 -0
- package/dist/commonjs/react-query/servingSecretsGet.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/servingSecretsGet.core.js +36 -0
- package/dist/commonjs/react-query/servingSecretsGet.core.js.map +1 -0
- package/dist/commonjs/react-query/servingSecretsGet.d.ts +39 -0
- package/dist/commonjs/react-query/servingSecretsGet.d.ts.map +1 -0
- package/dist/commonjs/react-query/servingSecretsGet.js +60 -0
- package/dist/commonjs/react-query/servingSecretsGet.js.map +1 -0
- package/dist/commonjs/sdk/secrets.d.ts +7 -0
- package/dist/commonjs/sdk/secrets.d.ts.map +1 -1
- package/dist/commonjs/sdk/secrets.js +10 -0
- package/dist/commonjs/sdk/secrets.js.map +1 -1
- package/dist/esm/funcs/servingFinetuneJobsCreate.js +1 -1
- package/dist/esm/funcs/servingFinetuneJobsCreate.js.map +1 -1
- package/dist/esm/funcs/servingSecretsGet.d.ts +19 -0
- package/dist/esm/funcs/servingSecretsGet.d.ts.map +1 -0
- package/dist/esm/funcs/servingSecretsGet.js +100 -0
- package/dist/esm/funcs/servingSecretsGet.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/servingSecretsGet.d.ts +8 -0
- package/dist/esm/mcp-server/tools/servingSecretsGet.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/servingSecretsGet.js +28 -0
- package/dist/esm/mcp-server/tools/servingSecretsGet.js.map +1 -0
- package/dist/esm/models/components/deploymentcreate.d.ts +3 -0
- package/dist/esm/models/components/deploymentcreate.d.ts.map +1 -1
- package/dist/esm/models/components/deploymentcreate.js.map +1 -1
- package/dist/esm/models/components/finetunejobcreate.d.ts +3 -0
- package/dist/esm/models/components/finetunejobcreate.d.ts.map +1 -1
- package/dist/esm/models/components/finetunejobcreate.js.map +1 -1
- package/dist/esm/models/components/metrics.d.ts +3 -5
- package/dist/esm/models/components/metrics.d.ts.map +1 -1
- package/dist/esm/models/components/metrics.js +4 -8
- package/dist/esm/models/components/metrics.js.map +1 -1
- package/dist/esm/models/components/model.d.ts +5 -0
- package/dist/esm/models/components/model.d.ts.map +1 -1
- package/dist/esm/models/components/model.js +4 -0
- package/dist/esm/models/components/model.js.map +1 -1
- package/dist/esm/models/components/replica.d.ts +30 -3
- package/dist/esm/models/components/replica.d.ts.map +1 -1
- package/dist/esm/models/components/replica.js +16 -2
- package/dist/esm/models/components/replica.js.map +1 -1
- package/dist/esm/models/components/secret.d.ts +15 -0
- package/dist/esm/models/components/secret.d.ts.map +1 -1
- package/dist/esm/models/components/secret.js +13 -0
- package/dist/esm/models/components/secret.js.map +1 -1
- package/dist/esm/models/components/secretcreate.d.ts +15 -0
- package/dist/esm/models/components/secretcreate.d.ts.map +1 -1
- package/dist/esm/models/components/secretcreate.js +19 -0
- package/dist/esm/models/components/secretcreate.js.map +1 -1
- package/dist/esm/models/components/spendsummary.d.ts +3 -3
- package/dist/esm/models/components/spendsummary.d.ts.map +1 -1
- package/dist/esm/models/components/spendsummary.js +2 -2
- package/dist/esm/models/components/spendsummary.js.map +1 -1
- package/dist/esm/models/components/volume.d.ts +26 -0
- package/dist/esm/models/components/volume.d.ts.map +1 -1
- package/dist/esm/models/components/volume.js +17 -0
- package/dist/esm/models/components/volume.js.map +1 -1
- package/dist/esm/models/operations/getsecret.d.ts +22 -0
- package/dist/esm/models/operations/getsecret.d.ts.map +1 -0
- package/dist/esm/models/operations/getsecret.js +33 -0
- package/dist/esm/models/operations/getsecret.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/react-query/index.d.ts +1 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/servingSecretsGet.core.d.ts +15 -0
- package/dist/esm/react-query/servingSecretsGet.core.d.ts.map +1 -0
- package/dist/esm/react-query/servingSecretsGet.core.js +31 -0
- package/dist/esm/react-query/servingSecretsGet.core.js.map +1 -0
- package/dist/esm/react-query/servingSecretsGet.d.ts +39 -0
- package/dist/esm/react-query/servingSecretsGet.d.ts.map +1 -0
- package/dist/esm/react-query/servingSecretsGet.js +50 -0
- package/dist/esm/react-query/servingSecretsGet.js.map +1 -0
- package/dist/esm/sdk/secrets.d.ts +7 -0
- package/dist/esm/sdk/secrets.d.ts.map +1 -1
- package/dist/esm/sdk/secrets.js +10 -0
- package/dist/esm/sdk/secrets.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/servingFinetuneJobsCreate.ts +1 -1
- package/src/funcs/servingSecretsGet.ts +196 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/servingSecretsGet.ts +37 -0
- package/src/models/components/deploymentcreate.ts +3 -0
- package/src/models/components/finetunejobcreate.ts +3 -0
- package/src/models/components/metrics.ts +7 -13
- package/src/models/components/model.ts +9 -0
- package/src/models/components/replica.ts +38 -5
- package/src/models/components/secret.ts +23 -0
- package/src/models/components/secretcreate.ts +32 -0
- package/src/models/components/spendsummary.ts +5 -5
- package/src/models/components/volume.ts +36 -0
- package/src/models/operations/getsecret.ts +69 -0
- package/src/models/operations/index.ts +1 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/servingSecretsGet.core.ts +76 -0
- package/src/react-query/servingSecretsGet.ts +141 -0
- package/src/sdk/secrets.ts +18 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { servingSecretsGet } from "../../funcs/servingSecretsGet.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetSecretRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$servingSecretsGet: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "serving-secrets-get",
|
|
15
|
+
description: `Get a secret
|
|
16
|
+
|
|
17
|
+
Retrieve secret metadata: key names and allowed use. Values are never returned.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await servingSecretsGet(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -95,6 +95,9 @@ export type DeploymentCreate = {
|
|
|
95
95
|
* Create-time scaling. Omitted min_containers defaults to one; explicit zero is preserved.
|
|
96
96
|
*/
|
|
97
97
|
scaling?: DeploymentScalingCreate | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Each referenced secret must include "serving" in its allowed_use.
|
|
100
|
+
*/
|
|
98
101
|
secrets?: Array<string> | undefined;
|
|
99
102
|
/**
|
|
100
103
|
* How a config change or rollback is rolled out.
|
|
@@ -12,11 +12,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
* Live serving metrics for a deployment.
|
|
13
13
|
*/
|
|
14
14
|
export type Metrics = {
|
|
15
|
-
acceleratorMemoryUsedMb: number;
|
|
16
15
|
/**
|
|
17
|
-
* 0.0–1.0 across replicas
|
|
16
|
+
* 0.0–1.0 serving-engine KV-cache usage averaged across Ready replicas
|
|
18
17
|
*/
|
|
19
|
-
|
|
18
|
+
kvCacheUtilization: number;
|
|
20
19
|
/**
|
|
21
20
|
* Requests waiting for a free replica
|
|
22
21
|
*/
|
|
@@ -28,23 +27,20 @@ export type Metrics = {
|
|
|
28
27
|
/** @internal */
|
|
29
28
|
export const Metrics$inboundSchema: z.ZodType<Metrics, z.ZodTypeDef, unknown> =
|
|
30
29
|
z.object({
|
|
31
|
-
|
|
32
|
-
accelerator_utilization: z.number(),
|
|
30
|
+
kv_cache_utilization: z.number(),
|
|
33
31
|
queue_backlog: z.number().int(),
|
|
34
32
|
replicas: z.number().int(),
|
|
35
33
|
requests_per_second: z.number(),
|
|
36
34
|
}).transform((v) => {
|
|
37
35
|
return remap$(v, {
|
|
38
|
-
"
|
|
39
|
-
"accelerator_utilization": "acceleratorUtilization",
|
|
36
|
+
"kv_cache_utilization": "kvCacheUtilization",
|
|
40
37
|
"queue_backlog": "queueBacklog",
|
|
41
38
|
"requests_per_second": "requestsPerSecond",
|
|
42
39
|
});
|
|
43
40
|
});
|
|
44
41
|
/** @internal */
|
|
45
42
|
export type Metrics$Outbound = {
|
|
46
|
-
|
|
47
|
-
accelerator_utilization: number;
|
|
43
|
+
kv_cache_utilization: number;
|
|
48
44
|
queue_backlog: number;
|
|
49
45
|
replicas: number;
|
|
50
46
|
requests_per_second: number;
|
|
@@ -56,15 +52,13 @@ export const Metrics$outboundSchema: z.ZodType<
|
|
|
56
52
|
z.ZodTypeDef,
|
|
57
53
|
Metrics
|
|
58
54
|
> = z.object({
|
|
59
|
-
|
|
60
|
-
acceleratorUtilization: z.number(),
|
|
55
|
+
kvCacheUtilization: z.number(),
|
|
61
56
|
queueBacklog: z.number().int(),
|
|
62
57
|
replicas: z.number().int(),
|
|
63
58
|
requestsPerSecond: z.number(),
|
|
64
59
|
}).transform((v) => {
|
|
65
60
|
return remap$(v, {
|
|
66
|
-
|
|
67
|
-
acceleratorUtilization: "accelerator_utilization",
|
|
61
|
+
kvCacheUtilization: "kv_cache_utilization",
|
|
68
62
|
queueBacklog: "queue_backlog",
|
|
69
63
|
requestsPerSecond: "requests_per_second",
|
|
70
64
|
});
|
|
@@ -13,6 +13,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export type Model = {
|
|
15
15
|
createdAt: Date;
|
|
16
|
+
/**
|
|
17
|
+
* Managed runtime recipes that can serve this model one-click; empty means the model is not deployable via a managed runtime (preflight signal, not a create-time error)
|
|
18
|
+
*/
|
|
19
|
+
deployableRuntimes: Array<string>;
|
|
16
20
|
id: string;
|
|
17
21
|
name: string;
|
|
18
22
|
revision?: string | null | undefined;
|
|
@@ -25,6 +29,7 @@ export const Model$inboundSchema: z.ZodType<Model, z.ZodTypeDef, unknown> = z
|
|
|
25
29
|
created_at: z.string().datetime({ offset: true }).transform(v =>
|
|
26
30
|
new Date(v)
|
|
27
31
|
),
|
|
32
|
+
deployable_runtimes: z.array(z.string()),
|
|
28
33
|
id: z.string(),
|
|
29
34
|
name: z.string(),
|
|
30
35
|
revision: z.nullable(z.string()).optional(),
|
|
@@ -32,11 +37,13 @@ export const Model$inboundSchema: z.ZodType<Model, z.ZodTypeDef, unknown> = z
|
|
|
32
37
|
}).transform((v) => {
|
|
33
38
|
return remap$(v, {
|
|
34
39
|
"created_at": "createdAt",
|
|
40
|
+
"deployable_runtimes": "deployableRuntimes",
|
|
35
41
|
});
|
|
36
42
|
});
|
|
37
43
|
/** @internal */
|
|
38
44
|
export type Model$Outbound = {
|
|
39
45
|
created_at: string;
|
|
46
|
+
deployable_runtimes: Array<string>;
|
|
40
47
|
id: string;
|
|
41
48
|
name: string;
|
|
42
49
|
revision?: string | null | undefined;
|
|
@@ -50,6 +57,7 @@ export const Model$outboundSchema: z.ZodType<
|
|
|
50
57
|
Model
|
|
51
58
|
> = z.object({
|
|
52
59
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
60
|
+
deployableRuntimes: z.array(z.string()),
|
|
53
61
|
id: z.string(),
|
|
54
62
|
name: z.string(),
|
|
55
63
|
revision: z.nullable(z.string()).optional(),
|
|
@@ -57,6 +65,7 @@ export const Model$outboundSchema: z.ZodType<
|
|
|
57
65
|
}).transform((v) => {
|
|
58
66
|
return remap$(v, {
|
|
59
67
|
createdAt: "created_at",
|
|
68
|
+
deployableRuntimes: "deployable_runtimes",
|
|
60
69
|
});
|
|
61
70
|
});
|
|
62
71
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
import {
|
|
@@ -14,6 +15,18 @@ import {
|
|
|
14
15
|
DeploymentAcceleratorSpec$outboundSchema,
|
|
15
16
|
} from "./deploymentacceleratorspec.js";
|
|
16
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Whether the replica runs on cluster-internal capacity or externally acquired capacity
|
|
20
|
+
*/
|
|
21
|
+
export const Placement = {
|
|
22
|
+
Internal: "internal",
|
|
23
|
+
External: "external",
|
|
24
|
+
} as const;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the replica runs on cluster-internal capacity or externally acquired capacity
|
|
27
|
+
*/
|
|
28
|
+
export type Placement = ClosedEnum<typeof Placement>;
|
|
29
|
+
|
|
17
30
|
/**
|
|
18
31
|
* A single running replica (pod/container) behind a deployment.
|
|
19
32
|
*/
|
|
@@ -27,23 +40,40 @@ export type Replica = {
|
|
|
27
40
|
*/
|
|
28
41
|
accelerator: DeploymentAcceleratorSpec;
|
|
29
42
|
id: string;
|
|
30
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Whether the replica runs on cluster-internal capacity or externally acquired capacity
|
|
45
|
+
*/
|
|
46
|
+
placement: Placement;
|
|
31
47
|
priceUsdHr?: number | undefined;
|
|
32
48
|
/**
|
|
33
|
-
*
|
|
49
|
+
* Backing infrastructure identity when allocated; omitted when the cluster hides provider identity
|
|
34
50
|
*/
|
|
35
51
|
provider?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Backing infrastructure region when allocated; omitted when the cluster hides provider identity
|
|
54
|
+
*/
|
|
36
55
|
region?: string | undefined;
|
|
37
56
|
startedAt?: Date | null | undefined;
|
|
38
57
|
status: string;
|
|
58
|
+
/**
|
|
59
|
+
* Opaque placement zone identifier, stable per allocation
|
|
60
|
+
*/
|
|
61
|
+
zone: string;
|
|
39
62
|
};
|
|
40
63
|
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const Placement$inboundSchema: z.ZodNativeEnum<typeof Placement> = z
|
|
66
|
+
.nativeEnum(Placement);
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const Placement$outboundSchema: z.ZodNativeEnum<typeof Placement> =
|
|
69
|
+
Placement$inboundSchema;
|
|
70
|
+
|
|
41
71
|
/** @internal */
|
|
42
72
|
export const Replica$inboundSchema: z.ZodType<Replica, z.ZodTypeDef, unknown> =
|
|
43
73
|
z.object({
|
|
44
74
|
accelerator: DeploymentAcceleratorSpec$inboundSchema,
|
|
45
75
|
id: z.string(),
|
|
46
|
-
|
|
76
|
+
placement: Placement$inboundSchema,
|
|
47
77
|
price_usd_hr: z.number().optional(),
|
|
48
78
|
provider: z.string().optional(),
|
|
49
79
|
region: z.string().optional(),
|
|
@@ -51,6 +81,7 @@ export const Replica$inboundSchema: z.ZodType<Replica, z.ZodTypeDef, unknown> =
|
|
|
51
81
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
52
82
|
).optional(),
|
|
53
83
|
status: z.string(),
|
|
84
|
+
zone: z.string(),
|
|
54
85
|
}).transform((v) => {
|
|
55
86
|
return remap$(v, {
|
|
56
87
|
"price_usd_hr": "priceUsdHr",
|
|
@@ -61,12 +92,13 @@ export const Replica$inboundSchema: z.ZodType<Replica, z.ZodTypeDef, unknown> =
|
|
|
61
92
|
export type Replica$Outbound = {
|
|
62
93
|
accelerator: DeploymentAcceleratorSpec$Outbound;
|
|
63
94
|
id: string;
|
|
64
|
-
|
|
95
|
+
placement: string;
|
|
65
96
|
price_usd_hr?: number | undefined;
|
|
66
97
|
provider?: string | undefined;
|
|
67
98
|
region?: string | undefined;
|
|
68
99
|
started_at?: string | null | undefined;
|
|
69
100
|
status: string;
|
|
101
|
+
zone: string;
|
|
70
102
|
};
|
|
71
103
|
|
|
72
104
|
/** @internal */
|
|
@@ -77,12 +109,13 @@ export const Replica$outboundSchema: z.ZodType<
|
|
|
77
109
|
> = z.object({
|
|
78
110
|
accelerator: DeploymentAcceleratorSpec$outboundSchema,
|
|
79
111
|
id: z.string(),
|
|
80
|
-
|
|
112
|
+
placement: Placement$outboundSchema,
|
|
81
113
|
priceUsdHr: z.number().optional(),
|
|
82
114
|
provider: z.string().optional(),
|
|
83
115
|
region: z.string().optional(),
|
|
84
116
|
startedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
85
117
|
status: z.string(),
|
|
118
|
+
zone: z.string(),
|
|
86
119
|
}).transform((v) => {
|
|
87
120
|
return remap$(v, {
|
|
88
121
|
priceUsdHr: "price_usd_hr",
|
|
@@ -5,13 +5,24 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
|
|
12
|
+
export const AllowedUse = {
|
|
13
|
+
Finetune: "finetune",
|
|
14
|
+
Serving: "serving",
|
|
15
|
+
} as const;
|
|
16
|
+
export type AllowedUse = ClosedEnum<typeof AllowedUse>;
|
|
17
|
+
|
|
11
18
|
/**
|
|
12
19
|
* A secret. Only key names are ever returned, never values.
|
|
13
20
|
*/
|
|
14
21
|
export type Secret = {
|
|
22
|
+
/**
|
|
23
|
+
* Products that may resolve this secret into a workload environment
|
|
24
|
+
*/
|
|
25
|
+
allowedUse: Array<AllowedUse>;
|
|
15
26
|
createdAt: Date;
|
|
16
27
|
id: string;
|
|
17
28
|
/**
|
|
@@ -21,9 +32,17 @@ export type Secret = {
|
|
|
21
32
|
name: string;
|
|
22
33
|
};
|
|
23
34
|
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const AllowedUse$inboundSchema: z.ZodNativeEnum<typeof AllowedUse> = z
|
|
37
|
+
.nativeEnum(AllowedUse);
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const AllowedUse$outboundSchema: z.ZodNativeEnum<typeof AllowedUse> =
|
|
40
|
+
AllowedUse$inboundSchema;
|
|
41
|
+
|
|
24
42
|
/** @internal */
|
|
25
43
|
export const Secret$inboundSchema: z.ZodType<Secret, z.ZodTypeDef, unknown> = z
|
|
26
44
|
.object({
|
|
45
|
+
allowed_use: z.array(AllowedUse$inboundSchema),
|
|
27
46
|
created_at: z.string().datetime({ offset: true }).transform(v =>
|
|
28
47
|
new Date(v)
|
|
29
48
|
),
|
|
@@ -32,11 +51,13 @@ export const Secret$inboundSchema: z.ZodType<Secret, z.ZodTypeDef, unknown> = z
|
|
|
32
51
|
name: z.string(),
|
|
33
52
|
}).transform((v) => {
|
|
34
53
|
return remap$(v, {
|
|
54
|
+
"allowed_use": "allowedUse",
|
|
35
55
|
"created_at": "createdAt",
|
|
36
56
|
});
|
|
37
57
|
});
|
|
38
58
|
/** @internal */
|
|
39
59
|
export type Secret$Outbound = {
|
|
60
|
+
allowed_use: Array<string>;
|
|
40
61
|
created_at: string;
|
|
41
62
|
id: string;
|
|
42
63
|
keys: Array<string>;
|
|
@@ -49,12 +70,14 @@ export const Secret$outboundSchema: z.ZodType<
|
|
|
49
70
|
z.ZodTypeDef,
|
|
50
71
|
Secret
|
|
51
72
|
> = z.object({
|
|
73
|
+
allowedUse: z.array(AllowedUse$outboundSchema),
|
|
52
74
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
53
75
|
id: z.string(),
|
|
54
76
|
keys: z.array(z.string()),
|
|
55
77
|
name: z.string(),
|
|
56
78
|
}).transform((v) => {
|
|
57
79
|
return remap$(v, {
|
|
80
|
+
allowedUse: "allowed_use",
|
|
58
81
|
createdAt: "created_at",
|
|
59
82
|
});
|
|
60
83
|
});
|
|
@@ -3,14 +3,26 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
11
|
|
|
12
|
+
export const SecretCreateAllowedUse = {
|
|
13
|
+
Finetune: "finetune",
|
|
14
|
+
Serving: "serving",
|
|
15
|
+
} as const;
|
|
16
|
+
export type SecretCreateAllowedUse = ClosedEnum<typeof SecretCreateAllowedUse>;
|
|
17
|
+
|
|
10
18
|
/**
|
|
11
19
|
* Create a secret. Values are write-only and never returned.
|
|
12
20
|
*/
|
|
13
21
|
export type SecretCreate = {
|
|
22
|
+
/**
|
|
23
|
+
* Products that may resolve this secret into a workload environment. Defaults to both when omitted.
|
|
24
|
+
*/
|
|
25
|
+
allowedUse?: Array<SecretCreateAllowedUse> | undefined;
|
|
14
26
|
/**
|
|
15
27
|
* Key/value pairs injected as env vars
|
|
16
28
|
*/
|
|
@@ -18,17 +30,32 @@ export type SecretCreate = {
|
|
|
18
30
|
name: string;
|
|
19
31
|
};
|
|
20
32
|
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const SecretCreateAllowedUse$inboundSchema: z.ZodNativeEnum<
|
|
35
|
+
typeof SecretCreateAllowedUse
|
|
36
|
+
> = z.nativeEnum(SecretCreateAllowedUse);
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const SecretCreateAllowedUse$outboundSchema: z.ZodNativeEnum<
|
|
39
|
+
typeof SecretCreateAllowedUse
|
|
40
|
+
> = SecretCreateAllowedUse$inboundSchema;
|
|
41
|
+
|
|
21
42
|
/** @internal */
|
|
22
43
|
export const SecretCreate$inboundSchema: z.ZodType<
|
|
23
44
|
SecretCreate,
|
|
24
45
|
z.ZodTypeDef,
|
|
25
46
|
unknown
|
|
26
47
|
> = z.object({
|
|
48
|
+
allowed_use: z.array(SecretCreateAllowedUse$inboundSchema).optional(),
|
|
27
49
|
data: z.record(z.string()),
|
|
28
50
|
name: z.string(),
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
"allowed_use": "allowedUse",
|
|
54
|
+
});
|
|
29
55
|
});
|
|
30
56
|
/** @internal */
|
|
31
57
|
export type SecretCreate$Outbound = {
|
|
58
|
+
allowed_use?: Array<string> | undefined;
|
|
32
59
|
data: { [k: string]: string };
|
|
33
60
|
name: string;
|
|
34
61
|
};
|
|
@@ -39,8 +66,13 @@ export const SecretCreate$outboundSchema: z.ZodType<
|
|
|
39
66
|
z.ZodTypeDef,
|
|
40
67
|
SecretCreate
|
|
41
68
|
> = z.object({
|
|
69
|
+
allowedUse: z.array(SecretCreateAllowedUse$outboundSchema).optional(),
|
|
42
70
|
data: z.record(z.string()),
|
|
43
71
|
name: z.string(),
|
|
72
|
+
}).transform((v) => {
|
|
73
|
+
return remap$(v, {
|
|
74
|
+
allowedUse: "allowed_use",
|
|
75
|
+
});
|
|
44
76
|
});
|
|
45
77
|
|
|
46
78
|
export function secretCreateToJSON(secretCreate: SecretCreate): string {
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
} from "./spendwindow.js";
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* Aggregate spend computed as price × runtime overlap with the window; derived on read, never stored.
|
|
24
|
+
* Aggregate spend computed as price × runtime overlap with the window; derived on read, never stored. The deployments group is present only on clusters where the deployments product is available; fine-tune-only clusters return the finetune group alone.
|
|
25
25
|
*/
|
|
26
26
|
export type SpendSummary = {
|
|
27
27
|
/**
|
|
28
28
|
* Aggregate spend for one resource class.
|
|
29
29
|
*/
|
|
30
|
-
deployments
|
|
30
|
+
deployments?: SpendGroup | undefined;
|
|
31
31
|
/**
|
|
32
32
|
* Aggregate spend for one resource class.
|
|
33
33
|
*/
|
|
@@ -48,7 +48,7 @@ export const SpendSummary$inboundSchema: z.ZodType<
|
|
|
48
48
|
z.ZodTypeDef,
|
|
49
49
|
unknown
|
|
50
50
|
> = z.object({
|
|
51
|
-
deployments: SpendGroup$inboundSchema,
|
|
51
|
+
deployments: SpendGroup$inboundSchema.optional(),
|
|
52
52
|
finetune: SpendGroup$inboundSchema,
|
|
53
53
|
total_usd: z.number(),
|
|
54
54
|
window: SpendWindow$inboundSchema,
|
|
@@ -59,7 +59,7 @@ export const SpendSummary$inboundSchema: z.ZodType<
|
|
|
59
59
|
});
|
|
60
60
|
/** @internal */
|
|
61
61
|
export type SpendSummary$Outbound = {
|
|
62
|
-
deployments
|
|
62
|
+
deployments?: SpendGroup$Outbound | undefined;
|
|
63
63
|
finetune: SpendGroup$Outbound;
|
|
64
64
|
total_usd: number;
|
|
65
65
|
window: SpendWindow$Outbound;
|
|
@@ -71,7 +71,7 @@ export const SpendSummary$outboundSchema: z.ZodType<
|
|
|
71
71
|
z.ZodTypeDef,
|
|
72
72
|
SpendSummary
|
|
73
73
|
> = z.object({
|
|
74
|
-
deployments: SpendGroup$outboundSchema,
|
|
74
|
+
deployments: SpendGroup$outboundSchema.optional(),
|
|
75
75
|
finetune: SpendGroup$outboundSchema,
|
|
76
76
|
totalUsd: z.number(),
|
|
77
77
|
window: SpendWindow$outboundSchema,
|
|
@@ -5,9 +5,22 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
|
|
12
|
+
/**
|
|
13
|
+
* deleting while asynchronous artifact removal is still in progress
|
|
14
|
+
*/
|
|
15
|
+
export const VolumeStatus = {
|
|
16
|
+
Active: "active",
|
|
17
|
+
Deleting: "deleting",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* deleting while asynchronous artifact removal is still in progress
|
|
21
|
+
*/
|
|
22
|
+
export type VolumeStatus = ClosedEnum<typeof VolumeStatus>;
|
|
23
|
+
|
|
11
24
|
/**
|
|
12
25
|
* A persistent volume.
|
|
13
26
|
*/
|
|
@@ -16,8 +29,23 @@ export type Volume = {
|
|
|
16
29
|
id: string;
|
|
17
30
|
name: string;
|
|
18
31
|
sizeGb?: number | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* deleting while asynchronous artifact removal is still in progress
|
|
34
|
+
*/
|
|
35
|
+
status: VolumeStatus;
|
|
36
|
+
/**
|
|
37
|
+
* Bytes of artifacts (logs and checkpoints) currently accounted to the volume
|
|
38
|
+
*/
|
|
39
|
+
usedBytes: number;
|
|
19
40
|
};
|
|
20
41
|
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const VolumeStatus$inboundSchema: z.ZodNativeEnum<typeof VolumeStatus> =
|
|
44
|
+
z.nativeEnum(VolumeStatus);
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const VolumeStatus$outboundSchema: z.ZodNativeEnum<typeof VolumeStatus> =
|
|
47
|
+
VolumeStatus$inboundSchema;
|
|
48
|
+
|
|
21
49
|
/** @internal */
|
|
22
50
|
export const Volume$inboundSchema: z.ZodType<Volume, z.ZodTypeDef, unknown> = z
|
|
23
51
|
.object({
|
|
@@ -27,10 +55,13 @@ export const Volume$inboundSchema: z.ZodType<Volume, z.ZodTypeDef, unknown> = z
|
|
|
27
55
|
id: z.string(),
|
|
28
56
|
name: z.string(),
|
|
29
57
|
size_gb: z.nullable(z.number().int()).optional(),
|
|
58
|
+
status: VolumeStatus$inboundSchema,
|
|
59
|
+
used_bytes: z.number().int(),
|
|
30
60
|
}).transform((v) => {
|
|
31
61
|
return remap$(v, {
|
|
32
62
|
"created_at": "createdAt",
|
|
33
63
|
"size_gb": "sizeGb",
|
|
64
|
+
"used_bytes": "usedBytes",
|
|
34
65
|
});
|
|
35
66
|
});
|
|
36
67
|
/** @internal */
|
|
@@ -39,6 +70,8 @@ export type Volume$Outbound = {
|
|
|
39
70
|
id: string;
|
|
40
71
|
name: string;
|
|
41
72
|
size_gb?: number | null | undefined;
|
|
73
|
+
status: string;
|
|
74
|
+
used_bytes: number;
|
|
42
75
|
};
|
|
43
76
|
|
|
44
77
|
/** @internal */
|
|
@@ -51,10 +84,13 @@ export const Volume$outboundSchema: z.ZodType<
|
|
|
51
84
|
id: z.string(),
|
|
52
85
|
name: z.string(),
|
|
53
86
|
sizeGb: z.nullable(z.number().int()).optional(),
|
|
87
|
+
status: VolumeStatus$outboundSchema,
|
|
88
|
+
usedBytes: z.number().int(),
|
|
54
89
|
}).transform((v) => {
|
|
55
90
|
return remap$(v, {
|
|
56
91
|
createdAt: "created_at",
|
|
57
92
|
sizeGb: "size_gb",
|
|
93
|
+
usedBytes: "used_bytes",
|
|
58
94
|
});
|
|
59
95
|
});
|
|
60
96
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type GetSecretRequest = {
|
|
12
|
+
secretId: string;
|
|
13
|
+
/**
|
|
14
|
+
* Optional external end-user identifier forwarded by the API gateway.
|
|
15
|
+
*/
|
|
16
|
+
xOnBehalfOf?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const GetSecretRequest$inboundSchema: z.ZodType<
|
|
21
|
+
GetSecretRequest,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
secret_id: z.string(),
|
|
26
|
+
"X-On-Behalf-Of": z.string().optional(),
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
"secret_id": "secretId",
|
|
30
|
+
"X-On-Behalf-Of": "xOnBehalfOf",
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type GetSecretRequest$Outbound = {
|
|
35
|
+
secret_id: string;
|
|
36
|
+
"X-On-Behalf-Of"?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const GetSecretRequest$outboundSchema: z.ZodType<
|
|
41
|
+
GetSecretRequest$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
GetSecretRequest
|
|
44
|
+
> = z.object({
|
|
45
|
+
secretId: z.string(),
|
|
46
|
+
xOnBehalfOf: z.string().optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
secretId: "secret_id",
|
|
50
|
+
xOnBehalfOf: "X-On-Behalf-Of",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export function getSecretRequestToJSON(
|
|
55
|
+
getSecretRequest: GetSecretRequest,
|
|
56
|
+
): string {
|
|
57
|
+
return JSON.stringify(
|
|
58
|
+
GetSecretRequest$outboundSchema.parse(getSecretRequest),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
export function getSecretRequestFromJSON(
|
|
62
|
+
jsonString: string,
|
|
63
|
+
): SafeParseResult<GetSecretRequest, SDKValidationError> {
|
|
64
|
+
return safeParse(
|
|
65
|
+
jsonString,
|
|
66
|
+
(x) => GetSecretRequest$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
+
`Failed to parse 'GetSecretRequest' from JSON`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -163,6 +163,7 @@ export * from "./getresponse.js";
|
|
|
163
163
|
export * from "./getresponsefeedback.js";
|
|
164
164
|
export * from "./getresponsesusage.js";
|
|
165
165
|
export * from "./getsandboxusage.js";
|
|
166
|
+
export * from "./getsecret.js";
|
|
166
167
|
export * from "./getserviceaccount.js";
|
|
167
168
|
export * from "./getservingmodel.js";
|
|
168
169
|
export * from "./getservingorganizationdeletion.js";
|
package/src/react-query/index.ts
CHANGED
|
@@ -331,6 +331,7 @@ export * from "./servingRecipesRegister.js";
|
|
|
331
331
|
export * from "./servingRecipesSetEnabled.js";
|
|
332
332
|
export * from "./servingSecretsCreate.js";
|
|
333
333
|
export * from "./servingSecretsDelete.js";
|
|
334
|
+
export * from "./servingSecretsGet.js";
|
|
334
335
|
export * from "./servingSecretsList.js";
|
|
335
336
|
export * from "./servingSpendGet.js";
|
|
336
337
|
export * from "./servingTenantsDeleteOrganization.js";
|