@dalmia/calibrate-mcp 0.0.74 → 0.0.76

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
@@ -42267,6 +42267,37 @@ var require_utils4 = __commonJS(function(exports, module) {
42267
42267
  }
42268
42268
  return output.join("");
42269
42269
  }
42270
+ function removeDotSegmentsRelative(path) {
42271
+ if (path === "" || path[0] === "/") {
42272
+ return removeDotSegments(path);
42273
+ }
42274
+ const segments = path.split("/");
42275
+ const last = segments.length - 1;
42276
+ const output = [];
42277
+ let trailingDirectory = false;
42278
+ for (let i = 0;i <= last; i++) {
42279
+ const segment = segments[i];
42280
+ if (segment === "." || segment === "..") {
42281
+ if (segment === "..") {
42282
+ if (output.length !== 0 && output[output.length - 1] !== "..") {
42283
+ output.pop();
42284
+ } else {
42285
+ output.push("..");
42286
+ }
42287
+ }
42288
+ trailingDirectory = i === last;
42289
+ } else {
42290
+ output.push(segment);
42291
+ }
42292
+ }
42293
+ if (trailingDirectory && output[output.length - 1] !== "..") {
42294
+ output.push("");
42295
+ }
42296
+ if (output.length === 0 || output[0] === "" || output[0].includes(":")) {
42297
+ output.unshift(".");
42298
+ }
42299
+ return output.join("/");
42300
+ }
42270
42301
  var IP_HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23" };
42271
42302
  var IP_HOST_DELIM_RE = /[@/?#]/g;
42272
42303
  function encodeHost(host, isIP, allowNonAscii = false) {
@@ -42586,6 +42617,7 @@ var require_utils4 = __commonJS(function(exports, module) {
42586
42617
  encodeFragment,
42587
42618
  escapePreservingEscapes,
42588
42619
  removeDotSegments,
42620
+ removeDotSegmentsRelative,
42589
42621
  isIPv4,
42590
42622
  isUUID,
42591
42623
  normalizeIPv6,
@@ -43021,16 +43053,18 @@ var require_schemes = __commonJS(function(exports, module) {
43021
43053
 
43022
43054
  // node_modules/fast-uri/index.js
43023
43055
  var require_fast_uri = __commonJS(function(exports, module) {
43024
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, encodeHost, isIPv4, nonSimpleDomain } = require_utils4();
43056
+ var { normalizeIPv6, removeDotSegments, removeDotSegmentsRelative, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, encodeHost, isIPv4, nonSimpleDomain } = require_utils4();
43025
43057
  var { SCHEMES, getSchemeHandler } = require_schemes();
43026
43058
  var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
43027
43059
  var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
43028
- function decodeValidScheme(scheme) {
43029
- const decodedScheme = unescape(String(scheme));
43030
- if (!VALID_SCHEME.test(decodedScheme)) {
43060
+ var MALFORMED_HOST_ERROR = "URI host is malformed.";
43061
+ var FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
43062
+ function validateScheme(scheme) {
43063
+ const stringScheme = String(scheme);
43064
+ if (!VALID_SCHEME.test(stringScheme)) {
43031
43065
  throw new TypeError(MALFORMED_SCHEME_ERROR);
43032
43066
  }
43033
- return decodedScheme;
43067
+ return stringScheme;
43034
43068
  }
43035
43069
  function normalize(uri, options) {
43036
43070
  if (typeof uri === "string") {
@@ -43070,6 +43104,9 @@ var require_fast_uri = __commonJS(function(exports, module) {
43070
43104
  throw new Error("HTTP URIs must have a host.");
43071
43105
  }
43072
43106
  const resolvedHostIsIP = resolvedHost !== undefined && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
43107
+ if (hasForbiddenDomainHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP)) {
43108
+ throw new Error(MALFORMED_HOST_ERROR);
43109
+ }
43073
43110
  canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
43074
43111
  const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !/\P{ASCII}/u.test(resolvedHost);
43075
43112
  if (resolved.error && !encodedASCIIHost) {
@@ -43121,14 +43158,15 @@ var require_fast_uri = __commonJS(function(exports, module) {
43121
43158
  if (relative.path[0] === "/") {
43122
43159
  target.path = removeDotSegments(relative.path);
43123
43160
  } else {
43124
- if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
43161
+ const baseHasAuthority = base.userinfo !== undefined || base.host !== undefined || base.port !== undefined;
43162
+ if (baseHasAuthority && !base.path) {
43125
43163
  target.path = "/" + relative.path;
43126
43164
  } else if (!base.path) {
43127
43165
  target.path = relative.path;
43128
43166
  } else {
43129
43167
  target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
43130
43168
  }
43131
- target.path = removeDotSegments(target.path);
43169
+ target.path = base.scheme === undefined && !baseHasAuthority && target.path[0] !== "/" ? removeDotSegmentsRelative(target.path) : removeDotSegments(target.path);
43132
43170
  }
43133
43171
  target.query = relative.query;
43134
43172
  }
@@ -43171,13 +43209,14 @@ var require_fast_uri = __commonJS(function(exports, module) {
43171
43209
  const options = Object.assign({}, opts);
43172
43210
  const uriTokens = [];
43173
43211
  if (component.scheme) {
43174
- component.scheme = decodeValidScheme(component.scheme);
43212
+ component.scheme = validateScheme(component.scheme);
43175
43213
  }
43176
43214
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
43177
43215
  if (schemeHandler && schemeHandler.serialize)
43178
43216
  schemeHandler.serialize(component, options);
43179
43217
  const hasAuthority = component.userinfo !== undefined || component.host !== undefined || component.port !== undefined;
43180
- const pathNoScheme = !options.skipEscape && component.scheme === undefined && !hasAuthority;
43218
+ const schemelessReference = (component.scheme === undefined || options.reference === "suffix") && !hasAuthority;
43219
+ const pathNoScheme = !options.skipEscape && schemelessReference;
43181
43220
  if (component.path !== undefined) {
43182
43221
  if (!options.skipEscape) {
43183
43222
  component.path = serializePathEncoding(component.path, pathNoScheme);
@@ -43186,7 +43225,7 @@ var require_fast_uri = __commonJS(function(exports, module) {
43186
43225
  }
43187
43226
  }
43188
43227
  if (options.reference !== "suffix" && component.scheme) {
43189
- component.scheme = decodeValidScheme(component.scheme);
43228
+ component.scheme = validateScheme(component.scheme);
43190
43229
  uriTokens.push(component.scheme, ":");
43191
43230
  }
43192
43231
  const allowNonAsciiHost = options.unicodeSupport === true || Boolean(schemeHandler && schemeHandler.unicodeSupport);
@@ -43203,9 +43242,9 @@ var require_fast_uri = __commonJS(function(exports, module) {
43203
43242
  if (component.path !== undefined) {
43204
43243
  let s = component.path;
43205
43244
  if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
43206
- s = removeDotSegments(s);
43245
+ s = schemelessReference && s[0] !== "/" ? removeDotSegmentsRelative(s) : removeDotSegments(s);
43207
43246
  }
43208
- if (pathNoScheme) {
43247
+ if (schemelessReference) {
43209
43248
  s = serializePathEncoding(s, true);
43210
43249
  }
43211
43250
  if (authority === undefined && s[0] === "/" && s[1] === "/") {
@@ -43254,16 +43293,32 @@ var require_fast_uri = __commonJS(function(exports, module) {
43254
43293
  }
43255
43294
  function canonicalizeHost(parsed, options, schemeHandler, isIP) {
43256
43295
  const bracketedIPLiteral = parsed.host && parsed.host[0] === "[" && parsed.host[parsed.host.length - 1] === "]";
43296
+ if (hasForbiddenDomainHost(parsed, options, schemeHandler, isIP)) {
43297
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
43298
+ return true;
43299
+ }
43257
43300
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && !bracketedIPLiteral && nonSimpleDomain(parsed.host)) {
43301
+ let url;
43258
43302
  try {
43259
- parsed.host = new URL("http://" + parsed.host).hostname;
43303
+ url = new URL("http://" + parsed.host);
43260
43304
  } catch (e) {
43261
43305
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
43262
43306
  return true;
43263
43307
  }
43308
+ if (!isHostOnlyURL(url)) {
43309
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
43310
+ return true;
43311
+ }
43312
+ parsed.host = url.hostname;
43264
43313
  }
43265
43314
  return false;
43266
43315
  }
43316
+ function hasForbiddenDomainHost(parsed, options, schemeHandler, isIP) {
43317
+ return Boolean(parsed.host && isIP === false && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && FORBIDDEN_DOMAIN_HOST_CHARACTER.test(parsed.host));
43318
+ }
43319
+ function isHostOnlyURL(url) {
43320
+ return url.username === "" && url.password === "" && url.port === "" && url.pathname === "/" && url.search === "" && url.hash === "" && url.hostname !== "";
43321
+ }
43267
43322
  function parseWithStatus(uri, opts) {
43268
43323
  const options = Object.assign({}, opts);
43269
43324
  const parsed = {
@@ -43322,9 +43377,8 @@ var require_fast_uri = __commonJS(function(exports, module) {
43322
43377
  parsed.query = matches[7];
43323
43378
  parsed.fragment = matches[8];
43324
43379
  if (parsed.scheme !== undefined) {
43325
- const decodedScheme = unescape(parsed.scheme);
43326
- if (VALID_SCHEME.test(decodedScheme)) {
43327
- parsed.scheme = decodedScheme.toLowerCase();
43380
+ if (VALID_SCHEME.test(parsed.scheme)) {
43381
+ parsed.scheme = parsed.scheme.toLowerCase();
43328
43382
  } else {
43329
43383
  parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
43330
43384
  malformedScheme = true;
@@ -43355,7 +43409,7 @@ var require_fast_uri = __commonJS(function(exports, module) {
43355
43409
  parsed.ipv6Zone = parsed.host.slice(parsed.host.indexOf("%") + 1);
43356
43410
  }
43357
43411
  if (malformedIPLiteral) {
43358
- parsed.error = parsed.error || "URI host is malformed.";
43412
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
43359
43413
  malformedAuthorityOrPort = true;
43360
43414
  }
43361
43415
  } else {
@@ -53150,9 +53204,9 @@ var init_config = __esm(() => {
53150
53204
  SDK_METADATA = {
53151
53205
  language: "typescript",
53152
53206
  openapiDocVersion: "0.1.0",
53153
- sdkVersion: "0.0.74",
53207
+ sdkVersion: "0.0.76",
53154
53208
  genVersion: "2.915.1",
53155
- userAgent: "speakeasy-sdk/mcp-typescript 0.0.74 2.915.1 0.1.0 @dalmia/calibrate-mcp"
53209
+ userAgent: "speakeasy-sdk/mcp-typescript 0.0.76 2.915.1 0.1.0 @dalmia/calibrate-mcp"
53156
53210
  };
53157
53211
  });
53158
53212
 
@@ -62066,7 +62120,7 @@ hits its trace limit.
62066
62120
  function createMCPServer(deps) {
62067
62121
  const server = new McpServer({
62068
62122
  name: "CalibrateMcp",
62069
- version: "0.0.74"
62123
+ version: "0.0.76"
62070
62124
  });
62071
62125
  const getClient = deps.getSDK || (() => new CalibrateMcpCore({
62072
62126
  security: deps.security,
@@ -63355,7 +63409,7 @@ http_headers = { "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
63355
63409
  <h1>Instructions</h1>
63356
63410
  <p>One-click installation for Claude Desktop users</p>
63357
63411
  <div class="instruction-item">
63358
- <a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.74/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
63412
+ <a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.76/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
63359
63413
  \uD83D\uDCE5 Download MCP Bundle
63360
63414
  </a>
63361
63415
  </div>
@@ -66309,7 +66363,7 @@ var routes = buildRouteMap({
66309
66363
  var app = buildApplication(routes, {
66310
66364
  name: "mcp",
66311
66365
  versionInfo: {
66312
- currentVersion: "0.0.74"
66366
+ currentVersion: "0.0.76"
66313
66367
  }
66314
66368
  });
66315
66369
  run(app, process3.argv.slice(2), buildContext(process3));
@@ -66317,5 +66371,5 @@ export {
66317
66371
  app
66318
66372
  };
66319
66373
 
66320
- //# debugId=DFA97E9C37B6A5E164756E2164756E21
66374
+ //# debugId=73F7993285C36B2764756E2164756E21
66321
66375
  //# sourceMappingURL=mcp-server.js.map