llm-docs-sync 1.0.0 → 1.0.4

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
@@ -3861,10 +3861,10 @@ var require_webidl = __commonJS((exports, module) => {
3861
3861
  }
3862
3862
  };
3863
3863
  };
3864
- webidl.argumentLengthCheck = function({ length: length3 }, min3, ctx) {
3865
- if (length3 < min3) {
3864
+ webidl.argumentLengthCheck = function({ length: length3 }, min4, ctx) {
3865
+ if (length3 < min4) {
3866
3866
  throw webidl.errors.exception({
3867
- message: `${min3} argument${min3 !== 1 ? "s" : ""} required, ` + `but${length3 ? " only" : ""} ${length3} found.`,
3867
+ message: `${min4} argument${min4 !== 1 ? "s" : ""} required, ` + `but${length3 ? " only" : ""} ${length3} found.`,
3868
3868
  header: ctx
3869
3869
  });
3870
3870
  }
@@ -5521,7 +5521,7 @@ var require_body = __commonJS((exports, module) => {
5521
5521
  var { parseJSONFromBytes } = require_infra();
5522
5522
  var { utf8DecodeBytes } = require_encoding();
5523
5523
  var { runtimeFeatures } = require_runtime_features();
5524
- var random4 = runtimeFeatures.has("crypto") ? __require("node:crypto").randomInt : (max5) => Math.floor(Math.random() * max5);
5524
+ var random4 = runtimeFeatures.has("crypto") ? __require("node:crypto").randomInt : (max6) => Math.floor(Math.random() * max6);
5525
5525
  var textEncoder = new TextEncoder;
5526
5526
  function noop() {}
5527
5527
  var streamRegistry = new FinalizationRegistry((weakRef) => {
@@ -21738,7 +21738,12 @@ var isNonEmptyArray = (self) => self.length > 0;
21738
21738
  var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
21739
21739
  var number2 = /* @__PURE__ */ make2((self, that) => self < that ? -1 : 1);
21740
21740
  var mapInput2 = /* @__PURE__ */ dual(2, (self, f) => make2((b1, b2) => self(f(b1), f(b2))));
21741
+ var lessThan = (O) => dual(2, (self, that) => O(self, that) === -1);
21741
21742
  var greaterThan = (O) => dual(2, (self, that) => O(self, that) === 1);
21743
+ var min = (O) => dual(2, (self, that) => self === that || O(self, that) < 1 ? self : that);
21744
+ var max = (O) => dual(2, (self, that) => self === that || O(self, that) > -1 ? self : that);
21745
+ var clamp = (O) => dual(2, (self, options) => min(O)(options.maximum, max(O)(options.minimum, self)));
21746
+ var between = (O) => dual(2, (self, options) => !lessThan(O)(self, options.minimum) && !greaterThan(O)(self, options.maximum));
21742
21747
 
21743
21748
  // node_modules/effect/dist/esm/Option.js
21744
21749
  var none2 = () => none;
@@ -21753,6 +21758,13 @@ var getOrElse = /* @__PURE__ */ dual(2, (self, onNone) => isNone2(self) ? onNone
21753
21758
  var orElseSome = /* @__PURE__ */ dual(2, (self, onNone) => isNone2(self) ? some2(onNone()) : self);
21754
21759
  var fromNullable = (nullableValue) => nullableValue == null ? none2() : some2(nullableValue);
21755
21760
  var getOrUndefined = /* @__PURE__ */ getOrElse(constUndefined);
21761
+ var liftThrowable = (f) => (...a) => {
21762
+ try {
21763
+ return some2(f(...a));
21764
+ } catch {
21765
+ return none2();
21766
+ }
21767
+ };
21756
21768
  var getOrThrowWith = /* @__PURE__ */ dual(2, (self, onNone) => {
21757
21769
  if (isSome2(self)) {
21758
21770
  return self.value;
@@ -21792,9 +21804,9 @@ var keys = (self) => Object.keys(self);
21792
21804
  // node_modules/effect/dist/esm/Array.js
21793
21805
  var allocate = (n) => new Array(n);
21794
21806
  var makeBy = /* @__PURE__ */ dual(2, (n, f) => {
21795
- const max = Math.max(1, Math.floor(n));
21796
- const out = new Array(max);
21797
- for (let i = 0;i < max; i++) {
21807
+ const max2 = Math.max(1, Math.floor(n));
21808
+ const out = new Array(max2);
21809
+ for (let i = 0;i < max2; i++) {
21798
21810
  out[i] = f(i);
21799
21811
  }
21800
21812
  return out;
@@ -21809,7 +21821,7 @@ var isEmptyReadonlyArray = isEmptyArray;
21809
21821
  var isNonEmptyArray2 = isNonEmptyArray;
21810
21822
  var isNonEmptyReadonlyArray = isNonEmptyArray;
21811
21823
  var isOutOfBounds = (i, as) => i < 0 || i >= as.length;
21812
- var clamp = (i, as) => Math.floor(Math.min(Math.max(0, i), as.length));
21824
+ var clamp2 = (i, as) => Math.floor(Math.min(Math.max(0, i), as.length));
21813
21825
  var get = /* @__PURE__ */ dual(2, (self, index) => {
21814
21826
  const i = Math.floor(index);
21815
21827
  return isOutOfBounds(i, self) ? none2() : some2(self[i]);
@@ -21839,7 +21851,7 @@ var spanIndex = (self, predicate) => {
21839
21851
  var span = /* @__PURE__ */ dual(2, (self, predicate) => splitAt(self, spanIndex(self, predicate)));
21840
21852
  var drop = /* @__PURE__ */ dual(2, (self, n) => {
21841
21853
  const input = fromIterable(self);
21842
- return input.slice(clamp(n, input), input.length);
21854
+ return input.slice(clamp2(n, input), input.length);
21843
21855
  });
21844
21856
  var reverse = (self) => Array.from(self).reverse();
21845
21857
  var sort = /* @__PURE__ */ dual(2, (self, O) => {
@@ -22578,6 +22590,56 @@ var takeRight = /* @__PURE__ */ dual(2, (self, n) => drop2(self, self.length - n
22578
22590
  var reduce2 = reduce;
22579
22591
 
22580
22592
  // node_modules/effect/dist/esm/Duration.js
22593
+ var exports_Duration = {};
22594
+ __export(exports_Duration, {
22595
+ zero: () => zero,
22596
+ weeks: () => weeks,
22597
+ unsafeToNanos: () => unsafeToNanos,
22598
+ unsafeFormatIso: () => unsafeFormatIso,
22599
+ unsafeDivide: () => unsafeDivide,
22600
+ toWeeks: () => toWeeks,
22601
+ toSeconds: () => toSeconds,
22602
+ toNanos: () => toNanos,
22603
+ toMinutes: () => toMinutes,
22604
+ toMillis: () => toMillis,
22605
+ toHrTime: () => toHrTime,
22606
+ toHours: () => toHours,
22607
+ toDays: () => toDays,
22608
+ times: () => times,
22609
+ sum: () => sum,
22610
+ subtract: () => subtract,
22611
+ seconds: () => seconds,
22612
+ parts: () => parts,
22613
+ nanos: () => nanos,
22614
+ minutes: () => minutes,
22615
+ min: () => min2,
22616
+ millis: () => millis,
22617
+ micros: () => micros,
22618
+ max: () => max2,
22619
+ matchWith: () => matchWith,
22620
+ match: () => match3,
22621
+ lessThanOrEqualTo: () => lessThanOrEqualTo,
22622
+ lessThan: () => lessThan2,
22623
+ isZero: () => isZero,
22624
+ isFinite: () => isFinite,
22625
+ isDuration: () => isDuration,
22626
+ infinity: () => infinity,
22627
+ hours: () => hours,
22628
+ greaterThanOrEqualTo: () => greaterThanOrEqualTo,
22629
+ greaterThan: () => greaterThan2,
22630
+ fromIso: () => fromIso,
22631
+ formatIso: () => formatIso,
22632
+ format: () => format2,
22633
+ equals: () => equals2,
22634
+ divide: () => divide,
22635
+ decodeUnknown: () => decodeUnknown,
22636
+ decode: () => decode,
22637
+ days: () => days,
22638
+ clamp: () => clamp3,
22639
+ between: () => between2,
22640
+ Order: () => Order,
22641
+ Equivalence: () => Equivalence
22642
+ });
22581
22643
  var TypeId5 = /* @__PURE__ */ Symbol.for("effect/Duration");
22582
22644
  var bigint0 = /* @__PURE__ */ BigInt(0);
22583
22645
  var bigint24 = /* @__PURE__ */ BigInt(24);
@@ -22636,6 +22698,7 @@ var decode = (input) => {
22636
22698
  }
22637
22699
  throw new Error("Invalid DurationInput");
22638
22700
  };
22701
+ var decodeUnknown = /* @__PURE__ */ liftThrowable(decode);
22639
22702
  var zeroValue = {
22640
22703
  _tag: "Millis",
22641
22704
  millis: 0
@@ -22711,6 +22774,7 @@ var make7 = (input) => {
22711
22774
  return duration;
22712
22775
  };
22713
22776
  var isDuration = (u) => hasProperty(u, TypeId5);
22777
+ var isFinite = (self) => self.value._tag !== "Infinity";
22714
22778
  var isZero = (self) => {
22715
22779
  switch (self.value._tag) {
22716
22780
  case "Millis": {
@@ -22738,6 +22802,37 @@ var toMillis = (self) => match3(self, {
22738
22802
  onMillis: (millis2) => millis2,
22739
22803
  onNanos: (nanos2) => Number(nanos2) / 1e6
22740
22804
  });
22805
+ var toSeconds = (self) => match3(self, {
22806
+ onMillis: (millis2) => millis2 / 1000,
22807
+ onNanos: (nanos2) => Number(nanos2) / 1e9
22808
+ });
22809
+ var toMinutes = (self) => match3(self, {
22810
+ onMillis: (millis2) => millis2 / 60000,
22811
+ onNanos: (nanos2) => Number(nanos2) / 60000000000
22812
+ });
22813
+ var toHours = (self) => match3(self, {
22814
+ onMillis: (millis2) => millis2 / 3600000,
22815
+ onNanos: (nanos2) => Number(nanos2) / 3600000000000
22816
+ });
22817
+ var toDays = (self) => match3(self, {
22818
+ onMillis: (millis2) => millis2 / 86400000,
22819
+ onNanos: (nanos2) => Number(nanos2) / 86400000000000
22820
+ });
22821
+ var toWeeks = (self) => match3(self, {
22822
+ onMillis: (millis2) => millis2 / 604800000,
22823
+ onNanos: (nanos2) => Number(nanos2) / 604800000000000
22824
+ });
22825
+ var toNanos = (self) => {
22826
+ const _self = decode(self);
22827
+ switch (_self.value._tag) {
22828
+ case "Infinity":
22829
+ return none2();
22830
+ case "Nanos":
22831
+ return some2(_self.value.nanos);
22832
+ case "Millis":
22833
+ return some2(BigInt(Math.round(_self.value.millis * 1e6)));
22834
+ }
22835
+ };
22741
22836
  var unsafeToNanos = (self) => {
22742
22837
  const _self = decode(self);
22743
22838
  switch (_self.value._tag) {
@@ -22783,14 +22878,77 @@ var matchWith = /* @__PURE__ */ dual(3, (self, that, options) => {
22783
22878
  }
22784
22879
  return options.onMillis(_self.value.millis, _that.value.millis);
22785
22880
  });
22881
+ var Order = /* @__PURE__ */ make2((self, that) => matchWith(self, that, {
22882
+ onMillis: (self2, that2) => self2 < that2 ? -1 : self2 > that2 ? 1 : 0,
22883
+ onNanos: (self2, that2) => self2 < that2 ? -1 : self2 > that2 ? 1 : 0
22884
+ }));
22885
+ var between2 = /* @__PURE__ */ between(/* @__PURE__ */ mapInput2(Order, decode));
22786
22886
  var Equivalence = (self, that) => matchWith(self, that, {
22787
22887
  onMillis: (self2, that2) => self2 === that2,
22788
22888
  onNanos: (self2, that2) => self2 === that2
22789
22889
  });
22890
+ var _min = /* @__PURE__ */ min(Order);
22891
+ var min2 = /* @__PURE__ */ dual(2, (self, that) => _min(decode(self), decode(that)));
22892
+ var _max = /* @__PURE__ */ max(Order);
22893
+ var max2 = /* @__PURE__ */ dual(2, (self, that) => _max(decode(self), decode(that)));
22894
+ var _clamp = /* @__PURE__ */ clamp(Order);
22895
+ var clamp3 = /* @__PURE__ */ dual(2, (self, options) => _clamp(decode(self), {
22896
+ minimum: decode(options.minimum),
22897
+ maximum: decode(options.maximum)
22898
+ }));
22899
+ var divide = /* @__PURE__ */ dual(2, (self, by) => match3(self, {
22900
+ onMillis: (millis2) => {
22901
+ if (by === 0 || isNaN(by) || !Number.isFinite(by)) {
22902
+ return none2();
22903
+ }
22904
+ return some2(make7(millis2 / by));
22905
+ },
22906
+ onNanos: (nanos2) => {
22907
+ if (isNaN(by) || by <= 0 || !Number.isFinite(by)) {
22908
+ return none2();
22909
+ }
22910
+ try {
22911
+ return some2(make7(nanos2 / BigInt(by)));
22912
+ } catch {
22913
+ return none2();
22914
+ }
22915
+ }
22916
+ }));
22917
+ var unsafeDivide = /* @__PURE__ */ dual(2, (self, by) => match3(self, {
22918
+ onMillis: (millis2) => make7(millis2 / by),
22919
+ onNanos: (nanos2) => {
22920
+ if (isNaN(by) || by < 0 || Object.is(by, -0)) {
22921
+ return zero;
22922
+ } else if (Object.is(by, 0) || !Number.isFinite(by)) {
22923
+ return infinity;
22924
+ }
22925
+ return make7(nanos2 / BigInt(by));
22926
+ }
22927
+ }));
22928
+ var times = /* @__PURE__ */ dual(2, (self, times2) => match3(self, {
22929
+ onMillis: (millis2) => make7(millis2 * times2),
22930
+ onNanos: (nanos2) => make7(nanos2 * BigInt(times2))
22931
+ }));
22932
+ var subtract = /* @__PURE__ */ dual(2, (self, that) => matchWith(self, that, {
22933
+ onMillis: (self2, that2) => make7(self2 - that2),
22934
+ onNanos: (self2, that2) => make7(self2 - that2)
22935
+ }));
22936
+ var sum = /* @__PURE__ */ dual(2, (self, that) => matchWith(self, that, {
22937
+ onMillis: (self2, that2) => make7(self2 + that2),
22938
+ onNanos: (self2, that2) => make7(self2 + that2)
22939
+ }));
22940
+ var lessThan2 = /* @__PURE__ */ dual(2, (self, that) => matchWith(self, that, {
22941
+ onMillis: (self2, that2) => self2 < that2,
22942
+ onNanos: (self2, that2) => self2 < that2
22943
+ }));
22790
22944
  var lessThanOrEqualTo = /* @__PURE__ */ dual(2, (self, that) => matchWith(self, that, {
22791
22945
  onMillis: (self2, that2) => self2 <= that2,
22792
22946
  onNanos: (self2, that2) => self2 <= that2
22793
22947
  }));
22948
+ var greaterThan2 = /* @__PURE__ */ dual(2, (self, that) => matchWith(self, that, {
22949
+ onMillis: (self2, that2) => self2 > that2,
22950
+ onNanos: (self2, that2) => self2 > that2
22951
+ }));
22794
22952
  var greaterThanOrEqualTo = /* @__PURE__ */ dual(2, (self, that) => matchWith(self, that, {
22795
22953
  onMillis: (self2, that2) => self2 >= that2,
22796
22954
  onNanos: (self2, that2) => self2 >= that2
@@ -22811,13 +22969,13 @@ var parts = (self) => {
22811
22969
  const nanos2 = unsafeToNanos(duration);
22812
22970
  const ms = nanos2 / bigint1e6;
22813
22971
  const sec = ms / bigint1e3;
22814
- const min = sec / bigint60;
22815
- const hr = min / bigint60;
22972
+ const min3 = sec / bigint60;
22973
+ const hr = min3 / bigint60;
22816
22974
  const days2 = hr / bigint24;
22817
22975
  return {
22818
22976
  days: Number(days2),
22819
22977
  hours: Number(hr % bigint24),
22820
- minutes: Number(min % bigint60),
22978
+ minutes: Number(min3 % bigint60),
22821
22979
  seconds: Number(sec % bigint60),
22822
22980
  millis: Number(ms % bigint1e3),
22823
22981
  nanos: Number(nanos2 % bigint1e6)
@@ -22853,6 +23011,69 @@ var format2 = (self) => {
22853
23011
  }
22854
23012
  return pieces.join(" ");
22855
23013
  };
23014
+ var unsafeFormatIso = (self) => {
23015
+ const duration = decode(self);
23016
+ if (!isFinite(duration)) {
23017
+ throw new RangeError("Cannot format infinite duration");
23018
+ }
23019
+ const fragments = [];
23020
+ const {
23021
+ days: days2,
23022
+ hours: hours2,
23023
+ millis: millis2,
23024
+ minutes: minutes2,
23025
+ nanos: nanos2,
23026
+ seconds: seconds2
23027
+ } = parts(duration);
23028
+ let rest = days2;
23029
+ if (rest >= 365) {
23030
+ const years = Math.floor(rest / 365);
23031
+ rest %= 365;
23032
+ fragments.push(`${years}Y`);
23033
+ }
23034
+ if (rest >= 30) {
23035
+ const months = Math.floor(rest / 30);
23036
+ rest %= 30;
23037
+ fragments.push(`${months}M`);
23038
+ }
23039
+ if (rest >= 7) {
23040
+ const weeks2 = Math.floor(rest / 7);
23041
+ rest %= 7;
23042
+ fragments.push(`${weeks2}W`);
23043
+ }
23044
+ if (rest > 0) {
23045
+ fragments.push(`${rest}D`);
23046
+ }
23047
+ if (hours2 !== 0 || minutes2 !== 0 || seconds2 !== 0 || millis2 !== 0 || nanos2 !== 0) {
23048
+ fragments.push("T");
23049
+ if (hours2 !== 0) {
23050
+ fragments.push(`${hours2}H`);
23051
+ }
23052
+ if (minutes2 !== 0) {
23053
+ fragments.push(`${minutes2}M`);
23054
+ }
23055
+ if (seconds2 !== 0 || millis2 !== 0 || nanos2 !== 0) {
23056
+ const total = BigInt(seconds2) * bigint1e9 + BigInt(millis2) * bigint1e6 + BigInt(nanos2);
23057
+ const str = (Number(total) / 1e9).toFixed(9).replace(/\.?0+$/, "");
23058
+ fragments.push(`${str}S`);
23059
+ }
23060
+ }
23061
+ return `P${fragments.join("") || "T0S"}`;
23062
+ };
23063
+ var formatIso = (self) => {
23064
+ const duration = decode(self);
23065
+ return isFinite(duration) ? some2(unsafeFormatIso(duration)) : none2();
23066
+ };
23067
+ var fromIso = (iso) => {
23068
+ const result = DURATION_ISO_REGEX.exec(iso);
23069
+ if (result == null) {
23070
+ return none2();
23071
+ }
23072
+ const [years, months, weeks2, days2, hours2, mins, secs] = result.slice(1, 8).map((_) => _ ? Number(_) : 0);
23073
+ const value = years * 365 * 24 * 60 * 60 + months * 30 * 24 * 60 * 60 + weeks2 * 7 * 24 * 60 * 60 + days2 * 24 * 60 * 60 + hours2 * 60 * 60 + mins * 60 + secs;
23074
+ return some2(seconds(value));
23075
+ };
23076
+ var DURATION_ISO_REGEX = /^P(?!$)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?!$)(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
22856
23077
 
22857
23078
  // node_modules/effect/dist/esm/internal/hashMap/config.js
22858
23079
  var SIZE = 5;
@@ -26658,7 +26879,7 @@ class ClockImpl {
26658
26879
  var make19 = () => new ClockImpl;
26659
26880
 
26660
26881
  // node_modules/effect/dist/esm/Number.js
26661
- var Order = number2;
26882
+ var Order2 = number2;
26662
26883
 
26663
26884
  // node_modules/effect/dist/esm/RegExp.js
26664
26885
  var escape = (string2) => string2.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
@@ -27048,7 +27269,7 @@ var transpose = (array3) => {
27048
27269
  };
27049
27270
  var indicesFrom = (quotedIndices) => pipe(forEachSequential(quotedIndices, parseQuotedIndex), mapBoth({
27050
27271
  onFailure: () => empty(),
27051
- onSuccess: sort(Order)
27272
+ onSuccess: sort(Order2)
27052
27273
  }), either2, map10(merge));
27053
27274
  var QUOTED_INDEX_REGEX = /^(\[(\d+)\])$/;
27054
27275
  var parseQuotedIndex = (str) => {
@@ -27174,11 +27395,11 @@ class RandomImpl {
27174
27395
  get nextInt() {
27175
27396
  return sync(() => this.PRNG.integer(Number.MAX_SAFE_INTEGER));
27176
27397
  }
27177
- nextRange(min2, max2) {
27178
- return map10(this.next, (n) => (max2 - min2) * n + min2);
27398
+ nextRange(min3, max3) {
27399
+ return map10(this.next, (n) => (max3 - min3) * n + min3);
27179
27400
  }
27180
- nextIntBetween(min2, max2) {
27181
- return sync(() => this.PRNG.integer(max2 - min2) + min2);
27401
+ nextIntBetween(min3, max3) {
27402
+ return sync(() => this.PRNG.integer(max3 - min3) + min3);
27182
27403
  }
27183
27404
  shuffle(elements) {
27184
27405
  return shuffleWith(elements, (n) => this.nextIntBetween(0, n));
@@ -27243,17 +27464,17 @@ class FixedRandomImpl {
27243
27464
  return Math.abs(hash(value));
27244
27465
  });
27245
27466
  }
27246
- nextRange(min2, max2) {
27247
- return map10(this.next, (n) => (max2 - min2) * n + min2);
27467
+ nextRange(min3, max3) {
27468
+ return map10(this.next, (n) => (max3 - min3) * n + min3);
27248
27469
  }
27249
- nextIntBetween(min2, max2) {
27470
+ nextIntBetween(min3, max3) {
27250
27471
  return sync(() => {
27251
27472
  const value = this.getNextValue();
27252
27473
  if (typeof value === "number" && Number.isFinite(value)) {
27253
- return Math.max(min2, Math.min(max2 - 1, Math.round(value)));
27474
+ return Math.max(min3, Math.min(max3 - 1, Math.round(value)));
27254
27475
  }
27255
27476
  const hash2 = Math.abs(hash(value));
27256
- return min2 + hash2 % (max2 - min2);
27477
+ return min3 + hash2 % (max3 - min3);
27257
27478
  });
27258
27479
  }
27259
27480
  shuffle(elements) {
@@ -27782,8 +28003,8 @@ var Info = logLevelInfo;
27782
28003
  var Debug = logLevelDebug;
27783
28004
  var Trace = logLevelTrace;
27784
28005
  var None3 = logLevelNone;
27785
- var Order2 = /* @__PURE__ */ pipe(Order, /* @__PURE__ */ mapInput2((level) => level.ordinal));
27786
- var greaterThan2 = /* @__PURE__ */ greaterThan(Order2);
28006
+ var Order3 = /* @__PURE__ */ pipe(Order2, /* @__PURE__ */ mapInput2((level) => level.ordinal));
28007
+ var greaterThan3 = /* @__PURE__ */ greaterThan(Order3);
27787
28008
  var fromLiteral = (literal) => {
27788
28009
  switch (literal) {
27789
28010
  case "All":
@@ -29864,12 +30085,12 @@ class HistogramState {
29864
30085
  sum;
29865
30086
  [MetricStateTypeId] = metricStateVariance;
29866
30087
  [HistogramStateTypeId] = HistogramStateTypeId;
29867
- constructor(buckets, count, min2, max2, sum) {
30088
+ constructor(buckets, count, min3, max3, sum2) {
29868
30089
  this.buckets = buckets;
29869
30090
  this.count = count;
29870
- this.min = min2;
29871
- this.max = max2;
29872
- this.sum = sum;
30091
+ this.min = min3;
30092
+ this.max = max3;
30093
+ this.sum = sum2;
29873
30094
  }
29874
30095
  [symbol]() {
29875
30096
  return pipe(hash(HistogramStateSymbolKey), combine(hash(this.buckets)), combine(hash(this.count)), combine(hash(this.min)), combine(hash(this.max)), combine(hash(this.sum)), cached(this));
@@ -29891,13 +30112,13 @@ class SummaryState {
29891
30112
  sum;
29892
30113
  [MetricStateTypeId] = metricStateVariance;
29893
30114
  [SummaryStateTypeId] = SummaryStateTypeId;
29894
- constructor(error, quantiles, count, min2, max2, sum) {
30115
+ constructor(error, quantiles, count, min3, max3, sum2) {
29895
30116
  this.error = error;
29896
30117
  this.quantiles = quantiles;
29897
30118
  this.count = count;
29898
- this.min = min2;
29899
- this.max = max2;
29900
- this.sum = sum;
30119
+ this.min = min3;
30120
+ this.max = max3;
30121
+ this.sum = sum2;
29901
30122
  }
29902
30123
  [symbol]() {
29903
30124
  return pipe(hash(SummaryStateSymbolKey), combine(hash(this.error)), combine(hash(this.quantiles)), combine(hash(this.count)), combine(hash(this.min)), combine(hash(this.max)), combine(hash(this.sum)), cached(this));
@@ -29938,15 +30159,15 @@ var make29 = (options) => ({
29938
30159
  });
29939
30160
  var bigint03 = /* @__PURE__ */ BigInt(0);
29940
30161
  var counter4 = (key) => {
29941
- let sum = key.keyType.bigint ? bigint03 : 0;
30162
+ let sum2 = key.keyType.bigint ? bigint03 : 0;
29942
30163
  const canUpdate = key.keyType.incremental ? key.keyType.bigint ? (value) => value >= bigint03 : (value) => value >= 0 : (_value) => true;
29943
30164
  const update4 = (value) => {
29944
30165
  if (canUpdate(value)) {
29945
- sum = sum + value;
30166
+ sum2 = sum2 + value;
29946
30167
  }
29947
30168
  };
29948
30169
  return make29({
29949
- get: () => counter3(sum),
30170
+ get: () => counter3(sum2),
29950
30171
  update: update4,
29951
30172
  modify: update4
29952
30173
  });
@@ -29984,10 +30205,10 @@ var histogram4 = (key) => {
29984
30205
  const values3 = new Uint32Array(size7 + 1);
29985
30206
  const boundaries = new Float64Array(size7);
29986
30207
  let count = 0;
29987
- let sum = 0;
29988
- let min2 = Number.MAX_VALUE;
29989
- let max2 = Number.MIN_VALUE;
29990
- pipe(bounds, sort(Order), map3((n, i) => {
30208
+ let sum2 = 0;
30209
+ let min3 = Number.MAX_VALUE;
30210
+ let max3 = Number.MIN_VALUE;
30211
+ pipe(bounds, sort(Order2), map3((n, i) => {
29991
30212
  boundaries[i] = n;
29992
30213
  }));
29993
30214
  const update4 = (value) => {
@@ -30011,12 +30232,12 @@ var histogram4 = (key) => {
30011
30232
  }
30012
30233
  values3[from] = values3[from] + 1;
30013
30234
  count = count + 1;
30014
- sum = sum + value;
30015
- if (value < min2) {
30016
- min2 = value;
30235
+ sum2 = sum2 + value;
30236
+ if (value < min3) {
30237
+ min3 = value;
30017
30238
  }
30018
- if (value > max2) {
30019
- max2 = value;
30239
+ if (value > max3) {
30240
+ max3 = value;
30020
30241
  }
30021
30242
  };
30022
30243
  const getBuckets = () => {
@@ -30034,9 +30255,9 @@ var histogram4 = (key) => {
30034
30255
  get: () => histogram3({
30035
30256
  buckets: getBuckets(),
30036
30257
  count,
30037
- min: min2,
30038
- max: max2,
30039
- sum
30258
+ min: min3,
30259
+ max: max3,
30260
+ sum: sum2
30040
30261
  }),
30041
30262
  update: update4,
30042
30263
  modify: update4
@@ -30049,13 +30270,13 @@ var summary3 = (key) => {
30049
30270
  maxSize,
30050
30271
  quantiles
30051
30272
  } = key.keyType;
30052
- const sortedQuantiles = pipe(quantiles, sort(Order));
30273
+ const sortedQuantiles = pipe(quantiles, sort(Order2));
30053
30274
  const values3 = allocate(maxSize);
30054
30275
  let head4 = 0;
30055
30276
  let count = 0;
30056
- let sum = 0;
30057
- let min2 = 0;
30058
- let max2 = 0;
30277
+ let sum2 = 0;
30278
+ let min3 = 0;
30279
+ let max3 = 0;
30059
30280
  const snapshot = (now) => {
30060
30281
  const builder = [];
30061
30282
  let i = 0;
@@ -30070,7 +30291,7 @@ var summary3 = (key) => {
30070
30291
  }
30071
30292
  i = i + 1;
30072
30293
  }
30073
- return calculateQuantiles(error, sortedQuantiles, sort(builder, Order));
30294
+ return calculateQuantiles(error, sortedQuantiles, sort(builder, Order2));
30074
30295
  };
30075
30296
  const observe = (value, timestamp) => {
30076
30297
  if (maxSize > 0) {
@@ -30078,19 +30299,19 @@ var summary3 = (key) => {
30078
30299
  const target = head4 % maxSize;
30079
30300
  values3[target] = [timestamp, value];
30080
30301
  }
30081
- min2 = count === 0 ? value : Math.min(min2, value);
30082
- max2 = count === 0 ? value : Math.max(max2, value);
30302
+ min3 = count === 0 ? value : Math.min(min3, value);
30303
+ max3 = count === 0 ? value : Math.max(max3, value);
30083
30304
  count = count + 1;
30084
- sum = sum + value;
30305
+ sum2 = sum2 + value;
30085
30306
  };
30086
30307
  return make29({
30087
30308
  get: () => summary2({
30088
30309
  error,
30089
30310
  quantiles: snapshot(Date.now()),
30090
30311
  count,
30091
- min: min2,
30092
- max: max2,
30093
- sum
30312
+ min: min3,
30313
+ max: max3,
30314
+ sum: sum2
30094
30315
  }),
30095
30316
  update: ([value, timestamp]) => observe(value, timestamp),
30096
30317
  modify: ([value, timestamp]) => observe(value, timestamp)
@@ -31077,7 +31298,7 @@ class FiberRuntime extends Class2 {
31077
31298
  log(message, cause2, overrideLogLevel) {
31078
31299
  const logLevel = isSome2(overrideLogLevel) ? overrideLogLevel.value : this.getFiberRef(currentLogLevel);
31079
31300
  const minimumLogLevel = this.getFiberRef(currentMinimumLogLevel);
31080
- if (greaterThan2(minimumLogLevel, logLevel)) {
31301
+ if (greaterThan3(minimumLogLevel, logLevel)) {
31081
31302
  return;
31082
31303
  }
31083
31304
  const spans = this.getFiberRef(currentLogSpan);
@@ -31556,7 +31777,7 @@ var whenLogLevel = /* @__PURE__ */ dual(2, (effect, level) => {
31556
31777
  const requiredLogLevel = typeof level === "string" ? fromLiteral(level) : level;
31557
31778
  return withFiberRuntime((fiberState) => {
31558
31779
  const minimumLogLevel = fiberState.getFiberRef(currentMinimumLogLevel);
31559
- if (greaterThan2(minimumLogLevel, requiredLogLevel)) {
31780
+ if (greaterThan3(minimumLogLevel, requiredLogLevel)) {
31560
31781
  return succeed(none2());
31561
31782
  }
31562
31783
  return map10(effect, some2);
@@ -32311,8 +32532,8 @@ var make33 = (startMillis, endMillis) => {
32311
32532
  endMillis
32312
32533
  };
32313
32534
  };
32314
- var lessThan2 = /* @__PURE__ */ dual(2, (self, that) => min2(self, that) === self);
32315
- var min2 = /* @__PURE__ */ dual(2, (self, that) => {
32535
+ var lessThan3 = /* @__PURE__ */ dual(2, (self, that) => min3(self, that) === self);
32536
+ var min3 = /* @__PURE__ */ dual(2, (self, that) => {
32316
32537
  if (self.endMillis <= that.startMillis)
32317
32538
  return self;
32318
32539
  if (that.endMillis <= self.startMillis)
@@ -32339,7 +32560,7 @@ var after = (startMilliseconds) => {
32339
32560
 
32340
32561
  // node_modules/effect/dist/esm/ScheduleInterval.js
32341
32562
  var empty24 = empty23;
32342
- var lessThan3 = lessThan2;
32563
+ var lessThan4 = lessThan3;
32343
32564
  var isEmpty7 = isEmpty6;
32344
32565
  var intersect2 = intersect;
32345
32566
  var after2 = after;
@@ -32361,7 +32582,7 @@ var intersectLoop = (_left, _right, _acc) => {
32361
32582
  while (isNonEmpty(left3) && isNonEmpty(right3)) {
32362
32583
  const interval = pipe(headNonEmpty2(left3), intersect2(headNonEmpty2(right3)));
32363
32584
  const intervals = isEmpty7(interval) ? acc : pipe(acc, prepend2(interval));
32364
- if (pipe(headNonEmpty2(left3), lessThan3(headNonEmpty2(right3)))) {
32585
+ if (pipe(headNonEmpty2(left3), lessThan4(headNonEmpty2(right3)))) {
32365
32586
  left3 = tailNonEmpty2(left3);
32366
32587
  } else {
32367
32588
  right3 = tailNonEmpty2(right3);
@@ -32376,7 +32597,7 @@ var start = (self) => {
32376
32597
  var end = (self) => {
32377
32598
  return pipe(self.intervals, head2, getOrElse(() => empty24)).endMillis;
32378
32599
  };
32379
- var lessThan4 = /* @__PURE__ */ dual(2, (self, that) => start(self) < start(that));
32600
+ var lessThan5 = /* @__PURE__ */ dual(2, (self, that) => start(self) < start(that));
32380
32601
  var isNonEmpty3 = (self) => {
32381
32602
  return isNonEmpty(self.intervals);
32382
32603
  };
@@ -32386,7 +32607,7 @@ var make36 = make35;
32386
32607
  var intersect4 = intersect3;
32387
32608
  var start2 = start;
32388
32609
  var end2 = end;
32389
- var lessThan5 = lessThan4;
32610
+ var lessThan6 = lessThan5;
32390
32611
  var isNonEmpty4 = isNonEmpty3;
32391
32612
 
32392
32613
  // node_modules/effect/dist/esm/internal/schedule/decision.js
@@ -33347,7 +33568,7 @@ var intersectWithLoop = (self, that, input, lState, out, lInterval, rState, out2
33347
33568
  if (isNonEmpty4(combined)) {
33348
33569
  return succeed([[lState, rState], [out, out2], _continue2(combined)]);
33349
33570
  }
33350
- if (pipe(lInterval, lessThan5(rInterval))) {
33571
+ if (pipe(lInterval, lessThan6(rInterval))) {
33351
33572
  return flatMap7(self.step(end2(lInterval), input, lState), ([lState2, out3, decision]) => {
33352
33573
  if (isDone5(decision)) {
33353
33574
  return succeed([[lState2, rState], [out3, out2], done6]);
@@ -34971,28 +35192,28 @@ class QueueImpl extends Class2 {
34971
35192
  });
34972
35193
  });
34973
35194
  }
34974
- takeUpTo(max5) {
35195
+ takeUpTo(max6) {
34975
35196
  return suspend(() => get6(this.shutdownFlag) ? interrupt2 : sync(() => {
34976
- const values3 = this.queue.pollUpTo(max5);
35197
+ const values3 = this.queue.pollUpTo(max6);
34977
35198
  this.strategy.unsafeOnQueueEmptySpace(this.queue, this.takers);
34978
35199
  return fromIterable2(values3);
34979
35200
  }));
34980
35201
  }
34981
- takeBetween(min3, max5) {
34982
- return suspend(() => takeRemainderLoop(this, min3, max5, empty4()));
35202
+ takeBetween(min4, max6) {
35203
+ return suspend(() => takeRemainderLoop(this, min4, max6, empty4()));
34983
35204
  }
34984
35205
  }
34985
- var takeRemainderLoop = (self, min3, max5, acc) => {
34986
- if (max5 < min3) {
35206
+ var takeRemainderLoop = (self, min4, max6, acc) => {
35207
+ if (max6 < min4) {
34987
35208
  return succeed(acc);
34988
35209
  }
34989
- return pipe(takeUpTo(self, max5), flatMap7((bs) => {
34990
- const remaining = min3 - bs.length;
35210
+ return pipe(takeUpTo(self, max6), flatMap7((bs) => {
35211
+ const remaining = min4 - bs.length;
34991
35212
  if (remaining === 1) {
34992
35213
  return pipe(take2(self), map10((b) => pipe(acc, appendAll2(bs), append2(b))));
34993
35214
  }
34994
35215
  if (remaining > 1) {
34995
- return pipe(take2(self), flatMap7((b) => takeRemainderLoop(self, remaining - 1, max5 - bs.length - 1, pipe(acc, appendAll2(bs), append2(b)))));
35216
+ return pipe(take2(self), flatMap7((b) => takeRemainderLoop(self, remaining - 1, max6 - bs.length - 1, pipe(acc, appendAll2(bs), append2(b)))));
34996
35217
  }
34997
35218
  return succeed(pipe(acc, appendAll2(bs)));
34998
35219
  }));
@@ -35036,7 +35257,7 @@ var size9 = (self) => self.size;
35036
35257
  var shutdown = (self) => self.shutdown;
35037
35258
  var offer2 = /* @__PURE__ */ dual(2, (self, value) => self.offer(value));
35038
35259
  var take2 = (self) => self.take;
35039
- var takeUpTo = /* @__PURE__ */ dual(2, (self, max5) => self.takeUpTo(max5));
35260
+ var takeUpTo = /* @__PURE__ */ dual(2, (self, max6) => self.takeUpTo(max6));
35040
35261
  var backPressureStrategy = () => new BackPressureStrategy;
35041
35262
  var droppingStrategy = () => new DroppingStrategy;
35042
35263
  var slidingStrategy = () => new SlidingStrategy;
@@ -35158,8 +35379,8 @@ var unsafeOfferAll = (queue, as4) => {
35158
35379
  var unsafePollAll = (queue) => {
35159
35380
  return pipe(queue, pollUpTo(Number.POSITIVE_INFINITY));
35160
35381
  };
35161
- var unsafePollN = (queue, max5) => {
35162
- return pipe(queue, pollUpTo(max5));
35382
+ var unsafePollN = (queue, max6) => {
35383
+ return pipe(queue, pollUpTo(max6));
35163
35384
  };
35164
35385
  var unsafeRemove = (queue, a) => {
35165
35386
  unsafeOfferAll(queue, pipe(unsafePollAll(queue), filter2((b) => a !== b)));
@@ -39950,19 +40171,22 @@ var runMain2 = runMain;
39950
40171
 
39951
40172
  // node_modules/@effect/platform-node/dist/esm/NodeRuntime.js
39952
40173
  var runMain3 = runMain2;
39953
- // src/index.ts
40174
+ // src/defaults.ts
39954
40175
  var DEFAULT_SOURCES = [
39955
40176
  { name: "Svelte 5", url: "https://svelte.dev/docs/svelte/llms.txt" },
39956
40177
  { name: "SvelteKit", url: "https://svelte.dev/docs/kit/llms.txt" },
39957
40178
  { name: "Effect", url: "https://effect.website/llms-full.txt" },
39958
- { name: "Vite", url: "https://vite.dev/llms.txt" }
40179
+ { name: "Vite", url: "https://vite.dev/llms.txt" },
40180
+ { name: "Skeleton", url: "https://www.skeleton.dev/llms-svelte.txt" },
40181
+ { name: "Dexie", url: "https://dexie.org/llms.txt" }
39959
40182
  ];
39960
40183
  var DEFAULT_PROJECT_RULES = [
39961
40184
  "**Always use Bun** for adding packages, running scripts, and testing.",
39962
40185
  "**Svelte 5 Runes:** Use `$state`, `$derived`, and `$effect` as defined in local Svelte context.",
39963
- "**Effect TS:** Follow the patterns defined in the Effect full documentation file.",
39964
- "**Tailwind v4:** Use the new CSS-first configuration method."
40186
+ "**Effect TS:** Follow the patterns defined in the Effect full documentation file."
39965
40187
  ];
40188
+
40189
+ // src/index.ts
39966
40190
  var toFileName = (name) => `${name.toLowerCase().replace(/\s+/g, "-")}.md`;
39967
40191
  var createAgentsConfig = (manifest, projectRules) => `# OpenCode Agent Configuration
39968
40192
  ` + `**Primary Runtime:** Bun (System-wide)
@@ -39979,7 +40203,7 @@ var createAgentsConfig = (manifest, projectRules) => `# OpenCode Agent Configura
39979
40203
  `) + `
39980
40204
  `;
39981
40205
  var ensureDirectory = (dir) => pipe(FileSystem, exports_Effect.flatMap((fs) => fs.makeDirectory(dir, { recursive: true })), exports_Effect.tap(() => exports_Effect.log(`\uD83D\uDCC1 Ensured directory: ${dir}`)));
39982
- var fetchDoc = (source) => pipe(get17(source.url), exports_Effect.flatMap((response) => response.text));
40206
+ var fetchDoc = (source) => pipe(get17(source.url), exports_Effect.flatMap((response) => response.text), exports_Effect.timeout(exports_Duration.seconds(30)));
39983
40207
  var saveDoc = (outputDir, source, content) => pipe(exports_Effect.all([Path2, FileSystem]), exports_Effect.flatMap(([path, fs]) => {
39984
40208
  const fileName = toFileName(source.name);
39985
40209
  const filePath = path.join(outputDir, fileName);
@@ -39996,13 +40220,25 @@ var syncDoc = (outputDir, source) => pipe(fetchDoc(source), exports_Effect.flatM
39996
40220
  filePath,
39997
40221
  status: "success"
39998
40222
  })
39999
- }));
40223
+ }), exports_Effect.catchAll(() => exports_Effect.succeed({
40224
+ name: source.name,
40225
+ filePath: "",
40226
+ status: "failed"
40227
+ })));
40000
40228
  var syncAllDocs = (config) => pipe(exports_Effect.log("\uD83D\uDE80 Starting documentation sync..."), exports_Effect.flatMap(() => ensureDirectory(config.outputDir)), exports_Effect.flatMap(() => exports_Effect.all(config.sources.map((source) => syncDoc(config.outputDir, source)), { concurrency: "unbounded" })));
40001
40229
  var createManifest = (results) => {
40002
40230
  const successful = results.filter((r) => r.status === "success");
40003
40231
  return successful.map((r) => `- **${r.name}**: Refer to "${r.filePath}"`);
40004
40232
  };
40005
- var writeAgentsFile = (agentsFilePath, manifest, projectRules) => pipe(FileSystem, exports_Effect.flatMap((fs) => fs.writeFileString(agentsFilePath, createAgentsConfig(manifest, projectRules))), exports_Effect.tap(() => exports_Effect.log(`
40233
+ var writeAgentsFile = (agentsFilePath, manifest, projectRules) => pipe(FileSystem, exports_Effect.flatMap((fs) => pipe(fs.exists(agentsFilePath), exports_Effect.tap((exists3) => exports_Effect.log(`File exists check: ${exists3} for ${agentsFilePath}`)), exports_Effect.flatMap((exists3) => {
40234
+ const newContent = createAgentsConfig(manifest, projectRules);
40235
+ const separator = `
40236
+
40237
+ ---
40238
+
40239
+ `;
40240
+ return exists3 ? pipe(fs.readFileString(agentsFilePath), exports_Effect.tap((existingContent) => exports_Effect.log(`Read ${existingContent.length} chars from existing file`)), exports_Effect.map((existingContent) => existingContent + separator + newContent), exports_Effect.flatMap((content) => fs.writeFileString(agentsFilePath, content))) : fs.writeFileString(agentsFilePath, newContent);
40241
+ }))), exports_Effect.tap(() => exports_Effect.log(`
40006
40242
  ✨ ${agentsFilePath} has been updated with fresh context references.`)));
40007
40243
  var syncDocs = (config = {}) => {
40008
40244
  const fullConfig = {
@@ -40011,7 +40247,7 @@ var syncDocs = (config = {}) => {
40011
40247
  agentsFile: config.agentsFile ?? "AGENTS.md",
40012
40248
  projectRules: config.projectRules ?? DEFAULT_PROJECT_RULES
40013
40249
  };
40014
- const program = pipe(syncAllDocs(fullConfig), exports_Effect.flatMap((results) => writeAgentsFile(fullConfig.agentsFile ?? "AGENTS.md", createManifest(results), fullConfig.projectRules ?? DEFAULT_PROJECT_RULES)), exports_Effect.provide(exports_NodeFileSystem.layer), exports_Effect.provide(exports_NodePath.layer), exports_Effect.provide(exports_NodeHttpClient.layer), exports_Effect.catchAll((error) => exports_Effect.logError(`Error: ${error}`).pipe(exports_Effect.asVoid)));
40250
+ const program = pipe(syncAllDocs(fullConfig), exports_Effect.flatMap((results) => writeAgentsFile(fullConfig.agentsFile ?? "AGENTS.md", createManifest(results), fullConfig.projectRules ?? DEFAULT_PROJECT_RULES)), exports_Effect.provide(exports_NodeFileSystem.layer), exports_Effect.provide(exports_NodePath.layer), exports_Effect.provide(exports_NodeHttpClient.layer), exports_Effect.timeout(exports_Duration.seconds(60)), exports_Effect.catchAll((error) => pipe(exports_Effect.logError(`Error: ${error}`), exports_Effect.asVoid)));
40015
40251
  return exports_Effect.scoped(program);
40016
40252
  };
40017
40253
  var runCLI = () => {
@@ -40021,10 +40257,8 @@ export {
40021
40257
  toFileName,
40022
40258
  syncDocs,
40023
40259
  runCLI,
40024
- createManifest,
40025
- DEFAULT_SOURCES,
40026
- DEFAULT_PROJECT_RULES
40260
+ createManifest
40027
40261
  };
40028
40262
 
40029
- //# debugId=82A17D161E531C9B64756E2164756E21
40263
+ //# debugId=D946D9AE42C7C49C64756E2164756E21
40030
40264
  //# sourceMappingURL=index.js.map