lalph 0.3.96 → 0.3.98

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
@@ -31656,6 +31501,42 @@ const takeUntil = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, predi
31656
31501
  });
31657
31502
  })));
31658
31503
  /**
31504
+ * Effectful predicate version of `takeUntil`.
31505
+ *
31506
+ * @example
31507
+ * ```ts
31508
+ * import { Console, Effect, Stream } from "effect"
31509
+ *
31510
+ * const program = Effect.gen(function*() {
31511
+ * const result = yield* Stream.range(1, 5).pipe(
31512
+ * Stream.takeUntilEffect((n) => Effect.succeed(n % 3 === 0)),
31513
+ * Stream.runCollect
31514
+ * )
31515
+ * yield* Console.log(result)
31516
+ * })
31517
+ *
31518
+ * Effect.runPromise(program)
31519
+ * // Output: [ 1, 2, 3 ]
31520
+ * ```
31521
+ *
31522
+ * @since 2.0.0
31523
+ * @category Filtering
31524
+ */
31525
+ const takeUntilEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, predicate, options) => transformPull(self, (pull, _scope) => sync(() => {
31526
+ let i = 0;
31527
+ let done$6 = false;
31528
+ return gen(function* () {
31529
+ if (done$6) return yield* done();
31530
+ const chunk = yield* pull;
31531
+ for (let j = 0; j < chunk.length; j++) if (yield* predicate(chunk[j], i++)) {
31532
+ done$6 = true;
31533
+ const arr = chunk.slice(0, options?.excludeLast ? j : j + 1);
31534
+ return isReadonlyArrayNonEmpty(arr) ? arr : yield* done();
31535
+ }
31536
+ return chunk;
31537
+ });
31538
+ })));
31539
+ /**
31659
31540
  * Drops the first `n` elements from this stream.
31660
31541
  *
31661
31542
  * @example
@@ -31866,74 +31747,6 @@ const broadcast = /* @__PURE__ */ dual(2, (self, options) => map$9(toPubSubTake(
31866
31747
  */
31867
31748
  const pipeThroughChannel = /* @__PURE__ */ dual(2, (self, channel) => fromChannel(pipeTo(self.channel, channel)));
31868
31749
  /**
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
31750
  * Decodes Uint8Array chunks into strings using TextDecoder with an optional encoding.
31938
31751
  *
31939
31752
  * @example
@@ -32460,7 +32273,7 @@ const toPubSubTake = /* @__PURE__ */ dual(2, (self, options) => toPubSubTake$1(s
32460
32273
  *
32461
32274
  * @since 4.0.0
32462
32275
  */
32463
- const TypeId$51 = "~effect/platform/FileSystem";
32276
+ const TypeId$52 = "~effect/platform/FileSystem";
32464
32277
  /**
32465
32278
  * Creates a `Size` from various numeric input types.
32466
32279
  *
@@ -32547,9 +32360,9 @@ const FileSystem = /* @__PURE__ */ Service$1("effect/platform/FileSystem");
32547
32360
  * @since 4.0.0
32548
32361
  * @category constructor
32549
32362
  */
32550
- const make$67 = (impl) => FileSystem.of({
32363
+ const make$69 = (impl) => FileSystem.of({
32551
32364
  ...impl,
32552
- [TypeId$51]: TypeId$51,
32365
+ [TypeId$52]: TypeId$52,
32553
32366
  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
32367
  readFileString: (path, encoding) => flatMap$4(impl.readFile(path), (_) => try_({
32555
32368
  try: () => new TextDecoder(encoding).decode(_),
@@ -32653,7 +32466,7 @@ var WatchBackend = class extends Service$1()("effect/platform/FileSystem/WatchBa
32653
32466
  /**
32654
32467
  * @since 4.0.0
32655
32468
  */
32656
- const TypeId$50 = "~effect/platform/Path";
32469
+ const TypeId$51 = "~effect/platform/Path";
32657
32470
  /**
32658
32471
  * @since 4.0.0
32659
32472
  * @category tag
@@ -32845,7 +32658,7 @@ function encodePathChars(filepath) {
32845
32658
  return filepath;
32846
32659
  }
32847
32660
  const posixImpl = /* @__PURE__ */ Path$1.of({
32848
- [TypeId$50]: TypeId$50,
32661
+ [TypeId$51]: TypeId$51,
32849
32662
  resolve: resolve$3,
32850
32663
  normalize(path) {
32851
32664
  if (path.length === 0) return ".";
@@ -33200,7 +33013,7 @@ function makeArray(length, value) {
33200
33013
  * @since 4.0.0
33201
33014
  */
33202
33015
  const ConfigProvider = /* @__PURE__ */ Reference("effect/ConfigProvider", { defaultValue: () => fromEnv() });
33203
- const Proto$24 = {
33016
+ const Proto$25 = {
33204
33017
  ...PipeInspectableProto,
33205
33018
  toJSON() {
33206
33019
  return { _id: "ConfigProvider" };
@@ -33246,8 +33059,8 @@ const Proto$24 = {
33246
33059
  * @category Constructors
33247
33060
  * @since 4.0.0
33248
33061
  */
33249
- function make$66(get, mapInput, prefix) {
33250
- const self = Object.create(Proto$24);
33062
+ function make$68(get, mapInput, prefix) {
33063
+ const self = Object.create(Proto$25);
33251
33064
  self.get = get;
33252
33065
  self.mapInput = mapInput;
33253
33066
  self.prefix = prefix;
@@ -33309,7 +33122,7 @@ function fromEnv(options) {
33309
33122
  ...import.meta?.env
33310
33123
  };
33311
33124
  const trie = buildEnvTrie(env);
33312
- return make$66((path) => succeed$3(nodeAtEnv(trie, env, path)));
33125
+ return make$68((path) => succeed$3(nodeAtEnv(trie, env, path)));
33313
33126
  }
33314
33127
  function buildEnvTrie(env) {
33315
33128
  const root = {};
@@ -33832,7 +33645,7 @@ var HashMapImpl = class {
33832
33645
  const thatImpl = that;
33833
33646
  if (this.size !== thatImpl.size) return false;
33834
33647
  for (const [key, value] of this) {
33835
- const otherValue = pipe$1(that, get$9(key));
33648
+ const otherValue = pipe$1(that, get$10(key));
33836
33649
  if (isNone(otherValue) || !equals$2(value, otherValue.value)) return false;
33837
33650
  }
33838
33651
  return true;
@@ -33867,7 +33680,7 @@ const isHashMap$1 = (u) => hasProperty(u, HashMapTypeId);
33867
33680
  /** @internal */
33868
33681
  const empty$9 = () => new HashMapImpl(false, 0, emptyNode, 0);
33869
33682
  /** @internal */
33870
- const get$9 = /* @__PURE__ */ dual(2, (self, key) => {
33683
+ const get$10 = /* @__PURE__ */ dual(2, (self, key) => {
33871
33684
  return self._root.get(0, hash(key), key);
33872
33685
  });
33873
33686
  /** @internal */
@@ -34405,9 +34218,9 @@ function escapeToken(token) {
34405
34218
  //#endregion
34406
34219
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/internal/schema/schema.js
34407
34220
  /** @internal */
34408
- const TypeId$49 = "~effect/Schema/Schema";
34221
+ const TypeId$50 = "~effect/Schema/Schema";
34409
34222
  const SchemaProto = {
34410
- [TypeId$49]: TypeId$49,
34223
+ [TypeId$50]: TypeId$50,
34411
34224
  pipe() {
34412
34225
  return pipeArguments(this, arguments);
34413
34226
  },
@@ -34422,11 +34235,11 @@ const SchemaProto = {
34422
34235
  }
34423
34236
  };
34424
34237
  /** @internal */
34425
- function make$63(ast, options) {
34238
+ function make$65(ast, options) {
34426
34239
  const self = Object.create(SchemaProto);
34427
34240
  if (options) Object.assign(self, options);
34428
34241
  self.ast = ast;
34429
- self.rebuild = (ast) => make$63(ast, options);
34242
+ self.rebuild = (ast) => make$65(ast, options);
34430
34243
  self.makeUnsafe = makeUnsafe$7(self);
34431
34244
  self.makeOption = makeOption(self);
34432
34245
  return self;
@@ -34444,7 +34257,7 @@ function toCodecJsonBase(ast) {
34444
34257
  case "Declaration": {
34445
34258
  const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
34446
34259
  if (isFunction(getLink)) {
34447
- const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$63(toEncoded$1(tp))) : []);
34260
+ const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$65(toEncoded$1(tp))) : []);
34448
34261
  const to = toCodecJson$1(link.to);
34449
34262
  return replaceEncoding(ast, to === link.to ? [link] : [new Link(to, link.transformation)]);
34450
34263
  }
@@ -34567,7 +34380,7 @@ function fromASTs(asts) {
34567
34380
  }
34568
34381
  function getEncodedSchema(last) {
34569
34382
  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))))]);
34383
+ if (isFunction(getLink)) return replaceEncoding(last, [getLink(last.typeParameters.map((tp) => make$65(toEncoded$1(tp))))]);
34571
34384
  return null_;
34572
34385
  }
34573
34386
  function on(last) {
@@ -35142,7 +34955,7 @@ function getPartPattern(part) {
35142
34955
  *
35143
34956
  * @since 4.0.0
35144
34957
  */
35145
- const TypeId$48 = TypeId$49;
34958
+ const TypeId$49 = TypeId$50;
35146
34959
  /**
35147
34960
  * Creates a schema for a **parametric** type (a generic container such as
35148
34961
  * `Array<A>`, `Option<A>`, etc.) by accepting a list of type-parameter schemas
@@ -35195,7 +35008,7 @@ const TypeId$48 = TypeId$49;
35195
35008
  */
35196
35009
  function declareConstructor() {
35197
35010
  return (typeParameters, run, annotations) => {
35198
- return make$62(new Declaration(typeParameters.map(getAST), (typeParameters) => run(typeParameters.map((ast) => make$62(ast))), annotations));
35011
+ return make$64(new Declaration(typeParameters.map(getAST), (typeParameters) => run(typeParameters.map((ast) => make$64(ast))), annotations));
35199
35012
  };
35200
35013
  }
35201
35014
  /**
@@ -35489,7 +35302,7 @@ const encodeSync = encodeSync$1;
35489
35302
  * @category Constructors
35490
35303
  * @since 4.0.0
35491
35304
  */
35492
- const make$62 = make$63;
35305
+ const make$64 = make$65;
35493
35306
  /**
35494
35307
  * Tests if a value is a `Schema`.
35495
35308
  *
@@ -35497,7 +35310,7 @@ const make$62 = make$63;
35497
35310
  * @since 4.0.0
35498
35311
  */
35499
35312
  function isSchema(u) {
35500
- return hasProperty(u, TypeId$48) && u[TypeId$48] === TypeId$48;
35313
+ return hasProperty(u, TypeId$49) && u[TypeId$49] === TypeId$49;
35501
35314
  }
35502
35315
  /**
35503
35316
  * Creates an exact optional key schema for struct fields. Unlike `optional`,
@@ -35520,7 +35333,7 @@ function isSchema(u) {
35520
35333
  *
35521
35334
  * @since 4.0.0
35522
35335
  */
35523
- const optionalKey = /* @__PURE__ */ lambda((schema) => make$62(optionalKey$1(schema.ast), { schema }));
35336
+ const optionalKey = /* @__PURE__ */ lambda((schema) => make$64(optionalKey$1(schema.ast), { schema }));
35524
35337
  /**
35525
35338
  * Marks a struct field as optional, allowing the key to be absent or
35526
35339
  * `undefined`.
@@ -35553,14 +35366,14 @@ const optional$3 = /* @__PURE__ */ lambda((self) => optionalKey(UndefinedOr(self
35553
35366
  *
35554
35367
  * @since 4.0.0
35555
35368
  */
35556
- const toType = /* @__PURE__ */ lambda((schema) => make$62(toType$1(schema.ast), { schema }));
35369
+ const toType = /* @__PURE__ */ lambda((schema) => make$64(toType$1(schema.ast), { schema }));
35557
35370
  /**
35558
35371
  * Extracts the encoded-side schema: sets `Type` to equal the `Encoded`,
35559
35372
  * discarding the decoding transformation path.
35560
35373
  *
35561
35374
  * @since 4.0.0
35562
35375
  */
35563
- const toEncoded = /* @__PURE__ */ lambda((schema) => make$62(toEncoded$1(schema.ast), { schema }));
35376
+ const toEncoded = /* @__PURE__ */ lambda((schema) => make$64(toEncoded$1(schema.ast), { schema }));
35564
35377
  /**
35565
35378
  * Creates a schema for a single literal value (string, number, bigint, boolean, or null).
35566
35379
  *
@@ -35578,7 +35391,7 @@ const toEncoded = /* @__PURE__ */ lambda((schema) => make$62(toEncoded$1(schema.
35578
35391
  * @since 4.0.0
35579
35392
  */
35580
35393
  function Literal(literal) {
35581
- const out = make$62(new Literal$1(literal), {
35394
+ const out = make$64(new Literal$1(literal), {
35582
35395
  literal,
35583
35396
  transform(to) {
35584
35397
  return out.pipe(decodeTo(Literal(to), {
@@ -35594,41 +35407,41 @@ function Literal(literal) {
35594
35407
  *
35595
35408
  * @since 4.0.0
35596
35409
  */
35597
- const Never = /* @__PURE__ */ make$62(never$4);
35410
+ const Never = /* @__PURE__ */ make$64(never$4);
35598
35411
  /**
35599
35412
  * Schema for the `any` type. Accepts any value without validation.
35600
35413
  *
35601
35414
  * @see {@link Unknown} for a safer alternative that uses `unknown`.
35602
35415
  * @since 4.0.0
35603
35416
  */
35604
- const Any = /* @__PURE__ */ make$62(any$1);
35417
+ const Any = /* @__PURE__ */ make$64(any$1);
35605
35418
  /**
35606
35419
  * Schema for the `unknown` type. Accepts any value without validation.
35607
35420
  *
35608
35421
  * @see {@link Any} for the `any` variant.
35609
35422
  * @since 4.0.0
35610
35423
  */
35611
- const Unknown = /* @__PURE__ */ make$62(unknown$1);
35424
+ const Unknown = /* @__PURE__ */ make$64(unknown$1);
35612
35425
  /**
35613
35426
  * Schema for the `null` literal. Validates that the input is strictly `null`.
35614
35427
  *
35615
35428
  * @see {@link NullOr} for a union with another schema.
35616
35429
  * @since 4.0.0
35617
35430
  */
35618
- const Null = /* @__PURE__ */ make$62(null_);
35431
+ const Null = /* @__PURE__ */ make$64(null_);
35619
35432
  /**
35620
35433
  * Schema for the `undefined` literal. Validates that the input is strictly `undefined`.
35621
35434
  *
35622
35435
  * @see {@link UndefinedOr} for a union with another schema.
35623
35436
  * @since 4.0.0
35624
35437
  */
35625
- const Undefined = /* @__PURE__ */ make$62(undefined_);
35438
+ const Undefined = /* @__PURE__ */ make$64(undefined_);
35626
35439
  /**
35627
35440
  * Schema for `string` values. Validates that the input is `typeof` `"string"`.
35628
35441
  *
35629
35442
  * @since 4.0.0
35630
35443
  */
35631
- const String$1 = /* @__PURE__ */ make$62(string$3);
35444
+ const String$1 = /* @__PURE__ */ make$64(string$3);
35632
35445
  /**
35633
35446
  * Schema for `number` values, including `NaN`, `Infinity`, and `-Infinity`.
35634
35447
  *
@@ -35640,28 +35453,28 @@ const String$1 = /* @__PURE__ */ make$62(string$3);
35640
35453
  * @see {@link Finite} for a schema that excludes non-finite values.
35641
35454
  * @since 4.0.0
35642
35455
  */
35643
- const Number$1 = /* @__PURE__ */ make$62(number$3);
35456
+ const Number$1 = /* @__PURE__ */ make$64(number$3);
35644
35457
  /**
35645
35458
  * Schema for `boolean` values. Validates that the input is `typeof` `"boolean"`.
35646
35459
  *
35647
35460
  * @category Boolean
35648
35461
  * @since 4.0.0
35649
35462
  */
35650
- const Boolean$2 = /* @__PURE__ */ make$62(boolean$5);
35463
+ const Boolean$2 = /* @__PURE__ */ make$64(boolean$5);
35651
35464
  /**
35652
35465
  * Schema for `bigint` values. Validates that the input is `typeof` `"bigint"`.
35653
35466
  *
35654
35467
  * @since 4.0.0
35655
35468
  */
35656
- const BigInt$1 = /* @__PURE__ */ make$62(bigInt);
35469
+ const BigInt$1 = /* @__PURE__ */ make$64(bigInt);
35657
35470
  /**
35658
35471
  * Schema for the `void` type. Accepts `undefined` as the encoded value.
35659
35472
  *
35660
35473
  * @since 4.0.0
35661
35474
  */
35662
- const Void = /* @__PURE__ */ make$62(void_$1);
35475
+ const Void = /* @__PURE__ */ make$64(void_$1);
35663
35476
  function makeStruct(ast, fields) {
35664
- return make$62(ast, {
35477
+ return make$64(ast, {
35665
35478
  fields,
35666
35479
  mapFields(f, options) {
35667
35480
  const fields = f(this.fields);
@@ -35726,7 +35539,7 @@ function Struct$2(fields) {
35726
35539
  */
35727
35540
  function Record(key, value, options) {
35728
35541
  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), {
35542
+ return make$64(record$1(key.ast, value.ast, keyValueCombiner), {
35730
35543
  key,
35731
35544
  value
35732
35545
  });
@@ -35753,13 +35566,13 @@ function Record(key, value, options) {
35753
35566
  * @since 4.0.0
35754
35567
  */
35755
35568
  function StructWithRest(schema, records) {
35756
- return make$62(structWithRest(schema.ast, records.map(getAST)), {
35569
+ return make$64(structWithRest(schema.ast, records.map(getAST)), {
35757
35570
  schema,
35758
35571
  records
35759
35572
  });
35760
35573
  }
35761
35574
  function makeTuple(ast, elements) {
35762
- return make$62(ast, {
35575
+ return make$64(ast, {
35763
35576
  elements,
35764
35577
  mapElements(f, options) {
35765
35578
  const elements = f(this.elements);
@@ -35806,7 +35619,7 @@ function Tuple(elements) {
35806
35619
  * @category Constructors
35807
35620
  * @since 4.0.0
35808
35621
  */
35809
- const Array$1 = /* @__PURE__ */ lambda((schema) => make$62(new Arrays(false, [], [schema.ast]), { schema }));
35622
+ const Array$1 = /* @__PURE__ */ lambda((schema) => make$64(new Arrays(false, [], [schema.ast]), { schema }));
35810
35623
  /**
35811
35624
  * Defines a non-empty `ReadonlyArray` schema — at least one element required.
35812
35625
  * Type is `readonly [T, ...T[]]`.
@@ -35825,7 +35638,7 @@ const Array$1 = /* @__PURE__ */ lambda((schema) => make$62(new Arrays(false, [],
35825
35638
  * @category Constructors
35826
35639
  * @since 4.0.0
35827
35640
  */
35828
- const NonEmptyArray = /* @__PURE__ */ lambda((schema) => make$62(new Arrays(false, [schema.ast], [schema.ast]), { schema }));
35641
+ const NonEmptyArray = /* @__PURE__ */ lambda((schema) => make$64(new Arrays(false, [schema.ast], [schema.ast]), { schema }));
35829
35642
  /**
35830
35643
  * Makes an array or tuple schema mutable, removing the `readonly` modifier.
35831
35644
  *
@@ -35843,10 +35656,10 @@ const NonEmptyArray = /* @__PURE__ */ lambda((schema) => make$62(new Arrays(fals
35843
35656
  * @since 4.0.0
35844
35657
  */
35845
35658
  const mutable = /* @__PURE__ */ lambda((schema) => {
35846
- return make$62(new Arrays(true, schema.ast.elements, schema.ast.rest), { schema });
35659
+ return make$64(new Arrays(true, schema.ast.elements, schema.ast.rest), { schema });
35847
35660
  });
35848
35661
  function makeUnion(ast, members) {
35849
- return make$62(ast, {
35662
+ return make$64(ast, {
35850
35663
  members,
35851
35664
  mapMembers(f, options) {
35852
35665
  const members = f(this.members);
@@ -35896,7 +35709,7 @@ function Union$2(members, options) {
35896
35709
  */
35897
35710
  function Literals(literals) {
35898
35711
  const members = literals.map(Literal);
35899
- return make$62(union$3(members, "anyOf", void 0), {
35712
+ return make$64(union$3(members, "anyOf", void 0), {
35900
35713
  literals,
35901
35714
  members,
35902
35715
  mapMembers(f) {
@@ -35948,7 +35761,7 @@ const UndefinedOr = /* @__PURE__ */ lambda((self) => Union$2([self, Undefined]))
35948
35761
  * @since 4.0.0
35949
35762
  */
35950
35763
  function suspend(f) {
35951
- return make$62(new Suspend(() => f().ast));
35764
+ return make$64(new Suspend(() => f().ast));
35952
35765
  }
35953
35766
  /**
35954
35767
  * Adds a nominal brand to a schema, intersecting the output type with
@@ -35958,7 +35771,7 @@ function suspend(f) {
35958
35771
  * @since 4.0.0
35959
35772
  */
35960
35773
  function brand(identifier) {
35961
- return (schema) => make$62(brand$1(schema.ast, identifier), {
35774
+ return (schema) => make$64(brand$1(schema.ast, identifier), {
35962
35775
  schema,
35963
35776
  identifier
35964
35777
  });
@@ -35986,11 +35799,11 @@ function brand(identifier) {
35986
35799
  * @since 4.0.0
35987
35800
  */
35988
35801
  function middlewareDecoding(decode) {
35989
- return (schema) => make$62(middlewareDecoding$1(schema.ast, new Middleware(decode, identity)), { schema });
35802
+ return (schema) => make$64(middlewareDecoding$1(schema.ast, new Middleware(decode, identity)), { schema });
35990
35803
  }
35991
35804
  function decodeTo(to, transformation) {
35992
35805
  return (from) => {
35993
- return make$62(decodeTo$1(from.ast, to.ast, transformation ? make$78(transformation) : passthrough()), {
35806
+ return make$64(decodeTo$1(from.ast, to.ast, transformation ? make$80(transformation) : passthrough()), {
35994
35807
  from,
35995
35808
  to
35996
35809
  });
@@ -36032,7 +35845,7 @@ function encodeTo(to, transformation) {
36032
35845
  */
36033
35846
  function withConstructorDefault(defaultValue) {
36034
35847
  return (schema) => {
36035
- return make$62(withConstructorDefault$1(schema.ast, defaultValue), { schema });
35848
+ return make$64(withConstructorDefault$1(schema.ast, defaultValue), { schema });
36036
35849
  };
36037
35850
  }
36038
35851
  /**
@@ -36282,7 +36095,7 @@ function TaggedUnion(casesByTag) {
36282
36095
  for (const key of Object.keys(casesByTag)) members.push(cases[key] = TaggedStruct(key, casesByTag[key]));
36283
36096
  const union = Union$2(members);
36284
36097
  const { guards, isAnyOf, match } = toTaggedUnion("_tag")(union);
36285
- return make$62(union.ast, {
36098
+ return make$64(union.ast, {
36286
36099
  cases,
36287
36100
  isAnyOf,
36288
36101
  guards,
@@ -36319,7 +36132,7 @@ function instanceOf(constructor, annotations) {
36319
36132
  */
36320
36133
  function link$1() {
36321
36134
  return (encodeTo, transformation) => {
36322
- return new Link(encodeTo.ast, make$78(transformation));
36135
+ return new Link(encodeTo.ast, make$80(transformation));
36323
36136
  };
36324
36137
  }
36325
36138
  /**
@@ -36706,7 +36519,7 @@ const NonEmptyString = /* @__PURE__ */ String$1.check(/* @__PURE__ */ isNonEmpty
36706
36519
  * @since 4.0.0
36707
36520
  */
36708
36521
  function Option(value) {
36709
- return make$62(declareConstructor()([value], ([value]) => (input, ast, options) => {
36522
+ return make$64(declareConstructor()([value], ([value]) => (input, ast, options) => {
36710
36523
  if (isOption(input)) {
36711
36524
  if (isNone(input)) return succeedNone;
36712
36525
  return mapBothEager(decodeUnknownEffect$1(value)(input.value, options), {
@@ -36790,7 +36603,7 @@ function OptionFromOptional(schema) {
36790
36603
  */
36791
36604
  function Redacted(value, options) {
36792
36605
  const decodeLabel = typeof options?.label === "string" ? decodeUnknownEffect$1(Literal(options.label)) : void 0;
36793
- return make$62(declareConstructor()([value], ([value]) => (input, ast, poptions) => {
36606
+ return make$64(declareConstructor()([value], ([value]) => (input, ast, poptions) => {
36794
36607
  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
36608
  onSuccess: () => input,
36796
36609
  onFailure: () => {
@@ -36808,10 +36621,10 @@ function Redacted(value, options) {
36808
36621
  },
36809
36622
  expected: "Redacted",
36810
36623
  toCodecJson: ([value]) => link$1()(redact$1(value), {
36811
- decode: transform$4((e) => make$81(e, { label: options?.label })),
36624
+ decode: transform$4((e) => make$83(e, { label: options?.label })),
36812
36625
  encode: forbidden((oe) => "Cannot serialize Redacted" + (isSome(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : ""))
36813
36626
  }),
36814
- toArbitrary: ([value]) => () => value.map((a) => make$81(a, { label: options?.label })),
36627
+ toArbitrary: ([value]) => () => value.map((a) => make$83(a, { label: options?.label })),
36815
36628
  toFormatter: () => globalThis.String,
36816
36629
  toEquivalence: ([value]) => makeEquivalence$2(value)
36817
36630
  }).ast, { value });
@@ -36833,7 +36646,7 @@ function redact$1(schema) {
36833
36646
  * @since 4.0.0
36834
36647
  */
36835
36648
  function CauseReason(error, defect) {
36836
- return make$62(declareConstructor()([error, defect], ([error, defect]) => (input, ast, options) => {
36649
+ return make$64(declareConstructor()([error, defect], ([error, defect]) => (input, ast, options) => {
36837
36650
  if (!isReason(input)) return fail$6(new InvalidType(ast, some$2(input)));
36838
36651
  switch (input._tag) {
36839
36652
  case "Fail": return mapBothEager(decodeUnknownEffect$1(error)(input.error, options), {
@@ -36919,7 +36732,7 @@ function causeReasonToFormatter(error, defect) {
36919
36732
  * @since 4.0.0
36920
36733
  */
36921
36734
  function Cause(error, defect) {
36922
- return make$62(declareConstructor()([error, defect], ([error, defect]) => {
36735
+ return make$64(declareConstructor()([error, defect], ([error, defect]) => {
36923
36736
  const failures = Array$1(CauseReason(error, defect));
36924
36737
  return (input, ast, options) => {
36925
36738
  if (!isCause(input)) return fail$6(new InvalidType(ast, some$2(input)));
@@ -37010,7 +36823,7 @@ const Defect = /* @__PURE__ */ Union$2([/* @__PURE__ */ ErrorJsonEncoded.pipe(/*
37010
36823
  * @since 4.0.0
37011
36824
  */
37012
36825
  function Exit(value, error, defect) {
37013
- return make$62(declareConstructor()([
36826
+ return make$64(declareConstructor()([
37014
36827
  value,
37015
36828
  error,
37016
36829
  defect
@@ -37383,7 +37196,7 @@ function makeClass(Inherited, identifier, struct$1, annotations) {
37383
37196
  toString() {
37384
37197
  return `${identifier}(${format$4({ ...this })})`;
37385
37198
  }
37386
- static [TypeId$48] = TypeId$48;
37199
+ static [TypeId$49] = TypeId$49;
37387
37200
  get [ClassTypeId]() {
37388
37201
  return ClassTypeId;
37389
37202
  }
@@ -37439,7 +37252,7 @@ function getClassSchemaFactory(from, identifier, annotations) {
37439
37252
  return (self) => {
37440
37253
  if (memo === void 0) {
37441
37254
  const transformation = getClassTransformation(self);
37442
- const to = make$62(new Declaration([from.ast], () => (input, ast) => {
37255
+ const to = make$64(new Declaration([from.ast], () => (input, ast) => {
37443
37256
  return input instanceof self || hasProperty(input, getClassTypeId(identifier)) ? succeed$3(input) : fail$6(new InvalidType(ast, some$2(input)));
37444
37257
  }, {
37445
37258
  identifier,
@@ -37631,11 +37444,11 @@ function toJsonSchemaDocument(schema, options) {
37631
37444
  * @since 4.0.0
37632
37445
  */
37633
37446
  function toCodecJson(schema) {
37634
- return make$62(toCodecJson$1(schema.ast));
37447
+ return make$64(toCodecJson$1(schema.ast));
37635
37448
  }
37636
37449
  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)));
37450
+ if (options?.keepDeclarations === true) return make$64(toCodecEnsureArray(serializerStringTreeKeepDeclarations(schema.ast)));
37451
+ else return make$64(toCodecEnsureArray(serializerStringTree(schema.ast)));
37639
37452
  }
37640
37453
  function getStringTreePriority(ast) {
37641
37454
  switch (ast._tag) {
@@ -37654,7 +37467,7 @@ function serializerTree(ast, recur, onMissingAnnotation) {
37654
37467
  case "Declaration": {
37655
37468
  const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
37656
37469
  if (isFunction(getLink)) {
37657
- const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$62(recur(toEncoded$1(tp)))) : []);
37470
+ const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$64(recur(toEncoded$1(tp)))) : []);
37658
37471
  const to = recur(link.to);
37659
37472
  return replaceEncoding(ast, to === link.to ? [link] : [new Link(to, link.transformation)]);
37660
37473
  }
@@ -37731,7 +37544,7 @@ function onSerializerEnsureArray(ast) {
37731
37544
  * @category JSON
37732
37545
  * @since 4.0.0
37733
37546
  */
37734
- const Json = /* @__PURE__ */ make$62(Json$1);
37547
+ const Json = /* @__PURE__ */ make$64(Json$1);
37735
37548
  /**
37736
37549
  * Schema that accepts any mutable JSON-compatible value. See {@link Json} for
37737
37550
  * the immutable variant.
@@ -37739,10 +37552,10 @@ const Json = /* @__PURE__ */ make$62(Json$1);
37739
37552
  * @category JSON
37740
37553
  * @since 4.0.0
37741
37554
  */
37742
- const MutableJson = /* @__PURE__ */ make$62(MutableJson$1);
37555
+ const MutableJson = /* @__PURE__ */ make$64(MutableJson$1);
37743
37556
  //#endregion
37744
37557
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/Config.js
37745
- const TypeId$47 = "~effect/Config";
37558
+ const TypeId$48 = "~effect/Config";
37746
37559
  /**
37747
37560
  * The error type produced when config loading or validation fails.
37748
37561
  *
@@ -37776,10 +37589,10 @@ var ConfigError = class {
37776
37589
  return `ConfigError(${this.message})`;
37777
37590
  }
37778
37591
  };
37779
- const Proto$23 = {
37592
+ const Proto$24 = {
37780
37593
  ...PipeInspectableProto,
37781
37594
  ...YieldableProto,
37782
- [TypeId$47]: TypeId$47,
37595
+ [TypeId$48]: TypeId$48,
37783
37596
  asEffect() {
37784
37597
  return flatMap$4(ConfigProvider.asEffect(), (provider) => this.parse(provider));
37785
37598
  },
@@ -37820,8 +37633,8 @@ const Proto$23 = {
37820
37633
  * @category Constructors
37821
37634
  * @since 4.0.0
37822
37635
  */
37823
- function make$61(parse) {
37824
- const self = Object.create(Proto$23);
37636
+ function make$63(parse) {
37637
+ const self = Object.create(Proto$24);
37825
37638
  self.parse = parse;
37826
37639
  return self;
37827
37640
  }
@@ -37853,7 +37666,7 @@ function make$61(parse) {
37853
37666
  * @since 4.0.0
37854
37667
  */
37855
37668
  const map$3 = /* @__PURE__ */ dual(2, (self, f) => {
37856
- return make$61((provider) => map$9(self.parse(provider), f));
37669
+ return make$63((provider) => map$9(self.parse(provider), f));
37857
37670
  });
37858
37671
  /**
37859
37672
  * Falls back to another config when parsing fails with a `ConfigError`.
@@ -37883,7 +37696,7 @@ const map$3 = /* @__PURE__ */ dual(2, (self, f) => {
37883
37696
  * @since 4.0.0
37884
37697
  */
37885
37698
  const orElse = /* @__PURE__ */ dual(2, (self, that) => {
37886
- return make$61((provider) => catch_$2(self.parse(provider), (error) => that(error).parse(provider)));
37699
+ return make$63((provider) => catch_$2(self.parse(provider), (error) => that(error).parse(provider)));
37887
37700
  });
37888
37701
  function isMissingDataOnly(issue) {
37889
37702
  switch (issue._tag) {
@@ -38074,7 +37887,7 @@ function schema$2(codec, path) {
38074
37887
  const decodeUnknownEffect = decodeUnknownEffect$1(codecStringTree);
38075
37888
  const codecStringTreeEncoded = toEncoded$1(codecStringTree.ast);
38076
37889
  const defaultPath = typeof path === "string" ? [path] : path ?? [];
38077
- return make$61((provider) => {
37890
+ return make$63((provider) => {
38078
37891
  const path = provider.prefix ? [...provider.prefix, ...defaultPath] : defaultPath;
38079
37892
  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
37893
  });
@@ -38125,7 +37938,7 @@ const Boolean$1 = /* @__PURE__ */ Literals([...TrueValues.literals, ...FalseValu
38125
37938
  * @since 4.0.0
38126
37939
  */
38127
37940
  function fail$1(err) {
38128
- return make$61(() => fail$6(new ConfigError(err)));
37941
+ return make$63(() => fail$6(new ConfigError(err)));
38129
37942
  }
38130
37943
  /**
38131
37944
  * Creates a config that always succeeds with the given value, ignoring the
@@ -38149,7 +37962,7 @@ function fail$1(err) {
38149
37962
  * @since 4.0.0
38150
37963
  */
38151
37964
  function succeed(value) {
38152
- return make$61(() => succeed$3(value));
37965
+ return make$63(() => succeed$3(value));
38153
37966
  }
38154
37967
  /**
38155
37968
  * Creates a config for a single string value.
@@ -38442,7 +38255,7 @@ const getErrorReported = (u) => {
38442
38255
  * @since 4.0.0
38443
38256
  * @category type id
38444
38257
  */
38445
- const TypeId$46 = "~effect/cli/CliError";
38258
+ const TypeId$47 = "~effect/cli/CliError";
38446
38259
  /**
38447
38260
  * Type guard to check if a value is a CLI error.
38448
38261
  *
@@ -38472,7 +38285,7 @@ const TypeId$46 = "~effect/cli/CliError";
38472
38285
  * @since 4.0.0
38473
38286
  * @category guards
38474
38287
  */
38475
- const isCliError = (u) => hasProperty(u, TypeId$46);
38288
+ const isCliError = (u) => hasProperty(u, TypeId$47);
38476
38289
  /**
38477
38290
  * Error thrown when an unrecognized option is encountered.
38478
38291
  *
@@ -38505,7 +38318,7 @@ const isCliError = (u) => hasProperty(u, TypeId$46);
38505
38318
  * @since 4.0.0
38506
38319
  * @category models
38507
38320
  */
38508
- var UnrecognizedOption = class extends ErrorClass(`${TypeId$46}/UnrecognizedOption`)({
38321
+ var UnrecognizedOption = class extends ErrorClass(`${TypeId$47}/UnrecognizedOption`)({
38509
38322
  _tag: /* @__PURE__ */ tag("UnrecognizedOption"),
38510
38323
  option: String$1,
38511
38324
  command: /* @__PURE__ */ optional$3(/* @__PURE__ */ Array$1(String$1)),
@@ -38514,7 +38327,7 @@ var UnrecognizedOption = class extends ErrorClass(`${TypeId$46}/UnrecognizedOpti
38514
38327
  /**
38515
38328
  * @since 4.0.0
38516
38329
  */
38517
- [TypeId$46] = TypeId$46;
38330
+ [TypeId$47] = TypeId$47;
38518
38331
  /**
38519
38332
  * @since 4.0.0
38520
38333
  */
@@ -38544,7 +38357,7 @@ var UnrecognizedOption = class extends ErrorClass(`${TypeId$46}/UnrecognizedOpti
38544
38357
  * @since 4.0.0
38545
38358
  * @category models
38546
38359
  */
38547
- var DuplicateOption = class extends ErrorClass(`${TypeId$46}/DuplicateOption`)({
38360
+ var DuplicateOption = class extends ErrorClass(`${TypeId$47}/DuplicateOption`)({
38548
38361
  _tag: /* @__PURE__ */ tag("DuplicateOption"),
38549
38362
  option: String$1,
38550
38363
  parentCommand: String$1,
@@ -38553,7 +38366,7 @@ var DuplicateOption = class extends ErrorClass(`${TypeId$46}/DuplicateOption`)({
38553
38366
  /**
38554
38367
  * @since 4.0.0
38555
38368
  */
38556
- [TypeId$46] = TypeId$46;
38369
+ [TypeId$47] = TypeId$47;
38557
38370
  /**
38558
38371
  * @since 4.0.0
38559
38372
  */
@@ -38590,14 +38403,14 @@ var DuplicateOption = class extends ErrorClass(`${TypeId$46}/DuplicateOption`)({
38590
38403
  * @since 4.0.0
38591
38404
  * @category models
38592
38405
  */
38593
- var MissingOption = class extends ErrorClass(`${TypeId$46}/MissingOption`)({
38406
+ var MissingOption = class extends ErrorClass(`${TypeId$47}/MissingOption`)({
38594
38407
  _tag: /* @__PURE__ */ tag("MissingOption"),
38595
38408
  option: String$1
38596
38409
  }) {
38597
38410
  /**
38598
38411
  * @since 4.0.0
38599
38412
  */
38600
- [TypeId$46] = TypeId$46;
38413
+ [TypeId$47] = TypeId$47;
38601
38414
  /**
38602
38415
  * @since 4.0.0
38603
38416
  */
@@ -38633,14 +38446,14 @@ var MissingOption = class extends ErrorClass(`${TypeId$46}/MissingOption`)({
38633
38446
  * @since 4.0.0
38634
38447
  * @category models
38635
38448
  */
38636
- var MissingArgument = class extends ErrorClass(`${TypeId$46}/MissingArgument`)({
38449
+ var MissingArgument = class extends ErrorClass(`${TypeId$47}/MissingArgument`)({
38637
38450
  _tag: /* @__PURE__ */ tag("MissingArgument"),
38638
38451
  argument: String$1
38639
38452
  }) {
38640
38453
  /**
38641
38454
  * @since 4.0.0
38642
38455
  */
38643
- [TypeId$46] = TypeId$46;
38456
+ [TypeId$47] = TypeId$47;
38644
38457
  /**
38645
38458
  * @since 4.0.0
38646
38459
  */
@@ -38681,7 +38494,7 @@ var MissingArgument = class extends ErrorClass(`${TypeId$46}/MissingArgument`)({
38681
38494
  * @since 4.0.0
38682
38495
  * @category models
38683
38496
  */
38684
- var InvalidValue = class extends ErrorClass(`${TypeId$46}/InvalidValue`)({
38497
+ var InvalidValue = class extends ErrorClass(`${TypeId$47}/InvalidValue`)({
38685
38498
  _tag: /* @__PURE__ */ tag("InvalidValue"),
38686
38499
  option: String$1,
38687
38500
  value: String$1,
@@ -38691,7 +38504,7 @@ var InvalidValue = class extends ErrorClass(`${TypeId$46}/InvalidValue`)({
38691
38504
  /**
38692
38505
  * @since 4.0.0
38693
38506
  */
38694
- [TypeId$46] = TypeId$46;
38507
+ [TypeId$47] = TypeId$47;
38695
38508
  /**
38696
38509
  * @since 4.0.0
38697
38510
  */
@@ -38735,7 +38548,7 @@ var InvalidValue = class extends ErrorClass(`${TypeId$46}/InvalidValue`)({
38735
38548
  * @since 4.0.0
38736
38549
  * @category models
38737
38550
  */
38738
- var UnknownSubcommand = class extends ErrorClass(`${TypeId$46}/UnknownSubcommand`)({
38551
+ var UnknownSubcommand = class extends ErrorClass(`${TypeId$47}/UnknownSubcommand`)({
38739
38552
  _tag: /* @__PURE__ */ tag("UnknownSubcommand"),
38740
38553
  subcommand: String$1,
38741
38554
  parent: /* @__PURE__ */ optional$3(/* @__PURE__ */ Array$1(String$1)),
@@ -38744,7 +38557,7 @@ var UnknownSubcommand = class extends ErrorClass(`${TypeId$46}/UnknownSubcommand
38744
38557
  /**
38745
38558
  * @since 4.0.0
38746
38559
  */
38747
- [TypeId$46] = TypeId$46;
38560
+ [TypeId$47] = TypeId$47;
38748
38561
  /**
38749
38562
  * @since 4.0.0
38750
38563
  */
@@ -38788,14 +38601,14 @@ var UnknownSubcommand = class extends ErrorClass(`${TypeId$46}/UnknownSubcommand
38788
38601
  * @since 4.0.0
38789
38602
  * @category models
38790
38603
  */
38791
- var UserError = class extends ErrorClass(`${TypeId$46}/UserError`)({
38604
+ var UserError = class extends ErrorClass(`${TypeId$47}/UserError`)({
38792
38605
  _tag: /* @__PURE__ */ tag("UserError"),
38793
38606
  cause: Defect
38794
38607
  }) {
38795
38608
  /**
38796
38609
  * @since 4.0.0
38797
38610
  */
38798
- [TypeId$46] = TypeId$46;
38611
+ [TypeId$47] = TypeId$47;
38799
38612
  };
38800
38613
  const NonShowHelpErrors = /* @__PURE__ */ Union$2([
38801
38614
  UnrecognizedOption,
@@ -38813,12 +38626,12 @@ const NonShowHelpErrors = /* @__PURE__ */ Union$2([
38813
38626
  * @since 4.0.0
38814
38627
  * @category models
38815
38628
  */
38816
- var ShowHelp = class extends ErrorClass(`${TypeId$46}/ShowHelp`)({
38629
+ var ShowHelp = class extends ErrorClass(`${TypeId$47}/ShowHelp`)({
38817
38630
  _tag: /* @__PURE__ */ tag("ShowHelp"),
38818
38631
  commandPath: /* @__PURE__ */ Array$1(String$1),
38819
38632
  errors: /* @__PURE__ */ Array$1(NonShowHelpErrors)
38820
38633
  }) {
38821
- [TypeId$46] = TypeId$46;
38634
+ [TypeId$47] = TypeId$47;
38822
38635
  [errorExitCode] = this.errors.length ? 1 : 0;
38823
38636
  [errorReported] = false;
38824
38637
  get message() {
@@ -49328,14 +49141,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
49328
49141
  require_ini();
49329
49142
  require_toml();
49330
49143
  var import_dist$1 = /* @__PURE__ */ __toESM(require_dist$1(), 1);
49331
- const Proto$22 = { ["~effect/cli/Primitive"]: { _A: identity } };
49144
+ const Proto$23 = { ["~effect/cli/Primitive"]: { _A: identity } };
49332
49145
  /** @internal */
49333
49146
  const isTrueValue = /* @__PURE__ */ is$1(TrueValues);
49334
49147
  /** @internal */
49335
49148
  const isFalseValue = /* @__PURE__ */ is$1(FalseValues);
49336
49149
  /** @internal */
49337
49150
  const isBoolean = (p) => p._tag === "Boolean";
49338
- const makePrimitive = (tag, parse) => Object.assign(Object.create(Proto$22), {
49151
+ const makePrimitive = (tag, parse) => Object.assign(Object.create(Proto$23), {
49339
49152
  _tag: tag,
49340
49153
  parse
49341
49154
  });
@@ -49525,7 +49338,7 @@ const getTypeName = (primitive) => {
49525
49338
  const getChoiceKeys = (primitive) => primitive._tag === "Choice" ? primitive.choiceKeys : void 0;
49526
49339
  //#endregion
49527
49340
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/Terminal.js
49528
- const TypeId$45 = "~effect/platform/Terminal";
49341
+ const TypeId$46 = "~effect/platform/Terminal";
49529
49342
  const QuitErrorTypeId = "effect/platform/Terminal/QuitError";
49530
49343
  /**
49531
49344
  * A `QuitError` represents an error that occurs when a user attempts to
@@ -49556,9 +49369,9 @@ const Terminal = /* @__PURE__ */ Service$1("effect/platform/Terminal");
49556
49369
  * @since 4.0.0
49557
49370
  * @category Constructors
49558
49371
  */
49559
- const make$60 = (impl) => Terminal.of({
49372
+ const make$62 = (impl) => Terminal.of({
49560
49373
  ...impl,
49561
- [TypeId$45]: TypeId$45
49374
+ [TypeId$46]: TypeId$46
49562
49375
  });
49563
49376
  //#endregion
49564
49377
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/unstable/cli/internal/ansi.js
@@ -49641,7 +49454,7 @@ const eraseLines = (rows) => {
49641
49454
  /**
49642
49455
  * @since 4.0.0
49643
49456
  */
49644
- const TypeId$44 = "~effect/cli/Prompt";
49457
+ const TypeId$45 = "~effect/cli/Prompt";
49645
49458
  const defaultFigures = {
49646
49459
  arrowUp: "↑",
49647
49460
  arrowDown: "↓",
@@ -49891,7 +49704,7 @@ const toggle = (options) => {
49891
49704
  };
49892
49705
  const proto$1 = {
49893
49706
  ...YieldableProto,
49894
- [TypeId$44]: { _Output: (_) => _ },
49707
+ [TypeId$45]: { _Output: (_) => _ },
49895
49708
  asEffect() {
49896
49709
  return run$6(this);
49897
49710
  },
@@ -50921,7 +50734,7 @@ const entriesToDisplay = (cursor, total, maxVisible) => {
50921
50734
  *
50922
50735
  * @since 4.0.0
50923
50736
  */
50924
- const TypeId$43 = "~effect/cli/Param";
50737
+ const TypeId$44 = "~effect/cli/Param";
50925
50738
  /**
50926
50739
  * Kind discriminator for positional argument parameters.
50927
50740
  *
@@ -50936,8 +50749,8 @@ const argumentKind = "argument";
50936
50749
  * @category constants
50937
50750
  */
50938
50751
  const flagKind = "flag";
50939
- const Proto$21 = {
50940
- [TypeId$43]: { _A: identity },
50752
+ const Proto$22 = {
50753
+ [TypeId$44]: { _A: identity },
50941
50754
  pipe() {
50942
50755
  return pipeArguments(this, arguments);
50943
50756
  }
@@ -50961,7 +50774,7 @@ const Proto$21 = {
50961
50774
  * @since 4.0.0
50962
50775
  * @category refinements
50963
50776
  */
50964
- const isParam = (u) => hasProperty(u, TypeId$43);
50777
+ const isParam = (u) => hasProperty(u, TypeId$44);
50965
50778
  /**
50966
50779
  * Type guard to check if a Single param is a flag (not an argument).
50967
50780
  *
@@ -50974,7 +50787,7 @@ const isFlagParam = (single) => single.kind === "flag";
50974
50787
  */
50975
50788
  const makeSingle = (params) => {
50976
50789
  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), {
50790
+ return Object.assign(Object.create(Proto$22), {
50978
50791
  _tag: "Single",
50979
50792
  ...params,
50980
50793
  description: params.description ?? none$4(),
@@ -51266,7 +51079,7 @@ const withDescription$3 = /* @__PURE__ */ dual(2, (self, description) => {
51266
51079
  */
51267
51080
  const map$2 = /* @__PURE__ */ dual(2, (self, f) => {
51268
51081
  const parse = (args) => map$9(self.parse(args), ([operands, value]) => [operands, f(value)]);
51269
- return Object.assign(Object.create(Proto$21), {
51082
+ return Object.assign(Object.create(Proto$22), {
51270
51083
  _tag: "Map",
51271
51084
  kind: self.kind,
51272
51085
  param: self,
@@ -51274,7 +51087,7 @@ const map$2 = /* @__PURE__ */ dual(2, (self, f) => {
51274
51087
  parse
51275
51088
  });
51276
51089
  });
51277
- const transform$2 = (self, f) => Object.assign(Object.create(Proto$21), {
51090
+ const transform$2 = (self, f) => Object.assign(Object.create(Proto$22), {
51278
51091
  _tag: "Transform",
51279
51092
  kind: self.kind,
51280
51093
  param: self,
@@ -51335,7 +51148,7 @@ const mapEffect = /* @__PURE__ */ dual(2, (self, f) => transform$2(self, (parse)
51335
51148
  */
51336
51149
  const optional$2 = (param) => {
51337
51150
  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), {
51151
+ return Object.assign(Object.create(Proto$22), {
51339
51152
  _tag: "Optional",
51340
51153
  kind: param.kind,
51341
51154
  param,
@@ -51435,7 +51248,7 @@ const variadic = (self, options) => {
51435
51248
  if (single.kind === "argument") return parsePositionalVariadic(self, single, args, options);
51436
51249
  else return parseOptionVariadic(self, single, args, options);
51437
51250
  };
51438
- return Object.assign(Object.create(Proto$21), {
51251
+ return Object.assign(Object.create(Proto$22), {
51439
51252
  _tag: "Variadic",
51440
51253
  kind: self.kind,
51441
51254
  param: self,
@@ -51994,18 +51807,18 @@ const warn = (...args) => consoleWith((console) => sync$2(() => {
51994
51807
  * @since 4.0.0
51995
51808
  * @category Type IDs
51996
51809
  */
51997
- const TypeId$42 = "~effect/Stdio";
51810
+ const TypeId$43 = "~effect/Stdio";
51998
51811
  /**
51999
51812
  * @since 4.0.0
52000
51813
  * @category Services
52001
51814
  */
52002
- const Stdio = /* @__PURE__ */ Service$1(TypeId$42);
51815
+ const Stdio = /* @__PURE__ */ Service$1(TypeId$43);
52003
51816
  /**
52004
51817
  * @since 4.0.0
52005
51818
  * @category Constructors
52006
51819
  */
52007
- const make$59 = (options) => ({
52008
- [TypeId$42]: TypeId$42,
51820
+ const make$61 = (options) => ({
51821
+ [TypeId$43]: TypeId$43,
52009
51822
  ...options
52010
51823
  });
52011
51824
  //#endregion
@@ -52800,13 +52613,13 @@ const reconstructTree = (tree, results) => {
52800
52613
  * Internal implementation details for CLI commands.
52801
52614
  * Public API is in ../Command.ts
52802
52615
  */
52803
- const TypeId$41 = "~effect/cli/Command";
52616
+ const TypeId$42 = "~effect/cli/Command";
52804
52617
  /**
52805
52618
  * Casts a Command to its internal implementation.
52806
52619
  * For use by internal modules that need access to config, parse, handle, etc.
52807
52620
  */
52808
52621
  const toImpl = (self) => self;
52809
- const Proto$20 = {
52622
+ const Proto$21 = {
52810
52623
  ...YieldableProto,
52811
52624
  pipe() {
52812
52625
  return pipeArguments(this, arguments);
@@ -52877,8 +52690,8 @@ const makeCommand = (options) => {
52877
52690
  ...examples.length > 0 && { examples }
52878
52691
  };
52879
52692
  };
52880
- return Object.assign(Object.create(Proto$20), {
52881
- [TypeId$41]: TypeId$41,
52693
+ return Object.assign(Object.create(Proto$21), {
52694
+ [TypeId$42]: TypeId$42,
52882
52695
  name: options.name,
52883
52696
  examples: options.examples ?? [],
52884
52697
  annotations,
@@ -53671,7 +53484,7 @@ const scanCommandLevel = (tokens, context) => {
53671
53484
  * @since 4.0.0
53672
53485
  * @category Guards
53673
53486
  */
53674
- const isCommand$1 = (u) => hasProperty(u, TypeId$41);
53487
+ const isCommand$1 = (u) => hasProperty(u, TypeId$42);
53675
53488
  /**
53676
53489
  * Creates a Command from a name, optional config, optional handler function, and optional description.
53677
53490
  *
@@ -53725,7 +53538,7 @@ const isCommand$1 = (u) => hasProperty(u, TypeId$41);
53725
53538
  * @since 4.0.0
53726
53539
  * @category constructors
53727
53540
  */
53728
- const make$58 = (name, config, handler) => {
53541
+ const make$60 = (name, config, handler) => {
53729
53542
  return makeCommand({
53730
53543
  name,
53731
53544
  config: parseConfig(config ?? {}),
@@ -54158,7 +53971,7 @@ const runWith = (command, config) => {
54158
53971
  program = provideService$2(program, LogLevel, logLevel);
54159
53972
  const services = match$10(logLevel, {
54160
53973
  onNone: () => empty$16(),
54161
- onSome: (level) => make$87(MinimumLogLevel, level)
53974
+ onSome: (level) => make$89(MinimumLogLevel, level)
54162
53975
  });
54163
53976
  yield* provideServices$2(program, services);
54164
53977
  }, 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 +53981,7 @@ const runWith = (command, config) => {
54168
53981
  /**
54169
53982
  * @since 4.0.0
54170
53983
  */
54171
- const TypeId$40 = "~effect/Cache";
53984
+ const TypeId$41 = "~effect/Cache";
54172
53985
  /**
54173
53986
  * Creates a cache with dynamic time-to-live based on the result and key.
54174
53987
  *
@@ -54229,12 +54042,12 @@ const TypeId$40 = "~effect/Cache";
54229
54042
  * @since 4.0.0
54230
54043
  * @category Constructors
54231
54044
  */
54232
- const makeWith$3 = (options) => servicesWith$1((services) => {
54233
- const self = Object.create(Proto$19);
54045
+ const makeWith$4 = (options) => servicesWith$1((services) => {
54046
+ const self = Object.create(Proto$20);
54234
54047
  self.lookup = (key) => updateServices$1(options.lookup(key), (input) => merge$7(services, input));
54235
- self.map = make$71();
54048
+ self.map = make$73();
54236
54049
  self.capacity = options.capacity;
54237
- self.timeToLive = options.timeToLive ? (exit, key) => fromInputUnsafe(options.timeToLive(exit, key)) : defaultTimeToLive;
54050
+ self.timeToLive = options.timeToLive ? (exit, key) => fromInputUnsafe(options.timeToLive(exit, key)) : defaultTimeToLive$1;
54238
54051
  return succeed$7(self);
54239
54052
  });
54240
54053
  /**
@@ -54290,13 +54103,13 @@ const makeWith$3 = (options) => servicesWith$1((services) => {
54290
54103
  * @since 4.0.0
54291
54104
  * @category Constructors
54292
54105
  */
54293
- const make$57 = (options) => makeWith$3({
54106
+ const make$59 = (options) => makeWith$4({
54294
54107
  ...options,
54295
- timeToLive: options.timeToLive ? () => options.timeToLive : defaultTimeToLive
54108
+ timeToLive: options.timeToLive ? () => options.timeToLive : defaultTimeToLive$1
54296
54109
  });
54297
- const Proto$19 = {
54110
+ const Proto$20 = {
54298
54111
  ...PipeInspectableProto,
54299
- [TypeId$40]: TypeId$40,
54112
+ [TypeId$41]: TypeId$41,
54300
54113
  toJSON() {
54301
54114
  return {
54302
54115
  _id: "Cache",
@@ -54305,7 +54118,7 @@ const Proto$19 = {
54305
54118
  };
54306
54119
  }
54307
54120
  };
54308
- const defaultTimeToLive = (_, _key) => infinity;
54121
+ const defaultTimeToLive$1 = (_, _key) => infinity;
54309
54122
  /**
54310
54123
  * Retrieves the value associated with the specified key from the cache.
54311
54124
  *
@@ -54389,9 +54202,9 @@ const defaultTimeToLive = (_, _key) => infinity;
54389
54202
  * @since 4.0.0
54390
54203
  * @category Combinators
54391
54204
  */
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)) {
54205
+ const get$8 = /* @__PURE__ */ dual(2, (self, key) => withFiber$1((fiber) => {
54206
+ const oentry = get$14(self.map, key);
54207
+ if (isSome(oentry) && !hasExpired$1(oentry.value, fiber)) {
54395
54208
  remove$5(self.map, key);
54396
54209
  set$8(self.map, key, oentry.value);
54397
54210
  return _await(oentry.value.deferred);
@@ -54402,7 +54215,7 @@ const get$7 = /* @__PURE__ */ dual(2, (self, key) => withFiber$1((fiber) => {
54402
54215
  deferred
54403
54216
  };
54404
54217
  set$8(self.map, key, entry);
54405
- if (Number.isFinite(self.capacity)) checkCapacity(self);
54218
+ if (Number.isFinite(self.capacity)) checkCapacity$1(self);
54406
54219
  return onExit$2(self.lookup(key), (exit) => {
54407
54220
  doneUnsafe(deferred, exit);
54408
54221
  const ttl = self.timeToLive(exit, key);
@@ -54411,11 +54224,11 @@ const get$7 = /* @__PURE__ */ dual(2, (self, key) => withFiber$1((fiber) => {
54411
54224
  return void_$4;
54412
54225
  });
54413
54226
  }));
54414
- const hasExpired = (entry, fiber) => {
54227
+ const hasExpired$1 = (entry, fiber) => {
54415
54228
  if (entry.expiresAt === void 0) return false;
54416
54229
  return fiber.getRef(ClockRef).currentTimeMillisUnsafe() >= entry.expiresAt;
54417
54230
  };
54418
- const checkCapacity = (self) => {
54231
+ const checkCapacity$1 = (self) => {
54419
54232
  let diff = size$2(self.map) - self.capacity;
54420
54233
  if (diff <= 0) return;
54421
54234
  for (const [key] of self.map) {
@@ -54530,7 +54343,7 @@ const set$5 = /* @__PURE__ */ dual(3, (self, key, value) => withFiber$1((fiber)
54530
54343
  deferred,
54531
54344
  expiresAt: isFinite$2(ttl) ? fiber.getRef(ClockRef).currentTimeMillisUnsafe() + toMillis(ttl) : void 0
54532
54345
  });
54533
- checkCapacity(self);
54346
+ checkCapacity$1(self);
54534
54347
  return void_$4;
54535
54348
  }));
54536
54349
  /**
@@ -54614,7 +54427,7 @@ const ignore = "~effect/ErrorReporter/ignore";
54614
54427
  /**
54615
54428
  * @since 2.0.0
54616
54429
  */
54617
- const TypeId$39 = "~effect/FiberHandle";
54430
+ const TypeId$40 = "~effect/FiberHandle";
54618
54431
  /**
54619
54432
  * @example
54620
54433
  * ```ts
@@ -54631,9 +54444,9 @@ const TypeId$39 = "~effect/FiberHandle";
54631
54444
  * @since 2.0.0
54632
54445
  * @category refinements
54633
54446
  */
54634
- const isFiberHandle = (u) => hasProperty(u, TypeId$39);
54635
- const Proto$18 = {
54636
- [TypeId$39]: TypeId$39,
54447
+ const isFiberHandle = (u) => hasProperty(u, TypeId$40);
54448
+ const Proto$19 = {
54449
+ [TypeId$40]: TypeId$40,
54637
54450
  ...PipeInspectableProto,
54638
54451
  toJSON() {
54639
54452
  return {
@@ -54643,7 +54456,7 @@ const Proto$18 = {
54643
54456
  }
54644
54457
  };
54645
54458
  const makeUnsafe$6 = () => {
54646
- const self = Object.create(Proto$18);
54459
+ const self = Object.create(Proto$19);
54647
54460
  self.state = {
54648
54461
  _tag: "Open",
54649
54462
  fiber: void 0
@@ -54679,7 +54492,7 @@ const makeUnsafe$6 = () => {
54679
54492
  * @since 2.0.0
54680
54493
  * @category constructors
54681
54494
  */
54682
- const make$56 = () => acquireRelease(sync(() => makeUnsafe$6()), (handle) => {
54495
+ const make$58 = () => acquireRelease(sync(() => makeUnsafe$6()), (handle) => {
54683
54496
  const state = handle.state;
54684
54497
  if (state._tag === "Closed") return void_$2;
54685
54498
  handle.state = { _tag: "Closed" };
@@ -54809,7 +54622,7 @@ const runImpl$2 = (self, effect, options) => withFiber((parent) => {
54809
54622
  /**
54810
54623
  * @since 2.0.0
54811
54624
  */
54812
- const TypeId$38 = "~effect/FiberMap";
54625
+ const TypeId$39 = "~effect/FiberMap";
54813
54626
  /**
54814
54627
  * @example
54815
54628
  * ```ts
@@ -54827,9 +54640,9 @@ const TypeId$38 = "~effect/FiberMap";
54827
54640
  * @since 2.0.0
54828
54641
  * @category refinements
54829
54642
  */
54830
- const isFiberMap = (u) => hasProperty(u, TypeId$38);
54831
- const Proto$17 = {
54832
- [TypeId$38]: TypeId$38,
54643
+ const isFiberMap = (u) => hasProperty(u, TypeId$39);
54644
+ const Proto$18 = {
54645
+ [TypeId$39]: TypeId$39,
54833
54646
  [Symbol.iterator]() {
54834
54647
  if (this.state._tag === "Closed") return empty$19();
54835
54648
  return this.state.backing[Symbol.iterator]();
@@ -54843,7 +54656,7 @@ const Proto$17 = {
54843
54656
  }
54844
54657
  };
54845
54658
  const makeUnsafe$5 = (backing, deferred) => {
54846
- const self = Object.create(Proto$17);
54659
+ const self = Object.create(Proto$18);
54847
54660
  self.state = {
54848
54661
  _tag: "Open",
54849
54662
  backing
@@ -54878,7 +54691,7 @@ const makeUnsafe$5 = (backing, deferred) => {
54878
54691
  * @since 2.0.0
54879
54692
  * @category constructors
54880
54693
  */
54881
- const make$55 = () => acquireRelease(sync(() => makeUnsafe$5(empty$11(), makeUnsafe$14())), (map) => suspend$3(() => {
54694
+ const make$57 = () => acquireRelease(sync(() => makeUnsafe$5(empty$11(), makeUnsafe$14())), (map) => suspend$3(() => {
54882
54695
  const state = map.state;
54883
54696
  if (state._tag === "Closed") return void_$2;
54884
54697
  map.state = { _tag: "Closed" };
@@ -54915,7 +54728,7 @@ const setUnsafe$1 = /* @__PURE__ */ dual((args) => isFiberMap(args[0]), (self, k
54915
54728
  fiber.interruptUnsafe(internalFiberId$1);
54916
54729
  return;
54917
54730
  }
54918
- const previous = get$13(self.state.backing, key);
54731
+ const previous = get$14(self.state.backing, key);
54919
54732
  if (previous._tag === "Some") {
54920
54733
  if (options?.onlyIfMissing === true) {
54921
54734
  fiber.interruptUnsafe(internalFiberId$1);
@@ -54926,7 +54739,7 @@ const setUnsafe$1 = /* @__PURE__ */ dual((args) => isFiberMap(args[0]), (self, k
54926
54739
  set$8(self.state.backing, key, fiber);
54927
54740
  fiber.addObserver((exit) => {
54928
54741
  if (self.state._tag === "Closed") return;
54929
- const current = get$13(self.state.backing, key);
54742
+ const current = get$14(self.state.backing, key);
54930
54743
  if (isSome(current) && fiber === current.value) remove$5(self.state.backing, key);
54931
54744
  if (isFailure$2(exit) && (options?.propagateInterruption === true ? !isInternalInterruption$1(exit.cause) : !hasInterruptsOnly(exit.cause))) doneUnsafe(self.deferred, exit);
54932
54745
  });
@@ -54982,7 +54795,7 @@ const hasUnsafe = /* @__PURE__ */ dual(2, (self, key) => self.state._tag === "Cl
54982
54795
  */
54983
54796
  const remove$2 = /* @__PURE__ */ dual(2, (self, key) => suspend$3(() => {
54984
54797
  if (self.state._tag === "Closed") return void_$2;
54985
- const fiber = get$13(self.state.backing, key);
54798
+ const fiber = get$14(self.state.backing, key);
54986
54799
  if (fiber._tag === "None") return void_$2;
54987
54800
  return interruptAs(fiber.value, internalFiberId$1);
54988
54801
  }));
@@ -55039,7 +54852,7 @@ const runImpl$1 = (self, key, effect, options) => withFiber((parent) => {
55039
54852
  /**
55040
54853
  * @since 2.0.0
55041
54854
  */
55042
- const TypeId$37 = "~effect/FiberSet";
54855
+ const TypeId$38 = "~effect/FiberSet";
55043
54856
  /**
55044
54857
  * Checks if a value is a FiberSet.
55045
54858
  *
@@ -55057,9 +54870,9 @@ const TypeId$37 = "~effect/FiberSet";
55057
54870
  * })
55058
54871
  * ```
55059
54872
  */
55060
- const isFiberSet = (u) => hasProperty(u, TypeId$37);
55061
- const Proto$16 = {
55062
- [TypeId$37]: TypeId$37,
54873
+ const isFiberSet = (u) => hasProperty(u, TypeId$38);
54874
+ const Proto$17 = {
54875
+ [TypeId$38]: TypeId$38,
55063
54876
  [Symbol.iterator]() {
55064
54877
  if (this.state._tag === "Closed") return empty$19();
55065
54878
  return this.state.backing[Symbol.iterator]();
@@ -55073,7 +54886,7 @@ const Proto$16 = {
55073
54886
  }
55074
54887
  };
55075
54888
  const makeUnsafe$4 = (backing, deferred) => {
55076
- const self = Object.create(Proto$16);
54889
+ const self = Object.create(Proto$17);
55077
54890
  self.state = {
55078
54891
  _tag: "Open",
55079
54892
  backing
@@ -55108,7 +54921,7 @@ const makeUnsafe$4 = (backing, deferred) => {
55108
54921
  * @since 2.0.0
55109
54922
  * @category constructors
55110
54923
  */
55111
- const make$54 = () => acquireRelease(sync(() => makeUnsafe$4(/* @__PURE__ */ new Set(), makeUnsafe$14())), (set) => suspend$3(() => {
54924
+ const make$56 = () => acquireRelease(sync(() => makeUnsafe$4(/* @__PURE__ */ new Set(), makeUnsafe$14())), (set) => suspend$3(() => {
55112
54925
  const state = set.state;
55113
54926
  if (state._tag === "Closed") return void_$2;
55114
54927
  set.state = { _tag: "Closed" };
@@ -55325,7 +55138,7 @@ const symbol$2 = "~effect/interfaces/PrimaryKey";
55325
55138
  const value$1 = (self) => self[symbol$2]();
55326
55139
  //#endregion
55327
55140
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/LayerMap.js
55328
- const TypeId$36 = "~effect/LayerMap";
55141
+ const TypeId$37 = "~effect/LayerMap";
55329
55142
  /**
55330
55143
  * @since 3.14.0
55331
55144
  * @category Constructors
@@ -55368,18 +55181,18 @@ const TypeId$36 = "~effect/LayerMap";
55368
55181
  * })
55369
55182
  * ```
55370
55183
  */
55371
- const make$53 = /* @__PURE__ */ fnUntraced(function* (lookup, options) {
55184
+ const make$55 = /* @__PURE__ */ fnUntraced(function* (lookup, options) {
55372
55185
  const services$14 = yield* services();
55373
55186
  const memoMap = CurrentMemoMap.getOrCreate(services$14);
55374
- const rcMap = yield* make$70({
55375
- lookup: (key) => servicesWith((_) => buildWithMemoMap(lookup(key), memoMap, get$15(_, Scope))),
55187
+ const rcMap = yield* make$72({
55188
+ lookup: (key) => servicesWith((_) => buildWithMemoMap(lookup(key), memoMap, get$16(_, Scope))),
55376
55189
  idleTimeToLive: options?.idleTimeToLive
55377
55190
  });
55378
55191
  return identity({
55379
- [TypeId$36]: TypeId$36,
55192
+ [TypeId$37]: TypeId$37,
55380
55193
  rcMap,
55381
- get: (key) => effectServices(get$12(rcMap, key)),
55382
- services: (key) => get$12(rcMap, key),
55194
+ get: (key) => effectServices(get$13(rcMap, key)),
55195
+ services: (key) => get$13(rcMap, key),
55383
55196
  invalidate: (key) => invalidate$4(rcMap, key)
55384
55197
  });
55385
55198
  });
@@ -55423,7 +55236,7 @@ const make$53 = /* @__PURE__ */ fnUntraced(function* (lookup, options) {
55423
55236
  * })
55424
55237
  * ```
55425
55238
  */
55426
- const fromRecord$1 = (layers, options) => make$53((key) => layers[key], {
55239
+ const fromRecord$1 = (layers, options) => make$55((key) => layers[key], {
55427
55240
  ...options,
55428
55241
  preloadKeys: options?.preload ? Object.keys(layers) : void 0
55429
55242
  });
@@ -55482,7 +55295,7 @@ const Service = () => (id, options) => {
55482
55295
  Object.defineProperty(TagClass, "stack", { get() {
55483
55296
  return creationError.stack;
55484
55297
  } });
55485
- TagClass_.layerNoDeps = effect$1(TagClass_)("lookup" in options ? make$53(options.lookup, options) : fromRecord$1(options.layers, options));
55298
+ TagClass_.layerNoDeps = effect$1(TagClass_)("lookup" in options ? make$55(options.lookup, options) : fromRecord$1(options.layers, options));
55486
55299
  TagClass_.layer = options.dependencies && options.dependencies.length > 0 ? provide$3(TagClass_.layerNoDeps, options.dependencies) : TagClass_.layerNoDeps;
55487
55300
  TagClass_.get = (key) => unwrap$3(map$9(TagClass_.asEffect(), (layerMap) => layerMap.get(key)));
55488
55301
  TagClass_.services = (key) => flatMap$4(TagClass_.asEffect(), (layerMap) => layerMap.services(key));
@@ -55747,7 +55560,7 @@ const RefProto = {
55747
55560
  */
55748
55561
  const makeUnsafe$3 = (value) => {
55749
55562
  const self = Object.create(RefProto);
55750
- self.ref = make$75(value);
55563
+ self.ref = make$77(value);
55751
55564
  return self;
55752
55565
  };
55753
55566
  //#endregion
@@ -55764,7 +55577,7 @@ var Reactivity = class extends Service$1()("effect/reactivity/Reactivity") {};
55764
55577
  * @since 4.0.0
55765
55578
  * @category constructors
55766
55579
  */
55767
- const make$51 = /* @__PURE__ */ sync(() => {
55580
+ const make$53 = /* @__PURE__ */ sync(() => {
55768
55581
  const handlers = /* @__PURE__ */ new Map();
55769
55582
  const invalidateUnsafe = (keys) => {
55770
55583
  keysToHashes(keys, (hash) => {
@@ -55803,8 +55616,8 @@ const make$51 = /* @__PURE__ */ sync(() => {
55803
55616
  };
55804
55617
  const query = (keys, effect) => gen(function* () {
55805
55618
  const services$13 = yield* services();
55806
- const scope = get$15(services$13, Scope);
55807
- const results = yield* make$73();
55619
+ const scope = get$16(services$13, Scope);
55620
+ const results = yield* make$75();
55808
55621
  const runFork = flow(runForkWith(services$13), runIn(scope));
55809
55622
  let running = false;
55810
55623
  let pending = false;
@@ -55864,7 +55677,7 @@ const invalidate = (keys) => Reactivity.use((r) => r.invalidate(keys));
55864
55677
  * @since 4.0.0
55865
55678
  * @category layers
55866
55679
  */
55867
- const layer$32 = /* @__PURE__ */ effect$1(Reactivity)(make$51);
55680
+ const layer$32 = /* @__PURE__ */ effect$1(Reactivity)(make$53);
55868
55681
  function stringOrHash(u) {
55869
55682
  switch (typeof u) {
55870
55683
  case "string":
@@ -55988,7 +55801,7 @@ const recordUpdateHelperSingle = (value, omit) => Object.assign(Object.create(Re
55988
55801
  * @category constructor
55989
55802
  * @since 4.0.0
55990
55803
  */
55991
- const make$50 = (acquirer, compiler, spanAttributes, transformRows) => {
55804
+ const make$52 = (acquirer, compiler, spanAttributes, transformRows) => {
55992
55805
  const cache = transformRows === void 0 ? constructorCache.noTransforms : constructorCache.transforms;
55993
55806
  if (cache.has(acquirer)) return cache.get(acquirer);
55994
55807
  const self = Object.assign(function sql(strings, ...args) {
@@ -56390,7 +56203,7 @@ const StatementProto = {
56390
56203
  const withStatement = (self, span, f) => withFiber((fiber) => {
56391
56204
  const transform = fiber.getRef(CurrentTransformer);
56392
56205
  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);
56206
+ return flatMap$4(transform(self, make$52(self.acquirer, self.compiler, self.spanAttributes, self.transformRows), fiber, span), f);
56394
56207
  });
56395
56208
  const isSegment = (u) => {
56396
56209
  if (!hasProperty(u, "_tag")) return false;
@@ -56449,7 +56262,7 @@ const neverFragment = /* @__PURE__ */ fragment([/* @__PURE__ */ literal$1("1=0")
56449
56262
  /**
56450
56263
  * @since 4.0.0
56451
56264
  */
56452
- const TypeId$35 = "~effect/sql/SqlClient";
56265
+ const TypeId$36 = "~effect/sql/SqlClient";
56453
56266
  /**
56454
56267
  * @category models
56455
56268
  * @since 4.0.0
@@ -56459,7 +56272,7 @@ const SqlClient = /* @__PURE__ */ Service$1("effect/sql/SqlClient");
56459
56272
  * @category constructors
56460
56273
  * @since 4.0.0
56461
56274
  */
56462
- const make$49 = /* @__PURE__ */ fnUntraced(function* (options) {
56275
+ const make$51 = /* @__PURE__ */ fnUntraced(function* (options) {
56463
56276
  const getConnection = flatMap$4(serviceOption(TransactionConnection), match$10({
56464
56277
  onNone: () => options.acquirer,
56465
56278
  onSome: ([conn]) => succeed$3(conn)
@@ -56473,7 +56286,7 @@ const make$49 = /* @__PURE__ */ fnUntraced(function* (options) {
56473
56286
  const withTransaction = makeWithTransaction({
56474
56287
  transactionService: TransactionConnection,
56475
56288
  spanAttributes: options.spanAttributes,
56476
- acquireConnection: flatMap$4(make$84(), (scope) => map$9(provide$4(transactionAcquirer, scope), (conn) => [scope, conn])),
56289
+ acquireConnection: flatMap$4(make$86(), (scope) => map$9(provide$4(transactionAcquirer, scope), (conn) => [scope, conn])),
56477
56290
  begin: (conn) => conn.executeUnprepared(beginTransaction, [], void 0),
56478
56291
  savepoint: (conn, id) => conn.executeUnprepared(savepoint(`effect_sql_${id}`), [], void 0),
56479
56292
  commit: (conn) => conn.executeUnprepared(commit, [], void 0),
@@ -56481,14 +56294,14 @@ const make$49 = /* @__PURE__ */ fnUntraced(function* (options) {
56481
56294
  rollbackSavepoint: (conn, id) => conn.executeUnprepared(rollbackSavepoint(`effect_sql_${id}`), [], void 0)
56482
56295
  });
56483
56296
  const reactivity = yield* Reactivity;
56484
- const client = Object.assign(make$50(getConnection, options.compiler, options.spanAttributes, options.transformRows), {
56485
- [TypeId$35]: TypeId$35,
56297
+ const client = Object.assign(make$52(getConnection, options.compiler, options.spanAttributes, options.transformRows), {
56298
+ [TypeId$36]: TypeId$36,
56486
56299
  safe: void 0,
56487
56300
  withTransaction,
56488
56301
  reserve: transactionAcquirer,
56489
56302
  withoutTransforms() {
56490
56303
  if (options.transformRows === void 0) return this;
56491
- const statement = make$50(getConnection, options.compiler.withoutTransform, options.spanAttributes, void 0);
56304
+ const statement = make$52(getConnection, options.compiler.withoutTransform, options.spanAttributes, void 0);
56492
56305
  const client = Object.assign(statement, {
56493
56306
  ...this,
56494
56307
  ...statement
@@ -56543,7 +56356,7 @@ const SafeIntegers = /* @__PURE__ */ Reference("effect/sql/SqlClient/SafeInteger
56543
56356
  /**
56544
56357
  * @since 4.0.0
56545
56358
  */
56546
- const TypeId$34 = "~effect/persistence/KeyValueStore";
56359
+ const TypeId$35 = "~effect/persistence/KeyValueStore";
56547
56360
  const ErrorTypeId$1 = "~effect/persistence/KeyValueStore/KeyValueStoreError";
56548
56361
  /**
56549
56362
  * @since 4.0.0
@@ -56564,8 +56377,8 @@ const KeyValueStore = /* @__PURE__ */ Service$1("effect/persistence/KeyValueStor
56564
56377
  * @since 4.0.0
56565
56378
  * @category constructors
56566
56379
  */
56567
- const make$48 = (options) => KeyValueStore.of({
56568
- [TypeId$34]: TypeId$34,
56380
+ const make$50 = (options) => KeyValueStore.of({
56381
+ [TypeId$35]: TypeId$35,
56569
56382
  has: (key) => map$9(options.get(key), isNotUndefined),
56570
56383
  isEmpty: map$9(options.size, (size) => size === 0),
56571
56384
  modify: (key, f) => flatMap$4(options.get(key), (o) => {
@@ -56603,7 +56416,7 @@ const layerFileSystem = (directory) => effect$1(KeyValueStore)(gen(function* ()
56603
56416
  const path = yield* Path$1;
56604
56417
  const keyPath = (key) => path.join(directory, encodeURIComponent(key));
56605
56418
  if (!(yield* fs.exists(directory))) yield* fs.makeDirectory(directory, { recursive: true });
56606
- return make$48({
56419
+ return make$50({
56607
56420
  get: (key) => catchTag$1(fs.readFileString(keyPath(key)), "PlatformError", (cause) => cause.reason._tag === "NotFound" ? undefined_$1 : fail$6(new KeyValueStoreError({
56608
56421
  method: "get",
56609
56422
  key,
@@ -56912,9 +56725,9 @@ const layerKvs$1 = /* @__PURE__ */ layer$31.pipe(/* @__PURE__ */ provide$3(layer
56912
56725
  const unsafeTtlToExpires = (clock, ttl) => ttl ? clock.currentTimeMillisUnsafe() + toMillis(ttl) : null;
56913
56726
  //#endregion
56914
56727
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/RequestResolver.js
56915
- const TypeId$33 = "~effect/RequestResolver";
56728
+ const TypeId$34 = "~effect/RequestResolver";
56916
56729
  const RequestResolverProto = {
56917
- [TypeId$33]: {
56730
+ [TypeId$34]: {
56918
56731
  _A: identity,
56919
56732
  _R: identity
56920
56733
  },
@@ -56928,7 +56741,7 @@ const RequestResolverProto = {
56928
56741
  * @since 2.0.0
56929
56742
  * @category guards
56930
56743
  */
56931
- const isRequestResolver = (u) => hasProperty(u, TypeId$33);
56744
+ const isRequestResolver = (u) => hasProperty(u, TypeId$34);
56932
56745
  /**
56933
56746
  * Low-level constructor for creating a request resolver with fine-grained
56934
56747
  * control over its behavior.
@@ -56936,7 +56749,7 @@ const isRequestResolver = (u) => hasProperty(u, TypeId$33);
56936
56749
  * @since 4.0.0
56937
56750
  * @category constructors
56938
56751
  */
56939
- const makeWith$2 = (options) => {
56752
+ const makeWith$3 = (options) => {
56940
56753
  const self = Object.create(RequestResolverProto);
56941
56754
  self.batchKey = options.batchKey;
56942
56755
  self.preCheck = options.preCheck;
@@ -56978,7 +56791,7 @@ const defaultKey = (_request) => defaultKeyObject;
56978
56791
  * @since 2.0.0
56979
56792
  * @category constructors
56980
56793
  */
56981
- const make$47 = (runAll) => makeWith$2({
56794
+ const make$49 = (runAll) => makeWith$3({
56982
56795
  batchKey: defaultKey,
56983
56796
  delay: yieldNow,
56984
56797
  collectWhile: constTrue,
@@ -57018,7 +56831,7 @@ const make$47 = (runAll) => makeWith$2({
57018
56831
  * @since 4.0.0
57019
56832
  * @category constructors
57020
56833
  */
57021
- const makeGrouped = (options) => makeWith$2({
56834
+ const makeGrouped = (options) => makeWith$3({
57022
56835
  batchKey: hashGroupKey(options.key),
57023
56836
  delay: yieldNow,
57024
56837
  collectWhile: constTrue,
@@ -57028,7 +56841,7 @@ const hashGroupKey = (get) => {
57028
56841
  const groupKeys = empty$11();
57029
56842
  return (entry) => {
57030
56843
  const key = get(entry);
57031
- const okey = get$13(groupKeys, key);
56844
+ const okey = get$14(groupKeys, key);
57032
56845
  if (okey._tag === "Some") return okey.value;
57033
56846
  set$8(groupKeys, key, key);
57034
56847
  return key;
@@ -57064,7 +56877,7 @@ const hashGroupKey = (get) => {
57064
56877
  * @since 4.0.0
57065
56878
  * @category delay
57066
56879
  */
57067
- const setDelay = /* @__PURE__ */ dual(2, (self, duration) => makeWith$2({
56880
+ const setDelay = /* @__PURE__ */ dual(2, (self, duration) => makeWith$3({
57068
56881
  ...self,
57069
56882
  delay: sleep(duration)
57070
56883
  }));
@@ -57103,7 +56916,7 @@ const setDelay = /* @__PURE__ */ dual(2, (self, duration) => makeWith$2({
57103
56916
  * @since 2.0.0
57104
56917
  * @category combinators
57105
56918
  */
57106
- const batchN = /* @__PURE__ */ dual(2, (self, n) => makeWith$2({
56919
+ const batchN = /* @__PURE__ */ dual(2, (self, n) => makeWith$3({
57107
56920
  ...self,
57108
56921
  collectWhile: (requests) => requests.size < n
57109
56922
  }));
@@ -57148,7 +56961,7 @@ const batchN = /* @__PURE__ */ dual(2, (self, n) => makeWith$2({
57148
56961
  * @since 4.0.0
57149
56962
  * @category combinators
57150
56963
  */
57151
- const withSpan = /* @__PURE__ */ dual((args) => isRequestResolver(args[0]), (self, name, options) => makeWith$2({
56964
+ const withSpan = /* @__PURE__ */ dual((args) => isRequestResolver(args[0]), (self, name, options) => makeWith$3({
57152
56965
  ...self,
57153
56966
  runAll: (entries, key) => suspend$3(() => {
57154
56967
  const opts = typeof options === "function" ? options(entries) : options;
@@ -57175,10 +56988,10 @@ const withSpan = /* @__PURE__ */ dual((args) => isRequestResolver(args[0]), (sel
57175
56988
  }));
57176
56989
  //#endregion
57177
56990
  //#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 = {
56991
+ const TypeId$33 = "~effect/SynchronizedRef";
56992
+ const Proto$16 = {
57180
56993
  ...PipeInspectableProto,
57181
- [TypeId$32]: TypeId$32,
56994
+ [TypeId$33]: TypeId$33,
57182
56995
  toJSON() {
57183
56996
  return {
57184
56997
  _id: "SynchronizedRef",
@@ -57191,7 +57004,7 @@ const Proto$15 = {
57191
57004
  * @category constructors
57192
57005
  */
57193
57006
  const makeUnsafe$1 = (value) => {
57194
- const self = Object.create(Proto$15);
57007
+ const self = Object.create(Proto$16);
57195
57008
  self.semaphore = makeUnsafe$9(1);
57196
57009
  self.backing = makeUnsafe$3(value);
57197
57010
  return self;
@@ -57201,10 +57014,10 @@ const makeUnsafe$1 = (value) => {
57201
57014
  /**
57202
57015
  * @since 2.0.0
57203
57016
  */
57204
- const TypeId$31 = "~effect/ScopedRef";
57205
- const Proto$14 = {
57017
+ const TypeId$32 = "~effect/ScopedRef";
57018
+ const Proto$15 = {
57206
57019
  ...PipeInspectableProto,
57207
- [TypeId$31]: TypeId$31,
57020
+ [TypeId$32]: TypeId$32,
57208
57021
  toJSON() {
57209
57022
  return {
57210
57023
  _id: "ScopedRef",
@@ -57213,7 +57026,7 @@ const Proto$14 = {
57213
57026
  }
57214
57027
  };
57215
57028
  const makeUnsafe = (scope, value) => {
57216
- const self = Object.create(Proto$14);
57029
+ const self = Object.create(Proto$15);
57217
57030
  self.backing = makeUnsafe$1([scope, value]);
57218
57031
  return self;
57219
57032
  };
@@ -57243,7 +57056,7 @@ const getUnsafe = (self) => self.backing.backing.ref.current[1];
57243
57056
  * @since 2.0.0
57244
57057
  * @category getters
57245
57058
  */
57246
- const get$6 = (self) => sync(() => getUnsafe(self));
57059
+ const get$7 = (self) => sync(() => getUnsafe(self));
57247
57060
  /**
57248
57061
  * Sets the value of this reference to the specified resourcefully-created
57249
57062
  * value. Any resources associated with the old value will be released.
@@ -57262,6 +57075,103 @@ const set$4 = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced(function* (self
57262
57075
  self.backing.backing.ref.current = [scope, value];
57263
57076
  }, uninterruptible, (effect, self) => self.backing.semaphore.withPermit(effect)));
57264
57077
  //#endregion
57078
+ //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/ScopedCache.js
57079
+ /**
57080
+ * @since 4.0.0
57081
+ */
57082
+ const TypeId$31 = "~effect/ScopedCache";
57083
+ /**
57084
+ * @since 4.0.0
57085
+ * @category Constructors
57086
+ */
57087
+ const makeWith$2 = (options) => servicesWith$1((services) => {
57088
+ const scope = get$16(services, Scope);
57089
+ const self = Object.create(Proto$14);
57090
+ self.lookup = (key) => updateServices$1(options.lookup(key), (input) => merge$7(services, input));
57091
+ const map = empty$11();
57092
+ self.state = {
57093
+ _tag: "Open",
57094
+ map
57095
+ };
57096
+ self.capacity = options.capacity;
57097
+ self.timeToLive = options.timeToLive ? (exit, key) => fromInputUnsafe(options.timeToLive(exit, key)) : defaultTimeToLive;
57098
+ return as$2(addFinalizer$1(scope, withFiber$1((fiber) => {
57099
+ self.state = { _tag: "Closed" };
57100
+ return invalidateAllImpl(fiber, map);
57101
+ })), self);
57102
+ });
57103
+ /**
57104
+ * @since 4.0.0
57105
+ * @category Constructors
57106
+ */
57107
+ const make$48 = (options) => makeWith$2({
57108
+ ...options,
57109
+ timeToLive: options.timeToLive ? () => options.timeToLive : defaultTimeToLive
57110
+ });
57111
+ const Proto$14 = {
57112
+ ...PipeInspectableProto,
57113
+ [TypeId$31]: TypeId$31,
57114
+ toJSON() {
57115
+ return {
57116
+ _id: "ScopedCache",
57117
+ capacity: this.capacity,
57118
+ state: this.state
57119
+ };
57120
+ }
57121
+ };
57122
+ const defaultTimeToLive = (_, _key) => infinity;
57123
+ /**
57124
+ * @since 4.0.0
57125
+ * @category Combinators
57126
+ */
57127
+ const get$6 = /* @__PURE__ */ dual(2, (self, key) => uninterruptibleMask$1((restore) => withFiber$1((fiber) => {
57128
+ const state = self.state;
57129
+ if (state._tag === "Closed") return interrupt$4;
57130
+ const oentry = get$14(state.map, key);
57131
+ if (isSome(oentry) && !hasExpired(oentry.value, fiber)) {
57132
+ remove$5(state.map, key);
57133
+ set$8(state.map, key, oentry.value);
57134
+ return restore(_await(oentry.value.deferred));
57135
+ }
57136
+ const scope = makeUnsafe$13();
57137
+ const deferred = makeUnsafe$14();
57138
+ const entry = {
57139
+ expiresAt: void 0,
57140
+ deferred,
57141
+ scope
57142
+ };
57143
+ set$8(state.map, key, entry);
57144
+ 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) => {
57145
+ doneUnsafe(deferred, exit);
57146
+ const ttl = self.timeToLive(exit, key);
57147
+ if (isFinite$2(ttl)) entry.expiresAt = fiber.getRef(ClockRef).currentTimeMillisUnsafe() + toMillis(ttl);
57148
+ return void_$4;
57149
+ }));
57150
+ })));
57151
+ const hasExpired = (entry, fiber) => {
57152
+ if (entry.expiresAt === void 0) return false;
57153
+ return fiber.getRef(ClockRef).currentTimeMillisUnsafe() >= entry.expiresAt;
57154
+ };
57155
+ const checkCapacity = (parent, map, capacity) => {
57156
+ if (!Number.isFinite(capacity)) return void_$4;
57157
+ let diff = size$2(map) - capacity;
57158
+ if (diff <= 0) return void_$4;
57159
+ const fibers = empty$17();
57160
+ for (const [key, entry] of map) {
57161
+ remove$5(map, key);
57162
+ fibers.push(forkUnsafe$1(parent, close(entry.scope, exitVoid), true));
57163
+ diff--;
57164
+ if (diff === 0) break;
57165
+ }
57166
+ return fiberAwaitAll(fibers);
57167
+ };
57168
+ const invalidateAllImpl = (parent, map) => {
57169
+ const fibers = empty$17();
57170
+ for (const [, entry] of map) fibers.push(forkUnsafe$1(parent, close(entry.scope, exitVoid), true, true));
57171
+ clear$1(map);
57172
+ return fiberAwaitAll(fibers);
57173
+ };
57174
+ //#endregion
57265
57175
  //#region node_modules/.pnpm/effect@4.0.0-beta.36/node_modules/effect/dist/SubscriptionRef.js
57266
57176
  /**
57267
57177
  * @since 2.0.0
@@ -57272,7 +57182,30 @@ const TypeId$30 = "~effect/SubscriptionRef";
57272
57182
  * @category guards
57273
57183
  */
57274
57184
  const isSubscriptionRef = (u) => hasProperty(u, TypeId$30);
57275
- ({ ...PipeInspectableProto });
57185
+ const Proto$13 = {
57186
+ ...PipeInspectableProto,
57187
+ [TypeId$30]: { _A: identity },
57188
+ toJSON() {
57189
+ return {
57190
+ _id: "SubscriptionRef",
57191
+ value: this.value
57192
+ };
57193
+ }
57194
+ };
57195
+ /**
57196
+ * Constructs a new `SubscriptionRef` from an initial value.
57197
+ *
57198
+ * @since 2.0.0
57199
+ * @category constructors
57200
+ */
57201
+ const make$47 = (value) => map$9(unbounded$1({ replay: 1 }), (pubsub) => {
57202
+ const self = Object.create(Proto$13);
57203
+ self.semaphore = makeUnsafe$9(1);
57204
+ self.value = value;
57205
+ self.pubsub = pubsub;
57206
+ publishUnsafe(self.pubsub, value);
57207
+ return self;
57208
+ });
57276
57209
  /**
57277
57210
  * Creates a stream that emits the current value and all subsequent changes to
57278
57211
  * the `SubscriptionRef`.
@@ -59303,7 +59236,7 @@ const readableToPullUnsafe = (options) => {
59303
59236
  const readable = options.readable;
59304
59237
  if (readable.readableEnded) return succeed$3(done());
59305
59238
  const closeOnDone = options.closeOnDone ?? true;
59306
- const exit = options.exit ?? make$75(void 0);
59239
+ const exit = options.exit ?? make$77(void 0);
59307
59240
  const latch = makeUnsafe$10(false);
59308
59241
  function onReadable() {
59309
59242
  latch.openUnsafe();
@@ -59986,7 +59919,7 @@ const Proto$10 = /* @__PURE__ */ Object.create(null);
59986
59919
  Object.defineProperties(Proto$10, {
59987
59920
  [TypeId$27]: { value: TypeId$27 },
59988
59921
  [symbolRedactable]: { value(context) {
59989
- return redact(this, get$15(context, CurrentRedactedNames));
59922
+ return redact(this, get$16(context, CurrentRedactedNames));
59990
59923
  } },
59991
59924
  toJSON: { value() {
59992
59925
  return redact$3(this);
@@ -60076,8 +60009,8 @@ const redact = /* @__PURE__ */ dual(2, (self, key) => {
60076
60009
  const modify = (key) => {
60077
60010
  if (typeof key === "string") {
60078
60011
  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]);
60012
+ if (k in self) out[k] = make$83(self[k]);
60013
+ } else for (const name in self) if (key.test(name)) out[name] = make$83(self[name]);
60081
60014
  };
60082
60015
  if (Array.isArray(key)) for (let i = 0; i < key.length; i++) modify(key[i]);
60083
60016
  else modify(key);
@@ -60298,7 +60231,7 @@ const fromInputNested = (input) => {
60298
60231
  * @since 4.0.0
60299
60232
  * @category Equivalence
60300
60233
  */
60301
- const Equivalence = /* @__PURE__ */ make$90((a, b) => arrayEquivalence(a.params, b.params));
60234
+ const Equivalence = /* @__PURE__ */ make$92((a, b) => arrayEquivalence(a.params, b.params));
60302
60235
  const arrayEquivalence = /* @__PURE__ */ makeEquivalence$3(/* @__PURE__ */ makeEquivalence$5([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ strictEqual()]));
60303
60236
  /**
60304
60237
  * @since 4.0.0
@@ -61176,7 +61109,7 @@ const retryTransient = /* @__PURE__ */ dual(2, (self, options) => {
61176
61109
  schedule: passthroughSchedule,
61177
61110
  times,
61178
61111
  while: isTransientResponse
61179
- }), retryOn === "response-only" ? identity : retry$3({
61112
+ }), retryOn === "response-only" ? identity : retry$1({
61180
61113
  while: isOnlySchedule || options.while === void 0 ? isTransientError : or$1(isTransientError, options.while),
61181
61114
  schedule,
61182
61115
  times
@@ -62402,7 +62335,7 @@ const fromWebSocket = (acquire, options) => withFiber((fiber) => {
62402
62335
  const acquireContext = fiber.services;
62403
62336
  const closeCodeIsError = options?.closeCodeIsError ?? defaultCloseCodeIsError;
62404
62337
  const runRaw = (handler, opts) => scopedWith(fnUntraced(function* (scope) {
62405
- const fiberSet = yield* make$54().pipe(provide$4(scope));
62338
+ const fiberSet = yield* make$56().pipe(provide$4(scope));
62406
62339
  const ws = yield* provide$4(acquire, scope);
62407
62340
  const run = yield* provideService$2(runtime$1(fiberSet)(), WebSocket$1, ws);
62408
62341
  let open = false;
@@ -63408,7 +63341,7 @@ var MultipartError = class MultipartError extends TaggedError("MultipartError")
63408
63341
  * @category Config
63409
63342
  */
63410
63343
  const makeConfig = (headers) => withFiber((fiber) => {
63411
- const mimeTypes = get$15(fiber.services, FieldMimeTypes);
63344
+ const mimeTypes = get$16(fiber.services, FieldMimeTypes);
63412
63345
  return succeed$3({
63413
63346
  headers,
63414
63347
  maxParts: fiber.getRef(MaxParts),
@@ -64124,7 +64057,7 @@ var MiddlewareImpl = class MiddlewareImpl {
64124
64057
  const stack = [context.mapUnsafe.get(fnContextKey)];
64125
64058
  if (this.dependencies) {
64126
64059
  const memoMap = yield* CurrentMemoMap;
64127
- const scope = get$15(context, Scope);
64060
+ const scope = get$16(context, Scope);
64128
64061
  const depsContext = yield* buildWithMemoMap(this.dependencies, memoMap, scope);
64129
64062
  stack.push(...getMiddleware(depsContext));
64130
64063
  }
@@ -64231,7 +64164,7 @@ const schema = /* @__PURE__ */ declare(isStream);
64231
64164
  * @category Stream
64232
64165
  */
64233
64166
  function Stream(success, error) {
64234
- return make$62(schema.ast, {
64167
+ return make$64(schema.ast, {
64235
64168
  [StreamSchemaTypeId]: StreamSchemaTypeId,
64236
64169
  success,
64237
64170
  error
@@ -64429,7 +64362,7 @@ const makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options
64429
64362
  const disableTracing = options?.disableTracing ?? false;
64430
64363
  const generateRequestId = options?.generateRequestId ?? (() => requestIdCounter++);
64431
64364
  const services$12 = yield* services();
64432
- const scope = get$15(services$12, Scope);
64365
+ const scope = get$16(services$12, Scope);
64433
64366
  const entries = /* @__PURE__ */ new Map();
64434
64367
  let isShutdown = false;
64435
64368
  yield* addFinalizer$1(scope, withFiber((parent) => {
@@ -64850,7 +64783,7 @@ const RpcGroupProto = {
64850
64783
  });
64851
64784
  },
64852
64785
  annotateRpcs(service, value) {
64853
- return this.annotateRpcsMerge(make$87(service, value));
64786
+ return this.annotateRpcsMerge(make$89(service, value));
64854
64787
  },
64855
64788
  annotateMerge(context) {
64856
64789
  return makeProto$1({
@@ -64977,7 +64910,7 @@ const make$25 = ({ dumpSchema = () => void_$2 }) => ({ loader, schemaDirectory,
64977
64910
  if (schemaDirectory && completed.length > 0) yield* dumpSchema(`${schemaDirectory}/_schema.sql`, table).pipe(catchCause$1((cause) => logInfo("Could not dump schema", cause)));
64978
64911
  return completed;
64979
64912
  });
64980
- const migrationOrder = /* @__PURE__ */ make$89(([a], [b]) => Number$5(a, b));
64913
+ const migrationOrder = /* @__PURE__ */ make$91(([a], [b]) => Number$5(a, b));
64981
64914
  /**
64982
64915
  * @since 4.0.0
64983
64916
  * @category loaders
@@ -68798,7 +68731,7 @@ const writeFile$1 = (path, data, options) => callback$1((resume, signal) => {
68798
68731
  resume(fail$6(handleBadArgument("writeFile")(err)));
68799
68732
  }
68800
68733
  });
68801
- const makeFileSystem = /* @__PURE__ */ map$9(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make$67({
68734
+ const makeFileSystem = /* @__PURE__ */ map$9(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make$69({
68802
68735
  access,
68803
68736
  chmod,
68804
68737
  chown,
@@ -90778,7 +90711,7 @@ const toFileUrl = (path) => try_({
90778
90711
  * @category layer
90779
90712
  */
90780
90713
  const layer$21 = /* @__PURE__ */ succeed$4(Path$1)({
90781
- [TypeId$50]: TypeId$50,
90714
+ [TypeId$51]: TypeId$51,
90782
90715
  ...Path,
90783
90716
  fromFileUrl,
90784
90717
  toFileUrl
@@ -90792,7 +90725,7 @@ const layer$21 = /* @__PURE__ */ succeed$4(Path$1)({
90792
90725
  * @since 1.0.0
90793
90726
  * @category layer
90794
90727
  */
90795
- const layer$19 = /* @__PURE__ */ succeed$4(Stdio, /* @__PURE__ */ make$59({
90728
+ const layer$19 = /* @__PURE__ */ succeed$4(Stdio, /* @__PURE__ */ make$61({
90796
90729
  args: /* @__PURE__ */ sync(() => process.argv.slice(2)),
90797
90730
  stdout: (options) => fromWritable({
90798
90731
  evaluate: () => process.stdout,
@@ -90832,7 +90765,7 @@ const layer$19 = /* @__PURE__ */ succeed$4(Stdio, /* @__PURE__ */ make$59({
90832
90765
  const layer$18 = /* @__PURE__ */ effect$1(Terminal, /* @__PURE__ */ (/* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
90833
90766
  const stdin = process.stdin;
90834
90767
  const stdout = process.stdout;
90835
- const rlRef = yield* make$68({ acquire: acquireRelease(sync(() => {
90768
+ const rlRef = yield* make$70({ acquire: acquireRelease(sync(() => {
90836
90769
  const rl = readline.createInterface({
90837
90770
  input: stdin,
90838
90771
  escapeCodeTimeout: 50
@@ -90846,8 +90779,8 @@ const layer$18 = /* @__PURE__ */ effect$1(Terminal, /* @__PURE__ */ (/* @__PURE_
90846
90779
  })) });
90847
90780
  const columns = sync(() => stdout.columns ?? 0);
90848
90781
  const readInput = gen(function* () {
90849
- yield* get$10(rlRef);
90850
- const queue = yield* make$73();
90782
+ yield* get$11(rlRef);
90783
+ const queue = yield* make$75();
90851
90784
  const handleKeypress = (s, k) => {
90852
90785
  const userInput = {
90853
90786
  input: fromUndefinedOr(s),
@@ -90865,7 +90798,7 @@ const layer$18 = /* @__PURE__ */ effect$1(Terminal, /* @__PURE__ */ (/* @__PURE_
90865
90798
  stdin.on("keypress", handleKeypress);
90866
90799
  return queue;
90867
90800
  });
90868
- const readLine = scoped$1(flatMap$4(get$10(rlRef), (readlineInterface) => callback$1((resume) => {
90801
+ const readLine = scoped$1(flatMap$4(get$11(rlRef), (readlineInterface) => callback$1((resume) => {
90869
90802
  const onLine = (line) => resume(succeed$3(line));
90870
90803
  readlineInterface.once("line", onLine);
90871
90804
  return sync(() => readlineInterface.off("line", onLine));
@@ -90878,7 +90811,7 @@ const layer$18 = /* @__PURE__ */ effect$1(Terminal, /* @__PURE__ */ (/* @__PURE_
90878
90811
  cause: err
90879
90812
  }))));
90880
90813
  }));
90881
- return make$60({
90814
+ return make$62({
90882
90815
  columns,
90883
90816
  readInput,
90884
90817
  readLine,
@@ -91259,7 +91192,7 @@ const make$19 = /* @__PURE__ */ fnUntraced(function* (options) {
91259
91192
  storeId: options.storeId,
91260
91193
  timeToLive: options.timeToLive
91261
91194
  });
91262
- const inMemory = yield* makeWith$3({
91195
+ const inMemory = yield* makeWith$4({
91263
91196
  lookup: fnUntraced(function* (key) {
91264
91197
  const exit$2 = yield* store.get(key);
91265
91198
  if (exit$2) return yield* exit$2;
@@ -91274,7 +91207,7 @@ const make$19 = /* @__PURE__ */ fnUntraced(function* (options) {
91274
91207
  return identity({
91275
91208
  [TypeId$12]: TypeId$12,
91276
91209
  inMemory,
91277
- get: (key) => get$7(inMemory, key),
91210
+ get: (key) => get$8(inMemory, key),
91278
91211
  invalidate: (key) => flatMap$4(store.remove(key), () => invalidate$1(inMemory, key))
91279
91212
  });
91280
91213
  });
@@ -91803,11 +91736,6 @@ const toExit = (self) => {
91803
91736
  const TypeId$10 = "~effect/reactivity/AtomRegistry";
91804
91737
  /**
91805
91738
  * @since 4.0.0
91806
- * @category guards
91807
- */
91808
- const isAtomRegistry = (u) => hasProperty(u, TypeId$10);
91809
- /**
91810
- * @since 4.0.0
91811
91739
  * @category constructors
91812
91740
  */
91813
91741
  const make$18 = (options) => new RegistryImpl(options?.initialValues, options?.scheduleTask, options?.timeoutResolution, options?.defaultIdleTTL);
@@ -91838,36 +91766,6 @@ const layer$14 = /* @__PURE__ */ layerOptions();
91838
91766
  * @since 4.0.0
91839
91767
  * @category Conversions
91840
91768
  */
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
91769
  const mount$1 = /* @__PURE__ */ dual(2, (self, atom) => acquireRelease(sync(() => self.mount(atom)), (release) => sync(release)));
91872
91770
  const constImmediate = { immediate: true };
91873
91771
  const notifyListener = (listener) => {
@@ -92645,7 +92543,7 @@ const context = (options) => {
92645
92543
  factory.addGlobalLayer = (layer) => {
92646
92544
  globalLayer = provideMerge(globalLayer, provide$3(layer, layer$32));
92647
92545
  };
92648
- const reactivityAtom = removeTtl(make$17(servicesWith((services) => buildWithMemoMap(layer$32, options.memoMap, get$15(services, Scope))).pipe(map$9(get$15(Reactivity)))));
92546
+ const reactivityAtom = removeTtl(make$17(servicesWith((services) => buildWithMemoMap(layer$32, options.memoMap, get$16(services, Scope))).pipe(map$9(get$16(Reactivity)))));
92649
92547
  factory.withReactivity = (keys) => (atom) => transform$1(atom, (get) => {
92650
92548
  const reactivity = getOrThrow(get(reactivityAtom));
92651
92549
  get.addFinalizer(reactivity.registerUnsafe(keys, () => {
@@ -92812,7 +92710,7 @@ const makeStreamPull = (pullSignal, pullAtom) => writable(pullAtom.read, functio
92812
92710
  const family = typeof WeakRef === "undefined" || typeof FinalizationRegistry === "undefined" ? (f) => {
92813
92711
  const atoms = empty$11();
92814
92712
  return function(arg) {
92815
- const atomEntry = get$13(atoms, arg);
92713
+ const atomEntry = get$14(atoms, arg);
92816
92714
  if (atomEntry._tag === "Some") return atomEntry.value;
92817
92715
  const newAtom = f(arg);
92818
92716
  set$8(atoms, arg, newAtom);
@@ -92824,7 +92722,7 @@ const family = typeof WeakRef === "undefined" || typeof FinalizationRegistry ===
92824
92722
  remove$5(atoms, arg);
92825
92723
  });
92826
92724
  return function(arg) {
92827
- const atomEntry = get$13(atoms, arg).pipe(flatMapNullishOr$1((ref) => ref.deref()));
92725
+ const atomEntry = get$14(atoms, arg).pipe(flatMapNullishOr$1((ref) => ref.deref()));
92828
92726
  if (atomEntry._tag === "Some") return atomEntry.value;
92829
92727
  const newAtom = f(arg);
92830
92728
  set$8(atoms, arg, new WeakRef(newAtom));
@@ -92861,21 +92759,6 @@ const getInitialValueTarget = (atom) => {
92861
92759
  return target;
92862
92760
  };
92863
92761
  /**
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
92762
  * @since 4.0.0
92880
92763
  * @category batching
92881
92764
  */
@@ -92889,11 +92772,6 @@ const get$3 = (self) => AtomRegistry.use((r) => succeed$3(r.get(self)));
92889
92772
  * @since 4.0.0
92890
92773
  * @category Conversions
92891
92774
  */
92892
- const getResult$1 = (self, options) => AtomRegistry.use(getResult$2(self, options));
92893
- /**
92894
- * @since 4.0.0
92895
- * @category Conversions
92896
- */
92897
92775
  const mount = (self) => AtomRegistry.use((r) => mount$1(r, self));
92898
92776
  //#endregion
92899
92777
  //#region src/Settings.ts
@@ -92902,20 +92780,20 @@ var Settings = class Settings extends Service$1()("lalph/Settings", { make: gen(
92902
92780
  const projectKvs = yield* ProjectsKvs;
92903
92781
  const reactivity = yield* Reactivity;
92904
92782
  const store = prefix$1(kvs, "settings.");
92905
- const cache = yield* make$57({
92783
+ const cache = yield* make$59({
92906
92784
  lookup(setting) {
92907
92785
  return orDie$2(toSchemaStore(store, setting.schema).get(setting.name));
92908
92786
  },
92909
92787
  capacity: Number.MAX_SAFE_INTEGER
92910
92788
  });
92911
- const projectCache = yield* make$57({
92789
+ const projectCache = yield* make$59({
92912
92790
  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));
92791
+ return yield* orDie$2(toSchemaStore(get$16(yield* projectKvs.services(options.projectId), KeyValueStore), options.setting.schema).get(options.setting.name));
92914
92792
  }, scoped$1),
92915
92793
  capacity: Number.MAX_SAFE_INTEGER,
92916
92794
  requireServicesAt: "lookup"
92917
92795
  });
92918
- const get = (setting) => get$7(cache, setting);
92796
+ const get = (setting) => get$8(cache, setting);
92919
92797
  const set = (setting, value) => {
92920
92798
  const s = toSchemaStore(store, setting.schema);
92921
92799
  const setCache = set$5(cache, setting, value);
@@ -92925,7 +92803,7 @@ var Settings = class Settings extends Service$1()("lalph/Settings", { make: gen(
92925
92803
  });
92926
92804
  return reactivity.mutation([`settings:${setting.name}`], andThen(update, setCache));
92927
92805
  };
92928
- const getProject = (setting) => CurrentProjectId.use((projectId) => get$7(projectCache, {
92806
+ const getProject = (setting) => CurrentProjectId.use((projectId) => get$8(projectCache, {
92929
92807
  projectId,
92930
92808
  setting
92931
92809
  }));
@@ -92935,7 +92813,7 @@ var Settings = class Settings extends Service$1()("lalph/Settings", { make: gen(
92935
92813
  getProject,
92936
92814
  setProject: fnUntraced(function* (setting, value) {
92937
92815
  const projectId = yield* CurrentProjectId;
92938
- const s = toSchemaStore(get$15(yield* projectKvs.services(projectId), KeyValueStore), setting.schema);
92816
+ const s = toSchemaStore(get$16(yield* projectKvs.services(projectId), KeyValueStore), setting.schema);
92939
92817
  const setCache = set$5(projectCache, {
92940
92818
  projectId,
92941
92819
  setting
@@ -93062,6 +92940,7 @@ var PrdIssue = class PrdIssue extends Class$2("PrdIssue")({
93062
92940
  update(options) {
93063
92941
  return new PrdIssue({
93064
92942
  ...this,
92943
+ id: options.id ?? this.id,
93065
92944
  title: options.title ?? this.title,
93066
92945
  description: options.description ?? this.description,
93067
92946
  state: options.state ?? this.state,
@@ -178268,7 +178147,7 @@ var TokenManager$1 = class extends Service$1()("lalph/Linear/TokenManager", { ma
178268
178147
  }));
178269
178148
  const get = makeUnsafe$9(1).withPermit(getNoLock);
178270
178149
  const pkce = gen(function* () {
178271
- const deferred = yield* make$85();
178150
+ const deferred = yield* make$87();
178272
178151
  yield* serve(add("GET", "/callback", gen(function* () {
178273
178152
  yield* succeed$5(deferred, yield* callbackParams);
178274
178153
  return yield* html`
@@ -178341,15 +178220,29 @@ const TokenResponse$1 = Struct$2({
178341
178220
  });
178342
178221
  //#endregion
178343
178222
  //#region src/IssueSource.ts
178223
+ const IssuesChange = taggedEnum();
178344
178224
  var IssueSource = class IssueSource extends Service$1()("lalph/IssueSource") {
178345
178225
  static make(impl) {
178346
178226
  return gen(function* () {
178347
- const reactivity = yield* Reactivity;
178227
+ const refs = yield* make$48({
178228
+ lookup: fnUntraced(function* (projectId) {
178229
+ const ref = yield* make$47(IssuesChange.Internal({ issues: yield* pipe$1(impl.issues(projectId), orElseSucceed(empty$17)) }));
178230
+ yield* changes(ref).pipe(switchMap((_) => impl.issues(projectId).pipe(tap$1((issues) => set$3(ref, IssuesChange.External({ issues }))), delay(seconds(30)), fromEffectDrain)), runDrain, forkScoped);
178231
+ return ref;
178232
+ }),
178233
+ capacity: Number.MAX_SAFE_INTEGER
178234
+ });
178235
+ const update = fnUntraced(function* (projectId, issues) {
178236
+ yield* set$3(yield* get$6(refs, projectId), IssuesChange.Internal({ issues }));
178237
+ });
178238
+ const updateIssues = (projectId) => pipe$1(impl.issues(projectId), tap$1((issues) => update(projectId, issues)));
178348
178239
  return IssueSource.of({
178349
178240
  ...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))
178241
+ ref: (projectId) => get$6(refs, projectId),
178242
+ issues: updateIssues,
178243
+ createIssue: (projectId, issue) => pipe$1(impl.createIssue(projectId, issue), tap$1(updateIssues(projectId))),
178244
+ updateIssue: (options) => pipe$1(impl.updateIssue(options), tap$1(updateIssues(options.projectId))),
178245
+ cancelIssue: (projectId, issueId) => pipe$1(impl.cancelIssue(projectId, issueId), tap$1(updateIssues(projectId)))
178353
178246
  });
178354
178247
  });
178355
178248
  }
@@ -181683,7 +181576,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
181683
181576
  });
181684
181577
  Ze.glob = Ze;
181685
181578
  //#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
181579
+ //#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
181580
  /**
181688
181581
  * @since 1.0.0
181689
181582
  */
@@ -196556,7 +196449,7 @@ var StreamableHTTPClientTransport = class {
196556
196449
  }
196557
196450
  };
196558
196451
  //#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
196452
+ //#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
196453
  /**
196561
196454
  * @since 1.0.0
196562
196455
  */
@@ -196601,7 +196494,7 @@ const layer$13 = effect$1(McpClient, gen(function* () {
196601
196494
  });
196602
196495
  }));
196603
196496
  //#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
196497
+ //#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
196498
  /**
196606
196499
  * @since 1.0.0
196607
196500
  */
@@ -211551,7 +211444,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports) => {
211551
211444
  exports.impl = impl;
211552
211445
  }));
211553
211446
  //#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
211447
+ //#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
211448
  /**
211556
211449
  * @since 1.0.0
211557
211450
  */
@@ -214124,7 +214017,7 @@ const Proto$2 = {
214124
214017
  description: cause.message
214125
214018
  })
214126
214019
  })));
214127
- const queue = yield* make$73();
214020
+ const queue = yield* make$75();
214128
214021
  const fiber = yield* schemas.handler(decodedParams, { preliminary: (result) => asVoid(offer(queue, {
214129
214022
  result,
214130
214023
  isFailure: false,
@@ -214638,7 +214531,7 @@ const Strict = /* @__PURE__ */ Reference("effect/ai/Tool/Strict", { defaultValue
214638
214531
  * @since 1.0.0
214639
214532
  * @category utilities
214640
214533
  */
214641
- const getStrictMode = (tool) => get$15(tool.annotations, Strict);
214534
+ const getStrictMode = (tool) => get$16(tool.annotations, Strict);
214642
214535
  const suspectProtoRx = /"__proto__"\s*:/;
214643
214536
  const suspectConstructorRx = /"constructor"\s*:/;
214644
214537
  function _parse(text) {
@@ -214690,7 +214583,7 @@ function isEmptyParamsRecord(indexSignature) {
214690
214583
  return indexSignature.parameter === string$3 && isNever(indexSignature.type);
214691
214584
  }
214692
214585
  //#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
214586
+ //#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
214587
  /**
214695
214588
  * @since 1.0.0
214696
214589
  */
@@ -214716,7 +214609,7 @@ const maybeRemoveFile = (path) => serviceOption(SemanticSearch).pipe(flatMap$4(m
214716
214609
  onSome: (service) => service.removeFile(path)
214717
214610
  })));
214718
214611
  //#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
214612
+ //#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
214613
  /**
214721
214614
  * @since 1.0.0
214722
214615
  */
@@ -215067,7 +214960,7 @@ const AgentToolHandlers = AgentToolHandlersNoDeps.pipe(provide$3([layer$12, laye
215067
214960
  AgentToolHandlersNoDeps.pipe(provide$3([mock(ExaSearch)({}), mock(WebToMarkdown)({})]));
215068
214961
  var ApplyPatchError = class extends TaggedClass$2("ApplyPatchError") {};
215069
214962
  //#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
214963
+ //#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
214964
  const resolveDocumentation = resolveAt("documentation");
215072
214965
  const identifierPattern = /^[$A-Z_a-z][$0-9A-Z_a-z]*$/u;
215073
214966
  const Precedence = {
@@ -215340,7 +215233,7 @@ const render = (schema, options) => {
215340
215233
  return printNode({ text: documentation === void 0 ? rendered.text : `${renderJsDoc(documentation, 0, printerOptions)}${printerOptions.newLine}${rendered.text}` }, printerOptions);
215341
215234
  };
215342
215235
  //#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
215236
+ //#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
215237
  /**
215345
215238
  * @since 1.0.0
215346
215239
  */
@@ -215362,7 +215255,7 @@ declare function ${name}(${params}): Promise<${render(tool.successSchema)}>`);
215362
215255
  }) });
215363
215256
  };
215364
215257
  //#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
215258
+ //#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
215259
  const isIdentifierChar = (char) => char !== void 0 && /[A-Za-z0-9_$]/.test(char);
215367
215260
  const isIdentifierStartChar = (char) => char !== void 0 && /[A-Za-z_$]/.test(char);
215368
215261
  const hasIdentifierBoundary = (text, index, length) => !isIdentifierChar(text[index - 1]) && !isIdentifierChar(text[index + length]);
@@ -215811,7 +215704,7 @@ const fixAssignedTemplatesForToolCalls = (script) => {
215811
215704
  };
215812
215705
  const preprocessScript = (script) => fixAssignedTemplatesForToolCalls(["applyPatch", "taskComplete"].reduce((current, functionName) => fixCallTemplateArgument(current, functionName), fixTargetCallObjectPropertyTemplates(script)));
215813
215706
  //#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
215707
+ //#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
215708
  /**
215816
215709
  * @since 1.0.0
215817
215710
  */
@@ -215996,7 +215889,7 @@ var QueueWriteStream = class extends Writable {
215996
215889
  }
215997
215890
  };
215998
215891
  //#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
215892
+ //#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
215893
  const stripWrappingCodeFence = (script) => {
216001
215894
  const lines = script.split(/\r?\n/);
216002
215895
  if (lines.length < 2) return script;
@@ -217293,10 +217186,10 @@ const make$10 = /* @__PURE__ */ fnUntraced(function* (params) {
217293
217186
  }) : identity)));
217294
217187
  }
217295
217188
  const decodeParts = decodeEffect(NonEmptyArray(StreamPart(toolkit)));
217296
- const queue = yield* make$73();
217189
+ const queue = yield* make$75();
217297
217190
  const deferredFinishParts = [];
217298
217191
  if (preResolvedStreamParts.length > 0) yield* offerAll(queue, preResolvedStreamParts);
217299
- const toolCallFibers = yield* make$54();
217192
+ const toolCallFibers = yield* make$56();
217300
217193
  const handleToolCall = fnUntraced(function* (part) {
217301
217194
  const tool = toolkit.tools[part.name];
217302
217195
  if (!tool) return;
@@ -217545,7 +217438,7 @@ const applySpanTransformer = (transformer, response, options) => {
217545
217438
  });
217546
217439
  };
217547
217440
  //#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
217441
+ //#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
217442
  /**
217550
217443
  * @since 1.0.0
217551
217444
  */
@@ -217581,17 +217474,18 @@ ${content}
217581
217474
  let agentCounter = 0;
217582
217475
  const outputBuffer = /* @__PURE__ */ new Map();
217583
217476
  let currentOutputAgent = null;
217584
- let history = make$75(empty);
217477
+ let history = make$77(empty);
217585
217478
  const spawn = fnUntraced(function* (opts) {
217586
217479
  const agentId = opts.agentId;
217587
217480
  const ai = yield* LanguageModel;
217588
217481
  const subagentModel = yield* SubagentModel;
217589
217482
  const modelConfig = yield* AgentModelConfig;
217483
+ const conversationMode = yield* ConversationMode;
217590
217484
  let finalSummary = none$4();
217591
- const output = yield* make$73();
217485
+ const output = yield* make$75();
217592
217486
  let inputTokens = 0;
217593
217487
  let outputTokens = 0;
217594
- const prompt = opts.disableHistory ? make$75(empty) : history;
217488
+ const prompt = opts.disableHistory ? make$77(empty) : history;
217595
217489
  update(prompt, concat(opts.prompt));
217596
217490
  let system = (typeof opts.system === "function" ? opts.system : defaultSystem)({
217597
217491
  toolInstructions: generateSystemTools(capabilities),
@@ -217707,6 +217601,7 @@ ${content}
217707
217601
  let response = empty$17();
217708
217602
  let reasoningStarted = false;
217709
217603
  let hadReasoningDelta = false;
217604
+ let hadToolCall = false;
217710
217605
  yield* pipe$1(ai.streamText({
217711
217606
  prompt: prompt.current,
217712
217607
  toolkit: singleTool
@@ -217763,9 +217658,12 @@ ${content}
217763
217658
  });
217764
217659
  }
217765
217660
  break;
217661
+ case "tool-call":
217662
+ hadToolCall = true;
217663
+ break;
217766
217664
  }
217767
217665
  return void_$2;
217768
- }), retry$3({
217666
+ }), retry$1({
217769
217667
  while: (err) => {
217770
217668
  response = [];
217771
217669
  if (err.isRetryable) maybeSend({
@@ -217777,6 +217675,7 @@ ${content}
217777
217675
  schedule: retryPolicy
217778
217676
  }), modelConfig.systemPromptTransform ? (effect) => modelConfig.systemPromptTransform(system, effect) : identity);
217779
217677
  update(prompt, concat(fromResponseParts(response)));
217678
+ if (conversationMode && !hadToolCall && pendingMessages.size === 0) finalSummary = some$2(responseToSummary(response));
217780
217679
  }
217781
217680
  }).pipe(provideService$2(ScriptExecutor, (script) => {
217782
217681
  maybeSend({
@@ -217911,11 +217810,27 @@ const layerSubagentModel = (layer) => effect$1(SubagentModel, gen(function* () {
217911
217810
  }));
217912
217811
  /**
217913
217812
  * @since 1.0.0
217813
+ * @category Conversation mode
217814
+ */
217815
+ var ConversationMode = class ConversationMode extends Reference("clanka/Agent/ConversationMode", { defaultValue: () => false }) {
217816
+ static layer = (enabled) => succeed$4(ConversationMode, enabled);
217817
+ };
217818
+ /**
217819
+ * @since 1.0.0
217914
217820
  * @category System prompts
217915
217821
  */
217916
217822
  var AgentModelConfig = class AgentModelConfig extends Reference("clanka/Agent/SystemPromptTransform", { defaultValue: () => ({}) }) {
217917
217823
  static layer = (options) => succeed$4(AgentModelConfig, options);
217918
217824
  };
217825
+ const responseToSummary = (response) => {
217826
+ const prompt = fromResponseParts(response);
217827
+ let parts = empty$17();
217828
+ for (const message of prompt.content) {
217829
+ if (message.role !== "assistant") continue;
217830
+ for (const part of message.content) if (part.type === "text" || part.type === "reasoning") parts.push(part.text);
217831
+ }
217832
+ return parts.join("\n\n");
217833
+ };
217919
217834
  /**
217920
217835
  * @since 1.0.0
217921
217836
  * @category Output
@@ -226598,7 +226513,7 @@ const makeSocket = /* @__PURE__ */ gen(function* () {
226598
226513
  const tracker = yield* make$11;
226599
226514
  const request = yield* orDie$2(client.client.httpClient.preprocess(post("/responses")));
226600
226515
  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({
226516
+ const queueRef = yield* make$70({
226602
226517
  idleTimeToLive: 6e4,
226603
226518
  acquire: gen(function* () {
226604
226519
  const write = yield* socket.writer;
@@ -226688,7 +226603,7 @@ const makeSocket = /* @__PURE__ */ gen(function* () {
226688
226603
  return OpenAiSocket.serviceMap({ createResponseStream(options) {
226689
226604
  const stream = gen(function* () {
226690
226605
  yield* acquireRelease(semaphore.take(1), () => semaphore.release(1), { interruptible: true });
226691
- const { send, cancel, reset } = yield* get$10(queueRef);
226606
+ const { send, cancel, reset } = yield* get$11(queueRef);
226692
226607
  const incoming = yield* unbounded();
226693
226608
  let done = false;
226694
226609
  yield* acquireRelease(send(incoming, options), (_, exit) => {
@@ -226803,7 +226718,7 @@ const invalidProviderResponse = (description) => make$15({
226803
226718
  * @category constructors
226804
226719
  */
226805
226720
  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) => {
226721
+ 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
226722
  for (let i = 0; i < entries.length; i++) entries[i].completeUnsafe(succeed$6(embeddings[i]));
226808
226723
  }))).pipe(withSpan("EmbeddingModel.resolver"));
226809
226724
  return EmbeddingModel.of({
@@ -226944,7 +226859,7 @@ const invalidOutput = (description) => make$15({
226944
226859
  function toCodecOpenAI(schema) {
226945
226860
  const to = schema.ast;
226946
226861
  const from = recurOpenAI(toEncoded$1(to));
226947
- const codec = from === to ? schema : make$62(decodeTo$1(from, to, passthrough()));
226862
+ const codec = from === to ? schema : make$64(decodeTo$1(from, to, passthrough()));
226948
226863
  const document = toJsonSchemaDocument(codec);
226949
226864
  const jsonSchema = rewriteOpenAI(document.schema);
226950
226865
  if (Object.keys(document.definitions).length > 0) jsonSchema.$defs = map$14(document.definitions, rewriteOpenAI);
@@ -229028,7 +228943,7 @@ const transformToolCallParams = /* @__PURE__ */ fnUntraced(function* (tools, too
229028
228943
  })));
229029
228944
  });
229030
228945
  //#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
228946
+ //#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
228947
  /**
229033
228948
  * @since 1.0.0
229034
228949
  */
@@ -229206,7 +229121,7 @@ var CodexAuth = class CodexAuth extends Service$1()("clanka/CodexAuth") {
229206
229121
  user_code: deviceCode.userCode
229207
229122
  }));
229208
229123
  const delayMs = deviceCode.intervalMs + POLLING_SAFETY_MARGIN_MS;
229209
- return yield* httpClient.execute(request).pipe(retry$3({
229124
+ return yield* httpClient.execute(request).pipe(retry$1({
229210
229125
  while: (e) => e.response?.status === 403 || e.response?.status === 404,
229211
229126
  schedule: spaced(delayMs)
229212
229127
  }), 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 +229163,7 @@ var CodexAuth = class CodexAuth extends Service$1()("clanka/CodexAuth") {
229248
229163
  static layerClient = this.layerClientNoDeps.pipe(provide$3(CodexAuth.layer));
229249
229164
  };
229250
229165
  //#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
229166
+ //#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
229167
  /**
229253
229168
  * @since 1.0.0
229254
229169
  */
@@ -229274,7 +229189,7 @@ const layerModel = (model, options) => layer$7({
229274
229189
  }
229275
229190
  }).pipe(merge$6(AgentModelConfig.layer({ systemPromptTransform: (system, effect) => withConfigOverride(effect, { instructions: system }) })));
229276
229191
  //#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
229192
+ //#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
229193
  /**
229279
229194
  * @since 1.0.0
229280
229195
  */
@@ -231034,7 +230949,7 @@ const getUsageDetailNumber = (details, field) => {
231034
230949
  return typeof value === "number" ? value : void 0;
231035
230950
  };
231036
230951
  //#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
230952
+ //#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
230953
  /**
231039
230954
  * @since 1.0.0
231040
230955
  */
@@ -231225,7 +231140,7 @@ var GithubCopilotAuth = class GithubCopilotAuth extends Service$1()("clanka/Gith
231225
231140
  static layerClient = this.layerClientNoDeps.pipe(provide$3(GithubCopilotAuth.layer));
231226
231141
  };
231227
231142
  //#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
231143
+ //#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
231144
  /**
231230
231145
  * @since 1.0.0
231231
231146
  */
@@ -231645,7 +231560,7 @@ Object.defineProperties(createChalk.prototype, styles);
231645
231560
  const chalk = createChalk();
231646
231561
  createChalk({ level: stderrColor ? stderrColor.level : 0 });
231647
231562
  //#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
231563
+ //#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
231564
  /**
231650
231565
  * @since 1.0.0
231651
231566
  */
@@ -232002,7 +231917,7 @@ const findById = (options) => {
232002
231917
  for (let i = 0; i < decodedResults.length; i++) {
232003
231918
  const result = decodedResults[i];
232004
231919
  const id = options.ResultId(result, results[i]);
232005
- const request = get$13(idMap, id);
231920
+ const request = get$14(idMap, id);
232006
231921
  if (request._tag === "None") continue;
232007
231922
  remove$5(idMap, id);
232008
231923
  request.value.completeUnsafe(succeed$6(result));
@@ -232131,7 +232046,7 @@ select * from ${sql(options.tableName)} where ${sql(idColumn)} = LAST_INSERT_ID(
232131
232046
  };
232132
232047
  });
232133
232048
  //#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
232049
+ //#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
232050
  /**
232136
232051
  * @since 1.0.0
232137
232052
  * @category Models
@@ -232289,7 +232204,7 @@ const make = (options) => gen(function* () {
232289
232204
  const db = new Sqlite(options.filename, { readonly: options.readonly ?? false });
232290
232205
  yield* addFinalizer$1(scope$2, sync(() => db.close()));
232291
232206
  if (options.disableWAL !== true) db.pragma("journal_mode = WAL");
232292
- const prepareCache = yield* make$57({
232207
+ const prepareCache = yield* make$59({
232293
232208
  capacity: options.prepareCacheSize ?? 200,
232294
232209
  timeToLive: options.prepareCacheTTL ?? minutes(10),
232295
232210
  lookup: (sql) => try_({
@@ -232301,7 +232216,7 @@ const make = (options) => gen(function* () {
232301
232216
  })
232302
232217
  });
232303
232218
  const runStatement = (statement, params, raw) => withFiber((fiber) => {
232304
- if (get$15(fiber.services, SafeIntegers)) statement.safeIntegers(true);
232219
+ if (get$16(fiber.services, SafeIntegers)) statement.safeIntegers(true);
232305
232220
  try {
232306
232221
  if (statement.reader) return succeed$3(statement.all(...params));
232307
232222
  const result = statement.run(...params);
@@ -232313,8 +232228,8 @@ const make = (options) => gen(function* () {
232313
232228
  }));
232314
232229
  }
232315
232230
  });
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_({
232231
+ const run = (sql, params, raw = false) => flatMap$4(get$8(prepareCache, sql), (s) => runStatement(s, params, raw));
232232
+ const runValues = (sql, params) => acquireUseRelease(get$8(prepareCache, sql), (statement) => try_({
232318
232233
  try: () => {
232319
232234
  if (statement.reader) {
232320
232235
  statement.raw(true);
@@ -232372,14 +232287,14 @@ const make = (options) => gen(function* () {
232372
232287
  }
232373
232288
  });
232374
232289
  });
232375
- const semaphore = yield* make$72(1);
232290
+ const semaphore = yield* make$74(1);
232376
232291
  const connection = yield* makeConnection;
232377
232292
  const acquirer = semaphore.withPermits(1)(succeed$3(connection));
232378
232293
  const transactionAcquirer = uninterruptibleMask((restore) => {
232379
232294
  const scope = getUnsafe$4(getCurrent().services, Scope);
232380
232295
  return as$1(tap$1(restore(semaphore.take(1)), () => addFinalizer$1(scope, semaphore.release(1))), connection);
232381
232296
  });
232382
- return Object.assign(yield* make$49({
232297
+ return Object.assign(yield* make$51({
232383
232298
  acquirer,
232384
232299
  compiler,
232385
232300
  transactionAcquirer,
@@ -232397,7 +232312,7 @@ const make = (options) => gen(function* () {
232397
232312
  * @category layers
232398
232313
  * @since 1.0.0
232399
232314
  */
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));
232315
+ 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
232316
  //#endregion
232402
232317
  //#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
232318
  /**
@@ -232411,7 +232326,7 @@ const run$1 = /* @__PURE__ */ make$25({});
232411
232326
  */
232412
232327
  const layer$1 = (options) => effectDiscard(run$1(options));
232413
232328
  //#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
232329
+ //#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
232330
  /**
232416
232331
  * Binary extension for each platform
232417
232332
  */
@@ -232528,7 +232443,7 @@ function getExtensionPath() {
232528
232443
  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
232444
  }
232530
232445
  //#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
232446
+ //#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
232447
  /**
232533
232448
  * @since 1.0.0
232534
232449
  */
@@ -232556,18 +232471,10 @@ const SqliteLayer = (database) => layer$1({ loader: fromRecord({ "0001_create_ch
232556
232471
  yield* fs.makeDirectory(directory, { recursive: true });
232557
232472
  }))));
232558
232473
  //#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
232474
+ //#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
232475
  /**
232561
232476
  * @since 1.0.0
232562
232477
  */
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
232478
  const normalizePath = (path) => path.replace(/\\/g, "/");
232572
232479
  const resolveChunkConfig = (options) => ({
232573
232480
  chunkSize: 30,
@@ -232603,7 +232510,7 @@ const layer = (options) => effect$1(SemanticSearch, gen(function* () {
232603
232510
  const resolver = makeEmbeddingResolver(embeddings.resolver, options);
232604
232511
  const concurrency = options.concurrency ?? 2e3;
232605
232512
  const chunkConfig = resolveChunkConfig(options);
232606
- const indexHandle = yield* make$56();
232513
+ const indexHandle = yield* make$58();
232607
232514
  const console = yield* Console$1;
232608
232515
  const resolveIndexedPath = (path) => {
232609
232516
  const absolutePath = pathService.resolve(root, path);
@@ -232827,11 +232734,11 @@ const layerPersistence = unwrap$3(gen(function* () {
232827
232734
  //#region src/Linear.ts
232828
232735
  var Linear = class extends Service$1()("lalph/Linear", { make: gen(function* () {
232829
232736
  const tokens = yield* TokenManager$1;
232830
- const clients = yield* make$70({
232737
+ const clients = yield* make$72({
232831
232738
  lookup: (token) => succeed$3(new LinearClient({ accessToken: token })),
232832
232739
  idleTimeToLive: "1 minute"
232833
232740
  });
232834
- const getClient = tokens.get.pipe(flatMap$4(({ token }) => get$12(clients, token)), mapError$2((cause) => new LinearError({ cause })));
232741
+ const getClient = tokens.get.pipe(flatMap$4(({ token }) => get$13(clients, token)), mapError$2((cause) => new LinearError({ cause })));
232835
232742
  const use = (f) => getClient.pipe(flatMap$4((client) => tryPromise({
232836
232743
  try: () => f(client),
232837
232744
  catch: (cause) => new LinearError({ cause })
@@ -232899,7 +232806,7 @@ var Linear = class extends Service$1()("lalph/Linear", { make: gen(function* ()
232899
232806
  const LinearIssueSource = effect$1(IssueSource, gen(function* () {
232900
232807
  const linear = yield* Linear;
232901
232808
  let state = yield* linear.getState;
232902
- const projectSettings = yield* make$57({
232809
+ const projectSettings = yield* make$59({
232903
232810
  lookup: fnUntraced(function* (_projectId) {
232904
232811
  const project = yield* getOrSelectProject;
232905
232812
  return {
@@ -232985,7 +232892,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
232985
232892
  }));
232986
232893
  return yield* IssueSource.make({
232987
232894
  issues: fnUntraced(function* (projectId) {
232988
- const settings = yield* get$7(projectSettings, projectId);
232895
+ const settings = yield* get$8(projectSettings, projectId);
232989
232896
  return yield* issues({
232990
232897
  projectId: settings.project.id,
232991
232898
  teamId: settings.teamId,
@@ -232994,7 +232901,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
232994
232901
  });
232995
232902
  }),
232996
232903
  findById: fnUntraced(function* (projectId, issueId) {
232997
- const settings = yield* get$7(projectSettings, projectId);
232904
+ const settings = yield* get$8(projectSettings, projectId);
232998
232905
  return (yield* issues({
232999
232906
  projectId: settings.project.id,
233000
232907
  labelId: settings.labelId,
@@ -233003,7 +232910,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
233003
232910
  })).find((issue) => issue.id === issueId) ?? null;
233004
232911
  }),
233005
232912
  createIssue: fnUntraced(function* (projectId, issue) {
233006
- const { teamId, labelId, autoMergeLabelId, project } = yield* get$7(projectSettings, projectId);
232913
+ const { teamId, labelId, autoMergeLabelId, project } = yield* get$8(projectSettings, projectId);
233007
232914
  const created = yield* linear.use((c) => c.createIssue({
233008
232915
  teamId,
233009
232916
  projectId: project.id,
@@ -233036,7 +232943,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
233036
232943
  };
233037
232944
  }, mapError$2((cause) => new IssueSourceError({ cause }))),
233038
232945
  updateIssue: fnUntraced(function* (options) {
233039
- const { autoMergeLabelId, teamId } = yield* get$7(projectSettings, options.projectId);
232946
+ const { autoMergeLabelId, teamId } = yield* get$8(projectSettings, options.projectId);
233040
232947
  const issueId = identifierMap.get(options.issueId);
233041
232948
  const linearIssue = yield* linear.issueById(issueId);
233042
232949
  const update = { labelIds: linearIssue.labelIds.slice() };
@@ -233066,7 +232973,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
233066
232973
  yield* forEach$4(toRemove, (relation) => linear.use((c) => c.deleteIssueRelation(relation.id)).pipe(ignore$1), { concurrency: 5 });
233067
232974
  }, mapError$2((cause) => new IssueSourceError({ cause }))),
233068
232975
  cancelIssue: fnUntraced(function* (projectId, issueId) {
233069
- const { teamId } = yield* get$7(projectSettings, projectId);
232976
+ const { teamId } = yield* get$8(projectSettings, projectId);
233070
232977
  const states = statesForTeamId(teamId);
233071
232978
  const linearIssueId = identifierMap.get(issueId);
233072
232979
  yield* linear.use((c) => c.updateIssue(linearIssueId, { stateId: states.canceled.id }));
@@ -233079,9 +232986,9 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
233079
232986
  yield* Settings.setProject(selectedAutoMergeLabelId, none$4());
233080
232987
  yield* invalidate$1(projectSettings, projectId);
233081
232988
  }),
233082
- settings: (projectId) => asVoid(get$7(projectSettings, projectId)),
232989
+ settings: (projectId) => asVoid(get$8(projectSettings, projectId)),
233083
232990
  info: fnUntraced(function* (lalphProjectId) {
233084
- const { teamId, labelId, autoMergeLabelId, project } = yield* get$7(projectSettings, lalphProjectId);
232991
+ const { teamId, labelId, autoMergeLabelId, project } = yield* get$8(projectSettings, lalphProjectId);
233085
232992
  const label = labelId;
233086
232993
  const autoMergeLabel = autoMergeLabelId;
233087
232994
  const teamName = project.teams.find((team) => team.id === teamId)?.name ?? teamId;
@@ -239636,7 +239543,7 @@ query FetchPRComments($owner: String!, $repo: String!, $pr: Int!) {
239636
239543
  var GithubError = class extends TaggedError("GithubError") {};
239637
239544
  var Github = class extends Service$1()("lalph/Github", { make: gen(function* () {
239638
239545
  const tokens = yield* TokenManager;
239639
- const clients = yield* make$70({
239546
+ const clients = yield* make$72({
239640
239547
  lookup: (token) => sync(() => {
239641
239548
  const octokit = new Octokit({ auth: token });
239642
239549
  const etagCache = /* @__PURE__ */ new Map();
@@ -239675,7 +239582,7 @@ var Github = class extends Service$1()("lalph/Github", { make: gen(function* ()
239675
239582
  }),
239676
239583
  idleTimeToLive: "1 minute"
239677
239584
  });
239678
- const getClient = tokens.get.pipe(flatMap$4(({ token }) => get$12(clients, token)), mapError$2((cause) => new GithubError({ cause })));
239585
+ const getClient = tokens.get.pipe(flatMap$4(({ token }) => get$13(clients, token)), mapError$2((cause) => new GithubError({ cause })));
239679
239586
  const request = (f) => getClient.pipe(flatMap$4((client) => tryPromise({
239680
239587
  try: () => f(client.rest),
239681
239588
  catch: (cause) => new GithubError({ cause })
@@ -239704,7 +239611,7 @@ var Github = class extends Service$1()("lalph/Github", { make: gen(function* ()
239704
239611
  const GithubIssueSource = effect$1(IssueSource, gen(function* () {
239705
239612
  const github = yield* Github;
239706
239613
  const cli = yield* GithubCli;
239707
- const projectSettings = yield* make$57({
239614
+ const projectSettings = yield* make$59({
239708
239615
  lookup: fnUntraced(function* (_projectId) {
239709
239616
  return {
239710
239617
  labelFilter: yield* getOrSelectLabel,
@@ -239828,13 +239735,13 @@ const GithubIssueSource = effect$1(IssueSource, gen(function* () {
239828
239735
  });
239829
239736
  return yield* IssueSource.make({
239830
239737
  issues: fnUntraced(function* (projectId) {
239831
- return yield* issues(yield* get$7(projectSettings, projectId));
239738
+ return yield* issues(yield* get$8(projectSettings, projectId));
239832
239739
  }),
239833
239740
  findById: fnUntraced(function* (projectId, issueId) {
239834
- return (yield* issues(yield* get$7(projectSettings, projectId))).find((issue) => issue.id === issueId) ?? null;
239741
+ return (yield* issues(yield* get$8(projectSettings, projectId))).find((issue) => issue.id === issueId) ?? null;
239835
239742
  }),
239836
239743
  createIssue: fnUntraced(function* (projectId, issue) {
239837
- const { labelFilter, autoMergeLabelName } = yield* get$7(projectSettings, projectId);
239744
+ const { labelFilter, autoMergeLabelName } = yield* get$8(projectSettings, projectId);
239838
239745
  const created = yield* createIssue({
239839
239746
  owner: cli.owner,
239840
239747
  repo: cli.repo,
@@ -239857,7 +239764,7 @@ const GithubIssueSource = effect$1(IssueSource, gen(function* () {
239857
239764
  };
239858
239765
  }, mapError$2((cause) => new IssueSourceError({ cause }))),
239859
239766
  updateIssue: fnUntraced(function* (options) {
239860
- const { labelFilter, autoMergeLabelName } = yield* get$7(projectSettings, options.projectId);
239767
+ const { labelFilter, autoMergeLabelName } = yield* get$8(projectSettings, options.projectId);
239861
239768
  const issueNumber = Number(options.issueId.slice(1));
239862
239769
  const currentIssue = yield* github.request((rest) => rest.issues.get({
239863
239770
  owner: cli.owner,
@@ -239925,9 +239832,9 @@ const GithubIssueSource = effect$1(IssueSource, gen(function* () {
239925
239832
  yield* Settings.setProject(autoMergeLabel, none$4());
239926
239833
  yield* invalidate$1(projectSettings, projectId);
239927
239834
  }),
239928
- settings: (projectId) => asVoid(get$7(projectSettings, projectId)),
239835
+ settings: (projectId) => asVoid(get$8(projectSettings, projectId)),
239929
239836
  info: fnUntraced(function* (projectId) {
239930
- const { labelFilter, projectFilter, autoMergeLabelName } = yield* get$7(projectSettings, projectId);
239837
+ const { labelFilter, projectFilter, autoMergeLabelName } = yield* get$8(projectSettings, projectId);
239931
239838
  console.log(` GitHub project: ${match$10(projectFilter, {
239932
239839
  onNone: () => "None",
239933
239840
  onSome: (value) => `#${value.number} ${value.title}`
@@ -240073,45 +239980,6 @@ const etagHeaderValue = (headers) => {
240073
239980
  };
240074
239981
  const isNotModifiedError = (cause) => typeof cause === "object" && cause !== null && "status" in cause && cause.status === 304;
240075
239982
  //#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
239983
  //#region src/CurrentIssueSource.ts
240116
239984
  const issueSources = [{
240117
239985
  id: "linear",
@@ -240145,7 +240013,7 @@ var CurrentIssueSource = class CurrentIssueSource extends Service$1()("lalph/Cur
240145
240013
  static layer = effectServices(gen(function* () {
240146
240014
  const settings = yield* Settings;
240147
240015
  const source = yield* getOrSelectIssueSource;
240148
- const build$1 = build(source.layer).pipe(map$9(get$15(IssueSource)), withSpan$1("CurrentIssueSource.build"));
240016
+ const build$1 = build(source.layer).pipe(map$9(get$16(IssueSource)), withSpan$1("CurrentIssueSource.build"));
240149
240017
  const ref = yield* fromAcquire(build$1);
240150
240018
  const services$2 = yield* services();
240151
240019
  const refresh = set$4(ref, build$1).pipe(provideServices$2(services$2));
@@ -240154,35 +240022,30 @@ var CurrentIssueSource = class CurrentIssueSource extends Service$1()("lalph/Cur
240154
240022
  onSome: () => orElse
240155
240023
  })));
240156
240024
  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))
240025
+ ref: (projectId) => get$7(ref).pipe(flatMap$4((source) => source.ref(projectId)), unlessRalph(projectId, make$47(IssuesChange.Internal({ issues: [] })))),
240026
+ 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([]))),
240027
+ findById: (projectId, issueId) => get$7(ref).pipe(flatMap$4((source) => source.findById(projectId, issueId)), unlessRalph(projectId, succeed$3(null))),
240028
+ createIssue: (projectId, options) => get$7(ref).pipe(flatMap$4((source) => source.createIssue(projectId, options)), unlessRalph(projectId, interrupt$1)),
240029
+ updateIssue: (options) => get$7(ref).pipe(flatMap$4((source) => source.updateIssue(options)), unlessRalph(options.projectId, void_$2)),
240030
+ cancelIssue: (projectId, issueId) => get$7(ref).pipe(flatMap$4((source) => source.cancelIssue(projectId, issueId)), unlessRalph(projectId, void_$2)),
240031
+ reset: get$7(ref).pipe(flatMap$4((source) => source.reset)),
240032
+ settings: (projectId) => get$7(ref).pipe(flatMap$4((source) => source.settings(projectId)), unlessRalph(projectId, void_$2)),
240033
+ info: (projectId) => get$7(ref).pipe(flatMap$4((source) => source.info(projectId)), unlessRalph(projectId, void_$2)),
240034
+ issueCliAgentPreset: (issue) => get$7(ref).pipe(flatMap$4((source) => source.issueCliAgentPreset(issue))),
240035
+ updateCliAgentPreset: (preset) => get$7(ref).pipe(flatMap$4((source) => source.updateCliAgentPreset(preset))),
240036
+ cliAgentPresetInfo: (preset) => get$7(ref).pipe(flatMap$4((source) => source.cliAgentPresetInfo(preset))),
240037
+ ensureInProgress: (projectId, issueId) => get$7(ref).pipe(flatMap$4((source) => source.ensureInProgress(projectId, issueId)), unlessRalph(projectId, void_$2))
240169
240038
  });
240170
240039
  return IssueSource.serviceMap(proxy).pipe(add$3(CurrentIssueSource, source));
240171
240040
  })).pipe(provide$3([Settings.layer, PlatformServices]));
240172
240041
  };
240173
240042
  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 });
240177
- const checkForWork = fnUntraced(function* (project) {
240178
- if (project.gitFlow === "ralph") return;
240179
- if (!(yield* getCurrentIssues(project.id)).some((issue) => issue.state === "todo" && issue.blockedBy.length === 0)) return yield* new NoMoreWork({});
240180
- });
240043
+ const getCurrentIssues = (projectId) => IssueSource.use((s) => pipe$1(s.ref(projectId), flatMap$4(get$5)));
240181
240044
  const resetInProgress = gen(function* () {
240182
240045
  const source = yield* IssueSource;
240183
- const reactivity = yield* Reactivity;
240184
240046
  const projectId = yield* CurrentProjectId;
240185
- const inProgress = (yield* getCurrentIssues(projectId)).filter((issue) => issue.state === "in-progress" && issue.id !== null);
240047
+ const { issues } = yield* getCurrentIssues(projectId);
240048
+ const inProgress = issues.filter((issue) => issue.state === "in-progress" && issue.id !== null);
240186
240049
  if (inProgress.length === 0) return;
240187
240050
  yield* forEach$4(inProgress, (issue) => source.updateIssue({
240188
240051
  projectId,
@@ -240191,11 +240054,8 @@ const resetInProgress = gen(function* () {
240191
240054
  }), {
240192
240055
  concurrency: 5,
240193
240056
  discard: true
240194
- }).pipe(reactivity.withBatch);
240057
+ });
240195
240058
  });
240196
- var NoMoreWork = class extends ErrorClass("lalph/Prd/NoMoreWork")({ _tag: tag("NoMoreWork") }) {
240197
- message = "No more work to be done!";
240198
- };
240199
240059
  //#endregion
240200
240060
  //#region src/PromptGen.ts
240201
240061
  var PromptGen = class extends Service$1()("lalph/PromptGen", { make: gen(function* () {
@@ -240638,7 +240498,7 @@ const WorkerStatus = taggedEnum();
240638
240498
  const activeWorkersAtom = make$17(empty$8());
240639
240499
  const workerOutputAtom = family((_id) => make$17(empty$13()));
240640
240500
  const activeWorkerLoggingAtom = make$17(fnUntraced(function* (get) {
240641
- const fibers = yield* make$55();
240501
+ const fibers = yield* make$57();
240642
240502
  yield* get.stream(activeWorkersAtom).pipe(runForEach(fnUntraced(function* (workers) {
240643
240503
  const toRemove = new Map(fibers);
240644
240504
  for (const [id, state] of workers) {
@@ -240969,9 +240829,7 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
240969
240829
  const worktree = yield* Worktree;
240970
240830
  const pathService = yield* Path$1;
240971
240831
  const fs = yield* FileSystem;
240972
- const reactivity = yield* Reactivity;
240973
240832
  const source = yield* IssueSource;
240974
- const registry = yield* AtomRegistry;
240975
240833
  const projectId = yield* CurrentProjectId;
240976
240834
  let chosenIssueId = null;
240977
240835
  let shouldAddAutoMerge = false;
@@ -240981,7 +240839,8 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
240981
240839
  const yaml = yield* fs.readFileString(prdFile);
240982
240840
  return PrdIssue.arrayFromYaml(yaml);
240983
240841
  });
240984
- const getCurrentIssues = getResult$2(registry, currentIssuesAtom(projectId), { suspendOnWaiting: true });
240842
+ const issuesRef = yield* source.ref(projectId);
240843
+ const getCurrentIssues = get$5(issuesRef).pipe(map$9((i) => i.issues));
240985
240844
  const syncSemaphore = makeUnsafe$9(1);
240986
240845
  const maybeRevertIssue = fnUntraced(function* (options) {
240987
240846
  const issue = (yield* readPrd).find((i) => i.id === options.issueId);
@@ -241068,19 +240927,19 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
241068
240927
  discard: true
241069
240928
  });
241070
240929
  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({
240930
+ }).pipe(uninterruptible, syncSemaphore.withPermit, withSpan$1("Prd.sync"), catchTag$1("IssueSourceError", (e) => logWarning(fail$7(e))), annotateLogs({
241072
240931
  module: "Prd",
241073
240932
  method: "sync"
241074
240933
  }));
241075
- const updateSyncHandle = yield* make$56();
240934
+ const updateSyncHandle = yield* make$58();
241076
240935
  const updateSync = fnUntraced(function* (sourceIssues) {
241077
240936
  const currentYaml = (yield* fs.readFileString(prdFile)).trim();
241078
240937
  const nextYaml = PrdIssue.arrayToYaml(sourceIssues).trim();
241079
240938
  if (currentYaml === nextYaml) return;
241080
240939
  yield* fs.writeFileString(prdFile, nextYaml);
241081
240940
  }, 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);
240941
+ 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);
240942
+ yield* changes(issuesRef).pipe(runForEach((s) => updateSync(s.issues)), forkScoped);
241084
240943
  const findById = fnUntraced(function* (issueId) {
241085
240944
  return (yield* getCurrentIssues).find((i) => i.id === issueId) ?? null;
241086
240945
  });
@@ -241105,18 +240964,9 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
241105
240964
  }).pipe(withSpan$1("Prd.build")) }) {
241106
240965
  static layerNoWorktree = effect$1(this, this.make);
241107
240966
  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
- ]));
240967
+ static layerProvided = this.layer.pipe(provide$3([CurrentIssueSource.layer, Settings.layer]));
241114
240968
  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
- ]));
240969
+ static layerLocalProvided = this.layerLocal.pipe(provide$3([CurrentIssueSource.layer]));
241120
240970
  static layerNoop = succeed$4(this, {
241121
240971
  path: "",
241122
240972
  maybeRevertIssue: () => void_$2,
@@ -241130,11 +240980,6 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
241130
240980
  //#endregion
241131
240981
  //#region src/TaskTools.ts
241132
240982
  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
240983
  const Task = Struct$2({
241139
240984
  id: String$1.annotate({ documentation: "The unique identifier of the task." }),
241140
240985
  ...pick$1(PrdIssue.fields, [
@@ -241238,7 +241083,6 @@ const TaskToolsHandlers = TaskToolsWithChoose.toLayer(gen(function* () {
241238
241083
  updateTask: fn("TaskTools.updateTask")(function* (options) {
241239
241084
  yield* log$1(`Calling "updateTask"`).pipe(annotateLogs({ taskId: options.taskId }));
241240
241085
  const projectId = yield* CurrentProjectId;
241241
- yield* CurrentTaskRef.update((prev) => prev.update(options));
241242
241086
  yield* source.updateIssue({
241243
241087
  projectId,
241244
241088
  issueId: options.taskId,
@@ -241264,7 +241108,7 @@ const SemanticSearchLayer = unwrap$3(gen(function* () {
241264
241108
  const pathService = yield* Path$1;
241265
241109
  const apiKey = yield* redacted("LALPH_OPENAI_API_KEY").pipe(option);
241266
241110
  if (isNone(apiKey)) return empty$15;
241267
- return (yield* promise(() => Promise.resolve().then(() => SemanticSearch_exports))).layer({
241111
+ return layer({
241268
241112
  directory: worktree.directory,
241269
241113
  database: pathService.join(worktree.directory, ".lalph", "shared", "search.sqlite")
241270
241114
  }).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 +241596,10 @@ const run = fnUntraced(function* (options) {
241752
241596
  githubPrNumber: chosenTask.githubPrNumber ?? void 0,
241753
241597
  gitFlow
241754
241598
  });
241755
- const issueRef = make$75(chosenTask.prd.update({ state: "in-progress" }));
241599
+ const issueSemaphore = makeUnsafe$9(1);
241756
241600
  const steer = yield* taskUpdateSteer({
241757
241601
  issueId: taskId,
241758
- current: issueRef
241602
+ semaphore: issueSemaphore
241759
241603
  });
241760
241604
  yield* log$1(`Agent exited with code: ${yield* agentWorker({
241761
241605
  stallTimeout: options.stallTimeout,
@@ -241765,7 +241609,7 @@ const run = fnUntraced(function* (options) {
241765
241609
  research: researchResult,
241766
241610
  steer,
241767
241611
  currentTask: CurrentTask.task({ task: chosenTask.prd })
241768
- }).pipe(provideService$2(CurrentTaskRef, issueRef), catchStallInReview, withSpan$1("Main.agentWorker"))}`);
241612
+ }).pipe(catchStallInReview, withSpan$1("Main.agentWorker"))}`);
241769
241613
  if (options.review) {
241770
241614
  yield* source.updateIssue({
241771
241615
  projectId,
@@ -241880,7 +241724,8 @@ const runProject = fnUntraced(function* (options) {
241880
241724
  const isFinite = Number.isFinite(options.iterations);
241881
241725
  const iterationsDisplay = isFinite ? options.iterations : "unlimited";
241882
241726
  const semaphore = makeUnsafe$9(options.project.concurrency);
241883
- const fibers = yield* make$54();
241727
+ const fibers = yield* make$56();
241728
+ const issuesRef = yield* (yield* IssueSource).ref(options.project.id);
241884
241729
  let executionMode;
241885
241730
  if (options.project.gitFlow === "ralph") {
241886
241731
  if (!options.project.ralphSpec) return yield* new RalphSpecMissing({ projectId: options.project.id });
@@ -241917,38 +241762,35 @@ const runProject = fnUntraced(function* (options) {
241917
241762
  research: options.project.researchAgent
241918
241763
  });
241919
241764
  };
241920
- const handleNoMoreWork = (currentIteration, setIterations) => {
241921
- if (executionMode._tag === "ralph") return void_$2;
241922
- if (isFinite) {
241923
- setIterations(currentIteration);
241924
- return log$1(`No more work to process, ending after ${currentIteration} iteration(s).`);
241925
- }
241926
- return andThen(size$3(fibers) <= 1 ? log$1("No more work to process, waiting 30 seconds...") : void_$2, sleep(seconds(30)));
241927
- };
241928
241765
  yield* resetInProgress.pipe(withSpan$1("Main.resetInProgress"));
241929
241766
  yield* log$1(`Executing ${iterationsDisplay} iteration(s) with concurrency ${options.project.concurrency}`);
241930
241767
  let iterations = options.iterations;
241931
241768
  let iteration = 0;
241932
241769
  let quit = false;
241933
241770
  yield* mount(activeWorkerLoggingAtom);
241771
+ const waitForWork = executionMode._tag === "ralph" ? void_$2 : changes(issuesRef).pipe(takeUntilEffect(fnUntraced(function* ({ issues }) {
241772
+ if (issues.some((issue) => issue.state === "todo" && issue.blockedBy.length === 0)) return true;
241773
+ if (isFinite) {
241774
+ quit = true;
241775
+ yield* log$1(`No more work to process, ending after ${iteration} iteration(s).`);
241776
+ return yield* interrupt$1;
241777
+ }
241778
+ if (size$3(fibers) <= 1) yield* log$1("No more work to process");
241779
+ return false;
241780
+ })), runDrain);
241934
241781
  while (true) {
241935
241782
  yield* semaphore.take(1);
241936
241783
  if (quit || isFinite && iteration >= iterations) break;
241937
241784
  const currentIteration = iteration;
241938
- const startedDeferred = yield* make$85();
241785
+ const startedDeferred = yield* make$87();
241939
241786
  let ralphDone = false;
241940
241787
  const gitFlowLayer = resolveGitFlowLayer();
241941
- const fiber = yield* checkForWork(options.project).pipe(andThen(resolveRunEffect(startedDeferred).pipe(provide$1(gitFlowLayer, { local: true }), withWorkerState(options.project.id))), catchTags$1({
241788
+ const fiber = yield* waitForWork.pipe(andThen(resolveRunEffect(startedDeferred).pipe(provide$1(gitFlowLayer, { local: true }), withWorkerState(options.project.id))), catchTags$1({
241942
241789
  ChosenTaskNotFound(_error) {
241943
241790
  if (executionMode._tag !== "ralph") return void_$2;
241944
241791
  ralphDone = true;
241945
241792
  return log$1(`No more work to process for Ralph, ending after ${currentIteration + 1} iteration(s).`);
241946
241793
  },
241947
- NoMoreWork(_error) {
241948
- return handleNoMoreWork(currentIteration, (newIterations) => {
241949
- iterations = newIterations;
241950
- });
241951
- },
241952
241794
  QuitError(_error) {
241953
241795
  quit = true;
241954
241796
  return void_$2;
@@ -241968,7 +241810,7 @@ const maxContext = integer$1("max-context").pipe(withDescription$1("If the conte
241968
241810
  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
241811
  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
241812
  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", {
241813
+ const commandRoot = make$60("lalph", {
241972
241814
  iterations,
241973
241815
  maxIterationMinutes,
241974
241816
  maxContext,
@@ -242006,8 +241848,11 @@ const commandRoot = make$58("lalph", {
242006
241848
  layer$32
242007
241849
  ]))));
242008
241850
  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);
241851
+ const projectId = yield* CurrentProjectId;
241852
+ return yield* changes(yield* (yield* IssueSource).ref(projectId)).pipe(filterMap$2((issues) => {
241853
+ if (issues._tag === "Internal") return failVoid;
241854
+ return succeed$8(issues.issues.find((entry) => entry.id === options.issueId));
241855
+ }), runForEach((issue) => {
242011
241856
  if (issue?.state === "in-progress" || issue?.state === "in-review") return void_$2;
242012
241857
  return fail$6(new TaskStateChanged({
242013
241858
  issueId: options.issueId,
@@ -242016,11 +241861,20 @@ const watchTaskState = fnUntraced(function* (options) {
242016
241861
  }), withSpan$1("Main.watchTaskState"));
242017
241862
  });
242018
241863
  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);
241864
+ const projectId = yield* CurrentProjectId;
241865
+ const ref = yield* (yield* IssueSource).ref(projectId);
241866
+ let current = void 0;
241867
+ return changes(ref).pipe(filterMap$2((issues) => {
241868
+ const issue = issues.issues.find((entry) => entry.id === options.issueId);
242021
241869
  if (!issue) return failVoid;
242022
- if (!issue.isChangedComparedTo(options.current.current)) return failVoid;
242023
- set$9(options.current, issue);
241870
+ if (!current) {
241871
+ current = issue;
241872
+ return failVoid;
241873
+ }
241874
+ if (!issue.isChangedComparedTo(current)) return failVoid;
241875
+ current = issue;
241876
+ console.log("issue change", issues._tag);
241877
+ if (issues._tag === "Internal") return failVoid;
242024
241878
  return succeed$8(`The task has been updated by the user. Here is the latest information:
242025
241879
 
242026
241880
  # ${issue.title}
@@ -242068,7 +241922,7 @@ const agentTasker = fnUntraced(function* (options) {
242068
241922
  extraArgs: options.preset.extraArgs
242069
241923
  }), setCwd(worktree.directory), options.preset.withCommandPrefix, worktree.execWithOutput({ cliAgent: options.preset.cliAgent }));
242070
241924
  });
242071
- const commandPlanTasks = make$58("tasks", { specificationPath: path("spec", {
241925
+ const commandPlanTasks = make$60("tasks", { specificationPath: path("spec", {
242072
241926
  pathType: "file",
242073
241927
  mustExist: true
242074
241928
  }).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 +241991,7 @@ var Editor = class extends Service$1()("lalph/Editor", { make: gen(function* ()
242137
241991
  }) }) {
242138
241992
  static layer = effect$1(this, this.make).pipe(provide$3(PlatformServices));
242139
241993
  };
242140
- const commandPlan = make$58("plan", {
241994
+ const commandPlan = make$60("plan", {
242141
241995
  dangerous: boolean$2("dangerous").pipe(withAlias$1("d"), withDescription$1("Skip permission prompts while generating the specification from your plan")),
242142
241996
  withNewProject: boolean$2("new").pipe(withAlias$1("n"), withDescription$1("Create a new project (via prompts) before starting plan mode")),
242143
241997
  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 +242146,57 @@ const handler$1 = flow(withHandler(fnUntraced(function* () {
242292
242146
  console.log(`URL: ${created.url}`);
242293
242147
  }).pipe(provide$1([layerProjectIdPrompt, CurrentIssueSource.layer]));
242294
242148
  }, scoped$1)), provide(Editor.layer));
242295
- const commandIssue = make$58("issue").pipe(withDescription("Create a new issue in your editor."), withAlias("i"), handler$1);
242149
+ const commandIssue = make$60("issue").pipe(withDescription("Create a new issue in your editor."), withAlias("i"), handler$1);
242296
242150
  //#endregion
242297
242151
  //#region src/commands/edit.ts
242298
242152
  const handler = withHandler(fnUntraced(function* () {
242299
242153
  const prd = yield* Prd;
242300
242154
  yield* (yield* Editor).edit(prd.path);
242301
242155
  }, 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);
242156
+ const commandEdit = make$60("edit").pipe(withDescription("Open the selected project's .lalph/prd.yml in your editor."), withAlias("e"), handler);
242303
242157
  //#endregion
242304
242158
  //#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));
242159
+ 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
242160
  //#endregion
242307
242161
  //#region package.json
242308
- var version = "0.3.96";
242162
+ var version = "0.3.98";
242163
+ //#endregion
242164
+ //#region src/Tracing.ts
242165
+ const TracingLayer = unwrap$3(gen(function* () {
242166
+ if (isLessThan$1("Trace", yield* MinimumLogLevel)) return empty$15;
242167
+ return TracerLogger;
242168
+ }));
242169
+ const TracerLogger = gen(function* () {
242170
+ const loggers = yield* CurrentLoggers;
242171
+ const tracer = yield* Tracer;
242172
+ const fiber = getCurrent();
242173
+ const log = (message, time) => {
242174
+ const options = {
242175
+ message,
242176
+ fiber,
242177
+ date: new Date(Number(time / BigInt(1e6))),
242178
+ logLevel: "Trace",
242179
+ cause: empty$14
242180
+ };
242181
+ loggers.forEach((logger) => {
242182
+ logger.log(options);
242183
+ });
242184
+ };
242185
+ return make$88({ span(options) {
242186
+ const span = tracer.span(options);
242187
+ log(`${options.name}: started`, options.startTime);
242188
+ const oldEnd = span.end;
242189
+ span.end = (endTime, cause) => {
242190
+ const duration = nanos(endTime - span.status.startTime);
242191
+ log(`${options.name}: completed. Took ${format$3(duration)}`, endTime);
242192
+ return oldEnd.call(span, endTime, cause);
242193
+ };
242194
+ return span;
242195
+ } });
242196
+ }).pipe(effect$1(Tracer));
242309
242197
  //#endregion
242310
242198
  //#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* () {
242199
+ 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
242200
  const meta = yield* CurrentIssueSource;
242313
242201
  const source = yield* IssueSource;
242314
242202
  console.log("Issue source:", meta.name);
@@ -242332,10 +242220,10 @@ const commandProjectsLs = make$58("ls").pipe(withDescription("List configured pr
242332
242220
  })), provide(Settings.layer), provide(CurrentIssueSource.layer));
242333
242221
  //#endregion
242334
242222
  //#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));
242223
+ 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
242224
  //#endregion
242337
242225
  //#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* () {
242226
+ 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
242227
  const fs = yield* FileSystem;
242340
242228
  const pathService = yield* Path$1;
242341
242229
  const projects = yield* getAllProjects;
@@ -242351,11 +242239,11 @@ const commandProjectsRm = make$58("rm").pipe(withDescription("Remove a project f
242351
242239
  const subcommands$1 = withSubcommands([
242352
242240
  commandProjectsLs,
242353
242241
  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* () {
242242
+ 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
242243
  if ((yield* getAllProjects).length === 0) return yield* log$1("No projects available to edit.");
242356
242244
  yield* addOrUpdateProject(yield* selectProject);
242357
242245
  })), provide(Settings.layer), provide(CurrentIssueSource.layer)),
242358
- make$58("toggle").pipe(withDescription("Enable or disable configured projects for lalph runs."), withHandler(fnUntraced(function* () {
242246
+ make$60("toggle").pipe(withDescription("Enable or disable configured projects for lalph runs."), withHandler(fnUntraced(function* () {
242359
242247
  const projects = yield* getAllProjects;
242360
242248
  if (projects.length === 0) return yield* log$1("No projects available to toggle.");
242361
242249
  const enabled = yield* multiSelect({
@@ -242373,10 +242261,10 @@ const subcommands$1 = withSubcommands([
242373
242261
  })), provide(Settings.layer)),
242374
242262
  commandProjectsRm
242375
242263
  ]);
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);
242264
+ 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
242265
  //#endregion
242378
242266
  //#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* () {
242267
+ const commandSh = make$60("sh").pipe(withDescription("Launch an interactive shell in the active project's worktree."), withHandler(fnUntraced(function* () {
242380
242268
  const worktree = yield* Worktree;
242381
242269
  const fs = yield* FileSystem;
242382
242270
  const pathService = yield* Path$1;
@@ -242393,7 +242281,7 @@ const commandSh = make$58("sh").pipe(withDescription("Launch an interactive shel
242393
242281
  }, scoped$1, provide$1(Prd.layerProvided.pipe(provideMerge(layerProjectIdPrompt))))));
242394
242282
  //#endregion
242395
242283
  //#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* () {
242284
+ 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
242285
  const meta = yield* CurrentIssueSource;
242398
242286
  const source = yield* IssueSource;
242399
242287
  console.log("Issue source:", meta.name);
@@ -242414,10 +242302,10 @@ const commandAgentsLs = make$58("ls").pipe(withDescription("List configured agen
242414
242302
  })), provide(Settings.layer), provide(CurrentIssueSource.layer));
242415
242303
  //#endregion
242416
242304
  //#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));
242305
+ 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
242306
  //#endregion
242419
242307
  //#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* () {
242308
+ const commandAgentsRm = make$60("rm").pipe(withDescription("Remove an agent preset (select a preset to delete from your configuration)."), withHandler(fnUntraced(function* () {
242421
242309
  const presets = yield* getAllCliAgentPresets;
242422
242310
  if (presets.length === 0) return yield* log$1("There are no presets to remove.");
242423
242311
  const preset = yield* selectCliAgentPreset;
@@ -242429,13 +242317,13 @@ const commandAgentsRm = make$58("rm").pipe(withDescription("Remove an agent pres
242429
242317
  const subcommands = withSubcommands([
242430
242318
  commandAgentsLs,
242431
242319
  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* () {
242320
+ 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
242321
  if ((yield* getAllCliAgentPresets).length === 0) return yield* log$1("No presets available to edit.");
242434
242322
  yield* addOrUpdatePreset({ existing: yield* selectCliAgentPreset });
242435
242323
  })), provide(Settings.layer), provide(CurrentIssueSource.layer)),
242436
242324
  commandAgentsRm
242437
242325
  ]);
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);
242326
+ 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
242327
  //#endregion
242440
242328
  //#region src/cli.ts
242441
242329
  commandRoot.pipe(withSubcommands([
@@ -242448,9 +242336,7 @@ commandRoot.pipe(withSubcommands([
242448
242336
  commandProjects
242449
242337
  ]), provide(Settings.layer), provide(TracingLayer), provide(({ verbose }) => {
242450
242338
  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);
242339
+ return succeed$4(MinimumLogLevel, "All");
242340
+ }), run$5({ version }), provide$1(PlatformServices), runMain);
242455
242341
  //#endregion
242456
242342
  export {};