@dual-os/discord-api 8.0.3 → 8.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/Runner.js +229 -463
  2. package/Runner.js.map +5 -9
  3. package/bundle-inventory.json +1 -1
  4. package/dist/ForumPolling.js +6 -6
  5. package/dist/Polling.js +5 -5
  6. package/dist/activity-polling.js +6 -6
  7. package/dist/auth.js +2 -2
  8. package/dist/generated/http.js +3 -3
  9. package/dist/generated/operations.js +4 -4
  10. package/dist/generated/plugin.js +8 -8
  11. package/dist/triggers.js +8 -8
  12. package/dual-plugin.json +1 -1
  13. package/package.json +1 -1
  14. package/{plugin-tg14r6yv.js → plugin-8428jyvx.js} +179 -227
  15. package/{plugin-tg14r6yv.js.map → plugin-8428jyvx.js.map} +4 -5
  16. package/{plugin-y3q9fhxc.js → plugin-bm7a67tc.js} +8 -8
  17. package/{plugin-y3q9fhxc.js.map → plugin-bm7a67tc.js.map} +1 -1
  18. package/{plugin-t7yhht9m.js → plugin-esx1se0w.js} +6 -6
  19. package/{plugin-02y90g5j.js → plugin-f8tp9tqj.js} +5 -5
  20. package/{plugin-zvwkwdep.js → plugin-g356vwzd.js} +2 -2
  21. package/{plugin-sng34j2q.js → plugin-sqjh0hkc.js} +17 -17
  22. package/{plugin-sng34j2q.js.map → plugin-sqjh0hkc.js.map} +3 -3
  23. package/{plugin-hb9p19a2.js → plugin-wd0xmjjm.js} +4 -4
  24. package/{plugin-1yec6g7a.js → plugin-zqq54cj4.js} +6 -6
  25. /package/licenses/{@dual-os_sdk@0.8.1 → @dual-os_sdk@0.9.0}/LICENSE +0 -0
  26. /package/{plugin-t7yhht9m.js.map → plugin-esx1se0w.js.map} +0 -0
  27. /package/{plugin-02y90g5j.js.map → plugin-f8tp9tqj.js.map} +0 -0
  28. /package/{plugin-zvwkwdep.js.map → plugin-g356vwzd.js.map} +0 -0
  29. /package/{plugin-hb9p19a2.js.map → plugin-wd0xmjjm.js.map} +0 -0
  30. /package/{plugin-1yec6g7a.js.map → plugin-zqq54cj4.js.map} +0 -0
@@ -606,7 +606,7 @@ var byReferenceUnsafe = (obj) => {
606
606
  var make8 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
607
607
  var isStrictEquivalent = (x, y) => x === y;
608
608
  var strictEqual = () => isStrictEquivalent;
609
- function Tuple2(elements) {
609
+ function Tuple(elements) {
610
610
  return make8((self, that) => {
611
611
  if (self.length !== that.length) {
612
612
  return false;
@@ -1153,7 +1153,7 @@ var causeCombine = /* @__PURE__ */ dual(2, (self, that) => {
1153
1153
  var causeAddInterrupts = (self, interrupts) => {
1154
1154
  const reasons = self.reasons.slice();
1155
1155
  for (const reason of interrupts.reasons) {
1156
- if (isInterruptReason2(reason) && !reasons.some((r) => isInterruptReason2(r) && r.fiberId === reason.fiberId && r.annotations === reason.annotations)) {
1156
+ if (isInterruptReason(reason) && !reasons.some((r) => isInterruptReason(r) && r.fiberId === reason.fiberId && r.annotations === reason.annotations)) {
1157
1157
  reasons.push(reason);
1158
1158
  }
1159
1159
  }
@@ -1191,7 +1191,7 @@ var causeAnnotate = /* @__PURE__ */ dual((args) => isCause(args[0]), (self, anno
1191
1191
  });
1192
1192
  var isFailReason = (self) => self._tag === "Fail";
1193
1193
  var isDieReason = (self) => self._tag === "Die";
1194
- var isInterruptReason2 = (self) => self._tag === "Interrupt";
1194
+ var isInterruptReason = (self) => self._tag === "Interrupt";
1195
1195
  function defaultEvaluate(_fiber) {
1196
1196
  return exitDie(`Effect.evaluate: Not implemented`);
1197
1197
  }
@@ -1376,7 +1376,7 @@ var Done2 = (value) => {
1376
1376
  };
1377
1377
  };
1378
1378
  var doneVoid = /* @__PURE__ */ exitFail(DoneVoid);
1379
- var done2 = (value) => {
1379
+ var done3 = (value) => {
1380
1380
  if (value === undefined)
1381
1381
  return doneVoid;
1382
1382
  return exitFail(Done2(value));
@@ -1701,7 +1701,7 @@ var normalizeNonEmpty = (n) => Math.max(1, normalize(n));
1701
1701
 
1702
1702
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
1703
1703
  var make9 = (...elements) => elements;
1704
- var makeEquivalence2 = Tuple2;
1704
+ var makeEquivalence2 = Tuple;
1705
1705
 
1706
1706
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
1707
1707
  var headUnsafe = (self) => {
@@ -1741,7 +1741,6 @@ var constEmptyIterator = {
1741
1741
  };
1742
1742
  }
1743
1743
  };
1744
- var empty = () => constEmpty;
1745
1744
 
1746
1745
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Array.js
1747
1746
  var Array2 = globalThis.Array;
@@ -1852,7 +1851,7 @@ var hashBucketsAdd = (buckets, value) => {
1852
1851
  bucket.push(value);
1853
1852
  return true;
1854
1853
  };
1855
- var empty2 = () => [];
1854
+ var empty = () => [];
1856
1855
  var of = (a) => [a];
1857
1856
  var map3 = /* @__PURE__ */ dual(2, (self, f) => self.map(f));
1858
1857
  var flatMap2 = /* @__PURE__ */ dual(2, (self, f) => {
@@ -1891,7 +1890,7 @@ var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => {
1891
1890
  return out;
1892
1891
  });
1893
1892
  var reduce = /* @__PURE__ */ dual(3, (self, b, f) => fromIterable(self).reduce((b, a, i) => f(b, a, i), b));
1894
- var fromNullishOr2 = (a) => a == null ? empty2() : [a];
1893
+ var fromNullishOr2 = (a) => a == null ? empty() : [a];
1895
1894
  var every2 = /* @__PURE__ */ dual(2, (self, refinement) => self.every(refinement));
1896
1895
  var some2 = /* @__PURE__ */ dual(2, (self, predicate) => self.some(predicate));
1897
1896
  var makeEquivalence3 = Array_;
@@ -1987,7 +1986,7 @@ var applyOverlays = (map, overlay) => {
1987
1986
  applyOverlays(map, overlay.parent);
1988
1987
  map.set(overlay.key, overlay.value);
1989
1988
  };
1990
- var flatten2 = (self) => {
1989
+ var flatten3 = (self) => {
1991
1990
  if (self._flat)
1992
1991
  return self._flat;
1993
1992
  if (!self.overlay)
@@ -2012,7 +2011,7 @@ var lookup = (self, key) => {
2012
2011
  if (value === undefined && !impl.base.has(key))
2013
2012
  return notFound;
2014
2013
  if (impl.overlay && ++impl.baseHits >= impl.base.size && impl.baseHits >= FlattenAfterBaseHits) {
2015
- impl.base = flatten2(impl);
2014
+ impl.base = flatten3(impl);
2016
2015
  impl.overlay = undefined;
2017
2016
  impl.depth = 0;
2018
2017
  }
@@ -2024,7 +2023,7 @@ var makeUnsafe = (mapUnsafe, options) => {
2024
2023
  };
2025
2024
  var Proto = {
2026
2025
  get mapUnsafe() {
2027
- return flatten2(this);
2026
+ return flatten3(this);
2028
2027
  },
2029
2028
  ...PipeInspectableProto,
2030
2029
  [TypeId3]: {
@@ -2059,7 +2058,7 @@ var Proto = {
2059
2058
  var hasSameCache = (self, that) => self.cacheRoot === that.cacheRoot;
2060
2059
  var isContext = (u) => hasProperty(u, TypeId3);
2061
2060
  var isReference = (u) => !!u[ReferenceTypeId];
2062
- var empty7 = () => emptyContext2;
2061
+ var empty6 = () => emptyContext2;
2063
2062
  var emptyContext2 = /* @__PURE__ */ makeUnsafe(/* @__PURE__ */ new Map);
2064
2063
  var make10 = (key, service) => makeUnsafe(new Map([[key.key, service]]));
2065
2064
  var add = /* @__PURE__ */ dual(3, (self, key, service) => addUnsafe(self, key.key, service));
@@ -2461,14 +2460,6 @@ var Equivalence = (self, that) => matchPair(self, that, {
2461
2460
  var equals2 = /* @__PURE__ */ dual(2, (self, that) => Equivalence(self, that));
2462
2461
 
2463
2462
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Filter.js
2464
- var toPredicate = (self) => (input) => !isFailure3(self(input));
2465
- var has2 = (key) => (input) => input.has(key) ? succeed(input) : fail(input);
2466
- var compose = /* @__PURE__ */ dual(2, (left, right) => (input) => {
2467
- const leftOut = left(input);
2468
- if (isFailure3(leftOut))
2469
- return leftOut;
2470
- return right(leftOut.success);
2471
- });
2472
2463
  var toOption = (self) => (input) => {
2473
2464
  const result = self(input);
2474
2465
  return isFailure3(result) ? none() : some(result.success);
@@ -2883,7 +2874,7 @@ class Interrupt extends ReasonBase {
2883
2874
  };
2884
2875
  }
2885
2876
  [symbol2](that) {
2886
- return isInterruptReason2(that) && this.fiberId === that.fiberId && this.annotations === that.annotations;
2877
+ return isInterruptReason(that) && this.fiberId === that.fiberId && this.annotations === that.annotations;
2887
2878
  }
2888
2879
  [symbol]() {
2889
2880
  return string(`${this._tag}:${this.fiberId}`);
@@ -2904,7 +2895,7 @@ var findErrorOption = /* @__PURE__ */ toOption(findError);
2904
2895
  var hasDies = (self) => self.reasons.some(isDieReason);
2905
2896
  var causeElectDefects = (self) => hasDies(self) && hasFails(self) ? causeFromReasons(self.reasons.map((reason) => reason._tag === "Fail" && !isDone2(reason.error) ? new Die(reason.error, reason.annotations) : reason)) : self;
2906
2897
  var findRecoverableError = (self) => hasDies(self) ? fail(causeElectDefects(self)) : findError(self);
2907
- var hasInterrupts2 = (self) => self.reasons.some(isInterruptReason2);
2898
+ var hasInterrupts2 = (self) => self.reasons.some(isInterruptReason);
2908
2899
  var causeFilterInterruptors = (self) => {
2909
2900
  let interruptors;
2910
2901
  for (let i = 0;i < self.reasons.length; i++) {
@@ -2918,7 +2909,6 @@ var causeFilterInterruptors = (self) => {
2918
2909
  }
2919
2910
  return interruptors ? succeed(interruptors) : fail(self);
2920
2911
  };
2921
- var hasInterruptsOnly2 = (self) => self.reasons.length > 0 && self.reasons.every(isInterruptReason2);
2922
2912
  var causeMap = /* @__PURE__ */ dual(2, (self, f) => {
2923
2913
  let hasFail = false;
2924
2914
  const failures = self.reasons.map((failure) => {
@@ -3229,7 +3219,7 @@ class FiberImpl {
3229
3219
  }
3230
3220
  this._stack.length = 0;
3231
3221
  this._children = undefined;
3232
- this.context = empty7();
3222
+ this.context = empty6();
3233
3223
  const cache = this.cache;
3234
3224
  if (cache.span !== undefined || cache.stackFrame !== undefined) {
3235
3225
  this.cache = {
@@ -3435,7 +3425,7 @@ var fiberInterruptAs = /* @__PURE__ */ dual((args) => hasProperty(args[0], Fiber
3435
3425
  }));
3436
3426
  var fiberInterruptAll = (fibers) => withFiber2((parent) => {
3437
3427
  const annotations = fiberStackAnnotations(parent);
3438
- let fiberArr = empty2();
3428
+ let fiberArr = empty();
3439
3429
  for (const fiber of fibers) {
3440
3430
  fiber.interruptUnsafe(parent.id, annotations);
3441
3431
  fiberArr.push(fiber);
@@ -3791,7 +3781,7 @@ var raceAllFirst = (all, options) => withFiber2((parent) => {
3791
3781
  if (done)
3792
3782
  break;
3793
3783
  const index = i++;
3794
- const fiber = forkUnsafe(parent, effect, true, true, false);
3784
+ const fiber = forkUnsafe2(parent, effect, true, true, false);
3795
3785
  fibers.add(fiber);
3796
3786
  fiber.addObserver((exit) => {
3797
3787
  fibers.delete(fiber);
@@ -3818,7 +3808,7 @@ var flatMapEager = /* @__PURE__ */ dual(2, (self, f) => {
3818
3808
  }
3819
3809
  return flatMap5(self, f);
3820
3810
  });
3821
- var flatten3 = (self) => flatMap5(self, identity);
3811
+ var flatten4 = (self) => flatMap5(self, identity);
3822
3812
  var map6 = /* @__PURE__ */ dual(2, (self, f) => new ContImpl(self, mapCont, f));
3823
3813
  var mapEager = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMap(self, f) : map6(self, f));
3824
3814
  var mapErrorEager = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMapError(self, f) : mapError3(self, f));
@@ -3894,7 +3884,7 @@ var forever2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, options
3894
3884
  body: constant(options?.disableYield ? self : flatMap5(self, (_) => yieldNow)),
3895
3885
  step: constVoid
3896
3886
  }));
3897
- var catchCause2 = /* @__PURE__ */ dual(2, (self, f) => new OnFailureImpl(self, f.length !== 1 ? (cause) => f(cause) : f));
3887
+ var catchCause = /* @__PURE__ */ dual(2, (self, f) => new OnFailureImpl(self, f.length !== 1 ? (cause) => f(cause) : f));
3898
3888
  var OnFailureProto = /* @__PURE__ */ makePrimitiveProto({
3899
3889
  op: "OnFailure",
3900
3890
  [evaluate]: evaluateCont
@@ -3904,19 +3894,18 @@ var OnFailureImpl = function(self, f) {
3904
3894
  this[contE] = f;
3905
3895
  };
3906
3896
  OnFailureImpl.prototype = OnFailureProto;
3907
- var catchCauseIf2 = /* @__PURE__ */ dual(3, (self, predicate, f) => catchCause2(self, (cause) => {
3897
+ var catchCauseIf2 = /* @__PURE__ */ dual(3, (self, predicate, f) => catchCause(self, (cause) => {
3908
3898
  if (!predicate(cause)) {
3909
3899
  return failCause2(cause);
3910
3900
  }
3911
3901
  return f(cause);
3912
3902
  }));
3913
- var catchCauseFilter = /* @__PURE__ */ dual(3, (self, filter, f) => catchCause2(self, (cause) => {
3903
+ var catchCauseFilter = /* @__PURE__ */ dual(3, (self, filter, f) => catchCause(self, (cause) => {
3914
3904
  const eb = filter(cause);
3915
3905
  return isFailure3(eb) ? failCause2(eb.failure) : f(eb.success, cause);
3916
3906
  }));
3917
3907
  var catch_2 = /* @__PURE__ */ dual(2, (self, f) => catchCauseFilter(self, findRecoverableError, (e) => f(e)));
3918
- var tapCause2 = /* @__PURE__ */ dual(2, (self, f) => catchCause2(self, (cause) => andThen2(f(cause), failCause2(cause))));
3919
- var tapCauseFilter = /* @__PURE__ */ dual(3, (self, filter, f) => catchCause2(self, (cause) => {
3908
+ var tapCauseFilter = /* @__PURE__ */ dual(3, (self, filter, f) => catchCause(self, (cause) => {
3920
3909
  const result = filter(cause);
3921
3910
  if (isFailure3(result)) {
3922
3911
  return failCause2(cause);
@@ -3924,7 +3913,7 @@ var tapCauseFilter = /* @__PURE__ */ dual(3, (self, filter, f) => catchCause2(se
3924
3913
  return andThen2(f(result.success, cause), failCause2(cause));
3925
3914
  }));
3926
3915
  var tapError2 = /* @__PURE__ */ dual(2, (self, f) => tapCauseFilter(self, findError, (e) => f(e)));
3927
- var catchIf2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, predicate, f, orElse) => catchCause2(self, (cause) => {
3916
+ var catchIf2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, predicate, f, orElse) => catchCause(self, (cause) => {
3928
3917
  const error = findRecoverableError(cause);
3929
3918
  if (isFailure3(error))
3930
3919
  return failCause2(error.failure);
@@ -3943,7 +3932,7 @@ var catchReason2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, err
3943
3932
  return f(reason, e);
3944
3933
  return orElse ? orElse(reason, e) : fail8(e);
3945
3934
  }));
3946
- var mapError3 = /* @__PURE__ */ dual(2, (self, f) => catchCause2(self, (cause) => failCause2(causeMap(cause, f))));
3935
+ var mapError3 = /* @__PURE__ */ dual(2, (self, f) => catchCause(self, (cause) => failCause2(causeMap(cause, f))));
3947
3936
  var mapBoth = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(self, {
3948
3937
  onFailure: (cause) => failCause2(causeMap(cause, options.onFailure)),
3949
3938
  onSuccess: (a) => sync2(() => options.onSuccess(a))
@@ -4092,7 +4081,7 @@ var runFinalizer = (finalizer, exit_) => {
4092
4081
  return exitDie(defect);
4093
4082
  }
4094
4083
  };
4095
- var combineFinalizerCause = (exit_, finalizer) => exitIsSuccess(exit_) ? finalizer : catchCause2(finalizer, (cause) => failCause2(causeElectDefects(causeCombine(exit_.cause, cause))));
4084
+ var combineFinalizerCause = (exit_, finalizer) => exitIsSuccess(exit_) ? finalizer : catchCause(finalizer, (cause) => failCause2(causeElectDefects(causeCombine(exit_.cause, cause))));
4096
4085
  var scopeCloseFinalizers = /* @__PURE__ */ fnUntraced2(function* (self, finalizers, exit_) {
4097
4086
  let exits = [];
4098
4087
  const fibers = [];
@@ -4103,7 +4092,7 @@ var scopeCloseFinalizers = /* @__PURE__ */ fnUntraced2(function* (self, finalize
4103
4092
  if (self.strategy === "sequential") {
4104
4093
  exits.push(yield* exit(runFinalizer(finalizer, exit_)));
4105
4094
  } else if (key !== parent) {
4106
- fibers.push(forkUnsafe(parent, runFinalizer(finalizer, exit_), true, true, "inherit"));
4095
+ fibers.push(forkUnsafe2(parent, runFinalizer(finalizer, exit_), true, true, "inherit"));
4107
4096
  }
4108
4097
  }
4109
4098
  if (fibers.length > 0) {
@@ -4111,7 +4100,6 @@ var scopeCloseFinalizers = /* @__PURE__ */ fnUntraced2(function* (self, finalize
4111
4100
  }
4112
4101
  return yield* exitAsVoidAll(exits);
4113
4102
  });
4114
- var scopeFork = (scope, finalizerStrategy) => sync2(() => scopeForkUnsafe(scope, finalizerStrategy));
4115
4103
  var scopeForkUnsafe = (scope, finalizerStrategy) => {
4116
4104
  const child = makeScope(finalizerStrategy, scope);
4117
4105
  if (scope.state._tag === "Closed") {
@@ -4175,6 +4163,7 @@ var makeScope = (finalizerStrategy = "sequential", parent) => ({
4175
4163
  var constScopeEmpty = {
4176
4164
  _tag: "Empty"
4177
4165
  };
4166
+ var scopeMake = (finalizerStrategy) => sync2(() => scopeMakeUnsafe(finalizerStrategy));
4178
4167
  var scope2 = scopeTag;
4179
4168
  var provideScope = /* @__PURE__ */ provideService2(scopeTag);
4180
4169
  var scoped2 = (self) => withFiber2((fiber) => {
@@ -4478,7 +4467,7 @@ var iterateConcurrentImpl = (options) => {
4478
4467
  });
4479
4468
  } else {
4480
4469
  effect = undefined;
4481
- const fiber = forkUnsafe(parentFiber, eff, true, true, "inherit");
4470
+ const fiber = forkUnsafe2(parentFiber, eff, true, true, "inherit");
4482
4471
  if (fiber._exit) {
4483
4472
  terminal = step(state, item, fiber._exit, index);
4484
4473
  if (terminal)
@@ -4559,9 +4548,9 @@ var forEachConcurrent = /* @__PURE__ */ iterateConcurrentImpl({
4559
4548
  });
4560
4549
  var forkChild2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, options) => withFiber2((fiber) => {
4561
4550
  interruptChildrenPatch();
4562
- return succeed6(forkUnsafe(fiber, self, options?.startImmediately, false, options?.uninterruptible ?? false));
4551
+ return succeed6(forkUnsafe2(fiber, self, options?.startImmediately, false, options?.uninterruptible ?? false));
4563
4552
  }));
4564
- var forkUnsafe = (parent, effect, immediate = false, daemon = false, uninterruptible = false) => {
4553
+ var forkUnsafe2 = (parent, effect, immediate = false, daemon = false, uninterruptible = false) => {
4565
4554
  const parentRuntime = parent;
4566
4555
  const interruptible = uninterruptible === "inherit" ? parentRuntime.interruptible : !uninterruptible;
4567
4556
  const child = new FiberImpl(parentRuntime.context, interruptible);
@@ -4579,7 +4568,7 @@ var forkUnsafe = (parent, effect, immediate = false, daemon = false, uninterrupt
4579
4568
  };
4580
4569
  var fiberScopeFinalizer = (fiber) => () => withFiber2((current) => current === fiber ? void_3 : fiberInterrupt(fiber));
4581
4570
  var forkIn2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, scope, options) => withFiber2((parent) => {
4582
- const fiber = scope.state._tag === "Closed" ? new FiberImpl(parent.context) : forkUnsafe(parent, self, options?.startImmediately, true, options?.uninterruptible);
4571
+ const fiber = scope.state._tag === "Closed" ? new FiberImpl(parent.context) : forkUnsafe2(parent, self, options?.startImmediately, true, options?.uninterruptible);
4583
4572
  if (!fiber._exit) {
4584
4573
  if (scope.state._tag !== "Closed") {
4585
4574
  scopeAddFinalizerUnsafe(scope, fiber, fiberScopeFinalizer(fiber));
@@ -4624,8 +4613,21 @@ var fiberRunIn = /* @__PURE__ */ dual(2, (self, scope) => {
4624
4613
  self.addObserver(() => scopeRemoveFinalizerUnsafe(scope, self));
4625
4614
  return self;
4626
4615
  });
4627
- var runFork2 = /* @__PURE__ */ runForkWith2(/* @__PURE__ */ empty7());
4628
- var runPromiseExitWith = (context) => {
4616
+ var runFork2 = /* @__PURE__ */ runForkWith2(/* @__PURE__ */ empty6());
4617
+ var runCallbackWith2 = (context) => {
4618
+ const runFork = runForkWith2(context);
4619
+ return (effect, options) => {
4620
+ const fiber = runFork(effect, options);
4621
+ if (options?.onExit) {
4622
+ fiber.addObserver(options.onExit);
4623
+ }
4624
+ return (interruptor) => {
4625
+ return fiber.interruptUnsafe(interruptor);
4626
+ };
4627
+ };
4628
+ };
4629
+ var runCallback2 = /* @__PURE__ */ runCallbackWith2(/* @__PURE__ */ empty6());
4630
+ var runPromiseExitWith2 = (context) => {
4629
4631
  const runFork = runForkWith2(context);
4630
4632
  return (effect, options) => {
4631
4633
  const fiber = runFork(effect, options);
@@ -4634,8 +4636,9 @@ var runPromiseExitWith = (context) => {
4634
4636
  });
4635
4637
  };
4636
4638
  };
4637
- var runPromiseWith = (context) => {
4638
- const runPromiseExit = runPromiseExitWith(context);
4639
+ var runPromiseExit2 = /* @__PURE__ */ runPromiseExitWith2(/* @__PURE__ */ empty6());
4640
+ var runPromiseWith2 = (context) => {
4641
+ const runPromiseExit = runPromiseExitWith2(context);
4639
4642
  return (effect, options) => runPromiseExit(effect, options).then((exit) => {
4640
4643
  if (exit._tag === "Failure") {
4641
4644
  throw causeSquash(exit.cause);
@@ -4643,8 +4646,8 @@ var runPromiseWith = (context) => {
4643
4646
  return exit.value;
4644
4647
  });
4645
4648
  };
4646
- var runPromise = /* @__PURE__ */ runPromiseWith(/* @__PURE__ */ empty7());
4647
- var runSyncExitWith = (context) => {
4649
+ var runPromise2 = /* @__PURE__ */ runPromiseWith2(/* @__PURE__ */ empty6());
4650
+ var runSyncExitWith2 = (context) => {
4648
4651
  const runFork = runForkWith2(context);
4649
4652
  return (effect) => {
4650
4653
  if (effectIsExit(effect))
@@ -4657,9 +4660,9 @@ var runSyncExitWith = (context) => {
4657
4660
  return fiber._exit ?? exitDie(new AsyncFiberError(fiber));
4658
4661
  };
4659
4662
  };
4660
- var runSyncExit = /* @__PURE__ */ runSyncExitWith(/* @__PURE__ */ empty7());
4661
- var runSyncWith = (context) => {
4662
- const runSyncExit = runSyncExitWith(context);
4663
+ var runSyncExit2 = /* @__PURE__ */ runSyncExitWith2(/* @__PURE__ */ empty6());
4664
+ var runSyncWith2 = (context) => {
4665
+ const runSyncExit = runSyncExitWith2(context);
4663
4666
  return (effect) => {
4664
4667
  const exit = runSyncExit(effect);
4665
4668
  if (exit._tag === "Failure")
@@ -4667,7 +4670,7 @@ var runSyncWith = (context) => {
4667
4670
  return exit.value;
4668
4671
  };
4669
4672
  };
4670
- var runSync = /* @__PURE__ */ runSyncWith(/* @__PURE__ */ empty7());
4673
+ var runSync2 = /* @__PURE__ */ runSyncWith2(/* @__PURE__ */ empty6());
4671
4674
  var succeedTrue = /* @__PURE__ */ succeed6(true);
4672
4675
  var succeedFalse = /* @__PURE__ */ succeed6(false);
4673
4676
 
@@ -4789,7 +4792,7 @@ var makeSpanUnsafe = (fiber, name, options) => {
4789
4792
  span = noopSpan({
4790
4793
  name,
4791
4794
  parent,
4792
- annotations: add(options?.annotations ?? empty7(), DisablePropagation, true)
4795
+ annotations: add(options?.annotations ?? empty6(), DisablePropagation, true)
4793
4796
  });
4794
4797
  } else {
4795
4798
  const tracer = fiber.cache.tracer ?? nativeTracer;
@@ -4802,7 +4805,7 @@ var makeSpanUnsafe = (fiber, name, options) => {
4802
4805
  span = tracer.span({
4803
4806
  name,
4804
4807
  parent,
4805
- annotations: options?.annotations ?? empty7(),
4808
+ annotations: options?.annotations ?? empty6(),
4806
4809
  links,
4807
4810
  startTime: timingEnabled ? clock.currentTimeNanosUnsafe() : bigint02,
4808
4811
  kind: options?.kind ?? "internal",
@@ -5156,7 +5159,6 @@ var DeferredImpl = function() {
5156
5159
  };
5157
5160
  DeferredImpl.prototype = DeferredProto;
5158
5161
  var makeUnsafe2 = () => new DeferredImpl;
5159
- var make = () => sync2(() => makeUnsafe2());
5160
5162
  var _await = (self) => callback3((resume) => {
5161
5163
  if (self.effect)
5162
5164
  return resume(self.effect);
@@ -5172,8 +5174,8 @@ var _await = (self) => callback3((resume) => {
5172
5174
  });
5173
5175
  });
5174
5176
  var completeWith = /* @__PURE__ */ dual(2, (self, effect) => sync2(() => doneUnsafe(self, effect)));
5175
- var done3 = completeWith;
5176
- var fail4 = /* @__PURE__ */ dual(2, (self, error) => done3(self, exitFail(error)));
5177
+ var done2 = completeWith;
5178
+ var fail4 = /* @__PURE__ */ dual(2, (self, error) => done2(self, exitFail(error)));
5177
5179
  var isDone = (self) => sync2(() => isDoneUnsafe(self));
5178
5180
  var isDoneUnsafe = (self) => self.effect !== undefined;
5179
5181
  var doneUnsafe = (self, effect) => {
@@ -5189,19 +5191,18 @@ var doneUnsafe = (self, effect) => {
5189
5191
  }
5190
5192
  return true;
5191
5193
  };
5192
- var into = /* @__PURE__ */ dual(2, (self, deferred) => uninterruptibleMask2((restore) => flatMap5(exit(restore(self)), (exit) => done3(deferred, exit))));
5193
5194
 
5194
5195
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/References.js
5195
5196
  var TracerTimingEnabled2 = TracerTimingEnabled;
5196
5197
 
5197
5198
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Scope.js
5198
5199
  var Scope = scopeTag;
5200
+ var make = scopeMake;
5199
5201
  var makeUnsafe3 = scopeMakeUnsafe;
5200
- var provide3 = provideScope;
5202
+ var provide2 = provideScope;
5201
5203
  var addFinalizerExit = scopeAddFinalizerExit;
5202
5204
  var addFinalizer = scopeAddFinalizer;
5203
- var fork = scopeFork;
5204
- var forkUnsafe2 = scopeForkUnsafe;
5205
+ var forkUnsafe = scopeForkUnsafe;
5205
5206
  var close = scopeClose;
5206
5207
 
5207
5208
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Layer.js
@@ -5244,7 +5245,7 @@ var fromBuildUnsafe = (build) => {
5244
5245
  return self;
5245
5246
  };
5246
5247
  var fromBuild = (build) => fromBuildUnsafe((memoMap, scope) => {
5247
- const layerScope = forkUnsafe2(scope);
5248
+ const layerScope = forkUnsafe(scope);
5248
5249
  return onExit2(build(memoMap, layerScope), (exit) => exit._tag === "Failure" ? close(layerScope, exit) : void_3);
5249
5250
  });
5250
5251
  var fromBuildMemo = (build) => {
@@ -5306,7 +5307,7 @@ var succeed3 = function() {
5306
5307
  return succeedContext(make10(arguments[0], arguments[1]));
5307
5308
  };
5308
5309
  var succeedContext = (context) => fromBuildUnsafe(constant(succeed6(context)));
5309
- var empty8 = /* @__PURE__ */ succeedContext(/* @__PURE__ */ empty7());
5310
+ var empty7 = /* @__PURE__ */ succeedContext(/* @__PURE__ */ empty6());
5310
5311
  var effect = function() {
5311
5312
  if (arguments.length === 1) {
5312
5313
  return (effect) => effectImpl(arguments[0], effect);
@@ -5314,10 +5315,10 @@ var effect = function() {
5314
5315
  return effectImpl(arguments[0], arguments[1]);
5315
5316
  };
5316
5317
  var effectImpl = (service, effect) => effectContext(map6(effect, (value) => make10(service, value)));
5317
- var effectContext = (effect) => fromBuildMemo((_, scope) => provide3(effect, scope));
5318
+ var effectContext = (effect) => fromBuildMemo((_, scope) => provide2(effect, scope));
5318
5319
  var mergeAllEffect = (layers, memoMap, scope) => {
5319
- const parentScope = forkUnsafe2(scope, "parallel");
5320
- return forEach2(layers, (layer) => layer.build(memoMap, forkUnsafe2(parentScope, "sequential")), {
5320
+ const parentScope = forkUnsafe(scope, "parallel");
5321
+ return forEach2(layers, (layer) => layer.build(memoMap, forkUnsafe(parentScope, "sequential")), {
5321
5322
  concurrency: layers.length
5322
5323
  }).pipe(map6((context) => mergeAll2(...context)));
5323
5324
  };
@@ -5329,19 +5330,16 @@ var provideMerge = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, tha
5329
5330
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Cause.js
5330
5331
  var isCause2 = isCause;
5331
5332
  var isFailReason2 = isFailReason;
5332
- var isInterruptReason = isInterruptReason2;
5333
5333
  var fromReasons = causeFromReasons;
5334
5334
  var fail2 = causeFail;
5335
5335
  var die3 = causeDie;
5336
- var hasInterruptsOnly = hasInterruptsOnly2;
5337
5336
  var map7 = causeMap;
5338
5337
  var squash = causeSquash;
5339
5338
  var findErrorOption2 = findErrorOption;
5340
5339
  var hasInterrupts = hasInterrupts2;
5341
- var filterInterruptors = causeFilterInterruptors;
5342
5340
  var isDone3 = isDone2;
5343
5341
  var Done = Done2;
5344
- var done = done2;
5342
+ var done = done3;
5345
5343
  var IllegalArgumentError2 = IllegalArgumentError;
5346
5344
  var UnknownError = UnknownError2;
5347
5345
 
@@ -5884,10 +5882,6 @@ var matchEffect3 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(s
5884
5882
  }
5885
5883
  }));
5886
5884
 
5887
- // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/layer.js
5888
- var provideLayer = (self, layer, options) => scopedWith((scope) => flatMap5(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope) : buildWithScope(layer, scope), (context) => provideContext2(self, context)));
5889
- var provide4 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, source, options) => isContext(source) ? provideContext2(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll(...source) : source, options));
5890
-
5891
5885
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Effect.js
5892
5886
  var isEffect = isEffect2;
5893
5887
  var all = all3;
@@ -5915,7 +5909,7 @@ var withFiber = withFiber2;
5915
5909
  var fromResult2 = fromResult;
5916
5910
  var fromOption2 = fromOption4;
5917
5911
  var flatMap3 = flatMap5;
5918
- var flatten4 = flatten3;
5912
+ var flatten2 = flatten4;
5919
5913
  var andThen = andThen2;
5920
5914
  var tap = tap2;
5921
5915
  var result = result2;
@@ -5929,13 +5923,12 @@ var zipWith = zipWith3;
5929
5923
  var catch_ = catch_2;
5930
5924
  var catchTag = catchTag2;
5931
5925
  var catchReason = catchReason2;
5932
- var catchCause = catchCause2;
5926
+ var catchCause2 = catchCause;
5933
5927
  var catchIf = catchIf2;
5934
5928
  var catchCauseIf = catchCauseIf2;
5935
5929
  var mapError = mapError3;
5936
5930
  var orDie = orDie2;
5937
5931
  var tapError3 = tapError2;
5938
- var tapCause = tapCause2;
5939
5932
  var ignore = ignore2;
5940
5933
  var ignoreCause = ignoreCause2;
5941
5934
  var orElseSucceed2 = orElseSucceed;
@@ -5945,7 +5938,6 @@ var matchCauseEffect2 = matchCauseEffect;
5945
5938
  var matchEffect = matchEffect2;
5946
5939
  var context = context2;
5947
5940
  var contextWith2 = contextWith;
5948
- var provide2 = provide4;
5949
5941
  var provideContext = provideContext2;
5950
5942
  var serviceOption = serviceOption2;
5951
5943
  var updateContext2 = updateContext;
@@ -5972,13 +5964,19 @@ var forkIn = forkIn2;
5972
5964
  var forkScoped = forkScoped2;
5973
5965
  var runFork = runFork2;
5974
5966
  var runForkWith = runForkWith2;
5975
- var runPromise2 = runPromise;
5976
- var runSync2 = runSync;
5977
- var runSyncExit2 = runSyncExit;
5967
+ var runCallbackWith = runCallbackWith2;
5968
+ var runCallback = runCallback2;
5969
+ var runPromise = runPromise2;
5970
+ var runPromiseWith = runPromiseWith2;
5971
+ var runPromiseExit = runPromiseExit2;
5972
+ var runPromiseExitWith = runPromiseExitWith2;
5973
+ var runSync = runSync2;
5974
+ var runSyncWith = runSyncWith2;
5975
+ var runSyncExit = runSyncExit2;
5976
+ var runSyncExitWith = runSyncExitWith2;
5978
5977
  var fnUntraced = fnUntraced2;
5979
5978
  var fn = fn2;
5980
5979
  var clockWith = clockWith2;
5981
- var logError = /* @__PURE__ */ logWithLevel("Error");
5982
5980
  var effectify = (fn, onError, onSyncError) => (...args) => callback((resume) => {
5983
5981
  let synchronous = true;
5984
5982
  let pending;
@@ -6620,12 +6618,12 @@ class HashMapImpl {
6620
6618
  }
6621
6619
  var emptyNode = /* @__PURE__ */ new EmptyNode;
6622
6620
  var isHashMap = (u) => hasProperty(u, HashMapTypeId);
6623
- var empty9 = () => new HashMapImpl(false, 0, emptyNode, 0);
6621
+ var empty8 = () => new HashMapImpl(false, 0, emptyNode, 0);
6624
6622
  var get6 = /* @__PURE__ */ dual(2, (self, key) => {
6625
6623
  const impl = self;
6626
6624
  return impl._root.get(0, hash(key), key);
6627
6625
  });
6628
- var has4 = /* @__PURE__ */ dual(2, (self, key) => {
6626
+ var has3 = /* @__PURE__ */ dual(2, (self, key) => {
6629
6627
  const impl = self;
6630
6628
  return impl._root.has(0, hash(key), key);
6631
6629
  });
@@ -6662,7 +6660,7 @@ var HashSetProto = {
6662
6660
  return optimize(combine(hashSetSeed, hash(keyMap(this))));
6663
6661
  },
6664
6662
  [symbol2](that) {
6665
- return isHashSet(that) && size2(this) === size2(that) && every3(this, (value) => has5(that, value));
6663
+ return isHashSet(that) && size2(this) === size2(that) && every3(this, (value) => has4(that, value));
6666
6664
  },
6667
6665
  [Symbol.iterator]() {
6668
6666
  return keys2(keyMap(this));
@@ -6692,13 +6690,13 @@ var makeImpl2 = (keyMap) => {
6692
6690
  var isHashSet = (u) => hasProperty(u, HashSetTypeId);
6693
6691
  var keyMap = (self) => self.keyMap;
6694
6692
  var fromIterable4 = (values) => {
6695
- let map = empty9();
6693
+ let map = empty8();
6696
6694
  for (const value of values) {
6697
6695
  map = set2(map, value, true);
6698
6696
  }
6699
6697
  return makeImpl2(map);
6700
6698
  };
6701
- var has5 = (self, value) => has4(keyMap(self), value);
6699
+ var has4 = (self, value) => has3(keyMap(self), value);
6702
6700
  var size2 = (self) => size(keyMap(self));
6703
6701
  var every3 = (self, predicate) => {
6704
6702
  for (const value of self) {
@@ -6711,7 +6709,7 @@ var every3 = (self, predicate) => {
6711
6709
 
6712
6710
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/HashSet.js
6713
6711
  var fromIterable2 = fromIterable4;
6714
- var has3 = /* @__PURE__ */ dual(2, has5);
6712
+ var has2 = /* @__PURE__ */ dual(2, has4);
6715
6713
  var size3 = size2;
6716
6714
 
6717
6715
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/encoding/Base64.js
@@ -7137,10 +7135,10 @@ var Proto5 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
7137
7135
  });
7138
7136
  var make15 = (input) => Object.assign(Object.create(Proto5), input);
7139
7137
  var Equivalence3 = /* @__PURE__ */ makeEquivalence(/* @__PURE__ */ strictEqual());
7140
- var empty3 = /* @__PURE__ */ Object.create(Proto5);
7138
+ var empty2 = /* @__PURE__ */ Object.create(Proto5);
7141
7139
  var fromInput = (input) => {
7142
7140
  if (input === undefined) {
7143
- return empty3;
7141
+ return empty2;
7144
7142
  } else if (Symbol.iterator in input) {
7145
7143
  const out = Object.create(Proto5);
7146
7144
  for (const [k, v] of input) {
@@ -7301,7 +7299,7 @@ var fromInputNested = (input) => {
7301
7299
  var coerce = (value) => isRedacted(value) ? value : String(value);
7302
7300
  var Equivalence4 = /* @__PURE__ */ make8((a, b) => arrayEquivalence(a.params, b.params));
7303
7301
  var arrayEquivalence = /* @__PURE__ */ makeEquivalence3(/* @__PURE__ */ makeEquivalence2([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
7304
- var empty4 = /* @__PURE__ */ make16([]);
7302
+ var empty3 = /* @__PURE__ */ make16([]);
7305
7303
  var getFirst = /* @__PURE__ */ dual(2, (self, key) => findFirst(self.params, ([k]) => k === key).pipe(map(([, value]) => unwrap3(value))));
7306
7304
  var set5 = /* @__PURE__ */ dual(3, (self, key, value) => make16(append(filter2(self.params, ([k]) => k !== key), [key, coerce(value)])));
7307
7305
  var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
@@ -7371,7 +7369,7 @@ var decodeQueryKey = (key) => {
7371
7369
  return key;
7372
7370
  }
7373
7371
  };
7374
- var currentRedactedNames = () => get(globalThis[currentFiberTypeId]?.context ?? empty7(), CurrentRedactedNames2);
7372
+ var currentRedactedNames = () => get(globalThis[currentFiberTypeId]?.context ?? empty6(), CurrentRedactedNames2);
7375
7373
  var CurrentRedactedNames2 = /* @__PURE__ */ Reference("effect/http/UrlParams/CurrentRedactedNames", {
7376
7374
  defaultValue: () => ["X-Amz-Signature", "X-Amz-Credential", "X-Amz-Security-Token", "AWSAccessKeyId", "Signature", "sig", "X-Goog-Signature"]
7377
7375
  });
@@ -7724,7 +7722,7 @@ var runGetter = (self, input, options) => {
7724
7722
  };
7725
7723
  var makeGetter = (fields) => Object.assign(Object.create(Prototype2), fields);
7726
7724
  var composeOptionalEffect = (first, second) => transformOptionalEffect((input, options) => flatMapEager2(runGetter(first, input, options), (output) => runGetter(second, output, options)));
7727
- var compose2 = /* @__PURE__ */ dual(2, (self, other) => {
7725
+ var compose = /* @__PURE__ */ dual(2, (self, other) => {
7728
7726
  if (self._tag === "Passthrough")
7729
7727
  return other;
7730
7728
  if (other._tag === "Passthrough")
@@ -8629,7 +8627,7 @@ var Objects = class extends ASTNodeImpl {
8629
8627
  }
8630
8628
  }
8631
8629
  } else if (parseIndexes) {
8632
- const keyPairs = empty2();
8630
+ const keyPairs = empty();
8633
8631
  for (let i = 0;i < indexCount; i++) {
8634
8632
  const index = indexes[i];
8635
8633
  const keys = indexKeys?.[i] ?? (index.is.parameter === string2 ? Object.keys(record) : getIndexSignatureKeys(record, index.is.parameter, options));
@@ -9147,7 +9145,7 @@ function failSingleUnionCandidate(ast, cause, input, options) {
9147
9145
  return fail3(new AnyOf(ast, [issue], input, options));
9148
9146
  }
9149
9147
  function catchSingleUnionCandidate(ast, result, input, options) {
9150
- return catchCause(result, (cause) => failSingleUnionCandidate(ast, cause, input, options));
9148
+ return catchCause2(result, (cause) => failSingleUnionCandidate(ast, cause, input, options));
9151
9149
  }
9152
9150
  function parseUnionCandidates(ast, parser, candidates, input, options) {
9153
9151
  const state = {
@@ -9793,7 +9791,7 @@ function compileTransformationUnsafe(transformation) {
9793
9791
  }
9794
9792
  }
9795
9793
  var fromOptionalEffect = (effect) => flatMapEager2(effect, fromOptionExit);
9796
- var wrapEncoding = (ast, input, options, effect) => catchCause(effect, (cause) => failCauseSync2(() => map7(cause, (issue) => new Encoding(ast, issue, input, options))));
9794
+ var wrapEncoding = (ast, input, options, effect) => catchCause2(effect, (cause) => failCauseSync2(() => map7(cause, (issue) => new Encoding(ast, issue, input, options))));
9797
9795
  function makeConstructorParser(descriptor, compile) {
9798
9796
  const transform = compileTransformation(descriptor.link.transformation);
9799
9797
  let sourceParser;
@@ -10049,7 +10047,7 @@ function makeEffect(schema) {
10049
10047
  function makeOption(schema) {
10050
10048
  const parser = makeEffect(schema);
10051
10049
  return (input, options) => {
10052
- const exit = runSyncExit2(parser(input, options));
10050
+ const exit = runSyncExit(parser(input, options));
10053
10051
  if (isSuccess2(exit)) {
10054
10052
  return some(exit.value);
10055
10053
  }
@@ -10088,7 +10086,7 @@ function makeIs(ast) {
10088
10086
  }
10089
10087
  const parser = entry.parser;
10090
10088
  return (input) => {
10091
- const exit = runSyncExit2(parserResult(parser(input, defaultParseOptions), input));
10089
+ const exit = runSyncExit(parserResult(parser(input, defaultParseOptions), input));
10092
10090
  if (isSuccess2(exit))
10093
10091
  return true;
10094
10092
  getSchemaIssueOrThrow(exit.cause, "Type guard adapter can only return false for schema issues");
@@ -10156,7 +10154,7 @@ function runWithCompiler(compiler, ast) {
10156
10154
  };
10157
10155
  }
10158
10156
  function asExit(parser) {
10159
- return (input, options) => runSyncExit2(parser(input, options));
10157
+ return (input, options) => runSyncExit(parser(input, options));
10160
10158
  }
10161
10159
  function asOption(parser) {
10162
10160
  const parserExit = asExit(parser);
@@ -10170,7 +10168,7 @@ function asOption(parser) {
10170
10168
  };
10171
10169
  }
10172
10170
  function runSync3(effect, message) {
10173
- const exit = runSyncExit2(effect);
10171
+ const exit = runSyncExit(effect);
10174
10172
  if (isSuccess2(exit)) {
10175
10173
  return exit.value;
10176
10174
  }
@@ -11834,7 +11832,7 @@ function fromIssueEffect(self) {
11834
11832
  if (effectIsExit(self)) {
11835
11833
  return fromIssueExit(self);
11836
11834
  }
11837
- return catchCause(self, (cause) => failCauseSync2(() => map7(cause, (issue) => new SchemaError(issue))));
11835
+ return catchCause2(self, (cause) => failCauseSync2(() => map7(cause, (issue) => new SchemaError(issue))));
11838
11836
  }
11839
11837
  function fromIssueExit(exit) {
11840
11838
  return isSuccess2(exit) ? exit : failCause3(map7(exit.cause, (issue) => new SchemaError(issue)));
@@ -11857,7 +11855,7 @@ function getSchemaErrorOrThrow(cause, message) {
11857
11855
  return schemaError;
11858
11856
  }
11859
11857
  function runSchemaErrorSync(self) {
11860
- const exit = runSyncExit2(self);
11858
+ const exit = runSyncExit(self);
11861
11859
  if (isSuccess2(exit)) {
11862
11860
  return exit.value;
11863
11861
  }
@@ -11968,7 +11966,7 @@ function makeTuple(ast, elements) {
11968
11966
  }
11969
11967
  });
11970
11968
  }
11971
- function Tuple(elements) {
11969
+ function Tuple2(elements) {
11972
11970
  return makeTuple(tuple(elements), elements);
11973
11971
  }
11974
11972
  var ArraySchema = /* @__PURE__ */ lambda((schema) => make19(new Arrays(false, [], [schema.ast]), {
@@ -12923,7 +12921,6 @@ var Json = /* @__PURE__ */ make19(/* @__PURE__ */ annotate(Json2, {
12923
12921
  var await_ = fiberAwait;
12924
12922
  var join2 = fiberJoin;
12925
12923
  var interrupt2 = fiberInterrupt;
12926
- var interruptAll = fiberInterruptAll;
12927
12924
  var getCurrent = getCurrentFiber;
12928
12925
  var runIn = fiberRunIn;
12929
12926
 
@@ -13461,13 +13458,13 @@ var ChannelProto = {
13461
13458
  };
13462
13459
  var fromTransform = (transform) => {
13463
13460
  const self = Object.create(ChannelProto);
13464
- self.transform = (upstream, scope) => catchCause(transform(upstream, scope), (cause) => succeed4(failCause(cause)));
13461
+ self.transform = (upstream, scope) => catchCause2(transform(upstream, scope), (cause) => succeed4(failCause(cause)));
13465
13462
  return self;
13466
13463
  };
13467
13464
  var transformPull = (self, f) => fromTransform((upstream, scope) => flatMap3(toTransform(self)(upstream, scope), (pull) => f(pull, scope)));
13468
13465
  var fromPull2 = (effect) => fromTransform((_, __) => effect);
13469
13466
  var fromTransformBracket = (f) => fromTransform(fnUntraced(function* (upstream, scope) {
13470
- const closableScope = forkUnsafe2(scope);
13467
+ const closableScope = forkUnsafe(scope);
13471
13468
  const onCause = (cause) => close(closableScope, doneExitFromCause(cause));
13472
13469
  const pull = yield* onError(f(upstream, scope, closableScope), onCause);
13473
13470
  return onError(pull, onCause);
@@ -13477,7 +13474,7 @@ var DefaultChunkSize = 4096;
13477
13474
  var asyncQueue = (scope, f, options) => make2({
13478
13475
  capacity: options?.bufferSize,
13479
13476
  strategy: options?.strategy
13480
- }).pipe(tap((queue) => addFinalizer(scope, shutdown(queue))), tap((queue) => provide3(f(queue), scope).pipe(catchCause((cause) => failCause4(queue, cause)), forkIn(scope, {
13477
+ }).pipe(tap((queue) => addFinalizer(scope, shutdown(queue))), tap((queue) => provide2(f(queue), scope).pipe(catchCause2((cause) => failCause4(queue, cause)), forkIn(scope, {
13481
13478
  startImmediately: true
13482
13479
  }))));
13483
13480
  var callbackArray = (f, options) => fromTransform((_, scope) => map4(asyncQueue(scope, f, options), takeAll2));
@@ -13508,7 +13505,7 @@ var fromIteratorArray = (iterator, chunkSize = DefaultChunkSize) => {
13508
13505
  };
13509
13506
  var fromIterableArray = (iterable, chunkSize = DefaultChunkSize) => fromIteratorArray(() => iterable[Symbol.iterator](), chunkSize);
13510
13507
  var succeed8 = (value) => fromEffect2(succeed4(value));
13511
- var empty11 = /* @__PURE__ */ fromPull2(/* @__PURE__ */ succeed4(/* @__PURE__ */ done()));
13508
+ var empty10 = /* @__PURE__ */ fromPull2(/* @__PURE__ */ succeed4(/* @__PURE__ */ done()));
13512
13509
  var fail10 = (error) => fromPull2(succeed4(fail5(error)));
13513
13510
  var fromEffect2 = (effect) => fromPull2(sync(() => {
13514
13511
  let done2 = false;
@@ -13582,13 +13579,13 @@ var mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntraced(
13582
13579
  return void_2;
13583
13580
  }), forever({
13584
13581
  disableYield: true
13585
- }), catchCause((cause) => semaphore.withPermits(concurrencyN - 1)(failCause4(queue, cause))), forkIn(forkedScope));
13582
+ }), catchCause2((cause) => semaphore.withPermits(concurrencyN - 1)(failCause4(queue, cause))), forkIn(forkedScope));
13586
13583
  } else {
13587
13584
  const effects = yield* bounded(concurrencyN - 2);
13588
13585
  yield* addFinalizer(forkedScope, shutdown(effects));
13589
- yield* take(effects).pipe(flatten4, flatMap3((value) => offer(queue, value)), forever({
13586
+ yield* take(effects).pipe(flatten2, flatMap3((value) => offer(queue, value)), forever({
13590
13587
  disableYield: true
13591
- }), catchCause((cause) => failCause4(queue, cause)), forkIn(forkedScope));
13588
+ }), catchCause2((cause) => failCause4(queue, cause)), forkIn(forkedScope));
13592
13589
  let errorCause;
13593
13590
  const onExit = (exit) => {
13594
13591
  if (exit._tag === "Success")
@@ -13606,7 +13603,7 @@ var mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntraced(
13606
13603
  return offer(effects, join2(fiber));
13607
13604
  }), forever({
13608
13605
  disableYield: true
13609
- }), catchCause((cause) => offer(effects, failCause3(cause)).pipe(andThen(failCause4(effects, cause)))), forkIn(forkedScope));
13606
+ }), catchCause2((cause) => offer(effects, failCause3(cause)).pipe(andThen(failCause4(effects, cause)))), forkIn(forkedScope));
13610
13607
  }
13611
13608
  return take(queue);
13612
13609
  }));
@@ -13615,7 +13612,7 @@ var flatMapSequential = (self, f) => fromTransform((upstream, scope) => map4(toT
13615
13612
  let childPull;
13616
13613
  let childScope;
13617
13614
  const makePull = flatMap3(pull, (value) => {
13618
- childScope ??= forkUnsafe2(scope);
13615
+ childScope ??= forkUnsafe(scope);
13619
13616
  return flatMapEager2(toTransform(f(value))(upstream, childScope), (pull) => {
13620
13617
  childPull = catchHalt(pull);
13621
13618
  return childPull;
@@ -13695,7 +13692,7 @@ var mergeAll3 = /* @__PURE__ */ dual(2, (channels, {
13695
13692
  }
13696
13693
  }
13697
13694
  const channel = pullFiber === undefined ? yield* pull : yield* join2(pullFiber);
13698
- const childScope = forkUnsafe2(forkedScope);
13695
+ const childScope = forkUnsafe(forkedScope);
13699
13696
  const childPull = yield* toTransform(channel)(upstream, childScope);
13700
13697
  while (fibers.size >= concurrencyN) {
13701
13698
  const [fiber, fiberScope] = headUnsafe(fibers);
@@ -13724,7 +13721,7 @@ var mergeAll3 = /* @__PURE__ */ dual(2, (channels, {
13724
13721
  doneLatch.closeUnsafe();
13725
13722
  fibers.set(fiber, childScope);
13726
13723
  }
13727
- }).pipe(catchCause((cause) => {
13724
+ }).pipe(catchCause2((cause) => {
13728
13725
  const halt = filterDone(cause);
13729
13726
  if (isSuccess(halt)) {
13730
13727
  return doneLatch.whenOpen(failCause4(queue, cause));
@@ -13760,8 +13757,8 @@ var merge4 = /* @__PURE__ */ dual((args) => isChannel(args[0]) && isChannel(args
13760
13757
  onFailure: (cause) => onExit(side, cause),
13761
13758
  onSuccess: () => onExit(side, cause)
13762
13759
  }))), forkIn(forkedScope));
13763
- yield* runSide("left", left, forkUnsafe2(forkedScope));
13764
- yield* runSide("right", right, forkUnsafe2(forkedScope));
13760
+ yield* runSide("left", left, forkUnsafe(forkedScope));
13761
+ yield* runSide("right", right, forkUnsafe(forkedScope));
13765
13762
  return take(queue);
13766
13763
  })));
13767
13764
  var mergeEffect = /* @__PURE__ */ dual(2, (self, effect) => merge4(self, fromEffectDrain(effect), {
@@ -13861,15 +13858,15 @@ var decodeText2 = (encoding, options) => fromTransform((upstream, _scope) => syn
13861
13858
  var pipeTo = /* @__PURE__ */ dual(2, (self, that) => fromTransform((upstream, scope) => flatMap3(toTransform(self)(upstream, scope), (upstream) => toTransform(that)(upstream, scope))));
13862
13859
  var isUpstreamFailure = (reason) => reason._tag === "Die" && isDone3(reason.defect) && isCause2(reason.defect.value);
13863
13860
  var hasUpstreamFailure = (cause) => cause.reasons.some(isUpstreamFailure);
13864
- var upstreamFailureToDefect = (pull) => catchCause(pull, (cause) => isDoneCause(cause) ? failCause(cause) : die(Done(cause)));
13861
+ var upstreamFailureToDefect = (pull) => catchCause2(pull, (cause) => isDoneCause(cause) ? failCause(cause) : die(Done(cause)));
13865
13862
  var unwrapUpstreamFailure = (cause) => hasUpstreamFailure(cause) ? fromReasons(cause.reasons.flatMap((reason) => isUpstreamFailure(reason) ? reason.defect.value.reasons : [reason])) : cause;
13866
- var restoreUpstreamFailure = (effect) => catchCause(effect, (cause) => failCause(unwrapUpstreamFailure(cause)));
13863
+ var restoreUpstreamFailure = (effect) => catchCause2(effect, (cause) => failCause(unwrapUpstreamFailure(cause)));
13867
13864
  var unwrap = (channel) => fromTransform((upstream, scope) => {
13868
13865
  let pull;
13869
13866
  return succeed4(suspend(() => {
13870
13867
  if (pull)
13871
13868
  return pull;
13872
- return channel.pipe(provide3(scope), flatMap3((channel) => toTransform(channel)(upstream, scope)), flatMap3((pull_) => pull = pull_));
13869
+ return channel.pipe(provide2(scope), flatMap3((channel) => toTransform(channel)(upstream, scope)), flatMap3((pull_) => pull = pull_));
13873
13870
  }));
13874
13871
  });
13875
13872
  var interruptWhen = /* @__PURE__ */ dual(2, (self, effect) => merge4(self, fromPull2(succeed4(flatMap3(effect, done))), {
@@ -13885,7 +13882,7 @@ var runWith = (self, f, onHalt) => suspend(() => {
13885
13882
  var runDrain2 = (self) => runWith(self, (pull) => forever(pull, {
13886
13883
  disableYield: true
13887
13884
  }));
13888
- var runForEach2 = /* @__PURE__ */ dual(2, (self, f) => runWith(self, (pull) => forever(flatMap3(pull, f), {
13885
+ var runForEach = /* @__PURE__ */ dual(2, (self, f) => runWith(self, (pull) => forever(flatMap3(pull, f), {
13889
13886
  disableYield: true
13890
13887
  })));
13891
13888
  var mkUint8Array = (self) => map4(runFold(self, () => ({
@@ -13956,7 +13953,7 @@ var fromPull = (pull) => fromChannel(fromPull2(pull));
13956
13953
  var transformPull2 = (self, f) => fromChannel(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
13957
13954
  var toChannel = (stream) => stream.channel;
13958
13955
  var callback2 = (f, options) => fromChannel(callbackArray(f, options));
13959
- var empty5 = /* @__PURE__ */ fromChannel(empty11);
13956
+ var empty4 = /* @__PURE__ */ fromChannel(empty10);
13960
13957
  var suspend2 = (stream) => {
13961
13958
  const suspended = fromChannel(suspend4(() => stream().channel));
13962
13959
  suspendedStreams.set(suspended, stream);
@@ -13965,7 +13962,7 @@ var suspend2 = (stream) => {
13965
13962
  var suspendedStreams = /* @__PURE__ */ new WeakMap;
13966
13963
  var fail6 = (error) => fromChannel(fail10(error));
13967
13964
  var fromIterable3 = (iterable, options) => Array.isArray(iterable) && options?.chunkSize === undefined ? fromArray2(iterable) : fromChannel(fromIterableArray(iterable, options?.chunkSize));
13968
- var fromArray2 = (array) => isReadonlyArrayNonEmpty(array) ? fromChannel(succeed8(array)) : empty5;
13965
+ var fromArray2 = (array) => isReadonlyArrayNonEmpty(array) ? fromChannel(succeed8(array)) : empty4;
13969
13966
  var fromReadableStream2 = (options) => fromChannel(fromReadableStream(options));
13970
13967
  var paginate = (s, f) => fromPull(sync(() => {
13971
13968
  let state = s;
@@ -14026,7 +14023,7 @@ var runCollect = (self) => runFold(self.channel, () => [], (acc, chunk) => {
14026
14023
  return acc;
14027
14024
  });
14028
14025
  var runHead = (self) => map4(runHead2(self.channel), map(getUnsafe2(0)));
14029
- var runForEach = /* @__PURE__ */ dual(2, (self, f) => runForEach2(self.channel, (arr) => {
14026
+ var runForEach2 = /* @__PURE__ */ dual(2, (self, f) => runForEach(self.channel, (arr) => {
14030
14027
  let i = 0;
14031
14028
  return whileLoop2({
14032
14029
  while: () => i < arr.length,
@@ -14046,7 +14043,7 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
14046
14043
  const onAbort = () => fiber.interruptUnsafe();
14047
14044
  return new ReadableStream({
14048
14045
  start(controller) {
14049
- fiber = runFork(provideContext(runForEach2(transformPull(self.channel, (pull) => succeed4(latch.whenOpen(pull))), (chunk) => sync(() => {
14046
+ fiber = runFork(provideContext(runForEach(transformPull(self.channel, (pull) => succeed4(latch.whenOpen(pull))), (chunk) => sync(() => {
14050
14047
  latch.closeUnsafe();
14051
14048
  for (let i = 0;i < chunk.length; i++) {
14052
14049
  controller.enqueue(chunk[i]);
@@ -14083,7 +14080,7 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
14083
14080
  if (!fiber)
14084
14081
  return;
14085
14082
  cancelled = true;
14086
- return runPromise2(asVoid2(interrupt2(fiber)));
14083
+ return runPromise(asVoid2(interrupt2(fiber)));
14087
14084
  }
14088
14085
  }, options?.strategy);
14089
14086
  });
@@ -14461,7 +14458,7 @@ class Empty2 extends Proto8 {
14461
14458
  };
14462
14459
  }
14463
14460
  }
14464
- var empty6 = /* @__PURE__ */ new Empty2;
14461
+ var empty5 = /* @__PURE__ */ new Empty2;
14465
14462
  class Uint8Array3 extends Proto8 {
14466
14463
  _tag = "Uint8Array";
14467
14464
  contentType;
@@ -14633,8 +14630,8 @@ function makeWith(method, url, urlParams, hash, headers, body) {
14633
14630
  self.body = body;
14634
14631
  return self;
14635
14632
  }
14636
- var empty12 = /* @__PURE__ */ makeWith("GET", "", empty4, /* @__PURE__ */ none(), empty3, empty6);
14637
- var make24 = (method) => (url, options) => modify(empty12, {
14633
+ var empty11 = /* @__PURE__ */ makeWith("GET", "", empty3, /* @__PURE__ */ none(), empty2, empty5);
14634
+ var make24 = (method) => (url, options) => modify(empty11, {
14638
14635
  method,
14639
14636
  url,
14640
14637
  ...options ?? undefined
@@ -14968,7 +14965,7 @@ class WebHttpClientResponse extends Class2 {
14968
14965
  cause
14969
14966
  })
14970
14967
  })
14971
- }).pipe(cached, runSync2);
14968
+ }).pipe(cached, runSync);
14972
14969
  }
14973
14970
  arrayBufferBody;
14974
14971
  get arrayBuffer() {
@@ -14984,7 +14981,7 @@ class WebHttpClientResponse extends Class2 {
14984
14981
  cause
14985
14982
  })
14986
14983
  })
14987
- }).pipe(cached, runSync2);
14984
+ }).pipe(cached, runSync);
14988
14985
  return this.arrayBufferBody;
14989
14986
  }
14990
14987
  get upgrade() {
@@ -15403,7 +15400,7 @@ var fetch = /* @__PURE__ */ make25((request, url, signal, fiber) => {
15403
15400
  return send(undefined);
15404
15401
  });
15405
15402
  var layer2 = /* @__PURE__ */ layerMergedContext(/* @__PURE__ */ succeed4(fetch));
15406
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/_virtual/_rolldown/runtime.js
15403
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/_virtual/_rolldown/runtime.js
15407
15404
  var __defProp = Object.defineProperty;
15408
15405
  var __exportAll2 = (all, no_symbols) => {
15409
15406
  let target = {};
@@ -15417,7 +15414,7 @@ var __exportAll2 = (all, no_symbols) => {
15417
15414
  return target;
15418
15415
  };
15419
15416
 
15420
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/DefinitionError.js
15417
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/DefinitionError.js
15421
15418
  var DefinitionIdentifierKindSchema = Literals([
15422
15419
  "dual",
15423
15420
  "plugin",
@@ -15469,7 +15466,7 @@ var DuplicateAuthMethodIdentifierError = class extends TaggedError2()("Duplicate
15469
15466
  }) {
15470
15467
  };
15471
15468
 
15472
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/identifier.js
15469
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/identifier.js
15473
15470
  var identifierSchema = String3.check(isPattern(/^[a-z0-9]+(?:-[a-z0-9]+)*$/));
15474
15471
  var isIdentifier = is(identifierSchema);
15475
15472
  var validateIdentifier = (kind, identifier) => {
@@ -15494,12 +15491,12 @@ var validateIdentifier = (kind, identifier) => {
15494
15491
  });
15495
15492
  };
15496
15493
 
15497
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/proto.js
15494
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/proto.js
15498
15495
  var PipeableProto = { pipe() {
15499
15496
  return pipeArguments(this, arguments);
15500
15497
  } };
15501
15498
 
15502
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/Action.js
15499
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Action.js
15503
15500
  var Action_exports = /* @__PURE__ */ __exportAll2({
15504
15501
  ActionHandlerError: () => ActionHandlerError,
15505
15502
  RetryableActionHandlerError: () => RetryableActionHandlerError,
@@ -15612,7 +15609,7 @@ var make26 = (identifier, options) => {
15612
15609
  };
15613
15610
  var isAction = (u) => hasProperty(u, TypeId29);
15614
15611
 
15615
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethodBinding.js
15612
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethodBinding.js
15616
15613
  var makeBinding = (options) => ({
15617
15614
  connectionId: options.connectionId,
15618
15615
  method: options.method,
@@ -15622,7 +15619,7 @@ var makeBinding = (options) => ({
15622
15619
  });
15623
15620
  var isBindingForMethod = (binding, method) => binding.method === method;
15624
15621
 
15625
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/OAuth2TokenRefresher.js
15622
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/OAuth2TokenRefresher.js
15626
15623
  var OAuth2TokenRefresher_exports = /* @__PURE__ */ __exportAll2({
15627
15624
  OAuth2TokenRefresher: () => OAuth2TokenRefresher_exports,
15628
15625
  Service: () => Service3
@@ -15630,7 +15627,7 @@ var OAuth2TokenRefresher_exports = /* @__PURE__ */ __exportAll2({
15630
15627
  var Service3 = class extends Service()("@dual-os/sdk/AuthMethod/OAuth2TokenRefresher") {
15631
15628
  };
15632
15629
 
15633
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethodExecution.js
15630
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethodExecution.js
15634
15631
  var hookError = (methodIdentifier, operation, cause) => new AuthMethodHookError({
15635
15632
  cause,
15636
15633
  methodIdentifier,
@@ -15792,7 +15789,7 @@ var test = (method, material, context) => {
15792
15789
  return decodeMaterial(method, material).pipe(flatMap3((decodedMaterial) => testHook === undefined ? succeed4({ ok: true }) : runHook(impl.identifier, "test", () => testHook(decodedMaterial, hookContext(context)))));
15793
15790
  };
15794
15791
 
15795
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethod.js
15792
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethod.js
15796
15793
  var AuthMethod_exports = /* @__PURE__ */ __exportAll2({
15797
15794
  AuthMethodHookError: () => AuthMethodHookError,
15798
15795
  AuthMethodHookOperation: () => AuthMethodHookOperation,
@@ -15966,7 +15963,7 @@ var oauth2 = (identifier, options) => {
15966
15963
  };
15967
15964
  var isAuthMethod = (u) => hasProperty(u, TypeId30);
15968
15965
 
15969
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/ToolFile.js
15966
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/ToolFile.js
15970
15967
  var ToolFile_exports = /* @__PURE__ */ __exportAll2({
15971
15968
  Schema: () => Schema,
15972
15969
  ToolFile: () => ToolFile_exports
@@ -15981,7 +15978,7 @@ var Schema = TaggedStruct("ToolFile", {
15981
15978
  sizeBytes: Natural
15982
15979
  });
15983
15980
 
15984
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/handler-context.js
15981
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/handler-context.js
15985
15982
  var groupKeyPrefix = "@dual-os/sdk/Plugin/Handlers/";
15986
15983
  var handlerGroupKey = (pluginId) => `${groupKeyPrefix}${pluginId}`;
15987
15984
  var isGroupKey = startsWith(groupKeyPrefix);
@@ -16002,13 +15999,13 @@ var findHandler = (context, providerId, handlerKey) => {
16002
15999
  return isMap(group) ? group.get(handlerKey) : undefined;
16003
16000
  };
16004
16001
 
16005
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/schema-runtime.js
16002
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/schema-runtime.js
16006
16003
  function decodeJson(schema, value) {
16007
16004
  return decodeUnknownEffect(toCodecJson2(schema))(value);
16008
16005
  }
16009
16006
  var decodeJsonMapError = (schema, value, mapError2) => decodeJson(schema, value).pipe(mapError(mapError2));
16010
16007
 
16011
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/ConnectionResolver.js
16008
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/ConnectionResolver.js
16012
16009
  var ConnectionIdNotAllowedError = class extends TaggedError2()("ConnectionIdNotAllowedError", {
16013
16010
  connectionId: String3,
16014
16011
  phase: optional(String3),
@@ -16104,7 +16101,7 @@ var ConnectionResolverStoreError = class extends TaggedError2()("ConnectionResol
16104
16101
  var Service4 = class extends Service()("@dual-os/sdk/ConnectionResolver") {
16105
16102
  };
16106
16103
 
16107
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/auth-execution.js
16104
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/auth-execution.js
16108
16105
  var knownAuthMethodIds = (methods) => methods.map((method) => method.identifier);
16109
16106
  var fullAuthMethodId = (providerId, method) => `${providerId}/${method.identifier}`;
16110
16107
  var findMethod = (providerId, methods, methodId) => methods.find((method) => method.identifier === methodId || fullAuthMethodId(providerId, method) === methodId);
@@ -16164,7 +16161,7 @@ var resolveRuntimeConnection = (targetKind, targetId, phase, providerId, methods
16164
16161
  });
16165
16162
  });
16166
16163
 
16167
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/trigger-runtime-shared.js
16164
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/trigger-runtime-shared.js
16168
16165
  var decodeConfig = (triggerId, schema, value) => decodeJsonMapError(schema, value, (error) => new InvalidTriggerConfigError({
16169
16166
  description: error.message,
16170
16167
  triggerId
@@ -16299,7 +16296,7 @@ var withRuntimeContext = (entry, phase, connectionId, context2, run) => {
16299
16296
  return resolveRuntimeConnection("trigger", entry.triggerId, phase, entry.providerId, requiredAuthMethods, connectionId, context2).pipe(flatMap3((binding) => run(runtimeContext(authRuntimeContext(binding)))));
16300
16297
  };
16301
16298
 
16302
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/trigger-runtime.js
16299
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/trigger-runtime.js
16303
16300
  var runPhase = (options) => gen(function* () {
16304
16301
  const { entry, phase, request } = options;
16305
16302
  const runtime = yield* options.hook;
@@ -16382,7 +16379,7 @@ var poll2 = (entry, request) => runPhase({
16382
16379
  phase: "poll",
16383
16380
  request
16384
16381
  });
16385
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/Trigger.js
16382
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Trigger.js
16386
16383
  var Trigger_exports = /* @__PURE__ */ __exportAll2({
16387
16384
  InvalidTriggerConfigError: () => InvalidTriggerConfigError,
16388
16385
  InvalidTriggerOutputError: () => InvalidTriggerOutputError,
@@ -16594,10 +16591,10 @@ var verify2 = verify;
16594
16591
  var parse3 = parse2;
16595
16592
  var poll3 = poll2;
16596
16593
 
16597
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/collection-utils.js
16594
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/collection-utils.js
16598
16595
  var appendElements = (existing, additions) => [...existing, ...additions];
16599
16596
 
16600
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/children.js
16597
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/children.js
16601
16598
  var partitionChildren = (children) => ({
16602
16599
  actions: children.filter(isAction),
16603
16600
  groups: children.filter(isGroup),
@@ -16637,7 +16634,7 @@ var assertUniqueMixedChildIdentifiers = (ownerKind, ownerIdentifier, existing, a
16637
16634
  assertAdditions(ownerKind, ownerIdentifier, seenChildren(existing), additions.map((addition) => [addition, childKind(addition)]));
16638
16635
  };
16639
16636
 
16640
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/Group.js
16637
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Group.js
16641
16638
  var Group_exports = /* @__PURE__ */ __exportAll2({
16642
16639
  TypeId: () => TypeId32,
16643
16640
  add: () => add5,
@@ -16699,7 +16696,7 @@ var withAction = dual(2, (value, action) => appendChildren(value, [action], "act
16699
16696
  var withTrigger = dual(2, (value, trigger) => appendChildren(value, [trigger], "trigger"));
16700
16697
  var add5 = dual((args) => isGroup(args[0]), (group, ...children) => appendChildren(group, children));
16701
16698
 
16702
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/AgentChannel.js
16699
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AgentChannel.js
16703
16700
  var Key = NonEmptyString.check(isMaxLength(512), isPattern(/^[^\p{Cc}]+$/u));
16704
16701
  var OperationKind = Literals([
16705
16702
  "present_outcome",
@@ -16788,7 +16785,7 @@ var VerifiedIdentity = Struct({
16788
16785
  var AccessOutcome = Struct({ decision: Literals(["allow", "deny"]) });
16789
16786
  var Verification = Struct({ verified: Literal(true) });
16790
16787
  var Exposure = Literals(["webhook", "host"]);
16791
- var RequiredChecks = Tuple([Literal("access")]);
16788
+ var RequiredChecks = Tuple2([Literal("access")]);
16792
16789
  var Message = Struct({
16793
16790
  content: Content,
16794
16791
  conversation: Destination,
@@ -17185,7 +17182,7 @@ var validateDefinition = (definition, providerId, methods) => {
17185
17182
  }
17186
17183
  };
17187
17184
 
17188
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/auth-runtime.js
17185
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/auth-runtime.js
17189
17186
  var assertNoDuplicateAuthMethodIdentifiers = (providerIdentifier, methods) => {
17190
17187
  const seen = /* @__PURE__ */ new Set;
17191
17188
  for (const method of methods) {
@@ -17198,7 +17195,7 @@ var assertNoDuplicateAuthMethodIdentifiers = (providerIdentifier, methods) => {
17198
17195
  }
17199
17196
  };
17200
17197
 
17201
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/capabilities.js
17198
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/capabilities.js
17202
17199
  var walkCapabilities = (provider, select) => {
17203
17200
  const entries = [];
17204
17201
  const visit = (owner, prefix) => {
@@ -17217,7 +17214,7 @@ var walkCapabilities = (provider, select) => {
17217
17214
  return entries;
17218
17215
  };
17219
17216
 
17220
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/plugin-handlers.js
17217
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/plugin-handlers.js
17221
17218
  var missingDeclaration = (kind, localId, pluginId) => {
17222
17219
  throw new Error(`missing ${kind} handler for "${localId}" in plugin "${pluginId}"`);
17223
17220
  };
@@ -17262,7 +17259,7 @@ var toHandlers = (plugin, handlers) => gen(function* () {
17262
17259
  return makeUnsafe(/* @__PURE__ */ new Map([[handlerGroupKey(plugin.identifier), map]]));
17263
17260
  });
17264
17261
 
17265
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/Plugin.js
17262
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Plugin.js
17266
17263
  var Plugin_exports = /* @__PURE__ */ __exportAll2({
17267
17264
  TypeId: () => TypeId33,
17268
17265
  add: () => add6,
@@ -17270,7 +17267,7 @@ var Plugin_exports = /* @__PURE__ */ __exportAll2({
17270
17267
  isGitRequest: () => isGitRequest,
17271
17268
  isPlugin: () => isPlugin,
17272
17269
  make: () => make6,
17273
- provide: () => provide6,
17270
+ provide: () => provide4,
17274
17271
  toLayer: () => toLayer2,
17275
17272
  withAction: () => withAction2,
17276
17273
  withAgentChannel: () => withAgentChannel,
@@ -17345,7 +17342,7 @@ var make6 = (identifier) => makePlugin({
17345
17342
  iconUrl: undefined,
17346
17343
  iconUrlDark: undefined,
17347
17344
  identifier,
17348
- layer: empty8,
17345
+ layer: empty7,
17349
17346
  name: undefined,
17350
17347
  sandboxAccess: undefined,
17351
17348
  triggers: []
@@ -17395,7 +17392,7 @@ var withAgentChannel = (channel) => (plugin) => {
17395
17392
  validateDefinition(channel.definition, plugin.identifier, plugin.authMethods);
17396
17393
  return update2(plugin, { agentChannels: [...plugin.agentChannels, channel] });
17397
17394
  };
17398
- var provide6 = dual(2, (plugin, layer) => update2(plugin, { layer: provideMerge(plugin.layer, layer) }));
17395
+ var provide4 = dual(2, (plugin, layer) => update2(plugin, { layer: provideMerge(plugin.layer, layer) }));
17399
17396
  var makeHandlers = (actions, triggers, agentChannels = {}) => ({
17400
17397
  action: (name, handler) => makeHandlers({
17401
17398
  ...actions,
@@ -17433,7 +17430,7 @@ var toLayer2 = (plugin, build) => effectContext(gen(function* () {
17433
17430
  return yield* toHandlers(plugin, handlers);
17434
17431
  }));
17435
17432
 
17436
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/AgentChannelRuntime.js
17433
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AgentChannelRuntime.js
17437
17434
  var ConnectionContext = Struct({
17438
17435
  actor: optionalKey(Union([Struct({
17439
17436
  kind: Literal("user"),
@@ -17471,7 +17468,7 @@ var AccessInput = Struct({
17471
17468
  var Service5 = class extends Service()("@dual-os/sdk/AgentChannelRuntime") {
17472
17469
  };
17473
17470
  var fail11 = (code) => new ChannelError({ code });
17474
- var safe = (effect2, code) => effect2.pipe(catchCause((cause) => hasInterrupts(cause) ? interrupt : fail5(fail11(code))));
17471
+ var safe = (effect2, code) => effect2.pipe(catchCause2((cause) => hasInterrupts(cause) ? interrupt : fail5(fail11(code))));
17475
17472
  var AssetResultJson = Json.check(makeFilter((value) => new TextEncoder().encode(JSON.stringify(value)).byteLength <= 14680064));
17476
17473
  var Json3 = Json.check(makeFilter((value) => new TextEncoder().encode(JSON.stringify(value)).byteLength <= resultByteLimit));
17477
17474
  var strict = { onExcessProperty: "error" };
@@ -17487,7 +17484,7 @@ var decodeData = fn("AgentChannelRuntime.decodeData")(function* (schema, input,
17487
17484
  var invokeHandler = (handler, effect2) => effect2.pipe(provideContext(handler.context), catch_((error) => decode4(TaggedStruct("AgentChannelHandlerError", { code: FailureCode }), isObject(error) ? { ...error } : error, "provider_failure").pipe(flatMap3((checked) => fail5(new ChannelError({
17488
17485
  code: "provider_failure",
17489
17486
  providerCode: checked.code
17490
- }))))), catchCause((cause) => {
17487
+ }))))), catchCause2((cause) => {
17491
17488
  if (hasInterrupts(cause))
17492
17489
  return interrupt;
17493
17490
  const error = findErrorOption2(cause);
@@ -17717,7 +17714,7 @@ var layer4 = (plugins) => effect(Service5, gen(function* () {
17717
17714
  });
17718
17715
  }));
17719
17716
 
17720
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/AiProvider.js
17717
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AiProvider.js
17721
17718
  var TypeId34 = "@dual-os/sdk/AiProvider";
17722
17719
  var RuntimeConfig = Struct({
17723
17720
  apiKey: optional(String3),
@@ -17775,7 +17772,7 @@ var withAuthMethods2 = dual(2, (provider, methods) => {
17775
17772
  var withAuthMethod2 = dual(2, (provider, method) => withAuthMethods2(provider, [method]));
17776
17773
  var withRuntimeConfig = dual(2, (provider, resolve) => makeProvider2(optionsFromProvider(provider), provider.authMethods, resolve));
17777
17774
 
17778
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/actions.js
17775
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/actions.js
17779
17776
  var entriesOf = (installation) => walkCapabilities(installation.plugin, (owner) => owner.actions).map(({ localId, canonicalId, node }) => ({
17780
17777
  action: node,
17781
17778
  actionId: canonicalId,
@@ -17796,7 +17793,7 @@ var resolveAction = (installations, actionId, version) => {
17796
17793
  return entry === undefined || version !== undefined && entry.pluginVersion !== version ? undefined : entry;
17797
17794
  };
17798
17795
 
17799
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/triggers.js
17796
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/triggers.js
17800
17797
  var entriesOf2 = (installation) => walkCapabilities(installation.plugin, (owner) => owner.triggers).map((walked) => ({
17801
17798
  authMethods: installation.plugin.authMethods,
17802
17799
  localId: walked.localId,
@@ -17817,7 +17814,7 @@ var resolveRuntimeTrigger = (installations, triggerId, version) => {
17817
17814
  return entry === undefined || version !== undefined && entry.pluginVersion !== version ? undefined : entry;
17818
17815
  };
17819
17816
 
17820
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/registry.js
17817
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/registry.js
17821
17818
  var authMethodId = (providerId, methodId) => `${providerId}/${methodId}`;
17822
17819
  var schemaJson = (schema) => toJsonSchemaDocument2(schema, { onExcessProperty: "error" });
17823
17820
  var authMethodMetadataJson = (method) => {
@@ -17976,7 +17973,7 @@ var materializeResolvedRegistry = (input) => {
17976
17973
  };
17977
17974
  };
17978
17975
 
17979
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/DualRegistry.js
17976
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/DualRegistry.js
17980
17977
  var TriggerNotFoundError = class extends TaggedError2()("TriggerNotFoundError", { triggerId: String3 }) {
17981
17978
  };
17982
17979
  var materializePlugin = (plugin, options) => ({
@@ -17995,7 +17992,7 @@ var materializePlugin = (plugin, options) => ({
17995
17992
  }).providers
17996
17993
  });
17997
17994
 
17998
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/invoke.js
17995
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/invoke.js
17999
17996
  var FieldIssue = class extends Class4("FieldIssue")({
18000
17997
  message: String3,
18001
17998
  path: String3
@@ -18068,7 +18065,7 @@ var invokeResolvedActionJson = (providerId, actionId, pluginVersion, action, aut
18068
18065
  fields: schemaErrorFields(error)
18069
18066
  }))));
18070
18067
 
18071
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/DualRuntime.js
18068
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/DualRuntime.js
18072
18069
  var install = (plugin, version) => ({
18073
18070
  plugin,
18074
18071
  version
@@ -18272,7 +18269,7 @@ var toLayer = (app) => {
18272
18269
  })).pipe(provide(layer4(app.plugins.map((installation) => installation.plugin))), provide(app.layer));
18273
18270
  };
18274
18271
 
18275
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/Files.js
18272
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Files.js
18276
18273
  var File3 = TaggedStruct("File", {
18277
18274
  contentType: String3,
18278
18275
  id: NonEmptyString,
@@ -18294,7 +18291,7 @@ var write = fnUntraced(function* (file) {
18294
18291
  return yield* (yield* service3).write(file);
18295
18292
  });
18296
18293
 
18297
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/OAuthFlow.js
18294
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/OAuthFlow.js
18298
18295
  var OAuthConnectionValidationFailed = class extends TaggedError2()("OAuthConnectionValidationFailed", {
18299
18296
  cause: optionalKey(Redacted(Defect())),
18300
18297
  message: String3
@@ -18352,7 +18349,7 @@ var ReservedTokenHeaders = fromIterable2([
18352
18349
  ]);
18353
18350
  var TokenHeaders = Record(String3, String3.check(isPattern(/^[\t\x20-\x7e\x80-\xff]*$/u))).check(makeFilter((headers) => {
18354
18351
  const names = map3(keys(headers), toLowerCase);
18355
- return size3(fromIterable2(names)) === names.length && every2(names, (name) => /^[!#$%&'*+.^_`|~0-9a-z-]+$/u.test(name) && !has3(ReservedTokenHeaders, name) && !startsWith("proxy-")(name) && !startsWith("sec-")(name));
18352
+ return size3(fromIterable2(names)) === names.length && every2(names, (name) => /^[!#$%&'*+.^_`|~0-9a-z-]+$/u.test(name) && !has2(ReservedTokenHeaders, name) && !startsWith("proxy-")(name) && !startsWith("sec-")(name));
18356
18353
  }, { message: "Invalid provider token headers" }));
18357
18354
  Struct({
18358
18355
  authorizationParams: Record(String3, String3),
@@ -18710,7 +18707,7 @@ var oauth2TokenRefresherLayer = effect(Service3, gen(function* () {
18710
18707
  }).pipe(map4((refreshed) => refreshed.tokens)) });
18711
18708
  }));
18712
18709
 
18713
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/remote-runtime.js
18710
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/remote-runtime.js
18714
18711
  var Identity = Struct({
18715
18712
  artifactDigest: String3.check(isPattern(/^[a-f0-9]{128}$/u)),
18716
18713
  invocationId: NonEmptyString,
@@ -19050,7 +19047,7 @@ var execute = fn("RemoteRuntime.execute")(function* (request) {
19050
19047
  })));
19051
19048
  });
19052
19049
 
19053
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/PluginRuntime.js
19050
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/PluginRuntime.js
19054
19051
  var PluginExecutionError = class extends TaggedError2()("PluginExecutionError", {
19055
19052
  category: Literals([
19056
19053
  "transport",
@@ -19066,49 +19063,6 @@ var PluginExecutionError = class extends TaggedError2()("PluginExecutionError",
19066
19063
  var maxPayloadBytes = 1048576;
19067
19064
  var maxMetadataBytes = 67108864;
19068
19065
  var maxChannelResultBytes = 16777216;
19069
- function ipcMessages(channel) {
19070
- return callback2((queue) => {
19071
- const message = (value) => {
19072
- offerUnsafe(queue, value);
19073
- };
19074
- const disconnected = () => {
19075
- endUnsafe(queue);
19076
- };
19077
- const failed = (cause) => {
19078
- failCauseUnsafe(queue, fail2(PluginExecutionError.make({
19079
- category: "runner",
19080
- cause: make4(cause),
19081
- message: "Plugin IPC channel failed"
19082
- })));
19083
- };
19084
- return acquireRelease(sync(() => {
19085
- channel.on("message", message);
19086
- channel.on("disconnect", disconnected);
19087
- channel.on("error", failed);
19088
- }), () => sync(() => {
19089
- channel.removeListener("message", message);
19090
- channel.removeListener("disconnect", disconnected);
19091
- channel.removeListener("error", failed);
19092
- }));
19093
- });
19094
- }
19095
- function sendIpc(channel, value) {
19096
- return try_2({
19097
- try: () => {
19098
- if (!channel.connected || channel.send === undefined)
19099
- throw PluginExecutionError.make({
19100
- category: "runner",
19101
- message: "Plugin IPC channel is closed"
19102
- });
19103
- channel.send(value);
19104
- },
19105
- catch: (cause) => PluginExecutionError.make({
19106
- category: "runner",
19107
- cause: make4(cause),
19108
- message: "Cannot send plugin IPC message"
19109
- })
19110
- });
19111
- }
19112
19066
  var OAuthContinuation = Struct({
19113
19067
  expiresAt: DateFromString,
19114
19068
  pkceVerifier: NullOr(String3),
@@ -19176,8 +19130,6 @@ var ExecutionRequest = Union([
19176
19130
  ChannelSettingsRequest
19177
19131
  ]);
19178
19132
  var Request4 = Union([ExecutionRequest, TaggedStruct("extract", { identity: Identity })]);
19179
- var Input2 = Union([Request4, TaggedStruct("cancel", { identity: Identity })]);
19180
- var Output = Union([Response, TaggedStruct("interrupted", { identity: Identity })]);
19181
19133
  function checkMessageSize(value, maximum) {
19182
19134
  if (new TextEncoder().encode(JSON.stringify(value)).byteLength <= maximum)
19183
19135
  return void_2;
@@ -19187,24 +19139,24 @@ function checkMessageSize(value, maximum) {
19187
19139
  }));
19188
19140
  }
19189
19141
  var encodeInput = fnUntraced(function* (input) {
19190
- const encoded = yield* encodeEffect(Input2)(input);
19142
+ const encoded = yield* encodeEffect(Request4)(input);
19191
19143
  yield* checkMessageSize(encoded, maxPayloadBytes);
19192
19144
  return encoded;
19193
19145
  });
19194
19146
  var decodeInput = fnUntraced(function* (input) {
19195
19147
  const json = yield* decodeUnknownEffect(Json)(input);
19196
19148
  yield* checkMessageSize(json, maxPayloadBytes);
19197
- return yield* decodeUnknownEffect(Input2)(json);
19149
+ return yield* decodeUnknownEffect(Request4)(json);
19198
19150
  });
19199
19151
  var encodeOutput = fnUntraced(function* (output, maximum) {
19200
- const encoded = yield* encodeEffect(Output)(output);
19152
+ const encoded = yield* encodeEffect(Response)(output);
19201
19153
  yield* checkMessageSize(encoded, maximum);
19202
19154
  return encoded;
19203
19155
  });
19204
19156
  var decodeOutput = fnUntraced(function* (output) {
19205
19157
  const json = yield* decodeUnknownEffect(Json)(output);
19206
19158
  yield* checkMessageSize(json, maxMetadataBytes);
19207
- return yield* decodeUnknownEffect(Output)(json);
19159
+ return yield* decodeUnknownEffect(Response)(json);
19208
19160
  });
19209
19161
  function responseLimit(request) {
19210
19162
  if ("_tag" in request && request._tag === "extract")
@@ -19236,7 +19188,7 @@ var readBounded = fnUntraced(function* (input, maximum = maxPayloadBytes) {
19236
19188
  bytes: Buffer.alloc(maximum),
19237
19189
  size: 0
19238
19190
  };
19239
- yield* pipe(input, runForEach((chunk) => gen(function* () {
19191
+ yield* pipe(input, runForEach2((chunk) => gen(function* () {
19240
19192
  if (output.size + chunk.byteLength > maximum)
19241
19193
  return yield* PluginExecutionError.make({
19242
19194
  category: "protocol",
@@ -19357,7 +19309,7 @@ var execute3 = fnUntraced(function* (request) {
19357
19309
  return yield* executeChannelSettings(request);
19358
19310
  });
19359
19311
 
19360
- export { pipeArguments, dual, identity, constVoid, pipe, flow, isString, isUndefined, isNotUndefined, isNull, isNotNull, isNullish, isObject, hasProperty, hash, equals, byReferenceUnsafe, format, NodeInspectSymbol, toJson, BaseProto, PipeInspectableProto, Prototype, String2, Number2, BigInt2, flip, mapInput, none, some, isNone, isSome, match, getOrElse, orElse, orElseSome, fromNullishOr, fromUndefinedOr, getOrNull, getOrUndefined, liftThrowable, getOrThrow, map, flatMap, filter, liftPredicate, exists, Service, makeUnsafe, add, getUnsafe, get, Reference, succeed, fail, failVoid, fromOption, try_, isSuccess, match2, getOrThrow2, empty, fromEntries, toEntries, has, remove, map2, every, fromIterable, ensure, append, appendAll, isArray, isReadonlyArrayNonEmpty, getUnsafe2, headNonEmpty, last, drop, findFirst, sort, zip, contains, empty2, of, map3, flatMap2, flatten, filterMap, filter2, reduce, fromNullishOr2, every2, some2, dedupe, join, fromInputUnsafe, isFinite, millis, toMillis, toPredicate, has2, compose, TaggedClass, Error2, TaggedError, forkUnsafe, isInterruptReason, fail2, hasInterruptsOnly, squash, hasInterrupts, filterInterruptors, Done, done, UnknownError, succeed2, fail3, void_, isSuccess2, isFailure, makeUnsafe2, make, _await, fail4, isDone, isDoneUnsafe, doneUnsafe, into, Scope, makeUnsafe3, addFinalizerExit, addFinalizer, fork, close, buildWithScope, succeed3, effect, mergeAll, provide, provideMerge, currentTimeMillis, increment, toLowerCase, replace, trim, slice, isEmpty, isNonEmpty, split, startsWith, endsWith, match3, replaceAll, catchDone, isDoneCause, isEffect, all, forEach, promise, tryPromise, succeed4, suspend, sync, void_2, undefined_, callback, never, gen, fail5, failSync, failCause, die, try_2, withFiber, fromOption2, flatMap3, andThen, tap, result, map4, as, zipWith, catch_, catchTag, catchReason, catchCause, catchIf, catchCauseIf, mapError, orDie, tapCause, ignore, ignoreCause, sleep, raceFirst, matchEffect, context, provide2, provideContext, serviceOption, provideService, scope, scoped, acquireRelease, addFinalizer2, ensuring, onError, onExit, cached, interrupt, uninterruptible, uninterruptibleMask, forever, forkChild, forkIn, forkScoped, runFork, runForkWith, fnUntraced, fn, clockWith, logError, effectify, await_, join2, interrupt2, interruptAll, getCurrent, runIn, make2, sliding, offer, offerUnsafe, failCauseUnsafe, endUnsafe, take, poll, encode, encode2, decode, makeZoned, make3, toUtc, toDateUtc, toEpochMillis, add2, formatIso, formatIsoOffset, fromIterable2, has3, isRedacted, make4, value, empty3, empty4, InvalidValue, compose2, transform, transformEffect, is, decodeUnknownEffect, decodeEffect, decodeUnknownOption, decodeOption, encodeEffect, isSchema, optionalKey, optional, toType, Literal, Unknown, Null, String3, Number3, Boolean2, Struct, Record, StructWithRest, Tuple, ArraySchema, Union, Literals, NullOr, decodeTo, tag, makeFilter, isPattern, Finite, isFinite2, isGreaterThanOrEqualTo, isLessThanOrEqualTo, isBetween, Int, Natural, isGreaterThanOrEqualToBigInt, isMinLength, isMaxLength, isMinProperties, isMaxProperties, isUnique, NonEmptyString, Defect, fromJsonString, NumberFromString, BigIntFromString, Uint8ArrayFromBase64, DateTimeUtcFromString, OptionFromNullOr, Error3, TaggedError2, toEquivalence, Json, makeUnsafe4, make5, get2, set, update, fromTransform, toTransform, mapDone, unwrap, isStream, fromChannel, fromEffect, fromPull, callback2, empty5, suspend2, fail6, fromIterable3, paginate, unwrap2, mapEffect, flatMap4, drainFork, merge, filterMap2, tapError, transduce, decodeText, splitLines, run, runCollect, runHead, runForEach, runDrain, mkString, layer, fromUnknown, value2, when, discriminatorsExhaustive, orElse2, empty6, HttpClientError, InvalidUrlError, makeWith, get3, post, patch, put, del, setMethod, setHeader, setHeaders, setUrl, setUrlParam, setUrlParams, setBody, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, bodyFormDataRecord, HttpClient, transform2, transformResponse, filterStatusOk, mapRequest, mapRequestEffect, RequestInit, layer2, __exportAll2, Action_exports, ActionHandlerError, fromHttpClientFailure, AuthMethod_exports, ToolFile_exports, Schema, Key, Event, commandSchema, materializePlugin, Trigger_exports, fromPlugin, Service2, toLayer, File3, read, write, Group_exports, layer3, oauth2TokenRefresherLayer, Plugin_exports, make6, isPlugin, Identity, filesUnavailable, PluginExecutionError, ipcMessages, sendIpc, decodeInput, encodeOutput, responseLimit, execute3 };
19312
+ export { pipeArguments, dual, identity, constVoid, pipe, flow, isString, isUndefined, isNotUndefined, isNull, isNotNull, isNullish, isObject, hasProperty, equals, byReferenceUnsafe, format, NodeInspectSymbol, toJson, BaseProto, PipeInspectableProto, Prototype, String2, Number2, BigInt2, flip, mapInput, none, some, isNone, isSome, match, getOrElse, orElse, orElseSome, fromNullishOr, fromUndefinedOr, getOrNull, getOrUndefined, liftThrowable, getOrThrow, map, flatMap, filter, liftPredicate, exists, Service, makeUnsafe, add, getUnsafe, get, Reference, succeed, fail, failVoid, fromOption, try_, isSuccess, match2, getOrThrow2, fromEntries, toEntries, has, remove, map2, every, fromIterable, ensure, append, appendAll, isArray, isReadonlyArrayNonEmpty, getUnsafe2, headNonEmpty, last, drop, findFirst, sort, zip, contains, empty, of, map3, flatMap2, flatten, filterMap, filter2, reduce, fromNullishOr2, every2, some2, dedupe, join, fromInputUnsafe, isFinite, millis, toMillis, TaggedClass, Error2, TaggedError, scopeRemoveFinalizerUnsafe, fiberEnterUninterruptibleUnsafe, fail2, squash, hasInterrupts, Done, done, UnknownError, succeed2, fail3, void_, isSuccess2, isFailure, makeUnsafe2, _await, done2, fail4, isDone, isDoneUnsafe, doneUnsafe, Scope, make, makeUnsafe3, addFinalizerExit, addFinalizer, forkUnsafe, close, makeMemoMapUnsafe, buildWithMemoMap, buildWithScope, succeed3, effect, mergeAll, provide, provideMerge, currentTimeMillis, increment, toLowerCase, replace, trim, slice, isEmpty, isNonEmpty, split, startsWith, endsWith, match3, replaceAll, catchDone, isDoneCause, isEffect, all, forEach, promise, tryPromise, succeed4, suspend, sync, void_2, undefined_, callback, never, gen, fail5, failSync, failCause, die, try_2, withFiber, fromOption2, flatMap3, flatten2, andThen, tap, result, map4, as, zipWith, catch_, catchTag, catchReason, catchIf, catchCauseIf, mapError, orDie, ignore, ignoreCause, sleep, raceFirst, matchEffect, context, provideContext, serviceOption, provideService, scope, scoped, acquireRelease, addFinalizer2, ensuring, onError, onExit, cached, interrupt, uninterruptible, uninterruptibleMask, forever, forkChild, forkIn, forkScoped, runFork, runForkWith, runCallbackWith, runCallback, runPromise, runPromiseWith, runPromiseExit, runPromiseExitWith, runSync, runSyncWith, runSyncExit, runSyncExitWith, fnUntraced, fn, clockWith, effectify, await_, join2, interrupt2, getCurrent, runIn, make2, sliding, offer, offerUnsafe, failCauseUnsafe, endUnsafe, take, poll, encode, encode2, decode, makeZoned, make3, toUtc, toDateUtc, toEpochMillis, add2, formatIso, formatIsoOffset, fromIterable2, has2, isRedacted, make4, value, empty2, empty3, InvalidValue, compose, transform, transformEffect, is, decodeUnknownEffect, decodeEffect, decodeUnknownOption, decodeOption, encodeEffect, isSchema, optionalKey, optional, toType, Literal, Unknown, Null, String3, Number3, Boolean2, Struct, Record, StructWithRest, ArraySchema, Union, Literals, NullOr, decodeTo, tag, makeFilter, isPattern, Finite, isFinite2, isGreaterThanOrEqualTo, isLessThanOrEqualTo, isBetween, Int, Natural, isGreaterThanOrEqualToBigInt, isMinLength, isMaxLength, isMinProperties, isMaxProperties, isUnique, NonEmptyString, Defect, fromJsonString, NumberFromString, BigIntFromString, Uint8ArrayFromBase64, DateTimeUtcFromString, OptionFromNullOr, Error3, TaggedError2, toEquivalence, Json, makeUnsafe4, make5, get2, set, update, fromTransform, toTransform, mapDone, unwrap, isStream, fromChannel, fromEffect, fromPull, callback2, empty4, suspend2, fail6, fromIterable3, paginate, unwrap2, mapEffect, flatMap4, drainFork, merge, filterMap2, tapError, transduce, decodeText, splitLines, run, runCollect, runHead, runDrain, mkString, layer, fromUnknown, value2, when, discriminatorsExhaustive, orElse2, empty5, HttpClientError, InvalidUrlError, makeWith, get3, post, patch, put, del, setMethod, setHeader, setHeaders, setUrl, setUrlParam, setUrlParams, setBody, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, bodyFormDataRecord, HttpClient, transform2, transformResponse, filterStatusOk, mapRequest, mapRequestEffect, RequestInit, layer2, __exportAll2, Action_exports, ActionHandlerError, fromHttpClientFailure, AuthMethod_exports, ToolFile_exports, Schema, Key, Event, commandSchema, materializePlugin, Trigger_exports, fromPlugin, Service2, toLayer, File3, read, write, Group_exports, layer3, oauth2TokenRefresherLayer, Plugin_exports, make6, isPlugin, filesUnavailable, PluginExecutionError, decodeInput, encodeOutput, responseLimit, execute3 };
19361
19313
 
19362
- //# debugId=E0716A04EBF3E07064756E2164756E21
19363
- //# sourceMappingURL=plugin-tg14r6yv.js.map
19314
+ //# debugId=3F9A28199B1AB9BA64756E2164756E21
19315
+ //# sourceMappingURL=plugin-8428jyvx.js.map