@dalmia/calibrate-mcp 0.0.77 → 0.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +760 -65
- package/bin/mcp-server.js.map +25 -8
- package/esm/funcs/datasetsCreate.d.ts +16 -0
- package/esm/funcs/datasetsCreate.d.ts.map +1 -0
- package/esm/funcs/datasetsCreate.js +86 -0
- package/esm/funcs/datasetsCreate.js.map +1 -0
- package/esm/funcs/datasetsGet.d.ts +16 -0
- package/esm/funcs/datasetsGet.d.ts.map +1 -0
- package/esm/funcs/datasetsGet.js +91 -0
- package/esm/funcs/datasetsGet.js.map +1 -0
- package/esm/funcs/datasetsUploadItem.d.ts +16 -0
- package/esm/funcs/datasetsUploadItem.d.ts.map +1 -0
- package/esm/funcs/datasetsUploadItem.js +112 -0
- package/esm/funcs/datasetsUploadItem.js.map +1 -0
- package/esm/landing-page.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +7 -1
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/datasetsCreate.d.ts +7 -0
- package/esm/mcp-server/tools/datasetsCreate.d.ts.map +1 -0
- package/esm/mcp-server/tools/datasetsCreate.js +35 -0
- package/esm/mcp-server/tools/datasetsCreate.js.map +1 -0
- package/esm/mcp-server/tools/datasetsGet.d.ts +7 -0
- package/esm/mcp-server/tools/datasetsGet.d.ts.map +1 -0
- package/esm/mcp-server/tools/datasetsGet.js +35 -0
- package/esm/mcp-server/tools/datasetsGet.js.map +1 -0
- package/esm/mcp-server/tools/datasetsUploadItem.d.ts +7 -0
- package/esm/mcp-server/tools/datasetsUploadItem.d.ts.map +1 -0
- package/esm/mcp-server/tools/datasetsUploadItem.js +36 -0
- package/esm/mcp-server/tools/datasetsUploadItem.js.map +1 -0
- package/esm/models/bodyuploadsttitemdatasetsdatasetiditemsuploadpost.d.ts +12 -0
- package/esm/models/bodyuploadsttitemdatasetsdatasetiditemsuploadpost.d.ts.map +1 -0
- package/esm/models/bodyuploadsttitemdatasetsdatasetiditemsuploadpost.js +14 -0
- package/esm/models/bodyuploadsttitemdatasetsdatasetiditemsuploadpost.js.map +1 -0
- package/esm/models/createnewdatasetdatasetspostop.d.ts +12 -0
- package/esm/models/createnewdatasetdatasetspostop.d.ts.map +1 -0
- package/esm/models/createnewdatasetdatasetspostop.js +16 -0
- package/esm/models/createnewdatasetdatasetspostop.js.map +1 -0
- package/esm/models/datasetcreaterequest.d.ts +23 -0
- package/esm/models/datasetcreaterequest.d.ts.map +1 -0
- package/esm/models/datasetcreaterequest.js +21 -0
- package/esm/models/datasetcreaterequest.js.map +1 -0
- package/esm/models/datasetdetailresponse.d.ts +14 -0
- package/esm/models/datasetdetailresponse.d.ts.map +1 -0
- package/esm/models/datasetdetailresponse.js +16 -0
- package/esm/models/datasetdetailresponse.js.map +1 -0
- package/esm/models/datasetitemresponse.d.ts +11 -0
- package/esm/models/datasetitemresponse.d.ts.map +1 -0
- package/esm/models/datasetitemresponse.js +14 -0
- package/esm/models/datasetitemresponse.js.map +1 -0
- package/esm/models/datasetresponse.d.ts +12 -0
- package/esm/models/datasetresponse.d.ts.map +1 -0
- package/esm/models/datasetresponse.js +14 -0
- package/esm/models/datasetresponse.js.map +1 -0
- package/esm/models/getdatasetdetaildatasetsdatasetidgetop.d.ts +11 -0
- package/esm/models/getdatasetdetaildatasetsdatasetidgetop.d.ts.map +1 -0
- package/esm/models/getdatasetdetaildatasetsdatasetidgetop.js +15 -0
- package/esm/models/getdatasetdetaildatasetsdatasetidgetop.js.map +1 -0
- package/esm/models/uploadsttitemdatasetsdatasetiditemsuploadpostop.d.ts +13 -0
- package/esm/models/uploadsttitemdatasetsdatasetiditemsuploadpostop.d.ts.map +1 -0
- package/esm/models/uploadsttitemdatasetsdatasetiditemsuploadpostop.js +17 -0
- package/esm/models/uploadsttitemdatasetsdatasetiditemsuploadpostop.js.map +1 -0
- package/esm/tool-names.d.ts.map +1 -1
- package/esm/tool-names.js +12 -0
- package/esm/tool-names.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/datasetsCreate.ts +148 -0
- package/src/funcs/datasetsGet.ts +157 -0
- package/src/funcs/datasetsUploadItem.ts +194 -0
- package/src/landing-page.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +7 -1
- package/src/mcp-server/tools/datasetsCreate.ts +44 -0
- package/src/mcp-server/tools/datasetsGet.ts +44 -0
- package/src/mcp-server/tools/datasetsUploadItem.ts +44 -0
- package/src/models/bodyuploadsttitemdatasetsdatasetiditemsuploadpost.ts +28 -0
- package/src/models/createnewdatasetdatasetspostop.ts +40 -0
- package/src/models/datasetcreaterequest.ts +35 -0
- package/src/models/datasetdetailresponse.ts +40 -0
- package/src/models/datasetitemresponse.ts +34 -0
- package/src/models/datasetresponse.ts +31 -0
- package/src/models/getdatasetdetaildatasetsdatasetidgetop.ts +36 -0
- package/src/models/uploadsttitemdatasetsdatasetiditemsuploadpostop.ts +40 -0
- package/src/tool-names.ts +12 -0
package/bin/mcp-server.js
CHANGED
|
@@ -94,6 +94,27 @@ function floatSafeRemainder(val, step) {
|
|
|
94
94
|
return 0;
|
|
95
95
|
return ratio - roundedRatio;
|
|
96
96
|
}
|
|
97
|
+
function defineLazy(object, key, getter) {
|
|
98
|
+
let value = undefined;
|
|
99
|
+
Object.defineProperty(object, key, {
|
|
100
|
+
get() {
|
|
101
|
+
if (value === EVALUATING) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (value === undefined) {
|
|
105
|
+
value = EVALUATING;
|
|
106
|
+
value = getter();
|
|
107
|
+
}
|
|
108
|
+
return value;
|
|
109
|
+
},
|
|
110
|
+
set(v) {
|
|
111
|
+
Object.defineProperty(object, key, {
|
|
112
|
+
value: v
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
configurable: true
|
|
116
|
+
});
|
|
117
|
+
}
|
|
97
118
|
function assignProp(target, prop, value) {
|
|
98
119
|
Object.defineProperty(target, prop, {
|
|
99
120
|
value,
|
|
@@ -561,9 +582,10 @@ function constantCatch(value) {
|
|
|
561
582
|
fn[CONSTANT_CATCH] = true;
|
|
562
583
|
return fn;
|
|
563
584
|
}
|
|
564
|
-
var captureStackTrace, allowsEval, propertyKeyTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, highSurrogate, installing, broke = false, breaker, CONSTANT_CATCH = "~constantCatch";
|
|
585
|
+
var EVALUATING, captureStackTrace, allowsEval, propertyKeyTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, highSurrogate, installing, broke = false, breaker, CONSTANT_CATCH = "~constantCatch";
|
|
565
586
|
var init_util = __esm(() => {
|
|
566
587
|
init_core();
|
|
588
|
+
EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
567
589
|
captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
|
|
568
590
|
allowsEval = /* @__PURE__ */ cached(() => {
|
|
569
591
|
if (globalConfig.jitless) {
|
|
@@ -1896,7 +1918,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
1896
1918
|
payload.issues.push(issue(_iss));
|
|
1897
1919
|
}
|
|
1898
1920
|
}
|
|
1899
|
-
var $ZodType, toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value }, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT = 1, URL_UNPARSEABLE = 2, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, arraySize = (input) => Array.isArray(input) ? input.length : -1, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodCustom;
|
|
1921
|
+
var $ZodType, toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value }, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT = 1, URL_UNPARSEABLE = 2, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, arraySize = (input) => Array.isArray(input) ? input.length : -1, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodLazy, $ZodCustom;
|
|
1900
1922
|
var init_schemas = __esm(() => {
|
|
1901
1923
|
init_checks();
|
|
1902
1924
|
init_core();
|
|
@@ -3095,6 +3117,23 @@ var init_schemas = __esm(() => {
|
|
|
3095
3117
|
return handleReadonlyResult(result);
|
|
3096
3118
|
};
|
|
3097
3119
|
});
|
|
3120
|
+
$ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
3121
|
+
$ZodType.init(inst, def);
|
|
3122
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
3123
|
+
const d = def;
|
|
3124
|
+
if (!d._cachedInner)
|
|
3125
|
+
d._cachedInner = def.getter();
|
|
3126
|
+
return d._cachedInner;
|
|
3127
|
+
});
|
|
3128
|
+
defineLazyInternal(inst, "pattern", (zod) => zod.innerType?._zod?.pattern);
|
|
3129
|
+
defineLazyInternal(inst, "propValues", (zod) => zod.innerType?._zod?.propValues);
|
|
3130
|
+
defineLazyInternal(inst, "optin", (zod) => zod.innerType?._zod?.optin ?? undefined);
|
|
3131
|
+
defineLazyInternal(inst, "optout", (zod) => zod.innerType?._zod?.optout ?? undefined);
|
|
3132
|
+
inst._zod.parse = (payload, ctx) => {
|
|
3133
|
+
const inner = inst._zod.innerType;
|
|
3134
|
+
return inner._zod.run(payload, ctx);
|
|
3135
|
+
};
|
|
3136
|
+
});
|
|
3098
3137
|
$ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
3099
3138
|
$ZodCheck.init(inst, def);
|
|
3100
3139
|
$ZodType.init(inst, def);
|
|
@@ -5587,6 +5626,12 @@ function readonly(innerType) {
|
|
|
5587
5626
|
innerType
|
|
5588
5627
|
});
|
|
5589
5628
|
}
|
|
5629
|
+
function lazy(getter) {
|
|
5630
|
+
return new ZodLazy({
|
|
5631
|
+
type: "lazy",
|
|
5632
|
+
getter
|
|
5633
|
+
});
|
|
5634
|
+
}
|
|
5590
5635
|
function custom(fn, _params) {
|
|
5591
5636
|
return _custom(ZodCustom, fn ?? (() => true), _params);
|
|
5592
5637
|
}
|
|
@@ -5603,7 +5648,7 @@ function preprocess(fn, schema) {
|
|
|
5603
5648
|
out: schema
|
|
5604
5649
|
});
|
|
5605
5650
|
}
|
|
5606
|
-
var ZodType, _ZodString, ZodString, ZodStringFormat, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodNumber, ZodNumberFormat, ZodBoolean, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodArray, ZodObject, ZodUnion, ZodDiscriminatedUnion, ZodIntersection, ZodRecord, ZodEnum, ZodLiteral, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodCatch, ZodPipe, ZodPreprocess, ZodReadonly, ZodCustom;
|
|
5651
|
+
var ZodType, _ZodString, ZodString, ZodStringFormat, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodNumber, ZodNumberFormat, ZodBoolean, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodArray, ZodObject, ZodUnion, ZodDiscriminatedUnion, ZodIntersection, ZodRecord, ZodEnum, ZodLiteral, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodCatch, ZodPipe, ZodPreprocess, ZodReadonly, ZodLazy, ZodCustom;
|
|
5607
5652
|
var init_schemas2 = __esm(() => {
|
|
5608
5653
|
init_core2();
|
|
5609
5654
|
init_core2();
|
|
@@ -6355,6 +6400,12 @@ var init_schemas2 = __esm(() => {
|
|
|
6355
6400
|
inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
|
|
6356
6401
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
6357
6402
|
});
|
|
6403
|
+
ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
|
|
6404
|
+
$ZodLazy.init(inst, def);
|
|
6405
|
+
ZodType.init(inst, def);
|
|
6406
|
+
inst._zod.processJSONSchema = (ctx, json, params) => lazyProcessor(inst, ctx, json, params);
|
|
6407
|
+
inst.unwrap = () => inst._zod.def.getter();
|
|
6408
|
+
});
|
|
6358
6409
|
ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
6359
6410
|
$ZodCustom.init(inst, def);
|
|
6360
6411
|
ZodType.init(inst, def);
|
|
@@ -33646,7 +33697,7 @@ var handleResult = (ctx, result) => {
|
|
|
33646
33697
|
};
|
|
33647
33698
|
}
|
|
33648
33699
|
}, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex = `^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`, dateRegex, ZodString2, ZodNumber2, ZodBigInt2, ZodBoolean2, ZodDate2, ZodSymbol, ZodUndefined, ZodNull2, ZodAny2, ZodUnknown2, ZodNever2, ZodVoid, ZodArray2, ZodObject2, ZodUnion2, getDiscriminator = (type) => {
|
|
33649
|
-
if (type instanceof
|
|
33700
|
+
if (type instanceof ZodLazy2) {
|
|
33650
33701
|
return getDiscriminator(type.schema);
|
|
33651
33702
|
} else if (type instanceof ZodEffects) {
|
|
33652
33703
|
return getDiscriminator(type.innerType());
|
|
@@ -33675,7 +33726,7 @@ var handleResult = (ctx, result) => {
|
|
|
33675
33726
|
} else {
|
|
33676
33727
|
return [];
|
|
33677
33728
|
}
|
|
33678
|
-
}, ZodDiscriminatedUnion2, ZodIntersection2, ZodTuple, ZodRecord2, ZodMap, ZodSet, ZodFunction,
|
|
33729
|
+
}, ZodDiscriminatedUnion2, ZodIntersection2, ZodTuple, ZodRecord2, ZodMap, ZodSet, ZodFunction, ZodLazy2, ZodLiteral2, ZodEnum2, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional2, ZodNullable2, ZodDefault2, ZodCatch2, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly2, late, ZodFirstPartyTypeKind2, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType;
|
|
33679
33730
|
var init_types2 = __esm(() => {
|
|
33680
33731
|
init_ZodError();
|
|
33681
33732
|
init_errors3();
|
|
@@ -35851,7 +35902,7 @@ var init_types2 = __esm(() => {
|
|
|
35851
35902
|
});
|
|
35852
35903
|
}
|
|
35853
35904
|
};
|
|
35854
|
-
|
|
35905
|
+
ZodLazy2 = class ZodLazy2 extends ZodType2 {
|
|
35855
35906
|
get schema() {
|
|
35856
35907
|
return this._def.getter();
|
|
35857
35908
|
}
|
|
@@ -35861,8 +35912,8 @@ var init_types2 = __esm(() => {
|
|
|
35861
35912
|
return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });
|
|
35862
35913
|
}
|
|
35863
35914
|
};
|
|
35864
|
-
|
|
35865
|
-
return new
|
|
35915
|
+
ZodLazy2.create = (getter, params) => {
|
|
35916
|
+
return new ZodLazy2({
|
|
35866
35917
|
getter,
|
|
35867
35918
|
typeName: ZodFirstPartyTypeKind2.ZodLazy,
|
|
35868
35919
|
...processCreateParams(params)
|
|
@@ -36458,7 +36509,7 @@ var init_types2 = __esm(() => {
|
|
|
36458
36509
|
mapType = ZodMap.create;
|
|
36459
36510
|
setType = ZodSet.create;
|
|
36460
36511
|
functionType = ZodFunction.create;
|
|
36461
|
-
lazyType =
|
|
36512
|
+
lazyType = ZodLazy2.create;
|
|
36462
36513
|
literalType = ZodLiteral2.create;
|
|
36463
36514
|
enumType = ZodEnum2.create;
|
|
36464
36515
|
nativeEnumType = ZodNativeEnum.create;
|
|
@@ -53204,9 +53255,9 @@ var init_config = __esm(() => {
|
|
|
53204
53255
|
SDK_METADATA = {
|
|
53205
53256
|
language: "typescript",
|
|
53206
53257
|
openapiDocVersion: "0.1.0",
|
|
53207
|
-
sdkVersion: "0.0.
|
|
53258
|
+
sdkVersion: "0.0.80",
|
|
53208
53259
|
genVersion: "2.915.1",
|
|
53209
|
-
userAgent: "speakeasy-sdk/mcp-typescript 0.0.
|
|
53260
|
+
userAgent: "speakeasy-sdk/mcp-typescript 0.0.80 2.915.1 0.1.0 @dalmia/calibrate-mcp"
|
|
53210
53261
|
};
|
|
53211
53262
|
});
|
|
53212
53263
|
|
|
@@ -53402,6 +53453,42 @@ function queryEncoder(f) {
|
|
|
53402
53453
|
};
|
|
53403
53454
|
return bulkEncode;
|
|
53404
53455
|
}
|
|
53456
|
+
function isBlobLike(val) {
|
|
53457
|
+
if (val instanceof Blob) {
|
|
53458
|
+
return true;
|
|
53459
|
+
}
|
|
53460
|
+
if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
|
|
53461
|
+
return false;
|
|
53462
|
+
}
|
|
53463
|
+
const tag = val[Symbol.toStringTag];
|
|
53464
|
+
if (tag !== "Blob" && tag !== "File") {
|
|
53465
|
+
return false;
|
|
53466
|
+
}
|
|
53467
|
+
return "stream" in val && typeof val.stream === "function";
|
|
53468
|
+
}
|
|
53469
|
+
function appendForm(fd, key, value, fileName) {
|
|
53470
|
+
if (value == null) {
|
|
53471
|
+
return;
|
|
53472
|
+
} else if (isBlobLike(value)) {
|
|
53473
|
+
if (fileName) {
|
|
53474
|
+
fd.append(key, value, fileName);
|
|
53475
|
+
} else {
|
|
53476
|
+
fd.append(key, value);
|
|
53477
|
+
}
|
|
53478
|
+
} else if (Array.isArray(value)) {
|
|
53479
|
+
value.forEach((v) => {
|
|
53480
|
+
appendForm(fd, key, v);
|
|
53481
|
+
});
|
|
53482
|
+
} else {
|
|
53483
|
+
fd.append(key, String(value));
|
|
53484
|
+
}
|
|
53485
|
+
}
|
|
53486
|
+
async function normalizeBlob(value) {
|
|
53487
|
+
if (value instanceof Blob) {
|
|
53488
|
+
return value;
|
|
53489
|
+
}
|
|
53490
|
+
return new Blob([await value.arrayBuffer()], { type: value.type });
|
|
53491
|
+
}
|
|
53405
53492
|
var EncodingError, encodeForm, encodeSpaceDelimited, encodePipeDelimited, encodeSimple = (key, value, options) => {
|
|
53406
53493
|
let out = "";
|
|
53407
53494
|
const pairs = options?.explode ? explode(key, value) : [[key, value]];
|
|
@@ -60350,6 +60437,589 @@ var init_annotatorsUpdate2 = __esm(() => {
|
|
|
60350
60437
|
};
|
|
60351
60438
|
});
|
|
60352
60439
|
|
|
60440
|
+
// src/models/datasetcreaterequest.ts
|
|
60441
|
+
var DatasetType$zodSchema, DatasetCreateRequest$zodSchema;
|
|
60442
|
+
var init_datasetcreaterequest = __esm(() => {
|
|
60443
|
+
init_zod();
|
|
60444
|
+
DatasetType$zodSchema = _enum([
|
|
60445
|
+
"stt",
|
|
60446
|
+
"tts"
|
|
60447
|
+
]).describe("`stt` items carry audio + ground-truth text. `tts` items carry text only");
|
|
60448
|
+
DatasetCreateRequest$zodSchema = object({
|
|
60449
|
+
dataset_type: DatasetType$zodSchema.describe("`stt` items carry audio + ground-truth text. `tts` items carry text only"),
|
|
60450
|
+
name: string2().describe("Dataset name, unique within the workspace")
|
|
60451
|
+
});
|
|
60452
|
+
});
|
|
60453
|
+
|
|
60454
|
+
// src/models/datasetresponse.ts
|
|
60455
|
+
var DatasetResponse$zodSchema;
|
|
60456
|
+
var init_datasetresponse = __esm(() => {
|
|
60457
|
+
init_zod();
|
|
60458
|
+
DatasetResponse$zodSchema = object({
|
|
60459
|
+
created_at: string2().describe("When the dataset was created (ISO 8601 UTC)"),
|
|
60460
|
+
dataset_type: string2().describe("Dataset type (`stt` or `tts`)"),
|
|
60461
|
+
eval_count: int().describe("Number of evaluation jobs that used this dataset"),
|
|
60462
|
+
item_count: int().describe("Number of items in the dataset"),
|
|
60463
|
+
name: string2().describe("Dataset name"),
|
|
60464
|
+
updated_at: string2().describe("When the dataset was last updated (ISO 8601 UTC)"),
|
|
60465
|
+
uuid: string2().describe("Dataset ID")
|
|
60466
|
+
});
|
|
60467
|
+
});
|
|
60468
|
+
|
|
60469
|
+
// src/models/createnewdatasetdatasetspostop.ts
|
|
60470
|
+
var CreateNewDatasetDatasetsPostRequest$zodSchema, CreateNewDatasetDatasetsPostResponse$zodSchema;
|
|
60471
|
+
var init_createnewdatasetdatasetspostop = __esm(() => {
|
|
60472
|
+
init_zod();
|
|
60473
|
+
init_datasetcreaterequest();
|
|
60474
|
+
init_datasetresponse();
|
|
60475
|
+
init_httpvalidationerror();
|
|
60476
|
+
CreateNewDatasetDatasetsPostRequest$zodSchema = object({
|
|
60477
|
+
body: DatasetCreateRequest$zodSchema,
|
|
60478
|
+
xAPIKey: string2().nullable().optional()
|
|
60479
|
+
});
|
|
60480
|
+
CreateNewDatasetDatasetsPostResponse$zodSchema = union([
|
|
60481
|
+
DatasetResponse$zodSchema,
|
|
60482
|
+
HTTPValidationError$zodSchema
|
|
60483
|
+
]);
|
|
60484
|
+
});
|
|
60485
|
+
|
|
60486
|
+
// src/funcs/datasetsCreate.ts
|
|
60487
|
+
function datasetsCreate(client$, request, options) {
|
|
60488
|
+
return new APIPromise($do33(client$, request, options));
|
|
60489
|
+
}
|
|
60490
|
+
async function $do33(client$, request, options) {
|
|
60491
|
+
const parsed$ = safeParse4(request, (value$) => CreateNewDatasetDatasetsPostRequest$zodSchema.parse(value$), "Input validation failed");
|
|
60492
|
+
if (!parsed$.ok) {
|
|
60493
|
+
return [parsed$, { status: "invalid" }];
|
|
60494
|
+
}
|
|
60495
|
+
const payload$ = parsed$.value;
|
|
60496
|
+
const body$ = encodeJSON("body", payload$.body, { explode: true });
|
|
60497
|
+
const path$ = pathToFunc("/datasets")();
|
|
60498
|
+
const headers$ = new Headers(compactMap({
|
|
60499
|
+
"Content-Type": "application/json",
|
|
60500
|
+
Accept: "application/json",
|
|
60501
|
+
"X-API-Key": encodeSimple("X-API-Key", payload$.xAPIKey, {
|
|
60502
|
+
explode: false,
|
|
60503
|
+
charEncoding: "none"
|
|
60504
|
+
})
|
|
60505
|
+
}));
|
|
60506
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
60507
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
60508
|
+
const context = {
|
|
60509
|
+
options: client$._options,
|
|
60510
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
60511
|
+
operationID: "create_new_dataset_datasets_post",
|
|
60512
|
+
oAuth2Scopes: null,
|
|
60513
|
+
resolvedSecurity: requestSecurity,
|
|
60514
|
+
securitySource: client$._options.security,
|
|
60515
|
+
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
60516
|
+
retryCodes: options?.retryCodes || [
|
|
60517
|
+
"429",
|
|
60518
|
+
"500",
|
|
60519
|
+
"502",
|
|
60520
|
+
"503",
|
|
60521
|
+
"504"
|
|
60522
|
+
]
|
|
60523
|
+
};
|
|
60524
|
+
const requestRes = client$._createRequest(context, {
|
|
60525
|
+
security: requestSecurity,
|
|
60526
|
+
method: "POST",
|
|
60527
|
+
baseURL: options?.serverURL,
|
|
60528
|
+
path: path$,
|
|
60529
|
+
headers: headers$,
|
|
60530
|
+
body: body$,
|
|
60531
|
+
userAgent: client$._options.userAgent,
|
|
60532
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
60533
|
+
}, options);
|
|
60534
|
+
if (!requestRes.ok) {
|
|
60535
|
+
return [requestRes, { status: "invalid" }];
|
|
60536
|
+
}
|
|
60537
|
+
const req$ = requestRes.value;
|
|
60538
|
+
const doResult = await client$._do(req$, {
|
|
60539
|
+
context,
|
|
60540
|
+
errorCodes: [],
|
|
60541
|
+
retryConfig: context.retryConfig,
|
|
60542
|
+
retryCodes: context.retryCodes
|
|
60543
|
+
});
|
|
60544
|
+
if (!doResult.ok) {
|
|
60545
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
60546
|
+
}
|
|
60547
|
+
return [doResult, {
|
|
60548
|
+
status: "complete",
|
|
60549
|
+
request: req$,
|
|
60550
|
+
response: doResult.value
|
|
60551
|
+
}];
|
|
60552
|
+
}
|
|
60553
|
+
var init_datasetsCreate = __esm(() => {
|
|
60554
|
+
init_encodings();
|
|
60555
|
+
init_primitives();
|
|
60556
|
+
init_schemas4();
|
|
60557
|
+
init_security();
|
|
60558
|
+
init_url();
|
|
60559
|
+
init_createnewdatasetdatasetspostop();
|
|
60560
|
+
init_async();
|
|
60561
|
+
});
|
|
60562
|
+
|
|
60563
|
+
// src/mcp-server/tools/datasetsCreate.ts
|
|
60564
|
+
var args33, tool$datasetsCreate;
|
|
60565
|
+
var init_datasetsCreate2 = __esm(() => {
|
|
60566
|
+
init_datasetsCreate();
|
|
60567
|
+
init_createnewdatasetdatasetspostop();
|
|
60568
|
+
init_tools();
|
|
60569
|
+
args33 = {
|
|
60570
|
+
request: CreateNewDatasetDatasetsPostRequest$zodSchema
|
|
60571
|
+
};
|
|
60572
|
+
tool$datasetsCreate = {
|
|
60573
|
+
name: "create-dataset",
|
|
60574
|
+
description: `Create an empty STT or TTS dataset in the caller's org. The name must
|
|
60575
|
+
be unique in the workspace (409 otherwise). Add items separately.
|
|
60576
|
+
`,
|
|
60577
|
+
scopes: ["write"],
|
|
60578
|
+
annotations: {
|
|
60579
|
+
title: "Create dataset",
|
|
60580
|
+
destructiveHint: false,
|
|
60581
|
+
idempotentHint: false,
|
|
60582
|
+
openWorldHint: true,
|
|
60583
|
+
readOnlyHint: false
|
|
60584
|
+
},
|
|
60585
|
+
args: args33,
|
|
60586
|
+
tool: async (client, args, ctx) => {
|
|
60587
|
+
const [result] = await datasetsCreate(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
60588
|
+
if (!result.ok) {
|
|
60589
|
+
return {
|
|
60590
|
+
content: [{ type: "text", text: result.error.message }],
|
|
60591
|
+
isError: true
|
|
60592
|
+
};
|
|
60593
|
+
}
|
|
60594
|
+
return formatResult(result.value);
|
|
60595
|
+
}
|
|
60596
|
+
};
|
|
60597
|
+
});
|
|
60598
|
+
|
|
60599
|
+
// src/models/datasetitemresponse.ts
|
|
60600
|
+
var DatasetItemResponse$zodSchema;
|
|
60601
|
+
var init_datasetitemresponse = __esm(() => {
|
|
60602
|
+
init_zod();
|
|
60603
|
+
DatasetItemResponse$zodSchema = object({
|
|
60604
|
+
audio_path: string2().nullable().optional().describe("Presigned download URL for the item's audio"),
|
|
60605
|
+
created_at: string2().describe("When the dataset item was created (ISO 8601 UTC)"),
|
|
60606
|
+
order_index: int().describe("Position of the item within the dataset. The first item is 0"),
|
|
60607
|
+
text: string2().describe("Ground-truth transcript (STT) or synthesis text (TTS)"),
|
|
60608
|
+
updated_at: string2().nullable().optional().describe("When the dataset item was last updated (ISO 8601 UTC)"),
|
|
60609
|
+
uuid: string2().describe("Dataset item ID")
|
|
60610
|
+
});
|
|
60611
|
+
});
|
|
60612
|
+
|
|
60613
|
+
// src/models/datasetdetailresponse.ts
|
|
60614
|
+
var DatasetDetailResponse$zodSchema;
|
|
60615
|
+
var init_datasetdetailresponse = __esm(() => {
|
|
60616
|
+
init_zod();
|
|
60617
|
+
init_datasetitemresponse();
|
|
60618
|
+
DatasetDetailResponse$zodSchema = object({
|
|
60619
|
+
created_at: string2().describe("When the dataset was created (ISO 8601 UTC)"),
|
|
60620
|
+
dataset_type: string2().describe("Dataset type (`stt` or `tts`)"),
|
|
60621
|
+
eval_count: int().describe("Number of evaluation jobs that used this dataset"),
|
|
60622
|
+
item_count: int().describe("Number of items in the dataset"),
|
|
60623
|
+
items: array(DatasetItemResponse$zodSchema).describe("All items in the dataset, ordered by `order_index`"),
|
|
60624
|
+
name: string2().describe("Dataset name"),
|
|
60625
|
+
updated_at: string2().describe("When the dataset was last updated (ISO 8601 UTC)"),
|
|
60626
|
+
uuid: string2().describe("Dataset ID")
|
|
60627
|
+
});
|
|
60628
|
+
});
|
|
60629
|
+
|
|
60630
|
+
// src/models/getdatasetdetaildatasetsdatasetidgetop.ts
|
|
60631
|
+
var GetDatasetDetailDatasetsDatasetIdGetRequest$zodSchema, GetDatasetDetailDatasetsDatasetIdGetResponse$zodSchema;
|
|
60632
|
+
var init_getdatasetdetaildatasetsdatasetidgetop = __esm(() => {
|
|
60633
|
+
init_zod();
|
|
60634
|
+
init_datasetdetailresponse();
|
|
60635
|
+
init_httpvalidationerror();
|
|
60636
|
+
GetDatasetDetailDatasetsDatasetIdGetRequest$zodSchema = object({
|
|
60637
|
+
dataset_id: string2().describe("The dataset to retrieve"),
|
|
60638
|
+
xAPIKey: string2().nullable().optional()
|
|
60639
|
+
});
|
|
60640
|
+
GetDatasetDetailDatasetsDatasetIdGetResponse$zodSchema = union([
|
|
60641
|
+
DatasetDetailResponse$zodSchema,
|
|
60642
|
+
HTTPValidationError$zodSchema
|
|
60643
|
+
]);
|
|
60644
|
+
});
|
|
60645
|
+
|
|
60646
|
+
// src/funcs/datasetsGet.ts
|
|
60647
|
+
function datasetsGet(client$, request, options) {
|
|
60648
|
+
return new APIPromise($do34(client$, request, options));
|
|
60649
|
+
}
|
|
60650
|
+
async function $do34(client$, request, options) {
|
|
60651
|
+
const parsed$ = safeParse4(request, (value$) => GetDatasetDetailDatasetsDatasetIdGetRequest$zodSchema.parse(value$), "Input validation failed");
|
|
60652
|
+
if (!parsed$.ok) {
|
|
60653
|
+
return [parsed$, { status: "invalid" }];
|
|
60654
|
+
}
|
|
60655
|
+
const payload$ = parsed$.value;
|
|
60656
|
+
const body$ = null;
|
|
60657
|
+
const pathParams$ = {
|
|
60658
|
+
dataset_id: encodeSimple("dataset_id", payload$.dataset_id, {
|
|
60659
|
+
explode: false,
|
|
60660
|
+
charEncoding: "percent"
|
|
60661
|
+
})
|
|
60662
|
+
};
|
|
60663
|
+
const path$ = pathToFunc("/datasets/{dataset_id}")(pathParams$);
|
|
60664
|
+
const headers$ = new Headers(compactMap({
|
|
60665
|
+
Accept: "application/json",
|
|
60666
|
+
"X-API-Key": encodeSimple("X-API-Key", payload$.xAPIKey, {
|
|
60667
|
+
explode: false,
|
|
60668
|
+
charEncoding: "none"
|
|
60669
|
+
})
|
|
60670
|
+
}));
|
|
60671
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
60672
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
60673
|
+
const context = {
|
|
60674
|
+
options: client$._options,
|
|
60675
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
60676
|
+
operationID: "get_dataset_detail_datasets__dataset_id__get",
|
|
60677
|
+
oAuth2Scopes: null,
|
|
60678
|
+
resolvedSecurity: requestSecurity,
|
|
60679
|
+
securitySource: client$._options.security,
|
|
60680
|
+
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
60681
|
+
retryCodes: options?.retryCodes || [
|
|
60682
|
+
"429",
|
|
60683
|
+
"500",
|
|
60684
|
+
"502",
|
|
60685
|
+
"503",
|
|
60686
|
+
"504"
|
|
60687
|
+
]
|
|
60688
|
+
};
|
|
60689
|
+
const requestRes = client$._createRequest(context, {
|
|
60690
|
+
security: requestSecurity,
|
|
60691
|
+
method: "GET",
|
|
60692
|
+
baseURL: options?.serverURL,
|
|
60693
|
+
path: path$,
|
|
60694
|
+
headers: headers$,
|
|
60695
|
+
body: body$,
|
|
60696
|
+
userAgent: client$._options.userAgent,
|
|
60697
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
60698
|
+
}, options);
|
|
60699
|
+
if (!requestRes.ok) {
|
|
60700
|
+
return [requestRes, { status: "invalid" }];
|
|
60701
|
+
}
|
|
60702
|
+
const req$ = requestRes.value;
|
|
60703
|
+
const doResult = await client$._do(req$, {
|
|
60704
|
+
context,
|
|
60705
|
+
errorCodes: [],
|
|
60706
|
+
retryConfig: context.retryConfig,
|
|
60707
|
+
retryCodes: context.retryCodes
|
|
60708
|
+
});
|
|
60709
|
+
if (!doResult.ok) {
|
|
60710
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
60711
|
+
}
|
|
60712
|
+
return [doResult, {
|
|
60713
|
+
status: "complete",
|
|
60714
|
+
request: req$,
|
|
60715
|
+
response: doResult.value
|
|
60716
|
+
}];
|
|
60717
|
+
}
|
|
60718
|
+
var init_datasetsGet = __esm(() => {
|
|
60719
|
+
init_encodings();
|
|
60720
|
+
init_primitives();
|
|
60721
|
+
init_schemas4();
|
|
60722
|
+
init_security();
|
|
60723
|
+
init_url();
|
|
60724
|
+
init_getdatasetdetaildatasetsdatasetidgetop();
|
|
60725
|
+
init_async();
|
|
60726
|
+
});
|
|
60727
|
+
|
|
60728
|
+
// src/mcp-server/tools/datasetsGet.ts
|
|
60729
|
+
var args34, tool$datasetsGet;
|
|
60730
|
+
var init_datasetsGet2 = __esm(() => {
|
|
60731
|
+
init_datasetsGet();
|
|
60732
|
+
init_getdatasetdetaildatasetsdatasetidgetop();
|
|
60733
|
+
init_tools();
|
|
60734
|
+
args34 = {
|
|
60735
|
+
request: GetDatasetDetailDatasetsDatasetIdGetRequest$zodSchema
|
|
60736
|
+
};
|
|
60737
|
+
tool$datasetsGet = {
|
|
60738
|
+
name: "get-dataset",
|
|
60739
|
+
description: `Get one dataset in the caller's org with all of its items, each with
|
|
60740
|
+
a download link for its audio (STT) and its text.
|
|
60741
|
+
`,
|
|
60742
|
+
scopes: ["read"],
|
|
60743
|
+
annotations: {
|
|
60744
|
+
title: "Get dataset",
|
|
60745
|
+
destructiveHint: false,
|
|
60746
|
+
idempotentHint: false,
|
|
60747
|
+
openWorldHint: true,
|
|
60748
|
+
readOnlyHint: true
|
|
60749
|
+
},
|
|
60750
|
+
args: args34,
|
|
60751
|
+
tool: async (client, args, ctx) => {
|
|
60752
|
+
const [result] = await datasetsGet(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
60753
|
+
if (!result.ok) {
|
|
60754
|
+
return {
|
|
60755
|
+
content: [{ type: "text", text: result.error.message }],
|
|
60756
|
+
isError: true
|
|
60757
|
+
};
|
|
60758
|
+
}
|
|
60759
|
+
return formatResult(result.value);
|
|
60760
|
+
}
|
|
60761
|
+
};
|
|
60762
|
+
});
|
|
60763
|
+
|
|
60764
|
+
// src/lib/files.ts
|
|
60765
|
+
async function readableStreamToArrayBuffer(readable) {
|
|
60766
|
+
const reader = readable.getReader();
|
|
60767
|
+
const chunks = [];
|
|
60768
|
+
let totalLength = 0;
|
|
60769
|
+
let done = false;
|
|
60770
|
+
while (!done) {
|
|
60771
|
+
const { value, done: doneReading } = await reader.read();
|
|
60772
|
+
if (doneReading) {
|
|
60773
|
+
done = true;
|
|
60774
|
+
} else {
|
|
60775
|
+
chunks.push(value);
|
|
60776
|
+
totalLength += value.length;
|
|
60777
|
+
}
|
|
60778
|
+
}
|
|
60779
|
+
const concatenatedChunks = new Uint8Array(totalLength);
|
|
60780
|
+
let offset = 0;
|
|
60781
|
+
for (const chunk of chunks) {
|
|
60782
|
+
concatenatedChunks.set(chunk, offset);
|
|
60783
|
+
offset += chunk.length;
|
|
60784
|
+
}
|
|
60785
|
+
return concatenatedChunks.buffer;
|
|
60786
|
+
}
|
|
60787
|
+
function getContentTypeFromFileName(fileName) {
|
|
60788
|
+
if (!fileName)
|
|
60789
|
+
return null;
|
|
60790
|
+
const ext = fileName.toLowerCase().split(".").pop();
|
|
60791
|
+
if (!ext)
|
|
60792
|
+
return null;
|
|
60793
|
+
const mimeTypes = {
|
|
60794
|
+
json: "application/json",
|
|
60795
|
+
xml: "application/xml",
|
|
60796
|
+
html: "text/html",
|
|
60797
|
+
htm: "text/html",
|
|
60798
|
+
txt: "text/plain",
|
|
60799
|
+
csv: "text/csv",
|
|
60800
|
+
pdf: "application/pdf",
|
|
60801
|
+
png: "image/png",
|
|
60802
|
+
jpg: "image/jpeg",
|
|
60803
|
+
jpeg: "image/jpeg",
|
|
60804
|
+
gif: "image/gif",
|
|
60805
|
+
svg: "image/svg+xml",
|
|
60806
|
+
js: "application/javascript",
|
|
60807
|
+
css: "text/css",
|
|
60808
|
+
zip: "application/zip",
|
|
60809
|
+
tar: "application/x-tar",
|
|
60810
|
+
gz: "application/gzip",
|
|
60811
|
+
mp4: "video/mp4",
|
|
60812
|
+
mp3: "audio/mpeg",
|
|
60813
|
+
wav: "audio/wav",
|
|
60814
|
+
webp: "image/webp",
|
|
60815
|
+
ico: "image/x-icon",
|
|
60816
|
+
woff: "font/woff",
|
|
60817
|
+
woff2: "font/woff2",
|
|
60818
|
+
ttf: "font/ttf",
|
|
60819
|
+
otf: "font/otf"
|
|
60820
|
+
};
|
|
60821
|
+
return mimeTypes[ext] || null;
|
|
60822
|
+
}
|
|
60823
|
+
function bytesToBlob(content, contentType) {
|
|
60824
|
+
if (content instanceof Uint8Array) {
|
|
60825
|
+
return new Blob([new Uint8Array(content)], { type: contentType });
|
|
60826
|
+
}
|
|
60827
|
+
return new Blob([content], { type: contentType });
|
|
60828
|
+
}
|
|
60829
|
+
|
|
60830
|
+
// src/models/bodyuploadsttitemdatasetsdatasetiditemsuploadpost.ts
|
|
60831
|
+
var Audio$zodSchema, BodyUploadSttItemDatasetsDatasetIdItemsUploadPost$zodSchema;
|
|
60832
|
+
var init_bodyuploadsttitemdatasetsdatasetiditemsuploadpost = __esm(() => {
|
|
60833
|
+
init_zod();
|
|
60834
|
+
init_base64();
|
|
60835
|
+
Audio$zodSchema = object({
|
|
60836
|
+
content: string2().describe("Base64-encoded binary content").transform(bytesFromBase64),
|
|
60837
|
+
fileName: string2()
|
|
60838
|
+
});
|
|
60839
|
+
BodyUploadSttItemDatasetsDatasetIdItemsUploadPost$zodSchema = object({
|
|
60840
|
+
audio: lazy(() => Audio$zodSchema).describe("WAV file of the spoken audio, at most 25 MB and 10 minutes long"),
|
|
60841
|
+
text: string2().describe("Ground-truth transcript of the audio")
|
|
60842
|
+
});
|
|
60843
|
+
});
|
|
60844
|
+
|
|
60845
|
+
// src/models/uploadsttitemdatasetsdatasetiditemsuploadpostop.ts
|
|
60846
|
+
var UploadSttItemDatasetsDatasetIdItemsUploadPostRequest$zodSchema, UploadSttItemDatasetsDatasetIdItemsUploadPostResponse$zodSchema;
|
|
60847
|
+
var init_uploadsttitemdatasetsdatasetiditemsuploadpostop = __esm(() => {
|
|
60848
|
+
init_zod();
|
|
60849
|
+
init_bodyuploadsttitemdatasetsdatasetiditemsuploadpost();
|
|
60850
|
+
init_datasetitemresponse();
|
|
60851
|
+
init_httpvalidationerror();
|
|
60852
|
+
UploadSttItemDatasetsDatasetIdItemsUploadPostRequest$zodSchema = object({
|
|
60853
|
+
body: BodyUploadSttItemDatasetsDatasetIdItemsUploadPost$zodSchema,
|
|
60854
|
+
dataset_id: string2().describe("The STT dataset to add the item to"),
|
|
60855
|
+
xAPIKey: string2().nullable().optional()
|
|
60856
|
+
});
|
|
60857
|
+
UploadSttItemDatasetsDatasetIdItemsUploadPostResponse$zodSchema = union([
|
|
60858
|
+
DatasetItemResponse$zodSchema,
|
|
60859
|
+
HTTPValidationError$zodSchema
|
|
60860
|
+
]);
|
|
60861
|
+
});
|
|
60862
|
+
|
|
60863
|
+
// src/types/blobs.ts
|
|
60864
|
+
function isBlobLike2(val) {
|
|
60865
|
+
if (val instanceof Blob) {
|
|
60866
|
+
return true;
|
|
60867
|
+
}
|
|
60868
|
+
if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
|
|
60869
|
+
return false;
|
|
60870
|
+
}
|
|
60871
|
+
const name = val[Symbol.toStringTag];
|
|
60872
|
+
if (typeof name !== "string") {
|
|
60873
|
+
return false;
|
|
60874
|
+
}
|
|
60875
|
+
if (name !== "Blob" && name !== "File") {
|
|
60876
|
+
return false;
|
|
60877
|
+
}
|
|
60878
|
+
return "stream" in val && typeof val.stream === "function";
|
|
60879
|
+
}
|
|
60880
|
+
|
|
60881
|
+
// src/types/streams.ts
|
|
60882
|
+
function isReadableStream(val) {
|
|
60883
|
+
if (typeof val !== "object" || val === null) {
|
|
60884
|
+
return false;
|
|
60885
|
+
}
|
|
60886
|
+
const stream = val;
|
|
60887
|
+
return typeof stream.getReader === "function" && typeof stream.cancel === "function" && typeof stream.tee === "function";
|
|
60888
|
+
}
|
|
60889
|
+
|
|
60890
|
+
// src/funcs/datasetsUploadItem.ts
|
|
60891
|
+
function datasetsUploadItem(client$, request, options) {
|
|
60892
|
+
return new APIPromise($do35(client$, request, options));
|
|
60893
|
+
}
|
|
60894
|
+
async function $do35(client$, request, options) {
|
|
60895
|
+
const parsed$ = safeParse4(request, (value$) => UploadSttItemDatasetsDatasetIdItemsUploadPostRequest$zodSchema.parse(value$), "Input validation failed");
|
|
60896
|
+
if (!parsed$.ok) {
|
|
60897
|
+
return [parsed$, { status: "invalid" }];
|
|
60898
|
+
}
|
|
60899
|
+
const payload$ = parsed$.value;
|
|
60900
|
+
const body$ = new FormData;
|
|
60901
|
+
if (isBlobLike2(payload$.body.audio)) {
|
|
60902
|
+
const file = payload$.body.audio;
|
|
60903
|
+
const blob = await normalizeBlob(file);
|
|
60904
|
+
const name = "name" in file ? file.name : undefined;
|
|
60905
|
+
appendForm(body$, "audio", blob, name);
|
|
60906
|
+
} else if (isReadableStream(payload$.body.audio.content)) {
|
|
60907
|
+
const buffer = await readableStreamToArrayBuffer(payload$.body.audio.content);
|
|
60908
|
+
const contentType = getContentTypeFromFileName(payload$.body.audio.fileName) || "application/octet-stream";
|
|
60909
|
+
appendForm(body$, "audio", bytesToBlob(buffer, contentType), payload$.body.audio.fileName);
|
|
60910
|
+
} else {
|
|
60911
|
+
const contentType = getContentTypeFromFileName(payload$.body.audio.fileName) || "application/octet-stream";
|
|
60912
|
+
appendForm(body$, "audio", bytesToBlob(payload$.body.audio.content, contentType), payload$.body.audio.fileName);
|
|
60913
|
+
}
|
|
60914
|
+
appendForm(body$, "text", payload$.body.text);
|
|
60915
|
+
const pathParams$ = {
|
|
60916
|
+
dataset_id: encodeSimple("dataset_id", payload$.dataset_id, {
|
|
60917
|
+
explode: false,
|
|
60918
|
+
charEncoding: "percent"
|
|
60919
|
+
})
|
|
60920
|
+
};
|
|
60921
|
+
const path$ = pathToFunc("/datasets/{dataset_id}/items/upload")(pathParams$);
|
|
60922
|
+
const headers$ = new Headers(compactMap({
|
|
60923
|
+
Accept: "application/json",
|
|
60924
|
+
"X-API-Key": encodeSimple("X-API-Key", payload$.xAPIKey, {
|
|
60925
|
+
explode: false,
|
|
60926
|
+
charEncoding: "none"
|
|
60927
|
+
})
|
|
60928
|
+
}));
|
|
60929
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
60930
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
60931
|
+
const context = {
|
|
60932
|
+
options: client$._options,
|
|
60933
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
60934
|
+
operationID: "upload_stt_item_datasets__dataset_id__items_upload_post",
|
|
60935
|
+
oAuth2Scopes: null,
|
|
60936
|
+
resolvedSecurity: requestSecurity,
|
|
60937
|
+
securitySource: client$._options.security,
|
|
60938
|
+
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
60939
|
+
retryCodes: options?.retryCodes || [
|
|
60940
|
+
"429",
|
|
60941
|
+
"500",
|
|
60942
|
+
"502",
|
|
60943
|
+
"503",
|
|
60944
|
+
"504"
|
|
60945
|
+
]
|
|
60946
|
+
};
|
|
60947
|
+
const requestRes = client$._createRequest(context, {
|
|
60948
|
+
security: requestSecurity,
|
|
60949
|
+
method: "POST",
|
|
60950
|
+
baseURL: options?.serverURL,
|
|
60951
|
+
path: path$,
|
|
60952
|
+
headers: headers$,
|
|
60953
|
+
body: body$,
|
|
60954
|
+
userAgent: client$._options.userAgent,
|
|
60955
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
60956
|
+
}, options);
|
|
60957
|
+
if (!requestRes.ok) {
|
|
60958
|
+
return [requestRes, { status: "invalid" }];
|
|
60959
|
+
}
|
|
60960
|
+
const req$ = requestRes.value;
|
|
60961
|
+
const doResult = await client$._do(req$, {
|
|
60962
|
+
context,
|
|
60963
|
+
errorCodes: [],
|
|
60964
|
+
retryConfig: context.retryConfig,
|
|
60965
|
+
retryCodes: context.retryCodes
|
|
60966
|
+
});
|
|
60967
|
+
if (!doResult.ok) {
|
|
60968
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
60969
|
+
}
|
|
60970
|
+
return [doResult, {
|
|
60971
|
+
status: "complete",
|
|
60972
|
+
request: req$,
|
|
60973
|
+
response: doResult.value
|
|
60974
|
+
}];
|
|
60975
|
+
}
|
|
60976
|
+
var init_datasetsUploadItem = __esm(() => {
|
|
60977
|
+
init_encodings();
|
|
60978
|
+
init_primitives();
|
|
60979
|
+
init_schemas4();
|
|
60980
|
+
init_security();
|
|
60981
|
+
init_url();
|
|
60982
|
+
init_uploadsttitemdatasetsdatasetiditemsuploadpostop();
|
|
60983
|
+
init_async();
|
|
60984
|
+
});
|
|
60985
|
+
|
|
60986
|
+
// src/mcp-server/tools/datasetsUploadItem.ts
|
|
60987
|
+
var args35, tool$datasetsUploadItem;
|
|
60988
|
+
var init_datasetsUploadItem2 = __esm(() => {
|
|
60989
|
+
init_datasetsUploadItem();
|
|
60990
|
+
init_uploadsttitemdatasetsdatasetiditemsuploadpostop();
|
|
60991
|
+
init_tools();
|
|
60992
|
+
args35 = {
|
|
60993
|
+
request: UploadSttItemDatasetsDatasetIdItemsUploadPostRequest$zodSchema
|
|
60994
|
+
};
|
|
60995
|
+
tool$datasetsUploadItem = {
|
|
60996
|
+
name: "upload-dataset-item",
|
|
60997
|
+
description: `Upload one WAV clip (at most 25 MB and 10 minutes) with its
|
|
60998
|
+
ground-truth transcript and append it to an STT dataset in the
|
|
60999
|
+
caller's org.
|
|
61000
|
+
`,
|
|
61001
|
+
scopes: ["write"],
|
|
61002
|
+
annotations: {
|
|
61003
|
+
title: "Upload STT dataset item",
|
|
61004
|
+
destructiveHint: false,
|
|
61005
|
+
idempotentHint: false,
|
|
61006
|
+
openWorldHint: true,
|
|
61007
|
+
readOnlyHint: false
|
|
61008
|
+
},
|
|
61009
|
+
args: args35,
|
|
61010
|
+
tool: async (client, args, ctx) => {
|
|
61011
|
+
const [result] = await datasetsUploadItem(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
61012
|
+
if (!result.ok) {
|
|
61013
|
+
return {
|
|
61014
|
+
content: [{ type: "text", text: result.error.message }],
|
|
61015
|
+
isError: true
|
|
61016
|
+
};
|
|
61017
|
+
}
|
|
61018
|
+
return formatResult(result.value);
|
|
61019
|
+
}
|
|
61020
|
+
};
|
|
61021
|
+
});
|
|
61022
|
+
|
|
60353
61023
|
// src/models/outputscaleentry.ts
|
|
60354
61024
|
var OutputScaleEntry$zodSchema;
|
|
60355
61025
|
var init_outputscaleentry = __esm(() => {
|
|
@@ -60446,9 +61116,9 @@ var init_createevaluatorendpointevaluatorspostop = __esm(() => {
|
|
|
60446
61116
|
|
|
60447
61117
|
// src/funcs/evaluatorsCreate.ts
|
|
60448
61118
|
function evaluatorsCreate(client$, request, options) {
|
|
60449
|
-
return new APIPromise($
|
|
61119
|
+
return new APIPromise($do36(client$, request, options));
|
|
60450
61120
|
}
|
|
60451
|
-
async function $
|
|
61121
|
+
async function $do36(client$, request, options) {
|
|
60452
61122
|
const parsed$ = safeParse4(request, (value$) => CreateEvaluatorEndpointEvaluatorsPostRequest$zodSchema.parse(value$), "Input validation failed");
|
|
60453
61123
|
if (!parsed$.ok) {
|
|
60454
61124
|
return [parsed$, { status: "invalid" }];
|
|
@@ -60522,12 +61192,12 @@ var init_evaluatorsCreate = __esm(() => {
|
|
|
60522
61192
|
});
|
|
60523
61193
|
|
|
60524
61194
|
// src/mcp-server/tools/evaluatorsCreate.ts
|
|
60525
|
-
var
|
|
61195
|
+
var args36, tool$evaluatorsCreate;
|
|
60526
61196
|
var init_evaluatorsCreate2 = __esm(() => {
|
|
60527
61197
|
init_evaluatorsCreate();
|
|
60528
61198
|
init_createevaluatorendpointevaluatorspostop();
|
|
60529
61199
|
init_tools();
|
|
60530
|
-
|
|
61200
|
+
args36 = {
|
|
60531
61201
|
request: CreateEvaluatorEndpointEvaluatorsPostRequest$zodSchema
|
|
60532
61202
|
};
|
|
60533
61203
|
tool$evaluatorsCreate = {
|
|
@@ -60542,7 +61212,7 @@ var init_evaluatorsCreate2 = __esm(() => {
|
|
|
60542
61212
|
openWorldHint: true,
|
|
60543
61213
|
readOnlyHint: false
|
|
60544
61214
|
},
|
|
60545
|
-
args:
|
|
61215
|
+
args: args36,
|
|
60546
61216
|
tool: async (client, args, ctx) => {
|
|
60547
61217
|
const [result] = await evaluatorsCreate(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
60548
61218
|
if (!result.ok) {
|
|
@@ -60601,9 +61271,9 @@ var init_createversionevaluatorsevaluatoruuidversionspostop = __esm(() => {
|
|
|
60601
61271
|
|
|
60602
61272
|
// src/funcs/evaluatorsCreateVersion.ts
|
|
60603
61273
|
function evaluatorsCreateVersion(client$, request, options) {
|
|
60604
|
-
return new APIPromise($
|
|
61274
|
+
return new APIPromise($do37(client$, request, options));
|
|
60605
61275
|
}
|
|
60606
|
-
async function $
|
|
61276
|
+
async function $do37(client$, request, options) {
|
|
60607
61277
|
const parsed$ = safeParse4(request, (value$) => CreateVersionEvaluatorsEvaluatorUuidVersionsPostRequest$zodSchema.parse(value$), "Input validation failed");
|
|
60608
61278
|
if (!parsed$.ok) {
|
|
60609
61279
|
return [parsed$, { status: "invalid" }];
|
|
@@ -60683,12 +61353,12 @@ var init_evaluatorsCreateVersion = __esm(() => {
|
|
|
60683
61353
|
});
|
|
60684
61354
|
|
|
60685
61355
|
// src/mcp-server/tools/evaluatorsCreateVersion.ts
|
|
60686
|
-
var
|
|
61356
|
+
var args37, tool$evaluatorsCreateVersion;
|
|
60687
61357
|
var init_evaluatorsCreateVersion2 = __esm(() => {
|
|
60688
61358
|
init_evaluatorsCreateVersion();
|
|
60689
61359
|
init_createversionevaluatorsevaluatoruuidversionspostop();
|
|
60690
61360
|
init_tools();
|
|
60691
|
-
|
|
61361
|
+
args37 = {
|
|
60692
61362
|
request: CreateVersionEvaluatorsEvaluatorUuidVersionsPostRequest$zodSchema
|
|
60693
61363
|
};
|
|
60694
61364
|
tool$evaluatorsCreateVersion = {
|
|
@@ -60703,7 +61373,7 @@ var init_evaluatorsCreateVersion2 = __esm(() => {
|
|
|
60703
61373
|
openWorldHint: true,
|
|
60704
61374
|
readOnlyHint: false
|
|
60705
61375
|
},
|
|
60706
|
-
args:
|
|
61376
|
+
args: args37,
|
|
60707
61377
|
tool: async (client, args, ctx) => {
|
|
60708
61378
|
const [result] = await evaluatorsCreateVersion(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
60709
61379
|
if (!result.ok) {
|
|
@@ -60792,9 +61462,9 @@ var init_getevaluatorendpointevaluatorsevaluatoruuidgetop = __esm(() => {
|
|
|
60792
61462
|
|
|
60793
61463
|
// src/funcs/evaluatorsGet.ts
|
|
60794
61464
|
function evaluatorsGet(client$, request, options) {
|
|
60795
|
-
return new APIPromise($
|
|
61465
|
+
return new APIPromise($do38(client$, request, options));
|
|
60796
61466
|
}
|
|
60797
|
-
async function $
|
|
61467
|
+
async function $do38(client$, request, options) {
|
|
60798
61468
|
const parsed$ = safeParse4(request, (value$) => GetEvaluatorEndpointEvaluatorsEvaluatorUuidGetRequest$zodSchema.parse(value$), "Input validation failed");
|
|
60799
61469
|
if (!parsed$.ok) {
|
|
60800
61470
|
return [parsed$, { status: "invalid" }];
|
|
@@ -60877,12 +61547,12 @@ var init_evaluatorsGet = __esm(() => {
|
|
|
60877
61547
|
});
|
|
60878
61548
|
|
|
60879
61549
|
// src/mcp-server/tools/evaluatorsGet.ts
|
|
60880
|
-
var
|
|
61550
|
+
var args38, tool$evaluatorsGet;
|
|
60881
61551
|
var init_evaluatorsGet2 = __esm(() => {
|
|
60882
61552
|
init_evaluatorsGet();
|
|
60883
61553
|
init_getevaluatorendpointevaluatorsevaluatoruuidgetop();
|
|
60884
61554
|
init_tools();
|
|
60885
|
-
|
|
61555
|
+
args38 = {
|
|
60886
61556
|
request: GetEvaluatorEndpointEvaluatorsEvaluatorUuidGetRequest$zodSchema
|
|
60887
61557
|
};
|
|
60888
61558
|
tool$evaluatorsGet = {
|
|
@@ -60897,7 +61567,7 @@ var init_evaluatorsGet2 = __esm(() => {
|
|
|
60897
61567
|
openWorldHint: true,
|
|
60898
61568
|
readOnlyHint: true
|
|
60899
61569
|
},
|
|
60900
|
-
args:
|
|
61570
|
+
args: args38,
|
|
60901
61571
|
tool: async (client, args, ctx) => {
|
|
60902
61572
|
const [result] = await evaluatorsGet(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
60903
61573
|
if (!result.ok) {
|
|
@@ -60946,9 +61616,9 @@ var init_listevaluatorsevaluatorsgetop = __esm(() => {
|
|
|
60946
61616
|
|
|
60947
61617
|
// src/funcs/evaluatorsList.ts
|
|
60948
61618
|
function evaluatorsList(client$, request, options) {
|
|
60949
|
-
return new APIPromise($
|
|
61619
|
+
return new APIPromise($do39(client$, request, options));
|
|
60950
61620
|
}
|
|
60951
|
-
async function $
|
|
61621
|
+
async function $do39(client$, request, options) {
|
|
60952
61622
|
const parsed$ = safeParse4(request, (value$) => ListEvaluatorsEvaluatorsGetRequest$zodSchema.optional().parse(value$), "Input validation failed");
|
|
60953
61623
|
if (!parsed$.ok) {
|
|
60954
61624
|
return [parsed$, { status: "invalid" }];
|
|
@@ -61030,12 +61700,12 @@ var init_evaluatorsList = __esm(() => {
|
|
|
61030
61700
|
});
|
|
61031
61701
|
|
|
61032
61702
|
// src/mcp-server/tools/evaluatorsList.ts
|
|
61033
|
-
var
|
|
61703
|
+
var args39, tool$evaluatorsList;
|
|
61034
61704
|
var init_evaluatorsList2 = __esm(() => {
|
|
61035
61705
|
init_evaluatorsList();
|
|
61036
61706
|
init_listevaluatorsevaluatorsgetop();
|
|
61037
61707
|
init_tools();
|
|
61038
|
-
|
|
61708
|
+
args39 = {
|
|
61039
61709
|
request: ListEvaluatorsEvaluatorsGetRequest$zodSchema.optional()
|
|
61040
61710
|
};
|
|
61041
61711
|
tool$evaluatorsList = {
|
|
@@ -61050,7 +61720,7 @@ var init_evaluatorsList2 = __esm(() => {
|
|
|
61050
61720
|
openWorldHint: true,
|
|
61051
61721
|
readOnlyHint: true
|
|
61052
61722
|
},
|
|
61053
|
-
args:
|
|
61723
|
+
args: args39,
|
|
61054
61724
|
tool: async (client, args, ctx) => {
|
|
61055
61725
|
const [result] = await evaluatorsList(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
61056
61726
|
if (!result.ok) {
|
|
@@ -61170,9 +61840,9 @@ var init_bulkuploadteststestsbulkpostop = __esm(() => {
|
|
|
61170
61840
|
|
|
61171
61841
|
// src/funcs/testsBulkCreate.ts
|
|
61172
61842
|
function testsBulkCreate(client$, request, options) {
|
|
61173
|
-
return new APIPromise($
|
|
61843
|
+
return new APIPromise($do40(client$, request, options));
|
|
61174
61844
|
}
|
|
61175
|
-
async function $
|
|
61845
|
+
async function $do40(client$, request, options) {
|
|
61176
61846
|
const parsed$ = safeParse4(request, (value$) => BulkUploadTestsTestsBulkPostRequest$zodSchema.parse(value$), "Input validation failed");
|
|
61177
61847
|
if (!parsed$.ok) {
|
|
61178
61848
|
return [parsed$, { status: "invalid" }];
|
|
@@ -61246,12 +61916,12 @@ var init_testsBulkCreate = __esm(() => {
|
|
|
61246
61916
|
});
|
|
61247
61917
|
|
|
61248
61918
|
// src/mcp-server/tools/testsBulkCreate.ts
|
|
61249
|
-
var
|
|
61919
|
+
var args40, tool$testsBulkCreate;
|
|
61250
61920
|
var init_testsBulkCreate2 = __esm(() => {
|
|
61251
61921
|
init_testsBulkCreate();
|
|
61252
61922
|
init_bulkuploadteststestsbulkpostop();
|
|
61253
61923
|
init_tools();
|
|
61254
|
-
|
|
61924
|
+
args40 = {
|
|
61255
61925
|
request: BulkUploadTestsTestsBulkPostRequest$zodSchema
|
|
61256
61926
|
};
|
|
61257
61927
|
tool$testsBulkCreate = {
|
|
@@ -61268,7 +61938,7 @@ tests including their UUIDs.
|
|
|
61268
61938
|
openWorldHint: true,
|
|
61269
61939
|
readOnlyHint: false
|
|
61270
61940
|
},
|
|
61271
|
-
args:
|
|
61941
|
+
args: args40,
|
|
61272
61942
|
tool: async (client, args, ctx) => {
|
|
61273
61943
|
const [result] = await testsBulkCreate(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
61274
61944
|
if (!result.ok) {
|
|
@@ -61330,9 +62000,9 @@ var init_createtestendpointtestspostop = __esm(() => {
|
|
|
61330
62000
|
|
|
61331
62001
|
// src/funcs/testsCreate.ts
|
|
61332
62002
|
function testsCreate(client$, request, options) {
|
|
61333
|
-
return new APIPromise($
|
|
62003
|
+
return new APIPromise($do41(client$, request, options));
|
|
61334
62004
|
}
|
|
61335
|
-
async function $
|
|
62005
|
+
async function $do41(client$, request, options) {
|
|
61336
62006
|
const parsed$ = safeParse4(request, (value$) => CreateTestEndpointTestsPostRequest$zodSchema.parse(value$), "Input validation failed");
|
|
61337
62007
|
if (!parsed$.ok) {
|
|
61338
62008
|
return [parsed$, { status: "invalid" }];
|
|
@@ -61406,12 +62076,12 @@ var init_testsCreate = __esm(() => {
|
|
|
61406
62076
|
});
|
|
61407
62077
|
|
|
61408
62078
|
// src/mcp-server/tools/testsCreate.ts
|
|
61409
|
-
var
|
|
62079
|
+
var args41, tool$testsCreate;
|
|
61410
62080
|
var init_testsCreate2 = __esm(() => {
|
|
61411
62081
|
init_testsCreate();
|
|
61412
62082
|
init_createtestendpointtestspostop();
|
|
61413
62083
|
init_tools();
|
|
61414
|
-
|
|
62084
|
+
args41 = {
|
|
61415
62085
|
request: CreateTestEndpointTestsPostRequest$zodSchema
|
|
61416
62086
|
};
|
|
61417
62087
|
tool$testsCreate = {
|
|
@@ -61428,7 +62098,7 @@ Requires a Calibrate API key (CALIBRATE_API_KEY).
|
|
|
61428
62098
|
openWorldHint: true,
|
|
61429
62099
|
readOnlyHint: false
|
|
61430
62100
|
},
|
|
61431
|
-
args:
|
|
62101
|
+
args: args41,
|
|
61432
62102
|
tool: async (client, args, ctx) => {
|
|
61433
62103
|
const [result] = await testsCreate(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
61434
62104
|
if (!result.ok) {
|
|
@@ -61481,9 +62151,9 @@ var init_gettestendpointteststestuuidgetop = __esm(() => {
|
|
|
61481
62151
|
|
|
61482
62152
|
// src/funcs/testsGet.ts
|
|
61483
62153
|
function testsGet(client$, request, options) {
|
|
61484
|
-
return new APIPromise($
|
|
62154
|
+
return new APIPromise($do42(client$, request, options));
|
|
61485
62155
|
}
|
|
61486
|
-
async function $
|
|
62156
|
+
async function $do42(client$, request, options) {
|
|
61487
62157
|
const parsed$ = safeParse4(request, (value$) => GetTestEndpointTestsTestUuidGetRequest$zodSchema.parse(value$), "Input validation failed");
|
|
61488
62158
|
if (!parsed$.ok) {
|
|
61489
62159
|
return [parsed$, { status: "invalid" }];
|
|
@@ -61562,12 +62232,12 @@ var init_testsGet = __esm(() => {
|
|
|
61562
62232
|
});
|
|
61563
62233
|
|
|
61564
62234
|
// src/mcp-server/tools/testsGet.ts
|
|
61565
|
-
var
|
|
62235
|
+
var args42, tool$testsGet;
|
|
61566
62236
|
var init_testsGet2 = __esm(() => {
|
|
61567
62237
|
init_testsGet();
|
|
61568
62238
|
init_gettestendpointteststestuuidgetop();
|
|
61569
62239
|
init_tools();
|
|
61570
|
-
|
|
62240
|
+
args42 = {
|
|
61571
62241
|
request: GetTestEndpointTestsTestUuidGetRequest$zodSchema
|
|
61572
62242
|
};
|
|
61573
62243
|
tool$testsGet = {
|
|
@@ -61584,7 +62254,7 @@ exist or belongs to another org.
|
|
|
61584
62254
|
openWorldHint: true,
|
|
61585
62255
|
readOnlyHint: true
|
|
61586
62256
|
},
|
|
61587
|
-
args:
|
|
62257
|
+
args: args42,
|
|
61588
62258
|
tool: async (client, args, ctx) => {
|
|
61589
62259
|
const [result] = await testsGet(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
61590
62260
|
if (!result.ok) {
|
|
@@ -61618,9 +62288,9 @@ var init_listteststestsgetop = __esm(() => {
|
|
|
61618
62288
|
|
|
61619
62289
|
// src/funcs/testsList.ts
|
|
61620
62290
|
function testsList(client$, request, options) {
|
|
61621
|
-
return new APIPromise($
|
|
62291
|
+
return new APIPromise($do43(client$, request, options));
|
|
61622
62292
|
}
|
|
61623
|
-
async function $
|
|
62293
|
+
async function $do43(client$, request, options) {
|
|
61624
62294
|
const parsed$ = safeParse4(request, (value$) => ListTestsTestsGetRequest$zodSchema.optional().parse(value$), "Input validation failed");
|
|
61625
62295
|
if (!parsed$.ok) {
|
|
61626
62296
|
return [parsed$, { status: "invalid" }];
|
|
@@ -61699,12 +62369,12 @@ var init_testsList = __esm(() => {
|
|
|
61699
62369
|
});
|
|
61700
62370
|
|
|
61701
62371
|
// src/mcp-server/tools/testsList.ts
|
|
61702
|
-
var
|
|
62372
|
+
var args43, tool$testsList;
|
|
61703
62373
|
var init_testsList2 = __esm(() => {
|
|
61704
62374
|
init_testsList();
|
|
61705
62375
|
init_listteststestsgetop();
|
|
61706
62376
|
init_tools();
|
|
61707
|
-
|
|
62377
|
+
args43 = {
|
|
61708
62378
|
request: ListTestsTestsGetRequest$zodSchema.optional()
|
|
61709
62379
|
};
|
|
61710
62380
|
tool$testsList = {
|
|
@@ -61721,7 +62391,7 @@ before creating runs.
|
|
|
61721
62391
|
openWorldHint: true,
|
|
61722
62392
|
readOnlyHint: true
|
|
61723
62393
|
},
|
|
61724
|
-
args:
|
|
62394
|
+
args: args43,
|
|
61725
62395
|
tool: async (client, args, ctx) => {
|
|
61726
62396
|
const [result] = await testsList(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
61727
62397
|
if (!result.ok) {
|
|
@@ -61774,9 +62444,9 @@ var init_updatetestendpointteststestuuidputop = __esm(() => {
|
|
|
61774
62444
|
|
|
61775
62445
|
// src/funcs/testsUpdate.ts
|
|
61776
62446
|
function testsUpdate(client$, request, options) {
|
|
61777
|
-
return new APIPromise($
|
|
62447
|
+
return new APIPromise($do44(client$, request, options));
|
|
61778
62448
|
}
|
|
61779
|
-
async function $
|
|
62449
|
+
async function $do44(client$, request, options) {
|
|
61780
62450
|
const parsed$ = safeParse4(request, (value$) => UpdateTestEndpointTestsTestUuidPutRequest$zodSchema.parse(value$), "Input validation failed");
|
|
61781
62451
|
if (!parsed$.ok) {
|
|
61782
62452
|
return [parsed$, { status: "invalid" }];
|
|
@@ -61856,12 +62526,12 @@ var init_testsUpdate = __esm(() => {
|
|
|
61856
62526
|
});
|
|
61857
62527
|
|
|
61858
62528
|
// src/mcp-server/tools/testsUpdate.ts
|
|
61859
|
-
var
|
|
62529
|
+
var args44, tool$testsUpdate;
|
|
61860
62530
|
var init_testsUpdate2 = __esm(() => {
|
|
61861
62531
|
init_testsUpdate();
|
|
61862
62532
|
init_updatetestendpointteststestuuidputop();
|
|
61863
62533
|
init_tools();
|
|
61864
|
-
|
|
62534
|
+
args44 = {
|
|
61865
62535
|
request: UpdateTestEndpointTestsTestUuidPutRequest$zodSchema
|
|
61866
62536
|
};
|
|
61867
62537
|
tool$testsUpdate = {
|
|
@@ -61878,7 +62548,7 @@ fields to change (name, config). Returns the updated test. Fails with
|
|
|
61878
62548
|
openWorldHint: true,
|
|
61879
62549
|
readOnlyHint: false
|
|
61880
62550
|
},
|
|
61881
|
-
args:
|
|
62551
|
+
args: args44,
|
|
61882
62552
|
tool: async (client, args, ctx) => {
|
|
61883
62553
|
const [result] = await testsUpdate(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
61884
62554
|
if (!result.ok) {
|
|
@@ -62002,9 +62672,9 @@ var init_ingesttracetracespostop = __esm(() => {
|
|
|
62002
62672
|
|
|
62003
62673
|
// src/funcs/tracesCreate.ts
|
|
62004
62674
|
function tracesCreate(client$, request, options) {
|
|
62005
|
-
return new APIPromise($
|
|
62675
|
+
return new APIPromise($do45(client$, request, options));
|
|
62006
62676
|
}
|
|
62007
|
-
async function $
|
|
62677
|
+
async function $do45(client$, request, options) {
|
|
62008
62678
|
const parsed$ = safeParse4(request, (value$) => IngestTraceTracesPostRequest$zodSchema.parse(value$), "Input validation failed");
|
|
62009
62679
|
if (!parsed$.ok) {
|
|
62010
62680
|
return [parsed$, { status: "invalid" }];
|
|
@@ -62078,12 +62748,12 @@ var init_tracesCreate = __esm(() => {
|
|
|
62078
62748
|
});
|
|
62079
62749
|
|
|
62080
62750
|
// src/mcp-server/tools/tracesCreate.ts
|
|
62081
|
-
var
|
|
62751
|
+
var args45, tool$tracesCreate;
|
|
62082
62752
|
var init_tracesCreate2 = __esm(() => {
|
|
62083
62753
|
init_tracesCreate();
|
|
62084
62754
|
init_ingesttracetracespostop();
|
|
62085
62755
|
init_tools();
|
|
62086
|
-
|
|
62756
|
+
args45 = {
|
|
62087
62757
|
request: IngestTraceTracesPostRequest$zodSchema
|
|
62088
62758
|
};
|
|
62089
62759
|
tool$tracesCreate = {
|
|
@@ -62102,7 +62772,7 @@ hits its trace limit.
|
|
|
62102
62772
|
openWorldHint: true,
|
|
62103
62773
|
readOnlyHint: false
|
|
62104
62774
|
},
|
|
62105
|
-
args:
|
|
62775
|
+
args: args45,
|
|
62106
62776
|
tool: async (client, args, ctx) => {
|
|
62107
62777
|
const [result] = await tracesCreate(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62108
62778
|
if (!result.ok) {
|
|
@@ -62120,7 +62790,7 @@ hits its trace limit.
|
|
|
62120
62790
|
function createMCPServer(deps) {
|
|
62121
62791
|
const server = new McpServer({
|
|
62122
62792
|
name: "CalibrateMcp",
|
|
62123
|
-
version: "0.0.
|
|
62793
|
+
version: "0.0.80"
|
|
62124
62794
|
});
|
|
62125
62795
|
const getClient = deps.getSDK || (() => new CalibrateMcpCore({
|
|
62126
62796
|
security: deps.security,
|
|
@@ -62166,6 +62836,9 @@ function createMCPServer(deps) {
|
|
|
62166
62836
|
tool(tool$evaluatorsList);
|
|
62167
62837
|
tool(tool$evaluatorsGet);
|
|
62168
62838
|
tool(tool$evaluatorsCreateVersion);
|
|
62839
|
+
tool(tool$datasetsCreate);
|
|
62840
|
+
tool(tool$datasetsGet);
|
|
62841
|
+
tool(tool$datasetsUploadItem);
|
|
62169
62842
|
tool(tool$annotationTasksCreate);
|
|
62170
62843
|
tool(tool$annotationTasksList);
|
|
62171
62844
|
tool(tool$annotationTasksGet);
|
|
@@ -62223,6 +62896,9 @@ var init_server2 = __esm(() => {
|
|
|
62223
62896
|
init_annotatorsCreate2();
|
|
62224
62897
|
init_annotatorsList2();
|
|
62225
62898
|
init_annotatorsUpdate2();
|
|
62899
|
+
init_datasetsCreate2();
|
|
62900
|
+
init_datasetsGet2();
|
|
62901
|
+
init_datasetsUploadItem2();
|
|
62226
62902
|
init_evaluatorsCreate2();
|
|
62227
62903
|
init_evaluatorsCreateVersion2();
|
|
62228
62904
|
init_evaluatorsGet2();
|
|
@@ -62418,6 +63094,25 @@ light rows without this detail.
|
|
|
62418
63094
|
{
|
|
62419
63095
|
name: "create-evaluator-version",
|
|
62420
63096
|
description: `Add a new version to an evaluator you created, optionally making it live. The variable names must match the previous version.
|
|
63097
|
+
`
|
|
63098
|
+
},
|
|
63099
|
+
{
|
|
63100
|
+
name: "create-dataset",
|
|
63101
|
+
description: `Create an empty STT or TTS dataset in the caller's org. The name must
|
|
63102
|
+
be unique in the workspace (409 otherwise). Add items separately.
|
|
63103
|
+
`
|
|
63104
|
+
},
|
|
63105
|
+
{
|
|
63106
|
+
name: "get-dataset",
|
|
63107
|
+
description: `Get one dataset in the caller's org with all of its items, each with
|
|
63108
|
+
a download link for its audio (STT) and its text.
|
|
63109
|
+
`
|
|
63110
|
+
},
|
|
63111
|
+
{
|
|
63112
|
+
name: "upload-dataset-item",
|
|
63113
|
+
description: `Upload one WAV clip (at most 25 MB and 10 minutes) with its
|
|
63114
|
+
ground-truth transcript and append it to an STT dataset in the
|
|
63115
|
+
caller's org.
|
|
62421
63116
|
`
|
|
62422
63117
|
},
|
|
62423
63118
|
{
|
|
@@ -63409,7 +64104,7 @@ http_headers = { "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
|
|
|
63409
64104
|
<h1>Instructions</h1>
|
|
63410
64105
|
<p>One-click installation for Claude Desktop users</p>
|
|
63411
64106
|
<div class="instruction-item">
|
|
63412
|
-
<a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.
|
|
64107
|
+
<a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.80/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
|
|
63413
64108
|
\uD83D\uDCE5 Download MCP Bundle
|
|
63414
64109
|
</a>
|
|
63415
64110
|
</div>
|
|
@@ -66363,7 +67058,7 @@ var routes = buildRouteMap({
|
|
|
66363
67058
|
var app = buildApplication(routes, {
|
|
66364
67059
|
name: "mcp",
|
|
66365
67060
|
versionInfo: {
|
|
66366
|
-
currentVersion: "0.0.
|
|
67061
|
+
currentVersion: "0.0.80"
|
|
66367
67062
|
}
|
|
66368
67063
|
});
|
|
66369
67064
|
run(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -66371,5 +67066,5 @@ export {
|
|
|
66371
67066
|
app
|
|
66372
67067
|
};
|
|
66373
67068
|
|
|
66374
|
-
//# debugId=
|
|
67069
|
+
//# debugId=674E70ECDE1D002264756E2164756E21
|
|
66375
67070
|
//# sourceMappingURL=mcp-server.js.map
|