@kitman-sh/cli 0.12.7 → 0.12.8

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 (27) hide show
  1. package/dist/{chunk-q5w3v4k1.js → chunk-0tjg9eya.js} +1 -1
  2. package/dist/{chunk-cbpb2rww.js → chunk-31gpnkq3.js} +5 -5
  3. package/dist/{chunk-gxbcvd4q.js → chunk-3x6cbhzd.js} +4 -4
  4. package/dist/{chunk-mtkstrh3.js → chunk-6d53ezj1.js} +4 -4
  5. package/dist/{chunk-fyvtc3xv.js → chunk-6w7ajkm8.js} +18 -18
  6. package/dist/{chunk-vkg40ysx.js → chunk-93ypzdpa.js} +7 -7
  7. package/dist/{chunk-8b8pw0md.js → chunk-9qp59fht.js} +32 -32
  8. package/dist/{chunk-p7hxrkmf.js → chunk-bh9k3kty.js} +55 -55
  9. package/dist/{chunk-jn7w2ntt.js → chunk-c8hwfktd.js} +7 -7
  10. package/dist/{chunk-0h49y8gf.js → chunk-c8wpw9nh.js} +65 -214
  11. package/dist/{chunk-4w0c1ykv.js → chunk-cr3qw0xf.js} +297 -381
  12. package/dist/{chunk-gq7y5v3e.js → chunk-cw61zyh5.js} +1 -1
  13. package/dist/{chunk-gy9rf14f.js → chunk-fh58za51.js} +3 -3
  14. package/dist/{chunk-4gy4ty6k.js → chunk-gyek54h3.js} +8 -8
  15. package/dist/{chunk-5zhh41gb.js → chunk-j1cnq2j0.js} +4 -4
  16. package/dist/{chunk-gwnyxm1r.js → chunk-jwrs9pfa.js} +107 -107
  17. package/dist/{chunk-5zth85pj.js → chunk-kzwdhdej.js} +2 -2
  18. package/dist/{chunk-azfjx5d8.js → chunk-n9351czb.js} +7 -7
  19. package/dist/{chunk-7dahw7e2.js → chunk-pjpfc3sd.js} +1 -1
  20. package/dist/{chunk-zw3gf6r5.js → chunk-qjqa338f.js} +333 -94
  21. package/dist/{chunk-ywzxwgrz.js → chunk-s5pzy86v.js} +6 -6
  22. package/dist/{chunk-7afnkx5b.js → chunk-tgwa9vqw.js} +6 -6
  23. package/dist/{chunk-fr79hgq2.js → chunk-wcvfkdwd.js} +24 -24
  24. package/dist/{chunk-b9rbh1va.js → chunk-xng6j3a8.js} +1 -1
  25. package/dist/{chunk-y1krmnbv.js → chunk-z5f7g1w1.js} +2 -2
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -17,14 +17,9 @@ import {
17
17
  isNullish,
18
18
  hasProperty,
19
19
  symbol,
20
- hash,
21
- combine,
22
- number,
23
- string,
24
20
  structure,
25
21
  array,
26
22
  symbol2,
27
- equals,
28
23
  asEquivalence,
29
24
  symbolRedactable,
30
25
  redact,
@@ -38,7 +33,7 @@ import {
38
33
  assignProperty,
39
34
  PipeInspectableProto,
40
35
  withFiber,
41
- make14,
36
+ make13,
42
37
  strictEqual,
43
38
  Tuple,
44
39
  Number2,
@@ -52,19 +47,20 @@ import {
52
47
  fromNullishOr,
53
48
  fromUndefinedOr,
54
49
  getOrUndefined,
55
- liftThrowable,
56
50
  map4,
57
51
  flatMap,
58
52
  Service2,
59
- makeUnsafe4,
53
+ makeUnsafe3,
60
54
  empty3,
61
- make15,
55
+ make14,
62
56
  add,
63
57
  getOrUndefined2,
64
58
  getOrUndefinedUnsafe,
65
- get4,
59
+ get3,
66
60
  merge3,
67
61
  Reference,
62
+ fromInputUnsafe,
63
+ isFinite,
68
64
  millis,
69
65
  seconds,
70
66
  toMillis,
@@ -83,15 +79,14 @@ import {
83
79
  TaggedError,
84
80
  DisablePropagation,
85
81
  sync,
86
- map7,
87
- ClockRef,
88
- currentTimeMillis2,
89
82
  ConsoleRef,
90
83
  succeed3,
91
84
  fail4,
85
+ void_2,
92
86
  isSuccess2,
93
- makeUnsafe5,
94
- make16,
87
+ isFailure2,
88
+ makeUnsafe4,
89
+ make15,
95
90
  _await,
96
91
  fail5,
97
92
  isDone,
@@ -99,8 +94,12 @@ import {
99
94
  succeed4,
100
95
  doneUnsafe,
101
96
  TracerTimingEnabled,
97
+ Scope,
98
+ makeUnsafe5,
102
99
  provide,
100
+ addFinalizerExit,
103
101
  addFinalizer,
102
+ close,
104
103
  succeed5,
105
104
  effect,
106
105
  effectContext,
@@ -113,8 +112,9 @@ import {
113
112
  hasInterrupts2,
114
113
  Done2,
115
114
  done,
116
- IllegalArgumentError,
117
115
  UnknownError,
116
+ Clock,
117
+ currentTimeMillis,
118
118
  catchDone,
119
119
  isDoneCause,
120
120
  exponential,
@@ -140,7 +140,7 @@ import {
140
140
  flatMap3,
141
141
  andThen2,
142
142
  tap2,
143
- map8,
143
+ map7,
144
144
  as,
145
145
  asVoid,
146
146
  catch_,
@@ -152,6 +152,7 @@ import {
152
152
  tapCause,
153
153
  retry,
154
154
  ignore,
155
+ ignoreCause,
155
156
  orElseSucceed,
156
157
  timeout,
157
158
  timeoutOrElse,
@@ -163,6 +164,7 @@ import {
163
164
  context,
164
165
  contextWith,
165
166
  provide3,
167
+ provideContext2,
166
168
  serviceOption,
167
169
  updateContext,
168
170
  provideService,
@@ -173,6 +175,7 @@ import {
173
175
  addFinalizer2,
174
176
  ensuring2,
175
177
  onError,
178
+ onExit,
176
179
  cached,
177
180
  interrupt3,
178
181
  interruptible,
@@ -184,6 +187,7 @@ import {
184
187
  withParentSpan,
185
188
  forkScoped,
186
189
  runFork,
190
+ runForkWith,
187
191
  runPromise,
188
192
  runPromiseWith,
189
193
  runSync,
@@ -194,9 +198,16 @@ import {
194
198
  logError,
195
199
  effectify,
196
200
  decode,
201
+ makeUnsafe6,
202
+ make16,
203
+ now,
204
+ nowUnsafe,
205
+ toDateUtc,
206
+ toEpochMillis,
207
+ formatIso,
197
208
  defaultParseOptions,
198
209
  omit,
199
- map9,
210
+ map8,
200
211
  declare,
201
212
  decodeUnknownEffect2,
202
213
  decodeEffect,
@@ -261,15 +272,32 @@ import {
261
272
  decodeJsonStringOption,
262
273
  encodeJsonStringSync,
263
274
  encodePrettyJsonString
264
- } from "./chunk-zw3gf6r5.js";
275
+ } from "./chunk-qjqa338f.js";
276
+ import {
277
+ isDateTime,
278
+ Numeric,
279
+ isWholeNumber,
280
+ guard,
281
+ Id,
282
+ Timestamp,
283
+ ActorType,
284
+ SecretName,
285
+ SecretScope,
286
+ SecretHosts,
287
+ isSecretReference
288
+ } from "./chunk-0tjg9eya.js";
265
289
  import {
266
290
  map,
267
291
  makeEquivalence,
268
292
  bytes,
293
+ join,
294
+ interrupt,
295
+ getCurrent,
296
+ runIn,
269
297
  BadArgument,
270
298
  systemError,
271
299
  badArgument,
272
- makeUnsafe2,
300
+ makeUnsafe,
273
301
  make8,
274
302
  make9,
275
303
  sliding,
@@ -281,19 +309,17 @@ import {
281
309
  endUnsafe,
282
310
  take,
283
311
  poll,
284
- makeUnsafe3,
312
+ makeUnsafe2,
285
313
  fromTransform,
286
314
  mapDone,
287
315
  isSink,
288
316
  fromChannel,
289
317
  drain,
290
- make10,
291
- get3,
292
318
  isStream,
293
319
  fromChannel2,
294
320
  callback,
295
321
  empty2,
296
- make11,
322
+ make10,
297
323
  suspend,
298
324
  fail2,
299
325
  fromQueue,
@@ -319,29 +345,16 @@ import {
319
345
  mkArrayBuffer,
320
346
  toReadableStreamEffect,
321
347
  FileSystem,
322
- make12,
348
+ make11,
323
349
  FileTypeId,
324
350
  WatchBackend,
325
351
  Path,
326
- make13,
352
+ make12,
327
353
  option,
328
354
  String2,
329
355
  optionalEnv,
330
356
  harnessesUnsupportedInSrt2
331
- } from "./chunk-0h49y8gf.js";
332
- import {
333
- isDateTime,
334
- Numeric,
335
- isWholeNumber,
336
- guard,
337
- Id,
338
- Timestamp,
339
- ActorType,
340
- SecretName,
341
- SecretScope,
342
- SecretHosts,
343
- isSecretReference
344
- } from "./chunk-q5w3v4k1.js";
357
+ } from "./chunk-c8wpw9nh.js";
345
358
  import {
346
359
  isRedacted,
347
360
  make,
@@ -355,241 +368,11 @@ import {
355
368
  make3,
356
369
  parseFdName,
357
370
  fdName
358
- } from "./chunk-mtkstrh3.js";
371
+ } from "./chunk-6d53ezj1.js";
359
372
 
360
373
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
361
374
  var makeEquivalence3 = Tuple;
362
375
 
363
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
364
- var Clock = ClockRef;
365
- var currentTimeMillis = currentTimeMillis2;
366
-
367
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/dateTime.js
368
- var TypeId = "~effect/DateTime";
369
- var TimeZoneTypeId = "~effect/DateTime/TimeZone";
370
- var Proto = {
371
- [TypeId]: TypeId,
372
- pipe() {
373
- return pipeArguments(this, arguments);
374
- },
375
- [NodeInspectSymbol]() {
376
- return this.toString();
377
- },
378
- toJSON() {
379
- return toDateUtc(this).toJSON();
380
- }
381
- };
382
- var ProtoUtc = {
383
- ...Proto,
384
- _tag: "Utc",
385
- [symbol]() {
386
- return number(this.epochMilliseconds);
387
- },
388
- [symbol2](that) {
389
- return isDateTime2(that) && that._tag === "Utc" && this.epochMilliseconds === that.epochMilliseconds;
390
- },
391
- toString() {
392
- return `DateTime.Utc(${toDateUtc(this).toJSON()})`;
393
- }
394
- };
395
- var ProtoZoned = {
396
- ...Proto,
397
- _tag: "Zoned",
398
- [symbol]() {
399
- return combine(number(this.epochMilliseconds))(hash(this.zone));
400
- },
401
- [symbol2](that) {
402
- return isDateTime2(that) && that._tag === "Zoned" && this.epochMilliseconds === that.epochMilliseconds && equals(this.zone, that.zone);
403
- },
404
- toString() {
405
- return `DateTime.Zoned(${formatIsoZoned(this)})`;
406
- }
407
- };
408
- var ProtoTimeZone = {
409
- [TimeZoneTypeId]: TimeZoneTypeId,
410
- [NodeInspectSymbol]() {
411
- return this.toString();
412
- }
413
- };
414
- var ProtoTimeZoneNamed = {
415
- ...ProtoTimeZone,
416
- _tag: "Named",
417
- [symbol]() {
418
- return string(`Named:${this.id}`);
419
- },
420
- [symbol2](that) {
421
- return isTimeZone(that) && that._tag === "Named" && this.id === that.id;
422
- },
423
- toString() {
424
- return `TimeZone.Named(${this.id})`;
425
- },
426
- toJSON() {
427
- return {
428
- _id: "TimeZone",
429
- _tag: "Named",
430
- id: this.id
431
- };
432
- }
433
- };
434
- var ProtoTimeZoneOffset = {
435
- ...ProtoTimeZone,
436
- _tag: "Offset",
437
- [symbol]() {
438
- return string(`Offset:${this.offset}`);
439
- },
440
- [symbol2](that) {
441
- return isTimeZone(that) && that._tag === "Offset" && this.offset === that.offset;
442
- },
443
- toString() {
444
- return `TimeZone.Offset(${offsetToString(this.offset)})`;
445
- },
446
- toJSON() {
447
- return {
448
- _id: "TimeZone",
449
- _tag: "Offset",
450
- offset: this.offset
451
- };
452
- }
453
- };
454
- var cacheSlot = {
455
- value: undefined,
456
- enumerable: false,
457
- writable: true
458
- };
459
- var sealedCaches = /* @__PURE__ */ new WeakMap;
460
- var cacheAccessor = (key, slots) => ({
461
- get() {
462
- return Object.isExtensible(this) ? undefined : sealedCaches.get(this)?.[key];
463
- },
464
- set(value) {
465
- if (Object.isExtensible(this)) {
466
- for (const slot of slots) {
467
- Object.defineProperty(this, slot, cacheSlot);
468
- }
469
- this[key] = value;
470
- } else {
471
- let caches = sealedCaches.get(this);
472
- if (caches === undefined) {
473
- caches = {};
474
- sealedCaches.set(this, caches);
475
- }
476
- caches[key] = value;
477
- }
478
- }
479
- });
480
- var zonedSlots = ["partsUtc", "adjustedEpochMilliseconds", "partsAdjusted"];
481
- Object.defineProperty(ProtoUtc, "partsUtc", cacheAccessor("partsUtc", ["partsUtc"]));
482
- Object.defineProperties(ProtoZoned, {
483
- partsUtc: cacheAccessor("partsUtc", zonedSlots),
484
- adjustedEpochMilliseconds: cacheAccessor("adjustedEpochMilliseconds", zonedSlots),
485
- partsAdjusted: cacheAccessor("partsAdjusted", zonedSlots)
486
- });
487
- var isDateTime2 = (u) => hasProperty(u, TypeId);
488
- var isTimeZone = (u) => hasProperty(u, TimeZoneTypeId);
489
- var makeUtc = (epochMillis) => {
490
- const self = Object.create(ProtoUtc);
491
- self.epochMilliseconds = epochMillis;
492
- return self;
493
- };
494
- var fromDateUnsafe = (date) => {
495
- const epochMillis = date.getTime();
496
- if (Number.isNaN(epochMillis)) {
497
- throw new IllegalArgumentError("Invalid date");
498
- }
499
- return makeUtc(epochMillis);
500
- };
501
- var makeUnsafe6 = (input) => {
502
- if (isDateTime2(input)) {
503
- return input;
504
- } else if (input instanceof Date) {
505
- return fromDateUnsafe(input);
506
- } else if (typeof input === "object") {
507
- if ("epochMilliseconds" in input) {
508
- return fromDateUnsafe(new Date(input.epochMilliseconds));
509
- }
510
- const date = new Date(0);
511
- setPartsDate(date, input);
512
- return fromDateUnsafe(date);
513
- } else if (typeof input === "string" && !hasZone(input)) {
514
- return fromDateUnsafe(new Date(input + "Z"));
515
- }
516
- return fromDateUnsafe(new Date(input));
517
- };
518
- var hasZone = (input) => /Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(input) || /z$|gmt$/i.test(input);
519
- var minEpochMillis = -8640000000000000 + 12 * 60 * 60 * 1000;
520
- var maxEpochMillis = 8640000000000000 - 14 * 60 * 60 * 1000;
521
- var make4 = /* @__PURE__ */ liftThrowable(makeUnsafe6);
522
- var now = /* @__PURE__ */ map7(currentTimeMillis, makeUtc);
523
- var nowUnsafe = () => makeUtc(Date.now());
524
- var toDateUtc = (self) => new Date(self.epochMilliseconds);
525
- var toDate2 = (self) => {
526
- if (self._tag === "Utc") {
527
- return new Date(self.epochMilliseconds);
528
- } else if (self.zone._tag === "Offset") {
529
- return new Date(self.epochMilliseconds + self.zone.offset);
530
- } else if (self.adjustedEpochMilliseconds !== undefined) {
531
- return new Date(self.adjustedEpochMilliseconds);
532
- }
533
- let bc = false;
534
- const parts = self.zone.format.formatToParts(self.epochMilliseconds).filter((_) => {
535
- if (_.type === "era") {
536
- bc = _.value === "BC";
537
- return false;
538
- }
539
- return _.type !== "literal";
540
- });
541
- const year = Number(parts[2].value);
542
- const date = new Date(0);
543
- date.setUTCFullYear(bc ? 1 - year : year, Number(parts[0].value) - 1, Number(parts[1].value));
544
- date.setUTCHours(Number(parts[3].value), Number(parts[4].value), Number(parts[5].value), parts[6]?.type === "fractionalSecond" ? Number(parts[6].value) : (self.epochMilliseconds % 1000 + 1000) % 1000);
545
- self.adjustedEpochMilliseconds = date.getTime();
546
- return date;
547
- };
548
- var zonedOffset = (self) => {
549
- const date = toDate2(self);
550
- return date.getTime() - toEpochMillis(self);
551
- };
552
- var offsetToString = (offset) => {
553
- const abs = Math.abs(offset);
554
- let hours = Math.floor(abs / (60 * 60 * 1000));
555
- let minutes = Math.round(abs % (60 * 60 * 1000) / (60 * 1000));
556
- if (minutes === 60) {
557
- hours += 1;
558
- minutes = 0;
559
- }
560
- return `${offset < 0 ? "-" : "+"}${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
561
- };
562
- var zonedOffsetIso = (self) => offsetToString(zonedOffset(self));
563
- var toEpochMillis = (self) => self.epochMilliseconds;
564
- var setPartsDate = (date, parts) => {
565
- if (parts.year !== undefined || parts.month !== undefined || parts.day !== undefined) {
566
- date.setUTCFullYear(parts.year ?? date.getUTCFullYear(), parts.month !== undefined ? parts.month - 1 : date.getUTCMonth(), parts.day ?? date.getUTCDate());
567
- }
568
- if (parts.weekDay !== undefined) {
569
- const diff = parts.weekDay - date.getUTCDay();
570
- date.setUTCDate(date.getUTCDate() + diff);
571
- }
572
- if (parts.hour !== undefined) {
573
- date.setUTCHours(parts.hour);
574
- }
575
- if (parts.minute !== undefined) {
576
- date.setUTCMinutes(parts.minute);
577
- }
578
- if (parts.second !== undefined) {
579
- date.setUTCSeconds(parts.second);
580
- }
581
- if (parts.millisecond !== undefined) {
582
- date.setUTCMilliseconds(parts.millisecond);
583
- }
584
- };
585
- var constDayMillis = 24 * 60 * 60 * 1000;
586
- var formatIso2 = (self) => toDateUtc(self).toISOString();
587
- var formatIsoOffset = (self) => {
588
- const date = toDate2(self);
589
- return self._tag === "Utc" ? date.toISOString() : `${date.toISOString().slice(0, -1)}${zonedOffsetIso(self)}`;
590
- };
591
- var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
592
-
593
376
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Metric.js
594
377
  var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
595
378
  var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
@@ -599,10 +382,10 @@ var MetricRegistryKey = "effect/Metric/MetricRegistry";
599
382
  var MetricRegistry = /* @__PURE__ */ Reference(MetricRegistryKey, {
600
383
  defaultValue: () => new Map
601
384
  });
602
- var TypeId2 = "~effect/Metric";
385
+ var TypeId = "~effect/Metric";
603
386
 
604
387
  class Metric$ {
605
- [TypeId2] = TypeId2;
388
+ [TypeId] = TypeId;
606
389
  #extraAttributes;
607
390
  #mergedAttributes;
608
391
  #key = "";
@@ -625,7 +408,7 @@ class Metric$ {
625
408
  }
626
409
  hook(context) {
627
410
  const key = this.key(context);
628
- const registry = get4(context, MetricRegistry);
411
+ const registry = get3(context, MetricRegistry);
629
412
  let metadata = registry.get(key);
630
413
  if (isUndefined(metadata)) {
631
414
  metadata = this.metadata(this.createHooks());
@@ -634,11 +417,11 @@ class Metric$ {
634
417
  return metadata.hooks;
635
418
  }
636
419
  removeUnsafe(context) {
637
- get4(context, MetricRegistry).delete(this.key(context));
420
+ get3(context, MetricRegistry).delete(this.key(context));
638
421
  }
639
422
  registerUnsafe(context, hooks) {
640
423
  const key = this.key(context);
641
- const registry = get4(context, MetricRegistry);
424
+ const registry = get3(context, MetricRegistry);
642
425
  const metadata = this.metadata({
643
426
  get: hooks.get,
644
427
  update: constVoid,
@@ -654,7 +437,7 @@ class Metric$ {
654
437
  };
655
438
  }
656
439
  key(context) {
657
- const extraAttributes = get4(context, CurrentMetricAttributes);
440
+ const extraAttributes = get3(context, CurrentMetricAttributes);
658
441
  if (extraAttributes !== this.#extraAttributes) {
659
442
  this.#extraAttributes = extraAttributes;
660
443
  const merged = mergeAttributes(this.attributes, extraAttributes);
@@ -906,14 +689,147 @@ var toNumber = (b) => {
906
689
  return some(Number(b));
907
690
  };
908
691
 
909
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
910
- var makeUnsafe = makeUnsafe6;
692
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
693
+ var TypeId2 = "~effect/RcRef";
694
+ var stateEmpty = {
695
+ _tag: "Empty"
696
+ };
697
+ var stateClosed = {
698
+ _tag: "Closed"
699
+ };
700
+ var variance = {
701
+ _A: identity,
702
+ _E: identity
703
+ };
704
+
705
+ class RcRefImpl {
706
+ [TypeId2] = variance;
707
+ pipe() {
708
+ return pipeArguments(this, arguments);
709
+ }
710
+ state = stateEmpty;
711
+ acquire;
712
+ context;
713
+ scope;
714
+ idleTimeToLive;
715
+ constructor(acquire, context, scope, idleTimeToLive) {
716
+ this.acquire = acquire;
717
+ this.context = context;
718
+ this.scope = scope;
719
+ this.idleTimeToLive = idleTimeToLive;
720
+ }
721
+ }
722
+ var make4 = (options) => withFiber2((fiber) => {
723
+ const context = fiber.context;
724
+ const scope = get3(context, Scope);
725
+ const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
726
+ return as(addFinalizerExit(scope, () => {
727
+ const state = ref.state;
728
+ ref.state = stateClosed;
729
+ if (state._tag === "Acquired")
730
+ return close(state.scope, void_2);
731
+ if (state._tag === "Acquiring")
732
+ return interrupt(state.fiber);
733
+ return void_3;
734
+ }), ref);
735
+ });
736
+ var getState = (self, restore) => {
737
+ switch (self.state._tag) {
738
+ case "Closed": {
739
+ return interrupt3;
740
+ }
741
+ case "Acquired": {
742
+ const state = self.state;
743
+ state.refCount++;
744
+ return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
745
+ }
746
+ case "Acquiring": {
747
+ const state = self.state;
748
+ state.awaiters++;
749
+ return awaitAcquiring(self, state, restore);
750
+ }
751
+ case "Empty": {
752
+ const acquiring = {
753
+ _tag: "Acquiring",
754
+ fiber: undefined,
755
+ awaiters: 1,
756
+ acquired: undefined
757
+ };
758
+ self.state = acquiring;
759
+ const scope = makeUnsafe5();
760
+ const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
761
+ if (self.state !== acquiring) {
762
+ return interrupt3;
763
+ }
764
+ const state = {
765
+ _tag: "Acquired",
766
+ value,
767
+ scope,
768
+ fiber: undefined,
769
+ refCount: acquiring.awaiters,
770
+ invalidated: false
771
+ };
772
+ self.state = state;
773
+ acquiring.acquired = state;
774
+ return succeed6(state);
775
+ }), onExit((exit) => {
776
+ if (isSuccess2(exit))
777
+ return void_3;
778
+ if (self.state === acquiring)
779
+ self.state = stateEmpty;
780
+ return close(scope, exit);
781
+ }));
782
+ acquiring.fiber = runForkWith(getCurrent().context)(acquire);
783
+ return awaitAcquiring(self, acquiring, restore);
784
+ }
785
+ }
786
+ };
787
+ var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
788
+ const acquired = acquiring.acquired;
789
+ if (acquired !== undefined) {
790
+ return isFailure2(exit) ? release(self, acquired) : void_3;
791
+ }
792
+ if (--acquiring.awaiters > 0 || self.state !== acquiring)
793
+ return void_3;
794
+ self.state = stateEmpty;
795
+ return interrupt(acquiring.fiber);
796
+ });
797
+ var get4 = (self_) => {
798
+ const self = self_;
799
+ return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
800
+ };
801
+ var release = (self, state) => {
802
+ state.refCount--;
803
+ if (state.refCount > 0) {
804
+ return void_3;
805
+ }
806
+ const idleTimeToLive = self.idleTimeToLive;
807
+ if (idleTimeToLive === undefined || state.invalidated) {
808
+ if (self.state === state) {
809
+ self.state = stateEmpty;
810
+ }
811
+ return close(state.scope, void_2);
812
+ } else if (!isFinite(idleTimeToLive)) {
813
+ return void_3;
814
+ }
815
+ state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
816
+ if (self.state === state && state.refCount === 0) {
817
+ self.state = stateEmpty;
818
+ return ignoreCause(close(state.scope, void_2), {
819
+ log: "Unhandled",
820
+ message: "Unhandled error in RcRef finalizer"
821
+ });
822
+ }
823
+ return void_3;
824
+ })).pipe(ensuring2(sync2(() => {
825
+ state.fiber = undefined;
826
+ })), runForkWith(self.context), runIn(self.scope));
827
+ return void_3;
828
+ };
829
+
830
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
911
831
  var make18 = make4;
912
- var now2 = now;
913
- var nowUnsafe2 = nowUnsafe;
914
- var toDateUtc2 = toDateUtc;
915
- var toEpochMillis2 = toEpochMillis;
916
- var formatIso = formatIso2;
832
+ var get5 = get4;
917
833
 
918
834
  // node_modules/.bun/@effect+platform-node-shared@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
919
835
  import * as NodeChildProcess from "child_process";
@@ -1029,8 +945,8 @@ var releaseWritable = (writable) => callback3((resume) => {
1029
945
  });
1030
946
  var pullIntoWritable = (options) => withFiber2((fiber) => {
1031
947
  const dispatcher = fiber.currentDispatcher;
1032
- const completion = makeUnsafe5();
1033
- const failure = makeUnsafe5();
948
+ const completion = makeUnsafe4();
949
+ const failure = makeUnsafe4();
1034
950
  const onError = (error) => doneUnsafe(failure, failSync(() => options.onError(error)));
1035
951
  let errorEmitted = false;
1036
952
  const onStreamError = (error) => {
@@ -1124,7 +1040,7 @@ var readableToPullUnsafe = (options) => {
1124
1040
  const chunkSize = options.chunkSize ?? 4096;
1125
1041
  const closeOnDone = options.closeOnDone ?? true;
1126
1042
  const exit = options.exit ?? make8(undefined);
1127
- const latch = options.latch ?? makeUnsafe2(false);
1043
+ const latch = options.latch ?? makeUnsafe(false);
1128
1044
  function onReadable() {
1129
1045
  latch.openUnsafe();
1130
1046
  }
@@ -1354,7 +1270,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1354
1270
  });
1355
1271
  }
1356
1272
  if (stream) {
1357
- return map8(runInputStream(stream, sink, inputFailure), () => {
1273
+ return map7(runInputStream(stream, sink, inputFailure), () => {
1358
1274
  inputSinks.set(fd, sink);
1359
1275
  });
1360
1276
  }
@@ -1460,7 +1376,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1460
1376
  };
1461
1377
  };
1462
1378
  const spawn2 = (command, spawnOptions) => callback3((resume) => {
1463
- const deferred = makeUnsafe5();
1379
+ const deferred = makeUnsafe4();
1464
1380
  const handle = NodeChildProcess.spawn(command.command, command.args.map(unwrap2), spawnOptions);
1465
1381
  handle.on("error", (error) => {
1466
1382
  if (command.args.some(isRedacted)) {
@@ -1636,7 +1552,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1636
1552
  }
1637
1553
  return reref;
1638
1554
  });
1639
- const inputFailure = makeUnsafe5();
1555
+ const inputFailure = makeUnsafe4();
1640
1556
  const stdin = yield* setupChildStdin(cmd, childProcess, stdinConfig, inputFailure);
1641
1557
  const {
1642
1558
  all,
@@ -1647,7 +1563,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1647
1563
  getInputFd,
1648
1564
  getOutputFd
1649
1565
  } = yield* setupAdditionalFds(cmd, childProcess, resolvedAdditionalFds, inputFailure);
1650
- const isRunning = map8(isDone(exitSignal), (done) => !done);
1566
+ const isRunning = map7(isDone(exitSignal), (done) => !done);
1651
1567
  const exitCode = flatMap3(raceFirst(_await(exitSignal), _await(inputFailure)), ([code, signal]) => {
1652
1568
  if (isDoneUnsafe(inputFailure)) {
1653
1569
  return _await(inputFailure);
@@ -1928,7 +1844,7 @@ var noFollowFlags = (method, flag) => suspend3(() => {
1928
1844
  var openFactory = (method) => {
1929
1845
  const nodeOpen = effectify(NFS.open, handleErrnoException("FileSystem", method), handleBadArgument(method));
1930
1846
  const nodeClose = effectify(NFS.close, handleErrnoException("FileSystem", method), handleBadArgument(method));
1931
- return (path, options) => pipe(acquireRelease(options?.noFollow === true ? flatMap3(noFollowFlags(method, options.flag ?? "r"), (flags) => nodeOpen(path, flags, options.mode)) : nodeOpen(path, options?.flag ?? "r", options?.mode), (fd) => orDie(nodeClose(fd))), map8((fd) => makeFile(fd, options?.flag?.startsWith("a") ?? false)));
1847
+ return (path, options) => pipe(acquireRelease(options?.noFollow === true ? flatMap3(noFollowFlags(method, options.flag ?? "r"), (flags) => nodeOpen(path, flags, options.mode)) : nodeOpen(path, options?.flag ?? "r", options?.mode), (fd) => orDie(nodeClose(fd))), map7((fd) => makeFile(fd, options?.flag?.startsWith("a") ?? false)));
1932
1848
  };
1933
1849
  var open2 = /* @__PURE__ */ openFactory("open");
1934
1850
  var negativePosition = (method) => badArgument({
@@ -1989,7 +1905,7 @@ var makeFile = /* @__PURE__ */ (() => {
1989
1905
  });
1990
1906
  }
1991
1907
  const position = this.position;
1992
- return map8(nodeRead(this.fd, {
1908
+ return map7(nodeRead(this.fd, {
1993
1909
  buffer,
1994
1910
  position
1995
1911
  }), (bytesRead) => {
@@ -2010,7 +1926,7 @@ var makeFile = /* @__PURE__ */ (() => {
2010
1926
  }
2011
1927
  const buffer = Buffer.allocUnsafeSlow(size);
2012
1928
  const position = explicit ?? this.position;
2013
- return map8(nodeReadAlloc(this.fd, {
1929
+ return map7(nodeReadAlloc(this.fd, {
2014
1930
  buffer,
2015
1931
  position
2016
1932
  }), (bytesRead) => {
@@ -2033,7 +1949,7 @@ var makeFile = /* @__PURE__ */ (() => {
2033
1949
  });
2034
1950
  }
2035
1951
  truncate(length) {
2036
- return map8(nodeTruncate(this.fd, length || undefined), () => {
1952
+ return map7(nodeTruncate(this.fd, length || undefined), () => {
2037
1953
  if (!this.append) {
2038
1954
  const len = BigInt(length ?? 0);
2039
1955
  if (this.position > len) {
@@ -2045,7 +1961,7 @@ var makeFile = /* @__PURE__ */ (() => {
2045
1961
  write(buffer) {
2046
1962
  return suspend3(() => {
2047
1963
  const position = this.position;
2048
- return flatMap3(this.append ? succeed6(undefined) : positionToNumber(position, "write"), (nodePosition) => map8(nodeWrite(this.fd, buffer, undefined, undefined, nodePosition), (bytesWritten) => {
1964
+ return flatMap3(this.append ? succeed6(undefined) : positionToNumber(position, "write"), (nodePosition) => map7(nodeWrite(this.fd, buffer, undefined, undefined, nodePosition), (bytesWritten) => {
2049
1965
  if (!this.append) {
2050
1966
  this.position = position + BigInt(bytesWritten);
2051
1967
  }
@@ -2107,7 +2023,7 @@ var readDirectoryEntries = (path) => tryPromise({
2107
2023
  withFileTypes: true
2108
2024
  }),
2109
2025
  catch: (err) => handleErrnoException("FileSystem", "readDirectoryEntries")(err, [path])
2110
- }).pipe(map8((entries) => entries.map((entry) => ({
2026
+ }).pipe(map7((entries) => entries.map((entry) => ({
2111
2027
  name: entry.name,
2112
2028
  type: fileType(entry)
2113
2029
  }))));
@@ -2222,7 +2138,7 @@ var watchNode = (path, info, options) => callback((queue) => acquireRelease(sync
2222
2138
  });
2223
2139
  return watcher;
2224
2140
  }), (watcher) => sync2(() => watcher.close())).pipe(tap2(() => sync2(() => options?.onReady?.()))));
2225
- var watch2 = (backend, path, options) => all3([stat2(path), serviceOption(WatchBackend)]).pipe(map8(([stat, callerBackend]) => orElse(callerBackend, () => backend).pipe(flatMap((_) => _.register(path, stat, options)), getOrElse(() => watchNode(path, stat, options)))), unwrap);
2141
+ var watch2 = (backend, path, options) => all3([stat2(path), serviceOption(WatchBackend)]).pipe(map7(([stat, callerBackend]) => orElse(callerBackend, () => backend).pipe(flatMap((_) => _.register(path, stat, options)), getOrElse(() => watchNode(path, stat, options)))), unwrap);
2226
2142
  var writeFile2 = (path, data, options) => callback3((resume, signal) => {
2227
2143
  try {
2228
2144
  NFS.writeFile(path, data, {
@@ -2240,7 +2156,7 @@ var writeFile2 = (path, data, options) => callback3((resume, signal) => {
2240
2156
  resume(fail7(handleBadArgument("writeFile")(err)));
2241
2157
  }
2242
2158
  });
2243
- var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make12({
2159
+ var makeFileSystem = /* @__PURE__ */ map7(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make11({
2244
2160
  access: access2,
2245
2161
  chmod: chmod2,
2246
2162
  chown: chown2,
@@ -2300,15 +2216,15 @@ var fileUrlOps = (windows) => ({
2300
2216
  })
2301
2217
  })
2302
2218
  });
2303
- var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2219
+ var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2304
2220
  ...NodePath.posix,
2305
2221
  .../* @__PURE__ */ fileUrlOps(false)
2306
2222
  }));
2307
- var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2223
+ var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2308
2224
  ...NodePath.win32,
2309
2225
  .../* @__PURE__ */ fileUrlOps(true)
2310
2226
  }));
2311
- var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2227
+ var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2312
2228
  ...NodePath,
2313
2229
  .../* @__PURE__ */ fileUrlOps(undefined)
2314
2230
  }));
@@ -2567,7 +2483,7 @@ var layerWebCrypto = /* @__PURE__ */ effect(SecureRandom, /* @__PURE__ */ WebCry
2567
2483
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Cookies.js
2568
2484
  var TypeId4 = "~effect/http/Cookies";
2569
2485
  var CookieTypeId = "~effect/http/Cookies/Cookie";
2570
- var Proto2 = {
2486
+ var Proto = {
2571
2487
  [TypeId4]: TypeId4,
2572
2488
  ...BaseProto,
2573
2489
  toJSON() {
@@ -2581,7 +2497,7 @@ var Proto2 = {
2581
2497
  }
2582
2498
  };
2583
2499
  var fromReadonlyRecord = (cookies) => {
2584
- const self = Object.create(Proto2);
2500
+ const self = Object.create(Proto);
2585
2501
  self.cookies = cookies;
2586
2502
  return self;
2587
2503
  };
@@ -2748,13 +2664,13 @@ var tryDecodeURIComponent = (str) => {
2748
2664
 
2749
2665
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Headers.js
2750
2666
  var TypeId5 = /* @__PURE__ */ Symbol.for("~effect/http/Headers");
2751
- var Proto3 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
2667
+ var Proto2 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
2752
2668
  [TypeId5]: {
2753
2669
  value: TypeId5
2754
2670
  },
2755
2671
  [symbolRedactable]: {
2756
2672
  value(context) {
2757
- return redact2(this, get4(context, CurrentRedactedNames));
2673
+ return redact2(this, get3(context, CurrentRedactedNames));
2758
2674
  }
2759
2675
  },
2760
2676
  toJSON: {
@@ -2764,7 +2680,7 @@ var Proto3 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
2764
2680
  },
2765
2681
  [symbol2]: {
2766
2682
  value(that) {
2767
- return Equivalence2(this, that);
2683
+ return Equivalence(this, that);
2768
2684
  }
2769
2685
  },
2770
2686
  [symbol]: {
@@ -2779,20 +2695,20 @@ var Proto3 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
2779
2695
  value: BaseProto[NodeInspectSymbol]
2780
2696
  }
2781
2697
  });
2782
- var make22 = (input) => Object.assign(Object.create(Proto3), input);
2783
- var Equivalence2 = /* @__PURE__ */ makeEquivalence(/* @__PURE__ */ strictEqual());
2784
- var empty = /* @__PURE__ */ Object.create(Proto3);
2698
+ var make22 = (input) => Object.assign(Object.create(Proto2), input);
2699
+ var Equivalence = /* @__PURE__ */ makeEquivalence(/* @__PURE__ */ strictEqual());
2700
+ var empty = /* @__PURE__ */ Object.create(Proto2);
2785
2701
  var fromInput = (input) => {
2786
2702
  if (input === undefined) {
2787
2703
  return empty;
2788
2704
  } else if (Symbol.iterator in input) {
2789
- const out = Object.create(Proto3);
2705
+ const out = Object.create(Proto2);
2790
2706
  for (const [k, v] of input) {
2791
2707
  out[k.toLowerCase()] = v;
2792
2708
  }
2793
2709
  return out;
2794
2710
  }
2795
- const out = Object.create(Proto3);
2711
+ const out = Object.create(Proto2);
2796
2712
  for (const [k, v] of Object.entries(input)) {
2797
2713
  if (Array.isArray(v)) {
2798
2714
  out[k.toLowerCase()] = v.join(", ");
@@ -2802,7 +2718,7 @@ var fromInput = (input) => {
2802
2718
  }
2803
2719
  return out;
2804
2720
  };
2805
- var fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto3);
2721
+ var fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto2);
2806
2722
  var set = /* @__PURE__ */ dual(3, (self, key, value) => {
2807
2723
  const out = make22(self);
2808
2724
  out[key.toLowerCase()] = value;
@@ -2877,7 +2793,7 @@ var fromBody = (bytes) => new URLSearchParams(bodyDecoder.decode(bytes).replace(
2877
2793
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/UrlParams.js
2878
2794
  var TypeId6 = "~effect/http/UrlParams";
2879
2795
  var isUrlParams = (u) => hasProperty(u, TypeId6);
2880
- var Proto4 = {
2796
+ var Proto3 = {
2881
2797
  ...PipeInspectableProto,
2882
2798
  [TypeId6]: TypeId6,
2883
2799
  [Symbol.iterator]() {
@@ -2886,21 +2802,21 @@ var Proto4 = {
2886
2802
  [symbolRedactable](context) {
2887
2803
  return {
2888
2804
  _id: "UrlParams",
2889
- params: Object.fromEntries(redact3(this, get4(context, CurrentRedactedNames2)))
2805
+ params: Object.fromEntries(redact3(this, get3(context, CurrentRedactedNames2)))
2890
2806
  };
2891
2807
  },
2892
2808
  toJSON() {
2893
2809
  return redact(this);
2894
2810
  },
2895
2811
  [symbol2](that) {
2896
- return Equivalence3(this, that);
2812
+ return Equivalence2(this, that);
2897
2813
  },
2898
2814
  [symbol]() {
2899
2815
  return array(this.params.flat());
2900
2816
  }
2901
2817
  };
2902
2818
  var make23 = (params) => {
2903
- const self = Object.create(Proto4);
2819
+ const self = Object.create(Proto3);
2904
2820
  self.params = params;
2905
2821
  return self;
2906
2822
  };
@@ -2942,7 +2858,7 @@ var fromInputNested = (input) => {
2942
2858
  return out;
2943
2859
  };
2944
2860
  var coerce = (value) => isRedacted(value) ? value : String(value);
2945
- var Equivalence3 = /* @__PURE__ */ make14((a, b) => arrayEquivalence(a.params, b.params));
2861
+ var Equivalence2 = /* @__PURE__ */ make13((a, b) => arrayEquivalence(a.params, b.params));
2946
2862
  var arrayEquivalence = /* @__PURE__ */ makeEquivalence2(/* @__PURE__ */ makeEquivalence3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
2947
2863
  var empty4 = /* @__PURE__ */ make23([]);
2948
2864
  var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
@@ -3012,7 +2928,7 @@ var decodeQueryKey = (key) => {
3012
2928
  return key;
3013
2929
  }
3014
2930
  };
3015
- var currentRedactedNames = () => get4(globalThis[currentFiberTypeId]?.context ?? empty3(), CurrentRedactedNames2);
2931
+ var currentRedactedNames = () => get3(globalThis[currentFiberTypeId]?.context ?? empty3(), CurrentRedactedNames2);
3016
2932
  var CurrentRedactedNames2 = /* @__PURE__ */ Reference("effect/http/UrlParams/CurrentRedactedNames", {
3017
2933
  defaultValue: () => ["X-Amz-Signature", "X-Amz-Credential", "X-Amz-Security-Token", "AWSAccessKeyId", "Signature", "sig", "X-Goog-Signature"]
3018
2934
  });
@@ -3048,7 +2964,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3048
2964
  };
3049
2965
  stdin.once("end", onStdinEnd);
3050
2966
  yield* addFinalizer2(() => sync2(() => stdin.off("end", onStdinEnd)));
3051
- const rlRef = yield* make10({
2967
+ const rlRef = yield* make18({
3052
2968
  acquire: acquireRelease(sync2(() => {
3053
2969
  const rl = readline.createInterface({
3054
2970
  input: stdin,
@@ -3087,7 +3003,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3087
3003
  if (stdin.isTTY)
3088
3004
  stdin.setRawMode(enabled);
3089
3005
  });
3090
- const rawModeRef = yield* make10({
3006
+ const rawModeRef = yield* make18({
3091
3007
  acquire: acquireRelease(setRawMode(true), () => setRawMode(false)),
3092
3008
  idleTimeToLive: "10 millis"
3093
3009
  });
@@ -3138,14 +3054,14 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3138
3054
  if (inputEnded) {
3139
3055
  handleEnd();
3140
3056
  } else {
3141
- yield* get3(rlRef);
3142
- yield* get3(rawModeRef);
3057
+ yield* get5(rlRef);
3058
+ yield* get5(rawModeRef);
3143
3059
  stdin.once("end", handleEnd);
3144
3060
  }
3145
3061
  return queue;
3146
3062
  });
3147
3063
  const readLine = suspend3(() => poll(lines).pipe(flatMap3(match({
3148
- onNone: () => scoped(andThen2(get3(rlRef), take(lines))),
3064
+ onNone: () => scoped(andThen2(get5(rlRef), take(lines))),
3149
3065
  onSome: succeed6
3150
3066
  })), mapError2(() => new QuitError({}))));
3151
3067
  const display = (prompt) => uninterruptible(callback3((resume) => {
@@ -3189,17 +3105,17 @@ var log = (...args) => consoleWith((console) => sync(() => {
3189
3105
 
3190
3106
  // packages/core/src/time.ts
3191
3107
  function toDate(input) {
3192
- return toDateUtc2(makeUnsafe(input));
3108
+ return toDateUtc(makeUnsafe6(input));
3193
3109
  }
3194
3110
  function parseDate(input) {
3195
- return getOrUndefined(map4(make18(input), toDateUtc2));
3111
+ return getOrUndefined(map4(make16(input), toDateUtc));
3196
3112
  }
3197
3113
  function toIso(input) {
3198
- return formatIso(makeUnsafe(input));
3114
+ return formatIso(makeUnsafe6(input));
3199
3115
  }
3200
- var currentDate = map8(now2, toDateUtc2);
3116
+ var currentDate = map7(now, toDateUtc);
3201
3117
  function wallClockMillis() {
3202
- return toEpochMillis2(nowUnsafe2());
3118
+ return toEpochMillis(nowUnsafe());
3203
3119
  }
3204
3120
 
3205
3121
  // packages/core/src/waiting-on.ts
@@ -6815,7 +6731,7 @@ var WorkUnitLease = Struct({
6815
6731
  leaseExpiresAt: Timestamp,
6816
6732
  lastHeartbeatAt: Timestamp
6817
6733
  });
6818
- var WorkUnitLeaseProjection = Struct(map9(WorkUnitLease.fields, optionalKey));
6734
+ var WorkUnitLeaseProjection = Struct(map8(WorkUnitLease.fields, optionalKey));
6819
6735
  var WorkUnitRepoBinding = Struct({
6820
6736
  id: Id,
6821
6737
  provider: RepoBindingProvider,
@@ -9649,7 +9565,7 @@ var TranscriptSearchResult = Struct({
9649
9565
  });
9650
9566
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpBody.js
9651
9567
  var TypeId8 = "~effect/http/HttpBody";
9652
- class Proto5 {
9568
+ class Proto4 {
9653
9569
  [TypeId8];
9654
9570
  constructor() {
9655
9571
  this[TypeId8] = TypeId8;
@@ -9664,7 +9580,7 @@ class Proto5 {
9664
9580
  }
9665
9581
  }
9666
9582
 
9667
- class Empty extends Proto5 {
9583
+ class Empty extends Proto4 {
9668
9584
  _tag = "Empty";
9669
9585
  toJSON() {
9670
9586
  return {
@@ -9675,7 +9591,7 @@ class Empty extends Proto5 {
9675
9591
  }
9676
9592
  var empty5 = /* @__PURE__ */ new Empty;
9677
9593
 
9678
- class Raw extends Proto5 {
9594
+ class Raw extends Proto4 {
9679
9595
  _tag = "Raw";
9680
9596
  body;
9681
9597
  contentType;
@@ -9698,7 +9614,7 @@ class Raw extends Proto5 {
9698
9614
  }
9699
9615
  var raw = (body, options) => new Raw(body, options?.contentType, options?.contentLength);
9700
9616
 
9701
- class Uint8Array2 extends Proto5 {
9617
+ class Uint8Array2 extends Proto4 {
9702
9618
  _tag = "Uint8Array";
9703
9619
  contentType;
9704
9620
  contentLength;
@@ -9925,7 +9841,7 @@ var baseUrl = () => {
9925
9841
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpClientRequest.js
9926
9842
  var TypeId10 = "~effect/http/HttpClientRequest";
9927
9843
  var isHttpClientRequest = (u) => hasProperty(u, TypeId10);
9928
- var Proto6 = {
9844
+ var Proto5 = {
9929
9845
  [TypeId10]: TypeId10,
9930
9846
  ...BaseProto,
9931
9847
  toJSON() {
@@ -9944,7 +9860,7 @@ var Proto6 = {
9944
9860
  }
9945
9861
  };
9946
9862
  function makeWith(method, url, urlParams, hash, headers, body) {
9947
- const self = Object.create(Proto6);
9863
+ const self = Object.create(Proto5);
9948
9864
  self.method = method;
9949
9865
  self.url = url;
9950
9866
  self.urlParams = urlParams;
@@ -10131,7 +10047,7 @@ class WebHttpClientResponse extends Class {
10131
10047
  }
10132
10048
  textBody;
10133
10049
  get text() {
10134
- return this.textBody ??= map8(this.arrayBuffer, (_) => new TextDecoder().decode(_));
10050
+ return this.textBody ??= map7(this.arrayBuffer, (_) => new TextDecoder().decode(_));
10135
10051
  }
10136
10052
  get urlParamsBody() {
10137
10053
  return flatMap3(this.arrayBuffer, (bytes) => try_2({
@@ -10242,7 +10158,7 @@ var get2 = /* @__PURE__ */ accessor("get");
10242
10158
  var transform = /* @__PURE__ */ dual(2, (self, f) => makeWith2(flatMap3((request) => f(self.postprocess(succeed6(request)), request)), self.preprocess));
10243
10159
  var transformResponse = /* @__PURE__ */ dual(2, (self, f) => makeWith2((request) => f(self.postprocess(request)), self.preprocess));
10244
10160
  var makeWith2 = (postprocess, preprocess) => {
10245
- const self = Object.create(Proto7);
10161
+ const self = Object.create(Proto6);
10246
10162
  self.preprocess = preprocess;
10247
10163
  self.postprocess = postprocess;
10248
10164
  self.execute = function(request) {
@@ -10250,7 +10166,7 @@ var makeWith2 = (postprocess, preprocess) => {
10250
10166
  };
10251
10167
  return self;
10252
10168
  };
10253
- var Proto7 = {
10169
+ var Proto6 = {
10254
10170
  [TypeId13]: TypeId13,
10255
10171
  pipe() {
10256
10172
  return pipeArguments(this, arguments);
@@ -10282,7 +10198,7 @@ var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFibe
10282
10198
  if (tracerDisabled) {
10283
10199
  const effect = f(request, url, controller.signal, fiber);
10284
10200
  if (scopedController)
10285
- return map8(effect, (response) => trackResponse(response, controller, true));
10201
+ return map7(effect, (response) => trackResponse(response, controller, true));
10286
10202
  return uninterruptibleMask2((restore) => matchCauseEffect(restore(effect), {
10287
10203
  onSuccess(response) {
10288
10204
  return succeed6(trackResponse(response, controller, false));
@@ -10353,7 +10269,7 @@ var TracerPropagationEnabled = /* @__PURE__ */ Reference("effect/http/HttpClient
10353
10269
  var SpanNameGenerator = /* @__PURE__ */ Reference("effect/http/HttpClient/SpanNameGenerator", {
10354
10270
  defaultValue: () => (request) => request.method
10355
10271
  });
10356
- var layerMergedContext = (effect2) => effect(HttpClient)(contextWith((context) => map8(effect2, (client) => transformResponse(client, updateContext((input) => merge3(context, input))))));
10272
+ var layerMergedContext = (effect2) => effect(HttpClient)(contextWith((context) => map7(effect2, (client) => transformResponse(client, updateContext((input) => merge3(context, input))))));
10357
10273
  var responseRegistry = /* @__PURE__ */ (() => {
10358
10274
  if ("FinalizationRegistry" in globalThis && globalThis.FinalizationRegistry) {
10359
10275
  const registry = /* @__PURE__ */ new FinalizationRegistry((controller) => {
@@ -10518,7 +10434,7 @@ var fetch2 = /* @__PURE__ */ make27((request, url, signal, fiber) => {
10518
10434
  }
10519
10435
  let uploadController;
10520
10436
  const stopUpload = sync2(() => uploadController?.abort());
10521
- const send = (body) => map8(tryPromise({
10437
+ const send = (body) => map7(tryPromise({
10522
10438
  try: () => fetch2(url, {
10523
10439
  ...options,
10524
10440
  method: request.method,
@@ -10689,14 +10605,14 @@ var layerWebSocketConstructorGlobal = /* @__PURE__ */ succeed5(WebSocketConstruc
10689
10605
  }
10690
10606
  return new globalThis.WebSocket(url, options);
10691
10607
  });
10692
- var makeWebSocket = (url, options) => WebSocketConstructor.use((makeWs) => fromWebSocket(acquireRelease((typeof url === "string" ? succeed6(url) : url).pipe(map8((url) => makeWs(url, options?.headers === undefined ? options?.protocols : {
10608
+ var makeWebSocket = (url, options) => WebSocketConstructor.use((makeWs) => fromWebSocket(acquireRelease((typeof url === "string" ? succeed6(url) : url).pipe(map7((url) => makeWs(url, options?.headers === undefined ? options?.protocols : {
10693
10609
  protocols: options.protocols,
10694
10610
  headers: options.headers
10695
10611
  }))), (ws) => sync2(() => ws.close(1000))), options));
10696
10612
  var isPausable = (ws) => ("pause" in ws) && typeof ws.pause === "function";
10697
10613
  var fromWebSocket = (acquire, options) => withFiber2((fiber) => {
10698
10614
  let currentWS;
10699
- const latch = makeUnsafe2(false);
10615
+ const latch = makeUnsafe(false);
10700
10616
  const acquireContext = fiber.context;
10701
10617
  const reader = gen(function* () {
10702
10618
  const scope = yield* scope2;
@@ -11324,7 +11240,7 @@ var effectMetrics = new Map(MetricDefinitions.map((definition) => {
11324
11240
  var processTelemetryRegistry = new Map;
11325
11241
  var processMetricRegistry = new Map;
11326
11242
  var collectorTimeout = "10 seconds";
11327
- var collectorHttpClient = effect(HttpClient)(map8(HttpClient, (client) => transform(client, (response, request) => timeoutOrElse(response, {
11243
+ var collectorHttpClient = effect(HttpClient)(map7(HttpClient, (client) => transform(client, (response, request) => timeoutOrElse(response, {
11328
11244
  duration: collectorTimeout,
11329
11245
  orElse: () => fail7(new HttpClientError({
11330
11246
  reason: new TransportError({
@@ -13211,7 +13127,7 @@ class KitmanEffectClient {
13211
13127
  return tryPromise({
13212
13128
  try: () => this.fetchImpl(this.url(path), { ...init, headers, signal: abort.signal }),
13213
13129
  catch: failed
13214
- }).pipe(flatMap3((answer) => tryPromise({ try: () => answer.arrayBuffer(), catch: failed }).pipe(map8((body) => new Response(body.byteLength === 0 ? null : body, answer)))), onInterrupt(() => sync2(() => abort.abort())));
13130
+ }).pipe(flatMap3((answer) => tryPromise({ try: () => answer.arrayBuffer(), catch: failed }).pipe(map7((body) => new Response(body.byteLength === 0 ? null : body, answer)))), onInterrupt(() => sync2(() => abort.abort())));
13215
13131
  });
13216
13132
  const response = yield* method !== "GET" ? send.pipe(retry({ schedule: unansweredGetRetry, times: 5, while: refusedConnection })) : sendAndRead.pipe(timeoutOrElse({
13217
13133
  duration: getAnswerTimeout,
@@ -13273,8 +13189,8 @@ class KitmanEffectClient {
13273
13189
  function errorResponseDetails(response) {
13274
13190
  const contentType = response.headers.get("content-type") ?? "";
13275
13191
  if (contentType.includes("application/json"))
13276
- return tryPromise(() => response.json()).pipe(map8(parseErrorResponse), orElseSucceed(() => ({})));
13277
- return tryPromise(() => response.text()).pipe(map8((text) => {
13192
+ return tryPromise(() => response.json()).pipe(map7(parseErrorResponse), orElseSucceed(() => ({})));
13193
+ return tryPromise(() => response.text()).pipe(map7((text) => {
13278
13194
  const message = sanitizeErrorDetail(text);
13279
13195
  return message === undefined ? {} : { message };
13280
13196
  }), orElseSucceed(() => ({})));
@@ -13570,13 +13486,13 @@ function resolveConfig(input) {
13570
13486
  ...userAgentPreferences === undefined ? undefined : { userAgentPreferences }
13571
13487
  };
13572
13488
  }
13573
- var apiUrlFromEnv = String2("KITMAN_API_URL").pipe(option, map8(getOrUndefined));
13574
- var stepCredentialFromEnv = String2("KITMAN_STEP_CREDENTIAL").pipe(option, map8(getOrUndefined));
13575
- var stepWorkspaceFromEnv = String2("KITMAN_STEP_WORKSPACE").pipe(option, map8(getOrUndefined));
13576
- var stepSkillsDirFromEnv = String2("KITMAN_STEP_SKILLS_DIR").pipe(option, map8(getOrUndefined));
13577
- var stepFittingSkillsFromEnv = String2("KITMAN_STEP_FITTING_SKILLS").pipe(option, map8((names) => getOrElse(names, () => "").split(",").filter((name) => name !== "")));
13578
- var stepOutputOnlyFromEnv = String2("KITMAN_STEP_TOOLS").pipe(option, map8((tools) => getOrUndefined(tools) === "output"));
13579
- var mcpCredentialNameFromEnv = String2("KITMAN_MCP_CREDENTIAL_NAME").pipe(option, map8(getOrUndefined));
13489
+ var apiUrlFromEnv = String2("KITMAN_API_URL").pipe(option, map7(getOrUndefined));
13490
+ var stepCredentialFromEnv = String2("KITMAN_STEP_CREDENTIAL").pipe(option, map7(getOrUndefined));
13491
+ var stepWorkspaceFromEnv = String2("KITMAN_STEP_WORKSPACE").pipe(option, map7(getOrUndefined));
13492
+ var stepSkillsDirFromEnv = String2("KITMAN_STEP_SKILLS_DIR").pipe(option, map7(getOrUndefined));
13493
+ var stepFittingSkillsFromEnv = String2("KITMAN_STEP_FITTING_SKILLS").pipe(option, map7((names) => getOrElse(names, () => "").split(",").filter((name) => name !== "")));
13494
+ var stepOutputOnlyFromEnv = String2("KITMAN_STEP_TOOLS").pipe(option, map7((tools) => getOrUndefined(tools) === "output"));
13495
+ var mcpCredentialNameFromEnv = String2("KITMAN_MCP_CREDENTIAL_NAME").pipe(option, map7(getOrUndefined));
13580
13496
  var kitmanConfigDir = gen(function* () {
13581
13497
  const path = yield* Path;
13582
13498
  const xdgConfigHome = yield* String2("XDG_CONFIG_HOME").pipe(option);
@@ -13593,7 +13509,7 @@ var userAuthPath = configFile("auth.json");
13593
13509
  var userHarnessSyncPath = configFile("harness-sync.json");
13594
13510
  var kitSetupCacheDir = configFile("kit-setups");
13595
13511
  var bundleCacheDir = configFile("bundles");
13596
- var localConfigPath = Path.pipe(map8((path) => path.resolve(".kitman/config.json")));
13512
+ var localConfigPath = Path.pipe(map7((path) => path.resolve(".kitman/config.json")));
13597
13513
  function readUserConfig(path) {
13598
13514
  return gen(function* () {
13599
13515
  const filePath = path ?? (yield* userConfigPath);
@@ -13721,7 +13637,7 @@ function sessionForApi(auth, apiUrl) {
13721
13637
  return auth.sessions[normalizeApiUrl(apiUrl)];
13722
13638
  }
13723
13639
  function readAuthStore(path) {
13724
- return readUserAuth(path).pipe(map8((auth) => isAuthStore(auth) ? normalizeAuthStore(auth) : { sessions: {} }), catchTag("SchemaError", () => succeed6({ sessions: {} })));
13640
+ return readUserAuth(path).pipe(map7((auth) => isAuthStore(auth) ? normalizeAuthStore(auth) : { sessions: {} }), catchTag("SchemaError", () => succeed6({ sessions: {} })));
13725
13641
  }
13726
13642
  function writeAuthStore(auth, path) {
13727
13643
  return writeUserAuth(auth, path);
@@ -13869,7 +13785,7 @@ function Stream(success, error) {
13869
13785
 
13870
13786
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/rpc/Rpc.js
13871
13787
  var TypeId15 = "~effect/rpc/Rpc";
13872
- var Proto8 = {
13788
+ var Proto7 = {
13873
13789
  [TypeId15]: TypeId15,
13874
13790
  pipe() {
13875
13791
  return pipeArguments(this, arguments);
@@ -13954,7 +13870,7 @@ var Proto8 = {
13954
13870
  };
13955
13871
  var makeProto = (options) => {
13956
13872
  function Rpc() {}
13957
- Object.setPrototypeOf(Rpc, Proto8);
13873
+ Object.setPrototypeOf(Rpc, Proto7);
13958
13874
  Object.assign(Rpc, options);
13959
13875
  Rpc.key = `effect/rpc/Rpc/${options._tag}`;
13960
13876
  return Rpc;
@@ -14080,7 +13996,7 @@ var RpcGroupProto = {
14080
13996
  }
14081
13997
  return makeProto2({
14082
13998
  requests,
14083
- annotations: makeUnsafe4(annotations)
13999
+ annotations: makeUnsafe3(annotations)
14084
14000
  });
14085
14001
  },
14086
14002
  omit(...tags) {
@@ -14116,7 +14032,7 @@ var RpcGroupProto = {
14116
14032
  context: services
14117
14033
  });
14118
14034
  });
14119
- return makeUnsafe4(contextMap);
14035
+ return makeUnsafe3(contextMap);
14120
14036
  });
14121
14037
  },
14122
14038
  prefix(prefix) {
@@ -14145,7 +14061,7 @@ var RpcGroupProto = {
14145
14061
  handler,
14146
14062
  context: services
14147
14063
  });
14148
- return makeUnsafe4(contextMap);
14064
+ return makeUnsafe3(contextMap);
14149
14065
  }));
14150
14066
  },
14151
14067
  accessHandler(service) {
@@ -14170,7 +14086,7 @@ var RpcGroupProto = {
14170
14086
  });
14171
14087
  },
14172
14088
  annotateRpcs(service, value) {
14173
- return this.annotateRpcsMerge(make15(service, value));
14089
+ return this.annotateRpcsMerge(make14(service, value));
14174
14090
  },
14175
14091
  annotateMerge(context) {
14176
14092
  return makeProto2({
@@ -14852,7 +14768,7 @@ var ProgramRpcs = RunnerJournalRpcs.merge(RunnerCapabilityRpcs, RunnerRunFileRpc
14852
14768
  var RunnerRpcs = RunnerReplicaRpcs.merge(RunnerJournalRpcs, RunnerCapabilityRpcs, RunnerRunFileRpcs);
14853
14769
 
14854
14770
  // apps/cli/src/oauth.ts
14855
- var Scope = "openid profile email offline_access kitman:cli";
14771
+ var Scope2 = "openid profile email offline_access kitman:cli";
14856
14772
  var CallbackPath = "/auth/callback";
14857
14773
 
14858
14774
  class OAuthCallbackTimeout extends TaggedError("OAuthCallbackTimeout") {
@@ -14871,7 +14787,7 @@ function buildAuthorizeUrl(input) {
14871
14787
  url.searchParams.set("response_type", "code");
14872
14788
  url.searchParams.set("client_id", input.clientId);
14873
14789
  url.searchParams.set("redirect_uri", input.redirectUri);
14874
- url.searchParams.set("scope", Scope);
14790
+ url.searchParams.set("scope", Scope2);
14875
14791
  url.searchParams.set("code_challenge", input.codeChallenge);
14876
14792
  url.searchParams.set("code_challenge_method", "S256");
14877
14793
  url.searchParams.set("state", input.state);
@@ -14931,7 +14847,7 @@ function toStoredSession(token, existingRefreshToken) {
14931
14847
  }
14932
14848
  function startLoopbackServer(input) {
14933
14849
  return gen(function* () {
14934
- const code = yield* make16();
14850
+ const code = yield* make15();
14935
14851
  const context2 = yield* context();
14936
14852
  const runSyncExit = runSyncExitWith(context2);
14937
14853
  const server = yield* acquireRelease(sync2(() => Bun.serve({
@@ -15040,7 +14956,7 @@ function createSdkClient(input) {
15040
14956
  const runPromise = runPromiseWith(yield* context());
15041
14957
  const fetchImpl = input.fetch ?? (yield* Fetch);
15042
14958
  let session = input.session;
15043
- const refreshPermit = makeUnsafe3(1);
14959
+ const refreshPermit = makeUnsafe2(1);
15044
14960
  const refreshFrom = (stale) => refreshPermit.withPermits(1)(suspend3(() => session === stale ? tap2(refreshSession({ ...input, fetch: fetchImpl, session: stale }), (next) => sync2(() => session = next)) : succeed6(session))).pipe(mapError2((error) => new KitmanClientError({ operation: "refreshSession", message: error.message, status: 401 })));
15045
14961
  const authorizedFetch = (resource, init) => runPromise(gen(function* () {
15046
14962
  if (session.refreshToken && shouldRefresh(yield* currentDate, session.expiresAt))
@@ -15060,7 +14976,7 @@ function createSdkClient(input) {
15060
14976
  });
15061
14977
  }
15062
14978
  function refreshSession(input) {
15063
- const storedSession = readAuthStore(input.authPath).pipe(map8((auth) => sessionForApi(auth, input.apiUrl)));
14979
+ const storedSession = readAuthStore(input.authPath).pipe(map7((auth) => sessionForApi(auth, input.apiUrl)));
15064
14980
  return withAuthLock(input.authPath, gen(function* () {
15065
14981
  const stored = yield* storedSession;
15066
14982
  if (!stored)
@@ -15075,7 +14991,7 @@ function refreshSession(input) {
15075
14991
  clientId: input.clientId ?? ClientId,
15076
14992
  refreshToken: spentToken,
15077
14993
  ...input.fetch ? { fetch: input.fetch } : undefined
15078
- }).pipe(map8((token) => toStoredSession(token, spentToken)));
14994
+ }).pipe(map7((token) => toStoredSession(token, spentToken)));
15079
14995
  const session = yield* refreshing.pipe(catch_((error) => storedSession.pipe(filterOrFail((current) => current !== undefined && current.refreshToken !== spentToken, () => error))));
15080
14996
  const current = yield* storedSession;
15081
14997
  if (current?.refreshToken !== spentToken)
@@ -15471,7 +15387,7 @@ var openConnection = (transport) => gen(function* () {
15471
15387
  let lastId = 0;
15472
15388
  let lost = false;
15473
15389
  const notifications = yield* unbounded2();
15474
- const ended = yield* make16();
15390
+ const ended = yield* make15();
15475
15391
  const settle = (line) => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Response2)), {
15476
15392
  onNone: () => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Notification)), {
15477
15393
  onNone: () => void_3,
@@ -15498,7 +15414,7 @@ var openConnection = (transport) => gen(function* () {
15498
15414
  if (lost)
15499
15415
  return yield* new HerdrCoreConnectionLost2({ method });
15500
15416
  const id = ++lastId;
15501
- const deferred = yield* make16();
15417
+ const deferred = yield* make15();
15502
15418
  pending.set(id, { method, deferred });
15503
15419
  yield* pipe.write(encodeJsonStringSync({ jsonrpc: "2.0", id, method, params }));
15504
15420
  return yield* _await(deferred);
@@ -15530,9 +15446,9 @@ var herdrCoreOver = (transport) => ({
15530
15446
  ...input.name === undefined ? undefined : { name: input.name },
15531
15447
  no_parent: input.noParent === true
15532
15448
  }),
15533
- list: (filter = {}) => request("terminal.list", Listed, { labels: filter.labels ?? {}, all: filter.all === true }).pipe(map8((listed) => listed.terminals)),
15449
+ list: (filter = {}) => request("terminal.list", Listed, { labels: filter.labels ?? {}, all: filter.all === true }).pipe(map7((listed) => listed.terminals)),
15534
15450
  get: (terminal) => request("terminal.get", Terminal2, { terminal }),
15535
- read: (terminal) => request("terminal.read", Screen, { terminal }).pipe(map8((screen) => screen.text)),
15451
+ read: (terminal) => request("terminal.read", Screen, { terminal }).pipe(map7((screen) => screen.text)),
15536
15452
  interrupt: (terminal, options = {}) => request("terminal.interrupt", Interrupted, {
15537
15453
  terminal,
15538
15454
  ...options.timeoutSeconds === undefined ? undefined : { timeout: options.timeoutSeconds }
@@ -15572,7 +15488,7 @@ var herdrCoreOver = (transport) => ({
15572
15488
  return { type: "event", terminal: event.value.terminal, kind: event.value.type, data: event.value.data };
15573
15489
  };
15574
15490
  const snapshot = { type: "snapshot", terminals: subscribed.terminals };
15575
- return concat(make11(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
15491
+ return concat(make10(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
15576
15492
  }))
15577
15493
  });
15578
15494
  var spawnedTransport = (env) => gen(function* () {
@@ -15595,7 +15511,7 @@ var coreEnv = (options) => {
15595
15511
  const env = Object.fromEntries(Object.entries(options.env ?? process.env).filter((entry) => entry[0] !== "HC_SESSION" && entry[1] !== undefined));
15596
15512
  return options.session === undefined ? env : { ...env, HC_SESSION: options.session };
15597
15513
  };
15598
- var herdrCoreLayer2 = (options) => effect(HerdrCore2, map8(ChildProcessSpawner, (spawner) => herdrCoreOver(spawnedTransport(coreEnv(options)).pipe(provideService(ChildProcessSpawner, spawner)))));
15514
+ var herdrCoreLayer2 = (options) => effect(HerdrCore2, map7(ChildProcessSpawner, (spawner) => herdrCoreOver(spawnedTransport(coreEnv(options)).pipe(provideService(ChildProcessSpawner, spawner)))));
15599
15515
  var herdrCoreTransportLayer2 = (transport) => succeed5(HerdrCore2, herdrCoreOver(transport));
15600
15516
  var UpdateRefused = Struct({
15601
15517
  error: Struct({ message: String4, hint: optionalKey(String4) })
@@ -15618,13 +15534,13 @@ var updateHerdrCore2 = (options) => gen(function* () {
15618
15534
  ], { concurrency: 3 });
15619
15535
  return { stdout, stderr, exitCode };
15620
15536
  }).pipe(scoped, catchReason("PlatformError", "NotFound", () => fail7(new HerdrCoreMissing2)));
15621
- const reason = yield* run(["update", "--json"]).pipe(map8(({ stdout, stderr, exitCode }) => exitCode === 0 ? undefined : refusalReason(stdout) ?? (stderr.trim() || `it exited with code ${exitCode}`)), catchTag("PlatformError", (error) => succeed6(error.message)), timeoutOrElse({
15537
+ const reason = yield* run(["update", "--json"]).pipe(map7(({ stdout, stderr, exitCode }) => exitCode === 0 ? undefined : refusalReason(stdout) ?? (stderr.trim() || `it exited with code ${exitCode}`)), catchTag("PlatformError", (error) => succeed6(error.message)), timeoutOrElse({
15622
15538
  duration: options.timeout,
15623
15539
  orElse: () => succeed6(`it did not finish within ${options.timeout}`)
15624
15540
  }));
15625
15541
  if (reason === undefined)
15626
15542
  return;
15627
- const version = yield* run(["--version"]).pipe(map8(({ stdout }) => stdout.trim() || "an unknown version"), timeout("10 seconds"), orElseSucceed(() => "an unknown version"));
15543
+ const version = yield* run(["--version"]).pipe(map7(({ stdout }) => stdout.trim() || "an unknown version"), timeout("10 seconds"), orElseSucceed(() => "an unknown version"));
15628
15544
  return yield* new HerdrCoreUpdateFailed2({ version, reason: reason.slice(0, 400) });
15629
15545
  });
15630
15546
 
@@ -15663,7 +15579,7 @@ var runProcess2 = (argv, options) => gen(function* () {
15663
15579
  const spawner = yield* ChildProcessSpawner;
15664
15580
  const [command, ...args] = argv;
15665
15581
  const handle = yield* spawner.spawn(make3(command, args, {
15666
- stdin: options.stdin === undefined ? "ignore" : make11(new TextEncoder().encode(options.stdin)),
15582
+ stdin: options.stdin === undefined ? "ignore" : make10(new TextEncoder().encode(options.stdin)),
15667
15583
  ...options.cwd === undefined ? undefined : { cwd: options.cwd },
15668
15584
  env: options.extendEnv === false ? { ...options.env } : { ...withoutPreloads2(), ...options.env }
15669
15585
  }));
@@ -15709,7 +15625,7 @@ var detectHarnesses2 = gen(function* () {
15709
15625
  const home = (yield* optionalEnv("HOME")) ?? "/";
15710
15626
  const searchPath = ((yield* optionalEnv("PATH")) ?? "").split(":").filter(Boolean);
15711
15627
  const exists = (file) => fs.exists(file).pipe(orElseSucceed(() => false));
15712
- const any = (items, test) => map8(findFirst(items, test), isSome);
15628
+ const any = (items, test) => map7(findFirst(items, test), isSome);
15713
15629
  const loginFound = (login) => gen(function* () {
15714
15630
  const file = path.join(home, login.path);
15715
15631
  if (!(yield* exists(file)))
@@ -15725,7 +15641,7 @@ var detectHarnesses2 = gen(function* () {
15725
15641
  unavailable.push({ harness: harness.id, missing: [`\`${harness.id}\` is not installed`] });
15726
15642
  continue;
15727
15643
  }
15728
- const loggedIn = (yield* any(harness.keys, (key) => map8(optionalEnv(key), Boolean))) || (yield* any(harness.logins, loginFound));
15644
+ const loggedIn = (yield* any(harness.keys, (key) => map7(optionalEnv(key), Boolean))) || (yield* any(harness.logins, loginFound));
15729
15645
  if (loggedIn)
15730
15646
  harnesses.push(harness.id);
15731
15647
  else
@@ -16095,4 +16011,4 @@ function checkServices(declaration) {
16095
16011
  return isSome(decoded) ? [...new Set(decoded.value.services)] : undefined;
16096
16012
  }
16097
16013
 
16098
- export { Clock, currentTimeMillis, WebCrypto, SecureRandom, layerWebCrypto, makeUnsafe, formatIso, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, SafeJson, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, tokensSpent, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, isTestReportName, checkTests, ProgramWorkUnit, MeasureSample, MeasureEvidence, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, repositoryKey, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make5, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, KitName, KitDigest, defaultKitName, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make6, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make7, Service, RunnerHeaders, RunnerRpcProtocolVersion, RunnerRpcError, RunSettled, UpdateAvailable, RunnerReplicaRpcs, RunnerRunFileRpcs, ProgramRpcs, parseCallbackUrl, revokeToken, toStoredSession, browserLogin, openBrowser, shouldRefresh, createSdkClient, refreshSession, AgentAuthClientError, executeAgentCapability, createAgentAuthBearerToken, McpPlatformLive, runMcpEffect, createAgentAuthSignedFetch, setupMcpAgentCredential, generateAgentKeyPair, HERDR_CORE_GENERATION2, HERDR_CORE_INSTALL_COMMAND2, HerdrCoreMissing2, HerdrCoreIncompatible2, HerdrCoreConnectionLost2, HerdrCoreRpcError2, HerdrCoreUpdateFailed2, HerdrCore2, herdrCoreLayer2, herdrCoreTransportLayer2, updateHerdrCore2, CommandFailed2, runCommand2, withoutPreloads2, shellOutputTailChars2, runProcess2, CommandRunner2, runShell2, detectHarnesses2, kitHarnesses, isKitHarness, instructionsStart, instructionsEnd, harnessNames, renderMcpServer, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices };
16014
+ export { WebCrypto, SecureRandom, layerWebCrypto, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, SafeJson, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, tokensSpent, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, isTestReportName, checkTests, ProgramWorkUnit, MeasureSample, MeasureEvidence, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, repositoryKey, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make5, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, KitName, KitDigest, defaultKitName, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make6, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make7, Service, RunnerHeaders, RunnerRpcProtocolVersion, RunnerRpcError, RunSettled, UpdateAvailable, RunnerReplicaRpcs, RunnerRunFileRpcs, ProgramRpcs, parseCallbackUrl, revokeToken, toStoredSession, browserLogin, openBrowser, shouldRefresh, createSdkClient, refreshSession, AgentAuthClientError, executeAgentCapability, createAgentAuthBearerToken, McpPlatformLive, runMcpEffect, createAgentAuthSignedFetch, setupMcpAgentCredential, generateAgentKeyPair, HERDR_CORE_GENERATION2, HERDR_CORE_INSTALL_COMMAND2, HerdrCoreMissing2, HerdrCoreIncompatible2, HerdrCoreConnectionLost2, HerdrCoreRpcError2, HerdrCoreUpdateFailed2, HerdrCore2, herdrCoreLayer2, herdrCoreTransportLayer2, updateHerdrCore2, CommandFailed2, runCommand2, withoutPreloads2, shellOutputTailChars2, runProcess2, CommandRunner2, runShell2, detectHarnesses2, kitHarnesses, isKitHarness, instructionsStart, instructionsEnd, harnessNames, renderMcpServer, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices };