@wemake.cx/sequential-thinking 0.2.13 → 0.4.0

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/dist/index.js CHANGED
@@ -27,7 +27,7 @@ var __export = (target, all) => {
27
27
  });
28
28
  };
29
29
 
30
- // ../../node_modules/.bun/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js
30
+ // ../../node_modules/uri-js/dist/es5/uri.all.js
31
31
  var require_uri_all = __commonJS((exports, module) => {
32
32
  (function(global, factory) {
33
33
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global.URI = global.URI || {});
@@ -197,10 +197,10 @@ var require_uri_all = __commonJS((exports, module) => {
197
197
  }
198
198
  return output;
199
199
  }
200
- var ucs2encode = function ucs2encode(array) {
200
+ var ucs2encode = function ucs2encode2(array) {
201
201
  return String.fromCodePoint.apply(String, toConsumableArray(array));
202
202
  };
203
- var basicToDigit = function basicToDigit(codePoint) {
203
+ var basicToDigit = function basicToDigit2(codePoint) {
204
204
  if (codePoint - 48 < 10) {
205
205
  return codePoint - 22;
206
206
  }
@@ -212,10 +212,10 @@ var require_uri_all = __commonJS((exports, module) => {
212
212
  }
213
213
  return base;
214
214
  };
215
- var digitToBasic = function digitToBasic(digit, flag) {
215
+ var digitToBasic = function digitToBasic2(digit, flag) {
216
216
  return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
217
217
  };
218
- var adapt = function adapt(delta, numPoints, firstTime) {
218
+ var adapt = function adapt2(delta, numPoints, firstTime) {
219
219
  var k = 0;
220
220
  delta = firstTime ? floor(delta / damp) : delta >> 1;
221
221
  delta += floor(delta / numPoints);
@@ -224,7 +224,7 @@ var require_uri_all = __commonJS((exports, module) => {
224
224
  }
225
225
  return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
226
226
  };
227
- var decode = function decode(input) {
227
+ var decode = function decode2(input) {
228
228
  var output = [];
229
229
  var inputLength = input.length;
230
230
  var i = 0;
@@ -272,7 +272,7 @@ var require_uri_all = __commonJS((exports, module) => {
272
272
  }
273
273
  return String.fromCodePoint.apply(String, output);
274
274
  };
275
- var encode = function encode(input) {
275
+ var encode = function encode2(input) {
276
276
  var output = [];
277
277
  input = ucs2decode(input);
278
278
  var inputLength = input.length;
@@ -386,12 +386,12 @@ var require_uri_all = __commonJS((exports, module) => {
386
386
  }
387
387
  return output.join("");
388
388
  };
389
- var toUnicode = function toUnicode(input) {
389
+ var toUnicode = function toUnicode2(input) {
390
390
  return mapDomain(input, function(string) {
391
391
  return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
392
392
  });
393
393
  };
394
- var toASCII = function toASCII(input) {
394
+ var toASCII = function toASCII2(input) {
395
395
  return mapDomain(input, function(string) {
396
396
  return regexNonASCII.test(string) ? "xn--" + encode(string) : string;
397
397
  });
@@ -788,13 +788,13 @@ var require_uri_all = __commonJS((exports, module) => {
788
788
  var handler = {
789
789
  scheme: "http",
790
790
  domainHost: true,
791
- parse: function parse(components, options) {
791
+ parse: function parse2(components, options) {
792
792
  if (!components.host) {
793
793
  components.error = components.error || "HTTP URIs must have a host.";
794
794
  }
795
795
  return components;
796
796
  },
797
- serialize: function serialize(components, options) {
797
+ serialize: function serialize2(components, options) {
798
798
  var secure = String(components.scheme).toLowerCase() === "https";
799
799
  if (components.port === (secure ? 443 : 80) || components.port === "") {
800
800
  components.port = undefined;
@@ -817,7 +817,7 @@ var require_uri_all = __commonJS((exports, module) => {
817
817
  var handler$2 = {
818
818
  scheme: "ws",
819
819
  domainHost: true,
820
- parse: function parse(components, options) {
820
+ parse: function parse2(components, options) {
821
821
  var wsComponents = components;
822
822
  wsComponents.secure = isSecure(wsComponents);
823
823
  wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
@@ -825,7 +825,7 @@ var require_uri_all = __commonJS((exports, module) => {
825
825
  wsComponents.query = undefined;
826
826
  return wsComponents;
827
827
  },
828
- serialize: function serialize(wsComponents, options) {
828
+ serialize: function serialize2(wsComponents, options) {
829
829
  if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
830
830
  wsComponents.port = undefined;
831
831
  }
@@ -993,7 +993,7 @@ var require_uri_all = __commonJS((exports, module) => {
993
993
  var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
994
994
  var handler$6 = {
995
995
  scheme: "urn:uuid",
996
- parse: function parse(urnComponents, options) {
996
+ parse: function parse2(urnComponents, options) {
997
997
  var uuidComponents = urnComponents;
998
998
  uuidComponents.uuid = uuidComponents.nss;
999
999
  uuidComponents.nss = undefined;
@@ -1002,7 +1002,7 @@ var require_uri_all = __commonJS((exports, module) => {
1002
1002
  }
1003
1003
  return uuidComponents;
1004
1004
  },
1005
- serialize: function serialize(uuidComponents, options) {
1005
+ serialize: function serialize2(uuidComponents, options) {
1006
1006
  var urnComponents = uuidComponents;
1007
1007
  urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
1008
1008
  return urnComponents;
@@ -1031,7 +1031,7 @@ var require_uri_all = __commonJS((exports, module) => {
1031
1031
  });
1032
1032
  });
1033
1033
 
1034
- // ../../node_modules/.bun/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
1034
+ // ../../node_modules/fast-deep-equal/index.js
1035
1035
  var require_fast_deep_equal = __commonJS((exports, module) => {
1036
1036
  module.exports = function equal(a, b) {
1037
1037
  if (a === b)
@@ -1073,7 +1073,7 @@ var require_fast_deep_equal = __commonJS((exports, module) => {
1073
1073
  };
1074
1074
  });
1075
1075
 
1076
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/ucs2length.js
1076
+ // ../../node_modules/ajv/lib/compile/ucs2length.js
1077
1077
  var require_ucs2length = __commonJS((exports, module) => {
1078
1078
  module.exports = function ucs2length(str) {
1079
1079
  var length = 0, len = str.length, pos = 0, value;
@@ -1090,7 +1090,7 @@ var require_ucs2length = __commonJS((exports, module) => {
1090
1090
  };
1091
1091
  });
1092
1092
 
1093
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/util.js
1093
+ // ../../node_modules/ajv/lib/compile/util.js
1094
1094
  var require_util = __commonJS((exports, module) => {
1095
1095
  module.exports = {
1096
1096
  copy,
@@ -1293,7 +1293,7 @@ var require_util = __commonJS((exports, module) => {
1293
1293
  }
1294
1294
  });
1295
1295
 
1296
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/schema_obj.js
1296
+ // ../../node_modules/ajv/lib/compile/schema_obj.js
1297
1297
  var require_schema_obj = __commonJS((exports, module) => {
1298
1298
  var util3 = require_util();
1299
1299
  module.exports = SchemaObject;
@@ -1302,7 +1302,7 @@ var require_schema_obj = __commonJS((exports, module) => {
1302
1302
  }
1303
1303
  });
1304
1304
 
1305
- // ../../node_modules/.bun/json-schema-traverse@0.4.1/node_modules/json-schema-traverse/index.js
1305
+ // ../../node_modules/json-schema-traverse/index.js
1306
1306
  var require_json_schema_traverse = __commonJS((exports, module) => {
1307
1307
  var traverse = module.exports = function(schema, opts, cb) {
1308
1308
  if (typeof opts == "function") {
@@ -1381,7 +1381,7 @@ var require_json_schema_traverse = __commonJS((exports, module) => {
1381
1381
  }
1382
1382
  });
1383
1383
 
1384
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/resolve.js
1384
+ // ../../node_modules/ajv/lib/compile/resolve.js
1385
1385
  var require_resolve = __commonJS((exports, module) => {
1386
1386
  var URI = require_uri_all();
1387
1387
  var equal = require_fast_deep_equal();
@@ -1622,7 +1622,7 @@ var require_resolve = __commonJS((exports, module) => {
1622
1622
  }
1623
1623
  });
1624
1624
 
1625
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/error_classes.js
1625
+ // ../../node_modules/ajv/lib/compile/error_classes.js
1626
1626
  var require_error_classes = __commonJS((exports, module) => {
1627
1627
  var resolve = require_resolve();
1628
1628
  module.exports = {
@@ -1649,7 +1649,7 @@ var require_error_classes = __commonJS((exports, module) => {
1649
1649
  }
1650
1650
  });
1651
1651
 
1652
- // ../../node_modules/.bun/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js
1652
+ // ../../node_modules/fast-json-stable-stringify/index.js
1653
1653
  var require_fast_json_stable_stringify = __commonJS((exports, module) => {
1654
1654
  module.exports = function(data, opts) {
1655
1655
  if (!opts)
@@ -1712,7 +1712,7 @@ var require_fast_json_stable_stringify = __commonJS((exports, module) => {
1712
1712
  };
1713
1713
  });
1714
1714
 
1715
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/validate.js
1715
+ // ../../node_modules/ajv/lib/dotjs/validate.js
1716
1716
  var require_validate = __commonJS((exports, module) => {
1717
1717
  module.exports = function generate_validate(it, $keyword, $ruleType) {
1718
1718
  var out = "";
@@ -2180,7 +2180,7 @@ var require_validate = __commonJS((exports, module) => {
2180
2180
  };
2181
2181
  });
2182
2182
 
2183
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/index.js
2183
+ // ../../node_modules/ajv/lib/compile/index.js
2184
2184
  var require_compile = __commonJS((exports, module) => {
2185
2185
  var resolve = require_resolve();
2186
2186
  var util3 = require_util();
@@ -2446,9 +2446,9 @@ var require_compile = __commonJS((exports, module) => {
2446
2446
  }
2447
2447
  });
2448
2448
 
2449
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/cache.js
2449
+ // ../../node_modules/ajv/lib/cache.js
2450
2450
  var require_cache = __commonJS((exports, module) => {
2451
- var Cache = module.exports = function Cache() {
2451
+ var Cache = module.exports = function Cache2() {
2452
2452
  this._cache = {};
2453
2453
  };
2454
2454
  Cache.prototype.put = function Cache_put(key, value) {
@@ -2465,7 +2465,7 @@ var require_cache = __commonJS((exports, module) => {
2465
2465
  };
2466
2466
  });
2467
2467
 
2468
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/formats.js
2468
+ // ../../node_modules/ajv/lib/compile/formats.js
2469
2469
  var require_formats = __commonJS((exports, module) => {
2470
2470
  var util3 = require_util();
2471
2471
  var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
@@ -2565,7 +2565,7 @@ var require_formats = __commonJS((exports, module) => {
2565
2565
  }
2566
2566
  });
2567
2567
 
2568
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/ref.js
2568
+ // ../../node_modules/ajv/lib/dotjs/ref.js
2569
2569
  var require_ref = __commonJS((exports, module) => {
2570
2570
  module.exports = function generate_ref(it, $keyword, $ruleType) {
2571
2571
  var out = " ";
@@ -2691,7 +2691,7 @@ var require_ref = __commonJS((exports, module) => {
2691
2691
  };
2692
2692
  });
2693
2693
 
2694
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/allOf.js
2694
+ // ../../node_modules/ajv/lib/dotjs/allOf.js
2695
2695
  var require_allOf = __commonJS((exports, module) => {
2696
2696
  module.exports = function generate_allOf(it, $keyword, $ruleType) {
2697
2697
  var out = " ";
@@ -2734,7 +2734,7 @@ var require_allOf = __commonJS((exports, module) => {
2734
2734
  };
2735
2735
  });
2736
2736
 
2737
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/anyOf.js
2737
+ // ../../node_modules/ajv/lib/dotjs/anyOf.js
2738
2738
  var require_anyOf = __commonJS((exports, module) => {
2739
2739
  module.exports = function generate_anyOf(it, $keyword, $ruleType) {
2740
2740
  var out = " ";
@@ -2808,7 +2808,7 @@ var require_anyOf = __commonJS((exports, module) => {
2808
2808
  };
2809
2809
  });
2810
2810
 
2811
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/comment.js
2811
+ // ../../node_modules/ajv/lib/dotjs/comment.js
2812
2812
  var require_comment = __commonJS((exports, module) => {
2813
2813
  module.exports = function generate_comment(it, $keyword, $ruleType) {
2814
2814
  var out = " ";
@@ -2825,7 +2825,7 @@ var require_comment = __commonJS((exports, module) => {
2825
2825
  };
2826
2826
  });
2827
2827
 
2828
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/const.js
2828
+ // ../../node_modules/ajv/lib/dotjs/const.js
2829
2829
  var require_const = __commonJS((exports, module) => {
2830
2830
  module.exports = function generate_const(it, $keyword, $ruleType) {
2831
2831
  var out = " ";
@@ -2882,7 +2882,7 @@ var require_const = __commonJS((exports, module) => {
2882
2882
  };
2883
2883
  });
2884
2884
 
2885
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/contains.js
2885
+ // ../../node_modules/ajv/lib/dotjs/contains.js
2886
2886
  var require_contains = __commonJS((exports, module) => {
2887
2887
  module.exports = function generate_contains(it, $keyword, $ruleType) {
2888
2888
  var out = " ";
@@ -2961,7 +2961,7 @@ var require_contains = __commonJS((exports, module) => {
2961
2961
  };
2962
2962
  });
2963
2963
 
2964
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/dependencies.js
2964
+ // ../../node_modules/ajv/lib/dotjs/dependencies.js
2965
2965
  var require_dependencies = __commonJS((exports, module) => {
2966
2966
  module.exports = function generate_dependencies(it, $keyword, $ruleType) {
2967
2967
  var out = " ";
@@ -3124,7 +3124,7 @@ var require_dependencies = __commonJS((exports, module) => {
3124
3124
  };
3125
3125
  });
3126
3126
 
3127
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/enum.js
3127
+ // ../../node_modules/ajv/lib/dotjs/enum.js
3128
3128
  var require_enum = __commonJS((exports, module) => {
3129
3129
  module.exports = function generate_enum(it, $keyword, $ruleType) {
3130
3130
  var out = " ";
@@ -3190,7 +3190,7 @@ var require_enum = __commonJS((exports, module) => {
3190
3190
  };
3191
3191
  });
3192
3192
 
3193
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/format.js
3193
+ // ../../node_modules/ajv/lib/dotjs/format.js
3194
3194
  var require_format = __commonJS((exports, module) => {
3195
3195
  module.exports = function generate_format(it, $keyword, $ruleType) {
3196
3196
  var out = " ";
@@ -3340,7 +3340,7 @@ var require_format = __commonJS((exports, module) => {
3340
3340
  };
3341
3341
  });
3342
3342
 
3343
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/if.js
3343
+ // ../../node_modules/ajv/lib/dotjs/if.js
3344
3344
  var require_if = __commonJS((exports, module) => {
3345
3345
  module.exports = function generate_if(it, $keyword, $ruleType) {
3346
3346
  var out = " ";
@@ -3441,7 +3441,7 @@ var require_if = __commonJS((exports, module) => {
3441
3441
  };
3442
3442
  });
3443
3443
 
3444
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/items.js
3444
+ // ../../node_modules/ajv/lib/dotjs/items.js
3445
3445
  var require_items = __commonJS((exports, module) => {
3446
3446
  module.exports = function generate_items(it, $keyword, $ruleType) {
3447
3447
  var out = " ";
@@ -3579,7 +3579,7 @@ var require_items = __commonJS((exports, module) => {
3579
3579
  };
3580
3580
  });
3581
3581
 
3582
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limit.js
3582
+ // ../../node_modules/ajv/lib/dotjs/_limit.js
3583
3583
  var require__limit = __commonJS((exports, module) => {
3584
3584
  module.exports = function generate__limit(it, $keyword, $ruleType) {
3585
3585
  var out = " ";
@@ -3731,7 +3731,7 @@ var require__limit = __commonJS((exports, module) => {
3731
3731
  };
3732
3732
  });
3733
3733
 
3734
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitItems.js
3734
+ // ../../node_modules/ajv/lib/dotjs/_limitItems.js
3735
3735
  var require__limitItems = __commonJS((exports, module) => {
3736
3736
  module.exports = function generate__limitItems(it, $keyword, $ruleType) {
3737
3737
  var out = " ";
@@ -3812,7 +3812,7 @@ var require__limitItems = __commonJS((exports, module) => {
3812
3812
  };
3813
3813
  });
3814
3814
 
3815
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitLength.js
3815
+ // ../../node_modules/ajv/lib/dotjs/_limitLength.js
3816
3816
  var require__limitLength = __commonJS((exports, module) => {
3817
3817
  module.exports = function generate__limitLength(it, $keyword, $ruleType) {
3818
3818
  var out = " ";
@@ -3898,7 +3898,7 @@ var require__limitLength = __commonJS((exports, module) => {
3898
3898
  };
3899
3899
  });
3900
3900
 
3901
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitProperties.js
3901
+ // ../../node_modules/ajv/lib/dotjs/_limitProperties.js
3902
3902
  var require__limitProperties = __commonJS((exports, module) => {
3903
3903
  module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
3904
3904
  var out = " ";
@@ -3979,7 +3979,7 @@ var require__limitProperties = __commonJS((exports, module) => {
3979
3979
  };
3980
3980
  });
3981
3981
 
3982
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/multipleOf.js
3982
+ // ../../node_modules/ajv/lib/dotjs/multipleOf.js
3983
3983
  var require_multipleOf = __commonJS((exports, module) => {
3984
3984
  module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
3985
3985
  var out = " ";
@@ -4060,7 +4060,7 @@ var require_multipleOf = __commonJS((exports, module) => {
4060
4060
  };
4061
4061
  });
4062
4062
 
4063
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/not.js
4063
+ // ../../node_modules/ajv/lib/dotjs/not.js
4064
4064
  var require_not = __commonJS((exports, module) => {
4065
4065
  module.exports = function generate_not(it, $keyword, $ruleType) {
4066
4066
  var out = " ";
@@ -4147,7 +4147,7 @@ var require_not = __commonJS((exports, module) => {
4147
4147
  };
4148
4148
  });
4149
4149
 
4150
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/oneOf.js
4150
+ // ../../node_modules/ajv/lib/dotjs/oneOf.js
4151
4151
  var require_oneOf = __commonJS((exports, module) => {
4152
4152
  module.exports = function generate_oneOf(it, $keyword, $ruleType) {
4153
4153
  var out = " ";
@@ -4219,7 +4219,7 @@ var require_oneOf = __commonJS((exports, module) => {
4219
4219
  };
4220
4220
  });
4221
4221
 
4222
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/pattern.js
4222
+ // ../../node_modules/ajv/lib/dotjs/pattern.js
4223
4223
  var require_pattern = __commonJS((exports, module) => {
4224
4224
  module.exports = function generate_pattern(it, $keyword, $ruleType) {
4225
4225
  var out = " ";
@@ -4295,7 +4295,7 @@ var require_pattern = __commonJS((exports, module) => {
4295
4295
  };
4296
4296
  });
4297
4297
 
4298
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/properties.js
4298
+ // ../../node_modules/ajv/lib/dotjs/properties.js
4299
4299
  var require_properties = __commonJS((exports, module) => {
4300
4300
  module.exports = function generate_properties(it, $keyword, $ruleType) {
4301
4301
  var out = " ";
@@ -4608,7 +4608,7 @@ var require_properties = __commonJS((exports, module) => {
4608
4608
  };
4609
4609
  });
4610
4610
 
4611
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/propertyNames.js
4611
+ // ../../node_modules/ajv/lib/dotjs/propertyNames.js
4612
4612
  var require_propertyNames = __commonJS((exports, module) => {
4613
4613
  module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
4614
4614
  var out = " ";
@@ -4683,7 +4683,7 @@ var require_propertyNames = __commonJS((exports, module) => {
4683
4683
  };
4684
4684
  });
4685
4685
 
4686
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/required.js
4686
+ // ../../node_modules/ajv/lib/dotjs/required.js
4687
4687
  var require_required = __commonJS((exports, module) => {
4688
4688
  module.exports = function generate_required(it, $keyword, $ruleType) {
4689
4689
  var out = " ";
@@ -4940,7 +4940,7 @@ var require_required = __commonJS((exports, module) => {
4940
4940
  };
4941
4941
  });
4942
4942
 
4943
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/uniqueItems.js
4943
+ // ../../node_modules/ajv/lib/dotjs/uniqueItems.js
4944
4944
  var require_uniqueItems = __commonJS((exports, module) => {
4945
4945
  module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
4946
4946
  var out = " ";
@@ -5026,7 +5026,7 @@ var require_uniqueItems = __commonJS((exports, module) => {
5026
5026
  };
5027
5027
  });
5028
5028
 
5029
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/index.js
5029
+ // ../../node_modules/ajv/lib/dotjs/index.js
5030
5030
  var require_dotjs = __commonJS((exports, module) => {
5031
5031
  module.exports = {
5032
5032
  $ref: require_ref(),
@@ -5060,7 +5060,7 @@ var require_dotjs = __commonJS((exports, module) => {
5060
5060
  };
5061
5061
  });
5062
5062
 
5063
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/rules.js
5063
+ // ../../node_modules/ajv/lib/compile/rules.js
5064
5064
  var require_rules = __commonJS((exports, module) => {
5065
5065
  var ruleModules = require_dotjs();
5066
5066
  var toHash = require_util().toHash;
@@ -5152,7 +5152,7 @@ var require_rules = __commonJS((exports, module) => {
5152
5152
  };
5153
5153
  });
5154
5154
 
5155
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/data.js
5155
+ // ../../node_modules/ajv/lib/data.js
5156
5156
  var require_data = __commonJS((exports, module) => {
5157
5157
  var KEYWORDS = [
5158
5158
  "multipleOf",
@@ -5200,7 +5200,7 @@ var require_data = __commonJS((exports, module) => {
5200
5200
  };
5201
5201
  });
5202
5202
 
5203
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/async.js
5203
+ // ../../node_modules/ajv/lib/compile/async.js
5204
5204
  var require_async = __commonJS((exports, module) => {
5205
5205
  var MissingRefError = require_error_classes().MissingRef;
5206
5206
  module.exports = compileAsync;
@@ -5264,7 +5264,7 @@ var require_async = __commonJS((exports, module) => {
5264
5264
  }
5265
5265
  });
5266
5266
 
5267
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/custom.js
5267
+ // ../../node_modules/ajv/lib/dotjs/custom.js
5268
5268
  var require_custom = __commonJS((exports, module) => {
5269
5269
  module.exports = function generate_custom(it, $keyword, $ruleType) {
5270
5270
  var out = " ";
@@ -5487,7 +5487,7 @@ var require_custom = __commonJS((exports, module) => {
5487
5487
  };
5488
5488
  });
5489
5489
 
5490
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/refs/json-schema-draft-07.json
5490
+ // ../../node_modules/ajv/lib/refs/json-schema-draft-07.json
5491
5491
  var require_json_schema_draft_07 = __commonJS((exports, module) => {
5492
5492
  module.exports = {
5493
5493
  $schema: "http://json-schema.org/draft-07/schema#",
@@ -5659,7 +5659,7 @@ var require_json_schema_draft_07 = __commonJS((exports, module) => {
5659
5659
  };
5660
5660
  });
5661
5661
 
5662
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/definition_schema.js
5662
+ // ../../node_modules/ajv/lib/definition_schema.js
5663
5663
  var require_definition_schema = __commonJS((exports, module) => {
5664
5664
  var metaSchema = require_json_schema_draft_07();
5665
5665
  module.exports = {
@@ -5697,7 +5697,7 @@ var require_definition_schema = __commonJS((exports, module) => {
5697
5697
  };
5698
5698
  });
5699
5699
 
5700
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/keyword.js
5700
+ // ../../node_modules/ajv/lib/keyword.js
5701
5701
  var require_keyword = __commonJS((exports, module) => {
5702
5702
  var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
5703
5703
  var customRuleCode = require_custom();
@@ -5795,7 +5795,7 @@ var require_keyword = __commonJS((exports, module) => {
5795
5795
  }
5796
5796
  });
5797
5797
 
5798
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/refs/data.json
5798
+ // ../../node_modules/ajv/lib/refs/data.json
5799
5799
  var require_data2 = __commonJS((exports, module) => {
5800
5800
  module.exports = {
5801
5801
  $schema: "http://json-schema.org/draft-07/schema#",
@@ -5816,7 +5816,7 @@ var require_data2 = __commonJS((exports, module) => {
5816
5816
  };
5817
5817
  });
5818
5818
 
5819
- // ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/ajv.js
5819
+ // ../../node_modules/ajv/lib/ajv.js
5820
5820
  var require_ajv = __commonJS((exports, module) => {
5821
5821
  var compileSchema = require_compile();
5822
5822
  var resolve = require_resolve();
@@ -6194,7 +6194,10 @@ var require_ajv = __commonJS((exports, module) => {
6194
6194
  function noop() {}
6195
6195
  });
6196
6196
 
6197
- // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
6197
+ // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
6198
+ import process2 from "process";
6199
+
6200
+ // ../../node_modules/zod/v3/external.js
6198
6201
  var exports_external = {};
6199
6202
  __export(exports_external, {
6200
6203
  void: () => voidType,
@@ -6306,7 +6309,7 @@ __export(exports_external, {
6306
6309
  BRAND: () => BRAND
6307
6310
  });
6308
6311
 
6309
- // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
6312
+ // ../../node_modules/zod/v3/helpers/util.js
6310
6313
  var util;
6311
6314
  (function(util2) {
6312
6315
  util2.assertEqual = (_) => {};
@@ -6437,7 +6440,7 @@ var getParsedType = (data) => {
6437
6440
  }
6438
6441
  };
6439
6442
 
6440
- // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
6443
+ // ../../node_modules/zod/v3/ZodError.js
6441
6444
  var ZodIssueCode = util.arrayToEnum([
6442
6445
  "invalid_type",
6443
6446
  "invalid_literal",
@@ -6556,7 +6559,7 @@ ZodError.create = (issues) => {
6556
6559
  return error;
6557
6560
  };
6558
6561
 
6559
- // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
6562
+ // ../../node_modules/zod/v3/locales/en.js
6560
6563
  var errorMap = (issue, _ctx) => {
6561
6564
  let message;
6562
6565
  switch (issue.code) {
@@ -6659,7 +6662,7 @@ var errorMap = (issue, _ctx) => {
6659
6662
  };
6660
6663
  var en_default = errorMap;
6661
6664
 
6662
- // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
6665
+ // ../../node_modules/zod/v3/errors.js
6663
6666
  var overrideErrorMap = en_default;
6664
6667
  function setErrorMap(map) {
6665
6668
  overrideErrorMap = map;
@@ -6667,7 +6670,7 @@ function setErrorMap(map) {
6667
6670
  function getErrorMap() {
6668
6671
  return overrideErrorMap;
6669
6672
  }
6670
- // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
6673
+ // ../../node_modules/zod/v3/helpers/parseUtil.js
6671
6674
  var makeIssue = (params) => {
6672
6675
  const { data, path, errorMaps, issueData } = params;
6673
6676
  const fullPath = [...path, ...issueData.path || []];
@@ -6773,14 +6776,14 @@ var isAborted = (x) => x.status === "aborted";
6773
6776
  var isDirty = (x) => x.status === "dirty";
6774
6777
  var isValid = (x) => x.status === "valid";
6775
6778
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
6776
- // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
6779
+ // ../../node_modules/zod/v3/helpers/errorUtil.js
6777
6780
  var errorUtil;
6778
6781
  (function(errorUtil2) {
6779
6782
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
6780
6783
  errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
6781
6784
  })(errorUtil || (errorUtil = {}));
6782
6785
 
6783
- // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
6786
+ // ../../node_modules/zod/v3/types.js
6784
6787
  class ParseInputLazyPath {
6785
6788
  constructor(parent, value, path, key) {
6786
6789
  this._cachedPath = [];
@@ -10167,7 +10170,7 @@ var coerce = {
10167
10170
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
10168
10171
  };
10169
10172
  var NEVER = INVALID;
10170
- // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
10173
+ // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
10171
10174
  var LATEST_PROTOCOL_VERSION = "2025-06-18";
10172
10175
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-03-26", "2024-11-05", "2024-10-07"];
10173
10176
  var JSONRPC_VERSION = "2.0";
@@ -10688,7 +10691,98 @@ class McpError extends Error {
10688
10691
  }
10689
10692
  }
10690
10693
 
10691
- // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
10694
+ // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
10695
+ class ReadBuffer {
10696
+ append(chunk) {
10697
+ this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
10698
+ }
10699
+ readMessage() {
10700
+ if (!this._buffer) {
10701
+ return null;
10702
+ }
10703
+ const index = this._buffer.indexOf(`
10704
+ `);
10705
+ if (index === -1) {
10706
+ return null;
10707
+ }
10708
+ const line = this._buffer.toString("utf8", 0, index).replace(/\r$/, "");
10709
+ this._buffer = this._buffer.subarray(index + 1);
10710
+ return deserializeMessage(line);
10711
+ }
10712
+ clear() {
10713
+ this._buffer = undefined;
10714
+ }
10715
+ }
10716
+ function deserializeMessage(line) {
10717
+ return JSONRPCMessageSchema.parse(JSON.parse(line));
10718
+ }
10719
+ function serializeMessage(message) {
10720
+ return JSON.stringify(message) + `
10721
+ `;
10722
+ }
10723
+
10724
+ // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
10725
+ class StdioServerTransport {
10726
+ constructor(_stdin = process2.stdin, _stdout = process2.stdout) {
10727
+ this._stdin = _stdin;
10728
+ this._stdout = _stdout;
10729
+ this._readBuffer = new ReadBuffer;
10730
+ this._started = false;
10731
+ this._ondata = (chunk) => {
10732
+ this._readBuffer.append(chunk);
10733
+ this.processReadBuffer();
10734
+ };
10735
+ this._onerror = (error) => {
10736
+ var _a;
10737
+ (_a = this.onerror) === null || _a === undefined || _a.call(this, error);
10738
+ };
10739
+ }
10740
+ async start() {
10741
+ if (this._started) {
10742
+ throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");
10743
+ }
10744
+ this._started = true;
10745
+ this._stdin.on("data", this._ondata);
10746
+ this._stdin.on("error", this._onerror);
10747
+ }
10748
+ processReadBuffer() {
10749
+ var _a, _b;
10750
+ while (true) {
10751
+ try {
10752
+ const message = this._readBuffer.readMessage();
10753
+ if (message === null) {
10754
+ break;
10755
+ }
10756
+ (_a = this.onmessage) === null || _a === undefined || _a.call(this, message);
10757
+ } catch (error) {
10758
+ (_b = this.onerror) === null || _b === undefined || _b.call(this, error);
10759
+ }
10760
+ }
10761
+ }
10762
+ async close() {
10763
+ var _a;
10764
+ this._stdin.off("data", this._ondata);
10765
+ this._stdin.off("error", this._onerror);
10766
+ const remainingDataListeners = this._stdin.listenerCount("data");
10767
+ if (remainingDataListeners === 0) {
10768
+ this._stdin.pause();
10769
+ }
10770
+ this._readBuffer.clear();
10771
+ (_a = this.onclose) === null || _a === undefined || _a.call(this);
10772
+ }
10773
+ send(message) {
10774
+ return new Promise((resolve) => {
10775
+ const json = serializeMessage(message);
10776
+ if (this._stdout.write(json)) {
10777
+ resolve();
10778
+ } else {
10779
+ this._stdout.once("drain", resolve);
10780
+ }
10781
+ });
10782
+ }
10783
+ }
10784
+
10785
+ // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
10692
10786
  var DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;
10693
10787
 
10694
10788
  class Protocol {
@@ -11031,7 +11125,7 @@ function mergeCapabilities(base, additional) {
11031
11125
  }, { ...base });
11032
11126
  }
11033
11127
 
11034
- // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
11128
+ // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
11035
11129
  var import_ajv = __toESM(require_ajv(), 1);
11036
11130
 
11037
11131
  class Server extends Protocol {
@@ -11233,101 +11327,112 @@ class Server extends Protocol {
11233
11327
  }
11234
11328
  }
11235
11329
 
11236
- // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
11237
- import process2 from "process";
11330
+ // src/mcp/tools.ts
11331
+ var SEQUENTIAL_THINKING_TOOL = {
11332
+ name: "sequentialthinking",
11333
+ description: `A detailed tool for dynamic and reflective problem-solving through thoughts.
11334
+ This tool helps analyze problems through a flexible thinking process that can adapt and evolve.
11335
+ Each thought can build on, question, or revise previous insights as understanding deepens.
11238
11336
 
11239
- // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
11240
- class ReadBuffer {
11241
- append(chunk) {
11242
- this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
11243
- }
11244
- readMessage() {
11245
- if (!this._buffer) {
11246
- return null;
11247
- }
11248
- const index = this._buffer.indexOf(`
11249
- `);
11250
- if (index === -1) {
11251
- return null;
11252
- }
11253
- const line = this._buffer.toString("utf8", 0, index).replace(/\r$/, "");
11254
- this._buffer = this._buffer.subarray(index + 1);
11255
- return deserializeMessage(line);
11256
- }
11257
- clear() {
11258
- this._buffer = undefined;
11259
- }
11260
- }
11261
- function deserializeMessage(line) {
11262
- return JSONRPCMessageSchema.parse(JSON.parse(line));
11263
- }
11264
- function serializeMessage(message) {
11265
- return JSON.stringify(message) + `
11266
- `;
11267
- }
11337
+ When to use this tool:
11338
+ - Breaking down complex problems into steps
11339
+ - Planning and design with room for revision
11340
+ - Analysis that might need course correction
11341
+ - Problems where the full scope might not be clear initially
11342
+ - Problems that require a multi-step solution
11343
+ - Tasks that need to maintain context over multiple steps
11344
+ - Situations where irrelevant information needs to be filtered out
11268
11345
 
11269
- // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
11270
- class StdioServerTransport {
11271
- constructor(_stdin = process2.stdin, _stdout = process2.stdout) {
11272
- this._stdin = _stdin;
11273
- this._stdout = _stdout;
11274
- this._readBuffer = new ReadBuffer;
11275
- this._started = false;
11276
- this._ondata = (chunk) => {
11277
- this._readBuffer.append(chunk);
11278
- this.processReadBuffer();
11279
- };
11280
- this._onerror = (error) => {
11281
- var _a;
11282
- (_a = this.onerror) === null || _a === undefined || _a.call(this, error);
11283
- };
11284
- }
11285
- async start() {
11286
- if (this._started) {
11287
- throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");
11288
- }
11289
- this._started = true;
11290
- this._stdin.on("data", this._ondata);
11291
- this._stdin.on("error", this._onerror);
11292
- }
11293
- processReadBuffer() {
11294
- var _a, _b;
11295
- while (true) {
11296
- try {
11297
- const message = this._readBuffer.readMessage();
11298
- if (message === null) {
11299
- break;
11300
- }
11301
- (_a = this.onmessage) === null || _a === undefined || _a.call(this, message);
11302
- } catch (error) {
11303
- (_b = this.onerror) === null || _b === undefined || _b.call(this, error);
11304
- }
11305
- }
11306
- }
11307
- async close() {
11308
- var _a;
11309
- this._stdin.off("data", this._ondata);
11310
- this._stdin.off("error", this._onerror);
11311
- const remainingDataListeners = this._stdin.listenerCount("data");
11312
- if (remainingDataListeners === 0) {
11313
- this._stdin.pause();
11314
- }
11315
- this._readBuffer.clear();
11316
- (_a = this.onclose) === null || _a === undefined || _a.call(this);
11317
- }
11318
- send(message) {
11319
- return new Promise((resolve) => {
11320
- const json = serializeMessage(message);
11321
- if (this._stdout.write(json)) {
11322
- resolve();
11323
- } else {
11324
- this._stdout.once("drain", resolve);
11346
+ Key features:
11347
+ - You can adjust total_thoughts up or down as you progress
11348
+ - You can question or revise previous thoughts
11349
+ - You can add more thoughts even after reaching what seemed like the end
11350
+ - You can express uncertainty and explore alternative approaches
11351
+ - Not every thought needs to build linearly - you can branch or backtrack
11352
+ - Generates a solution hypothesis
11353
+ - Verifies the hypothesis based on the Chain of Thought steps
11354
+ - Repeats the process until satisfied
11355
+ - Provides a correct answer
11356
+
11357
+ Parameters explained:
11358
+ - thought: Your current thinking step, which can include:
11359
+ * Regular analytical steps
11360
+ * Revisions of previous thoughts
11361
+ * Questions about previous decisions
11362
+ * Realizations about needing more analysis
11363
+ * Changes in approach
11364
+ * Hypothesis generation
11365
+ * Hypothesis verification
11366
+ - next_thought_needed: True if you need more thinking, even if at what seemed like the end
11367
+ - thought_number: Current number in sequence (can go beyond initial total if needed)
11368
+ - total_thoughts: Current estimate of thoughts needed (can be adjusted up/down)
11369
+ - is_revision: A boolean indicating if this thought revises previous thinking
11370
+ - revises_thought: If is_revision is true, which thought number is being reconsidered
11371
+ - branch_from_thought: If branching, which thought number is the branching point
11372
+ - branch_id: Identifier for the current branch (if any)
11373
+ - needs_more_thoughts: If reaching end but realizing more thoughts needed
11374
+
11375
+ You should:
11376
+ 1. Start with an initial estimate of needed thoughts, but be ready to adjust
11377
+ 2. Feel free to question or revise previous thoughts
11378
+ 3. Don't hesitate to add more thoughts if needed, even at the "end"
11379
+ 4. Express uncertainty when present
11380
+ 5. Mark thoughts that revise previous thinking or branch into new paths
11381
+ 6. Ignore information that is irrelevant to the current step
11382
+ 7. Generate a solution hypothesis when appropriate
11383
+ 8. Verify the hypothesis based on the Chain of Thought steps
11384
+ 9. Repeat the process until satisfied with the solution
11385
+ 10. Provide a single, ideally correct answer as the final output
11386
+ 11. Only set next_thought_needed to false when truly done and a satisfactory answer is reached`,
11387
+ inputSchema: {
11388
+ type: "object",
11389
+ properties: {
11390
+ thought: {
11391
+ type: "string",
11392
+ description: "Your current thinking step"
11393
+ },
11394
+ nextThoughtNeeded: {
11395
+ type: "boolean",
11396
+ description: "Whether another thought step is needed"
11397
+ },
11398
+ thoughtNumber: {
11399
+ type: "integer",
11400
+ description: "Current thought number (numeric value, e.g., 1, 2, 3)",
11401
+ minimum: 1
11402
+ },
11403
+ totalThoughts: {
11404
+ type: "integer",
11405
+ description: "Estimated total thoughts needed (numeric value, e.g., 5, 10)",
11406
+ minimum: 1
11407
+ },
11408
+ isRevision: {
11409
+ type: "boolean",
11410
+ description: "Whether this revises previous thinking"
11411
+ },
11412
+ revisesThought: {
11413
+ type: "integer",
11414
+ description: "Which thought is being reconsidered",
11415
+ minimum: 1
11416
+ },
11417
+ branchFromThought: {
11418
+ type: "integer",
11419
+ description: "Branching point thought number",
11420
+ minimum: 1
11421
+ },
11422
+ branchId: {
11423
+ type: "string",
11424
+ description: "Branch identifier"
11425
+ },
11426
+ needsMoreThoughts: {
11427
+ type: "boolean",
11428
+ description: "If more thoughts are needed"
11325
11429
  }
11326
- });
11430
+ },
11431
+ required: ["thought", "nextThoughtNeeded", "thoughtNumber", "totalThoughts"]
11327
11432
  }
11328
- }
11433
+ };
11329
11434
 
11330
- // ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
11435
+ // ../../node_modules/chalk/source/vendor/ansi-styles/index.js
11331
11436
  var ANSI_BACKGROUND_OFFSET = 10;
11332
11437
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
11333
11438
  var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -11504,7 +11609,7 @@ function assembleStyles() {
11504
11609
  var ansiStyles = assembleStyles();
11505
11610
  var ansi_styles_default = ansiStyles;
11506
11611
 
11507
- // ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
11612
+ // ../../node_modules/chalk/source/vendor/supports-color/index.js
11508
11613
  import process3 from "process";
11509
11614
  import os from "os";
11510
11615
  import tty from "tty";
@@ -11636,7 +11741,7 @@ var supportsColor = {
11636
11741
  };
11637
11742
  var supports_color_default = supportsColor;
11638
11743
 
11639
- // ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/utilities.js
11744
+ // ../../node_modules/chalk/source/utilities.js
11640
11745
  function stringReplaceAll(string, substring, replacer) {
11641
11746
  let index = string.indexOf(substring);
11642
11747
  if (index === -1) {
@@ -11669,7 +11774,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
11669
11774
  return returnValue;
11670
11775
  }
11671
11776
 
11672
- // ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/index.js
11777
+ // ../../node_modules/chalk/source/index.js
11673
11778
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
11674
11779
  var GENERATOR = Symbol("GENERATOR");
11675
11780
  var STYLER = Symbol("STYLER");
@@ -11816,8 +11921,43 @@ var chalk = createChalk();
11816
11921
  var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
11817
11922
  var source_default = chalk;
11818
11923
 
11819
- // src/index.ts
11820
- class SequentialThinkingServer {
11924
+ // src/core/formatter.ts
11925
+ function stripAnsi(str) {
11926
+ return str.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "");
11927
+ }
11928
+ function formatThought(thoughtData) {
11929
+ const { thoughtNumber, totalThoughts, thought, isRevision, revisesThought, branchFromThought, branchId } = thoughtData;
11930
+ let prefix = "";
11931
+ let context = "";
11932
+ if (isRevision) {
11933
+ prefix = source_default.yellow("\uD83D\uDD04 Revision");
11934
+ context = ` (revising thought ${revisesThought})`;
11935
+ } else if (branchFromThought) {
11936
+ prefix = source_default.green("\uD83C\uDF3F Branch");
11937
+ context = ` (from thought ${branchFromThought}, ID: ${branchId})`;
11938
+ } else {
11939
+ prefix = source_default.blue("\uD83D\uDCAD Thought");
11940
+ context = "";
11941
+ }
11942
+ const header = `${prefix} ${thoughtNumber}/${totalThoughts}${context}`;
11943
+ const headerLength = stripAnsi(header).length;
11944
+ const thoughtLines = thought.split(`
11945
+ `);
11946
+ const maxLineLength = Math.max(...thoughtLines.map((line) => line.length));
11947
+ const contentWidth = Math.max(headerLength, maxLineLength);
11948
+ const border = "\u2500".repeat(contentWidth + 2);
11949
+ const formattedLines = thoughtLines.map((line) => `\u2502 ${line.padEnd(contentWidth)} \u2502`).join(`
11950
+ `);
11951
+ return `
11952
+ \u250C${border}\u2510
11953
+ \u2502 ${header}${" ".repeat(contentWidth - headerLength)} \u2502
11954
+ \u251C${border}\u2524
11955
+ ${formattedLines}
11956
+ \u2514${border}\u2518`;
11957
+ }
11958
+
11959
+ // src/core/tracker.ts
11960
+ class SequentialThinkingTracker {
11821
11961
  thoughtHistory = [];
11822
11962
  branches = {};
11823
11963
  disableThoughtLogging;
@@ -11825,15 +11965,18 @@ class SequentialThinkingServer {
11825
11965
  this.disableThoughtLogging = (process.env.DISABLE_THOUGHT_LOGGING || "").toLowerCase() === "true";
11826
11966
  }
11827
11967
  validateThoughtData(input) {
11968
+ if (!input || typeof input !== "object") {
11969
+ throw new Error("Invalid input: must be an object");
11970
+ }
11828
11971
  const data = input;
11829
- if (!data.thought || typeof data.thought !== "string") {
11830
- throw new Error("Invalid thought: must be a string");
11972
+ if (typeof data.thought !== "string" || data.thought.trim() === "") {
11973
+ throw new Error("Invalid thought: must be a non-empty string");
11831
11974
  }
11832
- if (!data.thoughtNumber || typeof data.thoughtNumber !== "number") {
11833
- throw new Error("Invalid thoughtNumber: must be a number");
11975
+ if (typeof data.thoughtNumber !== "number" || data.thoughtNumber < 1) {
11976
+ throw new Error("Invalid thoughtNumber: must be a number >= 1");
11834
11977
  }
11835
- if (!data.totalThoughts || typeof data.totalThoughts !== "number") {
11836
- throw new Error("Invalid totalThoughts: must be a number");
11978
+ if (typeof data.totalThoughts !== "number" || data.totalThoughts < 1) {
11979
+ throw new Error("Invalid totalThoughts: must be a number >= 1");
11837
11980
  }
11838
11981
  if (typeof data.nextThoughtNeeded !== "boolean") {
11839
11982
  throw new Error("Invalid nextThoughtNeeded: must be a boolean");
@@ -11850,36 +11993,12 @@ class SequentialThinkingServer {
11850
11993
  needsMoreThoughts: typeof data.needsMoreThoughts === "boolean" ? data.needsMoreThoughts : undefined
11851
11994
  };
11852
11995
  }
11853
- formatThought(thoughtData) {
11854
- const { thoughtNumber, totalThoughts, thought, isRevision, revisesThought, branchFromThought, branchId } = thoughtData;
11855
- let prefix = "";
11856
- let context = "";
11857
- if (isRevision) {
11858
- prefix = source_default.yellow("\uD83D\uDD04 Revision");
11859
- context = ` (revising thought ${revisesThought})`;
11860
- } else if (branchFromThought) {
11861
- prefix = source_default.green("\uD83C\uDF3F Branch");
11862
- context = ` (from thought ${branchFromThought}, ID: ${branchId})`;
11863
- } else {
11864
- prefix = source_default.blue("\uD83D\uDCAD Thought");
11865
- context = "";
11866
- }
11867
- const header = `${prefix} ${thoughtNumber}/${totalThoughts}${context}`;
11868
- const border = "\u2500".repeat(Math.max(header.length, thought.length) + 4);
11869
- return `
11870
- \u250C${border}\u2510
11871
- \u2502 ${header} \u2502
11872
- \u251C${border}\u2524
11873
- \u2502 ${thought.padEnd(border.length - 2)} \u2502
11874
- \u2514${border}\u2518`;
11875
- }
11876
11996
  processThought(input) {
11877
11997
  try {
11878
11998
  const validatedInput = this.validateThoughtData(input);
11879
- if (validatedInput.thoughtNumber > validatedInput.totalThoughts) {
11880
- validatedInput.totalThoughts = validatedInput.thoughtNumber;
11881
- }
11882
- this.thoughtHistory.push(validatedInput);
11999
+ const adjustedTotalThoughts = validatedInput.thoughtNumber > validatedInput.totalThoughts ? validatedInput.thoughtNumber : validatedInput.totalThoughts;
12000
+ const thoughtData = { ...validatedInput, totalThoughts: adjustedTotalThoughts };
12001
+ this.thoughtHistory.push(thoughtData);
11883
12002
  if (validatedInput.branchFromThought && validatedInput.branchId) {
11884
12003
  if (!this.branches[validatedInput.branchId]) {
11885
12004
  this.branches[validatedInput.branchId] = [];
@@ -11887,7 +12006,7 @@ class SequentialThinkingServer {
11887
12006
  this.branches[validatedInput.branchId].push(validatedInput);
11888
12007
  }
11889
12008
  if (!this.disableThoughtLogging) {
11890
- const formattedThought = this.formatThought(validatedInput);
12009
+ const formattedThought = formatThought(thoughtData);
11891
12010
  console.error(formattedThought);
11892
12011
  }
11893
12012
  return {
@@ -11895,11 +12014,16 @@ class SequentialThinkingServer {
11895
12014
  {
11896
12015
  type: "text",
11897
12016
  text: JSON.stringify({
11898
- thoughtNumber: validatedInput.thoughtNumber,
11899
- totalThoughts: validatedInput.totalThoughts,
11900
- nextThoughtNeeded: validatedInput.nextThoughtNeeded,
12017
+ thoughtNumber: thoughtData.thoughtNumber,
12018
+ totalThoughts: thoughtData.totalThoughts,
12019
+ nextThoughtNeeded: thoughtData.nextThoughtNeeded,
12020
+ isRevision: thoughtData.isRevision,
12021
+ revisesThought: thoughtData.revisesThought,
12022
+ branchFromThought: thoughtData.branchFromThought,
12023
+ branchId: thoughtData.branchId,
11901
12024
  branches: Object.keys(this.branches),
11902
- thoughtHistoryLength: this.thoughtHistory.length
12025
+ thoughtHistoryLength: this.thoughtHistory.length,
12026
+ needsMoreThoughts: thoughtData.needsMoreThoughts
11903
12027
  }, null, 2)
11904
12028
  }
11905
12029
  ]
@@ -11920,144 +12044,65 @@ class SequentialThinkingServer {
11920
12044
  }
11921
12045
  }
11922
12046
  }
11923
- var SEQUENTIAL_THINKING_TOOL = {
11924
- name: "sequentialthinking",
11925
- description: `A detailed tool for dynamic and reflective problem-solving through thoughts.
11926
- This tool helps analyze problems through a flexible thinking process that can adapt and evolve.
11927
- Each thought can build on, question, or revise previous insights as understanding deepens.
11928
-
11929
- When to use this tool:
11930
- - Breaking down complex problems into steps
11931
- - Planning and design with room for revision
11932
- - Analysis that might need course correction
11933
- - Problems where the full scope might not be clear initially
11934
- - Problems that require a multi-step solution
11935
- - Tasks that need to maintain context over multiple steps
11936
- - Situations where irrelevant information needs to be filtered out
11937
-
11938
- Key features:
11939
- - You can adjust total_thoughts up or down as you progress
11940
- - You can question or revise previous thoughts
11941
- - You can add more thoughts even after reaching what seemed like the end
11942
- - You can express uncertainty and explore alternative approaches
11943
- - Not every thought needs to build linearly - you can branch or backtrack
11944
- - Generates a solution hypothesis
11945
- - Verifies the hypothesis based on the Chain of Thought steps
11946
- - Repeats the process until satisfied
11947
- - Provides a correct answer
11948
12047
 
11949
- Parameters explained:
11950
- - thought: Your current thinking step, which can include:
11951
- * Regular analytical steps
11952
- * Revisions of previous thoughts
11953
- * Questions about previous decisions
11954
- * Realizations about needing more analysis
11955
- * Changes in approach
11956
- * Hypothesis generation
11957
- * Hypothesis verification
11958
- - next_thought_needed: True if you need more thinking, even if at what seemed like the end
11959
- - thought_number: Current number in sequence (can go beyond initial total if needed)
11960
- - total_thoughts: Current estimate of thoughts needed (can be adjusted up/down)
11961
- - is_revision: A boolean indicating if this thought revises previous thinking
11962
- - revises_thought: If is_revision is true, which thought number is being reconsidered
11963
- - branch_from_thought: If branching, which thought number is the branching point
11964
- - branch_id: Identifier for the current branch (if any)
11965
- - needs_more_thoughts: If reaching end but realizing more thoughts needed
11966
-
11967
- You should:
11968
- 1. Start with an initial estimate of needed thoughts, but be ready to adjust
11969
- 2. Feel free to question or revise previous thoughts
11970
- 3. Don't hesitate to add more thoughts if needed, even at the "end"
11971
- 4. Express uncertainty when present
11972
- 5. Mark thoughts that revise previous thinking or branch into new paths
11973
- 6. Ignore information that is irrelevant to the current step
11974
- 7. Generate a solution hypothesis when appropriate
11975
- 8. Verify the hypothesis based on the Chain of Thought steps
11976
- 9. Repeat the process until satisfied with the solution
11977
- 10. Provide a single, ideally correct answer as the final output
11978
- 11. Only set next_thought_needed to false when truly done and a satisfactory answer is reached`,
11979
- inputSchema: {
11980
- type: "object",
11981
- properties: {
11982
- thought: {
11983
- type: "string",
11984
- description: "Your current thinking step"
11985
- },
11986
- nextThoughtNeeded: {
11987
- type: "boolean",
11988
- description: "Whether another thought step is needed"
11989
- },
11990
- thoughtNumber: {
11991
- type: "integer",
11992
- description: "Current thought number (numeric value, e.g., 1, 2, 3)",
11993
- minimum: 1
11994
- },
11995
- totalThoughts: {
11996
- type: "integer",
11997
- description: "Estimated total thoughts needed (numeric value, e.g., 5, 10)",
11998
- minimum: 1
11999
- },
12000
- isRevision: {
12001
- type: "boolean",
12002
- description: "Whether this revises previous thinking"
12003
- },
12004
- revisesThought: {
12005
- type: "integer",
12006
- description: "Which thought is being reconsidered",
12007
- minimum: 1
12008
- },
12009
- branchFromThought: {
12010
- type: "integer",
12011
- description: "Branching point thought number",
12012
- minimum: 1
12013
- },
12014
- branchId: {
12015
- type: "string",
12016
- description: "Branch identifier"
12017
- },
12018
- needsMoreThoughts: {
12019
- type: "boolean",
12020
- description: "If more thoughts are needed"
12021
- }
12022
- },
12023
- required: ["thought", "nextThoughtNeeded", "thoughtNumber", "totalThoughts"]
12048
+ // src/codemode/index.ts
12049
+ class SequentialThinking {
12050
+ tracker;
12051
+ constructor() {
12052
+ this.tracker = new SequentialThinkingTracker;
12024
12053
  }
12025
- };
12026
- var server = new Server({
12027
- name: "sequential-thinking-server",
12028
- version: "0.2.13"
12029
- }, {
12030
- capabilities: {
12031
- tools: {}
12054
+ think(input) {
12055
+ return this.tracker.processThought(input);
12032
12056
  }
12033
- });
12034
- var thinkingServer = new SequentialThinkingServer;
12035
- server.setRequestHandler(ListToolsRequestSchema, async () => ({
12036
- tools: [SEQUENTIAL_THINKING_TOOL]
12037
- }));
12038
- server.setRequestHandler(CallToolRequestSchema, async (request) => {
12039
- if (request.params.name === "sequentialthinking") {
12040
- return thinkingServer.processThought(request.params.arguments);
12041
- }
12042
- return {
12043
- content: [
12044
- {
12045
- type: "text",
12046
- text: `Unknown tool: ${request.params.name}`
12047
- }
12048
- ],
12049
- isError: true
12050
- };
12051
- });
12052
- async function runServer() {
12053
- const transport = new StdioServerTransport;
12054
- await server.connect(transport);
12055
- console.error("Sequential Thinking MCP Server running on stdio");
12056
12057
  }
12057
- runServer().catch((error) => {
12058
- console.error("Fatal error running server:", error);
12059
- process.exit(1);
12060
- });
12061
12058
 
12062
- //# debugId=C0FBAF59FCF6376B64756E2164756E21
12063
- //# sourceMappingURL=index.js.map
12059
+ // src/mcp/server.ts
12060
+ function createServer() {
12061
+ const server = new Server({
12062
+ name: "sequential-thinking-server",
12063
+ version: "0.4.0"
12064
+ }, {
12065
+ capabilities: {
12066
+ tools: {}
12067
+ }
12068
+ });
12069
+ const thinking = new SequentialThinking;
12070
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
12071
+ tools: [SEQUENTIAL_THINKING_TOOL]
12072
+ }));
12073
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
12074
+ if (request.params.name === "sequentialthinking") {
12075
+ const args = request.params.arguments;
12076
+ return thinking.think(args);
12077
+ }
12078
+ return {
12079
+ content: [
12080
+ {
12081
+ type: "text",
12082
+ text: `Unknown tool: ${request.params.name}`
12083
+ }
12084
+ ],
12085
+ isError: true
12086
+ };
12087
+ });
12088
+ return server;
12089
+ }
12090
+
12091
+ // src/index.ts
12092
+ var src_default = createServer;
12093
+ if (import.meta.main) {
12094
+ const server = createServer();
12095
+ async function runServer() {
12096
+ const transport = new StdioServerTransport;
12097
+ await server.connect(transport);
12098
+ console.error("Sequential Thinking MCP Server running on stdio");
12099
+ }
12100
+ runServer().catch((error) => {
12101
+ console.error("Fatal error running server:", error);
12102
+ process.exit(1);
12103
+ });
12104
+ }
12105
+ export {
12106
+ src_default as default,
12107
+ SequentialThinking
12108
+ };