@meetkai/mka1 0.51.20 → 0.51.22
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 +246 -243
- package/bin/mcp-server.js +568 -371
- package/bin/mcp-server.js.map +27 -23
- package/dist/commonjs/funcs/servingDatasetsCreate.d.ts +1 -1
- package/dist/commonjs/funcs/servingDatasetsCreate.js +1 -1
- package/dist/commonjs/funcs/servingDatasetsUploadContent.d.ts +19 -0
- package/dist/commonjs/funcs/servingDatasetsUploadContent.d.ts.map +1 -0
- package/dist/commonjs/funcs/servingDatasetsUploadContent.js +139 -0
- package/dist/commonjs/funcs/servingDatasetsUploadContent.js.map +1 -0
- package/dist/commonjs/funcs/servingTenantsDeleteOrganization.d.ts +3 -1
- package/dist/commonjs/funcs/servingTenantsDeleteOrganization.d.ts.map +1 -1
- package/dist/commonjs/funcs/servingTenantsDeleteOrganization.js +3 -1
- package/dist/commonjs/funcs/servingTenantsDeleteOrganization.js.map +1 -1
- package/dist/commonjs/funcs/servingTenantsGet.d.ts +3 -1
- package/dist/commonjs/funcs/servingTenantsGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/servingTenantsGet.js +3 -1
- package/dist/commonjs/funcs/servingTenantsGet.js.map +1 -1
- package/dist/commonjs/funcs/servingTenantsGetOrganizationDeletion.d.ts +3 -1
- package/dist/commonjs/funcs/servingTenantsGetOrganizationDeletion.d.ts.map +1 -1
- package/dist/commonjs/funcs/servingTenantsGetOrganizationDeletion.js +3 -1
- package/dist/commonjs/funcs/servingTenantsGetOrganizationDeletion.js.map +1 -1
- package/dist/commonjs/funcs/servingTenantsList.d.ts +3 -1
- package/dist/commonjs/funcs/servingTenantsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/servingTenantsList.js +3 -1
- package/dist/commonjs/funcs/servingTenantsList.js.map +1 -1
- package/dist/commonjs/funcs/servingTenantsSet.d.ts +3 -1
- package/dist/commonjs/funcs/servingTenantsSet.d.ts.map +1 -1
- package/dist/commonjs/funcs/servingTenantsSet.js +3 -1
- package/dist/commonjs/funcs/servingTenantsSet.js.map +1 -1
- 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/servingDatasetsCreate.js +1 -1
- package/dist/commonjs/mcp-server/tools/servingDatasetsCreate.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/servingDatasetsUploadContent.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/servingDatasetsUploadContent.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/servingDatasetsUploadContent.js +64 -0
- package/dist/commonjs/mcp-server/tools/servingDatasetsUploadContent.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsDeleteOrganization.js +1 -1
- package/dist/commonjs/mcp-server/tools/servingTenantsDeleteOrganization.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/servingTenantsGet.js +1 -1
- package/dist/commonjs/mcp-server/tools/servingTenantsGet.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/servingTenantsGetOrganizationDeletion.js +1 -1
- package/dist/commonjs/mcp-server/tools/servingTenantsGetOrganizationDeletion.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/servingTenantsList.js +1 -1
- package/dist/commonjs/mcp-server/tools/servingTenantsList.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/servingTenantsSet.js +1 -1
- package/dist/commonjs/mcp-server/tools/servingTenantsSet.js.map +1 -1
- package/dist/commonjs/models/components/acceleratortype.d.ts +5 -5
- package/dist/commonjs/models/components/acceleratortype.js +1 -1
- package/dist/commonjs/models/components/datasetupload.d.ts +22 -1
- package/dist/commonjs/models/components/datasetupload.d.ts.map +1 -1
- package/dist/commonjs/models/components/datasetupload.js +14 -1
- package/dist/commonjs/models/components/datasetupload.js.map +1 -1
- package/dist/commonjs/models/components/datasetuploadreceipt.d.ts +33 -0
- package/dist/commonjs/models/components/datasetuploadreceipt.d.ts.map +1 -0
- package/dist/commonjs/models/components/datasetuploadreceipt.js +71 -0
- package/dist/commonjs/models/components/datasetuploadreceipt.js.map +1 -0
- package/dist/commonjs/models/components/datasetuploadtarget.d.ts +6 -3
- package/dist/commonjs/models/components/datasetuploadtarget.d.ts.map +1 -1
- package/dist/commonjs/models/components/datasetuploadtarget.js +2 -2
- package/dist/commonjs/models/components/datasetuploadtarget.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- 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/models/operations/uploadservingdatasetcontent.d.ts +24 -0
- package/dist/commonjs/models/operations/uploadservingdatasetcontent.d.ts.map +1 -0
- package/dist/commonjs/models/operations/uploadservingdatasetcontent.js +85 -0
- package/dist/commonjs/models/operations/uploadservingdatasetcontent.js.map +1 -0
- 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/servingDatasetsCreate.d.ts +1 -1
- package/dist/commonjs/react-query/servingDatasetsCreate.js +1 -1
- package/dist/commonjs/react-query/servingDatasetsUploadContent.d.ts +30 -0
- package/dist/commonjs/react-query/servingDatasetsUploadContent.d.ts.map +1 -0
- package/dist/commonjs/react-query/servingDatasetsUploadContent.js +47 -0
- package/dist/commonjs/react-query/servingDatasetsUploadContent.js.map +1 -0
- package/dist/commonjs/react-query/servingTenantsDeleteOrganization.d.ts +3 -1
- package/dist/commonjs/react-query/servingTenantsDeleteOrganization.d.ts.map +1 -1
- package/dist/commonjs/react-query/servingTenantsDeleteOrganization.js +3 -1
- package/dist/commonjs/react-query/servingTenantsDeleteOrganization.js.map +1 -1
- package/dist/commonjs/react-query/servingTenantsGet.d.ts +6 -2
- package/dist/commonjs/react-query/servingTenantsGet.d.ts.map +1 -1
- package/dist/commonjs/react-query/servingTenantsGet.js +6 -2
- package/dist/commonjs/react-query/servingTenantsGet.js.map +1 -1
- package/dist/commonjs/react-query/servingTenantsGetOrganizationDeletion.d.ts +6 -2
- package/dist/commonjs/react-query/servingTenantsGetOrganizationDeletion.d.ts.map +1 -1
- package/dist/commonjs/react-query/servingTenantsGetOrganizationDeletion.js +6 -2
- package/dist/commonjs/react-query/servingTenantsGetOrganizationDeletion.js.map +1 -1
- package/dist/commonjs/react-query/servingTenantsList.d.ts +6 -2
- package/dist/commonjs/react-query/servingTenantsList.d.ts.map +1 -1
- package/dist/commonjs/react-query/servingTenantsList.js +6 -2
- package/dist/commonjs/react-query/servingTenantsList.js.map +1 -1
- package/dist/commonjs/react-query/servingTenantsSet.d.ts +3 -1
- package/dist/commonjs/react-query/servingTenantsSet.d.ts.map +1 -1
- package/dist/commonjs/react-query/servingTenantsSet.js +3 -1
- package/dist/commonjs/react-query/servingTenantsSet.js.map +1 -1
- package/dist/commonjs/sdk/datasets.d.ts +8 -1
- package/dist/commonjs/sdk/datasets.d.ts.map +1 -1
- package/dist/commonjs/sdk/datasets.js +11 -1
- package/dist/commonjs/sdk/datasets.js.map +1 -1
- package/dist/commonjs/sdk/tenants.d.ts +15 -5
- package/dist/commonjs/sdk/tenants.d.ts.map +1 -1
- package/dist/commonjs/sdk/tenants.js +15 -5
- package/dist/commonjs/sdk/tenants.js.map +1 -1
- package/dist/esm/funcs/servingDatasetsCreate.d.ts +1 -1
- package/dist/esm/funcs/servingDatasetsCreate.js +1 -1
- package/dist/esm/funcs/servingDatasetsUploadContent.d.ts +19 -0
- package/dist/esm/funcs/servingDatasetsUploadContent.d.ts.map +1 -0
- package/dist/esm/funcs/servingDatasetsUploadContent.js +103 -0
- package/dist/esm/funcs/servingDatasetsUploadContent.js.map +1 -0
- package/dist/esm/funcs/servingTenantsDeleteOrganization.d.ts +3 -1
- package/dist/esm/funcs/servingTenantsDeleteOrganization.d.ts.map +1 -1
- package/dist/esm/funcs/servingTenantsDeleteOrganization.js +3 -1
- package/dist/esm/funcs/servingTenantsDeleteOrganization.js.map +1 -1
- package/dist/esm/funcs/servingTenantsGet.d.ts +3 -1
- package/dist/esm/funcs/servingTenantsGet.d.ts.map +1 -1
- package/dist/esm/funcs/servingTenantsGet.js +3 -1
- package/dist/esm/funcs/servingTenantsGet.js.map +1 -1
- package/dist/esm/funcs/servingTenantsGetOrganizationDeletion.d.ts +3 -1
- package/dist/esm/funcs/servingTenantsGetOrganizationDeletion.d.ts.map +1 -1
- package/dist/esm/funcs/servingTenantsGetOrganizationDeletion.js +3 -1
- package/dist/esm/funcs/servingTenantsGetOrganizationDeletion.js.map +1 -1
- package/dist/esm/funcs/servingTenantsList.d.ts +3 -1
- package/dist/esm/funcs/servingTenantsList.d.ts.map +1 -1
- package/dist/esm/funcs/servingTenantsList.js +3 -1
- package/dist/esm/funcs/servingTenantsList.js.map +1 -1
- package/dist/esm/funcs/servingTenantsSet.d.ts +3 -1
- package/dist/esm/funcs/servingTenantsSet.d.ts.map +1 -1
- package/dist/esm/funcs/servingTenantsSet.js +3 -1
- package/dist/esm/funcs/servingTenantsSet.js.map +1 -1
- 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/servingDatasetsCreate.js +1 -1
- package/dist/esm/mcp-server/tools/servingDatasetsCreate.js.map +1 -1
- package/dist/esm/mcp-server/tools/servingDatasetsUploadContent.d.ts +8 -0
- package/dist/esm/mcp-server/tools/servingDatasetsUploadContent.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/servingDatasetsUploadContent.js +28 -0
- package/dist/esm/mcp-server/tools/servingDatasetsUploadContent.js.map +1 -0
- package/dist/esm/mcp-server/tools/servingTenantsDeleteOrganization.js +1 -1
- package/dist/esm/mcp-server/tools/servingTenantsDeleteOrganization.js.map +1 -1
- package/dist/esm/mcp-server/tools/servingTenantsGet.js +1 -1
- package/dist/esm/mcp-server/tools/servingTenantsGet.js.map +1 -1
- package/dist/esm/mcp-server/tools/servingTenantsGetOrganizationDeletion.js +1 -1
- package/dist/esm/mcp-server/tools/servingTenantsGetOrganizationDeletion.js.map +1 -1
- package/dist/esm/mcp-server/tools/servingTenantsList.js +1 -1
- package/dist/esm/mcp-server/tools/servingTenantsList.js.map +1 -1
- package/dist/esm/mcp-server/tools/servingTenantsSet.js +1 -1
- package/dist/esm/mcp-server/tools/servingTenantsSet.js.map +1 -1
- package/dist/esm/models/components/acceleratortype.d.ts +5 -5
- package/dist/esm/models/components/acceleratortype.js +1 -1
- package/dist/esm/models/components/datasetupload.d.ts +22 -1
- package/dist/esm/models/components/datasetupload.d.ts.map +1 -1
- package/dist/esm/models/components/datasetupload.js +13 -0
- package/dist/esm/models/components/datasetupload.js.map +1 -1
- package/dist/esm/models/components/datasetuploadreceipt.d.ts +33 -0
- package/dist/esm/models/components/datasetuploadreceipt.d.ts.map +1 -0
- package/dist/esm/models/components/datasetuploadreceipt.js +33 -0
- package/dist/esm/models/components/datasetuploadreceipt.js.map +1 -0
- package/dist/esm/models/components/datasetuploadtarget.d.ts +6 -3
- package/dist/esm/models/components/datasetuploadtarget.d.ts.map +1 -1
- package/dist/esm/models/components/datasetuploadtarget.js +2 -2
- package/dist/esm/models/components/datasetuploadtarget.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- 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/models/operations/uploadservingdatasetcontent.d.ts +24 -0
- package/dist/esm/models/operations/uploadservingdatasetcontent.d.ts.map +1 -0
- package/dist/esm/models/operations/uploadservingdatasetcontent.js +47 -0
- package/dist/esm/models/operations/uploadservingdatasetcontent.js.map +1 -0
- 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/servingDatasetsCreate.d.ts +1 -1
- package/dist/esm/react-query/servingDatasetsCreate.js +1 -1
- package/dist/esm/react-query/servingDatasetsUploadContent.d.ts +30 -0
- package/dist/esm/react-query/servingDatasetsUploadContent.d.ts.map +1 -0
- package/dist/esm/react-query/servingDatasetsUploadContent.js +42 -0
- package/dist/esm/react-query/servingDatasetsUploadContent.js.map +1 -0
- package/dist/esm/react-query/servingTenantsDeleteOrganization.d.ts +3 -1
- package/dist/esm/react-query/servingTenantsDeleteOrganization.d.ts.map +1 -1
- package/dist/esm/react-query/servingTenantsDeleteOrganization.js +3 -1
- package/dist/esm/react-query/servingTenantsDeleteOrganization.js.map +1 -1
- package/dist/esm/react-query/servingTenantsGet.d.ts +6 -2
- package/dist/esm/react-query/servingTenantsGet.d.ts.map +1 -1
- package/dist/esm/react-query/servingTenantsGet.js +6 -2
- package/dist/esm/react-query/servingTenantsGet.js.map +1 -1
- package/dist/esm/react-query/servingTenantsGetOrganizationDeletion.d.ts +6 -2
- package/dist/esm/react-query/servingTenantsGetOrganizationDeletion.d.ts.map +1 -1
- package/dist/esm/react-query/servingTenantsGetOrganizationDeletion.js +6 -2
- package/dist/esm/react-query/servingTenantsGetOrganizationDeletion.js.map +1 -1
- package/dist/esm/react-query/servingTenantsList.d.ts +6 -2
- package/dist/esm/react-query/servingTenantsList.d.ts.map +1 -1
- package/dist/esm/react-query/servingTenantsList.js +6 -2
- package/dist/esm/react-query/servingTenantsList.js.map +1 -1
- package/dist/esm/react-query/servingTenantsSet.d.ts +3 -1
- package/dist/esm/react-query/servingTenantsSet.d.ts.map +1 -1
- package/dist/esm/react-query/servingTenantsSet.js +3 -1
- package/dist/esm/react-query/servingTenantsSet.js.map +1 -1
- package/dist/esm/sdk/datasets.d.ts +8 -1
- package/dist/esm/sdk/datasets.d.ts.map +1 -1
- package/dist/esm/sdk/datasets.js +11 -1
- package/dist/esm/sdk/datasets.js.map +1 -1
- package/dist/esm/sdk/tenants.d.ts +15 -5
- package/dist/esm/sdk/tenants.d.ts.map +1 -1
- package/dist/esm/sdk/tenants.js +15 -5
- package/dist/esm/sdk/tenants.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/servingDatasetsCreate.ts +1 -1
- package/src/funcs/servingDatasetsUploadContent.ts +202 -0
- package/src/funcs/servingTenantsDeleteOrganization.ts +3 -1
- package/src/funcs/servingTenantsGet.ts +3 -1
- package/src/funcs/servingTenantsGetOrganizationDeletion.ts +3 -1
- package/src/funcs/servingTenantsList.ts +3 -1
- package/src/funcs/servingTenantsSet.ts +3 -1
- 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/servingDatasetsCreate.ts +1 -1
- package/src/mcp-server/tools/servingDatasetsUploadContent.ts +37 -0
- package/src/mcp-server/tools/servingTenantsDeleteOrganization.ts +1 -1
- package/src/mcp-server/tools/servingTenantsGet.ts +1 -1
- package/src/mcp-server/tools/servingTenantsGetOrganizationDeletion.ts +1 -1
- package/src/mcp-server/tools/servingTenantsList.ts +1 -1
- package/src/mcp-server/tools/servingTenantsSet.ts +1 -1
- package/src/models/components/acceleratortype.ts +5 -5
- package/src/models/components/datasetupload.ts +30 -1
- package/src/models/components/datasetuploadreceipt.ts +80 -0
- package/src/models/components/datasetuploadtarget.ts +10 -5
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/uploadservingdatasetcontent.ts +88 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/servingDatasetsCreate.ts +1 -1
- package/src/react-query/servingDatasetsUploadContent.ts +113 -0
- package/src/react-query/servingTenantsDeleteOrganization.ts +3 -1
- package/src/react-query/servingTenantsGet.ts +6 -2
- package/src/react-query/servingTenantsGetOrganizationDeletion.ts +6 -2
- package/src/react-query/servingTenantsList.ts +6 -2
- package/src/react-query/servingTenantsSet.ts +3 -1
- package/src/sdk/datasets.ts +19 -1
- package/src/sdk/tenants.ts +15 -5
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Upload dataset content through the API
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Stream the raw dataset bytes through the serving API into the dataset's object storage. Valid only while the dataset is `pending_upload`; repeating the upload before commit overwrites the previous bytes. The response receipt carries the stored size and SHA-256 digest so the client can verify the bytes before calling commit. Uploads are capped by the cluster's configured maximum dataset size.
|
|
35
|
+
*/
|
|
36
|
+
export function servingDatasetsUploadContent(
|
|
37
|
+
client: SDKCore,
|
|
38
|
+
request: operations.UploadServingDatasetContentRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
components.DatasetUploadReceipt,
|
|
43
|
+
| errors.ServingError
|
|
44
|
+
| errors.ServingHTTPValidationError
|
|
45
|
+
| SDKError
|
|
46
|
+
| ResponseValidationError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
| RequestAbortedError
|
|
49
|
+
| RequestTimeoutError
|
|
50
|
+
| InvalidRequestError
|
|
51
|
+
| UnexpectedClientError
|
|
52
|
+
| SDKValidationError
|
|
53
|
+
>
|
|
54
|
+
> {
|
|
55
|
+
return new APIPromise($do(
|
|
56
|
+
client,
|
|
57
|
+
request,
|
|
58
|
+
options,
|
|
59
|
+
));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function $do(
|
|
63
|
+
client: SDKCore,
|
|
64
|
+
request: operations.UploadServingDatasetContentRequest,
|
|
65
|
+
options?: RequestOptions,
|
|
66
|
+
): Promise<
|
|
67
|
+
[
|
|
68
|
+
Result<
|
|
69
|
+
components.DatasetUploadReceipt,
|
|
70
|
+
| errors.ServingError
|
|
71
|
+
| errors.ServingHTTPValidationError
|
|
72
|
+
| SDKError
|
|
73
|
+
| ResponseValidationError
|
|
74
|
+
| ConnectionError
|
|
75
|
+
| RequestAbortedError
|
|
76
|
+
| RequestTimeoutError
|
|
77
|
+
| InvalidRequestError
|
|
78
|
+
| UnexpectedClientError
|
|
79
|
+
| SDKValidationError
|
|
80
|
+
>,
|
|
81
|
+
APICall,
|
|
82
|
+
]
|
|
83
|
+
> {
|
|
84
|
+
const parsed = safeParse(
|
|
85
|
+
request,
|
|
86
|
+
(value) =>
|
|
87
|
+
operations.UploadServingDatasetContentRequest$outboundSchema.parse(value),
|
|
88
|
+
"Input validation failed",
|
|
89
|
+
);
|
|
90
|
+
if (!parsed.ok) {
|
|
91
|
+
return [parsed, { status: "invalid" }];
|
|
92
|
+
}
|
|
93
|
+
const payload = parsed.value;
|
|
94
|
+
const body = payload.RequestBody instanceof Uint8Array
|
|
95
|
+
? new Uint8Array(payload.RequestBody).buffer
|
|
96
|
+
: payload.RequestBody;
|
|
97
|
+
|
|
98
|
+
const pathParams = {
|
|
99
|
+
dataset_id: encodeSimple("dataset_id", payload.dataset_id, {
|
|
100
|
+
explode: false,
|
|
101
|
+
charEncoding: "percent",
|
|
102
|
+
}),
|
|
103
|
+
};
|
|
104
|
+
const path = pathToFunc("/api/v1/serving/datasets/{dataset_id}/content")(
|
|
105
|
+
pathParams,
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
const headers = new Headers(compactMap({
|
|
109
|
+
"Content-Type": "application/octet-stream",
|
|
110
|
+
Accept: "application/json",
|
|
111
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
112
|
+
"X-On-Behalf-Of",
|
|
113
|
+
payload["X-On-Behalf-Of"],
|
|
114
|
+
{ explode: false, charEncoding: "none" },
|
|
115
|
+
),
|
|
116
|
+
}));
|
|
117
|
+
|
|
118
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
119
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
120
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
121
|
+
|
|
122
|
+
const context = {
|
|
123
|
+
options: client._options,
|
|
124
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
125
|
+
operationID: "uploadServingDatasetContent",
|
|
126
|
+
oAuth2Scopes: null,
|
|
127
|
+
|
|
128
|
+
resolvedSecurity: requestSecurity,
|
|
129
|
+
|
|
130
|
+
securitySource: client._options.bearerAuth,
|
|
131
|
+
retryConfig: options?.retries
|
|
132
|
+
|| client._options.retryConfig
|
|
133
|
+
|| {
|
|
134
|
+
strategy: "backoff",
|
|
135
|
+
backoff: {
|
|
136
|
+
initialInterval: 500,
|
|
137
|
+
maxInterval: 5000,
|
|
138
|
+
exponent: 1.5,
|
|
139
|
+
maxElapsedTime: 15000,
|
|
140
|
+
},
|
|
141
|
+
retryConnectionErrors: true,
|
|
142
|
+
}
|
|
143
|
+
|| { strategy: "none" },
|
|
144
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const requestRes = client._createRequest(context, {
|
|
148
|
+
security: requestSecurity,
|
|
149
|
+
method: "PUT",
|
|
150
|
+
baseURL: options?.serverURL,
|
|
151
|
+
path: path,
|
|
152
|
+
headers: headers,
|
|
153
|
+
body: body,
|
|
154
|
+
userAgent: client._options.userAgent,
|
|
155
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
156
|
+
}, options);
|
|
157
|
+
if (!requestRes.ok) {
|
|
158
|
+
return [requestRes, { status: "invalid" }];
|
|
159
|
+
}
|
|
160
|
+
const req = requestRes.value;
|
|
161
|
+
|
|
162
|
+
const doResult = await client._do(req, {
|
|
163
|
+
context,
|
|
164
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
165
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
166
|
+
retryConfig: context.retryConfig,
|
|
167
|
+
retryCodes: context.retryCodes,
|
|
168
|
+
});
|
|
169
|
+
if (!doResult.ok) {
|
|
170
|
+
return [doResult, { status: "request-error", request: req }];
|
|
171
|
+
}
|
|
172
|
+
const response = doResult.value;
|
|
173
|
+
|
|
174
|
+
const responseFields = {
|
|
175
|
+
HttpMeta: { Response: response, Request: req },
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
const [result] = await M.match<
|
|
179
|
+
components.DatasetUploadReceipt,
|
|
180
|
+
| errors.ServingError
|
|
181
|
+
| errors.ServingHTTPValidationError
|
|
182
|
+
| SDKError
|
|
183
|
+
| ResponseValidationError
|
|
184
|
+
| ConnectionError
|
|
185
|
+
| RequestAbortedError
|
|
186
|
+
| RequestTimeoutError
|
|
187
|
+
| InvalidRequestError
|
|
188
|
+
| UnexpectedClientError
|
|
189
|
+
| SDKValidationError
|
|
190
|
+
>(
|
|
191
|
+
M.json(200, components.DatasetUploadReceipt$inboundSchema),
|
|
192
|
+
M.jsonErr([403, 404, 409, 413], errors.ServingError$inboundSchema),
|
|
193
|
+
M.jsonErr(422, errors.ServingHTTPValidationError$inboundSchema),
|
|
194
|
+
M.fail([401, "4XX"]),
|
|
195
|
+
M.fail("5XX"),
|
|
196
|
+
)(response, req, { extraFields: responseFields });
|
|
197
|
+
if (!result.ok) {
|
|
198
|
+
return [result, { status: "complete", request: req, response }];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return [result, { status: "complete", request: req, response }];
|
|
202
|
+
}
|
|
@@ -31,7 +31,9 @@ import { Result } from "../types/fp.js";
|
|
|
31
31
|
* Trigger organization deletion teardown
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Durably records an organization.deleted.v1 event and starts (or adopts) the mandatory teardown cascade: the organization is fenced against new work and every deployment is tombstoned and wound down, while all pricing, budget, spend, and usage records are preserved. Idempotent by event id. Cluster administrators only.
|
|
34
|
+
* Durably records an organization.deleted.v1 event and starts (or adopts) the mandatory teardown cascade: the organization is fenced against new work and every deployment is tombstoned and wound down, while all pricing, budget, spend, and usage records are preserved. Idempotent by event id. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at `POST /api/v1/admin/tenants/{org_id}/deletion`. This path keeps working for one transition release (responses carry `Deprecation: true` and a `Link` successor header) and is removed from this document in the next SDK major.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
35
37
|
*/
|
|
36
38
|
export function servingTenantsDeleteOrganization(
|
|
37
39
|
client: SDKCore,
|
|
@@ -31,7 +31,9 @@ import { Result } from "../types/fp.js";
|
|
|
31
31
|
* Get a serving tenant
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Get one organization's serving enablement record. Cluster administrators only.
|
|
34
|
+
* Get one organization's serving enablement record. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at `GET /api/v1/admin/tenants/{org_id}`. This path keeps working for one transition release (responses carry `Deprecation: true` and a `Link` successor header) and is removed from this document in the next SDK major.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
35
37
|
*/
|
|
36
38
|
export function servingTenantsGet(
|
|
37
39
|
client: SDKCore,
|
|
@@ -31,7 +31,9 @@ import { Result } from "../types/fp.js";
|
|
|
31
31
|
* Get organization deletion teardown state
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Returns the durable teardown-cascade state for an organization (running or complete), so a cluster administrator can confirm offboarding progressed to completion. 404 if the organization has no teardown. Cluster administrators only.
|
|
34
|
+
* Returns the durable teardown-cascade state for an organization (running or complete), so a cluster administrator can confirm offboarding progressed to completion. 404 if the organization has no teardown. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at `GET /api/v1/admin/tenants/{org_id}/deletion`. This path keeps working for one transition release (responses carry `Deprecation: true` and a `Link` successor header) and is removed from this document in the next SDK major.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
35
37
|
*/
|
|
36
38
|
export function servingTenantsGetOrganizationDeletion(
|
|
37
39
|
client: SDKCore,
|
|
@@ -31,7 +31,9 @@ import { Result } from "../types/fp.js";
|
|
|
31
31
|
* List serving tenants
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* List organization-wide serving enablement records. Cluster administrators only; a missing organization is not provisioned.
|
|
34
|
+
* List organization-wide serving enablement records. Cluster administrators only; a missing organization is not provisioned. Deprecated: this operation has moved to the operator admin plane at `GET /api/v1/admin/tenants`. This path keeps working for one transition release (responses carry `Deprecation: true` and a `Link` successor header) and is removed from this document in the next SDK major.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
35
37
|
*/
|
|
36
38
|
export function servingTenantsList(
|
|
37
39
|
client: SDKCore,
|
|
@@ -31,7 +31,9 @@ import { Result } from "../types/fp.js";
|
|
|
31
31
|
* Set serving tenant enablement
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Enable or disable serving for an organization and all of its teams. Disabling blocks product API access but does not stop existing workloads or callbacks. Cluster administrators only.
|
|
34
|
+
* Enable or disable serving for an organization and all of its teams. Disabling blocks product API access but does not stop existing workloads or callbacks. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at `PUT /api/v1/admin/tenants/{org_id}`. This path keeps working for one transition release (responses carry `Deprecation: true` and a `Link` successor header) and is removed from this document in the next SDK major.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
35
37
|
*/
|
|
36
38
|
export function servingTenantsSet(
|
|
37
39
|
client: SDKCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.1.0",
|
|
68
|
-
sdkVersion: "0.51.
|
|
68
|
+
sdkVersion: "0.51.22",
|
|
69
69
|
genVersion: "2.924.0",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.51.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.51.22 2.924.0 1.1.0 @meetkai/mka1",
|
|
71
71
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -308,6 +308,7 @@ import { tool$servingDatasetsCreate } from "./tools/servingDatasetsCreate.js";
|
|
|
308
308
|
import { tool$servingDatasetsDelete } from "./tools/servingDatasetsDelete.js";
|
|
309
309
|
import { tool$servingDatasetsGet } from "./tools/servingDatasetsGet.js";
|
|
310
310
|
import { tool$servingDatasetsList } from "./tools/servingDatasetsList.js";
|
|
311
|
+
import { tool$servingDatasetsUploadContent } from "./tools/servingDatasetsUploadContent.js";
|
|
311
312
|
import { tool$servingDeploymentsCreate } from "./tools/servingDeploymentsCreate.js";
|
|
312
313
|
import { tool$servingDeploymentsDelete } from "./tools/servingDeploymentsDelete.js";
|
|
313
314
|
import { tool$servingDeploymentsDeregister } from "./tools/servingDeploymentsDeregister.js";
|
|
@@ -370,7 +371,7 @@ export function createMCPServer(deps: {
|
|
|
370
371
|
}) {
|
|
371
372
|
const server = new McpServer({
|
|
372
373
|
name: "SDK",
|
|
373
|
-
version: "0.51.
|
|
374
|
+
version: "0.51.22",
|
|
374
375
|
});
|
|
375
376
|
|
|
376
377
|
const client = new SDKCore({
|
|
@@ -697,6 +698,7 @@ export function createMCPServer(deps: {
|
|
|
697
698
|
tool(tool$servingDatasetsDelete);
|
|
698
699
|
tool(tool$servingDatasetsGet);
|
|
699
700
|
tool(tool$servingDatasetsCommit);
|
|
701
|
+
tool(tool$servingDatasetsUploadContent);
|
|
700
702
|
tool(tool$servingDeploymentsList);
|
|
701
703
|
tool(tool$servingDeploymentsCreate);
|
|
702
704
|
tool(tool$servingDeploymentsDelete);
|
|
@@ -14,7 +14,7 @@ export const tool$servingDatasetsCreate: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "serving-datasets-create",
|
|
15
15
|
description: `Register or begin uploading a dataset
|
|
16
16
|
|
|
17
|
-
Register a dataset by reference (\`source\`: an external dataset reference passed to the trainer as-is, or a \`repo://{repo}[@{revision}][/{path}]\` reference reserved for the versioned dataset store) — the dataset is \`ready\` immediately. Omit \`source\` to upload instead: the response is \`pending_upload\` and carries an \`upload\` block
|
|
17
|
+
Register a dataset by reference (\`source\`: an external dataset reference passed to the trainer as-is, or a \`repo://{repo}[@{revision}][/{path}]\` reference reserved for the versioned dataset store) — the dataset is \`ready\` immediately. Omit \`source\` to upload instead: the response is \`pending_upload\` and carries an \`upload\` block describing where to PUT the data. When the artifact store is not internet-exposed (the default posture) the block is \`mode: api\` and the target is the API upload path; when a public artifact endpoint is configured it is \`mode: presigned\` with time-bounded presigned PUT URLs. PUT the data, then call commit to seal the immutable manifest.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await servingDatasetsCreate(
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { servingDatasetsUploadContent } from "../../funcs/servingDatasetsUploadContent.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.UploadServingDatasetContentRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$servingDatasetsUploadContent: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "serving-datasets-upload-content",
|
|
15
|
+
description: `Upload dataset content through the API
|
|
16
|
+
|
|
17
|
+
Stream the raw dataset bytes through the serving API into the dataset's object storage. Valid only while the dataset is \`pending_upload\`; repeating the upload before commit overwrites the previous bytes. The response receipt carries the stored size and SHA-256 digest so the client can verify the bytes before calling commit. Uploads are capped by the cluster's configured maximum dataset size.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await servingDatasetsUploadContent(
|
|
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
|
+
};
|
|
@@ -16,7 +16,7 @@ export const tool$servingTenantsDeleteOrganization: ToolDefinition<
|
|
|
16
16
|
name: "serving-tenants-delete-organization",
|
|
17
17
|
description: `Trigger organization deletion teardown
|
|
18
18
|
|
|
19
|
-
Durably records an organization.deleted.v1 event and starts (or adopts) the mandatory teardown cascade: the organization is fenced against new work and every deployment is tombstoned and wound down, while all pricing, budget, spend, and usage records are preserved. Idempotent by event id. Cluster administrators only.`,
|
|
19
|
+
Durably records an organization.deleted.v1 event and starts (or adopts) the mandatory teardown cascade: the organization is fenced against new work and every deployment is tombstoned and wound down, while all pricing, budget, spend, and usage records are preserved. Idempotent by event id. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at \`POST /api/v1/admin/tenants/{org_id}/deletion\`. This path keeps working for one transition release (responses carry \`Deprecation: true\` and a \`Link\` successor header) and is removed from this document in the next SDK major.`,
|
|
20
20
|
args,
|
|
21
21
|
tool: async (client, args, ctx) => {
|
|
22
22
|
const [result, apiCall] = await servingTenantsDeleteOrganization(
|
|
@@ -14,7 +14,7 @@ export const tool$servingTenantsGet: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "serving-tenants-get",
|
|
15
15
|
description: `Get a serving tenant
|
|
16
16
|
|
|
17
|
-
Get one organization's serving enablement record. Cluster administrators only.`,
|
|
17
|
+
Get one organization's serving enablement record. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at \`GET /api/v1/admin/tenants/{org_id}\`. This path keeps working for one transition release (responses carry \`Deprecation: true\` and a \`Link\` successor header) and is removed from this document in the next SDK major.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await servingTenantsGet(
|
|
@@ -16,7 +16,7 @@ export const tool$servingTenantsGetOrganizationDeletion: ToolDefinition<
|
|
|
16
16
|
name: "serving-tenants-get-organization-deletion",
|
|
17
17
|
description: `Get organization deletion teardown state
|
|
18
18
|
|
|
19
|
-
Returns the durable teardown-cascade state for an organization (running or complete), so a cluster administrator can confirm offboarding progressed to completion. 404 if the organization has no teardown. Cluster administrators only.`,
|
|
19
|
+
Returns the durable teardown-cascade state for an organization (running or complete), so a cluster administrator can confirm offboarding progressed to completion. 404 if the organization has no teardown. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at \`GET /api/v1/admin/tenants/{org_id}/deletion\`. This path keeps working for one transition release (responses carry \`Deprecation: true\` and a \`Link\` successor header) and is removed from this document in the next SDK major.`,
|
|
20
20
|
args,
|
|
21
21
|
tool: async (client, args, ctx) => {
|
|
22
22
|
const [result, apiCall] = await servingTenantsGetOrganizationDeletion(
|
|
@@ -14,7 +14,7 @@ export const tool$servingTenantsList: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "serving-tenants-list",
|
|
15
15
|
description: `List serving tenants
|
|
16
16
|
|
|
17
|
-
List organization-wide serving enablement records. Cluster administrators only; a missing organization is not provisioned.`,
|
|
17
|
+
List organization-wide serving enablement records. Cluster administrators only; a missing organization is not provisioned. Deprecated: this operation has moved to the operator admin plane at \`GET /api/v1/admin/tenants\`. This path keeps working for one transition release (responses carry \`Deprecation: true\` and a \`Link\` successor header) and is removed from this document in the next SDK major.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await servingTenantsList(
|
|
@@ -14,7 +14,7 @@ export const tool$servingTenantsSet: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "serving-tenants-set",
|
|
15
15
|
description: `Set serving tenant enablement
|
|
16
16
|
|
|
17
|
-
Enable or disable serving for an organization and all of its teams. Disabling blocks product API access but does not stop existing workloads or callbacks. Cluster administrators only.`,
|
|
17
|
+
Enable or disable serving for an organization and all of its teams. Disabling blocks product API access but does not stop existing workloads or callbacks. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at \`PUT /api/v1/admin/tenants/{org_id}\`. This path keeps working for one transition release (responses carry \`Deprecation: true\` and a \`Link\` successor header) and is removed from this document in the next SDK major.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await servingTenantsSet(
|
|
@@ -27,14 +27,14 @@ import {
|
|
|
27
27
|
} from "./acquirability.js";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Coarse accelerator class. npu/tpu are reserved for future catalog entries.
|
|
30
|
+
* Coarse accelerator class. npu/tpu are reserved for future catalog entries. No cpu-class type is listed: CPU is a class, not an accelerator type, and cpu-class serving is requested through the deployment accelerator spec's class field rather than by naming a type here.
|
|
31
31
|
*/
|
|
32
32
|
export const Class = {
|
|
33
33
|
Gpu: "gpu",
|
|
34
34
|
Cpu: "cpu",
|
|
35
35
|
} as const;
|
|
36
36
|
/**
|
|
37
|
-
* Coarse accelerator class. npu/tpu are reserved for future catalog entries.
|
|
37
|
+
* Coarse accelerator class. npu/tpu are reserved for future catalog entries. No cpu-class type is listed: CPU is a class, not an accelerator type, and cpu-class serving is requested through the deployment accelerator spec's class field rather than by naming a type here.
|
|
38
38
|
*/
|
|
39
39
|
export type Class = ClosedEnum<typeof Class>;
|
|
40
40
|
|
|
@@ -75,7 +75,7 @@ export type AcceleratorType = {
|
|
|
75
75
|
*/
|
|
76
76
|
acquirableCount?: number | undefined;
|
|
77
77
|
/**
|
|
78
|
-
* Coarse accelerator class. npu/tpu are reserved for future catalog entries.
|
|
78
|
+
* Coarse accelerator class. npu/tpu are reserved for future catalog entries. No cpu-class type is listed: CPU is a class, not an accelerator type, and cpu-class serving is requested through the deployment accelerator spec's class field rather than by naming a type here.
|
|
79
79
|
*/
|
|
80
80
|
class: Class;
|
|
81
81
|
/**
|
|
@@ -85,11 +85,11 @@ export type AcceleratorType = {
|
|
|
85
85
|
*/
|
|
86
86
|
kind?: Kind | undefined;
|
|
87
87
|
/**
|
|
88
|
-
* Max accelerators of this type per replica.
|
|
88
|
+
* Max accelerators of this type per replica.
|
|
89
89
|
*/
|
|
90
90
|
maxCount: number;
|
|
91
91
|
/**
|
|
92
|
-
* Per-accelerator memory in GB. Absent for class
|
|
92
|
+
* Per-accelerator memory in GB. Absent for cpu-class entries, which have no fixed memory module.
|
|
93
93
|
*/
|
|
94
94
|
memoryGb?: number | undefined;
|
|
95
95
|
name: string;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
10
|
import {
|
|
@@ -14,22 +15,49 @@ import {
|
|
|
14
15
|
} from "./datasetuploadtarget.js";
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
+
* How the targets are addressed: `api` (PUT through the serving API) or `presigned` (direct PUT to a presigned object-store URL).
|
|
19
|
+
*/
|
|
20
|
+
export const DatasetUploadMode = {
|
|
21
|
+
Api: "api",
|
|
22
|
+
Presigned: "presigned",
|
|
23
|
+
} as const;
|
|
24
|
+
/**
|
|
25
|
+
* How the targets are addressed: `api` (PUT through the serving API) or `presigned` (direct PUT to a presigned object-store URL).
|
|
26
|
+
*/
|
|
27
|
+
export type DatasetUploadMode = ClosedEnum<typeof DatasetUploadMode>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Upload instructions for an upload-mode dataset. `mode` is `api` when the artifact store is not internet-exposed (the default posture): PUT the raw bytes to the API-relative `targets[].url` path. `mode` is `presigned` only when the cluster exposes a public artifact endpoint: targets carry time-bounded presigned URLs.
|
|
18
31
|
*/
|
|
19
32
|
export type DatasetUpload = {
|
|
33
|
+
/**
|
|
34
|
+
* How the targets are addressed: `api` (PUT through the serving API) or `presigned` (direct PUT to a presigned object-store URL).
|
|
35
|
+
*/
|
|
36
|
+
mode: DatasetUploadMode;
|
|
20
37
|
targets: Array<DatasetUploadTarget>;
|
|
21
38
|
};
|
|
22
39
|
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const DatasetUploadMode$inboundSchema: z.ZodNativeEnum<
|
|
42
|
+
typeof DatasetUploadMode
|
|
43
|
+
> = z.nativeEnum(DatasetUploadMode);
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const DatasetUploadMode$outboundSchema: z.ZodNativeEnum<
|
|
46
|
+
typeof DatasetUploadMode
|
|
47
|
+
> = DatasetUploadMode$inboundSchema;
|
|
48
|
+
|
|
23
49
|
/** @internal */
|
|
24
50
|
export const DatasetUpload$inboundSchema: z.ZodType<
|
|
25
51
|
DatasetUpload,
|
|
26
52
|
z.ZodTypeDef,
|
|
27
53
|
unknown
|
|
28
54
|
> = z.object({
|
|
55
|
+
mode: DatasetUploadMode$inboundSchema,
|
|
29
56
|
targets: z.array(DatasetUploadTarget$inboundSchema),
|
|
30
57
|
});
|
|
31
58
|
/** @internal */
|
|
32
59
|
export type DatasetUpload$Outbound = {
|
|
60
|
+
mode: string;
|
|
33
61
|
targets: Array<DatasetUploadTarget$Outbound>;
|
|
34
62
|
};
|
|
35
63
|
|
|
@@ -39,6 +67,7 @@ export const DatasetUpload$outboundSchema: z.ZodType<
|
|
|
39
67
|
z.ZodTypeDef,
|
|
40
68
|
DatasetUpload
|
|
41
69
|
> = z.object({
|
|
70
|
+
mode: DatasetUploadMode$outboundSchema,
|
|
42
71
|
targets: z.array(DatasetUploadTarget$outboundSchema),
|
|
43
72
|
});
|
|
44
73
|
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
/**
|
|
12
|
+
* Receipt for one dataset object streamed through the API upload endpoint.
|
|
13
|
+
*/
|
|
14
|
+
export type DatasetUploadReceipt = {
|
|
15
|
+
/**
|
|
16
|
+
* The manifest object key the bytes were stored under.
|
|
17
|
+
*/
|
|
18
|
+
key: string;
|
|
19
|
+
/**
|
|
20
|
+
* Hex SHA-256 digest computed while the upload streamed to the artifact store; verify it before committing.
|
|
21
|
+
*/
|
|
22
|
+
sha256: string;
|
|
23
|
+
/**
|
|
24
|
+
* Number of bytes stored.
|
|
25
|
+
*/
|
|
26
|
+
sizeBytes: number;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const DatasetUploadReceipt$inboundSchema: z.ZodType<
|
|
31
|
+
DatasetUploadReceipt,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
key: z.string(),
|
|
36
|
+
sha256: z.string(),
|
|
37
|
+
size_bytes: z.number().int(),
|
|
38
|
+
}).transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
"size_bytes": "sizeBytes",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type DatasetUploadReceipt$Outbound = {
|
|
45
|
+
key: string;
|
|
46
|
+
sha256: string;
|
|
47
|
+
size_bytes: number;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const DatasetUploadReceipt$outboundSchema: z.ZodType<
|
|
52
|
+
DatasetUploadReceipt$Outbound,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
DatasetUploadReceipt
|
|
55
|
+
> = z.object({
|
|
56
|
+
key: z.string(),
|
|
57
|
+
sha256: z.string(),
|
|
58
|
+
sizeBytes: z.number().int(),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
sizeBytes: "size_bytes",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export function datasetUploadReceiptToJSON(
|
|
66
|
+
datasetUploadReceipt: DatasetUploadReceipt,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
DatasetUploadReceipt$outboundSchema.parse(datasetUploadReceipt),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
export function datasetUploadReceiptFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<DatasetUploadReceipt, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => DatasetUploadReceipt$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'DatasetUploadReceipt' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -17,14 +17,17 @@ export type DatasetUploadTargetMethod = ClosedEnum<
|
|
|
17
17
|
>;
|
|
18
18
|
|
|
19
19
|
export type DatasetUploadTarget = {
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* When a presigned target stops accepting uploads. Absent for `mode: api` targets, which remain valid while the dataset is `pending_upload`.
|
|
22
|
+
*/
|
|
23
|
+
expiresAt?: Date | null | undefined;
|
|
21
24
|
/**
|
|
22
25
|
* The manifest object key this target uploads.
|
|
23
26
|
*/
|
|
24
27
|
key: string;
|
|
25
28
|
method: DatasetUploadTargetMethod;
|
|
26
29
|
/**
|
|
27
|
-
*
|
|
30
|
+
* Where to PUT the object bytes: a presigned object-store URL (`mode: presigned`) or an API-relative path such as `/api/v1/serving/datasets/{dataset_id}/content` (`mode: api`).
|
|
28
31
|
*/
|
|
29
32
|
url: string;
|
|
30
33
|
};
|
|
@@ -44,7 +47,9 @@ export const DatasetUploadTarget$inboundSchema: z.ZodType<
|
|
|
44
47
|
z.ZodTypeDef,
|
|
45
48
|
unknown
|
|
46
49
|
> = z.object({
|
|
47
|
-
expires_at: z.
|
|
50
|
+
expires_at: z.nullable(
|
|
51
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
52
|
+
).optional(),
|
|
48
53
|
key: z.string(),
|
|
49
54
|
method: DatasetUploadTargetMethod$inboundSchema,
|
|
50
55
|
url: z.string(),
|
|
@@ -55,7 +60,7 @@ export const DatasetUploadTarget$inboundSchema: z.ZodType<
|
|
|
55
60
|
});
|
|
56
61
|
/** @internal */
|
|
57
62
|
export type DatasetUploadTarget$Outbound = {
|
|
58
|
-
expires_at
|
|
63
|
+
expires_at?: string | null | undefined;
|
|
59
64
|
key: string;
|
|
60
65
|
method: string;
|
|
61
66
|
url: string;
|
|
@@ -67,7 +72,7 @@ export const DatasetUploadTarget$outboundSchema: z.ZodType<
|
|
|
67
72
|
z.ZodTypeDef,
|
|
68
73
|
DatasetUploadTarget
|
|
69
74
|
> = z.object({
|
|
70
|
-
expiresAt: z.date().transform(v => v.toISOString()),
|
|
75
|
+
expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
71
76
|
key: z.string(),
|
|
72
77
|
method: DatasetUploadTargetMethod$outboundSchema,
|
|
73
78
|
url: z.string(),
|
|
@@ -137,6 +137,7 @@ export * from "./datasetcreate.js";
|
|
|
137
137
|
export * from "./datasetmanifest.js";
|
|
138
138
|
export * from "./datasetmanifestobject.js";
|
|
139
139
|
export * from "./datasetupload.js";
|
|
140
|
+
export * from "./datasetuploadreceipt.js";
|
|
140
141
|
export * from "./datasetuploadtarget.js";
|
|
141
142
|
export * from "./deactivateregistryentryresponse.js";
|
|
142
143
|
export * from "./decideagentrunmcpapprovalrequest.js";
|