@dalmia/calibrate-mcp 0.0.80 → 0.0.82

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 CHANGED
@@ -14037,8 +14037,9 @@ var require_on_finished = __commonJS(function(exports, module) {
14037
14037
  }
14038
14038
  function isFinished(msg) {
14039
14039
  var socket = msg.socket;
14040
- if (typeof msg.finished === "boolean") {
14041
- return Boolean(msg.finished || socket && !socket.writable);
14040
+ var finished = writableEnded(msg);
14041
+ if (typeof finished === "boolean") {
14042
+ return Boolean(finished || socket && !socket.writable);
14042
14043
  }
14043
14044
  if (typeof msg.complete === "boolean") {
14044
14045
  return Boolean(msg.upgrade || !socket || !socket.readable || msg.complete && !msg.readable);
@@ -14122,6 +14123,9 @@ var require_on_finished = __commonJS(function(exports, module) {
14122
14123
  }
14123
14124
  return res.runInAsyncScope.bind(res, fn, null);
14124
14125
  }
14126
+ function writableEnded(res) {
14127
+ return typeof res.writableEnded === "boolean" ? res.writableEnded : res.finished;
14128
+ }
14125
14129
  });
14126
14130
 
14127
14131
  // node_modules/type-is/node_modules/content-type/dist/index.js
@@ -24056,56 +24060,6 @@ var require_dist2 = __commonJS(function(exports) {
24056
24060
  }
24057
24061
  });
24058
24062
 
24059
- // node_modules/body-parser/lib/utils.js
24060
- var require_utils = __commonJS(function(exports, module) {
24061
- var bytes = require_bytes();
24062
- var contentType = require_dist2();
24063
- var typeis = require_type_is();
24064
- module.exports = {
24065
- getCharset,
24066
- normalizeOptions,
24067
- passthrough
24068
- };
24069
- function getCharset(req) {
24070
- const header = req.headers["content-type"];
24071
- if (!header)
24072
- return;
24073
- return contentType.parse(header).parameters.charset?.toLowerCase();
24074
- }
24075
- function typeChecker(type) {
24076
- return function checkType(req) {
24077
- return Boolean(typeis(req, type));
24078
- };
24079
- }
24080
- function normalizeOptions(options, defaultType) {
24081
- if (!defaultType) {
24082
- throw new TypeError("defaultType must be provided");
24083
- }
24084
- const inflate = options?.inflate !== false;
24085
- const limit = typeof options?.limit === "undefined" || options?.limit === null ? 102400 : bytes.parse(options.limit);
24086
- const type = options?.type || defaultType;
24087
- const verify = options?.verify || false;
24088
- const defaultCharset = options?.defaultCharset || "utf-8";
24089
- if (limit === null) {
24090
- throw new TypeError(`option limit "${String(options.limit)}" is invalid`);
24091
- }
24092
- if (verify !== false && typeof verify !== "function") {
24093
- throw new TypeError("option verify must be function");
24094
- }
24095
- const shouldParse = typeof type !== "function" ? typeChecker(type) : type;
24096
- return {
24097
- inflate,
24098
- limit,
24099
- verify,
24100
- defaultCharset,
24101
- shouldParse
24102
- };
24103
- }
24104
- function passthrough(value) {
24105
- return value;
24106
- }
24107
- });
24108
-
24109
24063
  // node_modules/body-parser/lib/read.js
24110
24064
  var require_read = __commonJS(function(exports, module) {
24111
24065
  /*!
@@ -24119,8 +24073,9 @@ var require_read = __commonJS(function(exports, module) {
24119
24073
  var onFinished = require_on_finished();
24120
24074
  var zlib = __require("node:zlib");
24121
24075
  var hasBody = require_type_is().hasBody;
24122
- var { getCharset } = require_utils();
24076
+ var contentType = require_dist2();
24123
24077
  module.exports = read;
24078
+ var hasZstandardSupport = "createZstdDecompress" in zlib;
24124
24079
  function read(req, res, next, parse, debug, options) {
24125
24080
  if (onFinished.isFinished(req)) {
24126
24081
  debug("body already parsed");
@@ -24154,26 +24109,40 @@ var require_read = __commonJS(function(exports, module) {
24154
24109
  }
24155
24110
  }
24156
24111
  let length;
24157
- const opts = options;
24158
24112
  let stream;
24159
- const verify = opts.verify;
24160
- try {
24161
- stream = contentstream(req, debug, opts.inflate);
24162
- length = stream.length;
24163
- stream.length = undefined;
24164
- } catch (err) {
24165
- return next(err);
24166
- }
24167
- opts.length = length;
24168
- opts.encoding = verify ? null : encoding;
24169
- if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) {
24113
+ const verify = options.verify;
24114
+ if (verify && encoding !== null && !iconv.encodingExists(encoding)) {
24170
24115
  return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
24171
24116
  charset: encoding.toLowerCase(),
24172
24117
  type: "charset.unsupported"
24173
24118
  }));
24174
24119
  }
24120
+ try {
24121
+ const contentEncoding = (req.headers["content-encoding"] || "identity").toLowerCase();
24122
+ debug('content-encoding "%s"', contentEncoding);
24123
+ if (options.inflate === false && contentEncoding !== "identity") {
24124
+ throw createError(415, "content encoding unsupported", {
24125
+ encoding: contentEncoding,
24126
+ type: "encoding.unsupported"
24127
+ });
24128
+ }
24129
+ if (contentEncoding === "identity") {
24130
+ length = req.headers["content-length"];
24131
+ stream = req;
24132
+ } else {
24133
+ stream = createDecompressionStream(contentEncoding, debug);
24134
+ req.pipe(stream);
24135
+ }
24136
+ } catch (err) {
24137
+ return next(err);
24138
+ }
24139
+ const rawBodyOptions = {
24140
+ length,
24141
+ encoding: verify ? null : encoding,
24142
+ limit: options.limit
24143
+ };
24175
24144
  debug("read body");
24176
- getBody(stream, opts, function(error, body) {
24145
+ getBody(stream, rawBodyOptions, function(error, body) {
24177
24146
  if (error) {
24178
24147
  let _error;
24179
24148
  if (error.type === "encoding.unsupported") {
@@ -24193,6 +24162,12 @@ var require_read = __commonJS(function(exports, module) {
24193
24162
  });
24194
24163
  return;
24195
24164
  }
24165
+ if (stream !== req) {
24166
+ req.unpipe(stream);
24167
+ stream.on("error", () => {});
24168
+ stream.destroy();
24169
+ req.resume();
24170
+ }
24196
24171
  if (verify) {
24197
24172
  try {
24198
24173
  debug("verify body");
@@ -24220,24 +24195,6 @@ var require_read = __commonJS(function(exports, module) {
24220
24195
  next();
24221
24196
  });
24222
24197
  }
24223
- function contentstream(req, debug, inflate) {
24224
- const encoding = (req.headers["content-encoding"] || "identity").toLowerCase();
24225
- const length = req.headers["content-length"];
24226
- debug('content-encoding "%s"', encoding);
24227
- if (inflate === false && encoding !== "identity") {
24228
- throw createError(415, "content encoding unsupported", {
24229
- encoding,
24230
- type: "encoding.unsupported"
24231
- });
24232
- }
24233
- if (encoding === "identity") {
24234
- req.length = length;
24235
- return req;
24236
- }
24237
- const stream = createDecompressionStream(encoding, debug);
24238
- req.pipe(stream);
24239
- return stream;
24240
- }
24241
24198
  function createDecompressionStream(encoding, debug) {
24242
24199
  switch (encoding) {
24243
24200
  case "deflate":
@@ -24249,12 +24206,16 @@ var require_read = __commonJS(function(exports, module) {
24249
24206
  case "br":
24250
24207
  debug("brotli decompress body");
24251
24208
  return zlib.createBrotliDecompress();
24252
- default:
24253
- throw createError(415, 'unsupported content encoding "' + encoding + '"', {
24254
- encoding,
24255
- type: "encoding.unsupported"
24256
- });
24209
+ case "zstd":
24210
+ if (hasZstandardSupport) {
24211
+ debug("zstd decompress body");
24212
+ return zlib.createZstdDecompress();
24213
+ }
24257
24214
  }
24215
+ throw createError(415, 'unsupported content encoding "' + encoding + '"', {
24216
+ encoding,
24217
+ type: "encoding.unsupported"
24218
+ });
24258
24219
  }
24259
24220
  function dump(req, callback) {
24260
24221
  if (onFinished.isFinished(req)) {
@@ -24264,6 +24225,54 @@ var require_read = __commonJS(function(exports, module) {
24264
24225
  req.resume();
24265
24226
  }
24266
24227
  }
24228
+ function getCharset(req) {
24229
+ const header = req.headers["content-type"];
24230
+ if (!header)
24231
+ return;
24232
+ return contentType.parse(header).parameters.charset?.toLowerCase();
24233
+ }
24234
+ });
24235
+
24236
+ // node_modules/body-parser/lib/utils.js
24237
+ var require_utils = __commonJS(function(exports, module) {
24238
+ var bytes = require_bytes();
24239
+ var typeis = require_type_is();
24240
+ module.exports = {
24241
+ normalizeOptions,
24242
+ passthrough
24243
+ };
24244
+ function typeChecker(type) {
24245
+ return function checkType(req) {
24246
+ return Boolean(typeis(req, type));
24247
+ };
24248
+ }
24249
+ function normalizeOptions(options, defaultType) {
24250
+ if (!defaultType) {
24251
+ throw new TypeError("defaultType must be provided");
24252
+ }
24253
+ const inflate = options?.inflate !== false;
24254
+ const limit = typeof options?.limit === "undefined" || options?.limit === null ? 102400 : bytes.parse(options.limit);
24255
+ const type = options?.type || defaultType;
24256
+ const verify = options?.verify || false;
24257
+ const defaultCharset = options?.defaultCharset || "utf-8";
24258
+ if (limit === null) {
24259
+ throw new TypeError(`option limit "${String(options.limit)}" is invalid`);
24260
+ }
24261
+ if (verify !== false && typeof verify !== "function") {
24262
+ throw new TypeError("option verify must be function");
24263
+ }
24264
+ const shouldParse = typeof type !== "function" ? typeChecker(type) : type;
24265
+ return {
24266
+ inflate,
24267
+ limit,
24268
+ verify,
24269
+ defaultCharset,
24270
+ shouldParse
24271
+ };
24272
+ }
24273
+ function passthrough(value) {
24274
+ return value;
24275
+ }
24267
24276
  });
24268
24277
 
24269
24278
  // node_modules/body-parser/lib/types/json.js
@@ -24278,7 +24287,7 @@ var require_json = __commonJS(function(exports, module) {
24278
24287
  var read = require_read();
24279
24288
  var { normalizeOptions } = require_utils();
24280
24289
  module.exports = json;
24281
- var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/;
24290
+ var FIRST_NON_WHITESPACE_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d]|$)/;
24282
24291
  var JSON_SYNTAX_CHAR = "#";
24283
24292
  var JSON_SYNTAX_REGEXP = /#+/g;
24284
24293
  function json(options) {
@@ -24300,10 +24309,12 @@ var require_json = __commonJS(function(exports, module) {
24300
24309
  if (body.length === 0) {
24301
24310
  return {};
24302
24311
  }
24303
- const first = firstchar(body);
24304
- if (first !== "{" && first !== "[") {
24305
- debug("strict violation");
24306
- throw createStrictSyntaxError(body, first);
24312
+ if (body[0] !== "{" && body[0] !== "[") {
24313
+ const first = firstNonWhitespaceChar(body);
24314
+ if (first !== "{" && first !== "[") {
24315
+ debug("strict violation");
24316
+ throw createStrictSyntaxError(body, first);
24317
+ }
24307
24318
  }
24308
24319
  try {
24309
24320
  debug("parse json");
@@ -24349,9 +24360,9 @@ var require_json = __commonJS(function(exports, module) {
24349
24360
  });
24350
24361
  }
24351
24362
  }
24352
- function firstchar(str) {
24353
- const match = FIRST_CHAR_REGEXP.exec(str);
24354
- return match ? match[1] : undefined;
24363
+ function firstNonWhitespaceChar(str) {
24364
+ const match = FIRST_NON_WHITESPACE_REGEXP.exec(str);
24365
+ return match && match[1] ? match[1] : undefined;
24355
24366
  }
24356
24367
  function normalizeJsonSyntaxError(error, obj) {
24357
24368
  const keys = Object.getOwnPropertyNames(error);
@@ -53255,9 +53266,9 @@ var init_config = __esm(() => {
53255
53266
  SDK_METADATA = {
53256
53267
  language: "typescript",
53257
53268
  openapiDocVersion: "0.1.0",
53258
- sdkVersion: "0.0.80",
53269
+ sdkVersion: "0.0.82",
53259
53270
  genVersion: "2.915.1",
53260
- userAgent: "speakeasy-sdk/mcp-typescript 0.0.80 2.915.1 0.1.0 @dalmia/calibrate-mcp"
53271
+ userAgent: "speakeasy-sdk/mcp-typescript 0.0.82 2.915.1 0.1.0 @dalmia/calibrate-mcp"
53261
53272
  };
53262
53273
  });
53263
53274
 
@@ -62790,7 +62801,7 @@ hits its trace limit.
62790
62801
  function createMCPServer(deps) {
62791
62802
  const server = new McpServer({
62792
62803
  name: "CalibrateMcp",
62793
- version: "0.0.80"
62804
+ version: "0.0.82"
62794
62805
  });
62795
62806
  const getClient = deps.getSDK || (() => new CalibrateMcpCore({
62796
62807
  security: deps.security,
@@ -64104,7 +64115,7 @@ http_headers = { "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
64104
64115
  <h1>Instructions</h1>
64105
64116
  <p>One-click installation for Claude Desktop users</p>
64106
64117
  <div class="instruction-item">
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;">
64118
+ <a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.82/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
64108
64119
  \uD83D\uDCE5 Download MCP Bundle
64109
64120
  </a>
64110
64121
  </div>
@@ -67058,7 +67069,7 @@ var routes = buildRouteMap({
67058
67069
  var app = buildApplication(routes, {
67059
67070
  name: "mcp",
67060
67071
  versionInfo: {
67061
- currentVersion: "0.0.80"
67072
+ currentVersion: "0.0.82"
67062
67073
  }
67063
67074
  });
67064
67075
  run(app, process3.argv.slice(2), buildContext(process3));
@@ -67066,5 +67077,5 @@ export {
67066
67077
  app
67067
67078
  };
67068
67079
 
67069
- //# debugId=674E70ECDE1D002264756E2164756E21
67080
+ //# debugId=83C905B3D185A72464756E2164756E21
67070
67081
  //# sourceMappingURL=mcp-server.js.map