clanka 0.8.4 → 0.8.5

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.
Files changed (30) hide show
  1. package/dist/AgentSkills.test.js +1 -0
  2. package/dist/AgentSkills.test.js.map +1 -1
  3. package/dist/AgentTools.d.ts.map +1 -1
  4. package/dist/AgentTools.js +2 -1
  5. package/dist/AgentTools.js.map +1 -1
  6. package/dist/Compaction.test.js +1 -0
  7. package/dist/Compaction.test.js.map +1 -1
  8. package/dist/bin/{Effect-BmOuzEIp.mjs → Effect-BEUn4I5E.mjs} +145 -122
  9. package/dist/bin/Effect-BEUn4I5E.mjs.map +1 -0
  10. package/dist/bin/{McpClient-CLpFJSre.mjs → McpClient-C0FVuDj2.mjs} +218 -62
  11. package/dist/bin/McpClient-C0FVuDj2.mjs.map +1 -0
  12. package/dist/bin/{OutputFormatter-C_gdNUl1.mjs → OutputFormatter-DffD5oxX.mjs} +8 -8
  13. package/dist/bin/OutputFormatter-DffD5oxX.mjs.map +1 -0
  14. package/dist/bin/{Schema-C7W9nQug.mjs → Schema-CjUGw2Xh.mjs} +39 -38
  15. package/dist/bin/Schema-CjUGw2Xh.mjs.map +1 -0
  16. package/dist/bin/{SemanticSearch-cqSnq90g.mjs → SemanticSearch-CFB73IPb.mjs} +74 -62
  17. package/dist/bin/SemanticSearch-CFB73IPb.mjs.map +1 -0
  18. package/dist/bin/{Stream-BI6Fx9yq.mjs → Stream-Cu6P7ZHo.mjs} +23 -23
  19. package/dist/bin/{Stream-BI6Fx9yq.mjs.map → Stream-Cu6P7ZHo.mjs.map} +1 -1
  20. package/dist/bin/cli.mjs +267 -188
  21. package/dist/bin/cli.mjs.map +1 -1
  22. package/package.json +14 -14
  23. package/src/AgentSkills.test.ts +1 -0
  24. package/src/AgentTools.ts +2 -1
  25. package/src/Compaction.test.ts +1 -0
  26. package/dist/bin/Effect-BmOuzEIp.mjs.map +0 -1
  27. package/dist/bin/McpClient-CLpFJSre.mjs.map +0 -1
  28. package/dist/bin/OutputFormatter-C_gdNUl1.mjs.map +0 -1
  29. package/dist/bin/Schema-C7W9nQug.mjs.map +0 -1
  30. package/dist/bin/SemanticSearch-cqSnq90g.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Pipeable.js
1
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Pipeable.js
2
2
  const pipeArguments = (self, args) => {
3
3
  switch (args.length) {
4
4
  case 0: return self;
@@ -27,7 +27,7 @@ const Class$2 = function() {
27
27
  return PipeableBase;
28
28
  }();
29
29
  //#endregion
30
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Function.js
30
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Function.js
31
31
  const dual = function(arity, body) {
32
32
  if (typeof arity === "function") return function() {
33
33
  return arity(arguments) ? body.apply(this, arguments) : (self) => body(self, ...arguments);
@@ -117,7 +117,7 @@ function memoizeIdempotent(f) {
117
117
  };
118
118
  }
119
119
  //#endregion
120
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/equal.js
120
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/equal.js
121
121
  const getAllObjectKeys = (obj) => {
122
122
  const keys = new Set(Reflect.ownKeys(obj));
123
123
  if (obj.constructor === Object) return keys;
@@ -135,13 +135,13 @@ const getAllObjectKeys = (obj) => {
135
135
  const byReferenceInstances = new WeakSet();
136
136
  const viewBytes = (view) => new Uint8Array(view.buffer, view.byteOffset, view.byteLength);
137
137
  //#endregion
138
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/hash.js
138
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/hash.js
139
139
  let backEdges = 0;
140
140
  const addBackEdge = () => {
141
141
  backEdges++;
142
142
  };
143
143
  //#endregion
144
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Predicate.js
144
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Predicate.js
145
145
  function isString(input) {
146
146
  return typeof input === "string";
147
147
  }
@@ -203,7 +203,7 @@ function isIterable(input) {
203
203
  }
204
204
  const or = dual(2, (self, that) => (a) => self(a) || that(a));
205
205
  //#endregion
206
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Hash.js
206
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Hash.js
207
207
  const symbol$1 = "~effect/Hash";
208
208
  const hash = (self) => {
209
209
  switch (typeof self) {
@@ -292,7 +292,7 @@ const randomHashCache = new WeakMap();
292
292
  const hashCache = new WeakMap();
293
293
  const visitedObjects = new WeakSet();
294
294
  //#endregion
295
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Equal.js
295
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Equal.js
296
296
  const symbol = "~effect/Equal";
297
297
  function equals$1() {
298
298
  if (arguments.length === 1) return (self) => compareBoth(self, arguments[0]);
@@ -404,7 +404,7 @@ const byReferenceUnsafe = (obj) => {
404
404
  return obj;
405
405
  };
406
406
  //#endregion
407
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Redactable.js
407
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Redactable.js
408
408
  const symbolRedactable = Symbol.for("~effect/Redactable");
409
409
  const isRedactable = (u) => hasProperty(u, symbolRedactable);
410
410
  function redact(u) {
@@ -426,7 +426,7 @@ const emptyContext$1 = {
426
426
  }
427
427
  };
428
428
  //#endregion
429
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Formatter.js
429
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Formatter.js
430
430
  function format$1(input, options) {
431
431
  const space = options?.space ?? 0;
432
432
  const ancestors = new WeakSet();
@@ -532,7 +532,7 @@ function formatJson(input, options) {
532
532
  }, options?.space) ?? "null";
533
533
  }
534
534
  //#endregion
535
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Inspectable.js
535
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Inspectable.js
536
536
  const NodeInspectSymbol = Symbol.for("nodejs.util.inspect.custom");
537
537
  const toJson = (input) => {
538
538
  try {
@@ -572,7 +572,7 @@ var Class$1 = class {
572
572
  }
573
573
  };
574
574
  //#endregion
575
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/stackTraceLimit.js
575
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/stackTraceLimit.js
576
576
  const isStackTraceLimitWritable = () => {
577
577
  const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
578
578
  if (desc === void 0) return Object.isExtensible(Error);
@@ -584,7 +584,7 @@ const setStackTraceLimit = (value) => {
584
584
  if (canWriteStackTraceLimit) Error.stackTraceLimit = value;
585
585
  };
586
586
  //#endregion
587
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Utils.js
587
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Utils.js
588
588
  var SingleShotGen = class {
589
589
  constructor(self) {
590
590
  this.value = self;
@@ -616,7 +616,7 @@ const pickInternalCall = () => {
616
616
  };
617
617
  const internalCall = pickInternalCall();
618
618
  //#endregion
619
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/record.js
619
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/record.js
620
620
  function assignProperty(self, key, value) {
621
621
  if (key === "__proto__") Object.defineProperty(self, key, {
622
622
  value,
@@ -630,7 +630,7 @@ function assignProperties(self, source) {
630
630
  for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProperty(self, key, source[key]);
631
631
  }
632
632
  //#endregion
633
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/core.js
633
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/core.js
634
634
  const EffectTypeId = `~effect/Effect`;
635
635
  const ExitTypeId = `~effect/Exit`;
636
636
  const effectVariance = {
@@ -780,6 +780,25 @@ var Fail = class extends ReasonBase {
780
780
  }
781
781
  };
782
782
  const causeFromReasons = (reasons) => new CauseImpl(reasons);
783
+ const dedupeReasons = (self, that) => {
784
+ const buckets = new Map();
785
+ const out = [];
786
+ for (const reason of self.concat(that)) {
787
+ const hash$2 = hash(reason);
788
+ const bucket = buckets.get(hash$2);
789
+ if (bucket === void 0) buckets.set(hash$2, [reason]);
790
+ else if (bucket.some((previous) => equals$1(previous, reason))) continue;
791
+ else bucket.push(reason);
792
+ out.push(reason);
793
+ }
794
+ return out;
795
+ };
796
+ const causeCombine = dual(2, (self, that) => {
797
+ if (self.reasons.length === 0) return that;
798
+ else if (that.reasons.length === 0) return self;
799
+ const newCause = new CauseImpl(dedupeReasons(self.reasons, that.reasons));
800
+ return equals$1(self, newCause) ? self : newCause;
801
+ });
783
802
  const causeEmpty = new CauseImpl([]);
784
803
  const causeFail = (error) => new CauseImpl([new Fail(error)]);
785
804
  var Die = class extends ReasonBase {
@@ -886,7 +905,17 @@ const exitFailCause = makeExit({
886
905
  annotated = true;
887
906
  }
888
907
  let cont = fiber.getCont(contE);
889
- while (fiber.interruptible && fiber._interruptedCause && cont) cont = fiber.getCont(contE);
908
+ const interruptedCause = fiber._interruptedCause;
909
+ if (interruptedCause && fiber.interruptible) {
910
+ let skippedHandler = false;
911
+ while (cont && fiber.interruptible) {
912
+ skippedHandler ||= identifier in cont;
913
+ cont = fiber.getCont(contE);
914
+ }
915
+ if (skippedHandler) cause = causeFromReasons(cause.reasons.filter((reason) => reason._tag !== "Fail"));
916
+ cause = causeCombine(cause, interruptedCause);
917
+ annotated = true;
918
+ }
890
919
  return cont ? cont[contE](cause, fiber, annotated ? void 0 : this) : fiber.yieldWith(annotated ? exitFailCause(cause) : this);
891
920
  }
892
921
  });
@@ -967,13 +996,13 @@ const done$2 = (value) => {
967
996
  return exitFail(Done$1(value));
968
997
  };
969
998
  //#endregion
970
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Effectable.js
999
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Effectable.js
971
1000
  const Prototype = (options) => makePrimitiveProto({
972
1001
  op: options.label,
973
1002
  [evaluate]: options.evaluate
974
1003
  });
975
1004
  //#endregion
976
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Equivalence.js
1005
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Equivalence.js
977
1006
  const make$5 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
978
1007
  const isStrictEquivalent = (x, y) => x === y;
979
1008
  const strictEqual = () => isStrictEquivalent;
@@ -992,7 +1021,7 @@ function Array_(item) {
992
1021
  });
993
1022
  }
994
1023
  //#endregion
995
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/option.js
1024
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/option.js
996
1025
  const TypeId$7 = "~effect/Option";
997
1026
  const CommonProto$1 = {
998
1027
  [TypeId$7]: { _A: (_) => _ },
@@ -1054,7 +1083,7 @@ const SomeImpl = function(value) {
1054
1083
  SomeImpl.prototype = SomeProto;
1055
1084
  const some$1 = (value) => new SomeImpl(value);
1056
1085
  //#endregion
1057
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/result.js
1086
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/result.js
1058
1087
  const TypeId$6 = "~effect/Result";
1059
1088
  const CommonProto = {
1060
1089
  [TypeId$6]: {
@@ -1120,7 +1149,7 @@ const SuccessImpl = function(success) {
1120
1149
  SuccessImpl.prototype = SuccessProto;
1121
1150
  const succeed$5 = (success) => new SuccessImpl(success);
1122
1151
  //#endregion
1123
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Order.js
1152
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Order.js
1124
1153
  function make$4(compare) {
1125
1154
  return (self, that) => self === that ? 0 : compare(self, that);
1126
1155
  }
@@ -1140,7 +1169,7 @@ const isLessThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== 1);
1140
1169
  const isGreaterThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== -1);
1141
1170
  const min$2 = (O) => dual(2, (self, that) => self === that || O(self, that) < 1 ? self : that);
1142
1171
  //#endregion
1143
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Option.js
1172
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Option.js
1144
1173
  const none = () => none$1;
1145
1174
  const some = some$1;
1146
1175
  const isOption = isOption$1;
@@ -1192,7 +1221,7 @@ const toArray = (self) => isNone(self) ? [] : [self.value];
1192
1221
  const filter = dual(2, (self, predicate) => isNone(self) ? none() : predicate(self.value) ? some(self.value) : none());
1193
1222
  const exists = dual(2, (self, refinement) => isNone(self) ? false : refinement(self.value));
1194
1223
  //#endregion
1195
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Context.js
1224
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Context.js
1196
1225
  const ServiceTypeId = "~effect/Context/Service";
1197
1226
  const Service = function() {
1198
1227
  function KeyClass() {}
@@ -1378,7 +1407,7 @@ const mergeAll$1 = (...ctxs) => {
1378
1407
  };
1379
1408
  const Reference = Service;
1380
1409
  //#endregion
1381
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Duration.js
1410
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Duration.js
1382
1411
  const TypeId$4 = "~effect/Duration";
1383
1412
  const bigint0$1 = BigInt(0);
1384
1413
  const bigint1 = BigInt(1);
@@ -1674,10 +1703,10 @@ const format = (self) => {
1674
1703
  return pieces.join(" ");
1675
1704
  };
1676
1705
  //#endregion
1677
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/array.js
1706
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/array.js
1678
1707
  const isArrayNonEmpty$1 = (self) => self.length > 0;
1679
1708
  //#endregion
1680
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Result.js
1709
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Result.js
1681
1710
  const succeed$4 = succeed$5;
1682
1711
  const fail$4 = fail$5;
1683
1712
  const failVoid = fail$4(void 0);
@@ -1705,7 +1734,7 @@ const getOrThrowWith = dual(2, (self, onFailure) => {
1705
1734
  });
1706
1735
  const getOrThrow = getOrThrowWith(identity);
1707
1736
  //#endregion
1708
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Iterable.js
1737
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Iterable.js
1709
1738
  const headUnsafe = (self) => {
1710
1739
  const result = self[Symbol.iterator]().next();
1711
1740
  if (result.done) throw new Error("headUnsafe: empty iterable");
@@ -1733,7 +1762,7 @@ const constEmptyIterator = { next() {
1733
1762
  } };
1734
1763
  const empty$2 = () => constEmpty;
1735
1764
  //#endregion
1736
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Array.js
1765
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Array.js
1737
1766
  const Array$1 = globalThis.Array;
1738
1767
  const fromIterable = (collection) => Array$1.isArray(collection) ? collection : Array$1.from(collection);
1739
1768
  const match$2 = dual(2, (self, { onEmpty, onNonEmpty }) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(self) : onEmpty());
@@ -1802,7 +1831,7 @@ const flatMapNullishOr = dual(2, (self, f) => flatMap$3(self, (a) => fromNullish
1802
1831
  const makeEquivalence = Array_;
1803
1832
  const join = dual(2, (self, sep) => fromIterable(self).join(sep));
1804
1833
  //#endregion
1805
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Scheduler.js
1834
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Scheduler.js
1806
1835
  const Scheduler = Reference("effect/Scheduler", {
1807
1836
  fiberCached: true,
1808
1837
  defaultValue: () => new MixedScheduler()
@@ -1906,7 +1935,7 @@ const PreventSchedulerYield = Reference("effect/Scheduler/PreventSchedulerYield"
1906
1935
  defaultValue: () => false
1907
1936
  });
1908
1937
  //#endregion
1909
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/encoding/Hex.js
1938
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/encoding/Hex.js
1910
1939
  const random = (length) => {
1911
1940
  switch (length) {
1912
1941
  case 16: return random16();
@@ -1937,7 +1966,7 @@ const random32 = () => {
1937
1966
  return String.fromCharCode(hexCharCodes[a >>> 28], hexCharCodes[a >>> 24 & 15], hexCharCodes[a >>> 20 & 15], hexCharCodes[a >>> 16 & 15], hexCharCodes[a >>> 12 & 15], hexCharCodes[a >>> 8 & 15], hexCharCodes[a >>> 4 & 15], hexCharCodes[a & 15], hexCharCodes[b >>> 28], hexCharCodes[b >>> 24 & 15], hexCharCodes[b >>> 20 & 15], hexCharCodes[b >>> 16 & 15], hexCharCodes[b >>> 12 & 15], hexCharCodes[b >>> 8 & 15], hexCharCodes[b >>> 4 & 15], hexCharCodes[b & 15], hexCharCodes[c >>> 28], hexCharCodes[c >>> 24 & 15], hexCharCodes[c >>> 20 & 15], hexCharCodes[c >>> 16 & 15], hexCharCodes[c >>> 12 & 15], hexCharCodes[c >>> 8 & 15], hexCharCodes[c >>> 4 & 15], hexCharCodes[c & 15], hexCharCodes[d >>> 28], hexCharCodes[d >>> 24 & 15], hexCharCodes[d >>> 20 & 15], hexCharCodes[d >>> 16 & 15], hexCharCodes[d >>> 12 & 15], hexCharCodes[d >>> 8 & 15], hexCharCodes[d >>> 4 & 15], hexCharCodes[d & 15]);
1938
1967
  };
1939
1968
  //#endregion
1940
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Tracer.js
1969
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Tracer.js
1941
1970
  const ParentSpanKey = "effect/Tracer/ParentSpan";
1942
1971
  var ParentSpan = class extends Service()(ParentSpanKey, { fiberCached: true }) {};
1943
1972
  const make$1 = (options) => options;
@@ -2008,10 +2037,10 @@ var NativeSpan = class {
2008
2037
  }
2009
2038
  };
2010
2039
  //#endregion
2011
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/metric.js
2040
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/metric.js
2012
2041
  const FiberRuntimeMetricsKey = "effect/Metric/FiberRuntimeMetrics";
2013
2042
  //#endregion
2014
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/references.js
2043
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/references.js
2015
2044
  const CurrentStackFrame = Reference("effect/References/CurrentStackFrame", {
2016
2045
  fiberCached: true,
2017
2046
  defaultValue: constUndefined
@@ -2034,7 +2063,7 @@ const MinimumLogLevel$1 = Reference("effect/References/MinimumLogLevel", {
2034
2063
  });
2035
2064
  const CurrentLogSpans$1 = Reference("effect/References/CurrentLogSpans", { defaultValue: () => [] });
2036
2065
  //#endregion
2037
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/tracer.js
2066
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/tracer.js
2038
2067
  const addSpanStackTrace = (options) => {
2039
2068
  if (options?.captureStackTrace === false) return options;
2040
2069
  else if (options?.captureStackTrace !== void 0 && typeof options.captureStackTrace !== "boolean") return options;
@@ -2066,7 +2095,7 @@ const makeStackCleaner = (line) => (stack) => {
2066
2095
  };
2067
2096
  const spanCleaner = makeStackCleaner(3);
2068
2097
  //#endregion
2069
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/effect.js
2098
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/effect.js
2070
2099
  var Interrupt = class extends ReasonBase {
2071
2100
  constructor(fiberId, annotations = constEmptyAnnotations) {
2072
2101
  super("Interrupt", annotations, "Interrupted");
@@ -2122,25 +2151,6 @@ const causeInterruptors = (self) => {
2122
2151
  };
2123
2152
  const emptySet = new Set();
2124
2153
  const hasInterruptsOnly$1 = (self) => self.reasons.length > 0 && self.reasons.every(isInterruptReason);
2125
- const dedupeReasons = (self, that) => {
2126
- const buckets = new Map();
2127
- const out = [];
2128
- for (const reason of self.concat(that)) {
2129
- const hash$1 = hash(reason);
2130
- const bucket = buckets.get(hash$1);
2131
- if (bucket === void 0) buckets.set(hash$1, [reason]);
2132
- else if (bucket.some((previous) => equals$1(previous, reason))) continue;
2133
- else bucket.push(reason);
2134
- out.push(reason);
2135
- }
2136
- return out;
2137
- };
2138
- const causeCombine = dual(2, (self, that) => {
2139
- if (self.reasons.length === 0) return that;
2140
- else if (that.reasons.length === 0) return self;
2141
- const newCause = new CauseImpl(dedupeReasons(self.reasons, that.reasons));
2142
- return equals$1(self, newCause) ? self : newCause;
2143
- });
2144
2154
  const causeMap = dual(2, (self, f) => {
2145
2155
  let hasFail = false;
2146
2156
  const failures = self.reasons.map((failure) => {
@@ -2274,6 +2284,14 @@ const fiberVariance = {
2274
2284
  _E: identity
2275
2285
  };
2276
2286
  const fiberIdStore = { id: 0 };
2287
+ const AsyncResource = (() => {
2288
+ try {
2289
+ return globalThis.process?.getBuiltinModule?.("node:async_hooks")?.AsyncResource;
2290
+ } catch {
2291
+ return;
2292
+ }
2293
+ })();
2294
+ const captureAsyncContext = () => AsyncResource === void 0 ? void 0 : new AsyncResource("effect/Fiber");
2277
2295
  const getCurrentFiber = () => globalThis[currentFiberTypeId];
2278
2296
  var FiberImpl = class {
2279
2297
  constructor(context, interruptible = true) {
@@ -2290,6 +2308,7 @@ var FiberImpl = class {
2290
2308
  this._running = false;
2291
2309
  this._deferredInterrupt = false;
2292
2310
  this._parent = void 0;
2311
+ this._asyncContext = void 0;
2293
2312
  this.cache.runtimeMetrics?.recordFiberStart(this.context);
2294
2313
  }
2295
2314
  get [FiberTypeId]() {
@@ -2331,13 +2350,20 @@ var FiberImpl = class {
2331
2350
  }
2332
2351
  evaluate(effect) {
2333
2352
  if (this._exit) return;
2334
- else if (this._yielded !== void 0) {
2353
+ else if (this._asyncContext !== void 0) {
2354
+ const asyncContext = this._asyncContext;
2355
+ this._asyncContext = void 0;
2356
+ return asyncContext.runInAsyncScope(this.evaluate, this, effect);
2357
+ } else if (this._yielded !== void 0) {
2335
2358
  const yielded = this._yielded;
2336
2359
  this._yielded = void 0;
2337
2360
  yielded();
2338
2361
  }
2339
2362
  const exit = this.runLoop(effect);
2340
- if (exit === Yield) return;
2363
+ if (exit === Yield) {
2364
+ this._asyncContext = captureAsyncContext();
2365
+ return;
2366
+ }
2341
2367
  const interruptChildren = fiberMiddleware.interruptChildren && fiberMiddleware.interruptChildren(this);
2342
2368
  if (interruptChildren !== void 0) return this.evaluate(flatMap$2(interruptChildren, () => exit));
2343
2369
  this._exit = exit;
@@ -2607,17 +2633,17 @@ const tryPromise$1 = (options) => {
2607
2633
  const f = typeof options === "function" ? options : options.try;
2608
2634
  const catcher = typeof options === "function" ? (cause) => new UnknownError$1(cause, "An error occurred in Effect.tryPromise") : options.catch;
2609
2635
  return callbackOptions(function(resume, signal) {
2610
- const failWithCatch = (cause) => {
2636
+ const failWithCatch = (cause) => suspend$1(() => {
2611
2637
  try {
2612
- resume(fail$3(internalCall(() => catcher(cause))));
2638
+ return fail$3(internalCall(() => catcher(cause)));
2613
2639
  } catch (err) {
2614
- resume(die$3(err));
2640
+ return die$3(err);
2615
2641
  }
2616
- };
2642
+ });
2617
2643
  try {
2618
- f(signal).then((a) => resume(succeed$3(a)), failWithCatch);
2644
+ f(signal).then((a) => resume(succeed$3(a)), (e) => resume(failWithCatch(e)));
2619
2645
  } catch (err) {
2620
- failWithCatch(err);
2646
+ resume(failWithCatch(err));
2621
2647
  }
2622
2648
  }, f.length !== 0);
2623
2649
  };
@@ -2963,6 +2989,10 @@ const OnFailureImpl = function(self, f) {
2963
2989
  this[contE] = f;
2964
2990
  };
2965
2991
  OnFailureImpl.prototype = OnFailureProto;
2992
+ const catchCauseIf$1 = dual(3, (self, predicate, f) => catchCause$1(self, (cause) => {
2993
+ if (!predicate(cause)) return failCause$3(cause);
2994
+ return f(cause);
2995
+ }));
2966
2996
  const catchCauseFilter = dual(3, (self, filter, f) => catchCause$1(self, (cause) => {
2967
2997
  const eb = filter(cause);
2968
2998
  return isFailure$1(eb) ? failCause$3(eb.failure) : f(eb.success, cause);
@@ -3296,58 +3326,46 @@ const onErrorFilter = dual(3, (self, filter, f) => onExit$1(self, (exit) => {
3296
3326
  }));
3297
3327
  const onInterrupt$1 = dual(2, (self, finalizer) => onErrorFilter(causeFilterInterruptors, finalizer)(self));
3298
3328
  const acquireUseRelease$1 = (acquire, use, release) => uninterruptibleMask$1((restore) => flatMap$2(acquire, (a) => onExitPrimitive$1(suspend$1(() => restore(use(a))), (exit) => release(a, exit), true)));
3299
- const cachedInvalidateWithTTL = dual(2, (self, ttl) => sync$1(() => {
3300
- const ttlMillis = typeof ttl === "function" ? (exit) => toMillis(fromInputUnsafe(ttl(exit))) : constant(toMillis(fromInputUnsafe(ttl)));
3301
- const latch = makeLatchUnsafe(false);
3329
+ const cachedInvalidateWithTTL = dual(2, (self, ttl) => sync$1(() => makeCachedUnsafe(self, typeof ttl === "function" ? (exit) => toMillis(fromInputUnsafe(ttl(exit))) : constant(toMillis(fromInputUnsafe(ttl))))));
3330
+ const infiniteTTL = constant(Infinity);
3331
+ const makeCachedUnsafe = (self, ttlMillis) => {
3302
3332
  let expiresAt = 0;
3303
- let running = false;
3304
3333
  let exit;
3305
- const wait = flatMap$2(latch.await, () => exit);
3334
+ let current;
3335
+ const join = (fiber, run) => {
3336
+ run.awaiters++;
3337
+ onExitUnsafe(fiber, () => {
3338
+ if (--run.awaiters > 0 || current !== run) return;
3339
+ current = void 0;
3340
+ return fiberInterrupt(run.fiber);
3341
+ });
3342
+ return fiberJoin(run.fiber);
3343
+ };
3306
3344
  return [withFiber$1((fiber) => {
3307
- const clock = fiber.getRef(ClockRef);
3308
- const now = expiresAt === Infinity ? 0 : clock.currentTimeMillisUnsafe();
3309
- if (running || now < expiresAt) return exit ?? wait;
3310
- running = true;
3311
- latch.closeUnsafe();
3345
+ if (current !== void 0) return join(fiber, current);
3346
+ if (exit !== void 0 && (expiresAt === Infinity || fiber.getRef(ClockRef).currentTimeMillisUnsafe() < expiresAt)) return exit;
3312
3347
  exit = void 0;
3313
- onExitUnsafe(fiber, (exit_) => sync$1(() => {
3314
- try {
3315
- const duration = ttlMillis(exit_);
3316
- expiresAt = clock.currentTimeMillisUnsafe() + duration;
3317
- exit = exit_;
3318
- } catch (error) {
3319
- const cause = causeDie(error);
3320
- exit = exitFailCause(exitIsFailure(exit_) ? causeCombine(exit_.cause, cause) : cause);
3321
- throw error;
3322
- } finally {
3323
- running = false;
3324
- latch.openUnsafe();
3325
- }
3326
- }));
3327
- return self;
3348
+ const clock = fiber.getRef(ClockRef);
3349
+ const run = {
3350
+ fiber: void 0,
3351
+ awaiters: 0
3352
+ };
3353
+ current = run;
3354
+ run.fiber = forkUnsafe$1(fiber, onExitPrimitive$1(self, (exit_) => {
3355
+ if (current !== run) return;
3356
+ current = void 0;
3357
+ if (exitHasInterrupts(exit_)) return;
3358
+ const duration = ttlMillis(exit_);
3359
+ expiresAt = duration === Infinity ? Infinity : clock.currentTimeMillisUnsafe() + duration;
3360
+ exit = exit_;
3361
+ }), true, true);
3362
+ return run.fiber._exit ?? join(fiber, run);
3328
3363
  }), sync$1(() => {
3329
- expiresAt = 0;
3330
- latch.closeUnsafe();
3331
3364
  exit = void 0;
3332
3365
  })];
3333
- }));
3366
+ };
3334
3367
  const cachedWithTTL$1 = dual(2, (self, timeToLive) => map$2(cachedInvalidateWithTTL(self, timeToLive), (tuple) => tuple[0]));
3335
- const cached$1 = (self) => sync$1(() => {
3336
- const latch = makeLatchUnsafe(false);
3337
- let started = false;
3338
- let exit;
3339
- const wait = flatMap$2(latch.await, () => exit);
3340
- return withFiber$1((fiber) => {
3341
- if (exit !== void 0) return exit;
3342
- if (started) return wait;
3343
- started = true;
3344
- onExitUnsafe(fiber, (result) => sync$1(() => {
3345
- exit = result;
3346
- latch.openUnsafe();
3347
- }));
3348
- return self;
3349
- });
3350
- });
3368
+ const cached$1 = (self) => sync$1(() => makeCachedUnsafe(self, infiniteTTL)[0]);
3351
3369
  const interrupt$2 = withFiber$1((fiber) => failCause$3(causeInterrupt(fiber.id)));
3352
3370
  const uninterruptible$1 = (self) => withFiber$1((fiber) => {
3353
3371
  if (!fiber.interruptible) return self;
@@ -3581,7 +3599,10 @@ const forkUnsafe$1 = (parent, effect, immediate = false, daemon = false, uninter
3581
3599
  const interruptible = uninterruptible === "inherit" ? parentRuntime.interruptible : !uninterruptible;
3582
3600
  const child = new FiberImpl(parentRuntime.context, interruptible);
3583
3601
  if (immediate) child.evaluate(effect);
3584
- else parentRuntime.currentDispatcher.scheduleTask(() => child.evaluate(effect), 0);
3602
+ else {
3603
+ child._asyncContext = captureAsyncContext();
3604
+ parentRuntime.currentDispatcher.scheduleTask(() => child.evaluate(effect), 0);
3605
+ }
3585
3606
  if (!daemon && !child._exit) {
3586
3607
  parentRuntime.children().add(child);
3587
3608
  child._parent = parentRuntime;
@@ -3892,6 +3913,7 @@ const wallTimeNanos = function() {
3892
3913
  const clockWith$1 = (f) => withFiber$1((fiber) => f(fiber.getRef(ClockRef)));
3893
3914
  const sleep$1 = (duration) => clockWith$1((clock) => clock.sleep(fromInputUnsafe(duration)));
3894
3915
  const currentTimeMillis = clockWith$1((clock) => clock.currentTimeMillis);
3916
+ const monotonicTimeNanos = clockWith$1((clock) => clock.monotonicTimeNanos);
3895
3917
  const TimeoutErrorTypeId = "~effect/Cause/TimeoutError";
3896
3918
  const isTimeoutError$1 = (u) => hasProperty(u, TimeoutErrorTypeId);
3897
3919
  var TimeoutError$1 = class extends TaggedError("TimeoutError") {
@@ -4045,7 +4067,7 @@ function interruptChildrenPatch() {
4045
4067
  }
4046
4068
  const undefined_$1 = succeed$3(void 0);
4047
4069
  //#endregion
4048
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Exit.js
4070
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Exit.js
4049
4071
  const isExit = isExit$1;
4050
4072
  const succeed$2 = exitSucceed;
4051
4073
  const failCause$2 = exitFailCause;
@@ -4056,7 +4078,7 @@ const void_$1 = exitVoid;
4056
4078
  const isSuccess = exitIsSuccess;
4057
4079
  const isFailure = exitIsFailure;
4058
4080
  //#endregion
4059
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Deferred.js
4081
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Deferred.js
4060
4082
  const TypeId$3 = "~effect/Deferred";
4061
4083
  const DeferredProto = {
4062
4084
  [TypeId$3]: {
@@ -4102,13 +4124,13 @@ const doneUnsafe = (self, effect) => {
4102
4124
  };
4103
4125
  const into = dual(2, (self, deferred) => uninterruptibleMask$1((restore) => flatMap$2(exit$1(restore(self)), (exit) => done$1(deferred, exit))));
4104
4126
  //#endregion
4105
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/References.js
4127
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/References.js
4106
4128
  const CurrentLogAnnotations = CurrentLogAnnotations$1;
4107
4129
  const CurrentLogSpans = CurrentLogSpans$1;
4108
4130
  const MinimumLogLevel = MinimumLogLevel$1;
4109
4131
  const TracerTimingEnabled = TracerTimingEnabled$1;
4110
4132
  //#endregion
4111
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Scope.js
4133
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Scope.js
4112
4134
  const Scope = scopeTag;
4113
4135
  const make = scopeMake;
4114
4136
  const makeUnsafe = scopeMakeUnsafe;
@@ -4118,7 +4140,7 @@ const addFinalizer$1 = scopeAddFinalizer;
4118
4140
  const forkUnsafe = scopeForkUnsafe;
4119
4141
  const close = scopeClose;
4120
4142
  //#endregion
4121
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Layer.js
4143
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Layer.js
4122
4144
  const TypeId$2 = "~effect/Layer";
4123
4145
  const MemoMapTypeId = "~effect/Layer/MemoMap";
4124
4146
  const makeMemoMapEntry = (memoMap, layer) => {
@@ -4273,7 +4295,7 @@ const makeUnimplemented = (error) => {
4273
4295
  const StreamTypeId = "~effect/Stream";
4274
4296
  const ChannelTypeId = "~effect/Channel";
4275
4297
  //#endregion
4276
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Cause.js
4298
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Cause.js
4277
4299
  const isCause = isCause$1;
4278
4300
  const isReason = isCauseReason;
4279
4301
  const isFailReason = isFailReason$1;
@@ -4302,7 +4324,7 @@ const UnknownError = UnknownError$1;
4302
4324
  const annotate = causeAnnotate;
4303
4325
  var StackTrace = class extends Service()("effect/Cause/StackTrace") {};
4304
4326
  //#endregion
4305
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/random.js
4327
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/random.js
4306
4328
  const Random = Reference("effect/Random", { defaultValue: () => ({
4307
4329
  nextIntUnsafe() {
4308
4330
  return Math.floor(Math.random() * (Number.MAX_SAFE_INTEGER - Number.MIN_SAFE_INTEGER + 1)) + Number.MIN_SAFE_INTEGER;
@@ -4322,7 +4344,7 @@ const nextBetween = (min, max, draw) => {
4322
4344
  return view.getFloat64(0);
4323
4345
  };
4324
4346
  //#endregion
4325
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Pull.js
4347
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Pull.js
4326
4348
  const catchDone = dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
4327
4349
  const isDoneCause = (cause) => cause.reasons.some(isDoneFailure);
4328
4350
  const isDoneFailure = (failure) => failure._tag === "Fail" && isDone(failure.error);
@@ -4350,7 +4372,7 @@ const matchEffect$1 = dual(2, (self, options) => matchCauseEffect$1(self, {
4350
4372
  }
4351
4373
  }));
4352
4374
  //#endregion
4353
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Schedule.js
4375
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Schedule.js
4354
4376
  const TypeId$1 = "~effect/Schedule";
4355
4377
  const randomNext = Random.useSync((random) => random.nextDoubleUnsafe());
4356
4378
  const CurrentMetadata = Reference("effect/Schedule/CurrentMetadata", { defaultValue: constant({
@@ -4474,11 +4496,11 @@ const while_ = dual(2, (self, predicate) => fromStep(map$2(toStep(self), (step)
4474
4496
  })));
4475
4497
  const forever$1 = spaced(zero);
4476
4498
  //#endregion
4477
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/layer.js
4499
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/layer.js
4478
4500
  const provideLayer = (self, layer, options) => scopedWith$1((scope) => flatMap$2(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope) : buildWithScope(layer, scope), (context) => provideContext$1(self, context)));
4479
4501
  const provide$1 = dual((args) => isEffect$1(args[0]), (self, source, options) => isContext(source) ? provideContext$1(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll(...source) : source, options));
4480
4502
  //#endregion
4481
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/schedule.js
4503
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/schedule.js
4482
4504
  const repeatOrElse = dual(3, (self, schedule, orElse) => flatMap$2(toStepWithMetadata(schedule), (step) => {
4483
4505
  let meta = CurrentMetadata.defaultValue();
4484
4506
  return catch_$1(forever$2(tap$1(flatMap$2(suspend$1(() => provideService$1(self, CurrentMetadata, meta)), step), (meta_) => sync$1(() => {
@@ -4520,7 +4542,7 @@ const buildFromOptions = (options) => {
4520
4542
  return schedule;
4521
4543
  };
4522
4544
  //#endregion
4523
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Request.js
4545
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Request.js
4524
4546
  const TypeId = "~effect/Request";
4525
4547
  const requestVariance = byReferenceUnsafe({
4526
4548
  _E: (_) => _,
@@ -4545,7 +4567,7 @@ const TaggedClass = (tag) => {
4545
4567
  };
4546
4568
  const makeEntry = (options) => options;
4547
4569
  //#endregion
4548
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/request.js
4570
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/request.js
4549
4571
  const request$1 = dual(2, (self, resolver) => {
4550
4572
  const withResolver = (resolver) => callback$1((resume) => {
4551
4573
  const entry = addEntry(resolver, self, resume, getCurrentFiber());
@@ -4641,7 +4663,7 @@ function runBatch(batch) {
4641
4663
  return batch.run;
4642
4664
  }
4643
4665
  //#endregion
4644
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Effect.js
4666
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Effect.js
4645
4667
  const isEffect = isEffect$1;
4646
4668
  const all = all$1;
4647
4669
  const forEach = forEach$1;
@@ -4687,6 +4709,7 @@ const catchDefect = catchDefect$1;
4687
4709
  const catchIf = catchIf$1;
4688
4710
  const catchFilter = catchFilter$1;
4689
4711
  const catchNoSuchElement = catchNoSuchElement$1;
4712
+ const catchCauseIf = catchCauseIf$1;
4690
4713
  const mapError = mapError$1;
4691
4714
  const orDie = orDie$2;
4692
4715
  const tapCause = tapCause$1;
@@ -4781,6 +4804,6 @@ const flatMapEager = flatMapEager$1;
4781
4804
  const catchEager = catchEager$1;
4782
4805
  const fnUntracedEager = fnUntracedEager$1;
4783
4806
  //#endregion
4784
- export { isEffect as $, match$5 as $a, fail$4 as $i, buildWithScope as $n, hasProperty as $o, exitInterrupt as $r, uninterruptibleMask as $t, ensuring as A, getOrUndefinedUnsafe as Aa, Array$1 as Ai, StackTrace as An, getStackTraceLimit as Ao, isDone$1 as Ar, pipe as As, result as At, fnUntraced as B, flatten$3 as Ba, isArrayNonEmpty as Bi, hasInterrupts as Bn, formatPropertyKey as Bo, succeed$2 as Br, sleep as Bt, catch_ as C, Reference as Ca, suspend$1 as Ci, isDoneCause as Cn, causeFail as Co, MinimumLogLevel as Cr, constVoid as Cs, promise as Ct, delay as D, get as Da, void_$2 as Di, Done as Dn, withFiber$1 as Do, doneUnsafe as Dr, identity as Ds, raceFirst as Dt, contextWith as E, empty$3 as Ea, updateContext$1 as Ei, nextBetween as En, exitSucceed as Eo, done$1 as Er, flow as Es, provideService as Et, filterOrFail as F, all$2 as Fa, findFirstIndex as Fi, done as Fn, toJson as Fo, failCause$2 as Fr, runSyncExit as Ft, forkIn as G, getOrNull as Ga, makeEquivalence as Gi, isReason as Gn, symbol as Go, andThen$1 as Gr, tap as Gt, forEach as H, fromNullishOr$1 as Ha, isReadonlyArrayNonEmpty as Hi, interruptors as Hn, symbolRedactable as Ho, ClockRef as Hr, succeedNone as Ht, flatMap as I, exists as Ia, findLast as Ii, fail$1 as In, format$1 as Io, interrupt$1 as Ir, scope as It, fromResult as J, isNone as Ja, of as Ji, makeFailReason as Jn, hash as Jo, contextWith$1 as Jr, timeoutOrElse as Jt, forkScoped as K, getOrThrow$1 as Ka, map$3 as Ki, isTimeoutError as Kn, array as Ko, asSome$1 as Kr, tapCause as Kt, flatMapEager as L, filter as La, flatMapNullishOr as Li, filterInterruptors as Ln, formatDate as Lo, isExit as Lr, scoped as Lt, fail as M, make$3 as Ma, appendAll as Mi, UnknownError as Mn, BaseProto as Mo, makeUnsafe$1 as Mr, Prototype$1 as Ms, runFork as Mt, failCause as N, makeUnsafe$2 as Na, empty$1 as Ni, annotate as Nn, Class$1 as No, die$2 as Nr, pipeArguments as Ns, runForkWith as Nt, die as O, getOption as Oa, DisablePropagation as Oi, IllegalArgumentError as On, assignProperties as Oo, interruptWith as Or, memoize as Os, repeat as Ot, failCauseSync as P, merge$1 as Pa, findFirst as Pi, die$1 as Pn, NodeInspectSymbol as Po, fail$2 as Pr, runSync as Pt, interruptible as Q, map$5 as Qa, headUnsafe as Qi, squash as Qn, symbol$1 as Qo, exitHasInterrupts as Qr, uninterruptible as Qt, flatten as R, flatMap$4 as Ra, fromIterable as Ri, findError as Rn, formatJson as Ro, isFailure as Rr, scopedWith as Rt, catchTags as S, zero as Sa, succeedNone$1 as Si, filterDone as Sn, args as So, CurrentLogAnnotations as Sr, constUndefined as Ss, orElseSucceed as St, context as T, add as Ta, uninterruptibleMask$1 as Ti, Random as Tn, exitFailCause as To, _await as Tr, dual as Ts, provideContext as Tt, forever as U, fromUndefinedOr as Ua, join as Ui, isCause as Un, byReferenceUnsafe as Uo, ConsoleRef as Ur, suspend as Ut, fnUntracedEager as V, fromNullOr as Va, isCanonicalArrayIndex as Vi, hasInterruptsOnly as Vn, redact as Vo, void_$1 as Vr, succeed as Vt, forkChild as W, getOrElse$1 as Wa, last as Wi, isFailReason as Wn, equals$1 as Wo, LogToStderr as Wr, sync as Wt, ignore as X, isSome as Xa, sort as Xi, map$1 as Xn, string as Xo, effectIsExit as Xr, try_ as Xt, gen as Y, isOption as Ya, reduce as Yi, makeInterruptReason as Yn, number as Yo, currentTimeMillis as Yr, tryPromise as Yt, interrupt as Z, liftThrowable as Za, empty$2 as Zi, pretty as Zn, structure as Zo, endSpan as Zr, undefined_ as Zt, catchFilter as _, nanos as _a, map$2 as _i, min as _n, Prototype as _o, close as _r, isUndefined as _s, onExit as _t, andThen as a, map$4 as aa, fiberInterruptAllAs as ai, whileLoop as an, BigInt$1 as ao, merge as ar, isNever as as, makeSpanScoped as at, catchReason as b, toMillis as ba, resolveConcurrency as bi, catchDone as bn, PipeInspectableProto as bo, makeUnsafe as br, constFalse as bs, option as bt, as as c, try_$2 as ca, fiberRunIn as ci, withParentSpan as cn, String$1 as co, orDie$1 as cr, isNotUndefined as cs, mapEager as ct, cached as d, infinity as da, getCurrentFiber as di, zipWith as dn, isLessThan as do, succeed$1 as dr, isNumber as ds, match as dt, failVoid as ea, exitVoid as ei, updateContext as en, none as eo, effect as er, isBigInt as es, logDebug as et, cachedWithTTL as f, isDuration as fa, iterateConcurrent as fi, Class as fn, isLessThanOrEqualTo as fo, succeedContext as fr, isObject as fs, matchCauseEager as ft, catchEager as g, minutes as ga, makeSpanUnsafe as gi, jittered as gn, strictEqual as go, addFinalizerExit as gr, isTagged as gs, onError as gt, catchDefect as h, millis as ha, makeLatchUnsafe as hi, isSchedule as hn, make$5 as ho, addFinalizer$1 as hr, isString as hs, never as ht, all as i, isSuccess$1 as ia, fiberInterruptAll as ii, when as in, toArray as io, fresh as ir, isIterable as is, logWarning as it, exit as j, getUnsafe$1 as ja, append as ji, TimeoutError as jn, setStackTraceLimit as jo, isDoneUnsafe as jr, Class$2 as js, retry as jt, effectify as k, getOrUndefined$1 as ka, ParentSpan as ki, NoSuchElementError as kn, assignProperty as ko, into as kr, memoizeIdempotent as ks, request as kt, asSome as l, format as la, flatMap$2 as li, withSpan as ln, isGreaterThan as lo, provide$2 as lr, isNull as ls, mapError as lt, catchCause as m, isZero as ma, makeLatch as mi, exponential as mn, Tuple as mo, Scope as mr, isPropertyKey as ms, matchEffect as mt, acquireUseRelease as n, getOrUndefined as na, fiberAwait as ni, useSpan as nn, orElseSome as no, effectDiscard as nr, isError as ns, logFatal as nt, annotateCurrentSpan as o, match$3 as oa, fiberInterruptAs as oi, withFiber as on, Date$1 as oo, mergeAll as or, isNotNull as os, map as ot, callback as p, isFinite as pa, iterateEager as pi, TaggedClass as pn, make$4 as po, unwrap as pr, isObjectKeyword as ps, matchCauseEffect as pt, fromOption as q, getOrUndefined$2 as qa, match$2 as qi, makeDieReason as qn, combine as qo, callback$1 as qr, timeout as qt, addFinalizer as r, isFailure$1 as ra, fiberInterrupt as ri, void_ as rn, some as ro, empty as rr, isFunction as rs, logInfo as rt, annotateLogs as s, succeed$4 as sa, fiberJoin as si, withLogSpan as sn, Number$1 as so, mock as sr, isNotNullish as ss, mapBothEager as st, acquireRelease as t, getOrThrow as ta, exitZipRight as ti, updateService as tn, orElse as to, effectContext as tr, isBoolean as ts, logError as tt, asVoid as u, fromInputUnsafe as ua, forkUnsafe$1 as ui, yieldNow as un, isGreaterThanOrEqualTo as uo, provideMerge as ur, isNullish as us, mapErrorEager as ut, catchIf as v, negativeInfinity as va, onExit$1 as vi, passthrough as vn, Done$1 as vo, forkUnsafe as vr, isUnknown as vs, onExitPrimitive as vt, clockWith as w, Service as wa, sync$1 as wi, matchEffect$1 as wn, exitFail as wo, TracerTimingEnabled as wr, constant as ws, provide as wt, catchTag as x, toSeconds as xa, succeed$3 as xi, doneExitFromCause as xn, TaggedError as xo, provide$3 as xr, constTrue as xs, orDie as xt, catchNoSuchElement as y, seconds as ya, onExitPrimitive$1 as yi, spaced as yn, Error$1 as yo, make as yr, or as ys, onInterrupt as yt, fn as z, flatMapNullishOr$1 as za, headNonEmpty as zi, fromReasons as zn, formatPath as zo, isSuccess as zr, serviceOption as zt };
4807
+ export { interruptible as $, liftThrowable as $a, empty$2 as $i, squash as $n, structure as $o, exitHasInterrupts as $r, uninterruptible as $t, effectify as A, getOption as Aa, DisablePropagation as Ai, NoSuchElementError as An, assignProperties as Ao, into as Ar, memoize as As, request as At, fn as B, flatMap$4 as Ba, fromIterable as Bi, fromReasons as Bn, formatJson as Bo, isSuccess as Br, serviceOption as Bt, catchTags as C, toSeconds as Ca, succeed$3 as Ci, filterDone as Cn, TaggedError as Co, CurrentLogAnnotations as Cr, constTrue as Cs, orElseSucceed as Ct, contextWith as D, add as Da, uninterruptibleMask$1 as Di, nextBetween as Dn, exitFailCause as Do, done$1 as Dr, dual as Ds, provideService as Dt, context as E, Service as Ea, sync$1 as Ei, Random as En, exitFail as Eo, _await as Er, constant as Es, provideContext as Et, failCauseSync as F, makeUnsafe$2 as Fa, empty$1 as Fi, die$1 as Fn, Class$1 as Fo, fail$2 as Fr, pipeArguments as Fs, runSync as Ft, forkChild as G, fromUndefinedOr as Ga, join as Gi, isFailReason as Gn, byReferenceUnsafe as Go, LogToStderr as Gr, sync as Gt, fnUntracedEager as H, flatten$3 as Ha, isArrayNonEmpty as Hi, hasInterruptsOnly as Hn, formatPropertyKey as Ho, void_$1 as Hr, succeed as Ht, filterOrFail as I, merge$1 as Ia, findFirst as Ii, done as In, NodeInspectSymbol as Io, failCause$2 as Ir, runSyncExit as It, fromOption as J, getOrThrow$1 as Ja, map$3 as Ji, makeDieReason as Jn, array as Jo, callback$1 as Jr, timeout as Jt, forkIn as K, getOrElse$1 as Ka, last as Ki, isReason as Kn, equals$1 as Ko, andThen$1 as Kr, tap as Kt, flatMap as L, all$2 as La, findFirstIndex as Li, fail$1 as Ln, toJson as Lo, interrupt$1 as Lr, scope as Lt, exit as M, getOrUndefinedUnsafe as Ma, Array$1 as Mi, TimeoutError as Mn, getStackTraceLimit as Mo, isDoneUnsafe as Mr, pipe as Ms, retry as Mt, fail as N, getUnsafe$1 as Na, append as Ni, UnknownError as Nn, setStackTraceLimit as No, makeUnsafe$1 as Nr, Class$2 as Ns, runFork as Nt, delay as O, empty$3 as Oa, updateContext$1 as Oi, Done as On, exitSucceed as Oo, doneUnsafe as Or, flow as Os, raceFirst as Ot, failCause as P, make$3 as Pa, appendAll as Pi, annotate as Pn, BaseProto as Po, die$2 as Pr, Prototype$1 as Ps, runForkWith as Pt, interrupt as Q, isSome as Qa, sort as Qi, pretty as Qn, string as Qo, endSpan as Qr, undefined_ as Qt, flatMapEager as R, exists as Ra, findLast as Ri, filterInterruptors as Rn, format$1 as Ro, isExit as Rr, scoped as Rt, catchTag as S, toMillis as Sa, resolveConcurrency as Si, doneExitFromCause as Sn, PipeInspectableProto as So, provide$3 as Sr, constFalse as Ss, orDie as St, clockWith as T, Reference as Ta, suspend$1 as Ti, matchEffect$1 as Tn, causeFail as To, TracerTimingEnabled as Tr, constVoid as Ts, provide as Tt, forEach as U, fromNullOr as Ua, isCanonicalArrayIndex as Ui, interruptors as Un, redact as Uo, ClockRef as Ur, succeedNone as Ut, fnUntraced as V, flatMapNullishOr$1 as Va, headNonEmpty as Vi, hasInterrupts as Vn, formatPath as Vo, succeed$2 as Vr, sleep as Vt, forever as W, fromNullishOr$1 as Wa, isReadonlyArrayNonEmpty as Wi, isCause as Wn, symbolRedactable as Wo, ConsoleRef as Wr, suspend as Wt, gen as X, isNone as Xa, of as Xi, makeInterruptReason as Xn, hash as Xo, currentTimeMillis as Xr, tryPromise as Xt, fromResult as Y, getOrUndefined$2 as Ya, match$2 as Yi, makeFailReason as Yn, combine as Yo, contextWith$1 as Yr, timeoutOrElse as Yt, ignore as Z, isOption as Za, reduce as Zi, map$1 as Zn, number as Zo, effectIsExit as Zr, try_ as Zt, catchEager as _, millis as _a, makeSpanUnsafe as _i, jittered as _n, make$5 as _o, addFinalizerExit as _r, isString as _s, onError as _t, andThen as a, isFailure$1 as aa, fiberInterruptAll as ai, when as an, some as ao, fresh as ar, isFunction as as, logWarning as at, catchNoSuchElement as b, negativeInfinity as ba, onExit$1 as bi, spaced as bn, Done$1 as bo, make as br, isUnknown as bs, onInterrupt as bt, as as c, match$3 as ca, fiberJoin as ci, withLogSpan as cn, Date$1 as co, mock as cr, isNotNull as cs, mapBothEager as ct, cached as d, format as da, forkUnsafe$1 as di, yieldNow as dn, isGreaterThan as do, provideMerge as dr, isNull as ds, mapErrorEager as dt, headUnsafe as ea, exitInterrupt as ei, uninterruptibleMask as en, map$5 as eo, buildWithScope as er, symbol$1 as es, isEffect as et, cachedWithTTL as f, fromInputUnsafe as fa, getCurrentFiber as fi, zipWith as fn, isGreaterThanOrEqualTo as fo, succeed$1 as fr, isNullish as fs, match as ft, catchDefect as g, isZero as ga, makeLatchUnsafe as gi, isSchedule as gn, Tuple as go, addFinalizer$1 as gr, isPropertyKey as gs, never as gt, catchCauseIf as h, isFinite as ha, makeLatch as hi, exponential as hn, make$4 as ho, Scope as hr, isObjectKeyword as hs, matchEffect as ht, all as i, getOrUndefined as ia, fiberInterrupt as ii, void_ as in, orElseSome as io, empty as ir, isError as is, logInfo as it, ensuring as j, getOrUndefined$1 as ja, ParentSpan as ji, StackTrace as jn, assignProperty as jo, isDone$1 as jr, memoizeIdempotent as js, result as jt, die as k, get as ka, void_$2 as ki, IllegalArgumentError as kn, withFiber$1 as ko, interruptWith as kr, identity as ks, repeat as kt, asSome as l, succeed$4 as la, fiberRunIn as li, withParentSpan as ln, Number$1 as lo, orDie$1 as lr, isNotNullish as ls, mapEager as lt, catchCause as m, isDuration as ma, iterateEager as mi, TaggedClass as mn, isLessThanOrEqualTo as mo, unwrap as mr, isObject as ms, matchCauseEffect as mt, acquireUseRelease as n, failVoid as na, exitZipRight as ni, updateService as nn, none as no, effectContext as nr, isBigInt as ns, logError as nt, annotateCurrentSpan as o, isSuccess$1 as oa, fiberInterruptAllAs as oi, whileLoop as on, toArray as oo, merge as or, isIterable as os, makeSpanScoped as ot, callback as p, infinity as pa, iterateConcurrent as pi, Class as pn, isLessThan as po, succeedContext as pr, isNumber as ps, matchCauseEager as pt, forkScoped as q, getOrNull as qa, makeEquivalence as qi, isTimeoutError as qn, symbol as qo, asSome$1 as qr, tapCause as qt, addFinalizer as r, getOrThrow as ra, fiberAwait as ri, useSpan as rn, orElse as ro, effectDiscard as rr, isBoolean as rs, logFatal as rt, annotateLogs as s, map$4 as sa, fiberInterruptAs as si, withFiber as sn, BigInt$1 as so, mergeAll as sr, isNever as ss, map as st, acquireRelease as t, fail$4 as ta, exitVoid as ti, updateContext as tn, match$5 as to, effect as tr, hasProperty as ts, logDebug as tt, asVoid as u, try_$2 as ua, flatMap$2 as ui, withSpan as un, String$1 as uo, provide$2 as ur, isNotUndefined as us, mapError as ut, catchFilter as v, minutes as va, map$2 as vi, min as vn, strictEqual as vo, close as vr, isTagged as vs, onExit as vt, catch_ as w, zero as wa, succeedNone$1 as wi, isDoneCause as wn, args as wo, MinimumLogLevel as wr, constUndefined as ws, promise as wt, catchReason as x, seconds as xa, onExitPrimitive$1 as xi, catchDone as xn, Error$1 as xo, makeUnsafe as xr, or as xs, option as xt, catchIf as y, nanos as ya, monotonicTimeNanos as yi, passthrough as yn, Prototype as yo, forkUnsafe as yr, isUndefined as ys, onExitPrimitive as yt, flatten as z, filter as za, flatMapNullishOr as zi, findError as zn, formatDate as zo, isFailure as zr, scopedWith as zt };
4785
4808
 
4786
- //# sourceMappingURL=Effect-BmOuzEIp.mjs.map
4809
+ //# sourceMappingURL=Effect-BEUn4I5E.mjs.map