@dalmia/calibrate-mcp 0.0.72 → 0.0.74

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
@@ -25865,6 +25865,17 @@ var require_utils2 = __commonJS(function(exports, module) {
25865
25865
  var setMaxIndex = function setMaxIndex(obj, maxIndex) {
25866
25866
  overflowChannel.set(obj, maxIndex);
25867
25867
  };
25868
+ var conflictChannel = getSideChannel();
25869
+ var markConflict = function markConflict(obj, maxIndex) {
25870
+ conflictChannel.set(obj, maxIndex);
25871
+ return obj;
25872
+ };
25873
+ var isConflict = function isConflict(obj) {
25874
+ return conflictChannel.has(obj);
25875
+ };
25876
+ var getConflictIndex = function getConflictIndex(obj) {
25877
+ return conflictChannel.get(obj);
25878
+ };
25868
25879
  var hexTable = function() {
25869
25880
  var array = [];
25870
25881
  for (var i = 0;i < 256; ++i) {
@@ -25908,6 +25919,27 @@ var require_utils2 = __commonJS(function(exports, module) {
25908
25919
  obj[key] = value;
25909
25920
  }
25910
25921
  };
25922
+ var maxNumericIndex = function maxNumericIndex(obj, min) {
25923
+ var max = min;
25924
+ var keys = Object.keys(obj);
25925
+ for (var i = 0;i < keys.length; ++i) {
25926
+ var num = parseInt(keys[i], 10);
25927
+ if (String(num) === keys[i] && num > max) {
25928
+ max = num;
25929
+ }
25930
+ }
25931
+ return max;
25932
+ };
25933
+ var limitedPair = function limitedPair(first, second, options) {
25934
+ var pair = [first, second];
25935
+ if (options && typeof options.arrayLimit === "number" && pair.length > options.arrayLimit) {
25936
+ if (options.throwOnLimitExceeded) {
25937
+ throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
25938
+ }
25939
+ return markOverflow(arrayToObject(pair, options), 1);
25940
+ }
25941
+ return pair;
25942
+ };
25911
25943
  var merge = function merge(target, source, options) {
25912
25944
  if (!source) {
25913
25945
  return target;
@@ -25927,13 +25959,21 @@ var require_utils2 = __commonJS(function(exports, module) {
25927
25959
  var newIndex = getMaxIndex(target) + 1;
25928
25960
  target[newIndex] = source;
25929
25961
  setMaxIndex(target, newIndex);
25962
+ } else if (options && options.strictMerge && isConflict(target)) {
25963
+ var nextConflict = getConflictIndex(target) + 1;
25964
+ if (options.throwOnLimitExceeded && typeof options.arrayLimit === "number" && nextConflict >= options.arrayLimit) {
25965
+ throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
25966
+ }
25967
+ target[nextConflict] = source;
25968
+ markConflict(target, nextConflict);
25930
25969
  } else if (options && options.strictMerge) {
25931
- return [target, source];
25970
+ var conflict = limitedPair(target, source, options);
25971
+ return isArray(conflict) ? markConflict(conflict, 1) : conflict;
25932
25972
  } else if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
25933
25973
  target[source] = true;
25934
25974
  }
25935
25975
  } else {
25936
- return [target, source];
25976
+ return limitedPair(target, source, options);
25937
25977
  }
25938
25978
  return target;
25939
25979
  }
@@ -25959,6 +25999,9 @@ var require_utils2 = __commonJS(function(exports, module) {
25959
25999
  var mergeTarget = target;
25960
26000
  if (isArray(target) && !isArray(source)) {
25961
26001
  mergeTarget = arrayToObject(target, options);
26002
+ if (isConflict(target)) {
26003
+ markConflict(mergeTarget, target.length - 1);
26004
+ }
25962
26005
  }
25963
26006
  if (isArray(target) && isArray(source)) {
25964
26007
  source.forEach(function(item, i) {
@@ -25989,7 +26032,7 @@ var require_utils2 = __commonJS(function(exports, module) {
25989
26032
  setProperty(acc, key, value);
25990
26033
  }
25991
26034
  if (isOverflow(source) && !isOverflow(acc)) {
25992
- markOverflow(acc, getMaxIndex(source));
26035
+ markOverflow(acc, maxNumericIndex(acc, getMaxIndex(source)));
25993
26036
  }
25994
26037
  if (isOverflow(acc)) {
25995
26038
  var keyNum = parseInt(key, 10);
@@ -25997,6 +26040,12 @@ var require_utils2 = __commonJS(function(exports, module) {
25997
26040
  setMaxIndex(acc, keyNum);
25998
26041
  }
25999
26042
  }
26043
+ if (isConflict(acc)) {
26044
+ var conflictKey = parseInt(key, 10);
26045
+ if (String(conflictKey) === key && conflictKey > getConflictIndex(acc)) {
26046
+ markConflict(acc, conflictKey);
26047
+ }
26048
+ }
26000
26049
  return acc;
26001
26050
  }, mergeTarget);
26002
26051
  };
@@ -26007,6 +26056,9 @@ var require_utils2 = __commonJS(function(exports, module) {
26007
26056
  }, target);
26008
26057
  };
26009
26058
  var decode = function(str, defaultDecoder, charset) {
26059
+ if (typeof str === "string" && str.indexOf("%") === -1) {
26060
+ return str.indexOf("+") === -1 ? str : str.replace(/\+/g, " ");
26061
+ }
26010
26062
  var strWithoutPlus = str.replace(/\+/g, " ");
26011
26063
  if (charset === "iso-8859-1") {
26012
26064
  return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
@@ -26017,6 +26069,52 @@ var require_utils2 = __commonJS(function(exports, module) {
26017
26069
  return strWithoutPlus;
26018
26070
  }
26019
26071
  };
26072
+ var hasToPrimitive = typeof Symbol === "function" && typeof Symbol.toPrimitive === "symbol";
26073
+ var arrayJoin = Array.prototype.join;
26074
+ var arrayToString = Array.prototype.toString;
26075
+ var objectToString = Object.prototype.toString;
26076
+ var toCoercible = function toCoercible(value, joining) {
26077
+ if (!value || typeof value !== "object" && typeof value !== "function") {
26078
+ return value;
26079
+ }
26080
+ if (hasToPrimitive && value[Symbol.toPrimitive] != null) {
26081
+ return value;
26082
+ }
26083
+ if (isArray(value) && value.toString === arrayToString && value.join === arrayJoin) {
26084
+ var ancestors = joining || getSideChannel();
26085
+ if (ancestors.has(value)) {
26086
+ return "";
26087
+ }
26088
+ ancestors.set(value, true);
26089
+ var copy;
26090
+ for (var i = 0;i < value.length; i += 1) {
26091
+ var item = value[i];
26092
+ var coerced = toCoercible(item, ancestors);
26093
+ if (!copy && coerced !== item) {
26094
+ copy = [];
26095
+ for (var j = 0;j < i; j += 1) {
26096
+ copy[j] = value[j];
26097
+ }
26098
+ }
26099
+ if (copy) {
26100
+ copy[i] = coerced;
26101
+ }
26102
+ }
26103
+ ancestors["delete"](value);
26104
+ return copy || value;
26105
+ }
26106
+ if (typeof value.toString === "function") {
26107
+ return value;
26108
+ }
26109
+ var valueOf = value.valueOf;
26110
+ if (typeof valueOf === "function") {
26111
+ var primitive = valueOf.call(value);
26112
+ if (!primitive || typeof primitive !== "object" && typeof primitive !== "function") {
26113
+ return String(primitive);
26114
+ }
26115
+ }
26116
+ return objectToString.call(value);
26117
+ };
26020
26118
  var limit = 1024;
26021
26119
  var encode = function encode(str, defaultEncoder, charset, kind, format) {
26022
26120
  if (str.length === 0) {
@@ -26026,12 +26124,12 @@ var require_utils2 = __commonJS(function(exports, module) {
26026
26124
  if (typeof str === "symbol") {
26027
26125
  string = Symbol.prototype.toString.call(str);
26028
26126
  } else if (typeof str !== "string") {
26029
- string = String(str);
26127
+ string = String(toCoercible(str));
26030
26128
  }
26031
26129
  if (charset === "iso-8859-1") {
26032
26130
  return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
26033
26131
  return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
26034
- });
26132
+ }).replace(/\+/g, "%2B");
26035
26133
  }
26036
26134
  var out = "";
26037
26135
  for (var j = 0;j < string.length; j += limit) {
@@ -26143,7 +26241,8 @@ var require_utils2 = __commonJS(function(exports, module) {
26143
26241
  isRegExp,
26144
26242
  markOverflow,
26145
26243
  maybeMap,
26146
- merge
26244
+ merge,
26245
+ toCoercible
26147
26246
  };
26148
26247
  });
26149
26248
 
@@ -26254,17 +26353,17 @@ var require_stringify = __commonJS(function(exports, module) {
26254
26353
  if (generateArrayPrefix === "comma" && isArray(obj)) {
26255
26354
  if (encodeValuesOnly && encoder) {
26256
26355
  obj = utils.maybeMap(obj, function(v) {
26257
- return v == null ? v : encoder(v);
26356
+ return v == null ? v : encoder(v, defaults.encoder, charset, "value", format);
26258
26357
  });
26259
26358
  }
26260
- objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : undefined }];
26359
+ objKeys = [{ value: obj.length > 0 ? utils.toCoercible(obj).join(",") || null : undefined }];
26261
26360
  } else if (isArray(filter)) {
26262
26361
  objKeys = filter;
26263
26362
  } else {
26264
26363
  var keys = Object.keys(obj);
26265
26364
  objKeys = sort ? keys.sort(sort) : keys;
26266
26365
  }
26267
- var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix);
26366
+ var encodedPrefix = String(prefix);
26268
26367
  var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
26269
26368
  if (allowEmptyArrays && isArray(obj) && obj.length === 0 && Object.keys(obj).length === 0) {
26270
26369
  return adjustedPrefix + "[]";
@@ -26314,7 +26413,7 @@ var require_stringify = __commonJS(function(exports, module) {
26314
26413
  filter = opts.filter;
26315
26414
  }
26316
26415
  var arrayFormat;
26317
- if (opts.arrayFormat in arrayPrefixGenerators) {
26416
+ if (has.call(arrayPrefixGenerators, opts.arrayFormat)) {
26318
26417
  arrayFormat = opts.arrayFormat;
26319
26418
  } else if ("indices" in opts) {
26320
26419
  arrayFormat = opts.indices ? "indices" : "repeat";
@@ -26400,9 +26499,53 @@ var require_stringify = __commonJS(function(exports, module) {
26400
26499
 
26401
26500
  // node_modules/qs/lib/parse.js
26402
26501
  var require_parse = __commonJS(function(exports, module) {
26502
+ var getSideChannel = require_side_channel();
26403
26503
  var utils = require_utils2();
26404
26504
  var has = Object.prototype.hasOwnProperty;
26405
26505
  var isArray = Array.isArray;
26506
+ var getPrototypeOf = Object.getPrototypeOf;
26507
+ var isPlainContainer = function isPlainContainer(value) {
26508
+ if (!value || typeof value !== "object") {
26509
+ return false;
26510
+ }
26511
+ if (isArray(value)) {
26512
+ return true;
26513
+ }
26514
+ var proto = getPrototypeOf(value);
26515
+ return proto === Object.prototype || proto === null;
26516
+ };
26517
+ var emptyCopyOf = function emptyCopyOf(value) {
26518
+ if (isArray(value)) {
26519
+ var arr = [];
26520
+ arr.length = value.length;
26521
+ return arr;
26522
+ }
26523
+ return getPrototypeOf(value) === null ? { __proto__: null } : {};
26524
+ };
26525
+ var copyInput = function copyInput(input) {
26526
+ var copies = getSideChannel();
26527
+ var result = {};
26528
+ var queue = [{ source: input, target: result }];
26529
+ for (var i = 0;i < queue.length; ++i) {
26530
+ var source = queue[i].source;
26531
+ var target = queue[i].target;
26532
+ var keys = Object.keys(source);
26533
+ for (var j = 0;j < keys.length; ++j) {
26534
+ var value = source[keys[j]];
26535
+ if (isPlainContainer(value)) {
26536
+ if (!copies.has(value)) {
26537
+ var copy = emptyCopyOf(value);
26538
+ copies.set(value, copy);
26539
+ queue[queue.length] = { source: value, target: copy };
26540
+ }
26541
+ target[keys[j]] = copies.get(value);
26542
+ } else {
26543
+ target[keys[j]] = value;
26544
+ }
26545
+ }
26546
+ }
26547
+ return result;
26548
+ };
26406
26549
  var defaults = {
26407
26550
  allowDots: false,
26408
26551
  allowEmptyArrays: false,
@@ -26486,6 +26629,7 @@ var require_parse = __commonJS(function(exports, module) {
26486
26629
  var part = parts[i];
26487
26630
  var bracketEqualsPos = part.indexOf("]=");
26488
26631
  var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
26632
+ var isEmptyBracketKey = pos > 1 && part.slice(pos - 2, pos) === "[]";
26489
26633
  var key;
26490
26634
  var val;
26491
26635
  if (pos === -1) {
@@ -26502,7 +26646,7 @@ var require_parse = __commonJS(function(exports, module) {
26502
26646
  if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
26503
26647
  val = interpretNumericEntities(String(val));
26504
26648
  }
26505
- if (part.indexOf("[]=") > -1) {
26649
+ if (isEmptyBracketKey) {
26506
26650
  val = isArray(val) ? [val] : val;
26507
26651
  }
26508
26652
  if (options.comma && isArray(val) && val.length > options.arrayLimit) {
@@ -26510,7 +26654,7 @@ var require_parse = __commonJS(function(exports, module) {
26510
26654
  }
26511
26655
  if (key !== null) {
26512
26656
  var existing = has.call(obj, key);
26513
- if (existing && (options.duplicates === "combine" || part.indexOf("[]=") > -1)) {
26657
+ if (existing && (options.duplicates === "combine" || isEmptyBracketKey)) {
26514
26658
  obj[key] = utils.combine(obj[key], val, options.arrayLimit, options.plainObjects, options.throwOnLimitExceeded);
26515
26659
  } else if (!existing || options.duplicates === "last") {
26516
26660
  obj[key] = val;
@@ -26559,8 +26703,35 @@ var require_parse = __commonJS(function(exports, module) {
26559
26703
  }
26560
26704
  return leaf;
26561
26705
  };
26706
+ var topLevelDotsToBrackets = function topLevelDotsToBrackets(key) {
26707
+ var result = "";
26708
+ var depth = 0;
26709
+ for (var i = 0;i < key.length; i += 1) {
26710
+ var cu = key.charCodeAt(i);
26711
+ if (cu === 91) {
26712
+ depth += 1;
26713
+ result += "[";
26714
+ } else if (cu === 93) {
26715
+ if (depth > 0) {
26716
+ depth -= 1;
26717
+ }
26718
+ result += "]";
26719
+ } else if (cu === 46 && depth === 0 && i + 1 < key.length && key.charCodeAt(i + 1) !== 46 && key.charCodeAt(i + 1) !== 91) {
26720
+ var start = i + 1;
26721
+ var j = start;
26722
+ while (j < key.length && key.charCodeAt(j) !== 46 && key.charCodeAt(j) !== 91) {
26723
+ j += 1;
26724
+ }
26725
+ result += "[" + key.slice(start, j) + "]";
26726
+ i = j - 1;
26727
+ } else {
26728
+ result += key.charAt(i);
26729
+ }
26730
+ }
26731
+ return result;
26732
+ };
26562
26733
  var splitKeyIntoSegments = function splitKeyIntoSegments(originalKey, options) {
26563
- var key = options.allowDots ? originalKey.replace(/\.([^.[]+)/g, "[$1]") : originalKey;
26734
+ var key = options.allowDots ? topLevelDotsToBrackets(originalKey) : originalKey;
26564
26735
  if (options.depth <= 0) {
26565
26736
  if (!options.plainObjects && has.call(Object.prototype, key)) {
26566
26737
  if (!options.allowPrototypes) {
@@ -26685,7 +26856,7 @@ var require_parse = __commonJS(function(exports, module) {
26685
26856
  if (str === "" || str === null || typeof str === "undefined") {
26686
26857
  return options.plainObjects ? { __proto__: null } : {};
26687
26858
  }
26688
- var tempObj = typeof str === "string" ? parseValues(str, options) : str;
26859
+ var tempObj = typeof str === "string" ? parseValues(str, options) : copyInput(str);
26689
26860
  var obj = options.plainObjects ? { __proto__: null } : {};
26690
26861
  var keys = Object.keys(tempObj);
26691
26862
  for (var i = 0;i < keys.length; ++i) {
@@ -52979,9 +53150,9 @@ var init_config = __esm(() => {
52979
53150
  SDK_METADATA = {
52980
53151
  language: "typescript",
52981
53152
  openapiDocVersion: "0.1.0",
52982
- sdkVersion: "0.0.72",
53153
+ sdkVersion: "0.0.74",
52983
53154
  genVersion: "2.915.1",
52984
- userAgent: "speakeasy-sdk/mcp-typescript 0.0.72 2.915.1 0.1.0 @dalmia/calibrate-mcp"
53155
+ userAgent: "speakeasy-sdk/mcp-typescript 0.0.74 2.915.1 0.1.0 @dalmia/calibrate-mcp"
52985
53156
  };
52986
53157
  });
52987
53158
 
@@ -61734,7 +61905,7 @@ var init_traceingest = __esm(() => {
61734
61905
  ]).describe("What the agent was given for this turn. For a `general` agent, the standalone prompt as a string. For a `conversation` agent, the history up to the reported output, oldest turn first, in OpenAI chat format");
61735
61906
  TraceIngest$zodSchema = object({
61736
61907
  agent_id: string2().describe("ID of the agent that produced the turn. Must be an agent in your workspace"),
61737
- conversation_id: string2().nullable().optional().describe("Your own ID for the conversation this turn belongs to, stored for reference only. Omit if you have none"),
61908
+ conversation_id: string2().nullable().optional().describe("Your own ID for the conversation this turn belongs to. Turns sharing it are grouped into one conversation. Omit if you have none"),
61738
61909
  input: union([
61739
61910
  string2(),
61740
61911
  array(TraceTurn$zodSchema)
@@ -61895,7 +62066,7 @@ hits its trace limit.
61895
62066
  function createMCPServer(deps) {
61896
62067
  const server = new McpServer({
61897
62068
  name: "CalibrateMcp",
61898
- version: "0.0.72"
62069
+ version: "0.0.74"
61899
62070
  });
61900
62071
  const getClient = deps.getSDK || (() => new CalibrateMcpCore({
61901
62072
  security: deps.security,
@@ -63184,7 +63355,7 @@ http_headers = { "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
63184
63355
  <h1>Instructions</h1>
63185
63356
  <p>One-click installation for Claude Desktop users</p>
63186
63357
  <div class="instruction-item">
63187
- <a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.72/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
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;">
63188
63359
  \uD83D\uDCE5 Download MCP Bundle
63189
63360
  </a>
63190
63361
  </div>
@@ -66138,7 +66309,7 @@ var routes = buildRouteMap({
66138
66309
  var app = buildApplication(routes, {
66139
66310
  name: "mcp",
66140
66311
  versionInfo: {
66141
- currentVersion: "0.0.72"
66312
+ currentVersion: "0.0.74"
66142
66313
  }
66143
66314
  });
66144
66315
  run(app, process3.argv.slice(2), buildContext(process3));
@@ -66146,5 +66317,5 @@ export {
66146
66317
  app
66147
66318
  };
66148
66319
 
66149
- //# debugId=C5C9C299891D123864756E2164756E21
66320
+ //# debugId=DFA97E9C37B6A5E164756E2164756E21
66150
66321
  //# sourceMappingURL=mcp-server.js.map