lalph 0.3.96 → 0.3.97

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/cli.mjs CHANGED
@@ -3091,7 +3091,7 @@ const TaggedError = TaggedError$1;
3091
3091
  * @category constructors
3092
3092
  * @since 2.0.0
3093
3093
  */
3094
- const make$90 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
3094
+ const make$92 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
3095
3095
  const isStrictEquivalent = (x, y) => x === y;
3096
3096
  /**
3097
3097
  * Creates an equivalence relation that uses strict equality (`===`) to compare values.
@@ -3201,7 +3201,7 @@ const strictEqual = () => isStrictEquivalent;
3201
3201
  * @since 4.0.0
3202
3202
  */
3203
3203
  function Tuple$2(elements) {
3204
- return make$90((self, that) => {
3204
+ return make$92((self, that) => {
3205
3205
  if (self.length !== that.length) return false;
3206
3206
  for (let i = 0; i < self.length; i++) if (!elements[i](self[i], that[i])) return false;
3207
3207
  return true;
@@ -3258,7 +3258,7 @@ function Tuple$2(elements) {
3258
3258
  * @since 4.0.0
3259
3259
  */
3260
3260
  function Array$4(item) {
3261
- return make$90((self, that) => {
3261
+ return make$92((self, that) => {
3262
3262
  if (self.length !== that.length) return false;
3263
3263
  for (let i = 0; i < self.length; i++) if (!item(self[i], that[i])) return false;
3264
3264
  return true;
@@ -3269,9 +3269,9 @@ function Array$4(item) {
3269
3269
  /**
3270
3270
  * @since 2.0.0
3271
3271
  */
3272
- const TypeId$78 = "~effect/data/Option";
3272
+ const TypeId$79 = "~effect/data/Option";
3273
3273
  const CommonProto$1 = {
3274
- [TypeId$78]: { _A: (_) => _ },
3274
+ [TypeId$79]: { _A: (_) => _ },
3275
3275
  ...PipeInspectableProto,
3276
3276
  ...YieldableProto
3277
3277
  };
@@ -3326,7 +3326,7 @@ const NoneProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Co
3326
3326
  }
3327
3327
  });
3328
3328
  /** @internal */
3329
- const isOption$1 = (input) => hasProperty(input, TypeId$78);
3329
+ const isOption$1 = (input) => hasProperty(input, TypeId$79);
3330
3330
  /** @internal */
3331
3331
  const isNone$1 = (fa) => fa._tag === "None";
3332
3332
  /** @internal */
@@ -3341,9 +3341,9 @@ const some$3 = (value) => {
3341
3341
  };
3342
3342
  //#endregion
3343
3343
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/internal/result.js
3344
- const TypeId$77 = "~effect/data/Result";
3344
+ const TypeId$78 = "~effect/data/Result";
3345
3345
  const CommonProto = {
3346
- [TypeId$77]: {
3346
+ [TypeId$78]: {
3347
3347
  _A: (_) => _,
3348
3348
  _E: (_) => _
3349
3349
  },
@@ -3397,7 +3397,7 @@ const FailureProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create
3397
3397
  }
3398
3398
  });
3399
3399
  /** @internal */
3400
- const isResult$1 = (input) => hasProperty(input, TypeId$77);
3400
+ const isResult$1 = (input) => hasProperty(input, TypeId$78);
3401
3401
  /** @internal */
3402
3402
  const isFailure$5 = (result) => result._tag === "Failure";
3403
3403
  /** @internal */
@@ -3503,7 +3503,7 @@ const succeed$9 = (success) => {
3503
3503
  * @category constructors
3504
3504
  * @since 2.0.0
3505
3505
  */
3506
- function make$89(compare) {
3506
+ function make$91(compare) {
3507
3507
  return (self, that) => self === that ? 0 : compare(self, that);
3508
3508
  }
3509
3509
  /**
@@ -3541,7 +3541,7 @@ function make$89(compare) {
3541
3541
  * @category instances
3542
3542
  * @since 4.0.0
3543
3543
  */
3544
- const Number$5 = /* @__PURE__ */ make$89((self, that) => {
3544
+ const Number$5 = /* @__PURE__ */ make$91((self, that) => {
3545
3545
  if (globalThis.Number.isNaN(self) && globalThis.Number.isNaN(that)) return 0;
3546
3546
  if (globalThis.Number.isNaN(self)) return -1;
3547
3547
  if (globalThis.Number.isNaN(that)) return 1;
@@ -3581,7 +3581,7 @@ const Number$5 = /* @__PURE__ */ make$89((self, that) => {
3581
3581
  * @category mapping
3582
3582
  * @since 2.0.0
3583
3583
  */
3584
- const mapInput = /* @__PURE__ */ dual(2, (self, f) => make$89((b1, b2) => self(f(b1), f(b2))));
3584
+ const mapInput = /* @__PURE__ */ dual(2, (self, f) => make$91((b1, b2) => self(f(b1), f(b2))));
3585
3585
  /**
3586
3586
  * Tests whether one value is strictly less than another according to the given order.
3587
3587
  *
@@ -4573,7 +4573,7 @@ const filter$10 = /* @__PURE__ */ dual(2, (self, predicate) => isNone(self) ? no
4573
4573
  * @category Equivalence
4574
4574
  * @since 2.0.0
4575
4575
  */
4576
- const makeEquivalence$6 = (isEquivalent) => make$90((x, y) => isNone(x) ? isNone(y) : isNone(y) ? false : isEquivalent(x.value, y.value));
4576
+ const makeEquivalence$6 = (isEquivalent) => make$92((x, y) => isNone(x) ? isNone(y) : isNone(y) ? false : isEquivalent(x.value, y.value));
4577
4577
  /**
4578
4578
  * Lifts a `Predicate` or `Refinement` into the `Option` context: returns
4579
4579
  * `Some(value)` when the predicate holds, `None` otherwise.
@@ -4612,7 +4612,7 @@ const makeEquivalence$6 = (isEquivalent) => make$90((x, y) => isNone(x) ? isNone
4612
4612
  const liftPredicate = /* @__PURE__ */ dual(2, (b, predicate) => predicate(b) ? some$2(b) : none$4());
4613
4613
  //#endregion
4614
4614
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/Duration.js
4615
- const TypeId$76 = "~effect/time/Duration";
4615
+ const TypeId$77 = "~effect/time/Duration";
4616
4616
  const bigint0$2 = /* @__PURE__ */ BigInt(0);
4617
4617
  const bigint24 = /* @__PURE__ */ BigInt(24);
4618
4618
  const bigint60 = /* @__PURE__ */ BigInt(60);
@@ -4667,13 +4667,13 @@ const fromInputUnsafe = (input) => {
4667
4667
  }
4668
4668
  case "object": {
4669
4669
  if (input === null) break;
4670
- if (TypeId$76 in input) return input;
4670
+ if (TypeId$77 in input) return input;
4671
4671
  if (Array.isArray(input)) {
4672
4672
  if (input.length !== 2 || !input.every(isNumber$1)) return invalid(input);
4673
4673
  if (Number.isNaN(input[0]) || Number.isNaN(input[1])) return zero$1;
4674
4674
  if (input[0] === -Infinity || input[1] === -Infinity) return negativeInfinity;
4675
4675
  if (input[0] === Infinity || input[1] === Infinity) return infinity;
4676
- return make$88(BigInt(Math.round(input[0] * 1e9)) + BigInt(Math.round(input[1])));
4676
+ return make$90(BigInt(Math.round(input[0] * 1e9)) + BigInt(Math.round(input[1])));
4677
4677
  }
4678
4678
  const obj = input;
4679
4679
  let millis = 0;
@@ -4683,11 +4683,11 @@ const fromInputUnsafe = (input) => {
4683
4683
  if (obj.minutes) millis += obj.minutes * 6e4;
4684
4684
  if (obj.seconds) millis += obj.seconds * 1e3;
4685
4685
  if (obj.milliseconds) millis += obj.milliseconds;
4686
- if (!obj.microseconds && !obj.nanoseconds) return make$88(millis);
4686
+ if (!obj.microseconds && !obj.nanoseconds) return make$90(millis);
4687
4687
  let nanos = BigInt(millis) * bigint1e6;
4688
4688
  if (obj.microseconds) nanos += BigInt(obj.microseconds) * bigint1e3;
4689
4689
  if (obj.nanoseconds) nanos += BigInt(obj.nanoseconds);
4690
- return make$88(nanos);
4690
+ return make$90(nanos);
4691
4691
  }
4692
4692
  }
4693
4693
  return invalid(input);
@@ -4702,7 +4702,7 @@ const zeroDurationValue = {
4702
4702
  const infinityDurationValue = { _tag: "Infinity" };
4703
4703
  const negativeInfinityDurationValue = { _tag: "NegativeInfinity" };
4704
4704
  const DurationProto = {
4705
- [TypeId$76]: TypeId$76,
4705
+ [TypeId$77]: TypeId$77,
4706
4706
  [symbol$6]() {
4707
4707
  return structure(this.value);
4708
4708
  },
@@ -4746,7 +4746,7 @@ const DurationProto = {
4746
4746
  return pipeArguments(this, arguments);
4747
4747
  }
4748
4748
  };
4749
- const make$88 = (input) => {
4749
+ const make$90 = (input) => {
4750
4750
  const duration = Object.create(DurationProto);
4751
4751
  if (typeof input === "number") if (isNaN(input) || input === 0 || Object.is(input, -0)) duration.value = zeroDurationValue;
4752
4752
  else if (!Number.isFinite(input)) duration.value = input > 0 ? infinityDurationValue : negativeInfinityDurationValue;
@@ -4779,7 +4779,7 @@ const make$88 = (input) => {
4779
4779
  * @since 2.0.0
4780
4780
  * @category guards
4781
4781
  */
4782
- const isDuration = (u) => hasProperty(u, TypeId$76);
4782
+ const isDuration = (u) => hasProperty(u, TypeId$77);
4783
4783
  /**
4784
4784
  * Checks if a Duration is finite (not infinite).
4785
4785
  *
@@ -4858,8 +4858,8 @@ const abs$1 = (self) => {
4858
4858
  switch (self.value._tag) {
4859
4859
  case "Infinity":
4860
4860
  case "NegativeInfinity": return infinity;
4861
- case "Millis": return self.value.millis < 0 ? make$88(-self.value.millis) : self;
4862
- case "Nanos": return self.value.nanos < bigint0$2 ? make$88(-self.value.nanos) : self;
4861
+ case "Millis": return self.value.millis < 0 ? make$90(-self.value.millis) : self;
4862
+ case "Nanos": return self.value.nanos < bigint0$2 ? make$90(-self.value.nanos) : self;
4863
4863
  }
4864
4864
  };
4865
4865
  /**
@@ -4875,7 +4875,7 @@ const abs$1 = (self) => {
4875
4875
  * @since 2.0.0
4876
4876
  * @category constructors
4877
4877
  */
4878
- const zero$1 = /* @__PURE__ */ make$88(0);
4878
+ const zero$1 = /* @__PURE__ */ make$90(0);
4879
4879
  /**
4880
4880
  * A Duration representing infinite time.
4881
4881
  *
@@ -4889,7 +4889,7 @@ const zero$1 = /* @__PURE__ */ make$88(0);
4889
4889
  * @since 2.0.0
4890
4890
  * @category constructors
4891
4891
  */
4892
- const infinity = /* @__PURE__ */ make$88(Infinity);
4892
+ const infinity = /* @__PURE__ */ make$90(Infinity);
4893
4893
  /**
4894
4894
  * A Duration representing negative infinite time.
4895
4895
  *
@@ -4903,7 +4903,7 @@ const infinity = /* @__PURE__ */ make$88(Infinity);
4903
4903
  * @since 4.0.0
4904
4904
  * @category constructors
4905
4905
  */
4906
- const negativeInfinity = /* @__PURE__ */ make$88(-Infinity);
4906
+ const negativeInfinity = /* @__PURE__ */ make$90(-Infinity);
4907
4907
  /**
4908
4908
  * Creates a Duration from nanoseconds.
4909
4909
  *
@@ -4918,7 +4918,7 @@ const negativeInfinity = /* @__PURE__ */ make$88(-Infinity);
4918
4918
  * @since 2.0.0
4919
4919
  * @category constructors
4920
4920
  */
4921
- const nanos = (nanos) => make$88(nanos);
4921
+ const nanos = (nanos) => make$90(nanos);
4922
4922
  /**
4923
4923
  * Creates a Duration from microseconds.
4924
4924
  *
@@ -4933,7 +4933,7 @@ const nanos = (nanos) => make$88(nanos);
4933
4933
  * @since 2.0.0
4934
4934
  * @category constructors
4935
4935
  */
4936
- const micros = (micros) => make$88(micros * bigint1e3);
4936
+ const micros = (micros) => make$90(micros * bigint1e3);
4937
4937
  /**
4938
4938
  * Creates a Duration from milliseconds.
4939
4939
  *
@@ -4948,7 +4948,7 @@ const micros = (micros) => make$88(micros * bigint1e3);
4948
4948
  * @since 2.0.0
4949
4949
  * @category constructors
4950
4950
  */
4951
- const millis = (millis) => make$88(millis);
4951
+ const millis = (millis) => make$90(millis);
4952
4952
  /**
4953
4953
  * Creates a Duration from seconds.
4954
4954
  *
@@ -4963,7 +4963,7 @@ const millis = (millis) => make$88(millis);
4963
4963
  * @since 2.0.0
4964
4964
  * @category constructors
4965
4965
  */
4966
- const seconds = (seconds) => make$88(seconds * 1e3);
4966
+ const seconds = (seconds) => make$90(seconds * 1e3);
4967
4967
  /**
4968
4968
  * Creates a Duration from minutes.
4969
4969
  *
@@ -4978,7 +4978,7 @@ const seconds = (seconds) => make$88(seconds * 1e3);
4978
4978
  * @since 2.0.0
4979
4979
  * @category constructors
4980
4980
  */
4981
- const minutes = (minutes) => make$88(minutes * 6e4);
4981
+ const minutes = (minutes) => make$90(minutes * 6e4);
4982
4982
  /**
4983
4983
  * Creates a Duration from hours.
4984
4984
  *
@@ -4993,7 +4993,7 @@ const minutes = (minutes) => make$88(minutes * 6e4);
4993
4993
  * @since 2.0.0
4994
4994
  * @category constructors
4995
4995
  */
4996
- const hours = (hours) => make$88(hours * 36e5);
4996
+ const hours = (hours) => make$90(hours * 36e5);
4997
4997
  /**
4998
4998
  * Creates a Duration from days.
4999
4999
  *
@@ -5008,7 +5008,7 @@ const hours = (hours) => make$88(hours * 36e5);
5008
5008
  * @since 2.0.0
5009
5009
  * @category constructors
5010
5010
  */
5011
- const days = (days) => make$88(days * 864e5);
5011
+ const days = (days) => make$90(days * 864e5);
5012
5012
  /**
5013
5013
  * Creates a Duration from weeks.
5014
5014
  *
@@ -5023,7 +5023,7 @@ const days = (days) => make$88(days * 864e5);
5023
5023
  * @since 2.0.0
5024
5024
  * @category constructors
5025
5025
  */
5026
- const weeks = (weeks) => make$88(weeks * 6048e5);
5026
+ const weeks = (weeks) => make$90(weeks * 6048e5);
5027
5027
  /**
5028
5028
  * Converts a Duration to milliseconds.
5029
5029
  *
@@ -5166,7 +5166,7 @@ const matchPair = /* @__PURE__ */ dual(3, (self, that, options) => {
5166
5166
  * @category instances
5167
5167
  * @since 2.0.0
5168
5168
  */
5169
- const Order$6 = /* @__PURE__ */ make$89((self, that) => matchPair(self, that, {
5169
+ const Order$6 = /* @__PURE__ */ make$91((self, that) => matchPair(self, that, {
5170
5170
  onMillis: (self, that) => self < that ? -1 : self > that ? 1 : 0,
5171
5171
  onNanos: (self, that) => self < that ? -1 : self > that ? 1 : 0,
5172
5172
  onInfinity: (self, that) => {
@@ -6797,23 +6797,23 @@ const ServiceProto = {
6797
6797
  };
6798
6798
  },
6799
6799
  asEffect() {
6800
- return (this.asEffect = constant(withFiber$1((fiber) => exitSucceed(get$15(fiber.services, this)))))();
6800
+ return (this.asEffect = constant(withFiber$1((fiber) => exitSucceed(get$16(fiber.services, this)))))();
6801
6801
  },
6802
6802
  of(self) {
6803
6803
  return self;
6804
6804
  },
6805
6805
  serviceMap(self) {
6806
- return make$87(this, self);
6806
+ return make$89(this, self);
6807
6807
  },
6808
6808
  use(f) {
6809
- return withFiber$1((fiber) => f(get$15(fiber.services, this)));
6809
+ return withFiber$1((fiber) => f(get$16(fiber.services, this)));
6810
6810
  },
6811
6811
  useSync(f) {
6812
- return withFiber$1((fiber) => exitSucceed(f(get$15(fiber.services, this))));
6812
+ return withFiber$1((fiber) => exitSucceed(f(get$16(fiber.services, this))));
6813
6813
  }
6814
6814
  };
6815
6815
  const ReferenceTypeId = "~effect/ServiceMap/Reference";
6816
- const TypeId$75 = "~effect/ServiceMap";
6816
+ const TypeId$76 = "~effect/ServiceMap";
6817
6817
  /**
6818
6818
  * @example
6819
6819
  * ```ts
@@ -6831,14 +6831,14 @@ const TypeId$75 = "~effect/ServiceMap";
6831
6831
  * @category Constructors
6832
6832
  */
6833
6833
  const makeUnsafe$15 = (mapUnsafe) => {
6834
- const self = Object.create(Proto$28);
6834
+ const self = Object.create(Proto$29);
6835
6835
  self.mapUnsafe = mapUnsafe;
6836
6836
  self.mutable = false;
6837
6837
  return self;
6838
6838
  };
6839
- const Proto$28 = {
6839
+ const Proto$29 = {
6840
6840
  ...PipeInspectableProto,
6841
- [TypeId$75]: { _Services: (_) => _ },
6841
+ [TypeId$76]: { _Services: (_) => _ },
6842
6842
  toJSON() {
6843
6843
  return {
6844
6844
  _id: "ServiceMap",
@@ -6871,7 +6871,7 @@ const Proto$28 = {
6871
6871
  * @since 4.0.0
6872
6872
  * @category Guards
6873
6873
  */
6874
- const isServiceMap = (u) => hasProperty(u, TypeId$75);
6874
+ const isServiceMap = (u) => hasProperty(u, TypeId$76);
6875
6875
  /**
6876
6876
  * Checks if the provided argument is a `Reference`.
6877
6877
  *
@@ -6926,7 +6926,7 @@ const emptyServiceMap = /* @__PURE__ */ makeUnsafe$15(/* @__PURE__ */ new Map())
6926
6926
  * @since 4.0.0
6927
6927
  * @category Constructors
6928
6928
  */
6929
- const make$87 = (key, service) => makeUnsafe$15(new Map([[key.key, service]]));
6929
+ const make$89 = (key, service) => makeUnsafe$15(new Map([[key.key, service]]));
6930
6930
  /**
6931
6931
  * Adds a service to a given `ServiceMap`.
6932
6932
  *
@@ -7056,7 +7056,7 @@ const getUnsafe$4 = /* @__PURE__ */ dual(2, (self, service) => {
7056
7056
  * @since 4.0.0
7057
7057
  * @category Getters
7058
7058
  */
7059
- const get$15 = getUnsafe$4;
7059
+ const get$16 = getUnsafe$4;
7060
7060
  /**
7061
7061
  * @example
7062
7062
  * ```ts
@@ -7426,7 +7426,7 @@ var ParentSpan = class extends Service$1()(ParentSpanKey) {};
7426
7426
  * @since 2.0.0
7427
7427
  * @category constructors
7428
7428
  */
7429
- const make$86 = (options) => options;
7429
+ const make$88 = (options) => options;
7430
7430
  /**
7431
7431
  * @since 2.0.0
7432
7432
  * @category constructors
@@ -7511,7 +7511,7 @@ const TracerKey = "effect/Tracer";
7511
7511
  * })
7512
7512
  * ```
7513
7513
  */
7514
- const Tracer = /* @__PURE__ */ Reference(TracerKey, { defaultValue: () => make$86({ span: (options) => new NativeSpan(options) }) });
7514
+ const Tracer = /* @__PURE__ */ Reference(TracerKey, { defaultValue: () => make$88({ span: (options) => new NativeSpan(options) }) });
7515
7515
  /**
7516
7516
  * @since 4.0.0
7517
7517
  * @category native tracer
@@ -8340,7 +8340,7 @@ var FiberImpl = class {
8340
8340
  interruptUnsafe(fiberId, annotations) {
8341
8341
  if (this._exit) return;
8342
8342
  let cause = causeInterrupt(fiberId);
8343
- if (this.currentStackFrame) cause = causeAnnotate(cause, make$87(StackTraceKey, this.currentStackFrame));
8343
+ if (this.currentStackFrame) cause = causeAnnotate(cause, make$89(StackTraceKey, this.currentStackFrame));
8344
8344
  if (annotations) cause = causeAnnotate(cause, annotations);
8345
8345
  this._interruptedCause = this._interruptedCause ? causeCombine(this._interruptedCause, cause) : cause;
8346
8346
  if (this.interruptible) this.evaluate(failCause$5(this._interruptedCause));
@@ -9695,11 +9695,11 @@ const NoopSpanProto = {
9695
9695
  const noopSpan = (options) => Object.assign(Object.create(NoopSpanProto), options);
9696
9696
  const filterDisablePropagation = (span) => {
9697
9697
  if (!span) return none$4();
9698
- return get$15(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$2(span.parent)) : none$4() : some$2(span);
9698
+ return get$16(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$2(span.parent)) : none$4() : some$2(span);
9699
9699
  };
9700
9700
  /** @internal */
9701
9701
  const makeSpanUnsafe = (fiber, name, options) => {
9702
- const disablePropagation = !fiber.getRef(TracerEnabled) || options?.annotations && get$15(options.annotations, DisablePropagation);
9702
+ const disablePropagation = !fiber.getRef(TracerEnabled) || options?.annotations && get$16(options.annotations, DisablePropagation);
9703
9703
  const parent = options?.parent !== void 0 ? some$2(options.parent) : options?.root ? none$4() : filterDisablePropagation(fiber.currentSpan);
9704
9704
  let span;
9705
9705
  if (disablePropagation) span = noopSpan({
@@ -10351,7 +10351,7 @@ const makeUnsafe$14 = () => {
10351
10351
  * @since 2.0.0
10352
10352
  * @category constructors
10353
10353
  */
10354
- const make$85 = () => sync$2(() => makeUnsafe$14());
10354
+ const make$87 = () => sync$2(() => makeUnsafe$14());
10355
10355
  const _await = (self) => callback$2((resume) => {
10356
10356
  if (self.effect) return resume(self.effect);
10357
10357
  self.resumes ??= [];
@@ -10609,7 +10609,7 @@ const Scope = scopeTag;
10609
10609
  * @category constructors
10610
10610
  * @since 2.0.0
10611
10611
  */
10612
- const make$84 = scopeMake;
10612
+ const make$86 = scopeMake;
10613
10613
  /**
10614
10614
  * Creates a new `Scope` synchronously without wrapping it in an `Effect`.
10615
10615
  * This is useful when you need a scope immediately but should be used with caution
@@ -10789,7 +10789,7 @@ const close = scopeClose;
10789
10789
  const closeUnsafe = scopeCloseUnsafe;
10790
10790
  //#endregion
10791
10791
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/Layer.js
10792
- const TypeId$74 = "~effect/Layer";
10792
+ const TypeId$75 = "~effect/Layer";
10793
10793
  const MemoMapTypeId = "~effect/Layer/MemoMap";
10794
10794
  /**
10795
10795
  * Returns `true` if the specified value is a `Layer`, `false` otherwise.
@@ -10814,9 +10814,9 @@ const MemoMapTypeId = "~effect/Layer/MemoMap";
10814
10814
  * @since 2.0.0
10815
10815
  * @category getters
10816
10816
  */
10817
- const isLayer = (u) => hasProperty(u, TypeId$74);
10817
+ const isLayer = (u) => hasProperty(u, TypeId$75);
10818
10818
  const LayerProto = {
10819
- [TypeId$74]: {
10819
+ [TypeId$75]: {
10820
10820
  _ROut: identity,
10821
10821
  _E: identity,
10822
10822
  _RIn: identity
@@ -11127,8 +11127,8 @@ const buildWithScope = /* @__PURE__ */ dual(2, (self, scope) => withFiber$1((fib
11127
11127
  * @category constructors
11128
11128
  */
11129
11129
  const succeed$4 = function() {
11130
- if (arguments.length === 1) return (resource) => succeedServices(make$87(arguments[0], resource));
11131
- return succeedServices(make$87(arguments[0], arguments[1]));
11130
+ if (arguments.length === 1) return (resource) => succeedServices(make$89(arguments[0], resource));
11131
+ return succeedServices(make$89(arguments[0], arguments[1]));
11132
11132
  };
11133
11133
  /**
11134
11134
  * Constructs a layer from the specified value, which must return one or more
@@ -11217,7 +11217,7 @@ const effect$1 = function() {
11217
11217
  if (arguments.length === 1) return (effect) => effectImpl(arguments[0], effect);
11218
11218
  return effectImpl(arguments[0], arguments[1]);
11219
11219
  };
11220
- const effectImpl = (service, effect) => effectServices(map$12(effect, (value) => make$87(service, value)));
11220
+ const effectImpl = (service, effect) => effectServices(map$12(effect, (value) => make$89(service, value)));
11221
11221
  /**
11222
11222
  * Constructs a layer from the specified scoped effect, which must return one
11223
11223
  * or more services.
@@ -11299,7 +11299,7 @@ const effectDiscard = (effect) => effectServices(as$2(effect, empty$16()));
11299
11299
  */
11300
11300
  const unwrap$3 = (self) => {
11301
11301
  const service = Service$1("effect/Layer/unwrap");
11302
- return flatMap$5(effect$1(service)(self), get$15(service));
11302
+ return flatMap$5(effect$1(service)(self), get$16(service));
11303
11303
  };
11304
11304
  const mergeAllEffect = (layers, memoMap, scope) => {
11305
11305
  const parentScope = forkUnsafe(scope, "parallel");
@@ -11840,9 +11840,9 @@ const ChannelTypeId = "~effect/Channel";
11840
11840
  * @since 3.16.0
11841
11841
  * @category Type IDs
11842
11842
  */
11843
- const TypeId$73 = "~effect/ExecutionPlan";
11844
- const Proto$27 = {
11845
- [TypeId$73]: TypeId$73,
11843
+ const TypeId$74 = "~effect/ExecutionPlan";
11844
+ const Proto$28 = {
11845
+ [TypeId$74]: TypeId$74,
11846
11846
  get withRequirements() {
11847
11847
  const self = this;
11848
11848
  return servicesWith$1((services) => succeed$7(makeProto$3(self.steps.map((step) => ({
@@ -11855,7 +11855,7 @@ const Proto$27 = {
11855
11855
  }
11856
11856
  };
11857
11857
  const makeProto$3 = (steps) => {
11858
- const self = Object.create(Proto$27);
11858
+ const self = Object.create(Proto$28);
11859
11859
  self.steps = steps;
11860
11860
  return self;
11861
11861
  };
@@ -12449,11 +12449,11 @@ const Clock = ClockRef;
12449
12449
  //#endregion
12450
12450
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/internal/dateTime.js
12451
12451
  /** @internal */
12452
- const TypeId$71 = "~effect/time/DateTime";
12452
+ const TypeId$72 = "~effect/time/DateTime";
12453
12453
  /** @internal */
12454
12454
  const TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
12455
- const Proto$26 = {
12456
- [TypeId$71]: TypeId$71,
12455
+ const Proto$27 = {
12456
+ [TypeId$72]: TypeId$72,
12457
12457
  pipe() {
12458
12458
  return pipeArguments(this, arguments);
12459
12459
  },
@@ -12465,7 +12465,7 @@ const Proto$26 = {
12465
12465
  }
12466
12466
  };
12467
12467
  const ProtoUtc = {
12468
- ...Proto$26,
12468
+ ...Proto$27,
12469
12469
  _tag: "Utc",
12470
12470
  [symbol$6]() {
12471
12471
  return number$5(this.epochMilliseconds);
@@ -12478,7 +12478,7 @@ const ProtoUtc = {
12478
12478
  }
12479
12479
  };
12480
12480
  const ProtoZoned = {
12481
- ...Proto$26,
12481
+ ...Proto$27,
12482
12482
  _tag: "Zoned",
12483
12483
  [symbol$6]() {
12484
12484
  return combine$2(number$5(this.epochMilliseconds))(hash(this.zone));
@@ -12521,14 +12521,14 @@ const makeZonedProto = (epochMillis, zone, partsUtc) => {
12521
12521
  return self;
12522
12522
  };
12523
12523
  /** @internal */
12524
- const isDateTime$1 = (u) => hasProperty(u, TypeId$71);
12524
+ const isDateTime$1 = (u) => hasProperty(u, TypeId$72);
12525
12525
  const isDateTimeArgs = (args) => isDateTime$1(args[0]);
12526
12526
  /** @internal */
12527
12527
  const isUtc$1 = (self) => self._tag === "Utc";
12528
12528
  /** @internal */
12529
- const Equivalence$6 = /* @__PURE__ */ make$90((a, b) => a.epochMilliseconds === b.epochMilliseconds);
12529
+ const Equivalence$6 = /* @__PURE__ */ make$92((a, b) => a.epochMilliseconds === b.epochMilliseconds);
12530
12530
  /** @internal */
12531
- const Order$5 = /* @__PURE__ */ make$89((self, that) => self.epochMilliseconds < that.epochMilliseconds ? -1 : self.epochMilliseconds > that.epochMilliseconds ? 1 : 0);
12531
+ const Order$5 = /* @__PURE__ */ make$91((self, that) => self.epochMilliseconds < that.epochMilliseconds ? -1 : self.epochMilliseconds > that.epochMilliseconds ? 1 : 0);
12532
12532
  const makeUtc = (epochMillis) => {
12533
12533
  const self = Object.create(ProtoUtc);
12534
12534
  self.epochMilliseconds = epochMillis;
@@ -12566,7 +12566,7 @@ const makeUnsafe$12 = (input) => {
12566
12566
  */
12567
12567
  const hasZone = (input) => /Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(input);
12568
12568
  /** @internal */
12569
- const make$83 = /* @__PURE__ */ liftThrowable(makeUnsafe$12);
12569
+ const make$85 = /* @__PURE__ */ liftThrowable(makeUnsafe$12);
12570
12570
  /** @internal */
12571
12571
  const nowUnsafe$1 = () => makeUtc(Date.now());
12572
12572
  /** @internal */
@@ -13016,7 +13016,7 @@ const matchEffect$1 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffec
13016
13016
  *
13017
13017
  * @since 2.0.0
13018
13018
  */
13019
- const TypeId$70 = "~effect/Schedule";
13019
+ const TypeId$71 = "~effect/Schedule";
13020
13020
  const randomNext = /* @__PURE__ */ Random$1.useSync((random) => random.nextDoubleUnsafe());
13021
13021
  /**
13022
13022
  * @since 4.0.0
@@ -13033,7 +13033,7 @@ const CurrentMetadata = /* @__PURE__ */ Reference("effect/Schedule/CurrentMetada
13033
13033
  elapsedSincePrevious: 0
13034
13034
  }) });
13035
13035
  const ScheduleProto = {
13036
- [TypeId$70]: {
13036
+ [TypeId$71]: {
13037
13037
  _Out: identity,
13038
13038
  _In: identity,
13039
13039
  _Env: identity
@@ -13061,7 +13061,7 @@ const ScheduleProto = {
13061
13061
  * @since 2.0.0
13062
13062
  * @category guards
13063
13063
  */
13064
- const isSchedule = (u) => hasProperty(u, TypeId$70);
13064
+ const isSchedule = (u) => hasProperty(u, TypeId$71);
13065
13065
  /**
13066
13066
  * Creates a Schedule from a step function that returns a Pull.
13067
13067
  *
@@ -13556,7 +13556,7 @@ const repeat$1 = /* @__PURE__ */ dual(2, (self, options) => {
13556
13556
  return repeatOrElse$1(self, typeof options === "function" ? options(identity) : isSchedule(options) ? options : buildFromOptions(options), fail$9);
13557
13557
  });
13558
13558
  /** @internal */
13559
- const retry$4 = /* @__PURE__ */ dual(2, (self, options) => {
13559
+ const retry$2 = /* @__PURE__ */ dual(2, (self, options) => {
13560
13560
  return retryOrElse$1(self, typeof options === "function" ? options(identity) : isSchedule(options) ? options : buildFromOptions(options), fail$9);
13561
13561
  });
13562
13562
  const passthroughForever = /* @__PURE__ */ passthrough$2(forever$1);
@@ -13576,7 +13576,7 @@ const buildFromOptions = (options) => {
13576
13576
  };
13577
13577
  //#endregion
13578
13578
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/Request.js
13579
- const TypeId$69 = "~effect/Request";
13579
+ const TypeId$70 = "~effect/Request";
13580
13580
  const requestVariance = /* @__PURE__ */ byReferenceUnsafe({
13581
13581
  _E: (_) => _,
13582
13582
  _A: (_) => _,
@@ -13587,7 +13587,7 @@ const requestVariance = /* @__PURE__ */ byReferenceUnsafe({
13587
13587
  */
13588
13588
  const RequestPrototype = {
13589
13589
  ...StructuralProto,
13590
- [TypeId$69]: requestVariance
13590
+ [TypeId$70]: requestVariance
13591
13591
  };
13592
13592
  /**
13593
13593
  * @example
@@ -15621,7 +15621,7 @@ const tapCause = tapCause$2;
15621
15621
  * @since 2.0.0
15622
15622
  * @category Error Handling
15623
15623
  */
15624
- const retry$3 = retry$4;
15624
+ const retry$1 = retry$2;
15625
15625
  /**
15626
15626
  * Discards both the success and failure values of an effect.
15627
15627
  *
@@ -18522,7 +18522,7 @@ const makeUnsafe$11 = makeUnsafe$12;
18522
18522
  * DateTime.make("2024-01-01")
18523
18523
  * ```
18524
18524
  */
18525
- const make$82 = make$83;
18525
+ const make$84 = make$85;
18526
18526
  /**
18527
18527
  * Get the current time using `Date.now`.
18528
18528
  *
@@ -19140,7 +19140,7 @@ const stringOrRedacted = (val) => typeof val === "string" ? val : value$3(val);
19140
19140
  *
19141
19141
  * @since 3.3.0
19142
19142
  */
19143
- const TypeId$68 = "~effect/data/Redacted";
19143
+ const TypeId$69 = "~effect/data/Redacted";
19144
19144
  /**
19145
19145
  * @example
19146
19146
  * ```ts
@@ -19156,7 +19156,7 @@ const TypeId$68 = "~effect/data/Redacted";
19156
19156
  * @since 3.3.0
19157
19157
  * @category refinements
19158
19158
  */
19159
- const isRedacted = (u) => hasProperty(u, TypeId$68);
19159
+ const isRedacted = (u) => hasProperty(u, TypeId$69);
19160
19160
  /**
19161
19161
  * This function creates a `Redacted<A>` instance from a given value `A`,
19162
19162
  * securely hiding its content.
@@ -19171,14 +19171,14 @@ const isRedacted = (u) => hasProperty(u, TypeId$68);
19171
19171
  * @since 3.3.0
19172
19172
  * @category constructors
19173
19173
  */
19174
- const make$81 = (value, options) => {
19175
- const self = Object.create(Proto$25);
19174
+ const make$83 = (value, options) => {
19175
+ const self = Object.create(Proto$26);
19176
19176
  if (options?.label) self.label = options.label;
19177
19177
  redactedRegistry.set(self, value);
19178
19178
  return self;
19179
19179
  };
19180
- const Proto$25 = {
19181
- [TypeId$68]: { _A: (_) => _ },
19180
+ const Proto$26 = {
19181
+ [TypeId$69]: { _A: (_) => _ },
19182
19182
  label: void 0,
19183
19183
  ...PipeInspectableProto,
19184
19184
  toJSON() {
@@ -19235,10 +19235,10 @@ const value$2 = value$3;
19235
19235
  * @category equivalence
19236
19236
  * @since 3.3.0
19237
19237
  */
19238
- const makeEquivalence$2 = (isEquivalent) => make$90((x, y) => isEquivalent(value$2(x), value$2(y)));
19238
+ const makeEquivalence$2 = (isEquivalent) => make$92((x, y) => isEquivalent(value$2(x), value$2(y)));
19239
19239
  //#endregion
19240
19240
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/SchemaIssue.js
19241
- const TypeId$67 = "~effect/SchemaIssue/Issue";
19241
+ const TypeId$68 = "~effect/SchemaIssue/Issue";
19242
19242
  /**
19243
19243
  * Returns `true` if the given value is an {@link Issue}.
19244
19244
  *
@@ -19269,10 +19269,10 @@ const TypeId$67 = "~effect/SchemaIssue/Issue";
19269
19269
  * @since 4.0.0
19270
19270
  */
19271
19271
  function isIssue(u) {
19272
- return hasProperty(u, TypeId$67);
19272
+ return hasProperty(u, TypeId$68);
19273
19273
  }
19274
19274
  var Base$1 = class {
19275
- [TypeId$67] = TypeId$67;
19275
+ [TypeId$68] = TypeId$68;
19276
19276
  toString() {
19277
19277
  return defaultFormatter$1(this);
19278
19278
  }
@@ -19768,7 +19768,7 @@ var OneOf = class extends Base$1 {
19768
19768
  }
19769
19769
  };
19770
19770
  /** @internal */
19771
- function make$80(input, out) {
19771
+ function make$82(input, out) {
19772
19772
  if (isIssue(out)) return out;
19773
19773
  if (out === void 0) return;
19774
19774
  if (typeof out === "boolean") return out ? void 0 : new InvalidValue$1(some$2(input));
@@ -19967,16 +19967,16 @@ function formatOption(actual) {
19967
19967
  function redact$2(issue) {
19968
19968
  switch (issue._tag) {
19969
19969
  case "MissingKey": return issue;
19970
- case "Forbidden": return new Forbidden(map$16(issue.actual, make$81), issue.annotations);
19971
- case "Filter": return new Filter$1(make$81(issue.actual), issue.filter, redact$2(issue.issue));
19970
+ case "Forbidden": return new Forbidden(map$16(issue.actual, make$83), issue.annotations);
19971
+ case "Filter": return new Filter$1(make$83(issue.actual), issue.filter, redact$2(issue.issue));
19972
19972
  case "Pointer": return new Pointer(issue.path, redact$2(issue.issue));
19973
19973
  case "Encoding":
19974
19974
  case "InvalidType":
19975
19975
  case "InvalidValue":
19976
- case "Composite": return new InvalidValue$1(map$16(issue.actual, make$81));
19976
+ case "Composite": return new InvalidValue$1(map$16(issue.actual, make$83));
19977
19977
  case "AnyOf":
19978
19978
  case "OneOf":
19979
- case "UnexpectedKey": return new InvalidValue$1(some$2(make$81(issue.actual)));
19979
+ case "UnexpectedKey": return new InvalidValue$1(some$2(make$83(issue.actual)));
19980
19980
  }
19981
19981
  }
19982
19982
  //#endregion
@@ -20649,9 +20649,9 @@ function encodeBase64() {
20649
20649
  function decodeBase64() {
20650
20650
  return transformOrFail$1((input) => mapError$5(decodeBase64$1(input), (e) => new InvalidValue$1(some$2(input), { message: e.message })).asEffect());
20651
20651
  }
20652
- const TypeId$66 = "~effect/BigDecimal";
20652
+ const TypeId$67 = "~effect/BigDecimal";
20653
20653
  const BigDecimalProto = {
20654
- [TypeId$66]: TypeId$66,
20654
+ [TypeId$67]: TypeId$67,
20655
20655
  [symbol$6]() {
20656
20656
  const normalized = normalize$1(this);
20657
20657
  return combine$2(hash(normalized.value), number$5(normalized.scale));
@@ -20692,7 +20692,7 @@ const BigDecimalProto = {
20692
20692
  * @since 2.0.0
20693
20693
  * @category guards
20694
20694
  */
20695
- const isBigDecimal = (u) => hasProperty(u, TypeId$66);
20695
+ const isBigDecimal = (u) => hasProperty(u, TypeId$67);
20696
20696
  /**
20697
20697
  * Creates a `BigDecimal` from a `bigint` value and a scale.
20698
20698
  *
@@ -20712,7 +20712,7 @@ const isBigDecimal = (u) => hasProperty(u, TypeId$66);
20712
20712
  * @since 2.0.0
20713
20713
  * @category constructors
20714
20714
  */
20715
- const make$79 = (value, scale) => {
20715
+ const make$81 = (value, scale) => {
20716
20716
  const o = Object.create(BigDecimalProto);
20717
20717
  o.value = value;
20718
20718
  o.scale = scale;
@@ -20725,7 +20725,7 @@ const make$79 = (value, scale) => {
20725
20725
  */
20726
20726
  const makeNormalizedUnsafe = (value, scale) => {
20727
20727
  if (value !== bigint0 && value % bigint10 === bigint0) throw new RangeError("Value must be normalized");
20728
- const o = make$79(value, scale);
20728
+ const o = make$81(value, scale);
20729
20729
  o.normalized = o;
20730
20730
  return o;
20731
20731
  };
@@ -20790,8 +20790,8 @@ const normalize$1 = (self) => {
20790
20790
  * @category scaling
20791
20791
  */
20792
20792
  const scale = /* @__PURE__ */ dual(2, (self, scale) => {
20793
- if (scale > self.scale) return make$79(self.value * bigint10 ** BigInt(scale - self.scale), scale);
20794
- if (scale < self.scale) return make$79(self.value / bigint10 ** BigInt(self.scale - scale), scale);
20793
+ if (scale > self.scale) return make$81(self.value * bigint10 ** BigInt(scale - self.scale), scale);
20794
+ if (scale < self.scale) return make$81(self.value / bigint10 ** BigInt(self.scale - scale), scale);
20795
20795
  return self;
20796
20796
  });
20797
20797
  /**
@@ -20810,7 +20810,7 @@ const scale = /* @__PURE__ */ dual(2, (self, scale) => {
20810
20810
  * @since 2.0.0
20811
20811
  * @category math
20812
20812
  */
20813
- const abs = (n) => n.value < bigint0 ? make$79(-n.value, n.scale) : n;
20813
+ const abs = (n) => n.value < bigint0 ? make$81(-n.value, n.scale) : n;
20814
20814
  /**
20815
20815
  * Provides an `Equivalence` instance for `BigDecimal` that determines equality between BigDecimal values.
20816
20816
  *
@@ -20829,7 +20829,7 @@ const abs = (n) => n.value < bigint0 ? make$79(-n.value, n.scale) : n;
20829
20829
  * @category instances
20830
20830
  * @since 2.0.0
20831
20831
  */
20832
- const Equivalence$2 = /* @__PURE__ */ make$90((self, that) => {
20832
+ const Equivalence$2 = /* @__PURE__ */ make$92((self, that) => {
20833
20833
  if (self.scale > that.scale) return scale(that, self.scale).value === self.value;
20834
20834
  if (self.scale < that.scale) return scale(self, that.scale).value === that.value;
20835
20835
  return self.value === that.value;
@@ -21093,7 +21093,7 @@ var Middleware = class Middleware {
21093
21093
  return new Middleware(this.encode, this.decode);
21094
21094
  }
21095
21095
  };
21096
- const TypeId$65 = "~effect/SchemaTransformation/Transformation";
21096
+ const TypeId$66 = "~effect/SchemaTransformation/Transformation";
21097
21097
  /**
21098
21098
  * A bidirectional transformation between a decoded type `T` and an encoded
21099
21099
  * type `E`, built from a pair of `Getter`s.
@@ -21135,7 +21135,7 @@ const TypeId$65 = "~effect/SchemaTransformation/Transformation";
21135
21135
  * @since 4.0.0
21136
21136
  */
21137
21137
  var Transformation = class Transformation {
21138
- [TypeId$65] = TypeId$65;
21138
+ [TypeId$66] = TypeId$66;
21139
21139
  _tag = "Transformation";
21140
21140
  decode;
21141
21141
  encode;
@@ -21179,7 +21179,7 @@ var Transformation = class Transformation {
21179
21179
  * @since 4.0.0
21180
21180
  */
21181
21181
  function isTransformation(u) {
21182
- return hasProperty(u, TypeId$65);
21182
+ return hasProperty(u, TypeId$66);
21183
21183
  }
21184
21184
  /**
21185
21185
  * Constructs a `Transformation` from an object with `decode` and `encode`
@@ -21211,7 +21211,7 @@ function isTransformation(u) {
21211
21211
  *
21212
21212
  * @since 4.0.0
21213
21213
  */
21214
- const make$78 = (options) => {
21214
+ const make$80 = (options) => {
21215
21215
  if (isTransformation(options)) return options;
21216
21216
  return new Transformation(options.decode, options.encode);
21217
21217
  };
@@ -21559,7 +21559,7 @@ const fromJsonString$1 = /* @__PURE__ */ new Transformation(/* @__PURE__ */ pars
21559
21559
  */
21560
21560
  const dateTimeUtcFromString = /* @__PURE__ */ transformOrFail({
21561
21561
  decode: (s) => {
21562
- return match$10(make$82(s), {
21562
+ return match$10(make$84(s), {
21563
21563
  onNone: () => fail$6(new InvalidValue$1(some$2(s), { message: "Invalid DateTime input" })),
21564
21564
  onSome: (result) => succeed$3(toUtc(result))
21565
21565
  });
@@ -21657,7 +21657,7 @@ function makeGuard(tag) {
21657
21657
  * @since 4.0.0
21658
21658
  */
21659
21659
  function isAST(u) {
21660
- return hasProperty(u, TypeId$64) && u[TypeId$64] === TypeId$64;
21660
+ return hasProperty(u, TypeId$65) && u[TypeId$65] === TypeId$65;
21661
21661
  }
21662
21662
  /**
21663
21663
  * Narrows an {@link AST} to {@link Declaration}.
@@ -21768,7 +21768,7 @@ var Context = class {
21768
21768
  this.annotations = annotations;
21769
21769
  }
21770
21770
  };
21771
- const TypeId$64 = "~effect/Schema";
21771
+ const TypeId$65 = "~effect/Schema";
21772
21772
  /**
21773
21773
  * Abstract base class for all {@link AST} node variants.
21774
21774
  *
@@ -21789,7 +21789,7 @@ const TypeId$64 = "~effect/Schema";
21789
21789
  * @since 4.0.0
21790
21790
  */
21791
21791
  var Base = class {
21792
- [TypeId$64] = TypeId$64;
21792
+ [TypeId$65] = TypeId$65;
21793
21793
  annotations;
21794
21794
  checks;
21795
21795
  encoding;
@@ -23062,7 +23062,7 @@ var FilterGroup = class FilterGroup extends Class$6 {
23062
23062
  };
23063
23063
  /** @internal */
23064
23064
  function makeFilter$1(filter, annotations, aborted = false) {
23065
- return new Filter((input, ast, options) => make$80(input, filter(input, ast, options)), annotations, aborted);
23065
+ return new Filter((input, ast, options) => make$82(input, filter(input, ast, options)), annotations, aborted);
23066
23066
  }
23067
23067
  /**
23068
23068
  * Creates a {@link Filter} that validates strings against a regular expression.
@@ -23616,7 +23616,7 @@ function nominal() {
23616
23616
  /**
23617
23617
  * @since 4.0.0
23618
23618
  */
23619
- const TypeId$63 = "~effect/platform/PlatformError";
23619
+ const TypeId$64 = "~effect/platform/PlatformError";
23620
23620
  /**
23621
23621
  * @since 4.0.0
23622
23622
  * @category Models
@@ -23656,7 +23656,7 @@ var PlatformError = class extends TaggedError("PlatformError") {
23656
23656
  /**
23657
23657
  * @since 4.0.0
23658
23658
  */
23659
- [TypeId$63] = TypeId$63;
23659
+ [TypeId$64] = TypeId$64;
23660
23660
  get message() {
23661
23661
  return this.reason.message;
23662
23662
  }
@@ -23743,7 +23743,7 @@ const badArgument = (options) => new PlatformError(new BadArgument(options));
23743
23743
  *
23744
23744
  * @since 2.0.0
23745
23745
  */
23746
- const TypeId$62 = "~effect/collections/Chunk";
23746
+ const TypeId$63 = "~effect/collections/Chunk";
23747
23747
  function copy$1(src, srcPos, dest, destPos, len) {
23748
23748
  for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) dest[destPos + i - srcPos] = src[i];
23749
23749
  return dest;
@@ -23769,10 +23769,10 @@ const emptyArray = [];
23769
23769
  * @category equivalence
23770
23770
  * @since 2.0.0
23771
23771
  */
23772
- const makeEquivalence$1 = (isEquivalent) => make$90((self, that) => self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, getUnsafe$3(that, i))));
23772
+ const makeEquivalence$1 = (isEquivalent) => make$92((self, that) => self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, getUnsafe$3(that, i))));
23773
23773
  const _equivalence = /* @__PURE__ */ makeEquivalence$1(equals$2);
23774
23774
  const ChunkProto = {
23775
- [TypeId$62]: { _A: (_) => _ },
23775
+ [TypeId$63]: { _A: (_) => _ },
23776
23776
  toString() {
23777
23777
  return `Chunk(${format$4(toReadonlyArray(this))})`;
23778
23778
  },
@@ -23857,7 +23857,7 @@ const makeChunk = (backing) => {
23857
23857
  * @category constructors
23858
23858
  * @since 2.0.0
23859
23859
  */
23860
- const isChunk = (u) => hasProperty(u, TypeId$62);
23860
+ const isChunk = (u) => hasProperty(u, TypeId$63);
23861
23861
  const _empty = /* @__PURE__ */ makeChunk({ _tag: "IEmpty" });
23862
23862
  /**
23863
23863
  * Creates an empty `Chunk`.
@@ -24385,7 +24385,7 @@ const makeUnsafe$10 = makeLatchUnsafe;
24385
24385
  * @category constructors
24386
24386
  * @since 3.8.0
24387
24387
  */
24388
- const make$77 = makeLatch;
24388
+ const make$79 = makeLatch;
24389
24389
  //#endregion
24390
24390
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/MutableList.js
24391
24391
  /**
@@ -24486,7 +24486,7 @@ const Empty$2 = /* @__PURE__ */ Symbol.for("effect/MutableList/Empty");
24486
24486
  * @since 4.0.0
24487
24487
  * @category constructors
24488
24488
  */
24489
- const make$76 = () => ({
24489
+ const make$78 = () => ({
24490
24490
  head: void 0,
24491
24491
  tail: void 0,
24492
24492
  length: 0
@@ -24970,9 +24970,9 @@ const filter$4 = (self, f) => {
24970
24970
  const remove$6 = (self, value) => filter$4(self, (v) => v !== value);
24971
24971
  //#endregion
24972
24972
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/MutableRef.js
24973
- const TypeId$61 = "~effect/MutableRef";
24973
+ const TypeId$62 = "~effect/MutableRef";
24974
24974
  const MutableRefProto = {
24975
- [TypeId$61]: TypeId$61,
24975
+ [TypeId$62]: TypeId$62,
24976
24976
  ...PipeInspectableProto,
24977
24977
  toJSON() {
24978
24978
  return {
@@ -25005,7 +25005,7 @@ const MutableRefProto = {
25005
25005
  * @since 2.0.0
25006
25006
  * @category constructors
25007
25007
  */
25008
- const make$75 = (value) => {
25008
+ const make$77 = (value) => {
25009
25009
  const ref = Object.create(MutableRefProto);
25010
25010
  ref.current = value;
25011
25011
  return ref;
@@ -25037,7 +25037,7 @@ const make$75 = (value) => {
25037
25037
  * @since 2.0.0
25038
25038
  * @category general
25039
25039
  */
25040
- const get$14 = (self) => self.current;
25040
+ const get$15 = (self) => self.current;
25041
25041
  /**
25042
25042
  * Sets the MutableRef to a new value and returns the reference.
25043
25043
  *
@@ -25081,44 +25081,6 @@ const set$9 = /* @__PURE__ */ dual(2, (self, value) => {
25081
25081
  return self;
25082
25082
  });
25083
25083
  /**
25084
- * Sets the MutableRef to a new value and returns the new value.
25085
- *
25086
- * @example
25087
- * ```ts
25088
- * import { MutableRef } from "effect"
25089
- *
25090
- * const ref = MutableRef.make("old")
25091
- *
25092
- * // Set and get the new value
25093
- * const newValue = MutableRef.setAndGet(ref, "new")
25094
- * console.log(newValue) // "new"
25095
- * console.log(MutableRef.get(ref)) // "new"
25096
- *
25097
- * // Useful for assignments that need the value
25098
- * const counter = MutableRef.make(0)
25099
- * const currentValue = MutableRef.setAndGet(counter, 42)
25100
- * console.log(`Counter set to: ${currentValue}`) // "Counter set to: 42"
25101
- *
25102
- * // Pipe-able version
25103
- * const setValue = MutableRef.setAndGet("final")
25104
- * const result = setValue(ref)
25105
- * console.log(result) // "final"
25106
- *
25107
- * // Difference from set: returns value instead of reference
25108
- * const ref1 = MutableRef.make(1)
25109
- * const returnedRef = MutableRef.set(ref1, 2) // Returns MutableRef
25110
- * const returnedValue = MutableRef.setAndGet(ref1, 3) // Returns value
25111
- * console.log(returnedValue) // 3
25112
- * ```
25113
- *
25114
- * @since 2.0.0
25115
- * @category general
25116
- */
25117
- const setAndGet = /* @__PURE__ */ dual(2, (self, value) => {
25118
- self.current = value;
25119
- return self.current;
25120
- });
25121
- /**
25122
25084
  * Updates the MutableRef with the result of applying a function to its current value,
25123
25085
  * and returns the reference.
25124
25086
  *
@@ -25161,53 +25123,7 @@ const setAndGet = /* @__PURE__ */ dual(2, (self, value) => {
25161
25123
  * @since 2.0.0
25162
25124
  * @category general
25163
25125
  */
25164
- const update = /* @__PURE__ */ dual(2, (self, f) => set$9(self, f(get$14(self))));
25165
- /**
25166
- * Updates the MutableRef with the result of applying a function to its current value,
25167
- * and returns the new value.
25168
- *
25169
- * @example
25170
- * ```ts
25171
- * import { MutableRef } from "effect"
25172
- *
25173
- * const counter = MutableRef.make(5)
25174
- *
25175
- * // Increment and get the new value
25176
- * const newValue = MutableRef.updateAndGet(counter, (n) => n + 1)
25177
- * console.log(newValue) // 6
25178
- * console.log(MutableRef.get(counter)) // 6
25179
- *
25180
- * // Double the value and get the result
25181
- * const doubled = MutableRef.updateAndGet(counter, (n) => n * 2)
25182
- * console.log(doubled) // 12
25183
- *
25184
- * // Transform string and get result
25185
- * const message = MutableRef.make("hello")
25186
- * const upperCase = MutableRef.updateAndGet(message, (s) => s.toUpperCase())
25187
- * console.log(upperCase) // "HELLO"
25188
- *
25189
- * // Pipe-able version
25190
- * const increment = MutableRef.updateAndGet((n: number) => n + 1)
25191
- * const result = increment(counter)
25192
- * console.log(result) // 13 (new value)
25193
- *
25194
- * // Useful for calculations that need the result
25195
- * const score = MutableRef.make(100)
25196
- * const bonus = 50
25197
- * const newScore = MutableRef.updateAndGet(score, (s) => s + bonus)
25198
- * console.log(`New score: ${newScore}`) // "New score: 150"
25199
- *
25200
- * // Array transformations
25201
- * const list = MutableRef.make<Array<number>>([1, 2, 3])
25202
- * const newList = MutableRef.updateAndGet(list, (arr) => arr.map((x) => x * 2))
25203
- * console.log(newList) // [2, 4, 6]
25204
- * console.log(MutableRef.get(list)) // [2, 4, 6]
25205
- * ```
25206
- *
25207
- * @since 2.0.0
25208
- * @category general
25209
- */
25210
- const updateAndGet = /* @__PURE__ */ dual(2, (self, f) => setAndGet(self, f(get$14(self))));
25126
+ const update = /* @__PURE__ */ dual(2, (self, f) => set$9(self, f(get$15(self))));
25211
25127
  //#endregion
25212
25128
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/PubSub.js
25213
25129
  /**
@@ -25240,7 +25156,7 @@ const updateAndGet = /* @__PURE__ */ dual(2, (self, f) => setAndGet(self, f(get$
25240
25156
  *
25241
25157
  * @since 2.0.0
25242
25158
  */
25243
- const TypeId$60 = "~effect/PubSub";
25159
+ const TypeId$61 = "~effect/PubSub";
25244
25160
  const SubscriptionTypeId = "~effect/PubSub/Subscription";
25245
25161
  /**
25246
25162
  * Creates a PubSub with a custom atomic implementation and strategy.
@@ -25265,7 +25181,7 @@ const SubscriptionTypeId = "~effect/PubSub/Subscription";
25265
25181
  * @since 4.0.0
25266
25182
  * @category constructors
25267
25183
  */
25268
- const make$74 = (options) => sync(() => makePubSubUnsafe(options.atomicPubSub(), /* @__PURE__ */ new Map(), makeUnsafe$13(), makeUnsafe$10(false), make$75(false), options.strategy()));
25184
+ const make$76 = (options) => sync(() => makePubSubUnsafe(options.atomicPubSub(), /* @__PURE__ */ new Map(), makeUnsafe$13(), makeUnsafe$10(false), make$77(false), options.strategy()));
25269
25185
  /**
25270
25186
  * Creates a bounded PubSub with backpressure strategy.
25271
25187
  *
@@ -25297,7 +25213,7 @@ const make$74 = (options) => sync(() => makePubSubUnsafe(options.atomicPubSub(),
25297
25213
  * @since 2.0.0
25298
25214
  * @category constructors
25299
25215
  */
25300
- const bounded$1 = (capacity) => make$74({
25216
+ const bounded$1 = (capacity) => make$76({
25301
25217
  atomicPubSub: () => makeAtomicBounded(capacity),
25302
25218
  strategy: () => new BackPressureStrategy()
25303
25219
  });
@@ -25334,7 +25250,7 @@ const bounded$1 = (capacity) => make$74({
25334
25250
  * @since 2.0.0
25335
25251
  * @category constructors
25336
25252
  */
25337
- const dropping = (capacity) => make$74({
25253
+ const dropping = (capacity) => make$76({
25338
25254
  atomicPubSub: () => makeAtomicBounded(capacity),
25339
25255
  strategy: () => new DroppingStrategy()
25340
25256
  });
@@ -25376,7 +25292,7 @@ const dropping = (capacity) => make$74({
25376
25292
  * @since 2.0.0
25377
25293
  * @category constructors
25378
25294
  */
25379
- const sliding = (capacity) => make$74({
25295
+ const sliding = (capacity) => make$76({
25380
25296
  atomicPubSub: () => makeAtomicBounded(capacity),
25381
25297
  strategy: () => new SlidingStrategy()
25382
25298
  });
@@ -25413,7 +25329,7 @@ const sliding = (capacity) => make$74({
25413
25329
  * @since 2.0.0
25414
25330
  * @category constructors
25415
25331
  */
25416
- const unbounded$1 = (options) => make$74({
25332
+ const unbounded$1 = (options) => make$76({
25417
25333
  atomicPubSub: () => makeAtomicUnbounded(options),
25418
25334
  strategy: () => new DroppingStrategy()
25419
25335
  });
@@ -25645,7 +25561,7 @@ const publishAll = /* @__PURE__ */ dual(2, (self, elements) => suspend$3(() => {
25645
25561
  * @category subscription
25646
25562
  */
25647
25563
  const subscribe = (self) => uninterruptible(servicesWith((services) => {
25648
- const localScope = get$15(services, Scope);
25564
+ const localScope = get$16(services, Scope);
25649
25565
  const scope = forkUnsafe(self.scope);
25650
25566
  const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy);
25651
25567
  return addFinalizer$1(scope, unsubscribe(subscription)).pipe(andThen(addFinalizerExit(localScope, (exit) => close(scope, exit))), as$1(subscription));
@@ -25765,7 +25681,7 @@ const removeSubscribers = (subscribers, subscription, pollers) => {
25765
25681
  set.delete(pollers);
25766
25682
  if (set.size === 0) subscribers.delete(subscription);
25767
25683
  };
25768
- const makeSubscriptionUnsafe = (pubsub, subscribers, strategy) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make$76(), makeUnsafe$10(false), make$75(false), strategy, pubsub.replayWindow());
25684
+ const makeSubscriptionUnsafe = (pubsub, subscribers, strategy) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make$78(), makeUnsafe$10(false), make$77(false), strategy, pubsub.replayWindow());
25769
25685
  var BoundedPubSubArb = class {
25770
25686
  array;
25771
25687
  publisherIndex = 0;
@@ -26320,7 +26236,7 @@ var SubscriptionImpl = class {
26320
26236
  }
26321
26237
  };
26322
26238
  var PubSubImpl = class {
26323
- [TypeId$60] = { _A: identity };
26239
+ [TypeId$61] = { _A: identity };
26324
26240
  pubsub;
26325
26241
  subscribers;
26326
26242
  scope;
@@ -26354,7 +26270,7 @@ const ensureCapacity = (capacity) => {
26354
26270
  * @category models
26355
26271
  */
26356
26272
  var BackPressureStrategy = class {
26357
- publishers = /* @__PURE__ */ make$76();
26273
+ publishers = /* @__PURE__ */ make$78();
26358
26274
  get shutdown() {
26359
26275
  return withFiber((fiber) => forEach$4(takeAll$2(this.publishers), ([_, deferred, last]) => last ? interruptWith(deferred, fiber.id) : void_$2, {
26360
26276
  concurrency: "unbounded",
@@ -26367,7 +26283,7 @@ var BackPressureStrategy = class {
26367
26283
  this.offerUnsafe(elements, deferred);
26368
26284
  this.onPubSubEmptySpaceUnsafe(pubsub, subscribers);
26369
26285
  this.completeSubscribersUnsafe(pubsub, subscribers);
26370
- return (get$14(isShutdown) ? interrupt$1 : _await(deferred)).pipe(onInterrupt(() => {
26286
+ return (get$15(isShutdown) ? interrupt$1 : _await(deferred)).pipe(onInterrupt(() => {
26371
26287
  this.removeUnsafe(deferred);
26372
26288
  return void_$2;
26373
26289
  }));
@@ -26651,7 +26567,7 @@ const emptyReplayWindow = {
26651
26567
  /**
26652
26568
  * @since 3.8.0
26653
26569
  */
26654
- const TypeId$59 = "~effect/Queue";
26570
+ const TypeId$60 = "~effect/Queue";
26655
26571
  const EnqueueTypeId = "~effect/Queue/Enqueue";
26656
26572
  const DequeueTypeId = "~effect/Queue/Dequeue";
26657
26573
  const variance$1 = {
@@ -26659,7 +26575,7 @@ const variance$1 = {
26659
26575
  _E: identity
26660
26576
  };
26661
26577
  const QueueProto = {
26662
- [TypeId$59]: variance$1,
26578
+ [TypeId$60]: variance$1,
26663
26579
  [EnqueueTypeId]: variance$1,
26664
26580
  [DequeueTypeId]: variance$1,
26665
26581
  ...PipeInspectableProto,
@@ -26711,12 +26627,12 @@ const QueueProto = {
26711
26627
  * })
26712
26628
  * ```
26713
26629
  */
26714
- const make$73 = (options) => withFiber$1((fiber) => {
26630
+ const make$75 = (options) => withFiber$1((fiber) => {
26715
26631
  const self = Object.create(QueueProto);
26716
26632
  self.dispatcher = fiber.currentDispatcher;
26717
26633
  self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
26718
26634
  self.strategy = options?.strategy ?? "suspend";
26719
- self.messages = make$76();
26635
+ self.messages = make$78();
26720
26636
  self.scheduleRunning = false;
26721
26637
  self.state = {
26722
26638
  _tag: "Open",
@@ -26751,7 +26667,7 @@ const make$73 = (options) => withFiber$1((fiber) => {
26751
26667
  * @since 2.0.0
26752
26668
  * @category Constructors
26753
26669
  */
26754
- const bounded = (capacity) => make$73({ capacity });
26670
+ const bounded = (capacity) => make$75({ capacity });
26755
26671
  /**
26756
26672
  * Creates an unbounded queue that can grow to any size without blocking producers.
26757
26673
  *
@@ -26784,7 +26700,7 @@ const bounded = (capacity) => make$73({ capacity });
26784
26700
  * @since 2.0.0
26785
26701
  * @category Constructors
26786
26702
  */
26787
- const unbounded = () => make$73();
26703
+ const unbounded = () => make$75();
26788
26704
  /**
26789
26705
  * Add a message to the queue. Returns `false` if the queue is done.
26790
26706
  *
@@ -27614,7 +27530,7 @@ var SemaphoreImpl = class {
27614
27530
  * @since 2.0.0
27615
27531
  * @category constructors
27616
27532
  */
27617
- const make$72 = (permits) => sync$2(() => new SemaphoreImpl(permits));
27533
+ const make$74 = (permits) => sync$2(() => new SemaphoreImpl(permits));
27618
27534
  //#endregion
27619
27535
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/Take.js
27620
27536
  /**
@@ -27686,7 +27602,7 @@ const toPull$2 = (take) => isExit(take) ? isSuccess$3(take) ? done(take.value) :
27686
27602
  * @since 4.0.0
27687
27603
  * @category Type Identifiers
27688
27604
  */
27689
- const TypeId$58 = "~effect/Channel";
27605
+ const TypeId$59 = "~effect/Channel";
27690
27606
  /**
27691
27607
  * Tests if a value is a `Channel`.
27692
27608
  *
@@ -27702,9 +27618,9 @@ const TypeId$58 = "~effect/Channel";
27702
27618
  * @category guards
27703
27619
  * @since 3.5.4
27704
27620
  */
27705
- const isChannel = (u) => hasProperty(u, TypeId$58);
27621
+ const isChannel = (u) => hasProperty(u, TypeId$59);
27706
27622
  const ChannelProto = {
27707
- [TypeId$58]: {
27623
+ [TypeId$59]: {
27708
27624
  _Env: identity,
27709
27625
  _InErr: identity,
27710
27626
  _InElem: identity,
@@ -27818,7 +27734,7 @@ const toTransform = (channel) => channel.transform;
27818
27734
  * @since 2.0.0
27819
27735
  */
27820
27736
  const DefaultChunkSize$1 = 4096;
27821
- const asyncQueue = (scope, f, options) => make$73({
27737
+ const asyncQueue = (scope, f, options) => make$75({
27822
27738
  capacity: options?.bufferSize,
27823
27739
  strategy: options?.strategy
27824
27740
  }).pipe(tap$1((queue) => addFinalizer$1(scope, shutdown(queue))), tap$1((queue) => forkIn(provide$4(f(queue), scope), scope)));
@@ -28844,28 +28760,6 @@ const mapError$1 = /* @__PURE__ */ dual(2, (self, f) => catch_$1(self, (err) =>
28844
28760
  */
28845
28761
  const orDie$1 = (self) => catch_$1(self, die$1);
28846
28762
  /**
28847
- * Returns a new channel that retries this channel according to the specified
28848
- * schedule whenever it fails.
28849
- *
28850
- * @since 4.0.0
28851
- * @category utils
28852
- */
28853
- const retry$2 = /* @__PURE__ */ dual(2, (self, schedule) => suspend$2(() => {
28854
- let step = void 0;
28855
- let meta = CurrentMetadata.defaultValue();
28856
- const withReset = onFirst(provideServiceEffect(self, CurrentMetadata, sync(() => meta)), () => {
28857
- step = void 0;
28858
- return void_$2;
28859
- });
28860
- const resolvedSchedule = typeof schedule === "function" ? schedule(identity) : schedule;
28861
- const loop = catch_$1(withReset, fnUntraced(function* (error) {
28862
- if (!step) step = yield* toStepWithMetadata(resolvedSchedule);
28863
- meta = yield* step(error);
28864
- return loop;
28865
- }, (effect, error) => catchDone(effect, () => succeed$3(fail$3(error))), unwrap$2));
28866
- return loop;
28867
- }));
28868
- /**
28869
28763
  * Returns a new channel, which sequentially combines this channel, together
28870
28764
  * with the provided factory function, which creates a second channel based on
28871
28765
  * the output values of this channel. The result is a channel that will first
@@ -28933,7 +28827,7 @@ const switchMap$1 = /* @__PURE__ */ dual((args) => isChannel(args[0]), (self, f,
28933
28827
  const mergeAll$1 = /* @__PURE__ */ dual(2, (channels, { bufferSize = 16, concurrency, switch: switch_ = false }) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
28934
28828
  const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : Math.max(1, concurrency);
28935
28829
  const semaphore = switch_ ? void 0 : makeUnsafe$9(concurrencyN);
28936
- const doneLatch = yield* make$77(true);
28830
+ const doneLatch = yield* make$79(true);
28937
28831
  const fibers = /* @__PURE__ */ new Set();
28938
28832
  const queue = yield* bounded(bufferSize);
28939
28833
  yield* addFinalizer$1(forkedScope, shutdown(queue));
@@ -29171,18 +29065,6 @@ const onExit = /* @__PURE__ */ dual(2, (self, finalizer) => fromTransformBracket
29171
29065
  * @since 4.0.0
29172
29066
  * @category utils
29173
29067
  */
29174
- const onFirst = /* @__PURE__ */ dual(2, (self, onFirst) => transformPull$1(self, (pull) => sync(() => {
29175
- let isFirst = true;
29176
- const pullFirst = tap$1(pull, (element) => {
29177
- isFirst = false;
29178
- return onFirst(element);
29179
- });
29180
- return suspend$3(() => isFirst ? pullFirst : pull);
29181
- })));
29182
- /**
29183
- * @since 4.0.0
29184
- * @category utils
29185
- */
29186
29068
  const onEnd$1 = /* @__PURE__ */ dual(2, (self, onEnd) => transformPull$1(self, (pull) => succeed$3(catchDone(pull, (leftover) => flatMap$4(onEnd, () => done(leftover))))));
29187
29069
  /**
29188
29070
  * Returns a new channel with an attached finalizer. The finalizer is
@@ -29230,11 +29112,6 @@ const provideServices$1 = /* @__PURE__ */ dual(2, (self, services) => fromTransf
29230
29112
  */
29231
29113
  const provideService$1 = /* @__PURE__ */ dual(3, (self, key, service) => fromTransform$1((upstream, scope) => map$9(provideService$2(toTransform(self)(upstream, scope), key, service), provideService$2(key, service))));
29232
29114
  /**
29233
- * @since 4.0.0
29234
- * @category Services
29235
- */
29236
- const provideServiceEffect = /* @__PURE__ */ dual(3, (self, key, service) => fromTransform$1((upstream, scope) => flatMap$4(service, (s) => toTransform(provideService$1(self, key, s))(upstream, scope))));
29237
- /**
29238
29115
  * Runs a channel and discards all output elements, returning only the final result.
29239
29116
  *
29240
29117
  * @example
@@ -29361,7 +29238,7 @@ const runFold = /* @__PURE__ */ dual(3, (self, initial, f) => suspend$3(() => {
29361
29238
  const toPull$1 = /* @__PURE__ */ fnUntraced(function* (self) {
29362
29239
  const semaphore = makeUnsafe$9(1);
29363
29240
  const context = yield* services();
29364
- const scope = get$15(context, Scope);
29241
+ const scope = get$16(context, Scope);
29365
29242
  return (yield* toTransform(self)(done(), scope)).pipe(provideServices$2(context), semaphore.withPermits(1));
29366
29243
  }, /* @__PURE__ */ catchCause$1((cause) => succeed$3(failCause$2(cause))));
29367
29244
  /**
@@ -29409,14 +29286,14 @@ const toPubSubTake$1 = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced(functi
29409
29286
  }));
29410
29287
  //#endregion
29411
29288
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/internal/stream.js
29412
- const TypeId$57 = "~effect/Stream";
29289
+ const TypeId$58 = "~effect/Stream";
29413
29290
  const streamVariance = {
29414
29291
  _R: identity,
29415
29292
  _E: identity,
29416
29293
  _A: identity
29417
29294
  };
29418
29295
  const StreamProto = {
29419
- [TypeId$57]: streamVariance,
29296
+ [TypeId$58]: streamVariance,
29420
29297
  pipe() {
29421
29298
  return pipeArguments(this, arguments);
29422
29299
  }
@@ -29429,7 +29306,7 @@ const fromChannel$2 = (channel) => {
29429
29306
  };
29430
29307
  //#endregion
29431
29308
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/Sink.js
29432
- const TypeId$56 = "~effect/Sink";
29309
+ const TypeId$57 = "~effect/Sink";
29433
29310
  const endVoid = /* @__PURE__ */ succeed$3([void 0]);
29434
29311
  const sinkVariance = {
29435
29312
  _A: identity,
@@ -29439,7 +29316,7 @@ const sinkVariance = {
29439
29316
  _R: identity
29440
29317
  };
29441
29318
  const SinkProto = {
29442
- [TypeId$56]: sinkVariance,
29319
+ [TypeId$57]: sinkVariance,
29443
29320
  pipe() {
29444
29321
  return pipeArguments(this, arguments);
29445
29322
  }
@@ -29461,7 +29338,7 @@ const SinkProto = {
29461
29338
  * @since 2.0.0
29462
29339
  * @category guards
29463
29340
  */
29464
- const isSink = (u) => hasProperty(u, TypeId$56);
29341
+ const isSink = (u) => hasProperty(u, TypeId$57);
29465
29342
  /**
29466
29343
  * Creates a sink from a `Channel`.
29467
29344
  *
@@ -29606,9 +29483,9 @@ const forEachArray = (f) => fromTransform((upstream) => upstream.pipe(flatMap$4(
29606
29483
  const unwrap$1 = (effect) => fromChannel$1(unwrap$2(map$9(effect, toChannel$1)));
29607
29484
  //#endregion
29608
29485
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/MutableHashMap.js
29609
- const TypeId$55 = "~effect/collections/MutableHashMap";
29486
+ const TypeId$56 = "~effect/collections/MutableHashMap";
29610
29487
  const MutableHashMapProto = {
29611
- [TypeId$55]: TypeId$55,
29488
+ [TypeId$56]: TypeId$56,
29612
29489
  [Symbol.iterator]() {
29613
29490
  return this.backing[Symbol.iterator]();
29614
29491
  },
@@ -29673,7 +29550,7 @@ const empty$11 = () => {
29673
29550
  * @since 2.0.0
29674
29551
  * @category constructors
29675
29552
  */
29676
- const make$71 = (...entries) => fromIterable$4(entries);
29553
+ const make$73 = (...entries) => fromIterable$4(entries);
29677
29554
  /**
29678
29555
  * Creates a MutableHashMap from an iterable collection of key-value pairs.
29679
29556
  *
@@ -29725,7 +29602,7 @@ const fromIterable$4 = (entries) => {
29725
29602
  * @since 2.0.0
29726
29603
  * @category elements
29727
29604
  */
29728
- const get$13 = /* @__PURE__ */ dual(2, (self, key) => {
29605
+ const get$14 = /* @__PURE__ */ dual(2, (self, key) => {
29729
29606
  if (self.backing.has(key)) return some$2(self.backing.get(key));
29730
29607
  else if (isSimpleKey(key)) return none$4();
29731
29608
  const refKey = referentialKeysCache.get(self);
@@ -29794,7 +29671,7 @@ const getFromBucket = (self, bucket, key) => {
29794
29671
  * @since 2.0.0
29795
29672
  * @category elements
29796
29673
  */
29797
- const has$2 = /* @__PURE__ */ dual(2, (self, key) => isSome(get$13(self, key)));
29674
+ const has$2 = /* @__PURE__ */ dual(2, (self, key) => isSome(get$14(self, key)));
29798
29675
  /**
29799
29676
  * Sets a key-value pair in the MutableHashMap, mutating the map in place.
29800
29677
  * If the key already exists, its value is updated.
@@ -29985,9 +29862,9 @@ const forEach$2 = /* @__PURE__ */ dual(2, (self, f) => {
29985
29862
  /**
29986
29863
  * @since 3.5.0
29987
29864
  */
29988
- const TypeId$54 = "~effect/RcMap";
29865
+ const TypeId$55 = "~effect/RcMap";
29989
29866
  const makeUnsafe$8 = (options) => ({
29990
- [TypeId$54]: TypeId$54,
29867
+ [TypeId$55]: TypeId$55,
29991
29868
  lookup: options.lookup,
29992
29869
  services: options.services,
29993
29870
  scope: options.scope,
@@ -30037,9 +29914,9 @@ const makeUnsafe$8 = (options) => ({
30037
29914
  * })
30038
29915
  * ```
30039
29916
  */
30040
- const make$70 = (options) => withFiber((fiber) => {
29917
+ const make$72 = (options) => withFiber((fiber) => {
30041
29918
  const services = fiber.services;
30042
- const scope = get$15(services, Scope);
29919
+ const scope = get$16(services, Scope);
30043
29920
  const self = makeUnsafe$8({
30044
29921
  lookup: options.lookup,
30045
29922
  services,
@@ -30082,11 +29959,11 @@ const make$70 = (options) => withFiber((fiber) => {
30082
29959
  * }).pipe(Effect.scoped)
30083
29960
  * ```
30084
29961
  */
30085
- const get$12 = /* @__PURE__ */ dual(2, (self, key) => uninterruptibleMask((restore) => {
29962
+ const get$13 = /* @__PURE__ */ dual(2, (self, key) => uninterruptibleMask((restore) => {
30086
29963
  if (self.state._tag === "Closed") return interrupt$1;
30087
29964
  const state = self.state;
30088
29965
  const parent = getCurrent();
30089
- const o = get$13(state.map, key);
29966
+ const o = get$14(state.map, key);
30090
29967
  let entry;
30091
29968
  if (o._tag === "Some") {
30092
29969
  entry = o.value;
@@ -30170,7 +30047,7 @@ const release = (self, key, entry) => withFiber((fiber) => {
30170
30047
  */
30171
30048
  const invalidate$4 = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced(function* (self, key) {
30172
30049
  if (self.state._tag === "Closed") return;
30173
- const o = get$13(self.state.map, key);
30050
+ const o = get$14(self.state.map, key);
30174
30051
  if (o._tag === "None") return;
30175
30052
  const entry = o.value;
30176
30053
  remove$5(self.state.map, key);
@@ -30180,7 +30057,7 @@ const invalidate$4 = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced(function
30180
30057
  }, uninterruptible));
30181
30058
  //#endregion
30182
30059
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/internal/rcRef.js
30183
- const TypeId$53 = "~effect/RcRef";
30060
+ const TypeId$54 = "~effect/RcRef";
30184
30061
  const stateEmpty = { _tag: "Empty" };
30185
30062
  const stateClosed = { _tag: "Closed" };
30186
30063
  const variance = {
@@ -30188,7 +30065,7 @@ const variance = {
30188
30065
  _E: identity
30189
30066
  };
30190
30067
  var RcRefImpl = class {
30191
- [TypeId$53] = variance;
30068
+ [TypeId$54] = variance;
30192
30069
  pipe() {
30193
30070
  return pipeArguments(this, arguments);
30194
30071
  }
@@ -30206,9 +30083,9 @@ var RcRefImpl = class {
30206
30083
  }
30207
30084
  };
30208
30085
  /** @internal */
30209
- const make$69 = (options) => withFiber((fiber) => {
30086
+ const make$71 = (options) => withFiber((fiber) => {
30210
30087
  const services = fiber.services;
30211
- const scope = get$15(services, Scope);
30088
+ const scope = get$16(services, Scope);
30212
30089
  const ref = new RcRefImpl(options.acquire, services, scope, options.idleTimeToLive ? fromInputUnsafe(options.idleTimeToLive) : void 0);
30213
30090
  return as$1(addFinalizerExit(scope, () => {
30214
30091
  const close$1 = ref.state._tag === "Acquired" ? close(ref.state.scope, void_$3) : void_$2;
@@ -30240,7 +30117,7 @@ const getState = (self) => uninterruptibleMask((restore) => {
30240
30117
  }
30241
30118
  });
30242
30119
  /** @internal */
30243
- const get$11 = /* @__PURE__ */ fnUntraced(function* (self_) {
30120
+ const get$12 = /* @__PURE__ */ fnUntraced(function* (self_) {
30244
30121
  const self = self_;
30245
30122
  const state = yield* getState(self);
30246
30123
  const scope$10 = yield* scope;
@@ -30300,7 +30177,7 @@ const get$11 = /* @__PURE__ */ fnUntraced(function* (self_) {
30300
30177
  * })
30301
30178
  * ```
30302
30179
  */
30303
- const make$68 = make$69;
30180
+ const make$70 = make$71;
30304
30181
  /**
30305
30182
  * Get the value from an RcRef.
30306
30183
  *
@@ -30334,7 +30211,7 @@ const make$68 = make$69;
30334
30211
  * })
30335
30212
  * ```
30336
30213
  */
30337
- const get$10 = get$11;
30214
+ const get$11 = get$12;
30338
30215
  //#endregion
30339
30216
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/Stream.js
30340
30217
  /**
@@ -30344,7 +30221,7 @@ const get$10 = get$11;
30344
30221
  * @since 4.0.0
30345
30222
  * @category Type Identifiers
30346
30223
  */
30347
- const TypeId$52 = "~effect/Stream";
30224
+ const TypeId$53 = "~effect/Stream";
30348
30225
  /**
30349
30226
  * Checks whether a value is a Stream.
30350
30227
  *
@@ -30368,7 +30245,7 @@ const TypeId$52 = "~effect/Stream";
30368
30245
  * @since 2.0.0
30369
30246
  * @category Guards
30370
30247
  */
30371
- const isStream = (u) => hasProperty(u, TypeId$52);
30248
+ const isStream = (u) => hasProperty(u, TypeId$53);
30372
30249
  /**
30373
30250
  * Creates a stream from a array-emitting `Channel`.
30374
30251
  *
@@ -31557,38 +31434,6 @@ const mapError = /* @__PURE__ */ dual(2, (self, f) => fromChannel(mapError$1(sel
31557
31434
  */
31558
31435
  const orDie = (self) => fromChannel(orDie$1(self.channel));
31559
31436
  /**
31560
- * When the stream fails, retry it according to the given schedule.
31561
- *
31562
- * This retries the entire stream, so will re-execute all of the stream's
31563
- * acquire operations.
31564
- *
31565
- * The schedule is reset as soon as the first element passes through the
31566
- * stream again.
31567
- *
31568
- * @example
31569
- * ```ts
31570
- * import { Console, Effect, Schedule, Stream } from "effect"
31571
- *
31572
- * const program = Effect.gen(function*() {
31573
- * const values = yield* Stream.make(1).pipe(
31574
- * Stream.concat(Stream.fail("boom")),
31575
- * Stream.retry(Schedule.recurs(1)),
31576
- * Stream.take(2),
31577
- * Stream.runCollect
31578
- * )
31579
- *
31580
- * yield* Console.log(values)
31581
- * })
31582
- *
31583
- * Effect.runPromise(program)
31584
- * // Output: [ 1, 1 ]
31585
- * ```
31586
- *
31587
- * @since 2.0.0
31588
- * @category Error Handling
31589
- */
31590
- const retry$1 = /* @__PURE__ */ dual(2, (self, policy) => fromChannel(retry$2(self.channel, policy)));
31591
- /**
31592
31437
  * Takes the first `n` elements from this stream, returning `Stream.empty` when `n < 1`.
31593
31438
  *
31594
31439
  * @example
@@ -31866,74 +31711,6 @@ const broadcast = /* @__PURE__ */ dual(2, (self, options) => map$9(toPubSubTake(
31866
31711
  */
31867
31712
  const pipeThroughChannel = /* @__PURE__ */ dual(2, (self, channel) => fromChannel(pipeTo(self.channel, channel)));
31868
31713
  /**
31869
- * Emits only elements that differ from the previous one.
31870
- *
31871
- * @example
31872
- * ```ts
31873
- * import { Console, Effect, Stream } from "effect"
31874
- *
31875
- * const program = Effect.gen(function*() {
31876
- * const values = yield* Stream.fromIterable([1, 1, 2, 2, 3]).pipe(
31877
- * Stream.changes,
31878
- * Stream.runCollect
31879
- * )
31880
- *
31881
- * yield* Console.log(values)
31882
- * })
31883
- *
31884
- * Effect.runPromise(program)
31885
- * // [1, 2, 3]
31886
- * ```
31887
- *
31888
- * @since 2.0.0
31889
- * @category Deduplication
31890
- */
31891
- const changes$1 = (self) => changesWith(self, equals$2);
31892
- /**
31893
- * Returns a stream that only emits elements that are not equal to the previously emitted element, as determined by the specified predicate.
31894
- *
31895
- * @example
31896
- * ```ts
31897
- * import { Console, Effect, Stream } from "effect"
31898
- *
31899
- * const stream = Stream.make("A", "a", "B", "b", "b").pipe(
31900
- * Stream.changesWith((left, right) => left.toLowerCase() === right.toLowerCase())
31901
- * )
31902
- *
31903
- * Effect.runPromise(
31904
- * Effect.gen(function*() {
31905
- * const values = yield* Stream.runCollect(stream)
31906
- * yield* Console.log(values)
31907
- * })
31908
- * )
31909
- * // ["A", "B"]
31910
- * ```
31911
- *
31912
- * @since 2.0.0
31913
- * @category Deduplication
31914
- */
31915
- const changesWith = /* @__PURE__ */ dual(2, (self, f) => transformPull(self, (pull, _scope) => sync(() => {
31916
- let first = true;
31917
- let last;
31918
- return flatMap$4(pull, function loop(arr) {
31919
- const out = [];
31920
- let i = 0;
31921
- if (first) {
31922
- first = false;
31923
- last = arr[0];
31924
- i = 1;
31925
- out.push(last);
31926
- }
31927
- for (; i < arr.length; i++) {
31928
- const a = arr[i];
31929
- if (f(a, last)) continue;
31930
- last = a;
31931
- out.push(a);
31932
- }
31933
- return isArrayNonEmpty(out) ? succeed$3(out) : flatMap$4(pull, loop);
31934
- });
31935
- })));
31936
- /**
31937
31714
  * Decodes Uint8Array chunks into strings using TextDecoder with an optional encoding.
31938
31715
  *
31939
31716
  * @example
@@ -32460,7 +32237,7 @@ const toPubSubTake = /* @__PURE__ */ dual(2, (self, options) => toPubSubTake$1(s
32460
32237
  *
32461
32238
  * @since 4.0.0
32462
32239
  */
32463
- const TypeId$51 = "~effect/platform/FileSystem";
32240
+ const TypeId$52 = "~effect/platform/FileSystem";
32464
32241
  /**
32465
32242
  * Creates a `Size` from various numeric input types.
32466
32243
  *
@@ -32547,9 +32324,9 @@ const FileSystem = /* @__PURE__ */ Service$1("effect/platform/FileSystem");
32547
32324
  * @since 4.0.0
32548
32325
  * @category constructor
32549
32326
  */
32550
- const make$67 = (impl) => FileSystem.of({
32327
+ const make$69 = (impl) => FileSystem.of({
32551
32328
  ...impl,
32552
- [TypeId$51]: TypeId$51,
32329
+ [TypeId$52]: TypeId$52,
32553
32330
  exists: (path) => pipe$1(impl.access(path), as$1(true), catchTag$1("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed$3(false) : fail$6(e))),
32554
32331
  readFileString: (path, encoding) => flatMap$4(impl.readFile(path), (_) => try_({
32555
32332
  try: () => new TextDecoder(encoding).decode(_),
@@ -32653,7 +32430,7 @@ var WatchBackend = class extends Service$1()("effect/platform/FileSystem/WatchBa
32653
32430
  /**
32654
32431
  * @since 4.0.0
32655
32432
  */
32656
- const TypeId$50 = "~effect/platform/Path";
32433
+ const TypeId$51 = "~effect/platform/Path";
32657
32434
  /**
32658
32435
  * @since 4.0.0
32659
32436
  * @category tag
@@ -32845,7 +32622,7 @@ function encodePathChars(filepath) {
32845
32622
  return filepath;
32846
32623
  }
32847
32624
  const posixImpl = /* @__PURE__ */ Path$1.of({
32848
- [TypeId$50]: TypeId$50,
32625
+ [TypeId$51]: TypeId$51,
32849
32626
  resolve: resolve$3,
32850
32627
  normalize(path) {
32851
32628
  if (path.length === 0) return ".";
@@ -33200,7 +32977,7 @@ function makeArray(length, value) {
33200
32977
  * @since 4.0.0
33201
32978
  */
33202
32979
  const ConfigProvider = /* @__PURE__ */ Reference("effect/ConfigProvider", { defaultValue: () => fromEnv() });
33203
- const Proto$24 = {
32980
+ const Proto$25 = {
33204
32981
  ...PipeInspectableProto,
33205
32982
  toJSON() {
33206
32983
  return { _id: "ConfigProvider" };
@@ -33246,8 +33023,8 @@ const Proto$24 = {
33246
33023
  * @category Constructors
33247
33024
  * @since 4.0.0
33248
33025
  */
33249
- function make$66(get, mapInput, prefix) {
33250
- const self = Object.create(Proto$24);
33026
+ function make$68(get, mapInput, prefix) {
33027
+ const self = Object.create(Proto$25);
33251
33028
  self.get = get;
33252
33029
  self.mapInput = mapInput;
33253
33030
  self.prefix = prefix;
@@ -33309,7 +33086,7 @@ function fromEnv(options) {
33309
33086
  ...import.meta?.env
33310
33087
  };
33311
33088
  const trie = buildEnvTrie(env);
33312
- return make$66((path) => succeed$3(nodeAtEnv(trie, env, path)));
33089
+ return make$68((path) => succeed$3(nodeAtEnv(trie, env, path)));
33313
33090
  }
33314
33091
  function buildEnvTrie(env) {
33315
33092
  const root = {};
@@ -33832,7 +33609,7 @@ var HashMapImpl = class {
33832
33609
  const thatImpl = that;
33833
33610
  if (this.size !== thatImpl.size) return false;
33834
33611
  for (const [key, value] of this) {
33835
- const otherValue = pipe$1(that, get$9(key));
33612
+ const otherValue = pipe$1(that, get$10(key));
33836
33613
  if (isNone(otherValue) || !equals$2(value, otherValue.value)) return false;
33837
33614
  }
33838
33615
  return true;
@@ -33867,7 +33644,7 @@ const isHashMap$1 = (u) => hasProperty(u, HashMapTypeId);
33867
33644
  /** @internal */
33868
33645
  const empty$9 = () => new HashMapImpl(false, 0, emptyNode, 0);
33869
33646
  /** @internal */
33870
- const get$9 = /* @__PURE__ */ dual(2, (self, key) => {
33647
+ const get$10 = /* @__PURE__ */ dual(2, (self, key) => {
33871
33648
  return self._root.get(0, hash(key), key);
33872
33649
  });
33873
33650
  /** @internal */
@@ -34405,9 +34182,9 @@ function escapeToken(token) {
34405
34182
  //#endregion
34406
34183
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/internal/schema/schema.js
34407
34184
  /** @internal */
34408
- const TypeId$49 = "~effect/Schema/Schema";
34185
+ const TypeId$50 = "~effect/Schema/Schema";
34409
34186
  const SchemaProto = {
34410
- [TypeId$49]: TypeId$49,
34187
+ [TypeId$50]: TypeId$50,
34411
34188
  pipe() {
34412
34189
  return pipeArguments(this, arguments);
34413
34190
  },
@@ -34422,11 +34199,11 @@ const SchemaProto = {
34422
34199
  }
34423
34200
  };
34424
34201
  /** @internal */
34425
- function make$63(ast, options) {
34202
+ function make$65(ast, options) {
34426
34203
  const self = Object.create(SchemaProto);
34427
34204
  if (options) Object.assign(self, options);
34428
34205
  self.ast = ast;
34429
- self.rebuild = (ast) => make$63(ast, options);
34206
+ self.rebuild = (ast) => make$65(ast, options);
34430
34207
  self.makeUnsafe = makeUnsafe$7(self);
34431
34208
  self.makeOption = makeOption(self);
34432
34209
  return self;
@@ -34444,7 +34221,7 @@ function toCodecJsonBase(ast) {
34444
34221
  case "Declaration": {
34445
34222
  const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
34446
34223
  if (isFunction(getLink)) {
34447
- const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$63(toEncoded$1(tp))) : []);
34224
+ const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$65(toEncoded$1(tp))) : []);
34448
34225
  const to = toCodecJson$1(link.to);
34449
34226
  return replaceEncoding(ast, to === link.to ? [link] : [new Link(to, link.transformation)]);
34450
34227
  }
@@ -34567,7 +34344,7 @@ function fromASTs(asts) {
34567
34344
  }
34568
34345
  function getEncodedSchema(last) {
34569
34346
  const getLink = last.annotations?.toCodecJson ?? last.annotations?.toCodec;
34570
- if (isFunction(getLink)) return replaceEncoding(last, [getLink(last.typeParameters.map((tp) => make$63(toEncoded$1(tp))))]);
34347
+ if (isFunction(getLink)) return replaceEncoding(last, [getLink(last.typeParameters.map((tp) => make$65(toEncoded$1(tp))))]);
34571
34348
  return null_;
34572
34349
  }
34573
34350
  function on(last) {
@@ -35142,7 +34919,7 @@ function getPartPattern(part) {
35142
34919
  *
35143
34920
  * @since 4.0.0
35144
34921
  */
35145
- const TypeId$48 = TypeId$49;
34922
+ const TypeId$49 = TypeId$50;
35146
34923
  /**
35147
34924
  * Creates a schema for a **parametric** type (a generic container such as
35148
34925
  * `Array<A>`, `Option<A>`, etc.) by accepting a list of type-parameter schemas
@@ -35195,7 +34972,7 @@ const TypeId$48 = TypeId$49;
35195
34972
  */
35196
34973
  function declareConstructor() {
35197
34974
  return (typeParameters, run, annotations) => {
35198
- return make$62(new Declaration(typeParameters.map(getAST), (typeParameters) => run(typeParameters.map((ast) => make$62(ast))), annotations));
34975
+ return make$64(new Declaration(typeParameters.map(getAST), (typeParameters) => run(typeParameters.map((ast) => make$64(ast))), annotations));
35199
34976
  };
35200
34977
  }
35201
34978
  /**
@@ -35489,7 +35266,7 @@ const encodeSync = encodeSync$1;
35489
35266
  * @category Constructors
35490
35267
  * @since 4.0.0
35491
35268
  */
35492
- const make$62 = make$63;
35269
+ const make$64 = make$65;
35493
35270
  /**
35494
35271
  * Tests if a value is a `Schema`.
35495
35272
  *
@@ -35497,7 +35274,7 @@ const make$62 = make$63;
35497
35274
  * @since 4.0.0
35498
35275
  */
35499
35276
  function isSchema(u) {
35500
- return hasProperty(u, TypeId$48) && u[TypeId$48] === TypeId$48;
35277
+ return hasProperty(u, TypeId$49) && u[TypeId$49] === TypeId$49;
35501
35278
  }
35502
35279
  /**
35503
35280
  * Creates an exact optional key schema for struct fields. Unlike `optional`,
@@ -35520,7 +35297,7 @@ function isSchema(u) {
35520
35297
  *
35521
35298
  * @since 4.0.0
35522
35299
  */
35523
- const optionalKey = /* @__PURE__ */ lambda((schema) => make$62(optionalKey$1(schema.ast), { schema }));
35300
+ const optionalKey = /* @__PURE__ */ lambda((schema) => make$64(optionalKey$1(schema.ast), { schema }));
35524
35301
  /**
35525
35302
  * Marks a struct field as optional, allowing the key to be absent or
35526
35303
  * `undefined`.
@@ -35553,14 +35330,14 @@ const optional$3 = /* @__PURE__ */ lambda((self) => optionalKey(UndefinedOr(self
35553
35330
  *
35554
35331
  * @since 4.0.0
35555
35332
  */
35556
- const toType = /* @__PURE__ */ lambda((schema) => make$62(toType$1(schema.ast), { schema }));
35333
+ const toType = /* @__PURE__ */ lambda((schema) => make$64(toType$1(schema.ast), { schema }));
35557
35334
  /**
35558
35335
  * Extracts the encoded-side schema: sets `Type` to equal the `Encoded`,
35559
35336
  * discarding the decoding transformation path.
35560
35337
  *
35561
35338
  * @since 4.0.0
35562
35339
  */
35563
- const toEncoded = /* @__PURE__ */ lambda((schema) => make$62(toEncoded$1(schema.ast), { schema }));
35340
+ const toEncoded = /* @__PURE__ */ lambda((schema) => make$64(toEncoded$1(schema.ast), { schema }));
35564
35341
  /**
35565
35342
  * Creates a schema for a single literal value (string, number, bigint, boolean, or null).
35566
35343
  *
@@ -35578,7 +35355,7 @@ const toEncoded = /* @__PURE__ */ lambda((schema) => make$62(toEncoded$1(schema.
35578
35355
  * @since 4.0.0
35579
35356
  */
35580
35357
  function Literal(literal) {
35581
- const out = make$62(new Literal$1(literal), {
35358
+ const out = make$64(new Literal$1(literal), {
35582
35359
  literal,
35583
35360
  transform(to) {
35584
35361
  return out.pipe(decodeTo(Literal(to), {
@@ -35594,41 +35371,41 @@ function Literal(literal) {
35594
35371
  *
35595
35372
  * @since 4.0.0
35596
35373
  */
35597
- const Never = /* @__PURE__ */ make$62(never$4);
35374
+ const Never = /* @__PURE__ */ make$64(never$4);
35598
35375
  /**
35599
35376
  * Schema for the `any` type. Accepts any value without validation.
35600
35377
  *
35601
35378
  * @see {@link Unknown} for a safer alternative that uses `unknown`.
35602
35379
  * @since 4.0.0
35603
35380
  */
35604
- const Any = /* @__PURE__ */ make$62(any$1);
35381
+ const Any = /* @__PURE__ */ make$64(any$1);
35605
35382
  /**
35606
35383
  * Schema for the `unknown` type. Accepts any value without validation.
35607
35384
  *
35608
35385
  * @see {@link Any} for the `any` variant.
35609
35386
  * @since 4.0.0
35610
35387
  */
35611
- const Unknown = /* @__PURE__ */ make$62(unknown$1);
35388
+ const Unknown = /* @__PURE__ */ make$64(unknown$1);
35612
35389
  /**
35613
35390
  * Schema for the `null` literal. Validates that the input is strictly `null`.
35614
35391
  *
35615
35392
  * @see {@link NullOr} for a union with another schema.
35616
35393
  * @since 4.0.0
35617
35394
  */
35618
- const Null = /* @__PURE__ */ make$62(null_);
35395
+ const Null = /* @__PURE__ */ make$64(null_);
35619
35396
  /**
35620
35397
  * Schema for the `undefined` literal. Validates that the input is strictly `undefined`.
35621
35398
  *
35622
35399
  * @see {@link UndefinedOr} for a union with another schema.
35623
35400
  * @since 4.0.0
35624
35401
  */
35625
- const Undefined = /* @__PURE__ */ make$62(undefined_);
35402
+ const Undefined = /* @__PURE__ */ make$64(undefined_);
35626
35403
  /**
35627
35404
  * Schema for `string` values. Validates that the input is `typeof` `"string"`.
35628
35405
  *
35629
35406
  * @since 4.0.0
35630
35407
  */
35631
- const String$1 = /* @__PURE__ */ make$62(string$3);
35408
+ const String$1 = /* @__PURE__ */ make$64(string$3);
35632
35409
  /**
35633
35410
  * Schema for `number` values, including `NaN`, `Infinity`, and `-Infinity`.
35634
35411
  *
@@ -35640,28 +35417,28 @@ const String$1 = /* @__PURE__ */ make$62(string$3);
35640
35417
  * @see {@link Finite} for a schema that excludes non-finite values.
35641
35418
  * @since 4.0.0
35642
35419
  */
35643
- const Number$1 = /* @__PURE__ */ make$62(number$3);
35420
+ const Number$1 = /* @__PURE__ */ make$64(number$3);
35644
35421
  /**
35645
35422
  * Schema for `boolean` values. Validates that the input is `typeof` `"boolean"`.
35646
35423
  *
35647
35424
  * @category Boolean
35648
35425
  * @since 4.0.0
35649
35426
  */
35650
- const Boolean$2 = /* @__PURE__ */ make$62(boolean$5);
35427
+ const Boolean$2 = /* @__PURE__ */ make$64(boolean$5);
35651
35428
  /**
35652
35429
  * Schema for `bigint` values. Validates that the input is `typeof` `"bigint"`.
35653
35430
  *
35654
35431
  * @since 4.0.0
35655
35432
  */
35656
- const BigInt$1 = /* @__PURE__ */ make$62(bigInt);
35433
+ const BigInt$1 = /* @__PURE__ */ make$64(bigInt);
35657
35434
  /**
35658
35435
  * Schema for the `void` type. Accepts `undefined` as the encoded value.
35659
35436
  *
35660
35437
  * @since 4.0.0
35661
35438
  */
35662
- const Void = /* @__PURE__ */ make$62(void_$1);
35439
+ const Void = /* @__PURE__ */ make$64(void_$1);
35663
35440
  function makeStruct(ast, fields) {
35664
- return make$62(ast, {
35441
+ return make$64(ast, {
35665
35442
  fields,
35666
35443
  mapFields(f, options) {
35667
35444
  const fields = f(this.fields);
@@ -35726,7 +35503,7 @@ function Struct$2(fields) {
35726
35503
  */
35727
35504
  function Record(key, value, options) {
35728
35505
  const keyValueCombiner = options?.keyValueCombiner?.decode || options?.keyValueCombiner?.encode ? new KeyValueCombiner(options.keyValueCombiner.decode, options.keyValueCombiner.encode) : void 0;
35729
- return make$62(record$1(key.ast, value.ast, keyValueCombiner), {
35506
+ return make$64(record$1(key.ast, value.ast, keyValueCombiner), {
35730
35507
  key,
35731
35508
  value
35732
35509
  });
@@ -35753,13 +35530,13 @@ function Record(key, value, options) {
35753
35530
  * @since 4.0.0
35754
35531
  */
35755
35532
  function StructWithRest(schema, records) {
35756
- return make$62(structWithRest(schema.ast, records.map(getAST)), {
35533
+ return make$64(structWithRest(schema.ast, records.map(getAST)), {
35757
35534
  schema,
35758
35535
  records
35759
35536
  });
35760
35537
  }
35761
35538
  function makeTuple(ast, elements) {
35762
- return make$62(ast, {
35539
+ return make$64(ast, {
35763
35540
  elements,
35764
35541
  mapElements(f, options) {
35765
35542
  const elements = f(this.elements);
@@ -35806,7 +35583,7 @@ function Tuple(elements) {
35806
35583
  * @category Constructors
35807
35584
  * @since 4.0.0
35808
35585
  */
35809
- const Array$1 = /* @__PURE__ */ lambda((schema) => make$62(new Arrays(false, [], [schema.ast]), { schema }));
35586
+ const Array$1 = /* @__PURE__ */ lambda((schema) => make$64(new Arrays(false, [], [schema.ast]), { schema }));
35810
35587
  /**
35811
35588
  * Defines a non-empty `ReadonlyArray` schema — at least one element required.
35812
35589
  * Type is `readonly [T, ...T[]]`.
@@ -35825,7 +35602,7 @@ const Array$1 = /* @__PURE__ */ lambda((schema) => make$62(new Arrays(false, [],
35825
35602
  * @category Constructors
35826
35603
  * @since 4.0.0
35827
35604
  */
35828
- const NonEmptyArray = /* @__PURE__ */ lambda((schema) => make$62(new Arrays(false, [schema.ast], [schema.ast]), { schema }));
35605
+ const NonEmptyArray = /* @__PURE__ */ lambda((schema) => make$64(new Arrays(false, [schema.ast], [schema.ast]), { schema }));
35829
35606
  /**
35830
35607
  * Makes an array or tuple schema mutable, removing the `readonly` modifier.
35831
35608
  *
@@ -35843,10 +35620,10 @@ const NonEmptyArray = /* @__PURE__ */ lambda((schema) => make$62(new Arrays(fals
35843
35620
  * @since 4.0.0
35844
35621
  */
35845
35622
  const mutable = /* @__PURE__ */ lambda((schema) => {
35846
- return make$62(new Arrays(true, schema.ast.elements, schema.ast.rest), { schema });
35623
+ return make$64(new Arrays(true, schema.ast.elements, schema.ast.rest), { schema });
35847
35624
  });
35848
35625
  function makeUnion(ast, members) {
35849
- return make$62(ast, {
35626
+ return make$64(ast, {
35850
35627
  members,
35851
35628
  mapMembers(f, options) {
35852
35629
  const members = f(this.members);
@@ -35896,7 +35673,7 @@ function Union$2(members, options) {
35896
35673
  */
35897
35674
  function Literals(literals) {
35898
35675
  const members = literals.map(Literal);
35899
- return make$62(union$3(members, "anyOf", void 0), {
35676
+ return make$64(union$3(members, "anyOf", void 0), {
35900
35677
  literals,
35901
35678
  members,
35902
35679
  mapMembers(f) {
@@ -35948,7 +35725,7 @@ const UndefinedOr = /* @__PURE__ */ lambda((self) => Union$2([self, Undefined]))
35948
35725
  * @since 4.0.0
35949
35726
  */
35950
35727
  function suspend(f) {
35951
- return make$62(new Suspend(() => f().ast));
35728
+ return make$64(new Suspend(() => f().ast));
35952
35729
  }
35953
35730
  /**
35954
35731
  * Adds a nominal brand to a schema, intersecting the output type with
@@ -35958,7 +35735,7 @@ function suspend(f) {
35958
35735
  * @since 4.0.0
35959
35736
  */
35960
35737
  function brand(identifier) {
35961
- return (schema) => make$62(brand$1(schema.ast, identifier), {
35738
+ return (schema) => make$64(brand$1(schema.ast, identifier), {
35962
35739
  schema,
35963
35740
  identifier
35964
35741
  });
@@ -35986,11 +35763,11 @@ function brand(identifier) {
35986
35763
  * @since 4.0.0
35987
35764
  */
35988
35765
  function middlewareDecoding(decode) {
35989
- return (schema) => make$62(middlewareDecoding$1(schema.ast, new Middleware(decode, identity)), { schema });
35766
+ return (schema) => make$64(middlewareDecoding$1(schema.ast, new Middleware(decode, identity)), { schema });
35990
35767
  }
35991
35768
  function decodeTo(to, transformation) {
35992
35769
  return (from) => {
35993
- return make$62(decodeTo$1(from.ast, to.ast, transformation ? make$78(transformation) : passthrough()), {
35770
+ return make$64(decodeTo$1(from.ast, to.ast, transformation ? make$80(transformation) : passthrough()), {
35994
35771
  from,
35995
35772
  to
35996
35773
  });
@@ -36032,7 +35809,7 @@ function encodeTo(to, transformation) {
36032
35809
  */
36033
35810
  function withConstructorDefault(defaultValue) {
36034
35811
  return (schema) => {
36035
- return make$62(withConstructorDefault$1(schema.ast, defaultValue), { schema });
35812
+ return make$64(withConstructorDefault$1(schema.ast, defaultValue), { schema });
36036
35813
  };
36037
35814
  }
36038
35815
  /**
@@ -36282,7 +36059,7 @@ function TaggedUnion(casesByTag) {
36282
36059
  for (const key of Object.keys(casesByTag)) members.push(cases[key] = TaggedStruct(key, casesByTag[key]));
36283
36060
  const union = Union$2(members);
36284
36061
  const { guards, isAnyOf, match } = toTaggedUnion("_tag")(union);
36285
- return make$62(union.ast, {
36062
+ return make$64(union.ast, {
36286
36063
  cases,
36287
36064
  isAnyOf,
36288
36065
  guards,
@@ -36319,7 +36096,7 @@ function instanceOf(constructor, annotations) {
36319
36096
  */
36320
36097
  function link$1() {
36321
36098
  return (encodeTo, transformation) => {
36322
- return new Link(encodeTo.ast, make$78(transformation));
36099
+ return new Link(encodeTo.ast, make$80(transformation));
36323
36100
  };
36324
36101
  }
36325
36102
  /**
@@ -36706,7 +36483,7 @@ const NonEmptyString = /* @__PURE__ */ String$1.check(/* @__PURE__ */ isNonEmpty
36706
36483
  * @since 4.0.0
36707
36484
  */
36708
36485
  function Option(value) {
36709
- return make$62(declareConstructor()([value], ([value]) => (input, ast, options) => {
36486
+ return make$64(declareConstructor()([value], ([value]) => (input, ast, options) => {
36710
36487
  if (isOption(input)) {
36711
36488
  if (isNone(input)) return succeedNone;
36712
36489
  return mapBothEager(decodeUnknownEffect$1(value)(input.value, options), {
@@ -36790,7 +36567,7 @@ function OptionFromOptional(schema) {
36790
36567
  */
36791
36568
  function Redacted(value, options) {
36792
36569
  const decodeLabel = typeof options?.label === "string" ? decodeUnknownEffect$1(Literal(options.label)) : void 0;
36793
- return make$62(declareConstructor()([value], ([value]) => (input, ast, poptions) => {
36570
+ return make$64(declareConstructor()([value], ([value]) => (input, ast, poptions) => {
36794
36571
  if (isRedacted(input)) return flatMapEager(decodeLabel !== void 0 ? mapErrorEager(decodeLabel(input.label, poptions), (issue) => new Pointer(["label"], issue)) : void_$2, () => mapBothEager(decodeUnknownEffect$1(value)(value$2(input), poptions), {
36795
36572
  onSuccess: () => input,
36796
36573
  onFailure: () => {
@@ -36808,10 +36585,10 @@ function Redacted(value, options) {
36808
36585
  },
36809
36586
  expected: "Redacted",
36810
36587
  toCodecJson: ([value]) => link$1()(redact$1(value), {
36811
- decode: transform$4((e) => make$81(e, { label: options?.label })),
36588
+ decode: transform$4((e) => make$83(e, { label: options?.label })),
36812
36589
  encode: forbidden((oe) => "Cannot serialize Redacted" + (isSome(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : ""))
36813
36590
  }),
36814
- toArbitrary: ([value]) => () => value.map((a) => make$81(a, { label: options?.label })),
36591
+ toArbitrary: ([value]) => () => value.map((a) => make$83(a, { label: options?.label })),
36815
36592
  toFormatter: () => globalThis.String,
36816
36593
  toEquivalence: ([value]) => makeEquivalence$2(value)
36817
36594
  }).ast, { value });
@@ -36833,7 +36610,7 @@ function redact$1(schema) {
36833
36610
  * @since 4.0.0
36834
36611
  */
36835
36612
  function CauseReason(error, defect) {
36836
- return make$62(declareConstructor()([error, defect], ([error, defect]) => (input, ast, options) => {
36613
+ return make$64(declareConstructor()([error, defect], ([error, defect]) => (input, ast, options) => {
36837
36614
  if (!isReason(input)) return fail$6(new InvalidType(ast, some$2(input)));
36838
36615
  switch (input._tag) {
36839
36616
  case "Fail": return mapBothEager(decodeUnknownEffect$1(error)(input.error, options), {
@@ -36919,7 +36696,7 @@ function causeReasonToFormatter(error, defect) {
36919
36696
  * @since 4.0.0
36920
36697
  */
36921
36698
  function Cause(error, defect) {
36922
- return make$62(declareConstructor()([error, defect], ([error, defect]) => {
36699
+ return make$64(declareConstructor()([error, defect], ([error, defect]) => {
36923
36700
  const failures = Array$1(CauseReason(error, defect));
36924
36701
  return (input, ast, options) => {
36925
36702
  if (!isCause(input)) return fail$6(new InvalidType(ast, some$2(input)));
@@ -37010,7 +36787,7 @@ const Defect = /* @__PURE__ */ Union$2([/* @__PURE__ */ ErrorJsonEncoded.pipe(/*
37010
36787
  * @since 4.0.0
37011
36788
  */
37012
36789
  function Exit(value, error, defect) {
37013
- return make$62(declareConstructor()([
36790
+ return make$64(declareConstructor()([
37014
36791
  value,
37015
36792
  error,
37016
36793
  defect
@@ -37383,7 +37160,7 @@ function makeClass(Inherited, identifier, struct$1, annotations) {
37383
37160
  toString() {
37384
37161
  return `${identifier}(${format$4({ ...this })})`;
37385
37162
  }
37386
- static [TypeId$48] = TypeId$48;
37163
+ static [TypeId$49] = TypeId$49;
37387
37164
  get [ClassTypeId]() {
37388
37165
  return ClassTypeId;
37389
37166
  }
@@ -37439,7 +37216,7 @@ function getClassSchemaFactory(from, identifier, annotations) {
37439
37216
  return (self) => {
37440
37217
  if (memo === void 0) {
37441
37218
  const transformation = getClassTransformation(self);
37442
- const to = make$62(new Declaration([from.ast], () => (input, ast) => {
37219
+ const to = make$64(new Declaration([from.ast], () => (input, ast) => {
37443
37220
  return input instanceof self || hasProperty(input, getClassTypeId(identifier)) ? succeed$3(input) : fail$6(new InvalidType(ast, some$2(input)));
37444
37221
  }, {
37445
37222
  identifier,
@@ -37631,11 +37408,11 @@ function toJsonSchemaDocument(schema, options) {
37631
37408
  * @since 4.0.0
37632
37409
  */
37633
37410
  function toCodecJson(schema) {
37634
- return make$62(toCodecJson$1(schema.ast));
37411
+ return make$64(toCodecJson$1(schema.ast));
37635
37412
  }
37636
37413
  function toCodecStringTree(schema, options) {
37637
- if (options?.keepDeclarations === true) return make$62(toCodecEnsureArray(serializerStringTreeKeepDeclarations(schema.ast)));
37638
- else return make$62(toCodecEnsureArray(serializerStringTree(schema.ast)));
37414
+ if (options?.keepDeclarations === true) return make$64(toCodecEnsureArray(serializerStringTreeKeepDeclarations(schema.ast)));
37415
+ else return make$64(toCodecEnsureArray(serializerStringTree(schema.ast)));
37639
37416
  }
37640
37417
  function getStringTreePriority(ast) {
37641
37418
  switch (ast._tag) {
@@ -37654,7 +37431,7 @@ function serializerTree(ast, recur, onMissingAnnotation) {
37654
37431
  case "Declaration": {
37655
37432
  const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
37656
37433
  if (isFunction(getLink)) {
37657
- const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$62(recur(toEncoded$1(tp)))) : []);
37434
+ const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$64(recur(toEncoded$1(tp)))) : []);
37658
37435
  const to = recur(link.to);
37659
37436
  return replaceEncoding(ast, to === link.to ? [link] : [new Link(to, link.transformation)]);
37660
37437
  }
@@ -37731,7 +37508,7 @@ function onSerializerEnsureArray(ast) {
37731
37508
  * @category JSON
37732
37509
  * @since 4.0.0
37733
37510
  */
37734
- const Json = /* @__PURE__ */ make$62(Json$1);
37511
+ const Json = /* @__PURE__ */ make$64(Json$1);
37735
37512
  /**
37736
37513
  * Schema that accepts any mutable JSON-compatible value. See {@link Json} for
37737
37514
  * the immutable variant.
@@ -37739,10 +37516,10 @@ const Json = /* @__PURE__ */ make$62(Json$1);
37739
37516
  * @category JSON
37740
37517
  * @since 4.0.0
37741
37518
  */
37742
- const MutableJson = /* @__PURE__ */ make$62(MutableJson$1);
37519
+ const MutableJson = /* @__PURE__ */ make$64(MutableJson$1);
37743
37520
  //#endregion
37744
37521
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/Config.js
37745
- const TypeId$47 = "~effect/Config";
37522
+ const TypeId$48 = "~effect/Config";
37746
37523
  /**
37747
37524
  * The error type produced when config loading or validation fails.
37748
37525
  *
@@ -37776,10 +37553,10 @@ var ConfigError = class {
37776
37553
  return `ConfigError(${this.message})`;
37777
37554
  }
37778
37555
  };
37779
- const Proto$23 = {
37556
+ const Proto$24 = {
37780
37557
  ...PipeInspectableProto,
37781
37558
  ...YieldableProto,
37782
- [TypeId$47]: TypeId$47,
37559
+ [TypeId$48]: TypeId$48,
37783
37560
  asEffect() {
37784
37561
  return flatMap$4(ConfigProvider.asEffect(), (provider) => this.parse(provider));
37785
37562
  },
@@ -37820,8 +37597,8 @@ const Proto$23 = {
37820
37597
  * @category Constructors
37821
37598
  * @since 4.0.0
37822
37599
  */
37823
- function make$61(parse) {
37824
- const self = Object.create(Proto$23);
37600
+ function make$63(parse) {
37601
+ const self = Object.create(Proto$24);
37825
37602
  self.parse = parse;
37826
37603
  return self;
37827
37604
  }
@@ -37853,7 +37630,7 @@ function make$61(parse) {
37853
37630
  * @since 4.0.0
37854
37631
  */
37855
37632
  const map$3 = /* @__PURE__ */ dual(2, (self, f) => {
37856
- return make$61((provider) => map$9(self.parse(provider), f));
37633
+ return make$63((provider) => map$9(self.parse(provider), f));
37857
37634
  });
37858
37635
  /**
37859
37636
  * Falls back to another config when parsing fails with a `ConfigError`.
@@ -37883,7 +37660,7 @@ const map$3 = /* @__PURE__ */ dual(2, (self, f) => {
37883
37660
  * @since 4.0.0
37884
37661
  */
37885
37662
  const orElse = /* @__PURE__ */ dual(2, (self, that) => {
37886
- return make$61((provider) => catch_$2(self.parse(provider), (error) => that(error).parse(provider)));
37663
+ return make$63((provider) => catch_$2(self.parse(provider), (error) => that(error).parse(provider)));
37887
37664
  });
37888
37665
  function isMissingDataOnly(issue) {
37889
37666
  switch (issue._tag) {
@@ -38074,7 +37851,7 @@ function schema$2(codec, path) {
38074
37851
  const decodeUnknownEffect = decodeUnknownEffect$1(codecStringTree);
38075
37852
  const codecStringTreeEncoded = toEncoded$1(codecStringTree.ast);
38076
37853
  const defaultPath = typeof path === "string" ? [path] : path ?? [];
38077
- return make$61((provider) => {
37854
+ return make$63((provider) => {
38078
37855
  const path = provider.prefix ? [...provider.prefix, ...defaultPath] : defaultPath;
38079
37856
  return recur(codecStringTreeEncoded, provider, defaultPath).pipe(flatMapEager((tree) => decodeUnknownEffect(tree).pipe(mapErrorEager((issue) => new SchemaError(path.length > 0 ? new Pointer(path, issue) : issue)))), mapErrorEager((cause) => new ConfigError(cause)));
38080
37857
  });
@@ -38125,7 +37902,7 @@ const Boolean$1 = /* @__PURE__ */ Literals([...TrueValues.literals, ...FalseValu
38125
37902
  * @since 4.0.0
38126
37903
  */
38127
37904
  function fail$1(err) {
38128
- return make$61(() => fail$6(new ConfigError(err)));
37905
+ return make$63(() => fail$6(new ConfigError(err)));
38129
37906
  }
38130
37907
  /**
38131
37908
  * Creates a config that always succeeds with the given value, ignoring the
@@ -38149,7 +37926,7 @@ function fail$1(err) {
38149
37926
  * @since 4.0.0
38150
37927
  */
38151
37928
  function succeed(value) {
38152
- return make$61(() => succeed$3(value));
37929
+ return make$63(() => succeed$3(value));
38153
37930
  }
38154
37931
  /**
38155
37932
  * Creates a config for a single string value.
@@ -38442,7 +38219,7 @@ const getErrorReported = (u) => {
38442
38219
  * @since 4.0.0
38443
38220
  * @category type id
38444
38221
  */
38445
- const TypeId$46 = "~effect/cli/CliError";
38222
+ const TypeId$47 = "~effect/cli/CliError";
38446
38223
  /**
38447
38224
  * Type guard to check if a value is a CLI error.
38448
38225
  *
@@ -38472,7 +38249,7 @@ const TypeId$46 = "~effect/cli/CliError";
38472
38249
  * @since 4.0.0
38473
38250
  * @category guards
38474
38251
  */
38475
- const isCliError = (u) => hasProperty(u, TypeId$46);
38252
+ const isCliError = (u) => hasProperty(u, TypeId$47);
38476
38253
  /**
38477
38254
  * Error thrown when an unrecognized option is encountered.
38478
38255
  *
@@ -38505,7 +38282,7 @@ const isCliError = (u) => hasProperty(u, TypeId$46);
38505
38282
  * @since 4.0.0
38506
38283
  * @category models
38507
38284
  */
38508
- var UnrecognizedOption = class extends ErrorClass(`${TypeId$46}/UnrecognizedOption`)({
38285
+ var UnrecognizedOption = class extends ErrorClass(`${TypeId$47}/UnrecognizedOption`)({
38509
38286
  _tag: /* @__PURE__ */ tag("UnrecognizedOption"),
38510
38287
  option: String$1,
38511
38288
  command: /* @__PURE__ */ optional$3(/* @__PURE__ */ Array$1(String$1)),
@@ -38514,7 +38291,7 @@ var UnrecognizedOption = class extends ErrorClass(`${TypeId$46}/UnrecognizedOpti
38514
38291
  /**
38515
38292
  * @since 4.0.0
38516
38293
  */
38517
- [TypeId$46] = TypeId$46;
38294
+ [TypeId$47] = TypeId$47;
38518
38295
  /**
38519
38296
  * @since 4.0.0
38520
38297
  */
@@ -38544,7 +38321,7 @@ var UnrecognizedOption = class extends ErrorClass(`${TypeId$46}/UnrecognizedOpti
38544
38321
  * @since 4.0.0
38545
38322
  * @category models
38546
38323
  */
38547
- var DuplicateOption = class extends ErrorClass(`${TypeId$46}/DuplicateOption`)({
38324
+ var DuplicateOption = class extends ErrorClass(`${TypeId$47}/DuplicateOption`)({
38548
38325
  _tag: /* @__PURE__ */ tag("DuplicateOption"),
38549
38326
  option: String$1,
38550
38327
  parentCommand: String$1,
@@ -38553,7 +38330,7 @@ var DuplicateOption = class extends ErrorClass(`${TypeId$46}/DuplicateOption`)({
38553
38330
  /**
38554
38331
  * @since 4.0.0
38555
38332
  */
38556
- [TypeId$46] = TypeId$46;
38333
+ [TypeId$47] = TypeId$47;
38557
38334
  /**
38558
38335
  * @since 4.0.0
38559
38336
  */
@@ -38590,14 +38367,14 @@ var DuplicateOption = class extends ErrorClass(`${TypeId$46}/DuplicateOption`)({
38590
38367
  * @since 4.0.0
38591
38368
  * @category models
38592
38369
  */
38593
- var MissingOption = class extends ErrorClass(`${TypeId$46}/MissingOption`)({
38370
+ var MissingOption = class extends ErrorClass(`${TypeId$47}/MissingOption`)({
38594
38371
  _tag: /* @__PURE__ */ tag("MissingOption"),
38595
38372
  option: String$1
38596
38373
  }) {
38597
38374
  /**
38598
38375
  * @since 4.0.0
38599
38376
  */
38600
- [TypeId$46] = TypeId$46;
38377
+ [TypeId$47] = TypeId$47;
38601
38378
  /**
38602
38379
  * @since 4.0.0
38603
38380
  */
@@ -38633,14 +38410,14 @@ var MissingOption = class extends ErrorClass(`${TypeId$46}/MissingOption`)({
38633
38410
  * @since 4.0.0
38634
38411
  * @category models
38635
38412
  */
38636
- var MissingArgument = class extends ErrorClass(`${TypeId$46}/MissingArgument`)({
38413
+ var MissingArgument = class extends ErrorClass(`${TypeId$47}/MissingArgument`)({
38637
38414
  _tag: /* @__PURE__ */ tag("MissingArgument"),
38638
38415
  argument: String$1
38639
38416
  }) {
38640
38417
  /**
38641
38418
  * @since 4.0.0
38642
38419
  */
38643
- [TypeId$46] = TypeId$46;
38420
+ [TypeId$47] = TypeId$47;
38644
38421
  /**
38645
38422
  * @since 4.0.0
38646
38423
  */
@@ -38681,7 +38458,7 @@ var MissingArgument = class extends ErrorClass(`${TypeId$46}/MissingArgument`)({
38681
38458
  * @since 4.0.0
38682
38459
  * @category models
38683
38460
  */
38684
- var InvalidValue = class extends ErrorClass(`${TypeId$46}/InvalidValue`)({
38461
+ var InvalidValue = class extends ErrorClass(`${TypeId$47}/InvalidValue`)({
38685
38462
  _tag: /* @__PURE__ */ tag("InvalidValue"),
38686
38463
  option: String$1,
38687
38464
  value: String$1,
@@ -38691,7 +38468,7 @@ var InvalidValue = class extends ErrorClass(`${TypeId$46}/InvalidValue`)({
38691
38468
  /**
38692
38469
  * @since 4.0.0
38693
38470
  */
38694
- [TypeId$46] = TypeId$46;
38471
+ [TypeId$47] = TypeId$47;
38695
38472
  /**
38696
38473
  * @since 4.0.0
38697
38474
  */
@@ -38735,7 +38512,7 @@ var InvalidValue = class extends ErrorClass(`${TypeId$46}/InvalidValue`)({
38735
38512
  * @since 4.0.0
38736
38513
  * @category models
38737
38514
  */
38738
- var UnknownSubcommand = class extends ErrorClass(`${TypeId$46}/UnknownSubcommand`)({
38515
+ var UnknownSubcommand = class extends ErrorClass(`${TypeId$47}/UnknownSubcommand`)({
38739
38516
  _tag: /* @__PURE__ */ tag("UnknownSubcommand"),
38740
38517
  subcommand: String$1,
38741
38518
  parent: /* @__PURE__ */ optional$3(/* @__PURE__ */ Array$1(String$1)),
@@ -38744,7 +38521,7 @@ var UnknownSubcommand = class extends ErrorClass(`${TypeId$46}/UnknownSubcommand
38744
38521
  /**
38745
38522
  * @since 4.0.0
38746
38523
  */
38747
- [TypeId$46] = TypeId$46;
38524
+ [TypeId$47] = TypeId$47;
38748
38525
  /**
38749
38526
  * @since 4.0.0
38750
38527
  */
@@ -38788,14 +38565,14 @@ var UnknownSubcommand = class extends ErrorClass(`${TypeId$46}/UnknownSubcommand
38788
38565
  * @since 4.0.0
38789
38566
  * @category models
38790
38567
  */
38791
- var UserError = class extends ErrorClass(`${TypeId$46}/UserError`)({
38568
+ var UserError = class extends ErrorClass(`${TypeId$47}/UserError`)({
38792
38569
  _tag: /* @__PURE__ */ tag("UserError"),
38793
38570
  cause: Defect
38794
38571
  }) {
38795
38572
  /**
38796
38573
  * @since 4.0.0
38797
38574
  */
38798
- [TypeId$46] = TypeId$46;
38575
+ [TypeId$47] = TypeId$47;
38799
38576
  };
38800
38577
  const NonShowHelpErrors = /* @__PURE__ */ Union$2([
38801
38578
  UnrecognizedOption,
@@ -38813,12 +38590,12 @@ const NonShowHelpErrors = /* @__PURE__ */ Union$2([
38813
38590
  * @since 4.0.0
38814
38591
  * @category models
38815
38592
  */
38816
- var ShowHelp = class extends ErrorClass(`${TypeId$46}/ShowHelp`)({
38593
+ var ShowHelp = class extends ErrorClass(`${TypeId$47}/ShowHelp`)({
38817
38594
  _tag: /* @__PURE__ */ tag("ShowHelp"),
38818
38595
  commandPath: /* @__PURE__ */ Array$1(String$1),
38819
38596
  errors: /* @__PURE__ */ Array$1(NonShowHelpErrors)
38820
38597
  }) {
38821
- [TypeId$46] = TypeId$46;
38598
+ [TypeId$47] = TypeId$47;
38822
38599
  [errorExitCode] = this.errors.length ? 1 : 0;
38823
38600
  [errorReported] = false;
38824
38601
  get message() {
@@ -49328,14 +49105,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
49328
49105
  require_ini();
49329
49106
  require_toml();
49330
49107
  var import_dist$1 = /* @__PURE__ */ __toESM(require_dist$1(), 1);
49331
- const Proto$22 = { ["~effect/cli/Primitive"]: { _A: identity } };
49108
+ const Proto$23 = { ["~effect/cli/Primitive"]: { _A: identity } };
49332
49109
  /** @internal */
49333
49110
  const isTrueValue = /* @__PURE__ */ is$1(TrueValues);
49334
49111
  /** @internal */
49335
49112
  const isFalseValue = /* @__PURE__ */ is$1(FalseValues);
49336
49113
  /** @internal */
49337
49114
  const isBoolean = (p) => p._tag === "Boolean";
49338
- const makePrimitive = (tag, parse) => Object.assign(Object.create(Proto$22), {
49115
+ const makePrimitive = (tag, parse) => Object.assign(Object.create(Proto$23), {
49339
49116
  _tag: tag,
49340
49117
  parse
49341
49118
  });
@@ -49525,7 +49302,7 @@ const getTypeName = (primitive) => {
49525
49302
  const getChoiceKeys = (primitive) => primitive._tag === "Choice" ? primitive.choiceKeys : void 0;
49526
49303
  //#endregion
49527
49304
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/Terminal.js
49528
- const TypeId$45 = "~effect/platform/Terminal";
49305
+ const TypeId$46 = "~effect/platform/Terminal";
49529
49306
  const QuitErrorTypeId = "effect/platform/Terminal/QuitError";
49530
49307
  /**
49531
49308
  * A `QuitError` represents an error that occurs when a user attempts to
@@ -49556,9 +49333,9 @@ const Terminal = /* @__PURE__ */ Service$1("effect/platform/Terminal");
49556
49333
  * @since 4.0.0
49557
49334
  * @category Constructors
49558
49335
  */
49559
- const make$60 = (impl) => Terminal.of({
49336
+ const make$62 = (impl) => Terminal.of({
49560
49337
  ...impl,
49561
- [TypeId$45]: TypeId$45
49338
+ [TypeId$46]: TypeId$46
49562
49339
  });
49563
49340
  //#endregion
49564
49341
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/unstable/cli/internal/ansi.js
@@ -49641,7 +49418,7 @@ const eraseLines = (rows) => {
49641
49418
  /**
49642
49419
  * @since 4.0.0
49643
49420
  */
49644
- const TypeId$44 = "~effect/cli/Prompt";
49421
+ const TypeId$45 = "~effect/cli/Prompt";
49645
49422
  const defaultFigures = {
49646
49423
  arrowUp: "↑",
49647
49424
  arrowDown: "↓",
@@ -49891,7 +49668,7 @@ const toggle = (options) => {
49891
49668
  };
49892
49669
  const proto$1 = {
49893
49670
  ...YieldableProto,
49894
- [TypeId$44]: { _Output: (_) => _ },
49671
+ [TypeId$45]: { _Output: (_) => _ },
49895
49672
  asEffect() {
49896
49673
  return run$6(this);
49897
49674
  },
@@ -50921,7 +50698,7 @@ const entriesToDisplay = (cursor, total, maxVisible) => {
50921
50698
  *
50922
50699
  * @since 4.0.0
50923
50700
  */
50924
- const TypeId$43 = "~effect/cli/Param";
50701
+ const TypeId$44 = "~effect/cli/Param";
50925
50702
  /**
50926
50703
  * Kind discriminator for positional argument parameters.
50927
50704
  *
@@ -50936,8 +50713,8 @@ const argumentKind = "argument";
50936
50713
  * @category constants
50937
50714
  */
50938
50715
  const flagKind = "flag";
50939
- const Proto$21 = {
50940
- [TypeId$43]: { _A: identity },
50716
+ const Proto$22 = {
50717
+ [TypeId$44]: { _A: identity },
50941
50718
  pipe() {
50942
50719
  return pipeArguments(this, arguments);
50943
50720
  }
@@ -50961,7 +50738,7 @@ const Proto$21 = {
50961
50738
  * @since 4.0.0
50962
50739
  * @category refinements
50963
50740
  */
50964
- const isParam = (u) => hasProperty(u, TypeId$43);
50741
+ const isParam = (u) => hasProperty(u, TypeId$44);
50965
50742
  /**
50966
50743
  * Type guard to check if a Single param is a flag (not an argument).
50967
50744
  *
@@ -50974,7 +50751,7 @@ const isFlagParam = (single) => single.kind === "flag";
50974
50751
  */
50975
50752
  const makeSingle = (params) => {
50976
50753
  const parse = (args) => params.kind === "argument" ? parsePositional(params.name, params.primitiveType, args) : parseFlag(params.name, params.primitiveType, args);
50977
- return Object.assign(Object.create(Proto$21), {
50754
+ return Object.assign(Object.create(Proto$22), {
50978
50755
  _tag: "Single",
50979
50756
  ...params,
50980
50757
  description: params.description ?? none$4(),
@@ -51266,7 +51043,7 @@ const withDescription$3 = /* @__PURE__ */ dual(2, (self, description) => {
51266
51043
  */
51267
51044
  const map$2 = /* @__PURE__ */ dual(2, (self, f) => {
51268
51045
  const parse = (args) => map$9(self.parse(args), ([operands, value]) => [operands, f(value)]);
51269
- return Object.assign(Object.create(Proto$21), {
51046
+ return Object.assign(Object.create(Proto$22), {
51270
51047
  _tag: "Map",
51271
51048
  kind: self.kind,
51272
51049
  param: self,
@@ -51274,7 +51051,7 @@ const map$2 = /* @__PURE__ */ dual(2, (self, f) => {
51274
51051
  parse
51275
51052
  });
51276
51053
  });
51277
- const transform$2 = (self, f) => Object.assign(Object.create(Proto$21), {
51054
+ const transform$2 = (self, f) => Object.assign(Object.create(Proto$22), {
51278
51055
  _tag: "Transform",
51279
51056
  kind: self.kind,
51280
51057
  param: self,
@@ -51335,7 +51112,7 @@ const mapEffect = /* @__PURE__ */ dual(2, (self, f) => transform$2(self, (parse)
51335
51112
  */
51336
51113
  const optional$2 = (param) => {
51337
51114
  const parse = (args) => param.parse(args).pipe(map$9(([leftover, value]) => [leftover, some$2(value)]), catchTag$1("MissingOption", () => succeed$3([args.arguments, none$4()])), catchTag$1("MissingArgument", () => succeed$3([args.arguments, none$4()])));
51338
- return Object.assign(Object.create(Proto$21), {
51115
+ return Object.assign(Object.create(Proto$22), {
51339
51116
  _tag: "Optional",
51340
51117
  kind: param.kind,
51341
51118
  param,
@@ -51435,7 +51212,7 @@ const variadic = (self, options) => {
51435
51212
  if (single.kind === "argument") return parsePositionalVariadic(self, single, args, options);
51436
51213
  else return parseOptionVariadic(self, single, args, options);
51437
51214
  };
51438
- return Object.assign(Object.create(Proto$21), {
51215
+ return Object.assign(Object.create(Proto$22), {
51439
51216
  _tag: "Variadic",
51440
51217
  kind: self.kind,
51441
51218
  param: self,
@@ -51994,18 +51771,18 @@ const warn = (...args) => consoleWith((console) => sync$2(() => {
51994
51771
  * @since 4.0.0
51995
51772
  * @category Type IDs
51996
51773
  */
51997
- const TypeId$42 = "~effect/Stdio";
51774
+ const TypeId$43 = "~effect/Stdio";
51998
51775
  /**
51999
51776
  * @since 4.0.0
52000
51777
  * @category Services
52001
51778
  */
52002
- const Stdio = /* @__PURE__ */ Service$1(TypeId$42);
51779
+ const Stdio = /* @__PURE__ */ Service$1(TypeId$43);
52003
51780
  /**
52004
51781
  * @since 4.0.0
52005
51782
  * @category Constructors
52006
51783
  */
52007
- const make$59 = (options) => ({
52008
- [TypeId$42]: TypeId$42,
51784
+ const make$61 = (options) => ({
51785
+ [TypeId$43]: TypeId$43,
52009
51786
  ...options
52010
51787
  });
52011
51788
  //#endregion
@@ -52800,13 +52577,13 @@ const reconstructTree = (tree, results) => {
52800
52577
  * Internal implementation details for CLI commands.
52801
52578
  * Public API is in ../Command.ts
52802
52579
  */
52803
- const TypeId$41 = "~effect/cli/Command";
52580
+ const TypeId$42 = "~effect/cli/Command";
52804
52581
  /**
52805
52582
  * Casts a Command to its internal implementation.
52806
52583
  * For use by internal modules that need access to config, parse, handle, etc.
52807
52584
  */
52808
52585
  const toImpl = (self) => self;
52809
- const Proto$20 = {
52586
+ const Proto$21 = {
52810
52587
  ...YieldableProto,
52811
52588
  pipe() {
52812
52589
  return pipeArguments(this, arguments);
@@ -52877,8 +52654,8 @@ const makeCommand = (options) => {
52877
52654
  ...examples.length > 0 && { examples }
52878
52655
  };
52879
52656
  };
52880
- return Object.assign(Object.create(Proto$20), {
52881
- [TypeId$41]: TypeId$41,
52657
+ return Object.assign(Object.create(Proto$21), {
52658
+ [TypeId$42]: TypeId$42,
52882
52659
  name: options.name,
52883
52660
  examples: options.examples ?? [],
52884
52661
  annotations,
@@ -53671,7 +53448,7 @@ const scanCommandLevel = (tokens, context) => {
53671
53448
  * @since 4.0.0
53672
53449
  * @category Guards
53673
53450
  */
53674
- const isCommand$1 = (u) => hasProperty(u, TypeId$41);
53451
+ const isCommand$1 = (u) => hasProperty(u, TypeId$42);
53675
53452
  /**
53676
53453
  * Creates a Command from a name, optional config, optional handler function, and optional description.
53677
53454
  *
@@ -53725,7 +53502,7 @@ const isCommand$1 = (u) => hasProperty(u, TypeId$41);
53725
53502
  * @since 4.0.0
53726
53503
  * @category constructors
53727
53504
  */
53728
- const make$58 = (name, config, handler) => {
53505
+ const make$60 = (name, config, handler) => {
53729
53506
  return makeCommand({
53730
53507
  name,
53731
53508
  config: parseConfig(config ?? {}),
@@ -54158,7 +53935,7 @@ const runWith = (command, config) => {
54158
53935
  program = provideService$2(program, LogLevel, logLevel);
54159
53936
  const services = match$10(logLevel, {
54160
53937
  onNone: () => empty$16(),
54161
- onSome: (level) => make$87(MinimumLogLevel, level)
53938
+ onSome: (level) => make$89(MinimumLogLevel, level)
54162
53939
  });
54163
53940
  yield* provideServices$2(program, services);
54164
53941
  }, catchFilter$2((error) => isCliError(error) && error._tag === "ShowHelp" ? succeed$8(error) : fail$10(error), (error) => andThen(showHelp(command, error), fail$6(error))), catchFilter$2((e) => isQuitError(e) ? succeed$8(e) : fail$10(e), (_) => interrupt$1));
@@ -54168,7 +53945,7 @@ const runWith = (command, config) => {
54168
53945
  /**
54169
53946
  * @since 4.0.0
54170
53947
  */
54171
- const TypeId$40 = "~effect/Cache";
53948
+ const TypeId$41 = "~effect/Cache";
54172
53949
  /**
54173
53950
  * Creates a cache with dynamic time-to-live based on the result and key.
54174
53951
  *
@@ -54229,12 +54006,12 @@ const TypeId$40 = "~effect/Cache";
54229
54006
  * @since 4.0.0
54230
54007
  * @category Constructors
54231
54008
  */
54232
- const makeWith$3 = (options) => servicesWith$1((services) => {
54233
- const self = Object.create(Proto$19);
54009
+ const makeWith$4 = (options) => servicesWith$1((services) => {
54010
+ const self = Object.create(Proto$20);
54234
54011
  self.lookup = (key) => updateServices$1(options.lookup(key), (input) => merge$7(services, input));
54235
- self.map = make$71();
54012
+ self.map = make$73();
54236
54013
  self.capacity = options.capacity;
54237
- self.timeToLive = options.timeToLive ? (exit, key) => fromInputUnsafe(options.timeToLive(exit, key)) : defaultTimeToLive;
54014
+ self.timeToLive = options.timeToLive ? (exit, key) => fromInputUnsafe(options.timeToLive(exit, key)) : defaultTimeToLive$1;
54238
54015
  return succeed$7(self);
54239
54016
  });
54240
54017
  /**
@@ -54290,13 +54067,13 @@ const makeWith$3 = (options) => servicesWith$1((services) => {
54290
54067
  * @since 4.0.0
54291
54068
  * @category Constructors
54292
54069
  */
54293
- const make$57 = (options) => makeWith$3({
54070
+ const make$59 = (options) => makeWith$4({
54294
54071
  ...options,
54295
- timeToLive: options.timeToLive ? () => options.timeToLive : defaultTimeToLive
54072
+ timeToLive: options.timeToLive ? () => options.timeToLive : defaultTimeToLive$1
54296
54073
  });
54297
- const Proto$19 = {
54074
+ const Proto$20 = {
54298
54075
  ...PipeInspectableProto,
54299
- [TypeId$40]: TypeId$40,
54076
+ [TypeId$41]: TypeId$41,
54300
54077
  toJSON() {
54301
54078
  return {
54302
54079
  _id: "Cache",
@@ -54305,7 +54082,7 @@ const Proto$19 = {
54305
54082
  };
54306
54083
  }
54307
54084
  };
54308
- const defaultTimeToLive = (_, _key) => infinity;
54085
+ const defaultTimeToLive$1 = (_, _key) => infinity;
54309
54086
  /**
54310
54087
  * Retrieves the value associated with the specified key from the cache.
54311
54088
  *
@@ -54389,9 +54166,9 @@ const defaultTimeToLive = (_, _key) => infinity;
54389
54166
  * @since 4.0.0
54390
54167
  * @category Combinators
54391
54168
  */
54392
- const get$7 = /* @__PURE__ */ dual(2, (self, key) => withFiber$1((fiber) => {
54393
- const oentry = get$13(self.map, key);
54394
- if (isSome(oentry) && !hasExpired(oentry.value, fiber)) {
54169
+ const get$8 = /* @__PURE__ */ dual(2, (self, key) => withFiber$1((fiber) => {
54170
+ const oentry = get$14(self.map, key);
54171
+ if (isSome(oentry) && !hasExpired$1(oentry.value, fiber)) {
54395
54172
  remove$5(self.map, key);
54396
54173
  set$8(self.map, key, oentry.value);
54397
54174
  return _await(oentry.value.deferred);
@@ -54402,7 +54179,7 @@ const get$7 = /* @__PURE__ */ dual(2, (self, key) => withFiber$1((fiber) => {
54402
54179
  deferred
54403
54180
  };
54404
54181
  set$8(self.map, key, entry);
54405
- if (Number.isFinite(self.capacity)) checkCapacity(self);
54182
+ if (Number.isFinite(self.capacity)) checkCapacity$1(self);
54406
54183
  return onExit$2(self.lookup(key), (exit) => {
54407
54184
  doneUnsafe(deferred, exit);
54408
54185
  const ttl = self.timeToLive(exit, key);
@@ -54411,11 +54188,11 @@ const get$7 = /* @__PURE__ */ dual(2, (self, key) => withFiber$1((fiber) => {
54411
54188
  return void_$4;
54412
54189
  });
54413
54190
  }));
54414
- const hasExpired = (entry, fiber) => {
54191
+ const hasExpired$1 = (entry, fiber) => {
54415
54192
  if (entry.expiresAt === void 0) return false;
54416
54193
  return fiber.getRef(ClockRef).currentTimeMillisUnsafe() >= entry.expiresAt;
54417
54194
  };
54418
- const checkCapacity = (self) => {
54195
+ const checkCapacity$1 = (self) => {
54419
54196
  let diff = size$2(self.map) - self.capacity;
54420
54197
  if (diff <= 0) return;
54421
54198
  for (const [key] of self.map) {
@@ -54530,7 +54307,7 @@ const set$5 = /* @__PURE__ */ dual(3, (self, key, value) => withFiber$1((fiber)
54530
54307
  deferred,
54531
54308
  expiresAt: isFinite$2(ttl) ? fiber.getRef(ClockRef).currentTimeMillisUnsafe() + toMillis(ttl) : void 0
54532
54309
  });
54533
- checkCapacity(self);
54310
+ checkCapacity$1(self);
54534
54311
  return void_$4;
54535
54312
  }));
54536
54313
  /**
@@ -54614,7 +54391,7 @@ const ignore = "~effect/ErrorReporter/ignore";
54614
54391
  /**
54615
54392
  * @since 2.0.0
54616
54393
  */
54617
- const TypeId$39 = "~effect/FiberHandle";
54394
+ const TypeId$40 = "~effect/FiberHandle";
54618
54395
  /**
54619
54396
  * @example
54620
54397
  * ```ts
@@ -54631,9 +54408,9 @@ const TypeId$39 = "~effect/FiberHandle";
54631
54408
  * @since 2.0.0
54632
54409
  * @category refinements
54633
54410
  */
54634
- const isFiberHandle = (u) => hasProperty(u, TypeId$39);
54635
- const Proto$18 = {
54636
- [TypeId$39]: TypeId$39,
54411
+ const isFiberHandle = (u) => hasProperty(u, TypeId$40);
54412
+ const Proto$19 = {
54413
+ [TypeId$40]: TypeId$40,
54637
54414
  ...PipeInspectableProto,
54638
54415
  toJSON() {
54639
54416
  return {
@@ -54643,7 +54420,7 @@ const Proto$18 = {
54643
54420
  }
54644
54421
  };
54645
54422
  const makeUnsafe$6 = () => {
54646
- const self = Object.create(Proto$18);
54423
+ const self = Object.create(Proto$19);
54647
54424
  self.state = {
54648
54425
  _tag: "Open",
54649
54426
  fiber: void 0
@@ -54679,7 +54456,7 @@ const makeUnsafe$6 = () => {
54679
54456
  * @since 2.0.0
54680
54457
  * @category constructors
54681
54458
  */
54682
- const make$56 = () => acquireRelease(sync(() => makeUnsafe$6()), (handle) => {
54459
+ const make$58 = () => acquireRelease(sync(() => makeUnsafe$6()), (handle) => {
54683
54460
  const state = handle.state;
54684
54461
  if (state._tag === "Closed") return void_$2;
54685
54462
  handle.state = { _tag: "Closed" };
@@ -54809,7 +54586,7 @@ const runImpl$2 = (self, effect, options) => withFiber((parent) => {
54809
54586
  /**
54810
54587
  * @since 2.0.0
54811
54588
  */
54812
- const TypeId$38 = "~effect/FiberMap";
54589
+ const TypeId$39 = "~effect/FiberMap";
54813
54590
  /**
54814
54591
  * @example
54815
54592
  * ```ts
@@ -54827,9 +54604,9 @@ const TypeId$38 = "~effect/FiberMap";
54827
54604
  * @since 2.0.0
54828
54605
  * @category refinements
54829
54606
  */
54830
- const isFiberMap = (u) => hasProperty(u, TypeId$38);
54831
- const Proto$17 = {
54832
- [TypeId$38]: TypeId$38,
54607
+ const isFiberMap = (u) => hasProperty(u, TypeId$39);
54608
+ const Proto$18 = {
54609
+ [TypeId$39]: TypeId$39,
54833
54610
  [Symbol.iterator]() {
54834
54611
  if (this.state._tag === "Closed") return empty$19();
54835
54612
  return this.state.backing[Symbol.iterator]();
@@ -54843,7 +54620,7 @@ const Proto$17 = {
54843
54620
  }
54844
54621
  };
54845
54622
  const makeUnsafe$5 = (backing, deferred) => {
54846
- const self = Object.create(Proto$17);
54623
+ const self = Object.create(Proto$18);
54847
54624
  self.state = {
54848
54625
  _tag: "Open",
54849
54626
  backing
@@ -54878,7 +54655,7 @@ const makeUnsafe$5 = (backing, deferred) => {
54878
54655
  * @since 2.0.0
54879
54656
  * @category constructors
54880
54657
  */
54881
- const make$55 = () => acquireRelease(sync(() => makeUnsafe$5(empty$11(), makeUnsafe$14())), (map) => suspend$3(() => {
54658
+ const make$57 = () => acquireRelease(sync(() => makeUnsafe$5(empty$11(), makeUnsafe$14())), (map) => suspend$3(() => {
54882
54659
  const state = map.state;
54883
54660
  if (state._tag === "Closed") return void_$2;
54884
54661
  map.state = { _tag: "Closed" };
@@ -54915,7 +54692,7 @@ const setUnsafe$1 = /* @__PURE__ */ dual((args) => isFiberMap(args[0]), (self, k
54915
54692
  fiber.interruptUnsafe(internalFiberId$1);
54916
54693
  return;
54917
54694
  }
54918
- const previous = get$13(self.state.backing, key);
54695
+ const previous = get$14(self.state.backing, key);
54919
54696
  if (previous._tag === "Some") {
54920
54697
  if (options?.onlyIfMissing === true) {
54921
54698
  fiber.interruptUnsafe(internalFiberId$1);
@@ -54926,7 +54703,7 @@ const setUnsafe$1 = /* @__PURE__ */ dual((args) => isFiberMap(args[0]), (self, k
54926
54703
  set$8(self.state.backing, key, fiber);
54927
54704
  fiber.addObserver((exit) => {
54928
54705
  if (self.state._tag === "Closed") return;
54929
- const current = get$13(self.state.backing, key);
54706
+ const current = get$14(self.state.backing, key);
54930
54707
  if (isSome(current) && fiber === current.value) remove$5(self.state.backing, key);
54931
54708
  if (isFailure$2(exit) && (options?.propagateInterruption === true ? !isInternalInterruption$1(exit.cause) : !hasInterruptsOnly(exit.cause))) doneUnsafe(self.deferred, exit);
54932
54709
  });
@@ -54982,7 +54759,7 @@ const hasUnsafe = /* @__PURE__ */ dual(2, (self, key) => self.state._tag === "Cl
54982
54759
  */
54983
54760
  const remove$2 = /* @__PURE__ */ dual(2, (self, key) => suspend$3(() => {
54984
54761
  if (self.state._tag === "Closed") return void_$2;
54985
- const fiber = get$13(self.state.backing, key);
54762
+ const fiber = get$14(self.state.backing, key);
54986
54763
  if (fiber._tag === "None") return void_$2;
54987
54764
  return interruptAs(fiber.value, internalFiberId$1);
54988
54765
  }));
@@ -55039,7 +54816,7 @@ const runImpl$1 = (self, key, effect, options) => withFiber((parent) => {
55039
54816
  /**
55040
54817
  * @since 2.0.0
55041
54818
  */
55042
- const TypeId$37 = "~effect/FiberSet";
54819
+ const TypeId$38 = "~effect/FiberSet";
55043
54820
  /**
55044
54821
  * Checks if a value is a FiberSet.
55045
54822
  *
@@ -55057,9 +54834,9 @@ const TypeId$37 = "~effect/FiberSet";
55057
54834
  * })
55058
54835
  * ```
55059
54836
  */
55060
- const isFiberSet = (u) => hasProperty(u, TypeId$37);
55061
- const Proto$16 = {
55062
- [TypeId$37]: TypeId$37,
54837
+ const isFiberSet = (u) => hasProperty(u, TypeId$38);
54838
+ const Proto$17 = {
54839
+ [TypeId$38]: TypeId$38,
55063
54840
  [Symbol.iterator]() {
55064
54841
  if (this.state._tag === "Closed") return empty$19();
55065
54842
  return this.state.backing[Symbol.iterator]();
@@ -55073,7 +54850,7 @@ const Proto$16 = {
55073
54850
  }
55074
54851
  };
55075
54852
  const makeUnsafe$4 = (backing, deferred) => {
55076
- const self = Object.create(Proto$16);
54853
+ const self = Object.create(Proto$17);
55077
54854
  self.state = {
55078
54855
  _tag: "Open",
55079
54856
  backing
@@ -55108,7 +54885,7 @@ const makeUnsafe$4 = (backing, deferred) => {
55108
54885
  * @since 2.0.0
55109
54886
  * @category constructors
55110
54887
  */
55111
- const make$54 = () => acquireRelease(sync(() => makeUnsafe$4(/* @__PURE__ */ new Set(), makeUnsafe$14())), (set) => suspend$3(() => {
54888
+ const make$56 = () => acquireRelease(sync(() => makeUnsafe$4(/* @__PURE__ */ new Set(), makeUnsafe$14())), (set) => suspend$3(() => {
55112
54889
  const state = set.state;
55113
54890
  if (state._tag === "Closed") return void_$2;
55114
54891
  set.state = { _tag: "Closed" };
@@ -55325,7 +55102,7 @@ const symbol$2 = "~effect/interfaces/PrimaryKey";
55325
55102
  const value$1 = (self) => self[symbol$2]();
55326
55103
  //#endregion
55327
55104
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/LayerMap.js
55328
- const TypeId$36 = "~effect/LayerMap";
55105
+ const TypeId$37 = "~effect/LayerMap";
55329
55106
  /**
55330
55107
  * @since 3.14.0
55331
55108
  * @category Constructors
@@ -55368,18 +55145,18 @@ const TypeId$36 = "~effect/LayerMap";
55368
55145
  * })
55369
55146
  * ```
55370
55147
  */
55371
- const make$53 = /* @__PURE__ */ fnUntraced(function* (lookup, options) {
55148
+ const make$55 = /* @__PURE__ */ fnUntraced(function* (lookup, options) {
55372
55149
  const services$14 = yield* services();
55373
55150
  const memoMap = CurrentMemoMap.getOrCreate(services$14);
55374
- const rcMap = yield* make$70({
55375
- lookup: (key) => servicesWith((_) => buildWithMemoMap(lookup(key), memoMap, get$15(_, Scope))),
55151
+ const rcMap = yield* make$72({
55152
+ lookup: (key) => servicesWith((_) => buildWithMemoMap(lookup(key), memoMap, get$16(_, Scope))),
55376
55153
  idleTimeToLive: options?.idleTimeToLive
55377
55154
  });
55378
55155
  return identity({
55379
- [TypeId$36]: TypeId$36,
55156
+ [TypeId$37]: TypeId$37,
55380
55157
  rcMap,
55381
- get: (key) => effectServices(get$12(rcMap, key)),
55382
- services: (key) => get$12(rcMap, key),
55158
+ get: (key) => effectServices(get$13(rcMap, key)),
55159
+ services: (key) => get$13(rcMap, key),
55383
55160
  invalidate: (key) => invalidate$4(rcMap, key)
55384
55161
  });
55385
55162
  });
@@ -55423,7 +55200,7 @@ const make$53 = /* @__PURE__ */ fnUntraced(function* (lookup, options) {
55423
55200
  * })
55424
55201
  * ```
55425
55202
  */
55426
- const fromRecord$1 = (layers, options) => make$53((key) => layers[key], {
55203
+ const fromRecord$1 = (layers, options) => make$55((key) => layers[key], {
55427
55204
  ...options,
55428
55205
  preloadKeys: options?.preload ? Object.keys(layers) : void 0
55429
55206
  });
@@ -55482,7 +55259,7 @@ const Service = () => (id, options) => {
55482
55259
  Object.defineProperty(TagClass, "stack", { get() {
55483
55260
  return creationError.stack;
55484
55261
  } });
55485
- TagClass_.layerNoDeps = effect$1(TagClass_)("lookup" in options ? make$53(options.lookup, options) : fromRecord$1(options.layers, options));
55262
+ TagClass_.layerNoDeps = effect$1(TagClass_)("lookup" in options ? make$55(options.lookup, options) : fromRecord$1(options.layers, options));
55486
55263
  TagClass_.layer = options.dependencies && options.dependencies.length > 0 ? provide$3(TagClass_.layerNoDeps, options.dependencies) : TagClass_.layerNoDeps;
55487
55264
  TagClass_.get = (key) => unwrap$3(map$9(TagClass_.asEffect(), (layerMap) => layerMap.get(key)));
55488
55265
  TagClass_.services = (key) => flatMap$4(TagClass_.asEffect(), (layerMap) => layerMap.services(key));
@@ -55747,7 +55524,7 @@ const RefProto = {
55747
55524
  */
55748
55525
  const makeUnsafe$3 = (value) => {
55749
55526
  const self = Object.create(RefProto);
55750
- self.ref = make$75(value);
55527
+ self.ref = make$77(value);
55751
55528
  return self;
55752
55529
  };
55753
55530
  //#endregion
@@ -55764,7 +55541,7 @@ var Reactivity = class extends Service$1()("effect/reactivity/Reactivity") {};
55764
55541
  * @since 4.0.0
55765
55542
  * @category constructors
55766
55543
  */
55767
- const make$51 = /* @__PURE__ */ sync(() => {
55544
+ const make$53 = /* @__PURE__ */ sync(() => {
55768
55545
  const handlers = /* @__PURE__ */ new Map();
55769
55546
  const invalidateUnsafe = (keys) => {
55770
55547
  keysToHashes(keys, (hash) => {
@@ -55803,8 +55580,8 @@ const make$51 = /* @__PURE__ */ sync(() => {
55803
55580
  };
55804
55581
  const query = (keys, effect) => gen(function* () {
55805
55582
  const services$13 = yield* services();
55806
- const scope = get$15(services$13, Scope);
55807
- const results = yield* make$73();
55583
+ const scope = get$16(services$13, Scope);
55584
+ const results = yield* make$75();
55808
55585
  const runFork = flow(runForkWith(services$13), runIn(scope));
55809
55586
  let running = false;
55810
55587
  let pending = false;
@@ -55864,7 +55641,7 @@ const invalidate = (keys) => Reactivity.use((r) => r.invalidate(keys));
55864
55641
  * @since 4.0.0
55865
55642
  * @category layers
55866
55643
  */
55867
- const layer$32 = /* @__PURE__ */ effect$1(Reactivity)(make$51);
55644
+ const layer$32 = /* @__PURE__ */ effect$1(Reactivity)(make$53);
55868
55645
  function stringOrHash(u) {
55869
55646
  switch (typeof u) {
55870
55647
  case "string":
@@ -55988,7 +55765,7 @@ const recordUpdateHelperSingle = (value, omit) => Object.assign(Object.create(Re
55988
55765
  * @category constructor
55989
55766
  * @since 4.0.0
55990
55767
  */
55991
- const make$50 = (acquirer, compiler, spanAttributes, transformRows) => {
55768
+ const make$52 = (acquirer, compiler, spanAttributes, transformRows) => {
55992
55769
  const cache = transformRows === void 0 ? constructorCache.noTransforms : constructorCache.transforms;
55993
55770
  if (cache.has(acquirer)) return cache.get(acquirer);
55994
55771
  const self = Object.assign(function sql(strings, ...args) {
@@ -56390,7 +56167,7 @@ const StatementProto = {
56390
56167
  const withStatement = (self, span, f) => withFiber((fiber) => {
56391
56168
  const transform = fiber.getRef(CurrentTransformer);
56392
56169
  if (transform === void 0) return f(self);
56393
- return flatMap$4(transform(self, make$50(self.acquirer, self.compiler, self.spanAttributes, self.transformRows), fiber, span), f);
56170
+ return flatMap$4(transform(self, make$52(self.acquirer, self.compiler, self.spanAttributes, self.transformRows), fiber, span), f);
56394
56171
  });
56395
56172
  const isSegment = (u) => {
56396
56173
  if (!hasProperty(u, "_tag")) return false;
@@ -56449,7 +56226,7 @@ const neverFragment = /* @__PURE__ */ fragment([/* @__PURE__ */ literal$1("1=0")
56449
56226
  /**
56450
56227
  * @since 4.0.0
56451
56228
  */
56452
- const TypeId$35 = "~effect/sql/SqlClient";
56229
+ const TypeId$36 = "~effect/sql/SqlClient";
56453
56230
  /**
56454
56231
  * @category models
56455
56232
  * @since 4.0.0
@@ -56459,7 +56236,7 @@ const SqlClient = /* @__PURE__ */ Service$1("effect/sql/SqlClient");
56459
56236
  * @category constructors
56460
56237
  * @since 4.0.0
56461
56238
  */
56462
- const make$49 = /* @__PURE__ */ fnUntraced(function* (options) {
56239
+ const make$51 = /* @__PURE__ */ fnUntraced(function* (options) {
56463
56240
  const getConnection = flatMap$4(serviceOption(TransactionConnection), match$10({
56464
56241
  onNone: () => options.acquirer,
56465
56242
  onSome: ([conn]) => succeed$3(conn)
@@ -56473,7 +56250,7 @@ const make$49 = /* @__PURE__ */ fnUntraced(function* (options) {
56473
56250
  const withTransaction = makeWithTransaction({
56474
56251
  transactionService: TransactionConnection,
56475
56252
  spanAttributes: options.spanAttributes,
56476
- acquireConnection: flatMap$4(make$84(), (scope) => map$9(provide$4(transactionAcquirer, scope), (conn) => [scope, conn])),
56253
+ acquireConnection: flatMap$4(make$86(), (scope) => map$9(provide$4(transactionAcquirer, scope), (conn) => [scope, conn])),
56477
56254
  begin: (conn) => conn.executeUnprepared(beginTransaction, [], void 0),
56478
56255
  savepoint: (conn, id) => conn.executeUnprepared(savepoint(`effect_sql_${id}`), [], void 0),
56479
56256
  commit: (conn) => conn.executeUnprepared(commit, [], void 0),
@@ -56481,14 +56258,14 @@ const make$49 = /* @__PURE__ */ fnUntraced(function* (options) {
56481
56258
  rollbackSavepoint: (conn, id) => conn.executeUnprepared(rollbackSavepoint(`effect_sql_${id}`), [], void 0)
56482
56259
  });
56483
56260
  const reactivity = yield* Reactivity;
56484
- const client = Object.assign(make$50(getConnection, options.compiler, options.spanAttributes, options.transformRows), {
56485
- [TypeId$35]: TypeId$35,
56261
+ const client = Object.assign(make$52(getConnection, options.compiler, options.spanAttributes, options.transformRows), {
56262
+ [TypeId$36]: TypeId$36,
56486
56263
  safe: void 0,
56487
56264
  withTransaction,
56488
56265
  reserve: transactionAcquirer,
56489
56266
  withoutTransforms() {
56490
56267
  if (options.transformRows === void 0) return this;
56491
- const statement = make$50(getConnection, options.compiler.withoutTransform, options.spanAttributes, void 0);
56268
+ const statement = make$52(getConnection, options.compiler.withoutTransform, options.spanAttributes, void 0);
56492
56269
  const client = Object.assign(statement, {
56493
56270
  ...this,
56494
56271
  ...statement
@@ -56543,7 +56320,7 @@ const SafeIntegers = /* @__PURE__ */ Reference("effect/sql/SqlClient/SafeInteger
56543
56320
  /**
56544
56321
  * @since 4.0.0
56545
56322
  */
56546
- const TypeId$34 = "~effect/persistence/KeyValueStore";
56323
+ const TypeId$35 = "~effect/persistence/KeyValueStore";
56547
56324
  const ErrorTypeId$1 = "~effect/persistence/KeyValueStore/KeyValueStoreError";
56548
56325
  /**
56549
56326
  * @since 4.0.0
@@ -56564,8 +56341,8 @@ const KeyValueStore = /* @__PURE__ */ Service$1("effect/persistence/KeyValueStor
56564
56341
  * @since 4.0.0
56565
56342
  * @category constructors
56566
56343
  */
56567
- const make$48 = (options) => KeyValueStore.of({
56568
- [TypeId$34]: TypeId$34,
56344
+ const make$50 = (options) => KeyValueStore.of({
56345
+ [TypeId$35]: TypeId$35,
56569
56346
  has: (key) => map$9(options.get(key), isNotUndefined),
56570
56347
  isEmpty: map$9(options.size, (size) => size === 0),
56571
56348
  modify: (key, f) => flatMap$4(options.get(key), (o) => {
@@ -56603,7 +56380,7 @@ const layerFileSystem = (directory) => effect$1(KeyValueStore)(gen(function* ()
56603
56380
  const path = yield* Path$1;
56604
56381
  const keyPath = (key) => path.join(directory, encodeURIComponent(key));
56605
56382
  if (!(yield* fs.exists(directory))) yield* fs.makeDirectory(directory, { recursive: true });
56606
- return make$48({
56383
+ return make$50({
56607
56384
  get: (key) => catchTag$1(fs.readFileString(keyPath(key)), "PlatformError", (cause) => cause.reason._tag === "NotFound" ? undefined_$1 : fail$6(new KeyValueStoreError({
56608
56385
  method: "get",
56609
56386
  key,
@@ -56912,9 +56689,9 @@ const layerKvs$1 = /* @__PURE__ */ layer$31.pipe(/* @__PURE__ */ provide$3(layer
56912
56689
  const unsafeTtlToExpires = (clock, ttl) => ttl ? clock.currentTimeMillisUnsafe() + toMillis(ttl) : null;
56913
56690
  //#endregion
56914
56691
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/RequestResolver.js
56915
- const TypeId$33 = "~effect/RequestResolver";
56692
+ const TypeId$34 = "~effect/RequestResolver";
56916
56693
  const RequestResolverProto = {
56917
- [TypeId$33]: {
56694
+ [TypeId$34]: {
56918
56695
  _A: identity,
56919
56696
  _R: identity
56920
56697
  },
@@ -56928,7 +56705,7 @@ const RequestResolverProto = {
56928
56705
  * @since 2.0.0
56929
56706
  * @category guards
56930
56707
  */
56931
- const isRequestResolver = (u) => hasProperty(u, TypeId$33);
56708
+ const isRequestResolver = (u) => hasProperty(u, TypeId$34);
56932
56709
  /**
56933
56710
  * Low-level constructor for creating a request resolver with fine-grained
56934
56711
  * control over its behavior.
@@ -56936,7 +56713,7 @@ const isRequestResolver = (u) => hasProperty(u, TypeId$33);
56936
56713
  * @since 4.0.0
56937
56714
  * @category constructors
56938
56715
  */
56939
- const makeWith$2 = (options) => {
56716
+ const makeWith$3 = (options) => {
56940
56717
  const self = Object.create(RequestResolverProto);
56941
56718
  self.batchKey = options.batchKey;
56942
56719
  self.preCheck = options.preCheck;
@@ -56978,7 +56755,7 @@ const defaultKey = (_request) => defaultKeyObject;
56978
56755
  * @since 2.0.0
56979
56756
  * @category constructors
56980
56757
  */
56981
- const make$47 = (runAll) => makeWith$2({
56758
+ const make$49 = (runAll) => makeWith$3({
56982
56759
  batchKey: defaultKey,
56983
56760
  delay: yieldNow,
56984
56761
  collectWhile: constTrue,
@@ -57018,7 +56795,7 @@ const make$47 = (runAll) => makeWith$2({
57018
56795
  * @since 4.0.0
57019
56796
  * @category constructors
57020
56797
  */
57021
- const makeGrouped = (options) => makeWith$2({
56798
+ const makeGrouped = (options) => makeWith$3({
57022
56799
  batchKey: hashGroupKey(options.key),
57023
56800
  delay: yieldNow,
57024
56801
  collectWhile: constTrue,
@@ -57028,7 +56805,7 @@ const hashGroupKey = (get) => {
57028
56805
  const groupKeys = empty$11();
57029
56806
  return (entry) => {
57030
56807
  const key = get(entry);
57031
- const okey = get$13(groupKeys, key);
56808
+ const okey = get$14(groupKeys, key);
57032
56809
  if (okey._tag === "Some") return okey.value;
57033
56810
  set$8(groupKeys, key, key);
57034
56811
  return key;
@@ -57064,7 +56841,7 @@ const hashGroupKey = (get) => {
57064
56841
  * @since 4.0.0
57065
56842
  * @category delay
57066
56843
  */
57067
- const setDelay = /* @__PURE__ */ dual(2, (self, duration) => makeWith$2({
56844
+ const setDelay = /* @__PURE__ */ dual(2, (self, duration) => makeWith$3({
57068
56845
  ...self,
57069
56846
  delay: sleep(duration)
57070
56847
  }));
@@ -57103,7 +56880,7 @@ const setDelay = /* @__PURE__ */ dual(2, (self, duration) => makeWith$2({
57103
56880
  * @since 2.0.0
57104
56881
  * @category combinators
57105
56882
  */
57106
- const batchN = /* @__PURE__ */ dual(2, (self, n) => makeWith$2({
56883
+ const batchN = /* @__PURE__ */ dual(2, (self, n) => makeWith$3({
57107
56884
  ...self,
57108
56885
  collectWhile: (requests) => requests.size < n
57109
56886
  }));
@@ -57148,7 +56925,7 @@ const batchN = /* @__PURE__ */ dual(2, (self, n) => makeWith$2({
57148
56925
  * @since 4.0.0
57149
56926
  * @category combinators
57150
56927
  */
57151
- const withSpan = /* @__PURE__ */ dual((args) => isRequestResolver(args[0]), (self, name, options) => makeWith$2({
56928
+ const withSpan = /* @__PURE__ */ dual((args) => isRequestResolver(args[0]), (self, name, options) => makeWith$3({
57152
56929
  ...self,
57153
56930
  runAll: (entries, key) => suspend$3(() => {
57154
56931
  const opts = typeof options === "function" ? options(entries) : options;
@@ -57175,10 +56952,10 @@ const withSpan = /* @__PURE__ */ dual((args) => isRequestResolver(args[0]), (sel
57175
56952
  }));
57176
56953
  //#endregion
57177
56954
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/SynchronizedRef.js
57178
- const TypeId$32 = "~effect/SynchronizedRef";
57179
- const Proto$15 = {
56955
+ const TypeId$33 = "~effect/SynchronizedRef";
56956
+ const Proto$16 = {
57180
56957
  ...PipeInspectableProto,
57181
- [TypeId$32]: TypeId$32,
56958
+ [TypeId$33]: TypeId$33,
57182
56959
  toJSON() {
57183
56960
  return {
57184
56961
  _id: "SynchronizedRef",
@@ -57191,7 +56968,7 @@ const Proto$15 = {
57191
56968
  * @category constructors
57192
56969
  */
57193
56970
  const makeUnsafe$1 = (value) => {
57194
- const self = Object.create(Proto$15);
56971
+ const self = Object.create(Proto$16);
57195
56972
  self.semaphore = makeUnsafe$9(1);
57196
56973
  self.backing = makeUnsafe$3(value);
57197
56974
  return self;
@@ -57201,10 +56978,10 @@ const makeUnsafe$1 = (value) => {
57201
56978
  /**
57202
56979
  * @since 2.0.0
57203
56980
  */
57204
- const TypeId$31 = "~effect/ScopedRef";
57205
- const Proto$14 = {
56981
+ const TypeId$32 = "~effect/ScopedRef";
56982
+ const Proto$15 = {
57206
56983
  ...PipeInspectableProto,
57207
- [TypeId$31]: TypeId$31,
56984
+ [TypeId$32]: TypeId$32,
57208
56985
  toJSON() {
57209
56986
  return {
57210
56987
  _id: "ScopedRef",
@@ -57213,7 +56990,7 @@ const Proto$14 = {
57213
56990
  }
57214
56991
  };
57215
56992
  const makeUnsafe = (scope, value) => {
57216
- const self = Object.create(Proto$14);
56993
+ const self = Object.create(Proto$15);
57217
56994
  self.backing = makeUnsafe$1([scope, value]);
57218
56995
  return self;
57219
56996
  };
@@ -57243,7 +57020,7 @@ const getUnsafe = (self) => self.backing.backing.ref.current[1];
57243
57020
  * @since 2.0.0
57244
57021
  * @category getters
57245
57022
  */
57246
- const get$6 = (self) => sync(() => getUnsafe(self));
57023
+ const get$7 = (self) => sync(() => getUnsafe(self));
57247
57024
  /**
57248
57025
  * Sets the value of this reference to the specified resourcefully-created
57249
57026
  * value. Any resources associated with the old value will be released.
@@ -57262,6 +57039,103 @@ const set$4 = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced(function* (self
57262
57039
  self.backing.backing.ref.current = [scope, value];
57263
57040
  }, uninterruptible, (effect, self) => self.backing.semaphore.withPermit(effect)));
57264
57041
  //#endregion
57042
+ //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/ScopedCache.js
57043
+ /**
57044
+ * @since 4.0.0
57045
+ */
57046
+ const TypeId$31 = "~effect/ScopedCache";
57047
+ /**
57048
+ * @since 4.0.0
57049
+ * @category Constructors
57050
+ */
57051
+ const makeWith$2 = (options) => servicesWith$1((services) => {
57052
+ const scope = get$16(services, Scope);
57053
+ const self = Object.create(Proto$14);
57054
+ self.lookup = (key) => updateServices$1(options.lookup(key), (input) => merge$7(services, input));
57055
+ const map = empty$11();
57056
+ self.state = {
57057
+ _tag: "Open",
57058
+ map
57059
+ };
57060
+ self.capacity = options.capacity;
57061
+ self.timeToLive = options.timeToLive ? (exit, key) => fromInputUnsafe(options.timeToLive(exit, key)) : defaultTimeToLive;
57062
+ return as$2(addFinalizer$1(scope, withFiber$1((fiber) => {
57063
+ self.state = { _tag: "Closed" };
57064
+ return invalidateAllImpl(fiber, map);
57065
+ })), self);
57066
+ });
57067
+ /**
57068
+ * @since 4.0.0
57069
+ * @category Constructors
57070
+ */
57071
+ const make$48 = (options) => makeWith$2({
57072
+ ...options,
57073
+ timeToLive: options.timeToLive ? () => options.timeToLive : defaultTimeToLive
57074
+ });
57075
+ const Proto$14 = {
57076
+ ...PipeInspectableProto,
57077
+ [TypeId$31]: TypeId$31,
57078
+ toJSON() {
57079
+ return {
57080
+ _id: "ScopedCache",
57081
+ capacity: this.capacity,
57082
+ state: this.state
57083
+ };
57084
+ }
57085
+ };
57086
+ const defaultTimeToLive = (_, _key) => infinity;
57087
+ /**
57088
+ * @since 4.0.0
57089
+ * @category Combinators
57090
+ */
57091
+ const get$6 = /* @__PURE__ */ dual(2, (self, key) => uninterruptibleMask$1((restore) => withFiber$1((fiber) => {
57092
+ const state = self.state;
57093
+ if (state._tag === "Closed") return interrupt$4;
57094
+ const oentry = get$14(state.map, key);
57095
+ if (isSome(oentry) && !hasExpired(oentry.value, fiber)) {
57096
+ remove$5(state.map, key);
57097
+ set$8(state.map, key, oentry.value);
57098
+ return restore(_await(oentry.value.deferred));
57099
+ }
57100
+ const scope = makeUnsafe$13();
57101
+ const deferred = makeUnsafe$14();
57102
+ const entry = {
57103
+ expiresAt: void 0,
57104
+ deferred,
57105
+ scope
57106
+ };
57107
+ set$8(state.map, key, entry);
57108
+ return checkCapacity(fiber, state.map, self.capacity).pipe(isSome(oentry) ? flatMap$6(() => close(oentry.value.scope, exitVoid)) : identity, flatMap$6(() => provide$4(restore(self.lookup(key)), scope)), onExit$2((exit) => {
57109
+ doneUnsafe(deferred, exit);
57110
+ const ttl = self.timeToLive(exit, key);
57111
+ if (isFinite$2(ttl)) entry.expiresAt = fiber.getRef(ClockRef).currentTimeMillisUnsafe() + toMillis(ttl);
57112
+ return void_$4;
57113
+ }));
57114
+ })));
57115
+ const hasExpired = (entry, fiber) => {
57116
+ if (entry.expiresAt === void 0) return false;
57117
+ return fiber.getRef(ClockRef).currentTimeMillisUnsafe() >= entry.expiresAt;
57118
+ };
57119
+ const checkCapacity = (parent, map, capacity) => {
57120
+ if (!Number.isFinite(capacity)) return void_$4;
57121
+ let diff = size$2(map) - capacity;
57122
+ if (diff <= 0) return void_$4;
57123
+ const fibers = empty$17();
57124
+ for (const [key, entry] of map) {
57125
+ remove$5(map, key);
57126
+ fibers.push(forkUnsafe$1(parent, close(entry.scope, exitVoid), true));
57127
+ diff--;
57128
+ if (diff === 0) break;
57129
+ }
57130
+ return fiberAwaitAll(fibers);
57131
+ };
57132
+ const invalidateAllImpl = (parent, map) => {
57133
+ const fibers = empty$17();
57134
+ for (const [, entry] of map) fibers.push(forkUnsafe$1(parent, close(entry.scope, exitVoid), true, true));
57135
+ clear$1(map);
57136
+ return fiberAwaitAll(fibers);
57137
+ };
57138
+ //#endregion
57265
57139
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/SubscriptionRef.js
57266
57140
  /**
57267
57141
  * @since 2.0.0
@@ -57272,7 +57146,30 @@ const TypeId$30 = "~effect/SubscriptionRef";
57272
57146
  * @category guards
57273
57147
  */
57274
57148
  const isSubscriptionRef = (u) => hasProperty(u, TypeId$30);
57275
- ({ ...PipeInspectableProto });
57149
+ const Proto$13 = {
57150
+ ...PipeInspectableProto,
57151
+ [TypeId$30]: { _A: identity },
57152
+ toJSON() {
57153
+ return {
57154
+ _id: "SubscriptionRef",
57155
+ value: this.value
57156
+ };
57157
+ }
57158
+ };
57159
+ /**
57160
+ * Constructs a new `SubscriptionRef` from an initial value.
57161
+ *
57162
+ * @since 2.0.0
57163
+ * @category constructors
57164
+ */
57165
+ const make$47 = (value) => map$9(unbounded$1({ replay: 1 }), (pubsub) => {
57166
+ const self = Object.create(Proto$13);
57167
+ self.semaphore = makeUnsafe$9(1);
57168
+ self.value = value;
57169
+ self.pubsub = pubsub;
57170
+ publishUnsafe(self.pubsub, value);
57171
+ return self;
57172
+ });
57276
57173
  /**
57277
57174
  * Creates a stream that emits the current value and all subsequent changes to
57278
57175
  * the `SubscriptionRef`.
@@ -59303,7 +59200,7 @@ const readableToPullUnsafe = (options) => {
59303
59200
  const readable = options.readable;
59304
59201
  if (readable.readableEnded) return succeed$3(done());
59305
59202
  const closeOnDone = options.closeOnDone ?? true;
59306
- const exit = options.exit ?? make$75(void 0);
59203
+ const exit = options.exit ?? make$77(void 0);
59307
59204
  const latch = makeUnsafe$10(false);
59308
59205
  function onReadable() {
59309
59206
  latch.openUnsafe();
@@ -59986,7 +59883,7 @@ const Proto$10 = /* @__PURE__ */ Object.create(null);
59986
59883
  Object.defineProperties(Proto$10, {
59987
59884
  [TypeId$27]: { value: TypeId$27 },
59988
59885
  [symbolRedactable]: { value(context) {
59989
- return redact(this, get$15(context, CurrentRedactedNames));
59886
+ return redact(this, get$16(context, CurrentRedactedNames));
59990
59887
  } },
59991
59888
  toJSON: { value() {
59992
59889
  return redact$3(this);
@@ -60076,8 +59973,8 @@ const redact = /* @__PURE__ */ dual(2, (self, key) => {
60076
59973
  const modify = (key) => {
60077
59974
  if (typeof key === "string") {
60078
59975
  const k = key.toLowerCase();
60079
- if (k in self) out[k] = make$81(self[k]);
60080
- } else for (const name in self) if (key.test(name)) out[name] = make$81(self[name]);
59976
+ if (k in self) out[k] = make$83(self[k]);
59977
+ } else for (const name in self) if (key.test(name)) out[name] = make$83(self[name]);
60081
59978
  };
60082
59979
  if (Array.isArray(key)) for (let i = 0; i < key.length; i++) modify(key[i]);
60083
59980
  else modify(key);
@@ -60298,7 +60195,7 @@ const fromInputNested = (input) => {
60298
60195
  * @since 4.0.0
60299
60196
  * @category Equivalence
60300
60197
  */
60301
- const Equivalence = /* @__PURE__ */ make$90((a, b) => arrayEquivalence(a.params, b.params));
60198
+ const Equivalence = /* @__PURE__ */ make$92((a, b) => arrayEquivalence(a.params, b.params));
60302
60199
  const arrayEquivalence = /* @__PURE__ */ makeEquivalence$3(/* @__PURE__ */ makeEquivalence$5([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ strictEqual()]));
60303
60200
  /**
60304
60201
  * @since 4.0.0
@@ -61176,7 +61073,7 @@ const retryTransient = /* @__PURE__ */ dual(2, (self, options) => {
61176
61073
  schedule: passthroughSchedule,
61177
61074
  times,
61178
61075
  while: isTransientResponse
61179
- }), retryOn === "response-only" ? identity : retry$3({
61076
+ }), retryOn === "response-only" ? identity : retry$1({
61180
61077
  while: isOnlySchedule || options.while === void 0 ? isTransientError : or$1(isTransientError, options.while),
61181
61078
  schedule,
61182
61079
  times
@@ -62402,7 +62299,7 @@ const fromWebSocket = (acquire, options) => withFiber((fiber) => {
62402
62299
  const acquireContext = fiber.services;
62403
62300
  const closeCodeIsError = options?.closeCodeIsError ?? defaultCloseCodeIsError;
62404
62301
  const runRaw = (handler, opts) => scopedWith(fnUntraced(function* (scope) {
62405
- const fiberSet = yield* make$54().pipe(provide$4(scope));
62302
+ const fiberSet = yield* make$56().pipe(provide$4(scope));
62406
62303
  const ws = yield* provide$4(acquire, scope);
62407
62304
  const run = yield* provideService$2(runtime$1(fiberSet)(), WebSocket$1, ws);
62408
62305
  let open = false;
@@ -63408,7 +63305,7 @@ var MultipartError = class MultipartError extends TaggedError("MultipartError")
63408
63305
  * @category Config
63409
63306
  */
63410
63307
  const makeConfig = (headers) => withFiber((fiber) => {
63411
- const mimeTypes = get$15(fiber.services, FieldMimeTypes);
63308
+ const mimeTypes = get$16(fiber.services, FieldMimeTypes);
63412
63309
  return succeed$3({
63413
63310
  headers,
63414
63311
  maxParts: fiber.getRef(MaxParts),
@@ -64124,7 +64021,7 @@ var MiddlewareImpl = class MiddlewareImpl {
64124
64021
  const stack = [context.mapUnsafe.get(fnContextKey)];
64125
64022
  if (this.dependencies) {
64126
64023
  const memoMap = yield* CurrentMemoMap;
64127
- const scope = get$15(context, Scope);
64024
+ const scope = get$16(context, Scope);
64128
64025
  const depsContext = yield* buildWithMemoMap(this.dependencies, memoMap, scope);
64129
64026
  stack.push(...getMiddleware(depsContext));
64130
64027
  }
@@ -64231,7 +64128,7 @@ const schema = /* @__PURE__ */ declare(isStream);
64231
64128
  * @category Stream
64232
64129
  */
64233
64130
  function Stream(success, error) {
64234
- return make$62(schema.ast, {
64131
+ return make$64(schema.ast, {
64235
64132
  [StreamSchemaTypeId]: StreamSchemaTypeId,
64236
64133
  success,
64237
64134
  error
@@ -64429,7 +64326,7 @@ const makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options
64429
64326
  const disableTracing = options?.disableTracing ?? false;
64430
64327
  const generateRequestId = options?.generateRequestId ?? (() => requestIdCounter++);
64431
64328
  const services$12 = yield* services();
64432
- const scope = get$15(services$12, Scope);
64329
+ const scope = get$16(services$12, Scope);
64433
64330
  const entries = /* @__PURE__ */ new Map();
64434
64331
  let isShutdown = false;
64435
64332
  yield* addFinalizer$1(scope, withFiber((parent) => {
@@ -64850,7 +64747,7 @@ const RpcGroupProto = {
64850
64747
  });
64851
64748
  },
64852
64749
  annotateRpcs(service, value) {
64853
- return this.annotateRpcsMerge(make$87(service, value));
64750
+ return this.annotateRpcsMerge(make$89(service, value));
64854
64751
  },
64855
64752
  annotateMerge(context) {
64856
64753
  return makeProto$1({
@@ -64977,7 +64874,7 @@ const make$25 = ({ dumpSchema = () => void_$2 }) => ({ loader, schemaDirectory,
64977
64874
  if (schemaDirectory && completed.length > 0) yield* dumpSchema(`${schemaDirectory}/_schema.sql`, table).pipe(catchCause$1((cause) => logInfo("Could not dump schema", cause)));
64978
64875
  return completed;
64979
64876
  });
64980
- const migrationOrder = /* @__PURE__ */ make$89(([a], [b]) => Number$5(a, b));
64877
+ const migrationOrder = /* @__PURE__ */ make$91(([a], [b]) => Number$5(a, b));
64981
64878
  /**
64982
64879
  * @since 4.0.0
64983
64880
  * @category loaders
@@ -68798,7 +68695,7 @@ const writeFile$1 = (path, data, options) => callback$1((resume, signal) => {
68798
68695
  resume(fail$6(handleBadArgument("writeFile")(err)));
68799
68696
  }
68800
68697
  });
68801
- const makeFileSystem = /* @__PURE__ */ map$9(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make$67({
68698
+ const makeFileSystem = /* @__PURE__ */ map$9(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make$69({
68802
68699
  access,
68803
68700
  chmod,
68804
68701
  chown,
@@ -90778,7 +90675,7 @@ const toFileUrl = (path) => try_({
90778
90675
  * @category layer
90779
90676
  */
90780
90677
  const layer$21 = /* @__PURE__ */ succeed$4(Path$1)({
90781
- [TypeId$50]: TypeId$50,
90678
+ [TypeId$51]: TypeId$51,
90782
90679
  ...Path,
90783
90680
  fromFileUrl,
90784
90681
  toFileUrl
@@ -90792,7 +90689,7 @@ const layer$21 = /* @__PURE__ */ succeed$4(Path$1)({
90792
90689
  * @since 1.0.0
90793
90690
  * @category layer
90794
90691
  */
90795
- const layer$19 = /* @__PURE__ */ succeed$4(Stdio, /* @__PURE__ */ make$59({
90692
+ const layer$19 = /* @__PURE__ */ succeed$4(Stdio, /* @__PURE__ */ make$61({
90796
90693
  args: /* @__PURE__ */ sync(() => process.argv.slice(2)),
90797
90694
  stdout: (options) => fromWritable({
90798
90695
  evaluate: () => process.stdout,
@@ -90832,7 +90729,7 @@ const layer$19 = /* @__PURE__ */ succeed$4(Stdio, /* @__PURE__ */ make$59({
90832
90729
  const layer$18 = /* @__PURE__ */ effect$1(Terminal, /* @__PURE__ */ (/* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
90833
90730
  const stdin = process.stdin;
90834
90731
  const stdout = process.stdout;
90835
- const rlRef = yield* make$68({ acquire: acquireRelease(sync(() => {
90732
+ const rlRef = yield* make$70({ acquire: acquireRelease(sync(() => {
90836
90733
  const rl = readline.createInterface({
90837
90734
  input: stdin,
90838
90735
  escapeCodeTimeout: 50
@@ -90846,8 +90743,8 @@ const layer$18 = /* @__PURE__ */ effect$1(Terminal, /* @__PURE__ */ (/* @__PURE_
90846
90743
  })) });
90847
90744
  const columns = sync(() => stdout.columns ?? 0);
90848
90745
  const readInput = gen(function* () {
90849
- yield* get$10(rlRef);
90850
- const queue = yield* make$73();
90746
+ yield* get$11(rlRef);
90747
+ const queue = yield* make$75();
90851
90748
  const handleKeypress = (s, k) => {
90852
90749
  const userInput = {
90853
90750
  input: fromUndefinedOr(s),
@@ -90865,7 +90762,7 @@ const layer$18 = /* @__PURE__ */ effect$1(Terminal, /* @__PURE__ */ (/* @__PURE_
90865
90762
  stdin.on("keypress", handleKeypress);
90866
90763
  return queue;
90867
90764
  });
90868
- const readLine = scoped$1(flatMap$4(get$10(rlRef), (readlineInterface) => callback$1((resume) => {
90765
+ const readLine = scoped$1(flatMap$4(get$11(rlRef), (readlineInterface) => callback$1((resume) => {
90869
90766
  const onLine = (line) => resume(succeed$3(line));
90870
90767
  readlineInterface.once("line", onLine);
90871
90768
  return sync(() => readlineInterface.off("line", onLine));
@@ -90878,7 +90775,7 @@ const layer$18 = /* @__PURE__ */ effect$1(Terminal, /* @__PURE__ */ (/* @__PURE_
90878
90775
  cause: err
90879
90776
  }))));
90880
90777
  }));
90881
- return make$60({
90778
+ return make$62({
90882
90779
  columns,
90883
90780
  readInput,
90884
90781
  readLine,
@@ -91259,7 +91156,7 @@ const make$19 = /* @__PURE__ */ fnUntraced(function* (options) {
91259
91156
  storeId: options.storeId,
91260
91157
  timeToLive: options.timeToLive
91261
91158
  });
91262
- const inMemory = yield* makeWith$3({
91159
+ const inMemory = yield* makeWith$4({
91263
91160
  lookup: fnUntraced(function* (key) {
91264
91161
  const exit$2 = yield* store.get(key);
91265
91162
  if (exit$2) return yield* exit$2;
@@ -91274,7 +91171,7 @@ const make$19 = /* @__PURE__ */ fnUntraced(function* (options) {
91274
91171
  return identity({
91275
91172
  [TypeId$12]: TypeId$12,
91276
91173
  inMemory,
91277
- get: (key) => get$7(inMemory, key),
91174
+ get: (key) => get$8(inMemory, key),
91278
91175
  invalidate: (key) => flatMap$4(store.remove(key), () => invalidate$1(inMemory, key))
91279
91176
  });
91280
91177
  });
@@ -91803,11 +91700,6 @@ const toExit = (self) => {
91803
91700
  const TypeId$10 = "~effect/reactivity/AtomRegistry";
91804
91701
  /**
91805
91702
  * @since 4.0.0
91806
- * @category guards
91807
- */
91808
- const isAtomRegistry = (u) => hasProperty(u, TypeId$10);
91809
- /**
91810
- * @since 4.0.0
91811
91703
  * @category constructors
91812
91704
  */
91813
91705
  const make$18 = (options) => new RegistryImpl(options?.initialValues, options?.scheduleTask, options?.timeoutResolution, options?.defaultIdleTTL);
@@ -91838,36 +91730,6 @@ const layer$14 = /* @__PURE__ */ layerOptions();
91838
91730
  * @since 4.0.0
91839
91731
  * @category Conversions
91840
91732
  */
91841
- const toStream = /* @__PURE__ */ dual(2, (self, atom) => callback((queue) => suspend$3(() => {
91842
- return addFinalizer$1(getUnsafe$4(getCurrent().services, Scope), sync(self.subscribe(atom, (value) => offerUnsafe(queue, value), { immediate: true })));
91843
- })));
91844
- /**
91845
- * @since 4.0.0
91846
- * @category Conversions
91847
- */
91848
- const toStreamResult = /* @__PURE__ */ dual(2, (self, atom) => toStream(self, atom).pipe(filter$3(isNotInitial), mapEffect$1((result) => result._tag === "Success" ? succeed$3(result.value) : failCause$2(result.cause)), changes$1));
91849
- /**
91850
- * @since 4.0.0
91851
- * @category Conversions
91852
- */
91853
- const getResult$2 = /* @__PURE__ */ dual((args) => isAtomRegistry(args[0]), (self, atom, options) => {
91854
- const suspendOnWaiting = options?.suspendOnWaiting ?? false;
91855
- return callback$1((resume) => {
91856
- const result = self.get(atom);
91857
- if (result._tag !== "Initial" && !(suspendOnWaiting && result.waiting)) return resume(toExit(result));
91858
- const cancel = self.subscribe(atom, (value) => {
91859
- if (value._tag !== "Initial" && !(suspendOnWaiting && value.waiting)) {
91860
- resume(toExit(value));
91861
- cancel();
91862
- }
91863
- });
91864
- return sync(cancel);
91865
- });
91866
- });
91867
- /**
91868
- * @since 4.0.0
91869
- * @category Conversions
91870
- */
91871
91733
  const mount$1 = /* @__PURE__ */ dual(2, (self, atom) => acquireRelease(sync(() => self.mount(atom)), (release) => sync(release)));
91872
91734
  const constImmediate = { immediate: true };
91873
91735
  const notifyListener = (listener) => {
@@ -92645,7 +92507,7 @@ const context = (options) => {
92645
92507
  factory.addGlobalLayer = (layer) => {
92646
92508
  globalLayer = provideMerge(globalLayer, provide$3(layer, layer$32));
92647
92509
  };
92648
- const reactivityAtom = removeTtl(make$17(servicesWith((services) => buildWithMemoMap(layer$32, options.memoMap, get$15(services, Scope))).pipe(map$9(get$15(Reactivity)))));
92510
+ const reactivityAtom = removeTtl(make$17(servicesWith((services) => buildWithMemoMap(layer$32, options.memoMap, get$16(services, Scope))).pipe(map$9(get$16(Reactivity)))));
92649
92511
  factory.withReactivity = (keys) => (atom) => transform$1(atom, (get) => {
92650
92512
  const reactivity = getOrThrow(get(reactivityAtom));
92651
92513
  get.addFinalizer(reactivity.registerUnsafe(keys, () => {
@@ -92812,7 +92674,7 @@ const makeStreamPull = (pullSignal, pullAtom) => writable(pullAtom.read, functio
92812
92674
  const family = typeof WeakRef === "undefined" || typeof FinalizationRegistry === "undefined" ? (f) => {
92813
92675
  const atoms = empty$11();
92814
92676
  return function(arg) {
92815
- const atomEntry = get$13(atoms, arg);
92677
+ const atomEntry = get$14(atoms, arg);
92816
92678
  if (atomEntry._tag === "Some") return atomEntry.value;
92817
92679
  const newAtom = f(arg);
92818
92680
  set$8(atoms, arg, newAtom);
@@ -92824,7 +92686,7 @@ const family = typeof WeakRef === "undefined" || typeof FinalizationRegistry ===
92824
92686
  remove$5(atoms, arg);
92825
92687
  });
92826
92688
  return function(arg) {
92827
- const atomEntry = get$13(atoms, arg).pipe(flatMapNullishOr$1((ref) => ref.deref()));
92689
+ const atomEntry = get$14(atoms, arg).pipe(flatMapNullishOr$1((ref) => ref.deref()));
92828
92690
  if (atomEntry._tag === "Some") return atomEntry.value;
92829
92691
  const newAtom = f(arg);
92830
92692
  set$8(atoms, arg, new WeakRef(newAtom));
@@ -92861,21 +92723,6 @@ const getInitialValueTarget = (atom) => {
92861
92723
  return target;
92862
92724
  };
92863
92725
  /**
92864
- * Ensures that the value of the atom is refreshed at most once per specified
92865
- * duration.
92866
- *
92867
- * @since 4.0.0
92868
- * @category combinators
92869
- */
92870
- const withRefresh = /* @__PURE__ */ dual(2, (self, duration) => {
92871
- const millis = toMillis(fromInputUnsafe(duration));
92872
- return transform$1(self, function(get) {
92873
- const handle = setTimeout(() => get.refresh(self), millis);
92874
- get.addFinalizer(() => clearTimeout(handle));
92875
- return get(self);
92876
- }, { initialValueTarget: self });
92877
- });
92878
- /**
92879
92726
  * @since 4.0.0
92880
92727
  * @category batching
92881
92728
  */
@@ -92889,11 +92736,6 @@ const get$3 = (self) => AtomRegistry.use((r) => succeed$3(r.get(self)));
92889
92736
  * @since 4.0.0
92890
92737
  * @category Conversions
92891
92738
  */
92892
- const getResult$1 = (self, options) => AtomRegistry.use(getResult$2(self, options));
92893
- /**
92894
- * @since 4.0.0
92895
- * @category Conversions
92896
- */
92897
92739
  const mount = (self) => AtomRegistry.use((r) => mount$1(r, self));
92898
92740
  //#endregion
92899
92741
  //#region src/Settings.ts
@@ -92902,20 +92744,20 @@ var Settings = class Settings extends Service$1()("lalph/Settings", { make: gen(
92902
92744
  const projectKvs = yield* ProjectsKvs;
92903
92745
  const reactivity = yield* Reactivity;
92904
92746
  const store = prefix$1(kvs, "settings.");
92905
- const cache = yield* make$57({
92747
+ const cache = yield* make$59({
92906
92748
  lookup(setting) {
92907
92749
  return orDie$2(toSchemaStore(store, setting.schema).get(setting.name));
92908
92750
  },
92909
92751
  capacity: Number.MAX_SAFE_INTEGER
92910
92752
  });
92911
- const projectCache = yield* make$57({
92753
+ const projectCache = yield* make$59({
92912
92754
  lookup: fnUntraced(function* (options) {
92913
- return yield* orDie$2(toSchemaStore(get$15(yield* projectKvs.services(options.projectId), KeyValueStore), options.setting.schema).get(options.setting.name));
92755
+ return yield* orDie$2(toSchemaStore(get$16(yield* projectKvs.services(options.projectId), KeyValueStore), options.setting.schema).get(options.setting.name));
92914
92756
  }, scoped$1),
92915
92757
  capacity: Number.MAX_SAFE_INTEGER,
92916
92758
  requireServicesAt: "lookup"
92917
92759
  });
92918
- const get = (setting) => get$7(cache, setting);
92760
+ const get = (setting) => get$8(cache, setting);
92919
92761
  const set = (setting, value) => {
92920
92762
  const s = toSchemaStore(store, setting.schema);
92921
92763
  const setCache = set$5(cache, setting, value);
@@ -92925,7 +92767,7 @@ var Settings = class Settings extends Service$1()("lalph/Settings", { make: gen(
92925
92767
  });
92926
92768
  return reactivity.mutation([`settings:${setting.name}`], andThen(update, setCache));
92927
92769
  };
92928
- const getProject = (setting) => CurrentProjectId.use((projectId) => get$7(projectCache, {
92770
+ const getProject = (setting) => CurrentProjectId.use((projectId) => get$8(projectCache, {
92929
92771
  projectId,
92930
92772
  setting
92931
92773
  }));
@@ -92935,7 +92777,7 @@ var Settings = class Settings extends Service$1()("lalph/Settings", { make: gen(
92935
92777
  getProject,
92936
92778
  setProject: fnUntraced(function* (setting, value) {
92937
92779
  const projectId = yield* CurrentProjectId;
92938
- const s = toSchemaStore(get$15(yield* projectKvs.services(projectId), KeyValueStore), setting.schema);
92780
+ const s = toSchemaStore(get$16(yield* projectKvs.services(projectId), KeyValueStore), setting.schema);
92939
92781
  const setCache = set$5(projectCache, {
92940
92782
  projectId,
92941
92783
  setting
@@ -93062,6 +92904,7 @@ var PrdIssue = class PrdIssue extends Class$2("PrdIssue")({
93062
92904
  update(options) {
93063
92905
  return new PrdIssue({
93064
92906
  ...this,
92907
+ id: options.id ?? this.id,
93065
92908
  title: options.title ?? this.title,
93066
92909
  description: options.description ?? this.description,
93067
92910
  state: options.state ?? this.state,
@@ -178268,7 +178111,7 @@ var TokenManager$1 = class extends Service$1()("lalph/Linear/TokenManager", { ma
178268
178111
  }));
178269
178112
  const get = makeUnsafe$9(1).withPermit(getNoLock);
178270
178113
  const pkce = gen(function* () {
178271
- const deferred = yield* make$85();
178114
+ const deferred = yield* make$87();
178272
178115
  yield* serve(add("GET", "/callback", gen(function* () {
178273
178116
  yield* succeed$5(deferred, yield* callbackParams);
178274
178117
  return yield* html`
@@ -178341,15 +178184,29 @@ const TokenResponse$1 = Struct$2({
178341
178184
  });
178342
178185
  //#endregion
178343
178186
  //#region src/IssueSource.ts
178187
+ const IssuesChange = taggedEnum();
178344
178188
  var IssueSource = class IssueSource extends Service$1()("lalph/IssueSource") {
178345
178189
  static make(impl) {
178346
178190
  return gen(function* () {
178347
- const reactivity = yield* Reactivity;
178191
+ const refs = yield* make$48({
178192
+ lookup: fnUntraced(function* (projectId) {
178193
+ const ref = yield* make$47(IssuesChange.Internal({ issues: yield* pipe$1(impl.issues(projectId), orElseSucceed(empty$17)) }));
178194
+ yield* changes(ref).pipe(switchMap((_) => impl.issues(projectId).pipe(tap$1((issues) => set$3(ref, IssuesChange.External({ issues }))), delay(seconds(30)), fromEffectDrain)), runDrain, forkScoped);
178195
+ return ref;
178196
+ }),
178197
+ capacity: Number.MAX_SAFE_INTEGER
178198
+ });
178199
+ const update = fnUntraced(function* (projectId, issues) {
178200
+ yield* set$3(yield* get$6(refs, projectId), IssuesChange.Internal({ issues }));
178201
+ });
178202
+ const updateIssues = (projectId) => pipe$1(impl.issues(projectId), tap$1((issues) => update(projectId, issues)));
178348
178203
  return IssueSource.of({
178349
178204
  ...impl,
178350
- createIssue: (projectId, issue) => reactivity.mutation({ issues: [projectId] }, impl.createIssue(projectId, issue)),
178351
- updateIssue: (options) => reactivity.mutation({ issues: [options.projectId] }, impl.updateIssue(options)),
178352
- cancelIssue: (projectId, issueId) => reactivity.mutation({ issues: [projectId] }, impl.cancelIssue(projectId, issueId))
178205
+ ref: (projectId) => get$6(refs, projectId),
178206
+ issues: updateIssues,
178207
+ createIssue: (projectId, issue) => pipe$1(impl.createIssue(projectId, issue), tap$1(updateIssues(projectId))),
178208
+ updateIssue: (options) => pipe$1(impl.updateIssue(options), tap$1(updateIssues(options.projectId))),
178209
+ cancelIssue: (projectId, issueId) => pipe$1(impl.cancelIssue(projectId, issueId), tap$1(updateIssues(projectId)))
178353
178210
  });
178354
178211
  });
178355
178212
  }
@@ -181683,7 +181540,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
181683
181540
  });
181684
181541
  Ze.glob = Ze;
181685
181542
  //#endregion
181686
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/ApplyPatch.js
181543
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ApplyPatch.js
181687
181544
  /**
181688
181545
  * @since 1.0.0
181689
181546
  */
@@ -196556,7 +196413,7 @@ var StreamableHTTPClientTransport = class {
196556
196413
  }
196557
196414
  };
196558
196415
  //#endregion
196559
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/McpClient.js
196416
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/McpClient.js
196560
196417
  /**
196561
196418
  * @since 1.0.0
196562
196419
  */
@@ -196601,7 +196458,7 @@ const layer$13 = effect$1(McpClient, gen(function* () {
196601
196458
  });
196602
196459
  }));
196603
196460
  //#endregion
196604
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/ExaSearch.js
196461
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ExaSearch.js
196605
196462
  /**
196606
196463
  * @since 1.0.0
196607
196464
  */
@@ -211551,7 +211408,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports) => {
211551
211408
  exports.impl = impl;
211552
211409
  }));
211553
211410
  //#endregion
211554
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/WebToMarkdown.js
211411
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/WebToMarkdown.js
211555
211412
  /**
211556
211413
  * @since 1.0.0
211557
211414
  */
@@ -214124,7 +213981,7 @@ const Proto$2 = {
214124
213981
  description: cause.message
214125
213982
  })
214126
213983
  })));
214127
- const queue = yield* make$73();
213984
+ const queue = yield* make$75();
214128
213985
  const fiber = yield* schemas.handler(decodedParams, { preliminary: (result) => asVoid(offer(queue, {
214129
213986
  result,
214130
213987
  isFailure: false,
@@ -214638,7 +214495,7 @@ const Strict = /* @__PURE__ */ Reference("effect/ai/Tool/Strict", { defaultValue
214638
214495
  * @since 1.0.0
214639
214496
  * @category utilities
214640
214497
  */
214641
- const getStrictMode = (tool) => get$15(tool.annotations, Strict);
214498
+ const getStrictMode = (tool) => get$16(tool.annotations, Strict);
214642
214499
  const suspectProtoRx = /"__proto__"\s*:/;
214643
214500
  const suspectConstructorRx = /"constructor"\s*:/;
214644
214501
  function _parse(text) {
@@ -214690,7 +214547,7 @@ function isEmptyParamsRecord(indexSignature) {
214690
214547
  return indexSignature.parameter === string$3 && isNever(indexSignature.type);
214691
214548
  }
214692
214549
  //#endregion
214693
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/SemanticSearch/Service.js
214550
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/SemanticSearch/Service.js
214694
214551
  /**
214695
214552
  * @since 1.0.0
214696
214553
  */
@@ -214716,7 +214573,7 @@ const maybeRemoveFile = (path) => serviceOption(SemanticSearch).pipe(flatMap$4(m
214716
214573
  onSome: (service) => service.removeFile(path)
214717
214574
  })));
214718
214575
  //#endregion
214719
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/AgentTools.js
214576
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/AgentTools.js
214720
214577
  /**
214721
214578
  * @since 1.0.0
214722
214579
  */
@@ -215067,7 +214924,7 @@ const AgentToolHandlers = AgentToolHandlersNoDeps.pipe(provide$3([layer$12, laye
215067
214924
  AgentToolHandlersNoDeps.pipe(provide$3([mock(ExaSearch)({}), mock(WebToMarkdown)({})]));
215068
214925
  var ApplyPatchError = class extends TaggedClass$2("ApplyPatchError") {};
215069
214926
  //#endregion
215070
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/TypeBuilder.js
214927
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/TypeBuilder.js
215071
214928
  const resolveDocumentation = resolveAt("documentation");
215072
214929
  const identifierPattern = /^[$A-Z_a-z][$0-9A-Z_a-z]*$/u;
215073
214930
  const Precedence = {
@@ -215340,7 +215197,7 @@ const render = (schema, options) => {
215340
215197
  return printNode({ text: documentation === void 0 ? rendered.text : `${renderJsDoc(documentation, 0, printerOptions)}${printerOptions.newLine}${rendered.text}` }, printerOptions);
215341
215198
  };
215342
215199
  //#endregion
215343
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/ToolkitRenderer.js
215200
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ToolkitRenderer.js
215344
215201
  /**
215345
215202
  * @since 1.0.0
215346
215203
  */
@@ -215362,7 +215219,7 @@ declare function ${name}(${params}): Promise<${render(tool.successSchema)}>`);
215362
215219
  }) });
215363
215220
  };
215364
215221
  //#endregion
215365
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/ScriptPreprocessing.js
215222
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ScriptPreprocessing.js
215366
215223
  const isIdentifierChar = (char) => char !== void 0 && /[A-Za-z0-9_$]/.test(char);
215367
215224
  const isIdentifierStartChar = (char) => char !== void 0 && /[A-Za-z_$]/.test(char);
215368
215225
  const hasIdentifierBoundary = (text, index, length) => !isIdentifierChar(text[index - 1]) && !isIdentifierChar(text[index + length]);
@@ -215811,7 +215668,7 @@ const fixAssignedTemplatesForToolCalls = (script) => {
215811
215668
  };
215812
215669
  const preprocessScript = (script) => fixAssignedTemplatesForToolCalls(["applyPatch", "taskComplete"].reduce((current, functionName) => fixCallTemplateArgument(current, functionName), fixTargetCallObjectPropertyTemplates(script)));
215813
215670
  //#endregion
215814
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/AgentExecutor.js
215671
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/AgentExecutor.js
215815
215672
  /**
215816
215673
  * @since 1.0.0
215817
215674
  */
@@ -215996,7 +215853,7 @@ var QueueWriteStream = class extends Writable {
215996
215853
  }
215997
215854
  };
215998
215855
  //#endregion
215999
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/ScriptExtraction.js
215856
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ScriptExtraction.js
216000
215857
  const stripWrappingCodeFence = (script) => {
216001
215858
  const lines = script.split(/\r?\n/);
216002
215859
  if (lines.length < 2) return script;
@@ -217293,10 +217150,10 @@ const make$10 = /* @__PURE__ */ fnUntraced(function* (params) {
217293
217150
  }) : identity)));
217294
217151
  }
217295
217152
  const decodeParts = decodeEffect(NonEmptyArray(StreamPart(toolkit)));
217296
- const queue = yield* make$73();
217153
+ const queue = yield* make$75();
217297
217154
  const deferredFinishParts = [];
217298
217155
  if (preResolvedStreamParts.length > 0) yield* offerAll(queue, preResolvedStreamParts);
217299
- const toolCallFibers = yield* make$54();
217156
+ const toolCallFibers = yield* make$56();
217300
217157
  const handleToolCall = fnUntraced(function* (part) {
217301
217158
  const tool = toolkit.tools[part.name];
217302
217159
  if (!tool) return;
@@ -217545,7 +217402,7 @@ const applySpanTransformer = (transformer, response, options) => {
217545
217402
  });
217546
217403
  };
217547
217404
  //#endregion
217548
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/Agent.js
217405
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/Agent.js
217549
217406
  /**
217550
217407
  * @since 1.0.0
217551
217408
  */
@@ -217581,17 +217438,18 @@ ${content}
217581
217438
  let agentCounter = 0;
217582
217439
  const outputBuffer = /* @__PURE__ */ new Map();
217583
217440
  let currentOutputAgent = null;
217584
- let history = make$75(empty);
217441
+ let history = make$77(empty);
217585
217442
  const spawn = fnUntraced(function* (opts) {
217586
217443
  const agentId = opts.agentId;
217587
217444
  const ai = yield* LanguageModel;
217588
217445
  const subagentModel = yield* SubagentModel;
217589
217446
  const modelConfig = yield* AgentModelConfig;
217447
+ const conversationMode = yield* ConversationMode;
217590
217448
  let finalSummary = none$4();
217591
- const output = yield* make$73();
217449
+ const output = yield* make$75();
217592
217450
  let inputTokens = 0;
217593
217451
  let outputTokens = 0;
217594
- const prompt = opts.disableHistory ? make$75(empty) : history;
217452
+ const prompt = opts.disableHistory ? make$77(empty) : history;
217595
217453
  update(prompt, concat(opts.prompt));
217596
217454
  let system = (typeof opts.system === "function" ? opts.system : defaultSystem)({
217597
217455
  toolInstructions: generateSystemTools(capabilities),
@@ -217707,6 +217565,7 @@ ${content}
217707
217565
  let response = empty$17();
217708
217566
  let reasoningStarted = false;
217709
217567
  let hadReasoningDelta = false;
217568
+ let hadToolCall = false;
217710
217569
  yield* pipe$1(ai.streamText({
217711
217570
  prompt: prompt.current,
217712
217571
  toolkit: singleTool
@@ -217763,9 +217622,12 @@ ${content}
217763
217622
  });
217764
217623
  }
217765
217624
  break;
217625
+ case "tool-call":
217626
+ hadToolCall = true;
217627
+ break;
217766
217628
  }
217767
217629
  return void_$2;
217768
- }), retry$3({
217630
+ }), retry$1({
217769
217631
  while: (err) => {
217770
217632
  response = [];
217771
217633
  if (err.isRetryable) maybeSend({
@@ -217777,6 +217639,7 @@ ${content}
217777
217639
  schedule: retryPolicy
217778
217640
  }), modelConfig.systemPromptTransform ? (effect) => modelConfig.systemPromptTransform(system, effect) : identity);
217779
217641
  update(prompt, concat(fromResponseParts(response)));
217642
+ if (conversationMode && !hadToolCall && pendingMessages.size === 0) finalSummary = some$2(responseToSummary(response));
217780
217643
  }
217781
217644
  }).pipe(provideService$2(ScriptExecutor, (script) => {
217782
217645
  maybeSend({
@@ -217911,11 +217774,27 @@ const layerSubagentModel = (layer) => effect$1(SubagentModel, gen(function* () {
217911
217774
  }));
217912
217775
  /**
217913
217776
  * @since 1.0.0
217777
+ * @category Conversation mode
217778
+ */
217779
+ var ConversationMode = class ConversationMode extends Reference("clanka/Agent/ConversationMode", { defaultValue: () => false }) {
217780
+ static layer = (enabled) => succeed$4(ConversationMode, enabled);
217781
+ };
217782
+ /**
217783
+ * @since 1.0.0
217914
217784
  * @category System prompts
217915
217785
  */
217916
217786
  var AgentModelConfig = class AgentModelConfig extends Reference("clanka/Agent/SystemPromptTransform", { defaultValue: () => ({}) }) {
217917
217787
  static layer = (options) => succeed$4(AgentModelConfig, options);
217918
217788
  };
217789
+ const responseToSummary = (response) => {
217790
+ const prompt = fromResponseParts(response);
217791
+ let parts = empty$17();
217792
+ for (const message of prompt.content) {
217793
+ if (message.role !== "assistant") continue;
217794
+ for (const part of message.content) if (part.type === "text" || part.type === "reasoning") parts.push(part.text);
217795
+ }
217796
+ return parts.join("\n\n");
217797
+ };
217919
217798
  /**
217920
217799
  * @since 1.0.0
217921
217800
  * @category Output
@@ -226598,7 +226477,7 @@ const makeSocket = /* @__PURE__ */ gen(function* () {
226598
226477
  const tracker = yield* make$11;
226599
226478
  const request = yield* orDie$2(client.client.httpClient.preprocess(post("/responses")));
226600
226479
  const socket = yield* makeWebSocket(request.url.replace(/^http/, "ws")).pipe(updateService(WebSocketConstructor, (f) => (url) => f(url, { headers: request.headers })));
226601
- const queueRef = yield* make$68({
226480
+ const queueRef = yield* make$70({
226602
226481
  idleTimeToLive: 6e4,
226603
226482
  acquire: gen(function* () {
226604
226483
  const write = yield* socket.writer;
@@ -226688,7 +226567,7 @@ const makeSocket = /* @__PURE__ */ gen(function* () {
226688
226567
  return OpenAiSocket.serviceMap({ createResponseStream(options) {
226689
226568
  const stream = gen(function* () {
226690
226569
  yield* acquireRelease(semaphore.take(1), () => semaphore.release(1), { interruptible: true });
226691
- const { send, cancel, reset } = yield* get$10(queueRef);
226570
+ const { send, cancel, reset } = yield* get$11(queueRef);
226692
226571
  const incoming = yield* unbounded();
226693
226572
  let done = false;
226694
226573
  yield* acquireRelease(send(incoming, options), (_, exit) => {
@@ -226803,7 +226682,7 @@ const invalidProviderResponse = (description) => make$15({
226803
226682
  * @category constructors
226804
226683
  */
226805
226684
  const make$6 = /* @__PURE__ */ fnUntraced(function* (params) {
226806
- const resolver = make$47((entries) => flatMap$4(params.embedMany({ inputs: entries.map((entry) => entry.request.input) }), (response) => map$9(mapProviderResults(entries.length, response.results), (embeddings) => {
226685
+ const resolver = make$49((entries) => flatMap$4(params.embedMany({ inputs: entries.map((entry) => entry.request.input) }), (response) => map$9(mapProviderResults(entries.length, response.results), (embeddings) => {
226807
226686
  for (let i = 0; i < entries.length; i++) entries[i].completeUnsafe(succeed$6(embeddings[i]));
226808
226687
  }))).pipe(withSpan("EmbeddingModel.resolver"));
226809
226688
  return EmbeddingModel.of({
@@ -226944,7 +226823,7 @@ const invalidOutput = (description) => make$15({
226944
226823
  function toCodecOpenAI(schema) {
226945
226824
  const to = schema.ast;
226946
226825
  const from = recurOpenAI(toEncoded$1(to));
226947
- const codec = from === to ? schema : make$62(decodeTo$1(from, to, passthrough()));
226826
+ const codec = from === to ? schema : make$64(decodeTo$1(from, to, passthrough()));
226948
226827
  const document = toJsonSchemaDocument(codec);
226949
226828
  const jsonSchema = rewriteOpenAI(document.schema);
226950
226829
  if (Object.keys(document.definitions).length > 0) jsonSchema.$defs = map$14(document.definitions, rewriteOpenAI);
@@ -229028,7 +228907,7 @@ const transformToolCallParams = /* @__PURE__ */ fnUntraced(function* (tools, too
229028
228907
  })));
229029
228908
  });
229030
228909
  //#endregion
229031
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/CodexAuth.js
228910
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/CodexAuth.js
229032
228911
  /**
229033
228912
  * @since 1.0.0
229034
228913
  */
@@ -229206,7 +229085,7 @@ var CodexAuth = class CodexAuth extends Service$1()("clanka/CodexAuth") {
229206
229085
  user_code: deviceCode.userCode
229207
229086
  }));
229208
229087
  const delayMs = deviceCode.intervalMs + POLLING_SAFETY_MARGIN_MS;
229209
- return yield* httpClient.execute(request).pipe(retry$3({
229088
+ return yield* httpClient.execute(request).pipe(retry$1({
229210
229089
  while: (e) => e.response?.status === 403 || e.response?.status === 404,
229211
229090
  schedule: spaced(delayMs)
229212
229091
  }), mapError$2((cause) => requestDeviceCodeError("Failed to poll Codex device authorization", cause)), flatMap$4((response) => schemaBodyJson(AuthorizationCodeResponseSchema)(response).pipe(mapError$2((cause) => requestDeviceCodeError("Failed to decode the Codex authorization approval response", cause)), map$9((payload) => ({
@@ -229248,7 +229127,7 @@ var CodexAuth = class CodexAuth extends Service$1()("clanka/CodexAuth") {
229248
229127
  static layerClient = this.layerClientNoDeps.pipe(provide$3(CodexAuth.layer));
229249
229128
  };
229250
229129
  //#endregion
229251
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/Codex.js
229130
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/Codex.js
229252
229131
  /**
229253
229132
  * @since 1.0.0
229254
229133
  */
@@ -229274,7 +229153,7 @@ const layerModel = (model, options) => layer$7({
229274
229153
  }
229275
229154
  }).pipe(merge$6(AgentModelConfig.layer({ systemPromptTransform: (system, effect) => withConfigOverride(effect, { instructions: system }) })));
229276
229155
  //#endregion
229277
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/CodeChunker.js
229156
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/CodeChunker.js
229278
229157
  /**
229279
229158
  * @since 1.0.0
229280
229159
  */
@@ -231034,7 +230913,7 @@ const getUsageDetailNumber = (details, field) => {
231034
230913
  return typeof value === "number" ? value : void 0;
231035
230914
  };
231036
230915
  //#endregion
231037
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/CopilotAuth.js
230916
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/CopilotAuth.js
231038
230917
  /**
231039
230918
  * @since 1.0.0
231040
230919
  */
@@ -231225,7 +231104,7 @@ var GithubCopilotAuth = class GithubCopilotAuth extends Service$1()("clanka/Gith
231225
231104
  static layerClient = this.layerClientNoDeps.pipe(provide$3(GithubCopilotAuth.layer));
231226
231105
  };
231227
231106
  //#endregion
231228
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/Copilot.js
231107
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/Copilot.js
231229
231108
  /**
231230
231109
  * @since 1.0.0
231231
231110
  */
@@ -231645,7 +231524,7 @@ Object.defineProperties(createChalk.prototype, styles);
231645
231524
  const chalk = createChalk();
231646
231525
  createChalk({ level: stderrColor ? stderrColor.level : 0 });
231647
231526
  //#endregion
231648
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/OutputFormatter.js
231527
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/OutputFormatter.js
231649
231528
  /**
231650
231529
  * @since 1.0.0
231651
231530
  */
@@ -232002,7 +231881,7 @@ const findById = (options) => {
232002
231881
  for (let i = 0; i < decodedResults.length; i++) {
232003
231882
  const result = decodedResults[i];
232004
231883
  const id = options.ResultId(result, results[i]);
232005
- const request = get$13(idMap, id);
231884
+ const request = get$14(idMap, id);
232006
231885
  if (request._tag === "None") continue;
232007
231886
  remove$5(idMap, id);
232008
231887
  request.value.completeUnsafe(succeed$6(result));
@@ -232131,7 +232010,7 @@ select * from ${sql(options.tableName)} where ${sql(idColumn)} = LAST_INSERT_ID(
232131
232010
  };
232132
232011
  });
232133
232012
  //#endregion
232134
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/ChunkRepo.js
232013
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ChunkRepo.js
232135
232014
  /**
232136
232015
  * @since 1.0.0
232137
232016
  * @category Models
@@ -232289,7 +232168,7 @@ const make = (options) => gen(function* () {
232289
232168
  const db = new Sqlite(options.filename, { readonly: options.readonly ?? false });
232290
232169
  yield* addFinalizer$1(scope$2, sync(() => db.close()));
232291
232170
  if (options.disableWAL !== true) db.pragma("journal_mode = WAL");
232292
- const prepareCache = yield* make$57({
232171
+ const prepareCache = yield* make$59({
232293
232172
  capacity: options.prepareCacheSize ?? 200,
232294
232173
  timeToLive: options.prepareCacheTTL ?? minutes(10),
232295
232174
  lookup: (sql) => try_({
@@ -232301,7 +232180,7 @@ const make = (options) => gen(function* () {
232301
232180
  })
232302
232181
  });
232303
232182
  const runStatement = (statement, params, raw) => withFiber((fiber) => {
232304
- if (get$15(fiber.services, SafeIntegers)) statement.safeIntegers(true);
232183
+ if (get$16(fiber.services, SafeIntegers)) statement.safeIntegers(true);
232305
232184
  try {
232306
232185
  if (statement.reader) return succeed$3(statement.all(...params));
232307
232186
  const result = statement.run(...params);
@@ -232313,8 +232192,8 @@ const make = (options) => gen(function* () {
232313
232192
  }));
232314
232193
  }
232315
232194
  });
232316
- const run = (sql, params, raw = false) => flatMap$4(get$7(prepareCache, sql), (s) => runStatement(s, params, raw));
232317
- const runValues = (sql, params) => acquireUseRelease(get$7(prepareCache, sql), (statement) => try_({
232195
+ const run = (sql, params, raw = false) => flatMap$4(get$8(prepareCache, sql), (s) => runStatement(s, params, raw));
232196
+ const runValues = (sql, params) => acquireUseRelease(get$8(prepareCache, sql), (statement) => try_({
232318
232197
  try: () => {
232319
232198
  if (statement.reader) {
232320
232199
  statement.raw(true);
@@ -232372,14 +232251,14 @@ const make = (options) => gen(function* () {
232372
232251
  }
232373
232252
  });
232374
232253
  });
232375
- const semaphore = yield* make$72(1);
232254
+ const semaphore = yield* make$74(1);
232376
232255
  const connection = yield* makeConnection;
232377
232256
  const acquirer = semaphore.withPermits(1)(succeed$3(connection));
232378
232257
  const transactionAcquirer = uninterruptibleMask((restore) => {
232379
232258
  const scope = getUnsafe$4(getCurrent().services, Scope);
232380
232259
  return as$1(tap$1(restore(semaphore.take(1)), () => addFinalizer$1(scope, semaphore.release(1))), connection);
232381
232260
  });
232382
- return Object.assign(yield* make$49({
232261
+ return Object.assign(yield* make$51({
232383
232262
  acquirer,
232384
232263
  compiler,
232385
232264
  transactionAcquirer,
@@ -232397,7 +232276,7 @@ const make = (options) => gen(function* () {
232397
232276
  * @category layers
232398
232277
  * @since 1.0.0
232399
232278
  */
232400
- const layer$2 = (config) => effectServices(map$9(make(config), (client) => make$87(SqliteClient, client).pipe(add$3(SqlClient, client)))).pipe(provide$3(layer$32));
232279
+ const layer$2 = (config) => effectServices(map$9(make(config), (client) => make$89(SqliteClient, client).pipe(add$3(SqlClient, client)))).pipe(provide$3(layer$32));
232401
232280
  //#endregion
232402
232281
  //#region node_modules/.pnpm/@effect+sql-sqlite-node@4.0.0-beta.36_effect@4.0.0-beta.36/node_modules/@effect/sql-sqlite-node/dist/SqliteMigrator.js
232403
232282
  /**
@@ -232411,7 +232290,7 @@ const run$1 = /* @__PURE__ */ make$25({});
232411
232290
  */
232412
232291
  const layer$1 = (options) => effectDiscard(run$1(options));
232413
232292
  //#endregion
232414
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/internal/sqlite-vector.js
232293
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/internal/sqlite-vector.js
232415
232294
  /**
232416
232295
  * Binary extension for each platform
232417
232296
  */
@@ -232528,7 +232407,7 @@ function getExtensionPath() {
232528
232407
  throw new ExtensionNotFoundError(`SQLite Vector extension not found for platform: ${getCurrentPlatform()}\n\nThe platform-specific package "${getPlatformPackageName()}" is not installed.\nThis usually happens when:\n 1. Your platform is not supported\n 2. npm failed to install optional dependencies\n 3. You're installing with --no-optional flag\n\nTry running: npm install --force`);
232529
232408
  }
232530
232409
  //#endregion
232531
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/Sqlite.js
232410
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/Sqlite.js
232532
232411
  /**
232533
232412
  * @since 1.0.0
232534
232413
  */
@@ -232556,18 +232435,10 @@ const SqliteLayer = (database) => layer$1({ loader: fromRecord({ "0001_create_ch
232556
232435
  yield* fs.makeDirectory(directory, { recursive: true });
232557
232436
  }))));
232558
232437
  //#endregion
232559
- //#region node_modules/.pnpm/clanka@0.2.25_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_7e66a3c8cbea5282674885bea99d757a/node_modules/clanka/dist/SemanticSearch.js
232438
+ //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/SemanticSearch.js
232560
232439
  /**
232561
232440
  * @since 1.0.0
232562
232441
  */
232563
- var SemanticSearch_exports = /* @__PURE__ */ __exportAll({
232564
- SemanticSearch: () => SemanticSearch,
232565
- chunkEmbeddingInput: () => chunkEmbeddingInput,
232566
- layer: () => layer,
232567
- makeEmbeddingResolver: () => makeEmbeddingResolver,
232568
- maybeRemoveFile: () => maybeRemoveFile,
232569
- maybeUpdateFile: () => maybeUpdateFile
232570
- });
232571
232442
  const normalizePath = (path) => path.replace(/\\/g, "/");
232572
232443
  const resolveChunkConfig = (options) => ({
232573
232444
  chunkSize: 30,
@@ -232603,7 +232474,7 @@ const layer = (options) => effect$1(SemanticSearch, gen(function* () {
232603
232474
  const resolver = makeEmbeddingResolver(embeddings.resolver, options);
232604
232475
  const concurrency = options.concurrency ?? 2e3;
232605
232476
  const chunkConfig = resolveChunkConfig(options);
232606
- const indexHandle = yield* make$56();
232477
+ const indexHandle = yield* make$58();
232607
232478
  const console = yield* Console$1;
232608
232479
  const resolveIndexedPath = (path) => {
232609
232480
  const absolutePath = pathService.resolve(root, path);
@@ -232827,11 +232698,11 @@ const layerPersistence = unwrap$3(gen(function* () {
232827
232698
  //#region src/Linear.ts
232828
232699
  var Linear = class extends Service$1()("lalph/Linear", { make: gen(function* () {
232829
232700
  const tokens = yield* TokenManager$1;
232830
- const clients = yield* make$70({
232701
+ const clients = yield* make$72({
232831
232702
  lookup: (token) => succeed$3(new LinearClient({ accessToken: token })),
232832
232703
  idleTimeToLive: "1 minute"
232833
232704
  });
232834
- const getClient = tokens.get.pipe(flatMap$4(({ token }) => get$12(clients, token)), mapError$2((cause) => new LinearError({ cause })));
232705
+ const getClient = tokens.get.pipe(flatMap$4(({ token }) => get$13(clients, token)), mapError$2((cause) => new LinearError({ cause })));
232835
232706
  const use = (f) => getClient.pipe(flatMap$4((client) => tryPromise({
232836
232707
  try: () => f(client),
232837
232708
  catch: (cause) => new LinearError({ cause })
@@ -232899,7 +232770,7 @@ var Linear = class extends Service$1()("lalph/Linear", { make: gen(function* ()
232899
232770
  const LinearIssueSource = effect$1(IssueSource, gen(function* () {
232900
232771
  const linear = yield* Linear;
232901
232772
  let state = yield* linear.getState;
232902
- const projectSettings = yield* make$57({
232773
+ const projectSettings = yield* make$59({
232903
232774
  lookup: fnUntraced(function* (_projectId) {
232904
232775
  const project = yield* getOrSelectProject;
232905
232776
  return {
@@ -232985,7 +232856,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
232985
232856
  }));
232986
232857
  return yield* IssueSource.make({
232987
232858
  issues: fnUntraced(function* (projectId) {
232988
- const settings = yield* get$7(projectSettings, projectId);
232859
+ const settings = yield* get$8(projectSettings, projectId);
232989
232860
  return yield* issues({
232990
232861
  projectId: settings.project.id,
232991
232862
  teamId: settings.teamId,
@@ -232994,7 +232865,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
232994
232865
  });
232995
232866
  }),
232996
232867
  findById: fnUntraced(function* (projectId, issueId) {
232997
- const settings = yield* get$7(projectSettings, projectId);
232868
+ const settings = yield* get$8(projectSettings, projectId);
232998
232869
  return (yield* issues({
232999
232870
  projectId: settings.project.id,
233000
232871
  labelId: settings.labelId,
@@ -233003,7 +232874,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
233003
232874
  })).find((issue) => issue.id === issueId) ?? null;
233004
232875
  }),
233005
232876
  createIssue: fnUntraced(function* (projectId, issue) {
233006
- const { teamId, labelId, autoMergeLabelId, project } = yield* get$7(projectSettings, projectId);
232877
+ const { teamId, labelId, autoMergeLabelId, project } = yield* get$8(projectSettings, projectId);
233007
232878
  const created = yield* linear.use((c) => c.createIssue({
233008
232879
  teamId,
233009
232880
  projectId: project.id,
@@ -233036,7 +232907,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
233036
232907
  };
233037
232908
  }, mapError$2((cause) => new IssueSourceError({ cause }))),
233038
232909
  updateIssue: fnUntraced(function* (options) {
233039
- const { autoMergeLabelId, teamId } = yield* get$7(projectSettings, options.projectId);
232910
+ const { autoMergeLabelId, teamId } = yield* get$8(projectSettings, options.projectId);
233040
232911
  const issueId = identifierMap.get(options.issueId);
233041
232912
  const linearIssue = yield* linear.issueById(issueId);
233042
232913
  const update = { labelIds: linearIssue.labelIds.slice() };
@@ -233066,7 +232937,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
233066
232937
  yield* forEach$4(toRemove, (relation) => linear.use((c) => c.deleteIssueRelation(relation.id)).pipe(ignore$1), { concurrency: 5 });
233067
232938
  }, mapError$2((cause) => new IssueSourceError({ cause }))),
233068
232939
  cancelIssue: fnUntraced(function* (projectId, issueId) {
233069
- const { teamId } = yield* get$7(projectSettings, projectId);
232940
+ const { teamId } = yield* get$8(projectSettings, projectId);
233070
232941
  const states = statesForTeamId(teamId);
233071
232942
  const linearIssueId = identifierMap.get(issueId);
233072
232943
  yield* linear.use((c) => c.updateIssue(linearIssueId, { stateId: states.canceled.id }));
@@ -233079,9 +232950,9 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
233079
232950
  yield* Settings.setProject(selectedAutoMergeLabelId, none$4());
233080
232951
  yield* invalidate$1(projectSettings, projectId);
233081
232952
  }),
233082
- settings: (projectId) => asVoid(get$7(projectSettings, projectId)),
232953
+ settings: (projectId) => asVoid(get$8(projectSettings, projectId)),
233083
232954
  info: fnUntraced(function* (lalphProjectId) {
233084
- const { teamId, labelId, autoMergeLabelId, project } = yield* get$7(projectSettings, lalphProjectId);
232955
+ const { teamId, labelId, autoMergeLabelId, project } = yield* get$8(projectSettings, lalphProjectId);
233085
232956
  const label = labelId;
233086
232957
  const autoMergeLabel = autoMergeLabelId;
233087
232958
  const teamName = project.teams.find((team) => team.id === teamId)?.name ?? teamId;
@@ -239636,7 +239507,7 @@ query FetchPRComments($owner: String!, $repo: String!, $pr: Int!) {
239636
239507
  var GithubError = class extends TaggedError("GithubError") {};
239637
239508
  var Github = class extends Service$1()("lalph/Github", { make: gen(function* () {
239638
239509
  const tokens = yield* TokenManager;
239639
- const clients = yield* make$70({
239510
+ const clients = yield* make$72({
239640
239511
  lookup: (token) => sync(() => {
239641
239512
  const octokit = new Octokit({ auth: token });
239642
239513
  const etagCache = /* @__PURE__ */ new Map();
@@ -239675,7 +239546,7 @@ var Github = class extends Service$1()("lalph/Github", { make: gen(function* ()
239675
239546
  }),
239676
239547
  idleTimeToLive: "1 minute"
239677
239548
  });
239678
- const getClient = tokens.get.pipe(flatMap$4(({ token }) => get$12(clients, token)), mapError$2((cause) => new GithubError({ cause })));
239549
+ const getClient = tokens.get.pipe(flatMap$4(({ token }) => get$13(clients, token)), mapError$2((cause) => new GithubError({ cause })));
239679
239550
  const request = (f) => getClient.pipe(flatMap$4((client) => tryPromise({
239680
239551
  try: () => f(client.rest),
239681
239552
  catch: (cause) => new GithubError({ cause })
@@ -239704,7 +239575,7 @@ var Github = class extends Service$1()("lalph/Github", { make: gen(function* ()
239704
239575
  const GithubIssueSource = effect$1(IssueSource, gen(function* () {
239705
239576
  const github = yield* Github;
239706
239577
  const cli = yield* GithubCli;
239707
- const projectSettings = yield* make$57({
239578
+ const projectSettings = yield* make$59({
239708
239579
  lookup: fnUntraced(function* (_projectId) {
239709
239580
  return {
239710
239581
  labelFilter: yield* getOrSelectLabel,
@@ -239828,13 +239699,13 @@ const GithubIssueSource = effect$1(IssueSource, gen(function* () {
239828
239699
  });
239829
239700
  return yield* IssueSource.make({
239830
239701
  issues: fnUntraced(function* (projectId) {
239831
- return yield* issues(yield* get$7(projectSettings, projectId));
239702
+ return yield* issues(yield* get$8(projectSettings, projectId));
239832
239703
  }),
239833
239704
  findById: fnUntraced(function* (projectId, issueId) {
239834
- return (yield* issues(yield* get$7(projectSettings, projectId))).find((issue) => issue.id === issueId) ?? null;
239705
+ return (yield* issues(yield* get$8(projectSettings, projectId))).find((issue) => issue.id === issueId) ?? null;
239835
239706
  }),
239836
239707
  createIssue: fnUntraced(function* (projectId, issue) {
239837
- const { labelFilter, autoMergeLabelName } = yield* get$7(projectSettings, projectId);
239708
+ const { labelFilter, autoMergeLabelName } = yield* get$8(projectSettings, projectId);
239838
239709
  const created = yield* createIssue({
239839
239710
  owner: cli.owner,
239840
239711
  repo: cli.repo,
@@ -239857,7 +239728,7 @@ const GithubIssueSource = effect$1(IssueSource, gen(function* () {
239857
239728
  };
239858
239729
  }, mapError$2((cause) => new IssueSourceError({ cause }))),
239859
239730
  updateIssue: fnUntraced(function* (options) {
239860
- const { labelFilter, autoMergeLabelName } = yield* get$7(projectSettings, options.projectId);
239731
+ const { labelFilter, autoMergeLabelName } = yield* get$8(projectSettings, options.projectId);
239861
239732
  const issueNumber = Number(options.issueId.slice(1));
239862
239733
  const currentIssue = yield* github.request((rest) => rest.issues.get({
239863
239734
  owner: cli.owner,
@@ -239925,9 +239796,9 @@ const GithubIssueSource = effect$1(IssueSource, gen(function* () {
239925
239796
  yield* Settings.setProject(autoMergeLabel, none$4());
239926
239797
  yield* invalidate$1(projectSettings, projectId);
239927
239798
  }),
239928
- settings: (projectId) => asVoid(get$7(projectSettings, projectId)),
239799
+ settings: (projectId) => asVoid(get$8(projectSettings, projectId)),
239929
239800
  info: fnUntraced(function* (projectId) {
239930
- const { labelFilter, projectFilter, autoMergeLabelName } = yield* get$7(projectSettings, projectId);
239801
+ const { labelFilter, projectFilter, autoMergeLabelName } = yield* get$8(projectSettings, projectId);
239931
239802
  console.log(` GitHub project: ${match$10(projectFilter, {
239932
239803
  onNone: () => "None",
239933
239804
  onSome: (value) => `#${value.number} ${value.title}`
@@ -240073,45 +239944,6 @@ const etagHeaderValue = (headers) => {
240073
239944
  };
240074
239945
  const isNotModifiedError = (cause) => typeof cause === "object" && cause !== null && "status" in cause && cause.status === 304;
240075
239946
  //#endregion
240076
- //#region src/Tracing.ts
240077
- const TracingLayer = unwrap$3(gen(function* () {
240078
- if (isLessThan$1("Trace", yield* MinimumLogLevel)) return empty$15;
240079
- return TracerLogger;
240080
- }));
240081
- const TracerLogger = gen(function* () {
240082
- const loggers = yield* CurrentLoggers;
240083
- const tracer = yield* Tracer;
240084
- const fiber = getCurrent();
240085
- const log = (message, time) => {
240086
- const options = {
240087
- message,
240088
- fiber,
240089
- date: new Date(Number(time / BigInt(1e6))),
240090
- logLevel: "Trace",
240091
- cause: empty$14
240092
- };
240093
- loggers.forEach((logger) => {
240094
- logger.log(options);
240095
- });
240096
- };
240097
- return make$86({ span(options) {
240098
- const span = tracer.span(options);
240099
- log(`${options.name}: started`, options.startTime);
240100
- const oldEnd = span.end;
240101
- span.end = (endTime, cause) => {
240102
- const duration = nanos(endTime - span.status.startTime);
240103
- log(`${options.name}: completed. Took ${format$3(duration)}`, endTime);
240104
- return oldEnd.call(span, endTime, cause);
240105
- };
240106
- return span;
240107
- } });
240108
- }).pipe(effect$1(Tracer));
240109
- //#endregion
240110
- //#region src/shared/runtime.ts
240111
- const lalphMemoMap = makeMemoMapUnsafe();
240112
- const atomRuntime = context({ memoMap: lalphMemoMap });
240113
- atomRuntime.addGlobalLayer(TracingLayer);
240114
- //#endregion
240115
239947
  //#region src/CurrentIssueSource.ts
240116
239948
  const issueSources = [{
240117
239949
  id: "linear",
@@ -240145,7 +239977,7 @@ var CurrentIssueSource = class CurrentIssueSource extends Service$1()("lalph/Cur
240145
239977
  static layer = effectServices(gen(function* () {
240146
239978
  const settings = yield* Settings;
240147
239979
  const source = yield* getOrSelectIssueSource;
240148
- const build$1 = build(source.layer).pipe(map$9(get$15(IssueSource)), withSpan$1("CurrentIssueSource.build"));
239980
+ const build$1 = build(source.layer).pipe(map$9(get$16(IssueSource)), withSpan$1("CurrentIssueSource.build"));
240149
239981
  const ref = yield* fromAcquire(build$1);
240150
239982
  const services$2 = yield* services();
240151
239983
  const refresh = set$4(ref, build$1).pipe(provideServices$2(services$2));
@@ -240154,35 +239986,35 @@ var CurrentIssueSource = class CurrentIssueSource extends Service$1()("lalph/Cur
240154
239986
  onSome: () => orElse
240155
239987
  })));
240156
239988
  const proxy = IssueSource.of({
240157
- issues: (projectId) => get$6(ref).pipe(flatMap$4((source) => source.issues(projectId)), tapErrorTag("IssueSourceError", (e) => logWarning("Rebuilding issue source due to error", fail$7(e)).pipe(andThen(ignore$1(refresh)))), retry$3(refreshSchedule), unlessRalph(projectId, succeed$3([]))),
240158
- findById: (projectId, issueId) => get$6(ref).pipe(flatMap$4((source) => source.findById(projectId, issueId)), unlessRalph(projectId, succeed$3(null))),
240159
- createIssue: (projectId, options) => get$6(ref).pipe(flatMap$4((source) => source.createIssue(projectId, options)), unlessRalph(projectId, interrupt$1)),
240160
- updateIssue: (options) => get$6(ref).pipe(flatMap$4((source) => source.updateIssue(options)), unlessRalph(options.projectId, void_$2)),
240161
- cancelIssue: (projectId, issueId) => get$6(ref).pipe(flatMap$4((source) => source.cancelIssue(projectId, issueId)), unlessRalph(projectId, void_$2)),
240162
- reset: get$6(ref).pipe(flatMap$4((source) => source.reset)),
240163
- settings: (projectId) => get$6(ref).pipe(flatMap$4((source) => source.settings(projectId)), unlessRalph(projectId, void_$2)),
240164
- info: (projectId) => get$6(ref).pipe(flatMap$4((source) => source.info(projectId)), unlessRalph(projectId, void_$2)),
240165
- issueCliAgentPreset: (issue) => get$6(ref).pipe(flatMap$4((source) => source.issueCliAgentPreset(issue))),
240166
- updateCliAgentPreset: (preset) => get$6(ref).pipe(flatMap$4((source) => source.updateCliAgentPreset(preset))),
240167
- cliAgentPresetInfo: (preset) => get$6(ref).pipe(flatMap$4((source) => source.cliAgentPresetInfo(preset))),
240168
- ensureInProgress: (projectId, issueId) => get$6(ref).pipe(flatMap$4((source) => source.ensureInProgress(projectId, issueId)), unlessRalph(projectId, void_$2))
239989
+ ref: (projectId) => get$7(ref).pipe(flatMap$4((source) => source.ref(projectId)), unlessRalph(projectId, make$47(IssuesChange.Internal({ issues: [] })))),
239990
+ issues: (projectId) => get$7(ref).pipe(flatMap$4((source) => source.issues(projectId)), tapErrorTag("IssueSourceError", (e) => logWarning("Rebuilding issue source due to error", fail$7(e)).pipe(andThen(ignore$1(refresh)))), retry$1(refreshSchedule), unlessRalph(projectId, succeed$3([]))),
239991
+ findById: (projectId, issueId) => get$7(ref).pipe(flatMap$4((source) => source.findById(projectId, issueId)), unlessRalph(projectId, succeed$3(null))),
239992
+ createIssue: (projectId, options) => get$7(ref).pipe(flatMap$4((source) => source.createIssue(projectId, options)), unlessRalph(projectId, interrupt$1)),
239993
+ updateIssue: (options) => get$7(ref).pipe(flatMap$4((source) => source.updateIssue(options)), unlessRalph(options.projectId, void_$2)),
239994
+ cancelIssue: (projectId, issueId) => get$7(ref).pipe(flatMap$4((source) => source.cancelIssue(projectId, issueId)), unlessRalph(projectId, void_$2)),
239995
+ reset: get$7(ref).pipe(flatMap$4((source) => source.reset)),
239996
+ settings: (projectId) => get$7(ref).pipe(flatMap$4((source) => source.settings(projectId)), unlessRalph(projectId, void_$2)),
239997
+ info: (projectId) => get$7(ref).pipe(flatMap$4((source) => source.info(projectId)), unlessRalph(projectId, void_$2)),
239998
+ issueCliAgentPreset: (issue) => get$7(ref).pipe(flatMap$4((source) => source.issueCliAgentPreset(issue))),
239999
+ updateCliAgentPreset: (preset) => get$7(ref).pipe(flatMap$4((source) => source.updateCliAgentPreset(preset))),
240000
+ cliAgentPresetInfo: (preset) => get$7(ref).pipe(flatMap$4((source) => source.cliAgentPresetInfo(preset))),
240001
+ ensureInProgress: (projectId, issueId) => get$7(ref).pipe(flatMap$4((source) => source.ensureInProgress(projectId, issueId)), unlessRalph(projectId, void_$2))
240169
240002
  });
240170
240003
  return IssueSource.serviceMap(proxy).pipe(add$3(CurrentIssueSource, source));
240171
240004
  })).pipe(provide$3([Settings.layer, PlatformServices]));
240172
240005
  };
240173
240006
  const refreshSchedule = exponential(100, 1.5).pipe(either(spaced("30 seconds")));
240174
- const issueSourceRuntime = atomRuntime(CurrentIssueSource.layer.pipe(orDie$3));
240175
- const currentIssuesAtom = family((projectId) => pipe$1(issueSourceRuntime.atom(IssueSource.use((s) => s.issues(projectId)).pipe(withSpan$1("currentIssuesAtom"))), atomRuntime.withReactivity([`issues:${projectId}`]), withRefresh("30 seconds"), keepAlive));
240176
- const getCurrentIssues = (projectId) => getResult$1(currentIssuesAtom(projectId), { suspendOnWaiting: true });
240007
+ const getCurrentIssues = (projectId) => IssueSource.use((s) => pipe$1(s.ref(projectId), flatMap$4(get$5)));
240177
240008
  const checkForWork = fnUntraced(function* (project) {
240178
240009
  if (project.gitFlow === "ralph") return;
240179
- if (!(yield* getCurrentIssues(project.id)).some((issue) => issue.state === "todo" && issue.blockedBy.length === 0)) return yield* new NoMoreWork({});
240010
+ const { issues } = yield* getCurrentIssues(project.id);
240011
+ if (!issues.some((issue) => issue.state === "todo" && issue.blockedBy.length === 0)) return yield* new NoMoreWork({});
240180
240012
  });
240181
240013
  const resetInProgress = gen(function* () {
240182
240014
  const source = yield* IssueSource;
240183
- const reactivity = yield* Reactivity;
240184
240015
  const projectId = yield* CurrentProjectId;
240185
- const inProgress = (yield* getCurrentIssues(projectId)).filter((issue) => issue.state === "in-progress" && issue.id !== null);
240016
+ const { issues } = yield* getCurrentIssues(projectId);
240017
+ const inProgress = issues.filter((issue) => issue.state === "in-progress" && issue.id !== null);
240186
240018
  if (inProgress.length === 0) return;
240187
240019
  yield* forEach$4(inProgress, (issue) => source.updateIssue({
240188
240020
  projectId,
@@ -240191,7 +240023,7 @@ const resetInProgress = gen(function* () {
240191
240023
  }), {
240192
240024
  concurrency: 5,
240193
240025
  discard: true
240194
- }).pipe(reactivity.withBatch);
240026
+ });
240195
240027
  });
240196
240028
  var NoMoreWork = class extends ErrorClass("lalph/Prd/NoMoreWork")({ _tag: tag("NoMoreWork") }) {
240197
240029
  message = "No more work to be done!";
@@ -240638,7 +240470,7 @@ const WorkerStatus = taggedEnum();
240638
240470
  const activeWorkersAtom = make$17(empty$8());
240639
240471
  const workerOutputAtom = family((_id) => make$17(empty$13()));
240640
240472
  const activeWorkerLoggingAtom = make$17(fnUntraced(function* (get) {
240641
- const fibers = yield* make$55();
240473
+ const fibers = yield* make$57();
240642
240474
  yield* get.stream(activeWorkersAtom).pipe(runForEach(fnUntraced(function* (workers) {
240643
240475
  const toRemove = new Map(fibers);
240644
240476
  for (const [id, state] of workers) {
@@ -240969,9 +240801,7 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
240969
240801
  const worktree = yield* Worktree;
240970
240802
  const pathService = yield* Path$1;
240971
240803
  const fs = yield* FileSystem;
240972
- const reactivity = yield* Reactivity;
240973
240804
  const source = yield* IssueSource;
240974
- const registry = yield* AtomRegistry;
240975
240805
  const projectId = yield* CurrentProjectId;
240976
240806
  let chosenIssueId = null;
240977
240807
  let shouldAddAutoMerge = false;
@@ -240981,7 +240811,8 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
240981
240811
  const yaml = yield* fs.readFileString(prdFile);
240982
240812
  return PrdIssue.arrayFromYaml(yaml);
240983
240813
  });
240984
- const getCurrentIssues = getResult$2(registry, currentIssuesAtom(projectId), { suspendOnWaiting: true });
240814
+ const issuesRef = yield* source.ref(projectId);
240815
+ const getCurrentIssues = get$5(issuesRef).pipe(map$9((i) => i.issues));
240985
240816
  const syncSemaphore = makeUnsafe$9(1);
240986
240817
  const maybeRevertIssue = fnUntraced(function* (options) {
240987
240818
  const issue = (yield* readPrd).find((i) => i.id === options.issueId);
@@ -241068,19 +240899,19 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
241068
240899
  discard: true
241069
240900
  });
241070
240901
  yield* forEach$4(toRemove, (issueId) => source.cancelIssue(projectId, issueId), { concurrency: "unbounded" });
241071
- }).pipe(reactivity.withBatch, uninterruptible, syncSemaphore.withPermit, withSpan$1("Prd.sync"), catchTag$1("IssueSourceError", (e) => logWarning(fail$7(e))), annotateLogs({
240902
+ }).pipe(uninterruptible, syncSemaphore.withPermit, withSpan$1("Prd.sync"), catchTag$1("IssueSourceError", (e) => logWarning(fail$7(e))), annotateLogs({
241072
240903
  module: "Prd",
241073
240904
  method: "sync"
241074
240905
  }));
241075
- const updateSyncHandle = yield* make$56();
240906
+ const updateSyncHandle = yield* make$58();
241076
240907
  const updateSync = fnUntraced(function* (sourceIssues) {
241077
240908
  const currentYaml = (yield* fs.readFileString(prdFile)).trim();
241078
240909
  const nextYaml = PrdIssue.arrayToYaml(sourceIssues).trim();
241079
240910
  if (currentYaml === nextYaml) return;
241080
240911
  yield* fs.writeFileString(prdFile, nextYaml);
241081
240912
  }, scoped$1, withSpan$1("Prd.updateSync"), run$4(updateSyncHandle, { onlyIfMissing: true }), syncSemaphore.withPermitsIfAvailable(1));
241082
- yield* fs.watch(lalphDir).pipe(filter$3((event) => event.path.endsWith("prd.yml")), debounce(50), runForEach((_) => clear(updateSyncHandle).pipe(andThen(ignore$1(sync$3)))), retry$3(forever$1), forkScoped);
241083
- yield* toStreamResult(registry, currentIssuesAtom(projectId)).pipe(runForEach(updateSync), forkScoped);
240913
+ yield* fs.watch(lalphDir).pipe(filter$3((event) => event.path.endsWith("prd.yml")), debounce(50), runForEach((_) => clear(updateSyncHandle).pipe(andThen(ignore$1(sync$3)))), retry$1(forever$1), forkScoped);
240914
+ yield* changes(issuesRef).pipe(runForEach((s) => updateSync(s.issues)), forkScoped);
241084
240915
  const findById = fnUntraced(function* (issueId) {
241085
240916
  return (yield* getCurrentIssues).find((i) => i.id === issueId) ?? null;
241086
240917
  });
@@ -241105,18 +240936,9 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
241105
240936
  }).pipe(withSpan$1("Prd.build")) }) {
241106
240937
  static layerNoWorktree = effect$1(this, this.make);
241107
240938
  static layer = this.layerNoWorktree.pipe(provideMerge(Worktree.layer));
241108
- static layerProvided = this.layer.pipe(provide$3([
241109
- layer$14,
241110
- layer$32,
241111
- CurrentIssueSource.layer,
241112
- Settings.layer
241113
- ]));
240939
+ static layerProvided = this.layer.pipe(provide$3([CurrentIssueSource.layer, Settings.layer]));
241114
240940
  static layerLocal = this.layerNoWorktree.pipe(provideMerge(Worktree.layerLocal));
241115
- static layerLocalProvided = this.layerLocal.pipe(provide$3([
241116
- layer$14,
241117
- layer$32,
241118
- CurrentIssueSource.layer
241119
- ]));
240941
+ static layerLocalProvided = this.layerLocal.pipe(provide$3([CurrentIssueSource.layer]));
241120
240942
  static layerNoop = succeed$4(this, {
241121
240943
  path: "",
241122
240944
  maybeRevertIssue: () => void_$2,
@@ -241130,11 +240952,6 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
241130
240952
  //#endregion
241131
240953
  //#region src/TaskTools.ts
241132
240954
  var ChosenTaskDeferred = class extends Reference("lalph/TaskTools/ChosenTaskDeferred", { defaultValue: makeUnsafe$14 }) {};
241133
- var CurrentTaskRef = class CurrentTaskRef extends Service$1()("lalph/TaskTools/CurrentTaskRef") {
241134
- static update(f) {
241135
- return serviceOption(CurrentTaskRef).pipe(map$9(map$16((ref) => updateAndGet(ref, f))));
241136
- }
241137
- };
241138
240955
  const Task = Struct$2({
241139
240956
  id: String$1.annotate({ documentation: "The unique identifier of the task." }),
241140
240957
  ...pick$1(PrdIssue.fields, [
@@ -241238,7 +241055,6 @@ const TaskToolsHandlers = TaskToolsWithChoose.toLayer(gen(function* () {
241238
241055
  updateTask: fn("TaskTools.updateTask")(function* (options) {
241239
241056
  yield* log$1(`Calling "updateTask"`).pipe(annotateLogs({ taskId: options.taskId }));
241240
241057
  const projectId = yield* CurrentProjectId;
241241
- yield* CurrentTaskRef.update((prev) => prev.update(options));
241242
241058
  yield* source.updateIssue({
241243
241059
  projectId,
241244
241060
  issueId: options.taskId,
@@ -241264,7 +241080,7 @@ const SemanticSearchLayer = unwrap$3(gen(function* () {
241264
241080
  const pathService = yield* Path$1;
241265
241081
  const apiKey = yield* redacted("LALPH_OPENAI_API_KEY").pipe(option);
241266
241082
  if (isNone(apiKey)) return empty$15;
241267
- return (yield* promise(() => Promise.resolve().then(() => SemanticSearch_exports))).layer({
241083
+ return layer({
241268
241084
  directory: worktree.directory,
241269
241085
  database: pathService.join(worktree.directory, ".lalph", "shared", "search.sqlite")
241270
241086
  }).pipe(orDie$3, provide$3(model$1("text-embedding-3-small", { dimensions: 1536 })), provide$3(layer$9({ apiKey: apiKey.value }).pipe(provide$3(layerUndici))), tapCause$1((cause) => logWarning(`Failed to create SemanticSearch layer`, cause)), catchCause$2(() => empty$15));
@@ -241752,10 +241568,10 @@ const run = fnUntraced(function* (options) {
241752
241568
  githubPrNumber: chosenTask.githubPrNumber ?? void 0,
241753
241569
  gitFlow
241754
241570
  });
241755
- const issueRef = make$75(chosenTask.prd.update({ state: "in-progress" }));
241571
+ const issueSemaphore = makeUnsafe$9(1);
241756
241572
  const steer = yield* taskUpdateSteer({
241757
241573
  issueId: taskId,
241758
- current: issueRef
241574
+ semaphore: issueSemaphore
241759
241575
  });
241760
241576
  yield* log$1(`Agent exited with code: ${yield* agentWorker({
241761
241577
  stallTimeout: options.stallTimeout,
@@ -241765,7 +241581,7 @@ const run = fnUntraced(function* (options) {
241765
241581
  research: researchResult,
241766
241582
  steer,
241767
241583
  currentTask: CurrentTask.task({ task: chosenTask.prd })
241768
- }).pipe(provideService$2(CurrentTaskRef, issueRef), catchStallInReview, withSpan$1("Main.agentWorker"))}`);
241584
+ }).pipe(catchStallInReview, withSpan$1("Main.agentWorker"))}`);
241769
241585
  if (options.review) {
241770
241586
  yield* source.updateIssue({
241771
241587
  projectId,
@@ -241880,7 +241696,7 @@ const runProject = fnUntraced(function* (options) {
241880
241696
  const isFinite = Number.isFinite(options.iterations);
241881
241697
  const iterationsDisplay = isFinite ? options.iterations : "unlimited";
241882
241698
  const semaphore = makeUnsafe$9(options.project.concurrency);
241883
- const fibers = yield* make$54();
241699
+ const fibers = yield* make$56();
241884
241700
  let executionMode;
241885
241701
  if (options.project.gitFlow === "ralph") {
241886
241702
  if (!options.project.ralphSpec) return yield* new RalphSpecMissing({ projectId: options.project.id });
@@ -241935,7 +241751,7 @@ const runProject = fnUntraced(function* (options) {
241935
241751
  yield* semaphore.take(1);
241936
241752
  if (quit || isFinite && iteration >= iterations) break;
241937
241753
  const currentIteration = iteration;
241938
- const startedDeferred = yield* make$85();
241754
+ const startedDeferred = yield* make$87();
241939
241755
  let ralphDone = false;
241940
241756
  const gitFlowLayer = resolveGitFlowLayer();
241941
241757
  const fiber = yield* checkForWork(options.project).pipe(andThen(resolveRunEffect(startedDeferred).pipe(provide$1(gitFlowLayer, { local: true }), withWorkerState(options.project.id))), catchTags$1({
@@ -241968,7 +241784,7 @@ const maxContext = integer$1("max-context").pipe(withDescription$1("If the conte
241968
241784
  const stallMinutes = integer$1("stall-minutes").pipe(withDescription$1("Fail an iteration if the agent stops responding for this many minutes (default: LALPH_STALL_MINUTES or 5)."), withFallbackConfig(int$1("LALPH_STALL_MINUTES")), withDefault(5));
241969
241785
  const specsDirectory = directory("specs").pipe(withDescription$1("Directory where plan specs are written and read (default: LALPH_SPECS or .specs)."), withAlias$1("s"), withFallbackConfig(string$2("LALPH_SPECS")), withDefault(".specs"));
241970
241786
  const verbose = boolean$2("verbose").pipe(withDescription$1("Increase log output for debugging. Use -v when you need detailed logs."), withAlias$1("v"));
241971
- const commandRoot = make$58("lalph", {
241787
+ const commandRoot = make$60("lalph", {
241972
241788
  iterations,
241973
241789
  maxIterationMinutes,
241974
241790
  maxContext,
@@ -242006,8 +241822,11 @@ const commandRoot = make$58("lalph", {
242006
241822
  layer$32
242007
241823
  ]))));
242008
241824
  const watchTaskState = fnUntraced(function* (options) {
242009
- return yield* toStreamResult(yield* AtomRegistry, currentIssuesAtom(yield* CurrentProjectId)).pipe(retry$1(forever$1), orDie, debounce(seconds(10)), runForEach((issues) => {
242010
- const issue = issues.find((entry) => entry.id === options.issueId);
241825
+ const projectId = yield* CurrentProjectId;
241826
+ return yield* changes(yield* (yield* IssueSource).ref(projectId)).pipe(filterMap$2((issues) => {
241827
+ if (issues._tag === "Internal") return failVoid;
241828
+ return succeed$8(issues.issues.find((entry) => entry.id === options.issueId));
241829
+ }), runForEach((issue) => {
242011
241830
  if (issue?.state === "in-progress" || issue?.state === "in-review") return void_$2;
242012
241831
  return fail$6(new TaskStateChanged({
242013
241832
  issueId: options.issueId,
@@ -242016,11 +241835,20 @@ const watchTaskState = fnUntraced(function* (options) {
242016
241835
  }), withSpan$1("Main.watchTaskState"));
242017
241836
  });
242018
241837
  const taskUpdateSteer = fnUntraced(function* (options) {
242019
- return toStreamResult(yield* AtomRegistry, currentIssuesAtom(yield* CurrentProjectId)).pipe(drop(1), retry$1(forever$1), orDie, debounce(seconds(10)), filterMap$2((issues) => {
242020
- const issue = issues.find((entry) => entry.id === options.issueId);
241838
+ const projectId = yield* CurrentProjectId;
241839
+ const ref = yield* (yield* IssueSource).ref(projectId);
241840
+ let current = void 0;
241841
+ return changes(ref).pipe(filterMap$2((issues) => {
241842
+ const issue = issues.issues.find((entry) => entry.id === options.issueId);
242021
241843
  if (!issue) return failVoid;
242022
- if (!issue.isChangedComparedTo(options.current.current)) return failVoid;
242023
- set$9(options.current, issue);
241844
+ if (!current) {
241845
+ current = issue;
241846
+ return failVoid;
241847
+ }
241848
+ if (!issue.isChangedComparedTo(current)) return failVoid;
241849
+ current = issue;
241850
+ console.log("issue change", issues._tag);
241851
+ if (issues._tag === "Internal") return failVoid;
242024
241852
  return succeed$8(`The task has been updated by the user. Here is the latest information:
242025
241853
 
242026
241854
  # ${issue.title}
@@ -242068,7 +241896,7 @@ const agentTasker = fnUntraced(function* (options) {
242068
241896
  extraArgs: options.preset.extraArgs
242069
241897
  }), setCwd(worktree.directory), options.preset.withCommandPrefix, worktree.execWithOutput({ cliAgent: options.preset.cliAgent }));
242070
241898
  });
242071
- const commandPlanTasks = make$58("tasks", { specificationPath: path("spec", {
241899
+ const commandPlanTasks = make$60("tasks", { specificationPath: path("spec", {
242072
241900
  pathType: "file",
242073
241901
  mustExist: true
242074
241902
  }).pipe(withDescription$2("Required. Path to an existing specification file to convert into tasks")) }).pipe(withDescription("Convert an existing specification file into PRD tasks (without re-running plan mode)"), withHandler(fnUntraced(function* ({ specificationPath }) {
@@ -242137,7 +241965,7 @@ var Editor = class extends Service$1()("lalph/Editor", { make: gen(function* ()
242137
241965
  }) }) {
242138
241966
  static layer = effect$1(this, this.make).pipe(provide$3(PlatformServices));
242139
241967
  };
242140
- const commandPlan = make$58("plan", {
241968
+ const commandPlan = make$60("plan", {
242141
241969
  dangerous: boolean$2("dangerous").pipe(withAlias$1("d"), withDescription$1("Skip permission prompts while generating the specification from your plan")),
242142
241970
  withNewProject: boolean$2("new").pipe(withAlias$1("n"), withDescription$1("Create a new project (via prompts) before starting plan mode")),
242143
241971
  file: file$1("file", { mustExist: true }).pipe(withAlias$1("f"), withDescription$1("Read the plan from a markdown file instead of opening an editor"), optional$1)
@@ -242292,23 +242120,57 @@ const handler$1 = flow(withHandler(fnUntraced(function* () {
242292
242120
  console.log(`URL: ${created.url}`);
242293
242121
  }).pipe(provide$1([layerProjectIdPrompt, CurrentIssueSource.layer]));
242294
242122
  }, scoped$1)), provide(Editor.layer));
242295
- const commandIssue = make$58("issue").pipe(withDescription("Create a new issue in your editor."), withAlias("i"), handler$1);
242123
+ const commandIssue = make$60("issue").pipe(withDescription("Create a new issue in your editor."), withAlias("i"), handler$1);
242296
242124
  //#endregion
242297
242125
  //#region src/commands/edit.ts
242298
242126
  const handler = withHandler(fnUntraced(function* () {
242299
242127
  const prd = yield* Prd;
242300
242128
  yield* (yield* Editor).edit(prd.path);
242301
242129
  }, provide$1([Prd.layerLocalProvided.pipe(provideMerge(layerProjectIdPrompt)), Editor.layer])));
242302
- const commandEdit = make$58("edit").pipe(withDescription("Open the selected project's .lalph/prd.yml in your editor."), withAlias("e"), handler);
242130
+ const commandEdit = make$60("edit").pipe(withDescription("Open the selected project's .lalph/prd.yml in your editor."), withAlias("e"), handler);
242303
242131
  //#endregion
242304
242132
  //#region src/commands/source.ts
242305
- const commandSource = make$58("source").pipe(withDescription("Select the issue source to use (e.g. GitHub Issues or Linear). This applies to all projects."), withHandler(() => selectIssueSource), provide(Settings.layer));
242133
+ const commandSource = make$60("source").pipe(withDescription("Select the issue source to use (e.g. GitHub Issues or Linear). This applies to all projects."), withHandler(() => selectIssueSource), provide(Settings.layer));
242306
242134
  //#endregion
242307
242135
  //#region package.json
242308
- var version = "0.3.96";
242136
+ var version = "0.3.97";
242137
+ //#endregion
242138
+ //#region src/Tracing.ts
242139
+ const TracingLayer = unwrap$3(gen(function* () {
242140
+ if (isLessThan$1("Trace", yield* MinimumLogLevel)) return empty$15;
242141
+ return TracerLogger;
242142
+ }));
242143
+ const TracerLogger = gen(function* () {
242144
+ const loggers = yield* CurrentLoggers;
242145
+ const tracer = yield* Tracer;
242146
+ const fiber = getCurrent();
242147
+ const log = (message, time) => {
242148
+ const options = {
242149
+ message,
242150
+ fiber,
242151
+ date: new Date(Number(time / BigInt(1e6))),
242152
+ logLevel: "Trace",
242153
+ cause: empty$14
242154
+ };
242155
+ loggers.forEach((logger) => {
242156
+ logger.log(options);
242157
+ });
242158
+ };
242159
+ return make$88({ span(options) {
242160
+ const span = tracer.span(options);
242161
+ log(`${options.name}: started`, options.startTime);
242162
+ const oldEnd = span.end;
242163
+ span.end = (endTime, cause) => {
242164
+ const duration = nanos(endTime - span.status.startTime);
242165
+ log(`${options.name}: completed. Took ${format$3(duration)}`, endTime);
242166
+ return oldEnd.call(span, endTime, cause);
242167
+ };
242168
+ return span;
242169
+ } });
242170
+ }).pipe(effect$1(Tracer));
242309
242171
  //#endregion
242310
242172
  //#region src/commands/projects/ls.ts
242311
- const commandProjectsLs = make$58("ls").pipe(withDescription("List configured projects and how they run (enabled state, concurrency, branch, git flow, review agent)."), withHandler(fnUntraced(function* () {
242173
+ const commandProjectsLs = make$60("ls").pipe(withDescription("List configured projects and how they run (enabled state, concurrency, branch, git flow, review agent)."), withHandler(fnUntraced(function* () {
242312
242174
  const meta = yield* CurrentIssueSource;
242313
242175
  const source = yield* IssueSource;
242314
242176
  console.log("Issue source:", meta.name);
@@ -242332,10 +242194,10 @@ const commandProjectsLs = make$58("ls").pipe(withDescription("List configured pr
242332
242194
  })), provide(Settings.layer), provide(CurrentIssueSource.layer));
242333
242195
  //#endregion
242334
242196
  //#region src/commands/projects/add.ts
242335
- const commandProjectsAdd = make$58("add").pipe(withDescription("Add a project and configure its execution settings (concurrency, target branch, git flow, review agent) and issue source settings."), withHandler(() => addOrUpdateProject()), provide(Settings.layer), provide(CurrentIssueSource.layer));
242197
+ const commandProjectsAdd = make$60("add").pipe(withDescription("Add a project and configure its execution settings (concurrency, target branch, git flow, review agent) and issue source settings."), withHandler(() => addOrUpdateProject()), provide(Settings.layer), provide(CurrentIssueSource.layer));
242336
242198
  //#endregion
242337
242199
  //#region src/commands/projects/rm.ts
242338
- const commandProjectsRm = make$58("rm").pipe(withDescription("Remove a project from the configured list and delete its stored state under .lalph/projects."), withHandler(fnUntraced(function* () {
242200
+ const commandProjectsRm = make$60("rm").pipe(withDescription("Remove a project from the configured list and delete its stored state under .lalph/projects."), withHandler(fnUntraced(function* () {
242339
242201
  const fs = yield* FileSystem;
242340
242202
  const pathService = yield* Path$1;
242341
242203
  const projects = yield* getAllProjects;
@@ -242351,11 +242213,11 @@ const commandProjectsRm = make$58("rm").pipe(withDescription("Remove a project f
242351
242213
  const subcommands$1 = withSubcommands([
242352
242214
  commandProjectsLs,
242353
242215
  commandProjectsAdd,
242354
- make$58("edit").pipe(withDescription("Edit a project's execution settings (concurrency, target branch, git flow, review agent) and issue source settings."), withHandler(fnUntraced(function* () {
242216
+ make$60("edit").pipe(withDescription("Edit a project's execution settings (concurrency, target branch, git flow, review agent) and issue source settings."), withHandler(fnUntraced(function* () {
242355
242217
  if ((yield* getAllProjects).length === 0) return yield* log$1("No projects available to edit.");
242356
242218
  yield* addOrUpdateProject(yield* selectProject);
242357
242219
  })), provide(Settings.layer), provide(CurrentIssueSource.layer)),
242358
- make$58("toggle").pipe(withDescription("Enable or disable configured projects for lalph runs."), withHandler(fnUntraced(function* () {
242220
+ make$60("toggle").pipe(withDescription("Enable or disable configured projects for lalph runs."), withHandler(fnUntraced(function* () {
242359
242221
  const projects = yield* getAllProjects;
242360
242222
  if (projects.length === 0) return yield* log$1("No projects available to toggle.");
242361
242223
  const enabled = yield* multiSelect({
@@ -242373,10 +242235,10 @@ const subcommands$1 = withSubcommands([
242373
242235
  })), provide(Settings.layer)),
242374
242236
  commandProjectsRm
242375
242237
  ]);
242376
- const commandProjects = make$58("projects").pipe(withDescription("Manage projects and their execution settings (enabled state, concurrency, target branch, git flow, review agent). Use 'ls' to inspect and 'add', 'edit', or 'toggle' to configure."), withAlias("p"), subcommands$1);
242238
+ const commandProjects = make$60("projects").pipe(withDescription("Manage projects and their execution settings (enabled state, concurrency, target branch, git flow, review agent). Use 'ls' to inspect and 'add', 'edit', or 'toggle' to configure."), withAlias("p"), subcommands$1);
242377
242239
  //#endregion
242378
242240
  //#region src/commands/sh.ts
242379
- const commandSh = make$58("sh").pipe(withDescription("Launch an interactive shell in the active project's worktree."), withHandler(fnUntraced(function* () {
242241
+ const commandSh = make$60("sh").pipe(withDescription("Launch an interactive shell in the active project's worktree."), withHandler(fnUntraced(function* () {
242380
242242
  const worktree = yield* Worktree;
242381
242243
  const fs = yield* FileSystem;
242382
242244
  const pathService = yield* Path$1;
@@ -242393,7 +242255,7 @@ const commandSh = make$58("sh").pipe(withDescription("Launch an interactive shel
242393
242255
  }, scoped$1, provide$1(Prd.layerProvided.pipe(provideMerge(layerProjectIdPrompt))))));
242394
242256
  //#endregion
242395
242257
  //#region src/commands/agents/ls.ts
242396
- const commandAgentsLs = make$58("ls").pipe(withDescription("List configured agent presets (preset ids, agent, clanka model, arguments, and any issue-source options)."), withHandler(fnUntraced(function* () {
242258
+ const commandAgentsLs = make$60("ls").pipe(withDescription("List configured agent presets (preset ids, agent, clanka model, arguments, and any issue-source options)."), withHandler(fnUntraced(function* () {
242397
242259
  const meta = yield* CurrentIssueSource;
242398
242260
  const source = yield* IssueSource;
242399
242261
  console.log("Issue source:", meta.name);
@@ -242414,10 +242276,10 @@ const commandAgentsLs = make$58("ls").pipe(withDescription("List configured agen
242414
242276
  })), provide(Settings.layer), provide(CurrentIssueSource.layer));
242415
242277
  //#endregion
242416
242278
  //#region src/commands/agents/add.ts
242417
- const commandAgentsAdd = make$58("add").pipe(withDescription("Add a new agent preset (interactive prompt for the CLI agent, clanka model, arguments, and any issue-source options)."), withHandler(() => addOrUpdatePreset()), provide(Settings.layer), provide(CurrentIssueSource.layer));
242279
+ const commandAgentsAdd = make$60("add").pipe(withDescription("Add a new agent preset (interactive prompt for the CLI agent, clanka model, arguments, and any issue-source options)."), withHandler(() => addOrUpdatePreset()), provide(Settings.layer), provide(CurrentIssueSource.layer));
242418
242280
  //#endregion
242419
242281
  //#region src/commands/agents/rm.ts
242420
- const commandAgentsRm = make$58("rm").pipe(withDescription("Remove an agent preset (select a preset to delete from your configuration)."), withHandler(fnUntraced(function* () {
242282
+ const commandAgentsRm = make$60("rm").pipe(withDescription("Remove an agent preset (select a preset to delete from your configuration)."), withHandler(fnUntraced(function* () {
242421
242283
  const presets = yield* getAllCliAgentPresets;
242422
242284
  if (presets.length === 0) return yield* log$1("There are no presets to remove.");
242423
242285
  const preset = yield* selectCliAgentPreset;
@@ -242429,13 +242291,13 @@ const commandAgentsRm = make$58("rm").pipe(withDescription("Remove an agent pres
242429
242291
  const subcommands = withSubcommands([
242430
242292
  commandAgentsLs,
242431
242293
  commandAgentsAdd,
242432
- make$58("edit").pipe(withDescription("Edit an existing agent preset (interactive prompt to update the CLI agent, clanka model, arguments, and any issue-source options)."), withHandler(fnUntraced(function* () {
242294
+ make$60("edit").pipe(withDescription("Edit an existing agent preset (interactive prompt to update the CLI agent, clanka model, arguments, and any issue-source options)."), withHandler(fnUntraced(function* () {
242433
242295
  if ((yield* getAllCliAgentPresets).length === 0) return yield* log$1("No presets available to edit.");
242434
242296
  yield* addOrUpdatePreset({ existing: yield* selectCliAgentPreset });
242435
242297
  })), provide(Settings.layer), provide(CurrentIssueSource.layer)),
242436
242298
  commandAgentsRm
242437
242299
  ]);
242438
- const commandAgents = make$58("agents").pipe(withDescription("Manage agent presets used to run tasks. Use 'ls' to inspect presets and 'add'/'edit' to configure the CLI agent, clanka model, arguments, and any issue-source options."), withAlias("a"), subcommands);
242300
+ const commandAgents = make$60("agents").pipe(withDescription("Manage agent presets used to run tasks. Use 'ls' to inspect presets and 'add'/'edit' to configure the CLI agent, clanka model, arguments, and any issue-source options."), withAlias("a"), subcommands);
242439
242301
  //#endregion
242440
242302
  //#region src/cli.ts
242441
242303
  commandRoot.pipe(withSubcommands([
@@ -242448,9 +242310,7 @@ commandRoot.pipe(withSubcommands([
242448
242310
  commandProjects
242449
242311
  ]), provide(Settings.layer), provide(TracingLayer), provide(({ verbose }) => {
242450
242312
  if (!verbose) return empty$15;
242451
- const logLevel = succeed$4(MinimumLogLevel, "All");
242452
- atomRuntime.addGlobalLayer(logLevel);
242453
- return logLevel;
242454
- }), run$5({ version }), provide$1(PlatformServices), provideService$2(CurrentMemoMap, lalphMemoMap), runMain);
242313
+ return succeed$4(MinimumLogLevel, "All");
242314
+ }), run$5({ version }), provide$1(PlatformServices), runMain);
242455
242315
  //#endregion
242456
242316
  export {};