@getpochi/cli 0.5.84 → 0.5.86

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 (2) hide show
  1. package/dist/cli.js +514 -339
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -3544,7 +3544,7 @@ var init_ansi_styles = __esm(() => {
3544
3544
 
3545
3545
  // ../../node_modules/chalk/source/vendor/supports-color/index.js
3546
3546
  import process2 from "node:process";
3547
- import os3 from "node:os";
3547
+ import os4 from "node:os";
3548
3548
  import tty from "node:tty";
3549
3549
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
3550
3550
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
@@ -3602,7 +3602,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
3602
3602
  return min;
3603
3603
  }
3604
3604
  if (process2.platform === "win32") {
3605
- const osRelease = os3.release().split(".");
3605
+ const osRelease = os4.release().split(".");
3606
3606
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
3607
3607
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
3608
3608
  }
@@ -7611,7 +7611,7 @@ __export(exports_Array, {
7611
7611
  length: () => length,
7612
7612
  lastNonEmpty: () => lastNonEmpty,
7613
7613
  last: () => last,
7614
- join: () => join2,
7614
+ join: () => join3,
7615
7615
  isNonEmptyReadonlyArray: () => isNonEmptyReadonlyArray,
7616
7616
  isNonEmptyArray: () => isNonEmptyArray2,
7617
7617
  isEmptyReadonlyArray: () => isEmptyReadonlyArray,
@@ -7756,7 +7756,7 @@ var make4 = (...elements) => elements, allocate = (n2) => new Array(n2), makeBy,
7756
7756
  next = b3;
7757
7757
  }
7758
7758
  return out;
7759
- }, getOrder2, getEquivalence4, forEach, dedupeWith, dedupe = (self2) => dedupeWith(self2, equivalence()), dedupeAdjacentWith, dedupeAdjacent, join2, mapAccum, cartesianWith, cartesian, Do3, bind4, bindTo4, let_4;
7759
+ }, getOrder2, getEquivalence4, forEach, dedupeWith, dedupe = (self2) => dedupeWith(self2, equivalence()), dedupeAdjacentWith, dedupeAdjacent, join3, mapAccum, cartesianWith, cartesian, Do3, bind4, bindTo4, let_4;
7760
7760
  var init_Array = __esm(() => {
7761
7761
  init_Either();
7762
7762
  init_Equal();
@@ -8246,7 +8246,7 @@ var init_Array = __esm(() => {
8246
8246
  return out;
8247
8247
  });
8248
8248
  dedupeAdjacent = /* @__PURE__ */ dedupeAdjacentWith(/* @__PURE__ */ equivalence());
8249
- join2 = /* @__PURE__ */ dual(2, (self2, sep2) => fromIterable2(self2).join(sep2));
8249
+ join3 = /* @__PURE__ */ dual(2, (self2, sep2) => fromIterable2(self2).join(sep2));
8250
8250
  mapAccum = /* @__PURE__ */ dual(3, (self2, s5, f4) => {
8251
8251
  let i6 = 0;
8252
8252
  let s1 = s5;
@@ -8316,7 +8316,7 @@ __export(exports_Chunk, {
8316
8316
  make: () => make5,
8317
8317
  lastNonEmpty: () => lastNonEmpty2,
8318
8318
  last: () => last2,
8319
- join: () => join3,
8319
+ join: () => join4,
8320
8320
  isNonEmpty: () => isNonEmpty,
8321
8321
  isEmpty: () => isEmpty,
8322
8322
  isChunk: () => isChunk,
@@ -8476,7 +8476,7 @@ var TypeId5, emptyArray, getEquivalence5 = (isEquivalent) => make((self2, that)
8476
8476
  }), unsafeFromNonEmptyArray = (self2) => unsafeFromArray(self2), unsafeGet2, append2, prepend2, take2, drop2, dropRight2, dropWhile2, prependAll2, appendAll2, filterMap3, filter6, filterMapWhile2, compact = (self2) => filterMap3(self2, identity), flatMap4, forEach2, flatten3, chunksOf2, intersection3, isEmpty = (self2) => self2.length === 0, isNonEmpty = (self2) => self2.length > 0, head3, unsafeHead2 = (self2) => unsafeGet2(self2, 0), headNonEmpty2, last2 = (self2) => get5(self2, self2.length - 1), unsafeLast = (self2) => unsafeGet2(self2, self2.length - 1), lastNonEmpty2, map7, mapAccum2, partition2, partitionMap3, separate2 = (self2) => pipe2(separate(toReadonlyArray(self2)), ([l3, r6]) => [unsafeFromArray(l3), unsafeFromArray(r6)]), size = (self2) => self2.length, sort2, sortWith2, splitAt2, splitNonEmptyAt2, split2, splitWhere2, tail2 = (self2) => self2.length > 0 ? some3(drop2(self2, 1)) : none2(), tailNonEmpty2 = (self2) => drop2(self2, 1), takeRight2, takeWhile2, union3, dedupe2 = (self2) => unsafeFromArray(dedupe(toReadonlyArray(self2))), dedupeAdjacent2 = (self2) => unsafeFromArray(dedupeAdjacent(self2)), unzip2 = (self2) => {
8477
8477
  const [left3, right3] = unzip(self2);
8478
8478
  return [unsafeFromArray(left3), unsafeFromArray(right3)];
8479
- }, zipWith4, zip2, remove3, removeOption2, modifyOption2, modify2, replace2, replaceOption2, makeBy2, range2 = (start, end) => start <= end ? makeBy2(end - start + 1, (i6) => start + i6) : of2(start), contains3, containsWith3, findFirst3, findFirstIndex2, findLast2, findLastIndex2, every3, some5, join3, reduce2, reduceRight2, differenceWith2 = (isEquivalent) => {
8479
+ }, zipWith4, zip2, remove3, removeOption2, modifyOption2, modify2, replace2, replaceOption2, makeBy2, range2 = (start, end) => start <= end ? makeBy2(end - start + 1, (i6) => start + i6) : of2(start), contains3, containsWith3, findFirst3, findFirstIndex2, findLast2, findLastIndex2, every3, some5, join4, reduce2, reduceRight2, differenceWith2 = (isEquivalent) => {
8480
8480
  return dual(2, (self2, that) => unsafeFromArray(differenceWith(isEquivalent)(that, self2)));
8481
8481
  }, difference2;
8482
8482
  var init_Chunk = __esm(() => {
@@ -8836,7 +8836,7 @@ var init_Chunk = __esm(() => {
8836
8836
  findLastIndex2 = findLastIndex;
8837
8837
  every3 = /* @__PURE__ */ dual(2, (self2, refinement) => fromIterable2(self2).every(refinement));
8838
8838
  some5 = /* @__PURE__ */ dual(2, (self2, predicate) => fromIterable2(self2).some(predicate));
8839
- join3 = join2;
8839
+ join4 = join3;
8840
8840
  reduce2 = reduce;
8841
8841
  reduceRight2 = reduceRight;
8842
8842
  difference2 = /* @__PURE__ */ dual(2, (self2, that) => unsafeFromArray(difference(that, self2)));
@@ -13596,7 +13596,7 @@ var ConfigErrorSymbolKey = "effect/ConfigError", ConfigErrorTypeId, proto3, And
13596
13596
  Object.defineProperty(error40, "toString", {
13597
13597
  enumerable: false,
13598
13598
  value() {
13599
- const path5 = pipe2(this.path, join2(options.pathDelim));
13599
+ const path5 = pipe2(this.path, join3(options.pathDelim));
13600
13600
  return `(Invalid data at ${path5}: "${this.message}")`;
13601
13601
  }
13602
13602
  });
@@ -13611,7 +13611,7 @@ var ConfigErrorSymbolKey = "effect/ConfigError", ConfigErrorTypeId, proto3, And
13611
13611
  Object.defineProperty(error40, "toString", {
13612
13612
  enumerable: false,
13613
13613
  value() {
13614
- const path5 = pipe2(this.path, join2(options.pathDelim));
13614
+ const path5 = pipe2(this.path, join3(options.pathDelim));
13615
13615
  return `(Missing data at ${path5}: "${this.message}")`;
13616
13616
  }
13617
13617
  });
@@ -13627,7 +13627,7 @@ var ConfigErrorSymbolKey = "effect/ConfigError", ConfigErrorTypeId, proto3, And
13627
13627
  Object.defineProperty(error40, "toString", {
13628
13628
  enumerable: false,
13629
13629
  value() {
13630
- const path5 = pipe2(this.path, join2(options.pathDelim));
13630
+ const path5 = pipe2(this.path, join3(options.pathDelim));
13631
13631
  return `(Source unavailable at ${path5}: "${this.message}")`;
13632
13632
  }
13633
13633
  });
@@ -13642,7 +13642,7 @@ var ConfigErrorSymbolKey = "effect/ConfigError", ConfigErrorTypeId, proto3, And
13642
13642
  Object.defineProperty(error40, "toString", {
13643
13643
  enumerable: false,
13644
13644
  value() {
13645
- const path5 = pipe2(this.path, join2(options.pathDelim));
13645
+ const path5 = pipe2(this.path, join3(options.pathDelim));
13646
13646
  return `(Unsupported operation at ${path5}: "${this.message}")`;
13647
13647
  }
13648
13648
  });
@@ -13882,7 +13882,7 @@ var concat = (l3, r6) => [...l3, ...r6], ConfigProviderSymbolKey = "effect/Confi
13882
13882
  pathDelim: "_",
13883
13883
  seqDelim: ","
13884
13884
  }, options);
13885
- const makePathString = (path4) => pipe2(path4, join2(pathDelim));
13885
+ const makePathString = (path4) => pipe2(path4, join3(pathDelim));
13886
13886
  const unmakePathString = (pathString) => pathString.split(pathDelim);
13887
13887
  const getEnv = () => typeof process !== "undefined" && ("env" in process) && typeof process.env === "object" ? process.env : {};
13888
13888
  const load = (path4, primitive, split3 = true) => {
@@ -14003,7 +14003,7 @@ var concat = (l3, r6) => [...l3, ...r6], ConfigProviderSymbolKey = "effect/Confi
14003
14003
  return fail2(right3.left);
14004
14004
  }
14005
14005
  if (isRight2(left3) && isRight2(right3)) {
14006
- const path4 = pipe2(prefix, join2("."));
14006
+ const path4 = pipe2(prefix, join3("."));
14007
14007
  const fail3 = fromFlatLoopFail(prefix, path4);
14008
14008
  const [lefts, rights] = extend3(fail3, fail3, pipe2(left3.right, map6(right2)), pipe2(right3.right, map6(right2)));
14009
14009
  return pipe2(lefts, zip(rights), forEachSequential(([left4, right4]) => pipe2(zip3(left4, right4), map13(([left5, right5]) => op.zip(left5, right5)))));
@@ -16449,7 +16449,7 @@ var FiberSymbolKey = "effect/Fiber", FiberTypeId, fiberVariance2, fiberProto, Ru
16449
16449
  const _fiber = {
16450
16450
  ...CommitPrototype,
16451
16451
  commit() {
16452
- return join4(this);
16452
+ return join5(this);
16453
16453
  },
16454
16454
  ...fiberProto,
16455
16455
  id: () => none4,
@@ -16463,7 +16463,7 @@ var FiberSymbolKey = "effect/Fiber", FiberTypeId, fiberVariance2, fiberProto, Ru
16463
16463
  }, dump = (self2) => map13(self2.status, (status) => ({
16464
16464
  id: self2.id(),
16465
16465
  status
16466
- })), dumpAll = (fibers) => forEachSequential(fibers, dump), fail4 = (error40) => done4(fail3(error40)), failCause4 = (cause2) => done4(failCause3(cause2)), fromEffect = (effect) => map13(exit(effect), done4), id = (self2) => self2.id(), inheritAll = (self2) => self2.inheritAll, interrupted = (fiberId2) => done4(interrupt3(fiberId2)), interruptAll = (fibers) => flatMap10(fiberId, (fiberId2) => pipe2(fibers, interruptAllAs(fiberId2))), interruptAllAs, interruptAsFork, join4 = (self2) => zipLeft2(flatten6(self2.await), self2.inheritAll), map16, mapEffect2, mapFiber, match11, _never2, never3, orElse4, orElseEither2, poll = (self2) => self2.poll, parseMs = (milliseconds) => {
16466
+ })), dumpAll = (fibers) => forEachSequential(fibers, dump), fail4 = (error40) => done4(fail3(error40)), failCause4 = (cause2) => done4(failCause3(cause2)), fromEffect = (effect) => map13(exit(effect), done4), id = (self2) => self2.id(), inheritAll = (self2) => self2.inheritAll, interrupted = (fiberId2) => done4(interrupt3(fiberId2)), interruptAll = (fibers) => flatMap10(fiberId, (fiberId2) => pipe2(fibers, interruptAllAs(fiberId2))), interruptAllAs, interruptAsFork, join5 = (self2) => zipLeft2(flatten6(self2.await), self2.inheritAll), map16, mapEffect2, mapFiber, match11, _never2, never3, orElse4, orElseEither2, poll = (self2) => self2.poll, parseMs = (milliseconds) => {
16467
16467
  const roundTowardsZero = milliseconds > 0 ? Math.floor : Math.ceil;
16468
16468
  return {
16469
16469
  days: roundTowardsZero(milliseconds / 86400000),
@@ -16552,7 +16552,7 @@ var init_fiber = __esm(() => {
16552
16552
  const _fiber = {
16553
16553
  ...CommitPrototype,
16554
16554
  commit() {
16555
- return join4(this);
16555
+ return join5(this);
16556
16556
  },
16557
16557
  ...fiberProto,
16558
16558
  id: () => self2.id(),
@@ -16587,7 +16587,7 @@ var init_fiber = __esm(() => {
16587
16587
  _never2 = {
16588
16588
  ...CommitPrototype,
16589
16589
  commit() {
16590
- return join4(this);
16590
+ return join5(this);
16591
16591
  },
16592
16592
  ...fiberProto,
16593
16593
  id: () => none4,
@@ -16601,7 +16601,7 @@ var init_fiber = __esm(() => {
16601
16601
  orElse4 = /* @__PURE__ */ dual(2, (self2, that) => ({
16602
16602
  ...CommitPrototype,
16603
16603
  commit() {
16604
- return join4(this);
16604
+ return join5(this);
16605
16605
  },
16606
16606
  ...fiberProto,
16607
16607
  id: () => getOrElse6(self2.id(), that.id()),
@@ -19042,7 +19042,7 @@ var fiberStarted, fiberActive, fiberSuccesses, fiberFailures, fiberLifetimes, Ev
19042
19042
  next2();
19043
19043
  }
19044
19044
  }));
19045
- return asVoid2(onExit(flatten6(restore(join4(processingFiber))), exitMatch({
19045
+ return asVoid2(onExit(flatten6(restore(join5(processingFiber))), exitMatch({
19046
19046
  onFailure: (cause2) => {
19047
19047
  onInterruptSignal();
19048
19048
  const target2 = residual.length + 1;
@@ -19213,7 +19213,7 @@ var fiberStarted, fiberActive, fiberSuccesses, fiberFailures, fiberLifetimes, Ev
19213
19213
  const _fiberAll = {
19214
19214
  ...CommitPrototype2,
19215
19215
  commit() {
19216
- return join4(this);
19216
+ return join5(this);
19217
19217
  },
19218
19218
  [FiberTypeId]: fiberVariance2,
19219
19219
  id: () => fromIterable2(fibers).reduce((id2, fiber) => combine3(id2, fiber.id()), none4),
@@ -19243,7 +19243,7 @@ var fiberStarted, fiberActive, fiberSuccesses, fiberFailures, fiberLifetimes, Ev
19243
19243
  interruptAsFork: (fiberId2) => forEachSequentialDiscard(fibers, (fiber) => fiber.interruptAsFork(fiberId2))
19244
19244
  };
19245
19245
  return _fiberAll;
19246
- }, fiberInterruptFork = (self2) => asVoid2(forkDaemon(interruptFiber(self2))), fiberJoinAll = (fibers) => join4(fiberAll(fibers)), fiberScoped = (self2) => acquireRelease(succeed(self2), interruptFiber), raceWith, disconnect = (self2) => uninterruptibleMask((restore) => fiberIdWith((fiberId2) => flatMap10(forkDaemon(restore(self2)), (fiber) => pipe2(restore(join4(fiber)), onInterrupt(() => pipe2(fiber, interruptAsFork(fiberId2))))))), race, raceFibersWith, completeRace = (winner, loser, cont, ab, cb) => {
19246
+ }, fiberInterruptFork = (self2) => asVoid2(forkDaemon(interruptFiber(self2))), fiberJoinAll = (fibers) => join5(fiberAll(fibers)), fiberScoped = (self2) => acquireRelease(succeed(self2), interruptFiber), raceWith, disconnect = (self2) => uninterruptibleMask((restore) => fiberIdWith((fiberId2) => flatMap10(forkDaemon(restore(self2)), (fiber) => pipe2(restore(join5(fiber)), onInterrupt(() => pipe2(fiber, interruptAsFork(fiberId2))))))), race, raceFibersWith, completeRace = (winner, loser, cont, ab, cb) => {
19247
19247
  if (compareAndSet(true, false)(ab)) {
19248
19248
  cb(cont(winner, loser));
19249
19249
  }
@@ -19470,7 +19470,7 @@ var init_fiberRuntime = __esm(() => {
19470
19470
  this.refreshRefCache();
19471
19471
  }
19472
19472
  commit() {
19473
- return join4(this);
19473
+ return join5(this);
19474
19474
  }
19475
19475
  id() {
19476
19476
  return this._fiberId;
@@ -20402,11 +20402,11 @@ var init_fiberRuntime = __esm(() => {
20402
20402
  }));
20403
20403
  race = /* @__PURE__ */ dual(2, (self2, that) => fiberIdWith((parentFiberId) => raceWith(self2, that, {
20404
20404
  onSelfDone: (exit2, right3) => exitMatchEffect(exit2, {
20405
- onFailure: (cause2) => pipe2(join4(right3), mapErrorCause((cause22) => parallel(cause2, cause22))),
20405
+ onFailure: (cause2) => pipe2(join5(right3), mapErrorCause((cause22) => parallel(cause2, cause22))),
20406
20406
  onSuccess: (value2) => pipe2(right3, interruptAsFiber(parentFiberId), as3(value2))
20407
20407
  }),
20408
20408
  onOtherDone: (exit2, left3) => exitMatchEffect(exit2, {
20409
- onFailure: (cause2) => pipe2(join4(left3), mapErrorCause((cause22) => parallel(cause22, cause2))),
20409
+ onFailure: (cause2) => pipe2(join5(left3), mapErrorCause((cause22) => parallel(cause22, cause2))),
20410
20410
  onSuccess: (value2) => pipe2(left3, interruptAsFiber(parentFiberId), as3(value2))
20411
20411
  })
20412
20412
  })));
@@ -20902,7 +20902,7 @@ var unsafeMakeSemaphore = (permits) => new Semaphore(permits), makeSemaphore = (
20902
20902
  return end3 - time3 <= 0 ? some3(computeCachedValue(self2, timeToLive, time3)) : none2();
20903
20903
  }
20904
20904
  }
20905
- })), flatMap10((option2) => isNone2(option2) ? dieMessage("BUG: Effect.cachedInvalidate - please report an issue at https://github.com/Effect-TS/effect/issues") : restore(deferredAwait(option2.value[1]))))), invalidateCache = (cache) => set6(cache, none2()), ensuringChild, ensuringChildren, forkAll, forkIn, forkScoped = (self2) => scopeWith((scope2) => forkIn(self2, scope2)), fromFiber = (fiber) => join4(fiber), fromFiberEffect = (fiber) => suspend(() => flatMap10(fiber, join4)), memoKeySymbol, Key, cachedFunction = (f4, eq) => {
20905
+ })), flatMap10((option2) => isNone2(option2) ? dieMessage("BUG: Effect.cachedInvalidate - please report an issue at https://github.com/Effect-TS/effect/issues") : restore(deferredAwait(option2.value[1]))))), invalidateCache = (cache) => set6(cache, none2()), ensuringChild, ensuringChildren, forkAll, forkIn, forkScoped = (self2) => scopeWith((scope2) => forkIn(self2, scope2)), fromFiber = (fiber) => join5(fiber), fromFiberEffect = (fiber) => suspend(() => flatMap10(fiber, join5)), memoKeySymbol, Key, cachedFunction = (f4, eq) => {
20906
20906
  return pipe2(sync(() => empty26()), flatMap10(makeSynchronized), map13((ref) => (a3) => pipe2(ref.modifyEffect((map19) => {
20907
20907
  const result2 = pipe2(map19, get15(new Key(a3, eq)));
20908
20908
  if (isNone2(result2)) {
@@ -21148,7 +21148,7 @@ var init_circular = __esm(() => {
21148
21148
  zipWithFiber = /* @__PURE__ */ dual(3, (self2, that, f4) => ({
21149
21149
  ...CommitPrototype2,
21150
21150
  commit() {
21151
- return join4(this);
21151
+ return join5(this);
21152
21152
  },
21153
21153
  [FiberTypeId]: fiberVariance2,
21154
21154
  id: () => pipe2(self2.id(), getOrElse6(that.id())),
@@ -21201,7 +21201,7 @@ __export(exports_Fiber, {
21201
21201
  mapEffect: () => mapEffect3,
21202
21202
  map: () => map19,
21203
21203
  joinAll: () => joinAll,
21204
- join: () => join5,
21204
+ join: () => join6,
21205
21205
  isRuntimeFiber: () => isRuntimeFiber2,
21206
21206
  isFiber: () => isFiber2,
21207
21207
  interrupted: () => interrupted2,
@@ -21228,7 +21228,7 @@ __export(exports_Fiber, {
21228
21228
  Order: () => Order5,
21229
21229
  FiberTypeId: () => FiberTypeId2
21230
21230
  });
21231
- var FiberTypeId2, RuntimeFiberTypeId2, Order5, isFiber2, isRuntimeFiber2, id2, _await2, awaitAll, children2, all7, done7, dump2, dumpAll2, fail6, failCause5, fromEffect3, getCurrentFiber2, inheritAll2, interrupt5, interrupted2, interruptAs, interruptAsFork2, interruptAll2, interruptAllAs2, interruptFork, join5, joinAll, map19, mapEffect3, mapFiber2, match13, never4, orElse5, orElseEither4, poll2, pretty4, roots2, unsafeRoots2, scoped, status2, succeed6, void_7, zip7, zipLeft5, zipRight5, zipWith7;
21231
+ var FiberTypeId2, RuntimeFiberTypeId2, Order5, isFiber2, isRuntimeFiber2, id2, _await2, awaitAll, children2, all7, done7, dump2, dumpAll2, fail6, failCause5, fromEffect3, getCurrentFiber2, inheritAll2, interrupt5, interrupted2, interruptAs, interruptAsFork2, interruptAll2, interruptAllAs2, interruptFork, join6, joinAll, map19, mapEffect3, mapFiber2, match13, never4, orElse5, orElseEither4, poll2, pretty4, roots2, unsafeRoots2, scoped, status2, succeed6, void_7, zip7, zipLeft5, zipRight5, zipWith7;
21232
21232
  var init_Fiber = __esm(() => {
21233
21233
  init_core();
21234
21234
  init_circular();
@@ -21259,7 +21259,7 @@ var init_Fiber = __esm(() => {
21259
21259
  interruptAll2 = interruptAll;
21260
21260
  interruptAllAs2 = interruptAllAs;
21261
21261
  interruptFork = fiberInterruptFork;
21262
- join5 = join4;
21262
+ join6 = join5;
21263
21263
  joinAll = fiberJoinAll;
21264
21264
  map19 = map16;
21265
21265
  mapEffect3 = mapEffect2;
@@ -27430,7 +27430,7 @@ __export(exports_SchemaAST, {
27430
27430
  symbolKeyword: () => symbolKeyword,
27431
27431
  stringKeyword: () => stringKeyword,
27432
27432
  required: () => required2,
27433
- rename: () => rename,
27433
+ rename: () => rename2,
27434
27434
  record: () => record2,
27435
27435
  pruneUndefined: () => pruneUndefined,
27436
27436
  pickAnnotations: () => pickAnnotations,
@@ -28909,7 +28909,7 @@ var BrandAnnotationId, SchemaIdAnnotationId, MessageAnnotationId, MissingMessage
28909
28909
  return _keyof(ast.to);
28910
28910
  }
28911
28911
  throw new Error(getASTUnsupportedSchemaErrorMessage(ast));
28912
- }, compose4 = (ab, cd) => new Transformation(ab, cd, composeTransformation), rename = (ast, mapping) => {
28912
+ }, compose4 = (ab, cd) => new Transformation(ab, cd, composeTransformation), rename2 = (ast, mapping) => {
28913
28913
  switch (ast._tag) {
28914
28914
  case "TypeLiteral": {
28915
28915
  const propertySignatureTransformations = [];
@@ -28928,11 +28928,11 @@ var BrandAnnotationId, SchemaIdAnnotationId, MessageAnnotationId, MissingMessage
28928
28928
  }), ast.indexSignatures), new TypeLiteralTransformation(propertySignatureTransformations));
28929
28929
  }
28930
28930
  case "Union":
28931
- return Union.make(ast.types.map((ast2) => rename(ast2, mapping)));
28931
+ return Union.make(ast.types.map((ast2) => rename2(ast2, mapping)));
28932
28932
  case "Suspend":
28933
- return new Suspend(() => rename(ast.f(), mapping));
28933
+ return new Suspend(() => rename2(ast.f(), mapping));
28934
28934
  case "Transformation":
28935
- return compose4(ast, rename(typeAST(ast), mapping));
28935
+ return compose4(ast, rename2(typeAST(ast), mapping));
28936
28936
  }
28937
28937
  throw new Error(getASTUnsupportedRenameSchemaErrorMessage(ast));
28938
28938
  }, formatKeyword = (ast) => getOrElse2(getExpected(ast), () => ast._tag), getOrElseExpected = (ast) => getTitleAnnotation(ast).pipe(orElse2(() => getDescriptionAnnotation(ast)), orElse2(() => getAutoTitleAnnotation(ast)), map3((s5) => s5 + getBrands(ast))), getExpected = (ast) => orElse2(getIdentifierAnnotation(ast), () => getOrElseExpected(ast)), pruneUndefined = (ast, self2, onTransformation) => {
@@ -30418,7 +30418,7 @@ __export(exports_Schema, {
30418
30418
  serializableSchema: () => serializableSchema,
30419
30419
  requiredToOptional: () => requiredToOptional,
30420
30420
  required: () => required3,
30421
- rename: () => rename2,
30421
+ rename: () => rename3,
30422
30422
  propertySignature: () => propertySignature,
30423
30423
  positiveBigInt: () => positiveBigInt,
30424
30424
  positiveBigDecimal: () => positiveBigDecimal,
@@ -31761,7 +31761,7 @@ var TypeId22, variance8, makeStandardResult = (exit3) => isSuccess2(exit3) ? exi
31761
31761
  }
31762
31762
  }
31763
31763
  return none2();
31764
- }, filterEffect, transformOrFail, transform3, attachPropertySignature, annotations2, rename2, TrimmedSchemaId, trimmed = (annotations3) => (self2) => self2.pipe(filter15((a3) => a3 === a3.trim(), {
31764
+ }, filterEffect, transformOrFail, transform3, attachPropertySignature, annotations2, rename3, TrimmedSchemaId, trimmed = (annotations3) => (self2) => self2.pipe(filter15((a3) => a3 === a3.trim(), {
31765
31765
  schemaId: TrimmedSchemaId,
31766
31766
  title: "trimmed",
31767
31767
  description: "a string with no leading or trailing whitespace",
@@ -33563,7 +33563,7 @@ var init_Schema = __esm(() => {
33563
33563
  return make50(new Transformation(schema.ast, annotations2 ? mergeSchemaAnnotations(ast, annotations2) : ast, new TypeLiteralTransformation([new PropertySignatureTransformation(key, key, () => some3(value4), () => none2())])));
33564
33564
  });
33565
33565
  annotations2 = /* @__PURE__ */ dual(2, (self2, annotations3) => self2.annotations(annotations3));
33566
- rename2 = /* @__PURE__ */ dual(2, (self2, mapping) => make50(rename(self2.ast, mapping)));
33566
+ rename3 = /* @__PURE__ */ dual(2, (self2, mapping) => make50(rename2(self2.ast, mapping)));
33567
33567
  TrimmedSchemaId = /* @__PURE__ */ Symbol.for("effect/SchemaId/Trimmed");
33568
33568
  MaxLengthSchemaId2 = MaxLengthSchemaId;
33569
33569
  MinLengthSchemaId2 = MinLengthSchemaId;
@@ -37917,8 +37917,8 @@ var init_channel = __esm(() => {
37917
37917
  function go3(state) {
37918
37918
  switch (state._tag) {
37919
37919
  case OP_BOTH_RUNNING: {
37920
- const leftJoin = interruptible4(join5(state.left));
37921
- const rightJoin = interruptible4(join5(state.right));
37920
+ const leftJoin = interruptible4(join6(state.left));
37921
+ const rightJoin = interruptible4(join6(state.right));
37922
37922
  return unwrap4(raceWith2(leftJoin, rightJoin, {
37923
37923
  onSelfDone: (leftExit, rf) => zipRight7(interrupt5(rf), handleSide(leftExit, state.right, pullL)(options.onSelfDone, BothRunning, (f4) => LeftDone(f4))),
37924
37924
  onOtherDone: (rightExit, lf) => zipRight7(interrupt5(lf), handleSide(rightExit, state.left, pullR)(options.onOtherDone, (left3, right3) => BothRunning(right3, left3), (f4) => RightDone(f4)))
@@ -41273,14 +41273,14 @@ var init_stream = __esm(() => {
41273
41273
  }
41274
41274
  }
41275
41275
  })), unwrap4);
41276
- return unwrap4(raceWith2(join5(sinkFiber), join5(scheduleFiber), {
41276
+ return unwrap4(raceWith2(join6(sinkFiber), join6(scheduleFiber), {
41277
41277
  onSelfDone: (sinkExit, _2) => pipe2(interrupt5(scheduleFiber), zipRight7(pipe2(suspend3(() => sinkExit), map22(([leftovers, b2]) => handleSide(leftovers, b2, none2()))))),
41278
41278
  onOtherDone: (scheduleExit, _2) => matchCauseEffect3(suspend3(() => scheduleExit), {
41279
41279
  onFailure: (cause3) => match2(failureOrCause2(cause3), {
41280
- onLeft: () => pipe2(handoff, offer6(end3(ScheduleEnd)), forkDaemon2, zipRight7(pipe2(join5(sinkFiber), map22(([leftovers, b2]) => handleSide(leftovers, b2, none2()))))),
41281
- onRight: (cause4) => pipe2(handoff, offer6(halt(cause4)), forkDaemon2, zipRight7(pipe2(join5(sinkFiber), map22(([leftovers, b2]) => handleSide(leftovers, b2, none2())))))
41280
+ onLeft: () => pipe2(handoff, offer6(end3(ScheduleEnd)), forkDaemon2, zipRight7(pipe2(join6(sinkFiber), map22(([leftovers, b2]) => handleSide(leftovers, b2, none2()))))),
41281
+ onRight: (cause4) => pipe2(handoff, offer6(halt(cause4)), forkDaemon2, zipRight7(pipe2(join6(sinkFiber), map22(([leftovers, b2]) => handleSide(leftovers, b2, none2())))))
41282
41282
  }),
41283
- onSuccess: (c3) => pipe2(handoff, offer6(end3(ScheduleEnd)), forkDaemon2, zipRight7(pipe2(join5(sinkFiber), map22(([leftovers, b2]) => handleSide(leftovers, b2, some3(c3))))))
41283
+ onSuccess: (c3) => pipe2(handoff, offer6(end3(ScheduleEnd)), forkDaemon2, zipRight7(pipe2(join6(sinkFiber), map22(([leftovers, b2]) => handleSide(leftovers, b2, some3(c3))))))
41284
41284
  })
41285
41285
  }));
41286
41286
  };
@@ -41480,7 +41480,7 @@ var init_stream = __esm(() => {
41480
41480
  })));
41481
41481
  }
41482
41482
  case OP_PREVIOUS: {
41483
- return unwrap4(take7(handoff).pipe(forkIn2(scope5), flatMap15((handoffFiber) => raceWith2(join5(state.fiber), join5(handoffFiber), {
41483
+ return unwrap4(take7(handoff).pipe(forkIn2(scope5), flatMap15((handoffFiber) => raceWith2(join6(state.fiber), join6(handoffFiber), {
41484
41484
  onSelfDone: (leftExit, current2) => match10(leftExit, {
41485
41485
  onFailure: (cause3) => interrupt5(current2).pipe(as7(failCause11(cause3))),
41486
41486
  onSuccess: (chunk4) => interrupt5(current2).pipe(zipRight7(succeed11(write(chunk4).pipe(flatMap18(() => consumer(current(handoffFiber)))))))
@@ -41496,7 +41496,7 @@ var init_stream = __esm(() => {
41496
41496
  return interrupt5(previous2).pipe(as7(failCause11(signal.cause)));
41497
41497
  }
41498
41498
  case OP_END: {
41499
- return join5(previous2).pipe(map22((chunk4) => write(chunk4).pipe(zipRight8(void_8))));
41499
+ return join6(previous2).pipe(map22((chunk4) => write(chunk4).pipe(zipRight8(void_8))));
41500
41500
  }
41501
41501
  }
41502
41502
  }
@@ -41504,7 +41504,7 @@ var init_stream = __esm(() => {
41504
41504
  }))));
41505
41505
  }
41506
41506
  case OP_CURRENT: {
41507
- return unwrap4(join5(state.fiber).pipe(map22((signal) => {
41507
+ return unwrap4(join6(state.fiber).pipe(map22((signal) => {
41508
41508
  switch (signal._tag) {
41509
41509
  case OP_EMIT4: {
41510
41510
  return unwrap4(enqueue(signal.elements));
@@ -42951,8 +42951,8 @@ var init_stream = __esm(() => {
42951
42951
  zipLatestWith = /* @__PURE__ */ dual(3, (left3, right3, f4) => {
42952
42952
  const pullNonEmpty = (pull) => pipe2(pull, flatMap15((chunk4) => isEmpty(chunk4) ? pullNonEmpty(pull) : succeed11(chunk4)));
42953
42953
  return pipe2(toPull2(left3), map22(pullNonEmpty), zip8(pipe2(toPull2(right3), map22(pullNonEmpty))), flatMap15(([left4, right4]) => pipe2(fromEffectOption(raceWith2(left4, right4, {
42954
- onSelfDone: (leftDone, rightFiber) => pipe2(suspend3(() => leftDone), zipWith10(join5(rightFiber), (l3, r6) => [l3, r6, true])),
42955
- onOtherDone: (rightDone, leftFiber) => pipe2(suspend3(() => rightDone), zipWith10(join5(leftFiber), (l3, r6) => [r6, l3, false]))
42954
+ onSelfDone: (leftDone, rightFiber) => pipe2(suspend3(() => leftDone), zipWith10(join6(rightFiber), (l3, r6) => [l3, r6, true])),
42955
+ onOtherDone: (rightDone, leftFiber) => pipe2(suspend3(() => rightDone), zipWith10(join6(leftFiber), (l3, r6) => [r6, l3, false]))
42956
42956
  })), flatMap21(([l3, r6, leftFirst]) => pipe2(fromEffect8(make26([unsafeLast(l3), unsafeLast(r6)])), flatMap21((latest) => pipe2(fromChunk(leftFirst ? pipe2(r6, map7((a22) => f4(unsafeLast(l3), a22))) : pipe2(l3, map7((a3) => f4(a3, unsafeLast(r6))))), concat2(pipe2(repeatEffectOption(left4), mergeEither(repeatEffectOption(right4)), mapEffectSequential(match2({
42957
42957
  onLeft: (leftChunk) => modify6(latest, ([_2, rightLatest]) => [pipe2(leftChunk, map7((a3) => f4(a3, rightLatest))), [unsafeLast(leftChunk), rightLatest]]),
42958
42958
  onRight: (rightChunk) => modify6(latest, ([leftLatest, _2]) => [pipe2(rightChunk, map7((a22) => f4(leftLatest, a22))), [leftLatest, unsafeLast(rightChunk)]])
@@ -44960,7 +44960,7 @@ __export(exports_FiberHandle, {
44960
44960
  makeRuntimePromise: () => makeRuntimePromise,
44961
44961
  makeRuntime: () => makeRuntime,
44962
44962
  make: () => make70,
44963
- join: () => join6,
44963
+ join: () => join7,
44964
44964
  isFiberHandle: () => isFiberHandle,
44965
44965
  get: () => get20,
44966
44966
  clear: () => clear3,
@@ -45027,7 +45027,7 @@ var TypeId32, isFiberHandle = (u7) => hasProperty(u7, TypeId32), Proto5, unsafeM
45027
45027
  } else {
45028
45028
  reject2(squash(exit3.cause));
45029
45029
  }
45030
- }))), join6 = (self2) => _await3(self2.deferred), awaitEmpty = (self2) => suspend3(() => {
45030
+ }))), join7 = (self2) => _await3(self2.deferred), awaitEmpty = (self2) => suspend3(() => {
45031
45031
  if (self2.state._tag === "Closed" || self2.state.fiber === undefined) {
45032
45032
  return _void3;
45033
45033
  }
@@ -45130,7 +45130,7 @@ __export(exports_FiberMap, {
45130
45130
  makeRuntimePromise: () => makeRuntimePromise2,
45131
45131
  makeRuntime: () => makeRuntime2,
45132
45132
  make: () => make71,
45133
- join: () => join7,
45133
+ join: () => join8,
45134
45134
  isFiberMap: () => isFiberMap,
45135
45135
  has: () => has10,
45136
45136
  get: () => get21,
@@ -45195,7 +45195,7 @@ var TypeId33, isFiberMap = (u7) => hasProperty(u7, TypeId33), Proto6, unsafeMake
45195
45195
  } else {
45196
45196
  reject2(squash(exit3.cause));
45197
45197
  }
45198
- }))), size20 = (self2) => sync6(() => self2.state._tag === "Closed" ? 0 : size7(self2.state.backing)), join7 = (self2) => _await3(self2.deferred), awaitEmpty2 = (self2) => whileLoop2({
45198
+ }))), size20 = (self2) => sync6(() => self2.state._tag === "Closed" ? 0 : size7(self2.state.backing)), join8 = (self2) => _await3(self2.deferred), awaitEmpty2 = (self2) => whileLoop2({
45199
45199
  while: () => self2.state._tag === "Open" && size7(self2.state.backing) > 0,
45200
45200
  body: () => _await2(unsafeHead(self2)[1]),
45201
45201
  step: constVoid
@@ -45351,7 +45351,7 @@ var TypeId34, isFiberSet = (u7) => hasProperty(u7, TypeId34), Proto7, unsafeMake
45351
45351
  unsafeAdd(self2, fiber);
45352
45352
  return fiber;
45353
45353
  };
45354
- }), join8 = (self2) => _await3(self2.deferred), awaitEmpty3 = (self2) => whileLoop2({
45354
+ }), join9 = (self2) => _await3(self2.deferred), awaitEmpty3 = (self2) => whileLoop2({
45355
45355
  while: () => self2.state._tag === "Open" && self2.state.backing.size > 0,
45356
45356
  body: () => _await2(unsafeHead(self2)),
45357
45357
  step: constVoid
@@ -51047,14 +51047,14 @@ var TypeId54, isSocket = (u7) => hasProperty(u7, TypeId54), Socket, CloseEventTy
51047
51047
  reason: "OpenTimeout",
51048
51048
  cause: 'timeout waiting for "open"'
51049
51049
  })
51050
- }), raceFirst2(join8(fiberSet)));
51050
+ }), raceFirst2(join9(fiberSet)));
51051
51051
  }
51052
51052
  open = true;
51053
51053
  currentWS = ws;
51054
51054
  yield* latch.open;
51055
51055
  if (opts?.onOpen)
51056
51056
  yield* opts.onOpen;
51057
- return yield* join8(fiberSet).pipe(catchIf2(SocketCloseError.isClean((_2) => !closeCodeIsError(_2)), (_2) => _void3));
51057
+ return yield* join9(fiberSet).pipe(catchIf2(SocketCloseError.isClean((_2) => !closeCodeIsError(_2)), (_2) => _void3));
51058
51058
  })).pipe(mapInputContext3((input2) => merge4(acquireContext, input2)), ensuring3(sync6(() => {
51059
51059
  latch.unsafeClose();
51060
51060
  currentWS = undefined;
@@ -51118,7 +51118,7 @@ var TypeId54, isSocket = (u7) => hasProperty(u7, TypeId54), Socket, CloseEventTy
51118
51118
  yield* latch.open;
51119
51119
  if (opts?.onOpen)
51120
51120
  yield* opts.onOpen;
51121
- return yield* join8(fiberSet).pipe(catchIf2(SocketCloseError.isClean((_2) => !closeCodeIsError(_2)), (_2) => _void3));
51121
+ return yield* join9(fiberSet).pipe(catchIf2(SocketCloseError.isClean((_2) => !closeCodeIsError(_2)), (_2) => _void3));
51122
51122
  })).pipe((_2) => _2, mapInputContext3((input2) => merge4(acquireContext, input2)), ensuring3(sync6(() => {
51123
51123
  latch.unsafeClose();
51124
51124
  currentStream = undefined;
@@ -51445,7 +51445,7 @@ var PlatformWorkerTypeId, PlatformWorker, WorkerManagerTypeId, WorkerManager, Sp
51445
51445
  }
51446
51446
  buffer4.length = 0;
51447
51447
  }
51448
- return yield* restore(join8(fiberSet));
51448
+ return yield* restore(join9(fiberSet));
51449
51449
  }).pipe(scoped3));
51450
51450
  const send = (message, transfers) => try_3({
51451
51451
  try: () => {
@@ -54755,7 +54755,7 @@ var require_node_gyp_build = __commonJS((exports, module) => {
54755
54755
  var fs2 = __require("fs");
54756
54756
  var path4 = __require("path");
54757
54757
  var url3 = __require("url");
54758
- var os4 = __require("os");
54758
+ var os5 = __require("os");
54759
54759
  var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
54760
54760
  var vars = process.config && process.config.variables || {};
54761
54761
  var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
@@ -54765,8 +54765,8 @@ var require_node_gyp_build = __commonJS((exports, module) => {
54765
54765
  abi = "unsupported";
54766
54766
  }
54767
54767
  var runtime8 = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node";
54768
- var arch2 = process.env.npm_config_arch || os4.arch();
54769
- var platform2 = process.env.npm_config_platform || os4.platform();
54768
+ var arch2 = process.env.npm_config_arch || os5.arch();
54769
+ var platform2 = process.env.npm_config_platform || os5.platform();
54770
54770
  var libc = process.env.LIBC || (isMusl(platform2) ? "musl" : "glibc");
54771
54771
  var armv = process.env.ARM_VERSION || (arch2 === "arm64" ? "8" : vars.arm_version) || "";
54772
54772
  var uv = (versions2.uv || "").split(".")[0];
@@ -65596,7 +65596,7 @@ __export(exports_Schema2, {
65596
65596
  serializableSchema: () => serializableSchema,
65597
65597
  requiredToOptional: () => requiredToOptional,
65598
65598
  required: () => required3,
65599
- rename: () => rename2,
65599
+ rename: () => rename3,
65600
65600
  propertySignature: () => propertySignature,
65601
65601
  positiveBigInt: () => positiveBigInt,
65602
65602
  positiveBigDecimal: () => positiveBigDecimal,
@@ -77097,7 +77097,7 @@ var require_lodash = __commonJS((exports, module) => {
77097
77097
  }
77098
77098
  return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
77099
77099
  });
77100
- function join9(array9, separator) {
77100
+ function join10(array9, separator) {
77101
77101
  return array9 == null ? "" : nativeJoin.call(array9, separator);
77102
77102
  }
77103
77103
  function last6(array9) {
@@ -79029,7 +79029,7 @@ __p += '`;
79029
79029
  lodash.isUndefined = isUndefined2;
79030
79030
  lodash.isWeakMap = isWeakMap;
79031
79031
  lodash.isWeakSet = isWeakSet;
79032
- lodash.join = join9;
79032
+ lodash.join = join10;
79033
79033
  lodash.kebabCase = kebabCase3;
79034
79034
  lodash.last = last6;
79035
79035
  lodash.lastIndexOf = lastIndexOf;
@@ -102164,7 +102164,7 @@ __export(exports_supports_color, {
102164
102164
  createSupportsColor: () => createSupportsColor2
102165
102165
  });
102166
102166
  import process7 from "node:process";
102167
- import os4 from "node:os";
102167
+ import os5 from "node:os";
102168
102168
  import tty2 from "node:tty";
102169
102169
  function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process7.argv) {
102170
102170
  const prefix3 = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
@@ -102222,7 +102222,7 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
102222
102222
  return min6;
102223
102223
  }
102224
102224
  if (process7.platform === "win32") {
102225
- const osRelease = os4.release().split(".");
102225
+ const osRelease = os5.release().split(".");
102226
102226
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
102227
102227
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
102228
102228
  }
@@ -127436,7 +127436,7 @@ var require_snapshot_utils = __commonJS((exports, module) => {
127436
127436
 
127437
127437
  // ../../node_modules/@effect/platform-node/node_modules/undici/lib/mock/snapshot-recorder.js
127438
127438
  var require_snapshot_recorder = __commonJS((exports, module) => {
127439
- var { writeFile: writeFile2, readFile: readFile7, mkdir: mkdir2 } = __require("node:fs/promises");
127439
+ var { writeFile: writeFile2, readFile: readFile8, mkdir: mkdir2 } = __require("node:fs/promises");
127440
127440
  var { dirname: dirname2, resolve: resolve5 } = __require("node:path");
127441
127441
  var { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = __require("node:timers");
127442
127442
  var { InvalidArgumentError: InvalidArgumentError5, UndiciError } = require_errors2();
@@ -127606,7 +127606,7 @@ var require_snapshot_recorder = __commonJS((exports, module) => {
127606
127606
  throw new InvalidArgumentError5("Snapshot path is required");
127607
127607
  }
127608
127608
  try {
127609
- const data = await readFile7(resolve5(path14), "utf8");
127609
+ const data = await readFile8(resolve5(path14), "utf8");
127610
127610
  const parsed = JSON.parse(data);
127611
127611
  if (Array.isArray(parsed)) {
127612
127612
  this.#snapshots.clear();
@@ -139587,7 +139587,7 @@ var handleBadArgument = (method) => (cause3) => new BadArgument({
139587
139587
  }, makeTempFile, makeTempFileScoped, readDirectory = (path14, options4) => tryPromise2({
139588
139588
  try: () => NFS2.promises.readdir(path14, options4),
139589
139589
  catch: (err) => handleErrnoException("FileSystem", "readDirectory")(err, [path14])
139590
- }), readFile8 = (path14) => async((resume2, signal2) => {
139590
+ }), readFile9 = (path14) => async((resume2, signal2) => {
139591
139591
  try {
139592
139592
  NFS2.readFile(path14, {
139593
139593
  signal: signal2
@@ -139601,22 +139601,22 @@ var handleBadArgument = (method) => (cause3) => new BadArgument({
139601
139601
  } catch (err) {
139602
139602
  resume2(fail10(handleBadArgument("readFile")(err)));
139603
139603
  }
139604
- }), readLink, realPath, rename4, makeFileInfo = (stat2) => ({
139605
- type: stat2.isFile() ? "File" : stat2.isDirectory() ? "Directory" : stat2.isSymbolicLink() ? "SymbolicLink" : stat2.isBlockDevice() ? "BlockDevice" : stat2.isCharacterDevice() ? "CharacterDevice" : stat2.isFIFO() ? "FIFO" : stat2.isSocket() ? "Socket" : "Unknown",
139606
- mtime: fromNullable2(stat2.mtime),
139607
- atime: fromNullable2(stat2.atime),
139608
- birthtime: fromNullable2(stat2.birthtime),
139609
- dev: stat2.dev,
139610
- rdev: fromNullable2(stat2.rdev),
139611
- ino: fromNullable2(stat2.ino),
139612
- mode: stat2.mode,
139613
- nlink: fromNullable2(stat2.nlink),
139614
- uid: fromNullable2(stat2.uid),
139615
- gid: fromNullable2(stat2.gid),
139616
- size: Size2(stat2.size),
139617
- blksize: map3(fromNullable2(stat2.blksize), Size2),
139618
- blocks: fromNullable2(stat2.blocks)
139619
- }), stat2, symlink2, truncate3, utimes2, watchNode = (path14, options4) => asyncScoped2((emit2) => acquireRelease2(sync6(() => {
139604
+ }), readLink, realPath, rename5, makeFileInfo = (stat3) => ({
139605
+ type: stat3.isFile() ? "File" : stat3.isDirectory() ? "Directory" : stat3.isSymbolicLink() ? "SymbolicLink" : stat3.isBlockDevice() ? "BlockDevice" : stat3.isCharacterDevice() ? "CharacterDevice" : stat3.isFIFO() ? "FIFO" : stat3.isSocket() ? "Socket" : "Unknown",
139606
+ mtime: fromNullable2(stat3.mtime),
139607
+ atime: fromNullable2(stat3.atime),
139608
+ birthtime: fromNullable2(stat3.birthtime),
139609
+ dev: stat3.dev,
139610
+ rdev: fromNullable2(stat3.rdev),
139611
+ ino: fromNullable2(stat3.ino),
139612
+ mode: stat3.mode,
139613
+ nlink: fromNullable2(stat3.nlink),
139614
+ uid: fromNullable2(stat3.uid),
139615
+ gid: fromNullable2(stat3.gid),
139616
+ size: Size2(stat3.size),
139617
+ blksize: map3(fromNullable2(stat3.blksize), Size2),
139618
+ blocks: fromNullable2(stat3.blocks)
139619
+ }), stat3, symlink2, truncate3, utimes2, watchNode = (path14, options4) => asyncScoped2((emit2) => acquireRelease2(sync6(() => {
139620
139620
  const watcher = NFS2.watch(path14, {
139621
139621
  recursive: options4?.recursive
139622
139622
  }, (event, path15) => {
@@ -139624,7 +139624,7 @@ var handleBadArgument = (method) => (cause3) => new BadArgument({
139624
139624
  return;
139625
139625
  switch (event) {
139626
139626
  case "rename": {
139627
- emit2.fromEffect(matchEffect3(stat2(path15), {
139627
+ emit2.fromEffect(matchEffect3(stat3(path15), {
139628
139628
  onSuccess: (_2) => succeed11(WatchEventCreate({
139629
139629
  path: path15
139630
139630
  })),
@@ -139655,7 +139655,7 @@ var handleBadArgument = (method) => (cause3) => new BadArgument({
139655
139655
  emit2.end();
139656
139656
  });
139657
139657
  return watcher;
139658
- }), (watcher) => sync6(() => watcher.close()))), watch3 = (backend, path14, options4) => stat2(path14).pipe(map22((stat3) => backend.pipe(flatMap2((_2) => _2.register(path14, stat3, options4)), getOrElse2(() => watchNode(path14, options4)))), unwrap8), writeFile3 = (path14, data, options4) => async((resume2, signal2) => {
139658
+ }), (watcher) => sync6(() => watcher.close()))), watch3 = (backend, path14, options4) => stat3(path14).pipe(map22((stat4) => backend.pipe(flatMap2((_2) => _2.register(path14, stat4, options4)), getOrElse2(() => watchNode(path14, options4)))), unwrap8), writeFile3 = (path14, data, options4) => async((resume2, signal2) => {
139659
139659
  try {
139660
139660
  NFS2.writeFile(path14, data, {
139661
139661
  signal: signal2,
@@ -139861,11 +139861,11 @@ var init_fileSystem2 = __esm(() => {
139861
139861
  const nodeRealPath = /* @__PURE__ */ effectify2(NFS2.realpath, /* @__PURE__ */ handleErrnoException("FileSystem", "realPath"), /* @__PURE__ */ handleBadArgument("realPath"));
139862
139862
  return (path14) => nodeRealPath(path14);
139863
139863
  })();
139864
- rename4 = /* @__PURE__ */ (() => {
139864
+ rename5 = /* @__PURE__ */ (() => {
139865
139865
  const nodeRename = /* @__PURE__ */ effectify2(NFS2.rename, /* @__PURE__ */ handleErrnoException("FileSystem", "rename"), /* @__PURE__ */ handleBadArgument("rename"));
139866
139866
  return (oldPath, newPath) => nodeRename(oldPath, newPath);
139867
139867
  })();
139868
- stat2 = /* @__PURE__ */ (() => {
139868
+ stat3 = /* @__PURE__ */ (() => {
139869
139869
  const nodeStat = /* @__PURE__ */ effectify2(NFS2.stat, /* @__PURE__ */ handleErrnoException("FileSystem", "stat"), /* @__PURE__ */ handleBadArgument("stat"));
139870
139870
  return (path14) => map22(nodeStat(path14), makeFileInfo);
139871
139871
  })();
@@ -139895,12 +139895,12 @@ var init_fileSystem2 = __esm(() => {
139895
139895
  makeTempFileScoped,
139896
139896
  open: open3,
139897
139897
  readDirectory,
139898
- readFile: readFile8,
139898
+ readFile: readFile9,
139899
139899
  readLink,
139900
139900
  realPath,
139901
139901
  remove: remove21,
139902
- rename: rename4,
139903
- stat: stat2,
139902
+ rename: rename5,
139903
+ stat: stat3,
139904
139904
  symlink: symlink2,
139905
139905
  truncate: truncate3,
139906
139906
  utimes: utimes2,
@@ -140672,7 +140672,7 @@ var NetSocket, makeNet = (options4) => fromDuplex3(scopeWith2((scope5) => {
140672
140672
  yield* latch.open;
140673
140673
  if (opts?.onOpen)
140674
140674
  yield* opts.onOpen;
140675
- return yield* join8(fiberSet);
140675
+ return yield* join9(fiberSet);
140676
140676
  function onData(chunk4) {
140677
140677
  const result2 = handler2(chunk4);
140678
140678
  if (isEffect2(result2)) {
@@ -148422,7 +148422,7 @@ var AnsiSymbolKey = "@effect/printer-ansi/Ansi", AnsiTypeId, make176 = (params3)
148422
148422
  ...params3
148423
148423
  }), typeIdSemigroup, getFirstSomeSemigroup, AnsiSemigroup, typeIdMonoid, monoidOrElse, AnsiMonoid, none13, ESC = "\x1B[", cursorLeft, cursorSavePosition, cursorRestorePosition, cursorHide, cursorShow, eraseEndLine, eraseStartLine, eraseLine, eraseDown, eraseUp, eraseScreen, stringify3 = (self2) => stringifyInternal(self2), combine14, combineInternal = (self2, that) => AnsiSemigroup.combine(self2, that), stringifyInternal = (self2) => {
148424
148424
  const displaySequence = toEscapeSequence(getSomes([some3(reset2), self2.foreground, self2.background, self2.bold, self2.italicized, self2.strikethrough, self2.underlined]));
148425
- const commandSequence = join2(self2.commands, "");
148425
+ const commandSequence = join3(self2.commands, "");
148426
148426
  return `${displaySequence}${commandSequence}`;
148427
148427
  };
148428
148428
  var init_ansi = __esm(() => {
@@ -165270,12 +165270,12 @@ schema (${C4._tag}): ${C4}`;
165270
165270
  default:
165271
165271
  return x();
165272
165272
  }
165273
- }, bZQ, VDB, WDB, JW = (A4) => (Q, B2) => hZQ(WDB, { method: A4, url: Q, ...B2 ?? undefined }), zFA, MFA, wFA, LFA, OFA, RFA, TFA, hZQ, qFA, is5, _FA, mZQ, fZQ, PFA, dZQ, uZQ, cZQ, pZQ, Yk, wDB = (A4) => `http.request.header.${A4}`, LDB = "http.request.method", ODB = (A4) => `http.response.header.${A4}`, RDB = "http.response.status_code", TDB = "server.address", qDB = "server.port", _DB = "url.full", PDB = "url.path", jDB = "url.scheme", xDB = "url.query", xFA, gFA, iZQ, nZQ, oZQ, SDB, os7 = (A4, Q) => {
165273
+ }, bZQ, VDB, WDB, JW = (A4) => (Q, B2) => hZQ(WDB, { method: A4, url: Q, ...B2 ?? undefined }), zFA, MFA, wFA, LFA, OFA, RFA, TFA, hZQ, qFA, is5, _FA, mZQ, fZQ, PFA, dZQ, uZQ, cZQ, pZQ, Yk, wDB = (A4) => `http.request.header.${A4}`, LDB = "http.request.method", ODB = (A4) => `http.response.header.${A4}`, RDB = "http.response.status_code", TDB = "server.address", qDB = "server.port", _DB = "url.full", PDB = "url.path", jDB = "url.scheme", xDB = "url.query", xFA, gFA, iZQ, nZQ, oZQ, SDB, os8 = (A4, Q) => {
165274
165274
  let B2 = Object.create(SDB);
165275
165275
  return B2.preprocess = Q, B2.postprocess = A4, B2.execute = function(C4) {
165276
165276
  return A4(Q(C4));
165277
165277
  }, B2;
165278
- }, ns, gDB, vFA = (A4) => os7((Q) => y7(Q, (B2) => TB((C4) => {
165278
+ }, ns, gDB, vFA = (A4) => os8((Q) => y7(Q, (B2) => TB((C4) => {
165279
165279
  let Y = gDB.get(B2), I = Y ?? new AbortController, E5 = XFA(B2.url, B2.urlParams, B2.hash);
165280
165280
  if (E5._tag === "Left")
165281
165281
  return DA(new oZ({ request: B2, reason: "InvalidUrl", cause: E5.left }));
@@ -214679,11 +214679,11 @@ ${this.stack.split(`
214679
214679
  };
214680
214680
  rZQ = H(2, (A4, Q) => {
214681
214681
  let B2 = A4;
214682
- return os7((C4) => Q(B2.postprocess(C4)), B2.preprocess);
214682
+ return os8((C4) => Q(B2.postprocess(C4)), B2.preprocess);
214683
214683
  });
214684
214684
  aZQ = H(2, (A4, Q) => {
214685
214685
  let B2 = A4;
214686
- return os7(B2.postprocess, (C4) => h6(B2.preprocess(C4), Q));
214686
+ return os8(B2.postprocess, (C4) => h6(B2.preprocess(C4), Q));
214687
214687
  });
214688
214688
  UW = gFA;
214689
214689
  Ik = vFA;
@@ -221492,7 +221492,7 @@ var init_native = __esm(() => {
221492
221492
  });
221493
221493
 
221494
221494
  // ../../node_modules/@livestore/adapter-node/node_modules/vite/node_modules/rollup/dist/es/shared/parseAst.js
221495
- import { resolve as resolve6, dirname as dirname4, basename as basename2, extname as extname2 } from "node:path";
221495
+ import { resolve as resolve6, dirname as dirname4, basename as basename3, extname as extname2 } from "node:path";
221496
221496
  function rangeContains(range5, index3) {
221497
221497
  return range5.start <= index3 && index3 < range5.end;
221498
221498
  }
@@ -221612,7 +221612,7 @@ function relative3(from, to2) {
221612
221612
  return toParts2.join("/");
221613
221613
  }
221614
221614
  function getAliasName(id5) {
221615
- const base = basename2(id5);
221615
+ const base = basename3(id5);
221616
221616
  return base.slice(0, Math.max(0, base.length - extname2(id5).length));
221617
221617
  }
221618
221618
  function relativeId(id5) {
@@ -221634,9 +221634,9 @@ function getImportPath(importerId, targetPath, stripJsExtension, ensureFileName)
221634
221634
  }
221635
221635
  if (ensureFileName) {
221636
221636
  if (relativePath === "")
221637
- return "../" + basename2(targetPath);
221637
+ return "../" + basename3(targetPath);
221638
221638
  if (UPPER_DIR_REGEX.test(relativePath)) {
221639
- return [...relativePath.split("/"), "..", basename2(targetPath)].join("/");
221639
+ return [...relativePath.split("/"), "..", basename3(targetPath)].join("/");
221640
221640
  }
221641
221641
  }
221642
221642
  return relativePath ? relativePath.startsWith("..") ? relativePath : "./" + relativePath : ".";
@@ -226623,7 +226623,7 @@ ${file8}:${line4}:${column6}: ERROR: ${pluginText}${e9.text}`;
226623
226623
  return result2;
226624
226624
  }
226625
226625
  var fs9 = __require("fs");
226626
- var os8 = __require("os");
226626
+ var os9 = __require("os");
226627
226627
  var path18 = __require("path");
226628
226628
  var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
226629
226629
  var isValidBinaryPath = (x4) => !!x4 && x4 !== "/usr/bin/esbuild";
@@ -226665,7 +226665,7 @@ ${file8}:${line4}:${column6}: ERROR: ${pluginText}${e9.text}`;
226665
226665
  let pkg;
226666
226666
  let subpath;
226667
226667
  let isWASM = false;
226668
- let platformKey = `${process.platform} ${os8.arch()} ${os8.endianness()}`;
226668
+ let platformKey = `${process.platform} ${os9.arch()} ${os9.endianness()}`;
226669
226669
  if (platformKey in knownWindowsPackages) {
226670
226670
  pkg = knownWindowsPackages[platformKey];
226671
226671
  subpath = "esbuild.exe";
@@ -227250,7 +227250,7 @@ error: ${text19}`);
227250
227250
 
227251
227251
  // ../../node_modules/@livestore/adapter-node/node_modules/vite/node_modules/fdir/dist/index.mjs
227252
227252
  import { createRequire as createRequire3 } from "module";
227253
- import { basename as basename3, dirname as dirname5, normalize as normalize3, relative as relative4, resolve as resolve7, sep as sep2 } from "path";
227253
+ import { basename as basename4, dirname as dirname5, normalize as normalize3, relative as relative4, resolve as resolve7, sep as sep2 } from "path";
227254
227254
  import * as nativeFs from "fs";
227255
227255
  function cleanPath(path18) {
227256
227256
  let normalized = normalize3(path18);
@@ -227428,12 +227428,12 @@ var __require3, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
227428
227428
  fs9.realpath(path18, (error45, resolvedPath) => {
227429
227429
  if (error45)
227430
227430
  return queue.dequeue(suppressErrors ? null : error45, state2);
227431
- fs9.stat(resolvedPath, (error$1, stat4) => {
227431
+ fs9.stat(resolvedPath, (error$1, stat5) => {
227432
227432
  if (error$1)
227433
227433
  return queue.dequeue(suppressErrors ? null : error$1, state2);
227434
- if (stat4.isDirectory() && isRecursive(path18, resolvedPath, state2))
227434
+ if (stat5.isDirectory() && isRecursive(path18, resolvedPath, state2))
227435
227435
  return queue.dequeue(null, state2);
227436
- callback$1(stat4, resolvedPath);
227436
+ callback$1(stat5, resolvedPath);
227437
227437
  queue.dequeue(null, state2);
227438
227438
  });
227439
227439
  });
@@ -227442,10 +227442,10 @@ var __require3, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
227442
227442
  queue.enqueue();
227443
227443
  try {
227444
227444
  const resolvedPath = fs9.realpathSync(path18);
227445
- const stat4 = fs9.statSync(resolvedPath);
227446
- if (stat4.isDirectory() && isRecursive(path18, resolvedPath, state2))
227445
+ const stat5 = fs9.statSync(resolvedPath);
227446
+ if (stat5.isDirectory() && isRecursive(path18, resolvedPath, state2))
227447
227447
  return;
227448
- callback$1(stat4, resolvedPath);
227448
+ callback$1(stat5, resolvedPath);
227449
227449
  } catch (e9) {
227450
227450
  if (!suppressErrors)
227451
227451
  throw e9;
@@ -227595,15 +227595,15 @@ var __require3, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory = (director
227595
227595
  this.walkDirectory(this.state, path18, path18, depth - 1, this.walk);
227596
227596
  } else if (this.resolveSymlink && entry.isSymbolicLink()) {
227597
227597
  let path18 = joinPathWithBasePath(entry.name, directoryPath);
227598
- this.resolveSymlink(path18, this.state, (stat4, resolvedPath) => {
227599
- if (stat4.isDirectory()) {
227598
+ this.resolveSymlink(path18, this.state, (stat5, resolvedPath) => {
227599
+ if (stat5.isDirectory()) {
227600
227600
  resolvedPath = normalizePath(resolvedPath, this.state.options);
227601
227601
  if (exclude3 && exclude3(entry.name, useRealPaths ? resolvedPath : path18 + pathSeparator))
227602
227602
  return;
227603
227603
  this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path18 + pathSeparator, depth - 1, this.walk);
227604
227604
  } else {
227605
227605
  resolvedPath = useRealPaths ? resolvedPath : path18;
227606
- const filename = basename3(resolvedPath);
227606
+ const filename = basename4(resolvedPath);
227607
227607
  const directoryPath$1 = normalizePath(dirname5(resolvedPath), this.state.options);
227608
227608
  resolvedPath = this.joinPath(filename, directoryPath$1);
227609
227609
  this.pushFile(resolvedPath, files, this.state.counts, filters);
@@ -231897,7 +231897,7 @@ ${file8}:${line4}:${column6}: ERROR: ${pluginText}${e10.text}`;
231897
231897
  };
231898
231898
  }
231899
231899
  var fs9 = __require("fs");
231900
- var os8 = __require("os");
231900
+ var os9 = __require("os");
231901
231901
  var path19 = __require("path");
231902
231902
  var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
231903
231903
  var isValidBinaryPath = (x10) => !!x10 && x10 !== "/usr/bin/esbuild";
@@ -231938,7 +231938,7 @@ ${file8}:${line4}:${column6}: ERROR: ${pluginText}${e10.text}`;
231938
231938
  let pkg;
231939
231939
  let subpath;
231940
231940
  let isWASM = false;
231941
- let platformKey = `${process.platform} ${os8.arch()} ${os8.endianness()}`;
231941
+ let platformKey = `${process.platform} ${os9.arch()} ${os9.endianness()}`;
231942
231942
  if (platformKey in knownWindowsPackages) {
231943
231943
  pkg = knownWindowsPackages[platformKey];
231944
231944
  subpath = "esbuild.exe";
@@ -237863,7 +237863,7 @@ Defaulting to 2020, but this will stop working in the future.`)), options6.ecmaV
237863
237863
  return ".";
237864
237864
  const isUNCPath = (path19 = normalizeWindowsPath2(path19)).match(_UNC_REGEX), isPathAbsolute = isAbsolute5(path19), trailingSeparator = path19[path19.length - 1] === "/";
237865
237865
  return (path19 = normalizeString2(path19, !isPathAbsolute)).length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path19 += "/"), _DRIVE_LETTER_RE2.test(path19) && (path19 += "/"), isUNCPath ? isPathAbsolute ? `//${path19}` : `//./${path19}` : isPathAbsolute && !isAbsolute5(path19) ? `/${path19}` : path19);
237866
- }, join18 = function(...arguments_) {
237866
+ }, join20 = function(...arguments_) {
237867
237867
  if (arguments_.length === 0)
237868
237868
  return ".";
237869
237869
  let joined;
@@ -237921,7 +237921,7 @@ Defaulting to 2020, but this will stop working in the future.`)), options6.ecmaV
237921
237921
  }, pathe_ff20891b_dirname = function(p10) {
237922
237922
  const segments = normalizeWindowsPath2(p10).replace(/\/$/, "").split("/").slice(0, -1);
237923
237923
  return segments.length === 1 && _DRIVE_LETTER_RE2.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute5(p10) ? "/" : ".");
237924
- }, basename4 = function(p10, extension2) {
237924
+ }, basename5 = function(p10, extension2) {
237925
237925
  const lastSegment = normalizeWindowsPath2(p10).split("/").pop();
237926
237926
  return extension2 && lastSegment.endsWith(extension2) ? lastSegment.slice(0, -extension2.length) : lastSegment;
237927
237927
  }, external_node_url_namespaceObject = __require("node:url"), external_node_assert_namespaceObject = __require("node:assert"), external_node_process_namespaceObject = __require("node:process"), external_node_path_namespaceObject = __require("node:path"), external_node_v8_namespaceObject = __require("node:v8"), external_node_util_namespaceObject = __require("node:util"), BUILTIN_MODULES = new Set(external_node_module_namespaceObject.builtinModules);
@@ -238346,8 +238346,8 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
238346
238346
  }
238347
238347
  let lastPath, packageJsonUrl = new external_node_url_namespaceObject.URL("./node_modules/" + packageName + "/package.json", base), packageJsonPath = (0, external_node_url_namespaceObject.fileURLToPath)(packageJsonUrl);
238348
238348
  do {
238349
- const stat4 = tryStatSync(packageJsonPath.slice(0, -13));
238350
- if (!stat4 || !stat4.isDirectory()) {
238349
+ const stat5 = tryStatSync(packageJsonPath.slice(0, -13));
238350
+ if (!stat5 || !stat5.isDirectory()) {
238351
238351
  lastPath = packageJsonPath, packageJsonUrl = new external_node_url_namespaceObject.URL((isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json", packageJsonUrl), packageJsonPath = (0, external_node_url_namespaceObject.fileURLToPath)(packageJsonUrl);
238352
238352
  continue;
238353
238353
  }
@@ -238618,12 +238618,12 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
238618
238618
  continue;
238619
238619
  const _alias = utils_hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
238620
238620
  if (utils_hasTrailingSlash(_path[_alias.length]))
238621
- return join18(to2, _path.slice(alias.length));
238621
+ return join20(to2, _path.slice(alias.length));
238622
238622
  }
238623
238623
  return _path;
238624
238624
  }(id5, ctx.alias));
238625
238625
  let parentURL = options6?.parentURL || ctx.url;
238626
- isDir(parentURL) && (parentURL = join18(parentURL, "_index.js"));
238626
+ isDir(parentURL) && (parentURL = join20(parentURL, "_index.js"));
238627
238627
  const conditionSets = ((options6?.async) ? [options6?.conditions, ["node", "import"], ["node", "require"]] : [options6?.conditions, ["node", "require"], ["node", "import"]]).filter(Boolean);
238628
238628
  for (const conditions of conditionSets) {
238629
238629
  try {
@@ -238715,11 +238715,11 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
238715
238715
  return get44();
238716
238716
  const sourceHash = ` /* v${CACHE_VERSION}-${md5(topts.source, 16)} */
238717
238717
  `;
238718
- let cacheName = `${basename4(pathe_ff20891b_dirname(topts.filename))}-${function(path19) {
238718
+ let cacheName = `${basename5(pathe_ff20891b_dirname(topts.filename))}-${function(path19) {
238719
238719
  return path19.match(FILENAME_RE)?.[2];
238720
238720
  }(topts.filename)}` + (ctx.opts.sourceMaps ? "+map" : "") + (topts.interopDefault ? ".i" : "") + `.${md5(topts.filename)}` + (topts.async ? ".mjs" : ".cjs");
238721
238721
  topts.jsx && topts.filename.endsWith("x") && (cacheName += "x");
238722
- const cacheDir = ctx.opts.fsCache, cacheFilePath = join18(cacheDir, cacheName);
238722
+ const cacheDir = ctx.opts.fsCache, cacheFilePath = join20(cacheDir, cacheName);
238723
238723
  if ((0, external_node_fs_namespaceObject.existsSync)(cacheFilePath)) {
238724
238724
  const cacheSource = (0, external_node_fs_namespaceObject.readFileSync)(cacheFilePath, "utf8");
238725
238725
  if (cacheSource.endsWith(sourceHash))
@@ -238733,13 +238733,13 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
238733
238733
  if (ctx.opts.fsCache === true && (ctx.opts.fsCache = function(ctx2) {
238734
238734
  const nmDir = ctx2.filename && resolve9(ctx2.filename, "../node_modules");
238735
238735
  if (nmDir && (0, external_node_fs_namespaceObject.existsSync)(nmDir))
238736
- return join18(nmDir, ".cache/jiti");
238736
+ return join20(nmDir, ".cache/jiti");
238737
238737
  let _tmpDir = (0, external_node_os_namespaceObject.tmpdir)();
238738
238738
  if (process.env.TMPDIR && _tmpDir === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
238739
238739
  const _env = process.env.TMPDIR;
238740
238740
  delete process.env.TMPDIR, _tmpDir = (0, external_node_os_namespaceObject.tmpdir)(), process.env.TMPDIR = _env;
238741
238741
  }
238742
- return join18(_tmpDir, "jiti");
238742
+ return join20(_tmpDir, "jiti");
238743
238743
  }(ctx)), ctx.opts.fsCache)
238744
238744
  try {
238745
238745
  if ((0, external_node_fs_namespaceObject.mkdirSync)(ctx.opts.fsCache, { recursive: true }), !function(filename) {
@@ -238762,11 +238762,11 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
238762
238762
  return code3.startsWith("#!") && (code3 = "// " + code3), code3;
238763
238763
  }
238764
238764
  function eval_evalModule(ctx, source, evalOptions = {}) {
238765
- const id5 = evalOptions.id || (evalOptions.filename ? basename4(evalOptions.filename) : `_jitiEval.${evalOptions.ext || (evalOptions.async ? "mjs" : "js")}`), filename = evalOptions.filename || jitiResolve(ctx, id5, { async: evalOptions.async }), ext2 = evalOptions.ext || extname3(filename), cache2 = evalOptions.cache || ctx.parentCache || {}, isTypescript = /\.[cm]?tsx?$/.test(ext2), isESM = ext2 === ".mjs" || ext2 === ".js" && function(path19) {
238765
+ const id5 = evalOptions.id || (evalOptions.filename ? basename5(evalOptions.filename) : `_jitiEval.${evalOptions.ext || (evalOptions.async ? "mjs" : "js")}`), filename = evalOptions.filename || jitiResolve(ctx, id5, { async: evalOptions.async }), ext2 = evalOptions.ext || extname3(filename), cache2 = evalOptions.cache || ctx.parentCache || {}, isTypescript = /\.[cm]?tsx?$/.test(ext2), isESM = ext2 === ".mjs" || ext2 === ".js" && function(path19) {
238766
238766
  for (;path19 && path19 !== "." && path19 !== "/"; ) {
238767
- path19 = join18(path19, "..");
238767
+ path19 = join20(path19, "..");
238768
238768
  try {
238769
- const pkg = (0, external_node_fs_namespaceObject.readFileSync)(join18(path19, "package.json"), "utf8");
238769
+ const pkg = (0, external_node_fs_namespaceObject.readFileSync)(join20(path19, "package.json"), "utf8");
238770
238770
  try {
238771
238771
  return JSON.parse(pkg);
238772
238772
  } catch {}
@@ -238829,7 +238829,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
238829
238829
  const deprecatOverrides = {};
238830
238830
  return userOptions2.cache !== undefined && (deprecatOverrides.fsCache = userOptions2.cache), userOptions2.requireCache !== undefined && (deprecatOverrides.moduleCache = userOptions2.requireCache), { ...jitiDefaults, ...deprecatOverrides, ...userOptions2 };
238831
238831
  }(userOptions), alias = opts.alias && Object.keys(opts.alias).length > 0 ? normalizeAliases(opts.alias || {}) : undefined, nativeModules = ["typescript", "jiti", ...opts.nativeModules || []], isNativeRe = new RegExp(`node_modules/(${nativeModules.map((m5) => escapeStringRegexp2(m5)).join("|")})/`), transformModules = [...opts.transformModules || []], isTransformRe = new RegExp(`node_modules/(${transformModules.map((m5) => escapeStringRegexp2(m5)).join("|")})/`);
238832
- filename || (filename = process.cwd()), !isNested && isDir(filename) && (filename = join18(filename, "_index.js"));
238832
+ filename || (filename = process.cwd()), !isNested && isDir(filename) && (filename = join20(filename, "_index.js"));
238833
238833
  const url3 = pathToFileURL3(filename), additionalExts = [...opts.extensions].filter((ext2) => ext2 !== ".js"), nativeRequire = parentContext.createRequire(isWindows2 ? filename.replace(/\//g, "\\") : filename), ctx = { filename, url: url3, opts, alias, nativeModules, transformModules, isNativeRe, isTransformRe, additionalExts, nativeRequire, onError: parentContext.onError, parentModule: parentContext.parentModule, parentCache: parentContext.parentCache, nativeImport: parentContext.nativeImport, createRequire: parentContext.createRequire };
238834
238834
  isNested || debug3(ctx, "[init]", ...[["version:", package_namespaceObject.rE], ["module-cache:", opts.moduleCache], ["fs-cache:", opts.fsCache], ["interop-defaults:", opts.interopDefault]].flat()), isNested || prepareCacheDir(ctx);
238835
238835
  const jiti = Object.assign(function(id5) {
@@ -241007,7 +241007,7 @@ Did you specify these with the most recent transformation maps first?`);
241007
241007
  return parse20(match33[2] + "." + (match33[3] || "0") + "." + (match33[4] || "0"), options6);
241008
241008
  };
241009
241009
  }, "./node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js": (module2, __unused_webpack_exports, __webpack_require__3) => {
241010
- const os8 = __webpack_require__3("os"), tty3 = __webpack_require__3("tty"), hasFlag3 = __webpack_require__3("./node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"), { env: env7 } = process;
241010
+ const os9 = __webpack_require__3("os"), tty3 = __webpack_require__3("tty"), hasFlag3 = __webpack_require__3("./node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"), { env: env7 } = process;
241011
241011
  let forceColor;
241012
241012
  function translateLevel3(level) {
241013
241013
  return level !== 0 && { level, hasBasic: true, has256: level >= 2, has16m: level >= 3 };
@@ -241025,7 +241025,7 @@ Did you specify these with the most recent transformation maps first?`);
241025
241025
  if (env7.TERM === "dumb")
241026
241026
  return min7;
241027
241027
  if (process.platform === "win32") {
241028
- const osRelease = os8.release().split(".");
241028
+ const osRelease = os9.release().split(".");
241029
241029
  return Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ? Number(osRelease[2]) >= 14931 ? 3 : 2 : 1;
241030
241030
  }
241031
241031
  if ("CI" in env7)
@@ -244396,8 +244396,8 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
244396
244396
  }
244397
244397
  let lastPath, packageJsonUrl = new (_url2()).URL("./node_modules/" + packageName + "/package.json", base), packageJsonPath = (0, _url2().fileURLToPath)(packageJsonUrl);
244398
244398
  do {
244399
- const stat4 = tryStatSync(packageJsonPath.slice(0, -13));
244400
- if (!stat4 || !stat4.isDirectory()) {
244399
+ const stat5 = tryStatSync(packageJsonPath.slice(0, -13));
244400
+ if (!stat5 || !stat5.isDirectory()) {
244401
244401
  lastPath = packageJsonPath, packageJsonUrl = new (_url2()).URL((isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json", packageJsonUrl), packageJsonPath = (0, _url2().fileURLToPath)(packageJsonUrl);
244402
244402
  continue;
244403
244403
  }
@@ -277865,7 +277865,7 @@ function requireReaddirp() {
277865
277865
  const { promisify: promisify3 } = require$$2;
277866
277866
  const picomatch2 = /* @__PURE__ */ requirePicomatch$2();
277867
277867
  const readdir3 = promisify3(fs9.readdir);
277868
- const stat4 = promisify3(fs9.stat);
277868
+ const stat5 = promisify3(fs9.stat);
277869
277869
  const lstat = promisify3(fs9.lstat);
277870
277870
  const realpath3 = promisify3(fs9.realpath);
277871
277871
  const BANG = "!";
@@ -277931,7 +277931,7 @@ function requireReaddirp() {
277931
277931
  const { root: root2, type: type3 } = opts;
277932
277932
  this._fileFilter = normalizeFilter(opts.fileFilter);
277933
277933
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
277934
- const statMethod = opts.lstat ? lstat : stat4;
277934
+ const statMethod = opts.lstat ? lstat : stat5;
277935
277935
  if (wantBigintFsStats) {
277936
277936
  this._stat = (path20) => statMethod(path20, { bigint: true });
277937
277937
  } else {
@@ -278006,9 +278006,9 @@ function requireReaddirp() {
278006
278006
  async _formatEntry(dirent, path20) {
278007
278007
  let entry;
278008
278008
  try {
278009
- const basename4 = this._isDirent ? dirent.name : dirent;
278010
- const fullPath = sysPath.resolve(sysPath.join(path20, basename4));
278011
- entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename: basename4 };
278009
+ const basename5 = this._isDirent ? dirent.name : dirent;
278010
+ const fullPath = sysPath.resolve(sysPath.join(path20, basename5));
278011
+ entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename: basename5 };
278012
278012
  entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
278013
278013
  } catch (err) {
278014
278014
  this._onError(err);
@@ -280876,7 +280876,7 @@ function requireConstants() {
280876
280876
  (function(exports) {
280877
280877
  const { sep: sep3 } = require$$0$1;
280878
280878
  const { platform: platform4 } = process;
280879
- const os8 = require$$2$1;
280879
+ const os9 = require$$2$1;
280880
280880
  exports.EV_ALL = "all";
280881
280881
  exports.EV_READY = "ready";
280882
280882
  exports.EV_ADD = "add";
@@ -280929,7 +280929,7 @@ function requireConstants() {
280929
280929
  exports.isWindows = platform4 === "win32";
280930
280930
  exports.isMacos = platform4 === "darwin";
280931
280931
  exports.isLinux = platform4 === "linux";
280932
- exports.isIBMi = os8.type() === "OS400";
280932
+ exports.isIBMi = os9.type() === "OS400";
280933
280933
  })(constants4);
280934
280934
  return constants4;
280935
280935
  }
@@ -280961,11 +280961,11 @@ function requireNodefsHandler() {
280961
280961
  } = /* @__PURE__ */ requireConstants();
280962
280962
  const THROTTLE_MODE_WATCH = "watch";
280963
280963
  const open5 = promisify3(fs9.open);
280964
- const stat4 = promisify3(fs9.stat);
280964
+ const stat5 = promisify3(fs9.stat);
280965
280965
  const lstat = promisify3(fs9.lstat);
280966
280966
  const close5 = promisify3(fs9.close);
280967
280967
  const fsrealpath = promisify3(fs9.realpath);
280968
- const statMethods = { lstat, stat: stat4 };
280968
+ const statMethods = { lstat, stat: stat5 };
280969
280969
  const foreach = (val, fn3) => {
280970
280970
  if (val instanceof Set) {
280971
280971
  val.forEach(fn3);
@@ -281119,16 +281119,16 @@ function requireNodefsHandler() {
281119
281119
  _watchWithNodeFs(path20, listener) {
281120
281120
  const opts = this.fsw.options;
281121
281121
  const directory3 = sysPath.dirname(path20);
281122
- const basename4 = sysPath.basename(path20);
281122
+ const basename5 = sysPath.basename(path20);
281123
281123
  const parent = this.fsw._getWatchedDir(directory3);
281124
- parent.add(basename4);
281124
+ parent.add(basename5);
281125
281125
  const absolutePath = sysPath.resolve(path20);
281126
281126
  const options6 = { persistent: opts.persistent };
281127
281127
  if (!listener)
281128
281128
  listener = EMPTY_FN;
281129
281129
  let closer;
281130
281130
  if (opts.usePolling) {
281131
- options6.interval = opts.enableBinaryInterval && isBinaryPath2(basename4) ? opts.binaryInterval : opts.interval;
281131
+ options6.interval = opts.enableBinaryInterval && isBinaryPath2(basename5) ? opts.binaryInterval : opts.interval;
281132
281132
  closer = setFsWatchFileListener(path20, absolutePath, options6, {
281133
281133
  listener,
281134
281134
  rawEmitter: this.fsw._emitRaw
@@ -281147,17 +281147,17 @@ function requireNodefsHandler() {
281147
281147
  return;
281148
281148
  }
281149
281149
  const dirname7 = sysPath.dirname(file8);
281150
- const basename4 = sysPath.basename(file8);
281150
+ const basename5 = sysPath.basename(file8);
281151
281151
  const parent = this.fsw._getWatchedDir(dirname7);
281152
281152
  let prevStats = stats;
281153
- if (parent.has(basename4))
281153
+ if (parent.has(basename5))
281154
281154
  return;
281155
281155
  const listener = async (path20, newStats) => {
281156
281156
  if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file8, 5))
281157
281157
  return;
281158
281158
  if (!newStats || newStats.mtimeMs === 0) {
281159
281159
  try {
281160
- const newStats2 = await stat4(file8);
281160
+ const newStats2 = await stat5(file8);
281161
281161
  if (this.fsw.closed)
281162
281162
  return;
281163
281163
  const at3 = newStats2.atimeMs;
@@ -281173,9 +281173,9 @@ function requireNodefsHandler() {
281173
281173
  prevStats = newStats2;
281174
281174
  }
281175
281175
  } catch (error45) {
281176
- this.fsw._remove(dirname7, basename4);
281176
+ this.fsw._remove(dirname7, basename5);
281177
281177
  }
281178
- } else if (parent.has(basename4)) {
281178
+ } else if (parent.has(basename5)) {
281179
281179
  const at3 = newStats.atimeMs;
281180
281180
  const mt2 = newStats.mtimeMs;
281181
281181
  if (!at3 || at3 <= mt2 || mt2 !== prevStats.mtimeMs) {
@@ -281419,10 +281419,10 @@ function requireFseventsHandler() {
281419
281419
  IDENTITY_FN
281420
281420
  } = /* @__PURE__ */ requireConstants();
281421
281421
  const Depth = (value10) => isNaN(value10) ? {} : { depth: value10 };
281422
- const stat4 = promisify3(fs9.stat);
281422
+ const stat5 = promisify3(fs9.stat);
281423
281423
  const lstat = promisify3(fs9.lstat);
281424
281424
  const realpath3 = promisify3(fs9.realpath);
281425
- const statMethods = { stat: stat4, lstat };
281425
+ const statMethods = { stat: stat5, lstat };
281426
281426
  const FSEventsWatchers = new Map;
281427
281427
  const consolidateThreshhold = 10;
281428
281428
  const wrongEventFlags = new Set([
@@ -281539,7 +281539,7 @@ function requireFseventsHandler() {
281539
281539
  }
281540
281540
  async checkExists(path20, fullPath, realPath2, parent, watchedDir, item, info2, opts) {
281541
281541
  try {
281542
- const stats = await stat4(path20);
281542
+ const stats = await stat5(path20);
281543
281543
  if (this.fsw.closed)
281544
281544
  return;
281545
281545
  if (sameTypes(info2, stats)) {
@@ -281598,7 +281598,7 @@ function requireFseventsHandler() {
281598
281598
  if (typeof opts.ignored === FUNCTION_TYPE) {
281599
281599
  let stats;
281600
281600
  try {
281601
- stats = await stat4(path20);
281601
+ stats = await stat5(path20);
281602
281602
  } catch (error45) {}
281603
281603
  if (this.fsw.closed)
281604
281604
  return;
@@ -281792,7 +281792,7 @@ function requireChokidar() {
281792
281792
  isMacos,
281793
281793
  isIBMi
281794
281794
  } = /* @__PURE__ */ requireConstants();
281795
- const stat4 = promisify3(fs9.stat);
281795
+ const stat5 = promisify3(fs9.stat);
281796
281796
  const readdir3 = promisify3(fs9.readdir);
281797
281797
  const arrify = (value10 = []) => Array.isArray(value10) ? value10 : [value10];
281798
281798
  const flatten22 = (list7, result2 = []) => {
@@ -282221,7 +282221,7 @@ function requireChokidar() {
282221
282221
  const fullPath = opts.cwd ? sysPath.join(opts.cwd, path20) : path20;
282222
282222
  let stats;
282223
282223
  try {
282224
- stats = await stat4(fullPath);
282224
+ stats = await stat5(fullPath);
282225
282225
  } catch (err) {}
282226
282226
  if (!stats || this.closed)
282227
282227
  return;
@@ -282321,8 +282321,8 @@ function requireChokidar() {
282321
282321
  }
282322
282322
  return this._userIgnored([path20, stats]);
282323
282323
  }
282324
- _isntIgnored(path20, stat5) {
282325
- return !this._isIgnored(path20, stat5);
282324
+ _isntIgnored(path20, stat6) {
282325
+ return !this._isIgnored(path20, stat6);
282326
282326
  }
282327
282327
  _getWatchHelpers(path20, depth) {
282328
282328
  const watchPath = depth || this.options.disableGlobbing || !isGlob2(path20) ? path20 : globParent2(path20);
@@ -283023,7 +283023,7 @@ var init_watch = __esm(() => {
283023
283023
  });
283024
283024
 
283025
283025
  // ../../node_modules/@livestore/adapter-node/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js
283026
- import { relative as relative5, dirname as dirname7, basename as basename4, extname as extname3, resolve as resolve$1 } from "node:path";
283026
+ import { relative as relative5, dirname as dirname7, basename as basename5, extname as extname3, resolve as resolve$1 } from "node:path";
283027
283027
  import { posix as posix4, isAbsolute as isAbsolute5, resolve as resolve9, win32 as win323 } from "path";
283028
283028
  import process$12, { env as env7 } from "node:process";
283029
283029
  import { performance as performance2 } from "node:perf_hooks";
@@ -287545,7 +287545,7 @@ class Module3 {
287545
287545
  };
287546
287546
  }
287547
287547
  basename() {
287548
- const base2 = basename4(this.id);
287548
+ const base2 = basename5(this.id);
287549
287549
  const extension2 = extname3(this.id);
287550
287550
  return makeLegal(extension2 ? base2.slice(0, -extension2.length) : base2);
287551
287551
  }
@@ -288819,7 +288819,7 @@ class Chunk4 {
288819
288819
  let hashPlaceholder = null;
288820
288820
  const { chunkFileNames, entryFileNames, file: file8, format: format10, preserveModules } = this.outputOptions;
288821
288821
  if (file8) {
288822
- fileName = basename4(file8);
288822
+ fileName = basename5(file8);
288823
288823
  } else if (this.fileName === null) {
288824
288824
  const [pattern2, patternName] = preserveModules || this.facadeModule?.isUserDefinedEntryPoint ? [entryFileNames, "output.entryFileNames"] : [chunkFileNames, "output.chunkFileNames"];
288825
288825
  fileName = renderNamePattern(typeof pattern2 === "function" ? pattern2(this.getPreRenderedChunkInfo()) : pattern2, patternName, {
@@ -289250,7 +289250,7 @@ class Chunk4 {
289250
289250
  return relative3(this.inputBase, idWithoutExtension);
289251
289251
  }
289252
289252
  } else {
289253
- return this.outputOptions.virtualDirname.replace(/\/$/, "") + "/" + basename4(idWithoutExtension);
289253
+ return this.outputOptions.virtualDirname.replace(/\/$/, "") + "/" + basename5(idWithoutExtension);
289254
289254
  }
289255
289255
  }
289256
289256
  getReexportSpecifiers() {
@@ -290245,7 +290245,7 @@ function collapseSourcemaps(file8, map52, modules, bundleSourcemapChain, exclude
290245
290245
  if (file8) {
290246
290246
  const directory3 = dirname7(file8);
290247
290247
  sources = sources.map((source2) => relative5(directory3, source2));
290248
- file8 = basename4(file8);
290248
+ file8 = basename5(file8);
290249
290249
  }
290250
290250
  sourcesContent = excludeContent ? null : sourcesContent;
290251
290251
  for (const module of modules) {
@@ -290471,7 +290471,7 @@ function emitSourceMapAndGetComment(fileName, map52, pluginDriver, { sourcemap,
290471
290471
  if (sourcemap === "inline") {
290472
290472
  url3 = map52.toUrl();
290473
290473
  } else {
290474
- const sourcemapFileName = basename4(fileName);
290474
+ const sourcemapFileName = basename5(fileName);
290475
290475
  url3 = sourcemapBaseUrl ? new URL(sourcemapFileName, sourcemapBaseUrl).toString() : sourcemapFileName;
290476
290476
  pluginDriver.emitFile({
290477
290477
  fileName,
@@ -290759,7 +290759,7 @@ async function findFile(file8, preserveSymlinks, fs9) {
290759
290759
  if (!preserveSymlinks && stats.isSymbolicLink())
290760
290760
  return await findFile(await fs9.realpath(file8), preserveSymlinks, fs9);
290761
290761
  if (preserveSymlinks && stats.isSymbolicLink() || stats.isFile()) {
290762
- const name17 = basename4(file8);
290762
+ const name17 = basename5(file8);
290763
290763
  const files = await fs9.readdir(dirname7(file8));
290764
290764
  if (files.includes(name17))
290765
290765
  return file8;
@@ -305738,7 +305738,7 @@ var init_dep_D8ZQhg7_ = __esm(() => {
305738
305738
  const content3 = options6.content;
305739
305739
  const regExp = options6.regExp;
305740
305740
  let ext2 = "bin";
305741
- let basename5 = "file";
305741
+ let basename6 = "file";
305742
305742
  let directory3 = "";
305743
305743
  let folder = "";
305744
305744
  let query = "";
@@ -305748,7 +305748,7 @@ var init_dep_D8ZQhg7_ = __esm(() => {
305748
305748
  if (parsed.ext)
305749
305749
  ext2 = parsed.ext.substr(1);
305750
305750
  if (parsed.dir) {
305751
- basename5 = parsed.name;
305751
+ basename6 = parsed.name;
305752
305752
  resourcePath = parsed.dir + path$1.sep;
305753
305753
  }
305754
305754
  if (typeof context15 !== "undefined") {
@@ -305770,7 +305770,7 @@ var init_dep_D8ZQhg7_ = __esm(() => {
305770
305770
  let url3 = filename;
305771
305771
  if (content3)
305772
305772
  url3 = url3.replace(/\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*(?:safe)?))?(?::(\d+))?\]/gi, (all20, hashType, digestType, maxLength2) => getHashDigest(content3, hashType, digestType, parseInt(maxLength2, 10)));
305773
- url3 = url3.replace(/\[ext\]/gi, () => ext2).replace(/\[name\]/gi, () => basename5).replace(/\[path\]/gi, () => directory3).replace(/\[folder\]/gi, () => folder).replace(/\[query\]/gi, () => query);
305773
+ url3 = url3.replace(/\[ext\]/gi, () => ext2).replace(/\[name\]/gi, () => basename6).replace(/\[path\]/gi, () => directory3).replace(/\[folder\]/gi, () => folder).replace(/\[query\]/gi, () => query);
305774
305774
  if (regExp && loaderContext.resourcePath) {
305775
305775
  const match33 = loaderContext.resourcePath.match(new RegExp(regExp));
305776
305776
  match33 && match33.forEach((matched, i$1) => {
@@ -311782,7 +311782,7 @@ var require_util8 = __commonJS((exports) => {
311782
311782
  return path20;
311783
311783
  });
311784
311784
  exports.normalize = normalize4;
311785
- function join18(aRoot, aPath) {
311785
+ function join20(aRoot, aPath) {
311786
311786
  if (aRoot === "") {
311787
311787
  aRoot = ".";
311788
311788
  }
@@ -311814,7 +311814,7 @@ var require_util8 = __commonJS((exports) => {
311814
311814
  }
311815
311815
  return joined;
311816
311816
  }
311817
- exports.join = join18;
311817
+ exports.join = join20;
311818
311818
  exports.isAbsolute = function(aPath) {
311819
311819
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
311820
311820
  };
@@ -312028,7 +312028,7 @@ var require_util8 = __commonJS((exports) => {
312028
312028
  parsed.path = parsed.path.substring(0, index3 + 1);
312029
312029
  }
312030
312030
  }
312031
- sourceURL = join18(urlGenerate(parsed), sourceURL);
312031
+ sourceURL = join20(urlGenerate(parsed), sourceURL);
312032
312032
  }
312033
312033
  return normalize4(sourceURL);
312034
312034
  }
@@ -313402,7 +313402,7 @@ var require_source_map = __commonJS((exports) => {
313402
313402
  // ../../node_modules/postcss/lib/previous-map.js
313403
313403
  var require_previous_map = __commonJS((exports, module) => {
313404
313404
  var { existsSync: existsSync4, readFileSync: readFileSync3 } = __require("fs");
313405
- var { dirname: dirname8, join: join18 } = __require("path");
313405
+ var { dirname: dirname8, join: join20 } = __require("path");
313406
313406
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
313407
313407
  function fromBase642(str) {
313408
313408
  if (Buffer) {
@@ -313504,7 +313504,7 @@ var require_previous_map = __commonJS((exports, module) => {
313504
313504
  } else if (this.annotation) {
313505
313505
  let map52 = this.annotation;
313506
313506
  if (file8)
313507
- map52 = join18(dirname8(file8), map52);
313507
+ map52 = join20(dirname8(file8), map52);
313508
313508
  return this.loadFile(map52);
313509
313509
  }
313510
313510
  }
@@ -315692,13 +315692,13 @@ var false_default = false;
315692
315692
  import { builtinModules as builtinModules2, createRequire as createRequire5 } from "node:module";
315693
315693
  import * as fs$1 from "node:fs";
315694
315694
  import fs10, { existsSync as existsSync5, promises as promises4, readFileSync as readFileSync3 } from "node:fs";
315695
- import path20, { basename as basename5, dirname as dirname8, extname as extname4, isAbsolute as isAbsolute6, join as join18, normalize as normalize4, posix as posix5, relative as relative6, resolve as resolve10, sep as sep3 } from "node:path";
315695
+ import path20, { basename as basename6, dirname as dirname8, extname as extname4, isAbsolute as isAbsolute6, join as join20, normalize as normalize4, posix as posix5, relative as relative6, resolve as resolve10, sep as sep3 } from "node:path";
315696
315696
  import fsp, { constants as constants6 } from "node:fs/promises";
315697
315697
  import { URL as URL$1, fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "node:url";
315698
315698
  import { format as format10, inspect as inspect3, promisify as promisify3, stripVTControlCharacters as stripVTControlCharacters2 } from "node:util";
315699
315699
  import { performance as performance$1 } from "node:perf_hooks";
315700
315700
  import crypto7 from "node:crypto";
315701
- import os8 from "node:os";
315701
+ import os9 from "node:os";
315702
315702
  import net from "node:net";
315703
315703
  import childProcess2, { exec as exec6, execFile, execSync as execSync2 } from "node:child_process";
315704
315704
  import { promises as promises$1 } from "node:dns";
@@ -317200,7 +317200,7 @@ function resolveServerUrls(server, options$1, hostname3, httpsOptions, config$2)
317200
317200
  else
317201
317201
  network.push(address$1);
317202
317202
  } else
317203
- Object.values(os8.networkInterfaces()).flatMap((nInterface) => nInterface ?? []).filter((detail) => detail.address && detail.family === "IPv4").forEach((detail) => {
317203
+ Object.values(os9.networkInterfaces()).flatMap((nInterface) => nInterface ?? []).filter((detail) => detail.address && detail.family === "IPv4").forEach((detail) => {
317204
317204
  let host = detail.address.replace("127.0.0.1", hostname3.name);
317205
317205
  if (host.includes(":"))
317206
317206
  host = `[${host}]`;
@@ -324426,7 +324426,7 @@ async function startBrowserProcess(browser2, browserArgs, url$3, logger16) {
324426
324426
  const ps2 = await execAsync2("ps cax");
324427
324427
  const openedBrowser = preferredOSXBrowser && ps2.includes(preferredOSXBrowser) ? preferredOSXBrowser : supportedChromiumBrowsers.find((b11) => ps2.includes(b11));
324428
324428
  if (openedBrowser) {
324429
- await execAsync2(`osascript openChrome.js "${url$3}" "${openedBrowser}"`, { cwd: join18(VITE_PACKAGE_DIR, "bin") });
324429
+ await execAsync2(`osascript openChrome.js "${url$3}" "${openedBrowser}"`, { cwd: join20(VITE_PACKAGE_DIR, "bin") });
324430
324430
  return true;
324431
324431
  }
324432
324432
  } catch {}
@@ -325124,7 +325124,7 @@ function viaLocal(dir2, isEtag, uri2, extns, shouldServe) {
325124
325124
  let i$1 = 0, arr = toAssume(uri2, extns);
325125
325125
  let abs2, stats, name17, headers;
325126
325126
  for (;i$1 < arr.length; i$1++) {
325127
- abs2 = normalize4(join18(dir2, name17 = arr[i$1]));
325127
+ abs2 = normalize4(join20(dir2, name17 = arr[i$1]));
325128
325128
  if (abs2.startsWith(dir2) && fs$1.existsSync(abs2)) {
325129
325129
  stats = fs$1.statSync(abs2);
325130
325130
  if (stats.isDirectory())
@@ -326951,7 +326951,7 @@ function notFoundMiddleware() {
326951
326951
  };
326952
326952
  }
326953
326953
  function hasWorkspacePackageJSON(root3) {
326954
- const path$13 = join18(root3, "package.json");
326954
+ const path$13 = join20(root3, "package.json");
326955
326955
  if (!isFileReadable(path$13))
326956
326956
  return false;
326957
326957
  try {
@@ -326961,10 +326961,10 @@ function hasWorkspacePackageJSON(root3) {
326961
326961
  }
326962
326962
  }
326963
326963
  function hasRootFile(root3) {
326964
- return ROOT_FILES.some((file8) => fs10.existsSync(join18(root3, file8)));
326964
+ return ROOT_FILES.some((file8) => fs10.existsSync(join20(root3, file8)));
326965
326965
  }
326966
326966
  function hasPackageJSON(root3) {
326967
- const path$13 = join18(root3, "package.json");
326967
+ const path$13 = join20(root3, "package.json");
326968
326968
  return fs10.existsSync(path$13);
326969
326969
  }
326970
326970
  function searchForPackageRoot(current2, root3 = current2) {
@@ -331421,9 +331421,9 @@ function ssrManifestPlugin() {
331421
331421
  chunk$1.imports.forEach(addDeps);
331422
331422
  }
331423
331423
  };
331424
- const normalizedFile = normalizePath5(join18(dirname8(chunk4.fileName), url$3.slice(1, -1)));
331424
+ const normalizedFile = normalizePath5(join20(dirname8(chunk4.fileName), url$3.slice(1, -1)));
331425
331425
  addDeps(normalizedFile);
331426
- ssrManifest[basename5(name17)] = deps;
331426
+ ssrManifest[basename6(name17)] = deps;
331427
331427
  }
331428
331428
  }
331429
331429
  }
@@ -334916,7 +334916,7 @@ export function getAugmentedNamespace(n) {
334916
334916
  this._isModule = options$1.type === "module";
334917
334917
  this._code = genWorkerCode(fn3, this._isModule, 5 * 1000, options$1.parentFunctions ?? {});
334918
334918
  this._parentFunctions = options$1.parentFunctions ?? {};
334919
- const defaultMax = Math.max(1, (os8.availableParallelism?.() ?? os8.cpus().length) - 1);
334919
+ const defaultMax = Math.max(1, (os9.availableParallelism?.() ?? os9.cpus().length) - 1);
334920
334920
  this._max = options$1.max || defaultMax;
334921
334921
  this._pool = [];
334922
334922
  this._idlePool = [];
@@ -335187,7 +335187,7 @@ ${e$1.message}`);
335187
335187
  }, isWsl = () => {
335188
335188
  if (process$13.platform !== "linux")
335189
335189
  return false;
335190
- if (os8.release().toLowerCase().includes("microsoft")) {
335190
+ if (os9.release().toLowerCase().includes("microsoft")) {
335191
335191
  if (isInsideContainer())
335192
335192
  return false;
335193
335193
  return true;
@@ -336126,7 +336126,7 @@ ${e$1.message}`);
336126
336126
  await this._buildStartPromise;
336127
336127
  this._buildStartPromise = undefined;
336128
336128
  }
336129
- async resolveId(rawId, importer = join18(this.environment.config.root, "index.html"), options$1) {
336129
+ async resolveId(rawId, importer = join20(this.environment.config.root, "index.html"), options$1) {
336130
336130
  if (!this._started) {
336131
336131
  this.buildStart();
336132
336132
  await this._buildStartPromise;
@@ -343949,7 +343949,7 @@ Error: ${e$1.message}`);
343949
343949
  const NodeFsHandler = require_nodefs_handler();
343950
343950
  const FsEventsHandler = require_fsevents_handler();
343951
343951
  const { EV_ALL, EV_READY, EV_ADD, EV_CHANGE, EV_UNLINK, EV_ADD_DIR, EV_UNLINK_DIR, EV_RAW, EV_ERROR, STR_CLOSE, STR_END, BACK_SLASH_RE, DOUBLE_SLASH_RE, SLASH_OR_BACK_SLASH_RE, DOT_RE, REPLACER_RE, SLASH, SLASH_SLASH, BRACE_START, BANG, ONE_DOT, TWO_DOTS, GLOBSTAR: GLOBSTAR2, SLASH_GLOBSTAR, ANYMATCH_OPTS, STRING_TYPE, FUNCTION_TYPE, EMPTY_STR, EMPTY_FN, isWindows: isWindows$2, isMacos, isIBMi } = require_constants$1();
343952
- const stat4 = promisify$1(fs$6.stat);
343952
+ const stat5 = promisify$1(fs$6.stat);
343953
343953
  const readdir3 = promisify$1(fs$6.readdir);
343954
343954
  const arrify = (value$1 = []) => Array.isArray(value$1) ? value$1 : [value$1];
343955
343955
  const flatten22 = (list8, result2 = []) => {
@@ -344361,7 +344361,7 @@ Error: ${e$1.message}`);
344361
344361
  const fullPath = opts.cwd ? sysPath.join(opts.cwd, path$13) : path$13;
344362
344362
  let stats;
344363
344363
  try {
344364
- stats = await stat4(fullPath);
344364
+ stats = await stat5(fullPath);
344365
344365
  } catch (err$2) {}
344366
344366
  if (!stats || this.closed)
344367
344367
  return;
@@ -353445,15 +353445,15 @@ var require_windows2 = __commonJS((exports, module) => {
353445
353445
  }
353446
353446
  return false;
353447
353447
  }
353448
- function checkStat(stat4, path26, options6) {
353449
- if (!stat4.isSymbolicLink() && !stat4.isFile()) {
353448
+ function checkStat(stat5, path26, options6) {
353449
+ if (!stat5.isSymbolicLink() && !stat5.isFile()) {
353450
353450
  return false;
353451
353451
  }
353452
353452
  return checkPathExt(path26, options6);
353453
353453
  }
353454
353454
  function isexe(path26, options6, cb2) {
353455
- fs11.stat(path26, function(er3, stat4) {
353456
- cb2(er3, er3 ? false : checkStat(stat4, path26, options6));
353455
+ fs11.stat(path26, function(er3, stat5) {
353456
+ cb2(er3, er3 ? false : checkStat(stat5, path26, options6));
353457
353457
  });
353458
353458
  }
353459
353459
  function sync22(path26, options6) {
@@ -353467,20 +353467,20 @@ var require_mode2 = __commonJS((exports, module) => {
353467
353467
  isexe.sync = sync22;
353468
353468
  var fs11 = __require("fs");
353469
353469
  function isexe(path26, options6, cb2) {
353470
- fs11.stat(path26, function(er3, stat4) {
353471
- cb2(er3, er3 ? false : checkStat(stat4, options6));
353470
+ fs11.stat(path26, function(er3, stat5) {
353471
+ cb2(er3, er3 ? false : checkStat(stat5, options6));
353472
353472
  });
353473
353473
  }
353474
353474
  function sync22(path26, options6) {
353475
353475
  return checkStat(fs11.statSync(path26), options6);
353476
353476
  }
353477
- function checkStat(stat4, options6) {
353478
- return stat4.isFile() && checkMode(stat4, options6);
353477
+ function checkStat(stat5, options6) {
353478
+ return stat5.isFile() && checkMode(stat5, options6);
353479
353479
  }
353480
- function checkMode(stat4, options6) {
353481
- var mod2 = stat4.mode;
353482
- var uid = stat4.uid;
353483
- var gid = stat4.gid;
353480
+ function checkMode(stat5, options6) {
353481
+ var mod2 = stat5.mode;
353482
+ var uid = stat5.uid;
353483
+ var gid = stat5.gid;
353484
353484
  var myUid = options6.uid !== undefined ? options6.uid : process.getuid && process.getuid();
353485
353485
  var myGid = options6.gid !== undefined ? options6.gid : process.getgid && process.getgid();
353486
353486
  var u10 = parseInt("100", 8);
@@ -368806,7 +368806,7 @@ var runExclusive = __toESM(require_runExclusive(), 1);
368806
368806
 
368807
368807
  // ../common/src/configuration/config-manager.ts
368808
368808
  import * as fsPromise2 from "node:fs/promises";
368809
- import * as os from "node:os";
368809
+ import * as os2 from "node:os";
368810
368810
  import * as path3 from "node:path";
368811
368811
 
368812
368812
  // ../../node_modules/@preact/signals-core/dist/signals-core.mjs
@@ -385528,13 +385528,21 @@ var attemptCompletion = tool(toolDef3);
385528
385528
  var toolDef4 = {
385529
385529
  description: `Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.
385530
385530
 
385531
+ IMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.
385532
+
385531
385533
  Before executing the command, please follow these steps:
385532
385534
 
385533
385535
  1. Directory Verification:
385534
- - If the command will create new directories or files, first use the listFiles tool to verify the parent directory exists and is the correct location
385536
+ - If the command will create new directories or files, first use listFiles to verify the parent directory exists and is the correct location
385535
385537
  - For example, before running "mkdir foo/bar", first use listFiles to check that "foo" exists and is the intended parent directory
385536
385538
 
385537
385539
  2. Command Execution:
385540
+ - Always quote file paths that contain spaces with double quotes (e.g., cd "path with spaces/file.txt")
385541
+ - Examples of proper quoting:
385542
+ - cd "/Users/name/My Documents" (correct)
385543
+ - cd /Users/name/My Documents (incorrect - will fail)
385544
+ - python "/path/with spaces/script.py" (correct)
385545
+ - python /path/with spaces/script.py (incorrect - will fail)
385538
385546
  - After ensuring proper quoting, execute the command.
385539
385547
  - Capture the output of the command.
385540
385548
 
@@ -385542,13 +385550,17 @@ Usage notes:
385542
385550
  - The command argument is required.
385543
385551
  - You can specify an optional timeout in seconds (up to 300s / 5 minutes). If not specified, commands will timeout after 60s (1 minute).
385544
385552
  - If the output exceeds 30000 characters, output will be truncated before being returned to you.
385545
- - When issuing multiple commands, use the ';' or '&&' operator to separate them. DO NOT use newlines (newlines are ok in quoted strings).
385553
+ - When issuing multiple commands:
385554
+ - If the commands are independent and can run in parallel, make multiple executeCommand tool calls in a single message
385555
+ - If the commands depend on each other and must run sequentially, use a single executeCommand call with '&&' to chain them together (e.g., \`git add . && git commit -m "message" && git push\`)
385556
+ - Use ';' only when you need to run commands sequentially but don't care if earlier commands fail
385557
+ - DO NOT use newlines to separate commands (newlines are ok in quoted strings)
385546
385558
  - You shall avoid use the markdown code block syntax (backtick, '\`') in your command, as it will be interpreted as a command substitution.
385547
385559
  - Before using this tool, you must first think about the context provided in <system-reminder> to understand the user's environment and tailor your commands to ensure they are compatible with their system. You must also consider if the command you need to run should be executed in a specific directory rather than the current working directory, and properly set the \`cwd\` if necessary.
385548
385560
 
385549
385561
  # Committing changes with git
385550
385562
 
385551
- When the user asks you to create a new git commit, follow these steps carefully:
385563
+ Only create commits when requested by the user. If unclear, ask first. When the user asks you to create a new git commit, follow these steps carefully:
385552
385564
 
385553
385565
  1. You have the capability to call multiple tools in a single response. When multiple independent pieces of information are requested, batch your tool calls together for optimal performance. ALWAYS run the following bash commands in parallel, each using the executeCommand tool:
385554
385566
  - Run a git status command to see all untracked files.
@@ -385741,7 +385753,10 @@ function makeCustomAgentToolDescription(customAgents) {
385741
385753
  return "No custom agents are available. You shall always leave the agentType parameter empty to use the default agent.";
385742
385754
  return `When using the newTask tool, you may specify a agentType parameter to select which agent type to use.
385743
385755
  Available agent types and the tools they have access to:
385744
- ${(customAgents ?? []).map((agent) => `- ${agent.name}: ${agent.description}`).join(`
385756
+
385757
+ ${(customAgents ?? []).map((agent) => `### ${agent.name}
385758
+ ${agent.description.trim()}`).join(`
385759
+
385745
385760
  `)}
385746
385761
  `;
385747
385762
  }
@@ -385770,7 +385785,7 @@ When NOT to use the newTask tool:
385770
385785
  - Other tasks that are not related to the agent descriptions above
385771
385786
 
385772
385787
  Usage notes:
385773
- 1. Launch multiple \`newTask\` tools concurrently whenever possible to maximize performance; to do that, use a single message with multiple tool uses
385788
+ 1. Launch multiple agents tools concurrently whenever possible to maximize performance; to do that, use a single message with multiple tool uses
385774
385789
  2. When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result.
385775
385790
  3. Each agent invocation is stateless. You will not be able to send additional messages to the agent, nor will the agent be able to communicate with you outside of its final report. Therefore, your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.
385776
385791
  4. The agent's outputs should generally be trusted
@@ -386888,7 +386903,10 @@ var Environment = exports_external2.object({
386888
386903
  mainBranch: exports_external2.string().describe("The main branch of the git repository."),
386889
386904
  currentBranch: exports_external2.string().describe("The current branch of the git repository."),
386890
386905
  status: exports_external2.string().describe("The status of the git repository."),
386891
- recentCommits: exports_external2.array(exports_external2.string()).describe("A list of recent git commits.")
386906
+ recentCommits: exports_external2.array(exports_external2.string()).describe("A list of recent git commits."),
386907
+ worktree: exports_external2.object({
386908
+ gitdir: exports_external2.string().describe("The gitdir path stored in worktree .git file.")
386909
+ }).optional()
386892
386910
  }).optional().describe("Git information for the current workspace."),
386893
386911
  terminals: exports_external2.array(exports_external2.object({
386894
386912
  name: exports_external2.string().describe("The name of the terminal."),
@@ -386954,8 +386972,10 @@ function getSyncBaseUrl() {
386954
386972
  }
386955
386973
 
386956
386974
  // ../common/src/configuration/config-file.ts
386975
+ import { randomUUID } from "node:crypto";
386957
386976
  import * as fs from "node:fs";
386958
386977
  import * as fsPromise from "node:fs/promises";
386978
+ import * as os from "node:os";
386959
386979
  import * as path2 from "node:path";
386960
386980
 
386961
386981
  // ../../node_modules/jsonc-parser/lib/esm/impl/scanner.js
@@ -388097,7 +388117,8 @@ var GoogleVertexModel = v4_default.union([
388097
388117
  }),
388098
388118
  v4_default.object({
388099
388119
  issueUrl: v4_default.string().default(process.env.POCHI_VERTEX_ISSUE_URL ?? ""),
388100
- modelUrl: v4_default.string().default(process.env.POCHI_VERTEX_MODEL_URL ?? "")
388120
+ modelUrl: v4_default.string().default(process.env.POCHI_VERTEX_MODEL_URL ?? ""),
388121
+ timeout: v4_default.number().default(Number.parseInt(process.env.POCHI_VERTEX_MODEL_TIMEOUT ?? "900000")).describe("Timeout in milliseconds when requesting model api")
388101
388122
  })
388102
388123
  ]);
388103
388124
  var GoogleVertexTuningModelSettings = BaseModelSettings.extend({
@@ -388189,7 +388210,13 @@ class PochiConfigFile {
388189
388210
  minQuietPeriodMs: process.platform === "win32" ? 100 : 1000,
388190
388211
  triggerAt: "end"
388191
388212
  });
388192
- fs.watch(this.configFilePath, { persistent: false }, () => debouncer.call());
388213
+ const configDir = path2.dirname(this.configFilePath);
388214
+ const configFileName = path2.basename(this.configFilePath);
388215
+ fs.watch(configDir, { persistent: false }, (_eventType, filename) => {
388216
+ if (filename === configFileName) {
388217
+ debouncer.call();
388218
+ }
388219
+ });
388193
388220
  }
388194
388221
  async ensureFileExists() {
388195
388222
  const fileExist = await fsPromise.access(this.configFilePath).then(() => true).catch(() => false);
@@ -388211,7 +388238,9 @@ class PochiConfigFile {
388211
388238
  insertSpaces: true
388212
388239
  });
388213
388240
  content = applyEdits(content, edits);
388214
- await fsPromise.writeFile(this.configFilePath, content);
388241
+ const tmp = path2.join(os.tmpdir(), `${path2.basename(this.configFilePath)}.${randomUUID()}.tmp`);
388242
+ await fsPromise.writeFile(tmp, content);
388243
+ await fsPromise.rename(tmp, this.configFilePath);
388215
388244
  } catch (err) {
388216
388245
  logger.error("Failed to save config file", err);
388217
388246
  }
@@ -388259,7 +388288,7 @@ function prop(data, ...keys) {
388259
388288
  var AllowedWorkspaceConfigKeys = ["mcp", "providers"];
388260
388289
  var configFileName = isDev ? "dev-config.jsonc" : "config.jsonc";
388261
388290
  var pochiConfigRelativePath = path3.join(".pochi", configFileName);
388262
- var UserConfigFilePath = path3.join(os.homedir(), pochiConfigRelativePath);
388291
+ var UserConfigFilePath = path3.join(os2.homedir(), pochiConfigRelativePath);
388263
388292
  var getWorkspaceConfigFilePath = (workspacePath) => path3.join(workspacePath, pochiConfigRelativePath);
388264
388293
  var logger2 = getLogger("PochiConfigManager");
388265
388294
 
@@ -390629,7 +390658,7 @@ var buildCustomFetchImpl = () => {
390629
390658
  var authClient = createAuthClient2();
390630
390659
  function isJWTExpiring(jwt2) {
390631
390660
  const { exp } = decodeJwt(jwt2);
390632
- return exp ? Date.now() >= (exp - 5 * 60) * 1000 : true;
390661
+ return exp ? Date.now() >= (exp - 60 * 60 * 48) * 1000 : true;
390633
390662
  }
390634
390663
 
390635
390664
  // ../vendor-pochi/src/node.ts
@@ -390638,7 +390667,7 @@ registerVendor(new Pochi);
390638
390667
  // ../vendor-gemini-cli/src/auth.ts
390639
390668
  import * as crypto2 from "node:crypto";
390640
390669
  import * as http from "node:http";
390641
- import * as os2 from "node:os";
390670
+ import * as os3 from "node:os";
390642
390671
  var VendorId2 = "gemini-cli";
390643
390672
  var logger4 = getLogger(VendorId2);
390644
390673
  async function startOAuthFlow() {
@@ -390916,8 +390945,8 @@ function getClientMetadata(projectId) {
390916
390945
  };
390917
390946
  }
390918
390947
  function getPlatform() {
390919
- const platform2 = os2.platform();
390920
- const arch2 = os2.arch();
390948
+ const platform2 = os3.platform();
390949
+ const arch2 = os3.arch();
390921
390950
  if (platform2 === "darwin") {
390922
390951
  return arch2 === "arm64" ? "DARWIN_ARM64" : "DARWIN_AMD64";
390923
390952
  }
@@ -402450,6 +402479,7 @@ __export(exports_livestore, {
402450
402479
  });
402451
402480
 
402452
402481
  // ../../node_modules/@livestore/livestore/dist/mod.js
402482
+ init_dist2();
402453
402483
  init_mod8();
402454
402484
  init_effect();
402455
402485
 
@@ -404221,6 +404251,9 @@ var TaskError = exports_Schema2.Union(exports_Schema2.Struct({
404221
404251
  }));
404222
404252
  var Git = exports_Schema2.Struct({
404223
404253
  origin: exports_Schema2.optional(exports_Schema2.String),
404254
+ worktree: exports_Schema2.optional(exports_Schema2.Struct({
404255
+ gitdir: exports_Schema2.String
404256
+ })),
404224
404257
  branch: exports_Schema2.String
404225
404258
  });
404226
404259
  var tables = {
@@ -404290,20 +404323,50 @@ var tables = {
404290
404323
  }
404291
404324
  })
404292
404325
  };
404326
+ var taskInitFields = {
404327
+ id: exports_Schema2.String,
404328
+ parentId: exports_Schema2.optional(exports_Schema2.String),
404329
+ cwd: exports_Schema2.optional(exports_Schema2.String),
404330
+ createdAt: exports_Schema2.Date
404331
+ };
404332
+ var taskFullFields = {
404333
+ ...taskInitFields,
404334
+ git: exports_Schema2.optional(Git),
404335
+ shareId: exports_Schema2.optional(exports_Schema2.String),
404336
+ isPublicShared: exports_Schema2.Boolean,
404337
+ title: exports_Schema2.optional(exports_Schema2.String),
404338
+ status: TaskStatus,
404339
+ todos: Todos,
404340
+ totalTokens: exports_Schema2.optional(exports_Schema2.Number),
404341
+ error: exports_Schema2.optional(TaskError),
404342
+ updatedAt: exports_Schema2.Date
404343
+ };
404293
404344
  var events = {
404294
404345
  taskInited: exports_events.synced({
404295
404346
  name: "v1.TaskInited",
404296
404347
  schema: exports_Schema2.Struct({
404297
- id: exports_Schema2.String,
404298
- parentId: exports_Schema2.optional(exports_Schema2.String),
404299
- cwd: exports_Schema2.optional(exports_Schema2.String),
404300
- createdAt: exports_Schema2.Date,
404348
+ ...taskInitFields,
404301
404349
  initMessage: exports_Schema2.optional(exports_Schema2.Struct({
404302
404350
  id: exports_Schema2.String,
404303
404351
  parts: exports_Schema2.Array(DBUIPart)
404304
404352
  }))
404305
404353
  })
404306
404354
  }),
404355
+ taskFailed: exports_events.synced({
404356
+ name: "v1.TaskFailed",
404357
+ schema: exports_Schema2.Struct({
404358
+ id: exports_Schema2.String,
404359
+ error: TaskError,
404360
+ updatedAt: exports_Schema2.Date
404361
+ })
404362
+ }),
404363
+ taskSynced: exports_events.synced({
404364
+ name: "v1.TaskSynced",
404365
+ schema: exports_Schema2.Struct({
404366
+ ...taskFullFields,
404367
+ messages: exports_Schema2.Array(DBMessage)
404368
+ })
404369
+ }),
404307
404370
  chatStreamStarted: exports_events.synced({
404308
404371
  name: "v1.ChatStreamStarted",
404309
404372
  schema: exports_Schema2.Struct({
@@ -404390,6 +404453,22 @@ var materializers2 = exports_mod4.SQLite.materializers(events, {
404390
404453
  })
404391
404454
  ] : []
404392
404455
  ],
404456
+ "v1.TaskFailed": ({ id: id4, error: error42, updatedAt }) => [
404457
+ tables.tasks.update({
404458
+ status: "failed",
404459
+ error: error42,
404460
+ updatedAt
404461
+ }).where({ id: id4 })
404462
+ ],
404463
+ "v1.TaskSynced": ({ messages, ...task }) => [
404464
+ tables.tasks.insert(task).onConflict("id", "replace"),
404465
+ tables.messages.delete().where("taskId", "=", task.id),
404466
+ ...messages.map((message) => tables.messages.insert({
404467
+ id: message.id,
404468
+ taskId: task.id,
404469
+ data: message
404470
+ }).onConflict("id", "replace"))
404471
+ ],
404393
404472
  "v1.ChatStreamStarted": ({ id: id4, data, todos, git, title, updatedAt }) => [
404394
404473
  tables.tasks.update({
404395
404474
  status: "pending-model",
@@ -404464,7 +404543,10 @@ var makeMessagesQuery = (taskId) => queryDb(() => tables.messages.where("taskId"
404464
404543
  var tasks$ = queryDb(() => tables.tasks.where("parentId", "=", null).orderBy("createdAt", "desc"), {
404465
404544
  label: "tasks"
404466
404545
  });
404467
- var makeTasksQuery = (cwd) => queryDb(() => tables.tasks.where("parentId", "=", null).where("cwd", "=", cwd).orderBy("updatedAt", "desc"), {
404546
+ var makeTasksQuery = (cwd) => queryDb({
404547
+ query: sql`select * from tasks where parentId is null and (cwd = '${cwd}' or git->>'$.worktree.gitdir' like '${cwd}/.git/worktrees%') order by updatedAt desc`,
404548
+ schema: exports_Schema2.Array(tables.tasks.rowSchema)
404549
+ }, {
404468
404550
  label: "tasks.cwd",
404469
404551
  deps: [cwd]
404470
404552
  });
@@ -404618,7 +404700,7 @@ var {
404618
404700
  // package.json
404619
404701
  var package_default = {
404620
404702
  name: "@getpochi/cli",
404621
- version: "0.5.84",
404703
+ version: "0.5.86",
404622
404704
  type: "module",
404623
404705
  bin: {
404624
404706
  pochi: "src/cli.ts"
@@ -406111,7 +406193,7 @@ function findRipgrep() {
406111
406193
 
406112
406194
  // src/lib/load-agents.ts
406113
406195
  import * as fs5 from "node:fs/promises";
406114
- import * as os6 from "node:os";
406196
+ import * as os7 from "node:os";
406115
406197
  import * as path10 from "node:path";
406116
406198
 
406117
406199
  // ../common/src/tool-utils/ripgrep.ts
@@ -406194,41 +406276,100 @@ import * as fs3 from "node:fs/promises";
406194
406276
  import * as path4 from "node:path";
406195
406277
  var logger11 = getLogger("ignoreWalk");
406196
406278
  var MaxScanItems = 1e4;
406197
- async function attemptLoadIgnoreFile(directoryPath, filename) {
406279
+ var DefaultIgnoredDirectories = [".git"];
406280
+ var GitignoreFilename = ".gitignore";
406281
+ var PochiignoreFilename = ".pochiignore";
406282
+ async function loadIgnoreRules(directoryPath, filename) {
406198
406283
  try {
406199
- const ignoreFileUri = path4.join(directoryPath, filename);
406200
- const ignoreFileContentBytes = await fs3.readFile(ignoreFileUri);
406201
- const ignoreFileContent = Buffer.from(ignoreFileContentBytes).toString("utf8");
406284
+ const ignoreFilePath = path4.join(directoryPath, filename);
406285
+ const ignoreFileContent = await fs3.readFile(ignoreFilePath, "utf8");
406202
406286
  return ignoreFileContent.split(/\r?\n/).map((rule) => rule.trim()).filter((rule) => rule && !rule.startsWith("#"));
406203
- } catch (e2) {
406287
+ } catch {
406204
406288
  return [];
406205
406289
  }
406206
406290
  }
406207
- async function processDirectoryEntry(entry, currentUri, rootDir, directoryIg, recursive, processedDirs, queue, scannedFileResults) {
406291
+ async function loadAllIgnoreRules(directoryPath, useGitignore, usePochiignore) {
406292
+ const rules = [];
406293
+ if (useGitignore) {
406294
+ const gitIgnoreRules = await loadIgnoreRules(directoryPath, GitignoreFilename);
406295
+ rules.push(...gitIgnoreRules);
406296
+ }
406297
+ if (usePochiignore) {
406298
+ const pochiIgnoreRules = await loadIgnoreRules(directoryPath, PochiignoreFilename);
406299
+ rules.push(...pochiIgnoreRules);
406300
+ }
406301
+ return rules;
406302
+ }
406303
+ function createIgnoreMatcher(parentIgnore, directoryRules) {
406304
+ return import_ignore.default().add(parentIgnore).add(directoryRules);
406305
+ }
406306
+ function normalizePathForIgnore(relativePath, isDirectory) {
406307
+ const normalized = relativePath.replace(/\\/g, "/");
406308
+ return isDirectory ? `${normalized}/` : normalized;
406309
+ }
406310
+ function shouldIgnorePath(relativePath, isDirectory, ignoreMatcher) {
406311
+ const normalizedPath = normalizePathForIgnore(relativePath, isDirectory);
406312
+ return ignoreMatcher.ignores(normalizedPath);
406313
+ }
406314
+ function hasReachedScanLimit(state2) {
406315
+ return state2.fileScannedCount >= MaxScanItems || state2.scannedFileResults.length >= MaxScanItems;
406316
+ }
406317
+ async function processDirectoryEntry(entry, currentUri, rootDir, ignoreMatcher, state2, recursive) {
406208
406318
  const fullPath = path4.join(currentUri, entry.name);
406209
406319
  const relativePath = path4.relative(rootDir, fullPath);
406210
- const normalizedPath = relativePath.replace(/\\/g, "/");
406211
- const pathToTest = entry.isDirectory() ? `${normalizedPath}/` : normalizedPath;
406212
- if (directoryIg.ignores(pathToTest)) {
406320
+ const isDirectory = entry.isDirectory();
406321
+ const isFile2 = entry.isFile();
406322
+ if (!isDirectory && !isFile2) {
406323
+ return false;
406324
+ }
406325
+ if (shouldIgnorePath(relativePath, isDirectory, ignoreMatcher)) {
406213
406326
  return false;
406214
406327
  }
406215
- if (entry.isDirectory()) {
406216
- if (recursive && !processedDirs.has(fullPath)) {
406217
- queue.push({ uri: fullPath, ignore: directoryIg });
406328
+ state2.scannedFileResults.push({
406329
+ filepath: fullPath,
406330
+ relativePath,
406331
+ isDir: isDirectory
406332
+ });
406333
+ const shouldEnqueue = isDirectory && recursive && !state2.processedDirs.has(fullPath);
406334
+ if (shouldEnqueue) {
406335
+ state2.queue.push({ uri: fullPath, ignore: ignoreMatcher });
406336
+ }
406337
+ state2.fileScannedCount++;
406338
+ return hasReachedScanLimit(state2);
406339
+ }
406340
+ async function processDirectory(directoryPath, rootDir, parentIgnore, state2, recursive, useGitignore, usePochiignore, abortSignal) {
406341
+ try {
406342
+ const directoryRules = await loadAllIgnoreRules(directoryPath, useGitignore, usePochiignore);
406343
+ const ignoreMatcher = createIgnoreMatcher(parentIgnore, directoryRules);
406344
+ const entries4 = await fs3.readdir(directoryPath, { withFileTypes: true });
406345
+ for (const entry of entries4) {
406346
+ if (abortSignal?.aborted) {
406347
+ logger11.debug("Traversal aborted during directory processing.");
406348
+ return true;
406349
+ }
406350
+ const limitReached = await processDirectoryEntry(entry, directoryPath, rootDir, ignoreMatcher, state2, recursive);
406351
+ if (limitReached) {
406352
+ logger11.debug(`MaxScanItems (${MaxScanItems}) reached or exceeded. Halting traversal.`);
406353
+ return true;
406354
+ }
406218
406355
  }
406219
- scannedFileResults.push({
406220
- filepath: fullPath,
406221
- relativePath,
406222
- isDir: true
406223
- });
406224
- } else if (entry.isFile()) {
406225
- scannedFileResults.push({
406226
- filepath: fullPath,
406227
- relativePath,
406228
- isDir: false
406229
- });
406356
+ } catch (error42) {
406357
+ const message = error42 instanceof Error ? error42.message : String(error42);
406358
+ logger11.warn(`Error reading directory ${directoryPath}: ${message}`);
406230
406359
  }
406231
- return scannedFileResults.length >= MaxScanItems;
406360
+ return false;
406361
+ }
406362
+ function initializeTraversalState(startDir) {
406363
+ const initialIgnore = import_ignore.default().add(DefaultIgnoredDirectories.map((dir2) => `${dir2}/`));
406364
+ return {
406365
+ scannedFileResults: [],
406366
+ processedDirs: new Set,
406367
+ queue: [{ uri: startDir, ignore: initialIgnore }],
406368
+ fileScannedCount: 0
406369
+ };
406370
+ }
406371
+ function shouldContinueTraversal(state2, abortSignal) {
406372
+ return state2.queue.length > 0 && !hasReachedScanLimit(state2) && !abortSignal?.aborted;
406232
406373
  }
406233
406374
  async function ignoreWalk({
406234
406375
  dir: dir2,
@@ -406237,52 +406378,29 @@ async function ignoreWalk({
406237
406378
  useGitignore = true,
406238
406379
  usePochiignore = true
406239
406380
  }) {
406240
- const scannedFileResults = [];
406241
- const processedDirs = new Set;
406242
- const queue = [{ uri: dir2, ignore: import_ignore.default().add(".git") }];
406243
406381
  logger11.trace(`Starting traversal from ${dir2} with limit ${MaxScanItems}, recursive: ${recursive}`);
406244
406382
  if (abortSignal?.aborted) {
406245
406383
  logger11.debug("Traversal aborted before starting.");
406246
406384
  return [];
406247
406385
  }
406248
- let fileScannedCount = 0;
406249
- while (queue.length > 0 && fileScannedCount < MaxScanItems && !abortSignal?.aborted) {
406250
- const current2 = queue.shift();
406386
+ const state2 = initializeTraversalState(dir2);
406387
+ while (shouldContinueTraversal(state2, abortSignal)) {
406388
+ const current2 = state2.queue.shift();
406251
406389
  if (!current2)
406252
406390
  continue;
406253
406391
  const { uri: currentFsPath, ignore: currentIg } = current2;
406254
- if (processedDirs.has(currentFsPath)) {
406392
+ if (state2.processedDirs.has(currentFsPath)) {
406255
406393
  continue;
406256
406394
  }
406257
- processedDirs.add(currentFsPath);
406258
- try {
406259
- let directoryIg = currentIg;
406260
- const gitIgnoreRules = useGitignore ? await attemptLoadIgnoreFile(currentFsPath, ".gitignore") : [];
406261
- const pochiIgnoreRules = usePochiignore ? await attemptLoadIgnoreFile(currentFsPath, ".pochiignore") : [];
406262
- if (gitIgnoreRules.length > 0 || pochiIgnoreRules.length > 0) {
406263
- directoryIg = currentIg.add(gitIgnoreRules).add(pochiIgnoreRules);
406264
- }
406265
- const entries4 = await fs3.readdir(currentFsPath, { withFileTypes: true });
406266
- for (const entry of entries4) {
406267
- if (abortSignal?.aborted) {
406268
- logger11.debug("Traversal aborted during directory processing.");
406269
- break;
406270
- }
406271
- const maxItemsReached = await processDirectoryEntry(entry, currentFsPath, dir2, directoryIg, recursive, processedDirs, queue, scannedFileResults);
406272
- fileScannedCount++;
406273
- if (maxItemsReached || fileScannedCount >= MaxScanItems) {
406274
- logger11.debug(`MaxScanItems (${MaxScanItems}) reached or exceeded. Halting traversal.`);
406275
- queue.length = 0;
406276
- break;
406277
- }
406278
- }
406279
- } catch (error42) {
406280
- const message = error42 instanceof Error ? error42.message : String(error42);
406281
- logger11.warn(`Error reading directory ${currentFsPath}: ${message}`);
406395
+ state2.processedDirs.add(currentFsPath);
406396
+ const shouldAbort = await processDirectory(currentFsPath, dir2, currentIg, state2, recursive, useGitignore, usePochiignore, abortSignal);
406397
+ if (shouldAbort) {
406398
+ state2.queue.length = 0;
406399
+ break;
406282
406400
  }
406283
406401
  }
406284
- logger11.trace(`Completed traversal. Found ${scannedFileResults.length} items. Processed approximately ${fileScannedCount} entries.`);
406285
- return scannedFileResults;
406402
+ logger11.trace(`Completed traversal. Found ${state2.scannedFileResults.length} items. Processed approximately ${state2.fileScannedCount} entries.`);
406403
+ return state2.scannedFileResults;
406286
406404
  }
406287
406405
  // ../common/src/tool-utils/fs.ts
406288
406406
  import * as fs4 from "node:fs/promises";
@@ -406470,10 +406588,10 @@ async function globFiles2(options4) {
406470
406588
  return { files, isTruncated };
406471
406589
  }
406472
406590
  // ../common/src/tool-utils/system-info.ts
406473
- import os5 from "node:os";
406591
+ import os6 from "node:os";
406474
406592
  function getSystemInfo2(cwd) {
406475
406593
  const platform2 = process.platform;
406476
- const homedir2 = os5.homedir();
406594
+ const homedir2 = os6.homedir();
406477
406595
  const shell = process.env.SHELL || "";
406478
406596
  const currentWorkingDirectory = cwd || process.cwd();
406479
406597
  return {
@@ -406485,6 +406603,8 @@ function getSystemInfo2(cwd) {
406485
406603
  }
406486
406604
  // ../common/src/tool-utils/git-status.ts
406487
406605
  import { exec as exec3 } from "node:child_process";
406606
+ import { readFile as readFile4, stat } from "node:fs/promises";
406607
+ import { join as join13 } from "node:path";
406488
406608
  import { promisify as promisify2 } from "node:util";
406489
406609
 
406490
406610
  // ../common/src/git-utils.ts
@@ -406639,7 +406759,9 @@ class GitStatusReader {
406639
406759
  status3,
406640
406760
  recentCommits,
406641
406761
  userName,
406642
- userEmail
406762
+ userEmail,
406763
+ worktreeGitdir,
406764
+ worktreeDir
406643
406765
  ] = await Promise.all([
406644
406766
  this.execGit("remote get-url origin").catch(() => {
406645
406767
  return;
@@ -406654,7 +406776,9 @@ class GitStatusReader {
406654
406776
  }),
406655
406777
  this.execGit("config user.email").catch(() => {
406656
406778
  return;
406657
- })
406779
+ }),
406780
+ parseWorktreeGitdir(this.cwd),
406781
+ this.execGit("rev-parse --path-format=absolute --show-toplevel").catch(() => "")
406658
406782
  ]);
406659
406783
  const origin = this.sanitizeOriginUrl(rawOrigin);
406660
406784
  return {
@@ -406664,7 +406788,8 @@ class GitStatusReader {
406664
406788
  status: status3,
406665
406789
  recentCommits,
406666
406790
  userName,
406667
- userEmail
406791
+ userEmail,
406792
+ worktree: this.cwd === worktreeDir && worktreeGitdir ? { gitdir: worktreeGitdir } : undefined
406668
406793
  };
406669
406794
  }
406670
406795
  async readGitStatus() {
@@ -406683,8 +406808,22 @@ class GitStatusReader {
406683
406808
  }
406684
406809
  }
406685
406810
  }
406811
+ async function parseWorktreeGitdir(cwd) {
406812
+ try {
406813
+ const gitFilePath = join13(cwd, ".git");
406814
+ const fileStat = await stat(gitFilePath);
406815
+ if (!fileStat.isFile()) {
406816
+ return;
406817
+ }
406818
+ const content = await readFile4(gitFilePath, "utf8");
406819
+ const match30 = content.trim().match(/^gitdir:\s*(.+)$/);
406820
+ return match30 ? match30[1] : undefined;
406821
+ } catch (error42) {
406822
+ return;
406823
+ }
406824
+ }
406686
406825
  // ../common/src/tool-utils/custom-rules.ts
406687
- import { readFile as readFile4 } from "node:fs/promises";
406826
+ import { readFile as readFile5 } from "node:fs/promises";
406688
406827
  import { homedir as homedir2 } from "node:os";
406689
406828
  import path8 from "node:path";
406690
406829
  var WorkspaceRulesFilePaths = ["README.pochi.md", "AGENTS.md"];
@@ -406721,7 +406860,7 @@ async function collectCustomRules(cwd, customRuleFiles = [], includeDefaultRules
406721
406860
  }));
406722
406861
  for (const rule of allRules) {
406723
406862
  try {
406724
- const content = await readFile4(rule.filePath, "utf-8");
406863
+ const content = await readFile5(rule.filePath, "utf-8");
406725
406864
  if (content.trim().length > 0) {
406726
406865
  rules += `# Rules from ${rule.label}
406727
406866
  ${content}
@@ -414906,7 +415045,7 @@ var handle = {
414906
415045
  };
414907
415046
 
414908
415047
  // ../../node_modules/mdast-util-to-markdown/lib/join.js
414909
- var join12 = [joinDefaults];
415048
+ var join14 = [joinDefaults];
414910
415049
  function joinDefaults(left3, right3, parent, state2) {
414911
415050
  if (right3.type === "code" && formatCodeAsIndented(right3, state2) && (left3.type === "list" || left3.type === right3.type && formatCodeAsIndented(left3, state2))) {
414912
415051
  return false;
@@ -415289,7 +415428,7 @@ function toMarkdown(tree, options4) {
415289
415428
  handle: undefined,
415290
415429
  indentLines,
415291
415430
  indexStack: [],
415292
- join: [...join12],
415431
+ join: [...join14],
415293
415432
  options: {},
415294
415433
  safe: safeBound,
415295
415434
  stack: [],
@@ -415595,10 +415734,10 @@ class VFile {
415595
415734
  get basename() {
415596
415735
  return typeof this.path === "string" ? default2.basename(this.path) : undefined;
415597
415736
  }
415598
- set basename(basename) {
415599
- assertNonEmpty(basename, "basename");
415600
- assertPart(basename, "basename");
415601
- this.path = default2.join(this.dirname || "", basename);
415737
+ set basename(basename2) {
415738
+ assertNonEmpty(basename2, "basename");
415739
+ assertPart(basename2, "basename");
415740
+ this.path = default2.join(this.dirname || "", basename2);
415602
415741
  }
415603
415742
  get dirname() {
415604
415743
  return typeof this.path === "string" ? default2.dirname(this.path) : undefined;
@@ -416470,7 +416609,7 @@ async function loadAgents(workingDirectory2, includeSystemAgents = true) {
416470
416609
  allAgents.push(...await readAgentsFromDir(projectAgentsDir));
416471
416610
  }
416472
416611
  if (includeSystemAgents) {
416473
- const systemAgentsDir = path10.join(os6.homedir(), ".pochi", "agents");
416612
+ const systemAgentsDir = path10.join(os7.homedir(), ".pochi", "agents");
416474
416613
  allAgents.push(...await readAgentsFromDir(systemAgentsDir));
416475
416614
  }
416476
416615
  const validAgents = T(allAgents, (agent) => agent.name).filter((agent) => {
@@ -416581,7 +416720,8 @@ function mapStoreBlob(store, o6) {
416581
416720
  const blob3 = store.query(exports_livestore.queries.makeBlobQuery(url3.pathname));
416582
416721
  if (!blob3)
416583
416722
  throw new Error(`Store blob not found at "${url3.pathname}"`);
416584
- return Buffer.from(blob3.data).toString("base64");
416723
+ const base643 = Buffer.from(blob3.data).toString("base64");
416724
+ return `data:${blob3.mimeType};base64,${base643}`;
416585
416725
  }
416586
416726
  if (o5(o6)) {
416587
416727
  return o6.map((el) => mapStoreBlob(store, el));
@@ -416599,7 +416739,7 @@ async function shutdownStoreAndExit(store, exitCode2 = 0) {
416599
416739
  }
416600
416740
 
416601
416741
  // src/livekit/store.ts
416602
- import os9 from "node:os";
416742
+ import os10 from "node:os";
416603
416743
  import path25 from "node:path";
416604
416744
 
416605
416745
  // ../../node_modules/base58-js/base58_chars.js
@@ -419773,8 +419913,8 @@ async function Module2(moduleArg = {}) {
419773
419913
  throw new Error(`Invalid encoding type "${opts.encoding}"`);
419774
419914
  }
419775
419915
  var stream10 = FS.open(path12, opts.flags);
419776
- var stat = FS.stat(path12);
419777
- var length5 = stat.size;
419916
+ var stat2 = FS.stat(path12);
419917
+ var length5 = stat2.size;
419778
419918
  var buf = new Uint8Array(length5);
419779
419919
  FS.read(stream10, buf, 0, length5, 0);
419780
419920
  if (opts.encoding === "utf8") {
@@ -420179,26 +420319,26 @@ async function Module2(moduleArg = {}) {
420179
420319
  return dir2;
420180
420320
  }
420181
420321
  return dir2 + "/" + path12;
420182
- }, writeStat(buf, stat) {
420183
- HEAP32[buf >> 2] = stat.dev;
420184
- HEAP32[buf + 4 >> 2] = stat.mode;
420185
- HEAPU32[buf + 8 >> 2] = stat.nlink;
420186
- HEAP32[buf + 12 >> 2] = stat.uid;
420187
- HEAP32[buf + 16 >> 2] = stat.gid;
420188
- HEAP32[buf + 20 >> 2] = stat.rdev;
420189
- tempI64 = [stat.size >>> 0, (tempDouble = stat.size, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 24 >> 2] = tempI64[0], HEAP32[buf + 28 >> 2] = tempI64[1];
420322
+ }, writeStat(buf, stat2) {
420323
+ HEAP32[buf >> 2] = stat2.dev;
420324
+ HEAP32[buf + 4 >> 2] = stat2.mode;
420325
+ HEAPU32[buf + 8 >> 2] = stat2.nlink;
420326
+ HEAP32[buf + 12 >> 2] = stat2.uid;
420327
+ HEAP32[buf + 16 >> 2] = stat2.gid;
420328
+ HEAP32[buf + 20 >> 2] = stat2.rdev;
420329
+ tempI64 = [stat2.size >>> 0, (tempDouble = stat2.size, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 24 >> 2] = tempI64[0], HEAP32[buf + 28 >> 2] = tempI64[1];
420190
420330
  HEAP32[buf + 32 >> 2] = 4096;
420191
- HEAP32[buf + 36 >> 2] = stat.blocks;
420192
- var atime = stat.atime.getTime();
420193
- var mtime = stat.mtime.getTime();
420194
- var ctime = stat.ctime.getTime();
420331
+ HEAP32[buf + 36 >> 2] = stat2.blocks;
420332
+ var atime = stat2.atime.getTime();
420333
+ var mtime = stat2.mtime.getTime();
420334
+ var ctime = stat2.ctime.getTime();
420195
420335
  tempI64 = [Math.floor(atime / 1000) >>> 0, (tempDouble = Math.floor(atime / 1000), +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 40 >> 2] = tempI64[0], HEAP32[buf + 44 >> 2] = tempI64[1];
420196
420336
  HEAPU32[buf + 48 >> 2] = atime % 1000 * 1000 * 1000;
420197
420337
  tempI64 = [Math.floor(mtime / 1000) >>> 0, (tempDouble = Math.floor(mtime / 1000), +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 56 >> 2] = tempI64[0], HEAP32[buf + 60 >> 2] = tempI64[1];
420198
420338
  HEAPU32[buf + 64 >> 2] = mtime % 1000 * 1000 * 1000;
420199
420339
  tempI64 = [Math.floor(ctime / 1000) >>> 0, (tempDouble = Math.floor(ctime / 1000), +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 72 >> 2] = tempI64[0], HEAP32[buf + 76 >> 2] = tempI64[1];
420200
420340
  HEAPU32[buf + 80 >> 2] = ctime % 1000 * 1000 * 1000;
420201
- tempI64 = [stat.ino >>> 0, (tempDouble = stat.ino, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 88 >> 2] = tempI64[0], HEAP32[buf + 92 >> 2] = tempI64[1];
420341
+ tempI64 = [stat2.ino >>> 0, (tempDouble = stat2.ino, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 88 >> 2] = tempI64[0], HEAP32[buf + 92 >> 2] = tempI64[1];
420202
420342
  return 0;
420203
420343
  }, writeStatFs(buf, stats) {
420204
420344
  HEAP32[buf + 4 >> 2] = stats.bsize;
@@ -424587,7 +424727,7 @@ async function createStore3() {
424587
424727
  const adapter4 = makeAdapter({
424588
424728
  storage: enableSync ? {
424589
424729
  type: "fs",
424590
- baseDirectory: path25.join(os9.homedir(), ".pochi", "storage")
424730
+ baseDirectory: path25.join(os10.homedir(), ".pochi", "storage")
424591
424731
  } : { type: "in-memory" },
424592
424732
  devtools: process.env.POCHI_LIVEKIT_DEVTOOLS ? {
424593
424733
  schemaPath: "../../packages/livekit/src/livestore/schema.ts"
@@ -431360,16 +431500,16 @@ function collectText(node3, info2) {
431360
431500
  start6 = end6 + 1;
431361
431501
  }
431362
431502
  let index3 = -1;
431363
- let join19;
431503
+ let join21;
431364
431504
  while (++index3 < lines3.length) {
431365
431505
  if (lines3[index3].charCodeAt(lines3[index3].length - 1) === 8203 || index3 < lines3.length - 1 && lines3[index3 + 1].charCodeAt(0) === 8203) {
431366
431506
  result2.push(lines3[index3]);
431367
- join19 = undefined;
431507
+ join21 = undefined;
431368
431508
  } else if (lines3[index3]) {
431369
- if (typeof join19 === "number")
431370
- result2.push(join19);
431509
+ if (typeof join21 === "number")
431510
+ result2.push(join21);
431371
431511
  result2.push(lines3[index3]);
431372
- join19 = 0;
431512
+ join21 = 0;
431373
431513
  } else if (index3 === 0 || index3 === lines3.length - 1) {
431374
431514
  result2.push(0);
431375
431515
  }
@@ -442081,7 +442221,7 @@ import { format as format11 } from "util";
442081
442221
  import { EOL } from "os";
442082
442222
  import { StringDecoder } from "string_decoder";
442083
442223
  import { Writable } from "stream";
442084
- import { randomUUID } from "crypto";
442224
+ import { randomUUID as randomUUID2 } from "crypto";
442085
442225
  var ANSI_ESCAPE = "\x1B[";
442086
442226
  var ANSI_ESCAPE_CODES = {
442087
442227
  CURSOR_HIDE: ANSI_ESCAPE + "?25l",
@@ -443502,7 +443642,7 @@ var TaskWrapper = class {
443502
443642
  var ListrTaskEventManager = class extends EventManager {
443503
443643
  };
443504
443644
  var Task2 = class extends ListrTaskEventManager {
443505
- id = randomUUID();
443645
+ id = randomUUID2();
443506
443646
  state = ListrTaskState.WAITING;
443507
443647
  subtasks;
443508
443648
  title;
@@ -444371,6 +444511,15 @@ function toTaskError(error46) {
444371
444511
  }
444372
444512
  return internalError(error46.message);
444373
444513
  }
444514
+ var toTaskGitInfo = (gitStatus) => {
444515
+ if (!gitStatus)
444516
+ return;
444517
+ return {
444518
+ origin: gitStatus.origin,
444519
+ branch: gitStatus.currentBranch,
444520
+ worktree: gitStatus.worktree
444521
+ };
444522
+ };
444374
444523
 
444375
444524
  // ../livekit/src/chat/llm/generate-task-title.ts
444376
444525
  var logger18 = getLogger("generateTaskTitle");
@@ -445549,7 +445698,7 @@ function createVertexModel(vertex2, modelId) {
445549
445698
  })(modelId);
445550
445699
  }
445551
445700
  if ("issueUrl" in vertex2) {
445552
- const { issueUrl, modelUrl } = vertex2;
445701
+ const { issueUrl, modelUrl, timeout: timeout5 } = vertex2;
445553
445702
  return createVertex({
445554
445703
  project: "placeholder",
445555
445704
  location: "placeholder",
@@ -445571,7 +445720,11 @@ function createVertexModel(vertex2, modelId) {
445571
445720
  }
445572
445721
  const headers = new Headers(requestInit?.headers);
445573
445722
  headers.append("Authorization", `Bearer ${accessToken}`);
445574
- return fetch(`${modelUrl}/${lastSegment}`, { ...requestInit, headers });
445723
+ return fetch(`${modelUrl}/${lastSegment}`, {
445724
+ ...requestInit,
445725
+ headers,
445726
+ signal: AbortSignal.timeout(timeout5)
445727
+ });
445575
445728
  }
445576
445729
  })(modelId);
445577
445730
  }
@@ -446000,6 +446153,13 @@ class LiveChatKit {
446000
446153
  updatedAt: new Date
446001
446154
  }));
446002
446155
  };
446156
+ markAsFailed = (error46) => {
446157
+ this.store.commit(events.taskFailed({
446158
+ id: this.taskId,
446159
+ error: toTaskError(error46),
446160
+ updatedAt: new Date
446161
+ }));
446162
+ };
446003
446163
  onStart = async ({
446004
446164
  messages: messages2,
446005
446165
  environment: environment2,
@@ -446026,15 +446186,11 @@ class LiveChatKit {
446026
446186
  messages: messages2,
446027
446187
  getModel
446028
446188
  });
446029
- const { gitStatus } = environment2?.workspace || {};
446030
446189
  store.commit(events.chatStreamStarted({
446031
446190
  id: this.taskId,
446032
446191
  data: lastMessage,
446033
446192
  todos: environment2?.todos || [],
446034
- git: gitStatus ? {
446035
- origin: gitStatus.origin,
446036
- branch: gitStatus.currentBranch
446037
- } : undefined,
446193
+ git: toTaskGitInfo(environment2?.workspace.gitStatus),
446038
446194
  updatedAt: new Date
446039
446195
  }));
446040
446196
  }
@@ -446111,6 +446267,24 @@ function stepToString(stepInfo) {
446111
446267
  return `Round ${stepInfo.step}`;
446112
446268
  }
446113
446269
 
446270
+ class MaxRoundReachedError extends Error {
446271
+ maxRounds;
446272
+ constructor(maxRounds) {
446273
+ super(`Task aborted: maximum number of rounds reached (${maxRounds}).`);
446274
+ this.maxRounds = maxRounds;
446275
+ this.name = "AbortError";
446276
+ }
446277
+ }
446278
+
446279
+ class MaxRetryReachedError extends Error {
446280
+ maxRetries;
446281
+ constructor(maxRetries) {
446282
+ super(`Task aborted: maximum number of retries reached (${maxRetries}).`);
446283
+ this.maxRetries = maxRetries;
446284
+ this.name = "AbortError";
446285
+ }
446286
+ }
446287
+
446114
446288
  class StepCount {
446115
446289
  maxSteps;
446116
446290
  maxRetries;
@@ -446129,7 +446303,7 @@ class StepCount {
446129
446303
  }
446130
446304
  throwIfReachedMaxSteps() {
446131
446305
  if (this.step >= this.maxSteps) {
446132
- throw new Error(`Reached max rounds (${this.maxSteps}).`);
446306
+ throw new MaxRoundReachedError(this.maxSteps);
446133
446307
  }
446134
446308
  }
446135
446309
  nextStep() {
@@ -446139,7 +446313,7 @@ class StepCount {
446139
446313
  }
446140
446314
  throwIfReachedMaxRetries() {
446141
446315
  if (this.retry >= this.maxRetries) {
446142
- throw new Error(`Reached max retries (${this.maxRetries}).`);
446316
+ throw new MaxRetryReachedError(this.maxRetries);
446143
446317
  }
446144
446318
  }
446145
446319
  nextRetry() {
@@ -446614,7 +446788,7 @@ var newTask = (options6) => async ({ _meta, agentType }) => {
446614
446788
 
446615
446789
  // src/tools/read-file.ts
446616
446790
  import * as fs15 from "node:fs/promises";
446617
- var readFile14 = () => async ({ path: path28, startLine, endLine }, { cwd: cwd2 }) => {
446791
+ var readFile15 = () => async ({ path: path28, startLine, endLine }, { cwd: cwd2 }) => {
446618
446792
  const resolvedPath = resolvePath(path28, cwd2);
446619
446793
  const fileBuffer = await fs15.readFile(resolvedPath);
446620
446794
  validateTextFile(fileBuffer);
@@ -446662,7 +446836,7 @@ var writeToFile2 = () => async ({ path: path28, content: content3 }, { cwd: cwd2
446662
446836
 
446663
446837
  // src/tools/index.ts
446664
446838
  var ToolMap = {
446665
- readFile: readFile14,
446839
+ readFile: readFile15,
446666
446840
  applyDiff: applyDiff2,
446667
446841
  editNotebook: editNotebook2,
446668
446842
  globFiles: globFiles3,
@@ -446809,6 +446983,7 @@ class TaskRunner {
446809
446983
  } catch (e10) {
446810
446984
  const error46 = toError2(e10);
446811
446985
  logger26.trace("Failed:", error46);
446986
+ this.chatKit.markAsFailed(error46);
446812
446987
  }
446813
446988
  }
446814
446989
  async step() {
@@ -446936,8 +447111,8 @@ import {
446936
447111
  rmSync,
446937
447112
  statSync as statSync3
446938
447113
  } from "node:fs";
446939
- import { homedir as homedir6, tmpdir as tmpdir3 } from "node:os";
446940
- import { extname as extname5, join as join21 } from "node:path";
447114
+ import { homedir as homedir6, tmpdir as tmpdir4 } from "node:os";
447115
+ import { extname as extname5, join as join23 } from "node:path";
446941
447116
 
446942
447117
  // src/upgrade/platform-utils.ts
446943
447118
  function getPlatformName() {
@@ -447000,8 +447175,8 @@ function extractVersionFromTag(tag9) {
447000
447175
 
447001
447176
  // src/upgrade/binary-installer.ts
447002
447177
  function getPochiDir() {
447003
- const pochiDir = join21(homedir6(), ".pochi");
447004
- const binDir = join21(pochiDir, "bin");
447178
+ const pochiDir = join23(homedir6(), ".pochi");
447179
+ const binDir = join23(pochiDir, "bin");
447005
447180
  if (!existsSync7(pochiDir)) {
447006
447181
  mkdirSync(pochiDir, { recursive: true });
447007
447182
  }
@@ -447015,7 +447190,7 @@ function findExecutableInDirectory(dir2) {
447015
447190
  const files = [];
447016
447191
  const entries4 = readdirSync2(currentDir, { withFileTypes: true });
447017
447192
  for (const entry of entries4) {
447018
- const fullPath = join21(currentDir, entry.name);
447193
+ const fullPath = join23(currentDir, entry.name);
447019
447194
  if (entry.isDirectory()) {
447020
447195
  files.push(...searchRecursively(fullPath));
447021
447196
  } else if (entry.isFile()) {
@@ -447079,11 +447254,11 @@ async function downloadAndInstall(program5, release3) {
447079
447254
  const version5 = extractVersionFromTag(release3.tag_name);
447080
447255
  const binDir = getPochiDir();
447081
447256
  const latestBinaryName = getLatestBinaryFileName();
447082
- const latestBinaryPath = join21(binDir, latestBinaryName);
447257
+ const latestBinaryPath = join23(binDir, latestBinaryName);
447083
447258
  console.log(`⚙️ Installing to: ${latestBinaryPath}`);
447084
- const tempDir = join21(tmpdir3(), `pochi-upgrade-${Date.now()}`);
447259
+ const tempDir = join23(tmpdir4(), `pochi-upgrade-${Date.now()}`);
447085
447260
  mkdirSync(tempDir, { recursive: true });
447086
- const archivePath = join21(tempDir, asset.name);
447261
+ const archivePath = join23(tempDir, asset.name);
447087
447262
  console.log("\uD83D\uDD04 Downloading with progress...");
447088
447263
  try {
447089
447264
  execSync3(`curl -L --progress-bar "${asset.browser_download_url}" -o "${archivePath}"`, {