@kitman-sh/cli 0.12.6 → 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-s8m2tzdr.js → chunk-0tjg9eya.js} +1 -1
  2. package/dist/{chunk-vkchn89k.js → chunk-31gpnkq3.js} +5 -5
  3. package/dist/{chunk-n17dr5c1.js → chunk-3x6cbhzd.js} +4 -4
  4. package/dist/{chunk-892qrkb3.js → chunk-6d53ezj1.js} +62 -16
  5. package/dist/{chunk-dcnn882c.js → chunk-6w7ajkm8.js} +29 -29
  6. package/dist/{chunk-fen5480a.js → chunk-93ypzdpa.js} +7 -7
  7. package/dist/{chunk-jk5fp5cy.js → chunk-9qp59fht.js} +48 -48
  8. package/dist/{chunk-8djn7v2p.js → chunk-bh9k3kty.js} +59 -59
  9. package/dist/{chunk-x5t0c4g4.js → chunk-c8hwfktd.js} +7 -7
  10. package/dist/{chunk-y7vjk8vv.js → chunk-c8wpw9nh.js} +207 -222
  11. package/dist/{chunk-gezjwdpw.js → chunk-cr3qw0xf.js} +373 -448
  12. package/dist/{chunk-mm2m3bys.js → chunk-cw61zyh5.js} +1 -1
  13. package/dist/{chunk-bz4bp0q7.js → chunk-fh58za51.js} +3 -3
  14. package/dist/{chunk-7ncc3m3n.js → chunk-gyek54h3.js} +8 -8
  15. package/dist/{chunk-8sz25ptv.js → chunk-j1cnq2j0.js} +4 -4
  16. package/dist/{chunk-wberffvr.js → chunk-jwrs9pfa.js} +108 -108
  17. package/dist/{chunk-e711ebdj.js → chunk-kzwdhdej.js} +2 -2
  18. package/dist/{chunk-7tnm4jef.js → chunk-n9351czb.js} +7 -7
  19. package/dist/{chunk-k3ak93p1.js → chunk-pjpfc3sd.js} +1 -1
  20. package/dist/{chunk-x3cc7dfc.js → chunk-qjqa338f.js} +302 -249
  21. package/dist/{chunk-v4wn0tz8.js → chunk-s5pzy86v.js} +6 -6
  22. package/dist/{chunk-gtsq369x.js → chunk-tgwa9vqw.js} +9 -9
  23. package/dist/{chunk-23245qh7.js → chunk-wcvfkdwd.js} +26 -26
  24. package/dist/{chunk-rvpfyjtv.js → chunk-xng6j3a8.js} +1 -1
  25. package/dist/{chunk-skqn4h13.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,
@@ -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
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,14 +79,13 @@ 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,
87
+ isFailure2,
88
+ makeUnsafe4,
94
89
  make15,
95
90
  _await,
96
91
  fail5,
@@ -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,
@@ -193,15 +197,17 @@ import {
193
197
  clockWith,
194
198
  logError,
195
199
  effectify,
196
- toNumber,
197
- bytes,
198
200
  decode,
199
- isRedacted,
201
+ makeUnsafe6,
200
202
  make16,
201
- value,
203
+ now,
204
+ nowUnsafe,
205
+ toDateUtc,
206
+ toEpochMillis,
207
+ formatIso,
202
208
  defaultParseOptions,
203
209
  omit,
204
- map9,
210
+ map8,
205
211
  declare,
206
212
  decodeUnknownEffect2,
207
213
  decodeEffect,
@@ -266,16 +272,34 @@ import {
266
272
  decodeJsonStringOption,
267
273
  encodeJsonStringSync,
268
274
  encodePrettyJsonString
269
- } from "./chunk-x3cc7dfc.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";
270
289
  import {
271
290
  map,
272
291
  makeEquivalence,
292
+ bytes,
293
+ join,
294
+ interrupt,
295
+ getCurrent,
296
+ runIn,
273
297
  BadArgument,
274
298
  systemError,
275
299
  badArgument,
276
- makeUnsafe2,
277
- make7,
300
+ makeUnsafe,
278
301
  make8,
302
+ make9,
279
303
  sliding,
280
304
  unbounded2,
281
305
  offer,
@@ -285,14 +309,12 @@ import {
285
309
  endUnsafe,
286
310
  take,
287
311
  poll,
288
- makeUnsafe3,
312
+ makeUnsafe2,
289
313
  fromTransform,
290
314
  mapDone,
291
315
  isSink,
292
316
  fromChannel,
293
317
  drain,
294
- make9,
295
- get3,
296
318
  isStream,
297
319
  fromChannel2,
298
320
  callback,
@@ -332,264 +354,25 @@ import {
332
354
  String2,
333
355
  optionalEnv,
334
356
  harnessesUnsupportedInSrt2
335
- } from "./chunk-y7vjk8vv.js";
357
+ } from "./chunk-c8wpw9nh.js";
336
358
  import {
359
+ isRedacted,
360
+ make,
361
+ value,
337
362
  ExitCode,
338
363
  ProcessId,
339
364
  makeHandle,
340
- make,
365
+ make2,
341
366
  ChildProcessSpawner,
342
367
  display,
343
- make2,
368
+ make3,
344
369
  parseFdName,
345
370
  fdName
346
- } from "./chunk-892qrkb3.js";
347
- import {
348
- isDateTime,
349
- Numeric,
350
- isWholeNumber,
351
- guard,
352
- Id,
353
- Timestamp,
354
- ActorType,
355
- SecretName,
356
- SecretScope,
357
- SecretHosts,
358
- isSecretReference
359
- } from "./chunk-s8m2tzdr.js";
371
+ } from "./chunk-6d53ezj1.js";
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 make3 = /* @__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);
@@ -897,14 +680,156 @@ var runMain2 = /* @__PURE__ */ makeRunMain(({
897
680
  // node_modules/.bun/@effect+platform-bun@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-bun/dist/BunRuntime.js
898
681
  var runMain = runMain2;
899
682
 
900
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
901
- var makeUnsafe = makeUnsafe6;
902
- var make18 = make3;
903
- var now2 = now;
904
- var nowUnsafe2 = nowUnsafe;
905
- var toDateUtc2 = toDateUtc;
906
- var toEpochMillis2 = toEpochMillis;
907
- var formatIso = formatIso2;
683
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
684
+ var BigInt2 = globalThis.BigInt;
685
+ var toNumber = (b) => {
686
+ if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
687
+ return none();
688
+ }
689
+ return some(Number(b));
690
+ };
691
+
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
831
+ var make18 = make4;
832
+ var get5 = get4;
908
833
 
909
834
  // node_modules/.bun/@effect+platform-node-shared@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
910
835
  import * as NodeChildProcess from "child_process";
@@ -1020,8 +945,8 @@ var releaseWritable = (writable) => callback3((resume) => {
1020
945
  });
1021
946
  var pullIntoWritable = (options) => withFiber2((fiber) => {
1022
947
  const dispatcher = fiber.currentDispatcher;
1023
- const completion = makeUnsafe5();
1024
- const failure = makeUnsafe5();
948
+ const completion = makeUnsafe4();
949
+ const failure = makeUnsafe4();
1025
950
  const onError = (error) => doneUnsafe(failure, failSync(() => options.onError(error)));
1026
951
  let errorEmitted = false;
1027
952
  const onStreamError = (error) => {
@@ -1114,8 +1039,8 @@ var readableToPullUnsafe = (options) => {
1114
1039
  const readable = options.readable;
1115
1040
  const chunkSize = options.chunkSize ?? 4096;
1116
1041
  const closeOnDone = options.closeOnDone ?? true;
1117
- const exit = options.exit ?? make7(undefined);
1118
- const latch = options.latch ?? makeUnsafe2(false);
1042
+ const exit = options.exit ?? make8(undefined);
1043
+ const latch = options.latch ?? makeUnsafe(false);
1119
1044
  function onReadable() {
1120
1045
  latch.openUnsafe();
1121
1046
  }
@@ -1345,7 +1270,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1345
1270
  });
1346
1271
  }
1347
1272
  if (stream) {
1348
- return map8(runInputStream(stream, sink, inputFailure), () => {
1273
+ return map7(runInputStream(stream, sink, inputFailure), () => {
1349
1274
  inputSinks.set(fd, sink);
1350
1275
  });
1351
1276
  }
@@ -1451,7 +1376,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1451
1376
  };
1452
1377
  };
1453
1378
  const spawn2 = (command, spawnOptions) => callback3((resume) => {
1454
- const deferred = makeUnsafe5();
1379
+ const deferred = makeUnsafe4();
1455
1380
  const handle = NodeChildProcess.spawn(command.command, command.args.map(unwrap2), spawnOptions);
1456
1381
  handle.on("error", (error) => {
1457
1382
  if (command.args.some(isRedacted)) {
@@ -1627,7 +1552,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1627
1552
  }
1628
1553
  return reref;
1629
1554
  });
1630
- const inputFailure = makeUnsafe5();
1555
+ const inputFailure = makeUnsafe4();
1631
1556
  const stdin = yield* setupChildStdin(cmd, childProcess, stdinConfig, inputFailure);
1632
1557
  const {
1633
1558
  all,
@@ -1638,7 +1563,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1638
1563
  getInputFd,
1639
1564
  getOutputFd
1640
1565
  } = yield* setupAdditionalFds(cmd, childProcess, resolvedAdditionalFds, inputFailure);
1641
- const isRunning = map8(isDone(exitSignal), (done) => !done);
1566
+ const isRunning = map7(isDone(exitSignal), (done) => !done);
1642
1567
  const exitCode = flatMap3(raceFirst(_await(exitSignal), _await(inputFailure)), ([code, signal]) => {
1643
1568
  if (isDoneUnsafe(inputFailure)) {
1644
1569
  return _await(inputFailure);
@@ -1678,7 +1603,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1678
1603
  const sourceStream = unwrap(succeed6(getSourceStream(handles[handles.length - 1], options.from)));
1679
1604
  const toOption = options.to ?? "stdin";
1680
1605
  if (toOption === "stdin") {
1681
- handles.push(yield* spawnCommand(make2(command.command, command.args, {
1606
+ handles.push(yield* spawnCommand(make3(command.command, command.args, {
1682
1607
  ...command.options,
1683
1608
  stdin: {
1684
1609
  ...stdinConfig,
@@ -1698,7 +1623,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1698
1623
  type: "input",
1699
1624
  stream: sourceStream
1700
1625
  };
1701
- handles.push(yield* spawnCommand(make2(command.command, command.args, {
1626
+ handles.push(yield* spawnCommand(make3(command.command, command.args, {
1702
1627
  ...command.options,
1703
1628
  additionalFds: {
1704
1629
  ...existingFds,
@@ -1706,7 +1631,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1706
1631
  }
1707
1632
  })));
1708
1633
  } else {
1709
- handles.push(yield* spawnCommand(make2(command.command, command.args, {
1634
+ handles.push(yield* spawnCommand(make3(command.command, command.args, {
1710
1635
  ...command.options,
1711
1636
  stdin: {
1712
1637
  ...stdinConfig,
@@ -1745,7 +1670,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1745
1670
  }
1746
1671
  }
1747
1672
  });
1748
- return make(spawnCommand);
1673
+ return make2(spawnCommand);
1749
1674
  });
1750
1675
  var layer5 = /* @__PURE__ */ effect(ChildProcessSpawner, make19);
1751
1676
  var flattenCommand = (command) => {
@@ -1919,7 +1844,7 @@ var noFollowFlags = (method, flag) => suspend3(() => {
1919
1844
  var openFactory = (method) => {
1920
1845
  const nodeOpen = effectify(NFS.open, handleErrnoException("FileSystem", method), handleBadArgument(method));
1921
1846
  const nodeClose = effectify(NFS.close, handleErrnoException("FileSystem", method), handleBadArgument(method));
1922
- 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)));
1923
1848
  };
1924
1849
  var open2 = /* @__PURE__ */ openFactory("open");
1925
1850
  var negativePosition = (method) => badArgument({
@@ -1980,7 +1905,7 @@ var makeFile = /* @__PURE__ */ (() => {
1980
1905
  });
1981
1906
  }
1982
1907
  const position = this.position;
1983
- return map8(nodeRead(this.fd, {
1908
+ return map7(nodeRead(this.fd, {
1984
1909
  buffer,
1985
1910
  position
1986
1911
  }), (bytesRead) => {
@@ -2001,7 +1926,7 @@ var makeFile = /* @__PURE__ */ (() => {
2001
1926
  }
2002
1927
  const buffer = Buffer.allocUnsafeSlow(size);
2003
1928
  const position = explicit ?? this.position;
2004
- return map8(nodeReadAlloc(this.fd, {
1929
+ return map7(nodeReadAlloc(this.fd, {
2005
1930
  buffer,
2006
1931
  position
2007
1932
  }), (bytesRead) => {
@@ -2024,7 +1949,7 @@ var makeFile = /* @__PURE__ */ (() => {
2024
1949
  });
2025
1950
  }
2026
1951
  truncate(length) {
2027
- return map8(nodeTruncate(this.fd, length || undefined), () => {
1952
+ return map7(nodeTruncate(this.fd, length || undefined), () => {
2028
1953
  if (!this.append) {
2029
1954
  const len = BigInt(length ?? 0);
2030
1955
  if (this.position > len) {
@@ -2036,7 +1961,7 @@ var makeFile = /* @__PURE__ */ (() => {
2036
1961
  write(buffer) {
2037
1962
  return suspend3(() => {
2038
1963
  const position = this.position;
2039
- 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) => {
2040
1965
  if (!this.append) {
2041
1966
  this.position = position + BigInt(bytesWritten);
2042
1967
  }
@@ -2098,7 +2023,7 @@ var readDirectoryEntries = (path) => tryPromise({
2098
2023
  withFileTypes: true
2099
2024
  }),
2100
2025
  catch: (err) => handleErrnoException("FileSystem", "readDirectoryEntries")(err, [path])
2101
- }).pipe(map8((entries) => entries.map((entry) => ({
2026
+ }).pipe(map7((entries) => entries.map((entry) => ({
2102
2027
  name: entry.name,
2103
2028
  type: fileType(entry)
2104
2029
  }))));
@@ -2213,7 +2138,7 @@ var watchNode = (path, info, options) => callback((queue) => acquireRelease(sync
2213
2138
  });
2214
2139
  return watcher;
2215
2140
  }), (watcher) => sync2(() => watcher.close())).pipe(tap2(() => sync2(() => options?.onReady?.()))));
2216
- 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);
2217
2142
  var writeFile2 = (path, data, options) => callback3((resume, signal) => {
2218
2143
  try {
2219
2144
  NFS.writeFile(path, data, {
@@ -2231,7 +2156,7 @@ var writeFile2 = (path, data, options) => callback3((resume, signal) => {
2231
2156
  resume(fail7(handleBadArgument("writeFile")(err)));
2232
2157
  }
2233
2158
  });
2234
- var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make11({
2159
+ var makeFileSystem = /* @__PURE__ */ map7(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make11({
2235
2160
  access: access2,
2236
2161
  chmod: chmod2,
2237
2162
  chown: chown2,
@@ -2558,7 +2483,7 @@ var layerWebCrypto = /* @__PURE__ */ effect(SecureRandom, /* @__PURE__ */ WebCry
2558
2483
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Cookies.js
2559
2484
  var TypeId4 = "~effect/http/Cookies";
2560
2485
  var CookieTypeId = "~effect/http/Cookies/Cookie";
2561
- var Proto2 = {
2486
+ var Proto = {
2562
2487
  [TypeId4]: TypeId4,
2563
2488
  ...BaseProto,
2564
2489
  toJSON() {
@@ -2572,7 +2497,7 @@ var Proto2 = {
2572
2497
  }
2573
2498
  };
2574
2499
  var fromReadonlyRecord = (cookies) => {
2575
- const self = Object.create(Proto2);
2500
+ const self = Object.create(Proto);
2576
2501
  self.cookies = cookies;
2577
2502
  return self;
2578
2503
  };
@@ -2739,13 +2664,13 @@ var tryDecodeURIComponent = (str) => {
2739
2664
 
2740
2665
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Headers.js
2741
2666
  var TypeId5 = /* @__PURE__ */ Symbol.for("~effect/http/Headers");
2742
- var Proto3 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
2667
+ var Proto2 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
2743
2668
  [TypeId5]: {
2744
2669
  value: TypeId5
2745
2670
  },
2746
2671
  [symbolRedactable]: {
2747
2672
  value(context) {
2748
- return redact2(this, get4(context, CurrentRedactedNames));
2673
+ return redact2(this, get3(context, CurrentRedactedNames));
2749
2674
  }
2750
2675
  },
2751
2676
  toJSON: {
@@ -2755,7 +2680,7 @@ var Proto3 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
2755
2680
  },
2756
2681
  [symbol2]: {
2757
2682
  value(that) {
2758
- return Equivalence2(this, that);
2683
+ return Equivalence(this, that);
2759
2684
  }
2760
2685
  },
2761
2686
  [symbol]: {
@@ -2770,20 +2695,20 @@ var Proto3 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
2770
2695
  value: BaseProto[NodeInspectSymbol]
2771
2696
  }
2772
2697
  });
2773
- var make22 = (input) => Object.assign(Object.create(Proto3), input);
2774
- var Equivalence2 = /* @__PURE__ */ makeEquivalence(/* @__PURE__ */ strictEqual());
2775
- 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);
2776
2701
  var fromInput = (input) => {
2777
2702
  if (input === undefined) {
2778
2703
  return empty;
2779
2704
  } else if (Symbol.iterator in input) {
2780
- const out = Object.create(Proto3);
2705
+ const out = Object.create(Proto2);
2781
2706
  for (const [k, v] of input) {
2782
2707
  out[k.toLowerCase()] = v;
2783
2708
  }
2784
2709
  return out;
2785
2710
  }
2786
- const out = Object.create(Proto3);
2711
+ const out = Object.create(Proto2);
2787
2712
  for (const [k, v] of Object.entries(input)) {
2788
2713
  if (Array.isArray(v)) {
2789
2714
  out[k.toLowerCase()] = v.join(", ");
@@ -2793,7 +2718,7 @@ var fromInput = (input) => {
2793
2718
  }
2794
2719
  return out;
2795
2720
  };
2796
- var fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto3);
2721
+ var fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto2);
2797
2722
  var set = /* @__PURE__ */ dual(3, (self, key, value) => {
2798
2723
  const out = make22(self);
2799
2724
  out[key.toLowerCase()] = value;
@@ -2821,12 +2746,12 @@ var redact2 = /* @__PURE__ */ dual(2, (self, key) => {
2821
2746
  if (typeof key === "string") {
2822
2747
  const k = key.toLowerCase();
2823
2748
  if (k in self) {
2824
- out[k] = make16(self[k]);
2749
+ out[k] = make(self[k]);
2825
2750
  }
2826
2751
  } else {
2827
2752
  for (const name in self) {
2828
2753
  if (name.search(key) !== -1) {
2829
- out[name] = make16(self[name]);
2754
+ out[name] = make(self[name]);
2830
2755
  }
2831
2756
  }
2832
2757
  }
@@ -2868,7 +2793,7 @@ var fromBody = (bytes) => new URLSearchParams(bodyDecoder.decode(bytes).replace(
2868
2793
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/UrlParams.js
2869
2794
  var TypeId6 = "~effect/http/UrlParams";
2870
2795
  var isUrlParams = (u) => hasProperty(u, TypeId6);
2871
- var Proto4 = {
2796
+ var Proto3 = {
2872
2797
  ...PipeInspectableProto,
2873
2798
  [TypeId6]: TypeId6,
2874
2799
  [Symbol.iterator]() {
@@ -2877,21 +2802,21 @@ var Proto4 = {
2877
2802
  [symbolRedactable](context) {
2878
2803
  return {
2879
2804
  _id: "UrlParams",
2880
- params: Object.fromEntries(redact3(this, get4(context, CurrentRedactedNames2)))
2805
+ params: Object.fromEntries(redact3(this, get3(context, CurrentRedactedNames2)))
2881
2806
  };
2882
2807
  },
2883
2808
  toJSON() {
2884
2809
  return redact(this);
2885
2810
  },
2886
2811
  [symbol2](that) {
2887
- return Equivalence3(this, that);
2812
+ return Equivalence2(this, that);
2888
2813
  },
2889
2814
  [symbol]() {
2890
2815
  return array(this.params.flat());
2891
2816
  }
2892
2817
  };
2893
2818
  var make23 = (params) => {
2894
- const self = Object.create(Proto4);
2819
+ const self = Object.create(Proto3);
2895
2820
  self.params = params;
2896
2821
  return self;
2897
2822
  };
@@ -2933,7 +2858,7 @@ var fromInputNested = (input) => {
2933
2858
  return out;
2934
2859
  };
2935
2860
  var coerce = (value) => isRedacted(value) ? value : String(value);
2936
- var Equivalence3 = /* @__PURE__ */ make13((a, b) => arrayEquivalence(a.params, b.params));
2861
+ var Equivalence2 = /* @__PURE__ */ make13((a, b) => arrayEquivalence(a.params, b.params));
2937
2862
  var arrayEquivalence = /* @__PURE__ */ makeEquivalence2(/* @__PURE__ */ makeEquivalence3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
2938
2863
  var empty4 = /* @__PURE__ */ make23([]);
2939
2864
  var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
@@ -2952,7 +2877,7 @@ var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
2952
2877
  var toString = (input) => new URLSearchParams(fromInput2(input).params.map(([key, value]) => [key, unwrap3(value)])).toString();
2953
2878
  var redact3 = /* @__PURE__ */ dual(2, (self, key) => {
2954
2879
  const patterns = Array.isArray(key) ? key : [key];
2955
- return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ? make16(value) : value]);
2880
+ return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ? make(value) : value]);
2956
2881
  });
2957
2882
  var isRedactedName2 = isRedactedName;
2958
2883
  var redactUrl = (url, redactedNames = currentRedactedNames()) => {
@@ -3003,7 +2928,7 @@ var decodeQueryKey = (key) => {
3003
2928
  return key;
3004
2929
  }
3005
2930
  };
3006
- var currentRedactedNames = () => get4(globalThis[currentFiberTypeId]?.context ?? empty3(), CurrentRedactedNames2);
2931
+ var currentRedactedNames = () => get3(globalThis[currentFiberTypeId]?.context ?? empty3(), CurrentRedactedNames2);
3007
2932
  var CurrentRedactedNames2 = /* @__PURE__ */ Reference("effect/http/UrlParams/CurrentRedactedNames", {
3008
2933
  defaultValue: () => ["X-Amz-Signature", "X-Amz-Credential", "X-Amz-Security-Token", "AWSAccessKeyId", "Signature", "sig", "X-Goog-Signature"]
3009
2934
  });
@@ -3028,7 +2953,7 @@ import * as readline from "readline";
3028
2953
  var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
3029
2954
  const stdin = process.stdin;
3030
2955
  const stdout = process.stdout;
3031
- const lines = yield* make8();
2956
+ const lines = yield* make9();
3032
2957
  let inputEnded = stdin.readableEnded;
3033
2958
  let readlineActive = false;
3034
2959
  const onStdinEnd = () => {
@@ -3039,7 +2964,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3039
2964
  };
3040
2965
  stdin.once("end", onStdinEnd);
3041
2966
  yield* addFinalizer2(() => sync2(() => stdin.off("end", onStdinEnd)));
3042
- const rlRef = yield* make9({
2967
+ const rlRef = yield* make18({
3043
2968
  acquire: acquireRelease(sync2(() => {
3044
2969
  const rl = readline.createInterface({
3045
2970
  input: stdin,
@@ -3078,7 +3003,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3078
3003
  if (stdin.isTTY)
3079
3004
  stdin.setRawMode(enabled);
3080
3005
  });
3081
- const rawModeRef = yield* make9({
3006
+ const rawModeRef = yield* make18({
3082
3007
  acquire: acquireRelease(setRawMode(true), () => setRawMode(false)),
3083
3008
  idleTimeToLive: "10 millis"
3084
3009
  });
@@ -3099,7 +3024,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3099
3024
  return queue;
3100
3025
  });
3101
3026
  const readInput = gen(function* () {
3102
- const queue = yield* make8();
3027
+ const queue = yield* make9();
3103
3028
  const handleKeypress = (s, k) => {
3104
3029
  const userInput = {
3105
3030
  input: fromUndefinedOr(s),
@@ -3129,14 +3054,14 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3129
3054
  if (inputEnded) {
3130
3055
  handleEnd();
3131
3056
  } else {
3132
- yield* get3(rlRef);
3133
- yield* get3(rawModeRef);
3057
+ yield* get5(rlRef);
3058
+ yield* get5(rawModeRef);
3134
3059
  stdin.once("end", handleEnd);
3135
3060
  }
3136
3061
  return queue;
3137
3062
  });
3138
3063
  const readLine = suspend3(() => poll(lines).pipe(flatMap3(match({
3139
- onNone: () => scoped(andThen2(get3(rlRef), take(lines))),
3064
+ onNone: () => scoped(andThen2(get5(rlRef), take(lines))),
3140
3065
  onSome: succeed6
3141
3066
  })), mapError2(() => new QuitError({}))));
3142
3067
  const display = (prompt) => uninterruptible(callback3((resume) => {
@@ -3180,17 +3105,17 @@ var log = (...args) => consoleWith((console) => sync(() => {
3180
3105
 
3181
3106
  // packages/core/src/time.ts
3182
3107
  function toDate(input) {
3183
- return toDateUtc2(makeUnsafe(input));
3108
+ return toDateUtc(makeUnsafe6(input));
3184
3109
  }
3185
3110
  function parseDate(input) {
3186
- return getOrUndefined(map4(make18(input), toDateUtc2));
3111
+ return getOrUndefined(map4(make16(input), toDateUtc));
3187
3112
  }
3188
3113
  function toIso(input) {
3189
- return formatIso(makeUnsafe(input));
3114
+ return formatIso(makeUnsafe6(input));
3190
3115
  }
3191
- var currentDate = map8(now2, toDateUtc2);
3116
+ var currentDate = map7(now, toDateUtc);
3192
3117
  function wallClockMillis() {
3193
- return toEpochMillis2(nowUnsafe2());
3118
+ return toEpochMillis(nowUnsafe());
3194
3119
  }
3195
3120
 
3196
3121
  // packages/core/src/waiting-on.ts
@@ -6806,7 +6731,7 @@ var WorkUnitLease = Struct({
6806
6731
  leaseExpiresAt: Timestamp,
6807
6732
  lastHeartbeatAt: Timestamp
6808
6733
  });
6809
- var WorkUnitLeaseProjection = Struct(map9(WorkUnitLease.fields, optionalKey));
6734
+ var WorkUnitLeaseProjection = Struct(map8(WorkUnitLease.fields, optionalKey));
6810
6735
  var WorkUnitRepoBinding = Struct({
6811
6736
  id: Id,
6812
6737
  provider: RepoBindingProvider,
@@ -9640,7 +9565,7 @@ var TranscriptSearchResult = Struct({
9640
9565
  });
9641
9566
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpBody.js
9642
9567
  var TypeId8 = "~effect/http/HttpBody";
9643
- class Proto5 {
9568
+ class Proto4 {
9644
9569
  [TypeId8];
9645
9570
  constructor() {
9646
9571
  this[TypeId8] = TypeId8;
@@ -9655,7 +9580,7 @@ class Proto5 {
9655
9580
  }
9656
9581
  }
9657
9582
 
9658
- class Empty extends Proto5 {
9583
+ class Empty extends Proto4 {
9659
9584
  _tag = "Empty";
9660
9585
  toJSON() {
9661
9586
  return {
@@ -9666,7 +9591,7 @@ class Empty extends Proto5 {
9666
9591
  }
9667
9592
  var empty5 = /* @__PURE__ */ new Empty;
9668
9593
 
9669
- class Raw extends Proto5 {
9594
+ class Raw extends Proto4 {
9670
9595
  _tag = "Raw";
9671
9596
  body;
9672
9597
  contentType;
@@ -9689,7 +9614,7 @@ class Raw extends Proto5 {
9689
9614
  }
9690
9615
  var raw = (body, options) => new Raw(body, options?.contentType, options?.contentLength);
9691
9616
 
9692
- class Uint8Array2 extends Proto5 {
9617
+ class Uint8Array2 extends Proto4 {
9693
9618
  _tag = "Uint8Array";
9694
9619
  contentType;
9695
9620
  contentLength;
@@ -9916,7 +9841,7 @@ var baseUrl = () => {
9916
9841
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpClientRequest.js
9917
9842
  var TypeId10 = "~effect/http/HttpClientRequest";
9918
9843
  var isHttpClientRequest = (u) => hasProperty(u, TypeId10);
9919
- var Proto6 = {
9844
+ var Proto5 = {
9920
9845
  [TypeId10]: TypeId10,
9921
9846
  ...BaseProto,
9922
9847
  toJSON() {
@@ -9935,7 +9860,7 @@ var Proto6 = {
9935
9860
  }
9936
9861
  };
9937
9862
  function makeWith(method, url, urlParams, hash, headers, body) {
9938
- const self = Object.create(Proto6);
9863
+ const self = Object.create(Proto5);
9939
9864
  self.method = method;
9940
9865
  self.url = url;
9941
9866
  self.urlParams = urlParams;
@@ -9945,14 +9870,14 @@ function makeWith(method, url, urlParams, hash, headers, body) {
9945
9870
  return self;
9946
9871
  }
9947
9872
  var empty6 = /* @__PURE__ */ makeWith("GET", "", empty4, /* @__PURE__ */ none(), empty, empty5);
9948
- var make4 = (method) => (url, options) => modify(empty6, {
9873
+ var make5 = (method) => (url, options) => modify(empty6, {
9949
9874
  method,
9950
9875
  url,
9951
9876
  ...options ?? undefined
9952
9877
  });
9953
- var get = /* @__PURE__ */ make4("GET");
9954
- var post = /* @__PURE__ */ make4("POST");
9955
- var put = /* @__PURE__ */ make4("PUT");
9878
+ var get = /* @__PURE__ */ make5("GET");
9879
+ var post = /* @__PURE__ */ make5("POST");
9880
+ var put = /* @__PURE__ */ make5("PUT");
9956
9881
  var modify = /* @__PURE__ */ dual(2, (self, options) => {
9957
9882
  let result = self;
9958
9883
  if (options.method) {
@@ -10122,7 +10047,7 @@ class WebHttpClientResponse extends Class {
10122
10047
  }
10123
10048
  textBody;
10124
10049
  get text() {
10125
- return this.textBody ??= map8(this.arrayBuffer, (_) => new TextDecoder().decode(_));
10050
+ return this.textBody ??= map7(this.arrayBuffer, (_) => new TextDecoder().decode(_));
10126
10051
  }
10127
10052
  get urlParamsBody() {
10128
10053
  return flatMap3(this.arrayBuffer, (bytes) => try_2({
@@ -10233,7 +10158,7 @@ var get2 = /* @__PURE__ */ accessor("get");
10233
10158
  var transform = /* @__PURE__ */ dual(2, (self, f) => makeWith2(flatMap3((request) => f(self.postprocess(succeed6(request)), request)), self.preprocess));
10234
10159
  var transformResponse = /* @__PURE__ */ dual(2, (self, f) => makeWith2((request) => f(self.postprocess(request)), self.preprocess));
10235
10160
  var makeWith2 = (postprocess, preprocess) => {
10236
- const self = Object.create(Proto7);
10161
+ const self = Object.create(Proto6);
10237
10162
  self.preprocess = preprocess;
10238
10163
  self.postprocess = postprocess;
10239
10164
  self.execute = function(request) {
@@ -10241,7 +10166,7 @@ var makeWith2 = (postprocess, preprocess) => {
10241
10166
  };
10242
10167
  return self;
10243
10168
  };
10244
- var Proto7 = {
10169
+ var Proto6 = {
10245
10170
  [TypeId13]: TypeId13,
10246
10171
  pipe() {
10247
10172
  return pipeArguments(this, arguments);
@@ -10253,7 +10178,7 @@ var Proto7 = {
10253
10178
  };
10254
10179
  },
10255
10180
  .../* @__PURE__ */ Object.fromEntries(/* @__PURE__ */ allShort.map(([fullMethod, method]) => [method, function(url, options) {
10256
- return this.execute(make4(fullMethod)(url, options));
10181
+ return this.execute(make5(fullMethod)(url, options));
10257
10182
  }]))
10258
10183
  };
10259
10184
  var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFiber2((fiber) => {
@@ -10273,7 +10198,7 @@ var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFibe
10273
10198
  if (tracerDisabled) {
10274
10199
  const effect = f(request, url, controller.signal, fiber);
10275
10200
  if (scopedController)
10276
- return map8(effect, (response) => trackResponse(response, controller, true));
10201
+ return map7(effect, (response) => trackResponse(response, controller, true));
10277
10202
  return uninterruptibleMask2((restore) => matchCauseEffect(restore(effect), {
10278
10203
  onSuccess(response) {
10279
10204
  return succeed6(trackResponse(response, controller, false));
@@ -10344,7 +10269,7 @@ var TracerPropagationEnabled = /* @__PURE__ */ Reference("effect/http/HttpClient
10344
10269
  var SpanNameGenerator = /* @__PURE__ */ Reference("effect/http/HttpClient/SpanNameGenerator", {
10345
10270
  defaultValue: () => (request) => request.method
10346
10271
  });
10347
- 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))))));
10348
10273
  var responseRegistry = /* @__PURE__ */ (() => {
10349
10274
  if ("FinalizationRegistry" in globalThis && globalThis.FinalizationRegistry) {
10350
10275
  const registry = /* @__PURE__ */ new FinalizationRegistry((controller) => {
@@ -10509,7 +10434,7 @@ var fetch2 = /* @__PURE__ */ make27((request, url, signal, fiber) => {
10509
10434
  }
10510
10435
  let uploadController;
10511
10436
  const stopUpload = sync2(() => uploadController?.abort());
10512
- const send = (body) => map8(tryPromise({
10437
+ const send = (body) => map7(tryPromise({
10513
10438
  try: () => fetch2(url, {
10514
10439
  ...options,
10515
10440
  method: request.method,
@@ -10680,14 +10605,14 @@ var layerWebSocketConstructorGlobal = /* @__PURE__ */ succeed5(WebSocketConstruc
10680
10605
  }
10681
10606
  return new globalThis.WebSocket(url, options);
10682
10607
  });
10683
- 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 : {
10684
10609
  protocols: options.protocols,
10685
10610
  headers: options.headers
10686
10611
  }))), (ws) => sync2(() => ws.close(1000))), options));
10687
10612
  var isPausable = (ws) => ("pause" in ws) && typeof ws.pause === "function";
10688
10613
  var fromWebSocket = (acquire, options) => withFiber2((fiber) => {
10689
10614
  let currentWS;
10690
- const latch = makeUnsafe2(false);
10615
+ const latch = makeUnsafe(false);
10691
10616
  const acquireContext = fiber.context;
10692
10617
  const reader = gen(function* () {
10693
10618
  const scope = yield* scope2;
@@ -11315,7 +11240,7 @@ var effectMetrics = new Map(MetricDefinitions.map((definition) => {
11315
11240
  var processTelemetryRegistry = new Map;
11316
11241
  var processMetricRegistry = new Map;
11317
11242
  var collectorTimeout = "10 seconds";
11318
- 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, {
11319
11244
  duration: collectorTimeout,
11320
11245
  orElse: () => fail7(new HttpClientError({
11321
11246
  reason: new TransportError({
@@ -13202,7 +13127,7 @@ class KitmanEffectClient {
13202
13127
  return tryPromise({
13203
13128
  try: () => this.fetchImpl(this.url(path), { ...init, headers, signal: abort.signal }),
13204
13129
  catch: failed
13205
- }).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())));
13206
13131
  });
13207
13132
  const response = yield* method !== "GET" ? send.pipe(retry({ schedule: unansweredGetRetry, times: 5, while: refusedConnection })) : sendAndRead.pipe(timeoutOrElse({
13208
13133
  duration: getAnswerTimeout,
@@ -13264,8 +13189,8 @@ class KitmanEffectClient {
13264
13189
  function errorResponseDetails(response) {
13265
13190
  const contentType = response.headers.get("content-type") ?? "";
13266
13191
  if (contentType.includes("application/json"))
13267
- return tryPromise(() => response.json()).pipe(map8(parseErrorResponse), orElseSucceed(() => ({})));
13268
- return tryPromise(() => response.text()).pipe(map8((text) => {
13192
+ return tryPromise(() => response.json()).pipe(map7(parseErrorResponse), orElseSucceed(() => ({})));
13193
+ return tryPromise(() => response.text()).pipe(map7((text) => {
13269
13194
  const message = sanitizeErrorDetail(text);
13270
13195
  return message === undefined ? {} : { message };
13271
13196
  }), orElseSucceed(() => ({})));
@@ -13561,13 +13486,13 @@ function resolveConfig(input) {
13561
13486
  ...userAgentPreferences === undefined ? undefined : { userAgentPreferences }
13562
13487
  };
13563
13488
  }
13564
- var apiUrlFromEnv = String2("KITMAN_API_URL").pipe(option, map8(getOrUndefined));
13565
- var stepCredentialFromEnv = String2("KITMAN_STEP_CREDENTIAL").pipe(option, map8(getOrUndefined));
13566
- var stepWorkspaceFromEnv = String2("KITMAN_STEP_WORKSPACE").pipe(option, map8(getOrUndefined));
13567
- var stepSkillsDirFromEnv = String2("KITMAN_STEP_SKILLS_DIR").pipe(option, map8(getOrUndefined));
13568
- var stepFittingSkillsFromEnv = String2("KITMAN_STEP_FITTING_SKILLS").pipe(option, map8((names) => getOrElse(names, () => "").split(",").filter((name) => name !== "")));
13569
- var stepOutputOnlyFromEnv = String2("KITMAN_STEP_TOOLS").pipe(option, map8((tools) => getOrUndefined(tools) === "output"));
13570
- 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));
13571
13496
  var kitmanConfigDir = gen(function* () {
13572
13497
  const path = yield* Path;
13573
13498
  const xdgConfigHome = yield* String2("XDG_CONFIG_HOME").pipe(option);
@@ -13584,7 +13509,7 @@ var userAuthPath = configFile("auth.json");
13584
13509
  var userHarnessSyncPath = configFile("harness-sync.json");
13585
13510
  var kitSetupCacheDir = configFile("kit-setups");
13586
13511
  var bundleCacheDir = configFile("bundles");
13587
- var localConfigPath = Path.pipe(map8((path) => path.resolve(".kitman/config.json")));
13512
+ var localConfigPath = Path.pipe(map7((path) => path.resolve(".kitman/config.json")));
13588
13513
  function readUserConfig(path) {
13589
13514
  return gen(function* () {
13590
13515
  const filePath = path ?? (yield* userConfigPath);
@@ -13712,7 +13637,7 @@ function sessionForApi(auth, apiUrl) {
13712
13637
  return auth.sessions[normalizeApiUrl(apiUrl)];
13713
13638
  }
13714
13639
  function readAuthStore(path) {
13715
- 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: {} })));
13716
13641
  }
13717
13642
  function writeAuthStore(auth, path) {
13718
13643
  return writeUserAuth(auth, path);
@@ -13860,7 +13785,7 @@ function Stream(success, error) {
13860
13785
 
13861
13786
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/rpc/Rpc.js
13862
13787
  var TypeId15 = "~effect/rpc/Rpc";
13863
- var Proto8 = {
13788
+ var Proto7 = {
13864
13789
  [TypeId15]: TypeId15,
13865
13790
  pipe() {
13866
13791
  return pipeArguments(this, arguments);
@@ -13945,12 +13870,12 @@ var Proto8 = {
13945
13870
  };
13946
13871
  var makeProto = (options) => {
13947
13872
  function Rpc() {}
13948
- Object.setPrototypeOf(Rpc, Proto8);
13873
+ Object.setPrototypeOf(Rpc, Proto7);
13949
13874
  Object.assign(Rpc, options);
13950
13875
  Rpc.key = `effect/rpc/Rpc/${options._tag}`;
13951
13876
  return Rpc;
13952
13877
  };
13953
- var make5 = (tag, options) => {
13878
+ var make6 = (tag, options) => {
13954
13879
  const successSchema = options?.success ?? Void;
13955
13880
  const errorSchema = options?.error ?? Never;
13956
13881
  const defectSchema = options?.defect ?? Defect();
@@ -14071,7 +13996,7 @@ var RpcGroupProto = {
14071
13996
  }
14072
13997
  return makeProto2({
14073
13998
  requests,
14074
- annotations: makeUnsafe4(annotations)
13999
+ annotations: makeUnsafe3(annotations)
14075
14000
  });
14076
14001
  },
14077
14002
  omit(...tags) {
@@ -14107,7 +14032,7 @@ var RpcGroupProto = {
14107
14032
  context: services
14108
14033
  });
14109
14034
  });
14110
- return makeUnsafe4(contextMap);
14035
+ return makeUnsafe3(contextMap);
14111
14036
  });
14112
14037
  },
14113
14038
  prefix(prefix) {
@@ -14136,7 +14061,7 @@ var RpcGroupProto = {
14136
14061
  handler,
14137
14062
  context: services
14138
14063
  });
14139
- return makeUnsafe4(contextMap);
14064
+ return makeUnsafe3(contextMap);
14140
14065
  }));
14141
14066
  },
14142
14067
  accessHandler(service) {
@@ -14184,7 +14109,7 @@ var makeProto2 = (options) => Object.assign(function() {}, RpcGroupProto, {
14184
14109
  requests: options.requests,
14185
14110
  annotations: options.annotations
14186
14111
  });
14187
- var make6 = (...rpcs) => makeProto2({
14112
+ var make7 = (...rpcs) => makeProto2({
14188
14113
  requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
14189
14114
  annotations: empty3()
14190
14115
  });
@@ -14290,96 +14215,96 @@ var ProgramOutcome = Union([
14290
14215
  Struct({ status: Literal("failed"), failureSummary: String4 })
14291
14216
  ]);
14292
14217
 
14293
- class RunnerReplicaRpcs extends make6(make5("Claim", {
14218
+ class RunnerReplicaRpcs extends make7(make6("Claim", {
14294
14219
  payload: WorkUnitClaimInput,
14295
14220
  success: WorkUnitClaimResult,
14296
14221
  error: RunnerRpcError
14297
- }), make5("Heartbeat", {
14222
+ }), make6("Heartbeat", {
14298
14223
  payload: WorkUnitHeartbeatInput,
14299
14224
  success: WorkUnitHeartbeatResult,
14300
14225
  error: RunnerRpcError
14301
- }), make5("Complete", {
14226
+ }), make6("Complete", {
14302
14227
  payload: WorkUnitCompletion,
14303
14228
  error: RunnerRpcError
14304
- }), make5("Release", {
14229
+ }), make6("Release", {
14305
14230
  payload: WorkUnitReleaseInput,
14306
14231
  error: RunnerRpcError
14307
- }), make5("Signals", {
14232
+ }), make6("Signals", {
14308
14233
  payload: { runnerReplicaId: String4 },
14309
14234
  success: RunnerSignal,
14310
14235
  error: RunnerRpcError,
14311
14236
  stream: true
14312
- }), make5("ReportSteer", {
14237
+ }), make6("ReportSteer", {
14313
14238
  payload: { workUnitId: String4, messageId: String4, delivered: Boolean2 },
14314
14239
  success: Void,
14315
14240
  error: RunnerRpcError
14316
- }), make5("AppendTranscript", {
14241
+ }), make6("AppendTranscript", {
14317
14242
  payload: { workUnitId: String4, entries: ArraySchema(TranscriptAppendEntry).check(isMaxLength(100)) },
14318
14243
  success: Void,
14319
14244
  error: RunnerRpcError
14320
- }), make5("CreateCheckpointFile", {
14245
+ }), make6("CreateCheckpointFile", {
14321
14246
  payload: { lease: ProgramLease, byteSize: Int, sha256: String4 },
14322
14247
  success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
14323
14248
  error: Union([RunnerRpcError, RunFileRefused])
14324
- }), make5("CheckpointFileParts", {
14249
+ }), make6("CheckpointFileParts", {
14325
14250
  payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
14326
14251
  success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
14327
14252
  error: RunnerRpcError
14328
- }), make5("CompleteCheckpointFile", {
14253
+ }), make6("CompleteCheckpointFile", {
14329
14254
  payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
14330
14255
  success: RunFileRecord,
14331
14256
  error: RunnerRpcError
14332
- }), make5("SaveCheckpoint", {
14257
+ }), make6("SaveCheckpoint", {
14333
14258
  payload: { lease: ProgramLease, checkpoint: StepCheckpoint },
14334
14259
  success: Void,
14335
14260
  error: RunnerRpcError
14336
- }), make5("ResumeCheckpoint", {
14261
+ }), make6("ResumeCheckpoint", {
14337
14262
  payload: { lease: ProgramLease },
14338
14263
  success: UndefinedOr(ResumedCheckpoint),
14339
14264
  error: RunnerRpcError
14340
- }), make5("SettledCheckpoints", {
14265
+ }), make6("SettledCheckpoints", {
14341
14266
  success: ArraySchema(Struct({
14342
14267
  stepAttemptId: String4,
14343
14268
  ref: optionalKey(String4),
14344
14269
  repoBinding: optionalKey(WorkUnitRepoBinding)
14345
14270
  })),
14346
14271
  error: RunnerRpcError
14347
- }), make5("ForgetCheckpoints", {
14272
+ }), make6("ForgetCheckpoints", {
14348
14273
  payload: { stepAttemptIds: ArraySchema(String4) },
14349
14274
  success: Void,
14350
14275
  error: RunnerRpcError
14351
- }), make5("GitCredential", {
14276
+ }), make6("GitCredential", {
14352
14277
  payload: { repoBindingId: String4 },
14353
14278
  success: UndefinedOr(Struct({ username: String4, password: String4 })),
14354
14279
  error: RunnerRpcError
14355
- }), make5("Bundle", {
14280
+ }), make6("Bundle", {
14356
14281
  payload: { digest: String4 },
14357
14282
  success: Struct({ bundle: String4 }),
14358
14283
  error: RunnerRpcError
14359
- }), make5("SettledRuns", {
14284
+ }), make6("SettledRuns", {
14360
14285
  payload: { runIds: ArraySchema(String4) },
14361
14286
  success: ArraySchema(String4),
14362
14287
  error: RunnerRpcError
14363
- }), make5("KnownEvidence", {
14288
+ }), make6("KnownEvidence", {
14364
14289
  payload: { lease: ProgramLease, trees: ArraySchema(String4) },
14365
14290
  success: ArraySchema(Struct({ tree: String4, name: String4, command: String4 })),
14366
14291
  error: RunnerRpcError
14367
14292
  })).middleware(RunnerAuthentication) {
14368
14293
  }
14369
14294
 
14370
- class RunnerJournalRpcs extends make6(make5("RecordActivity", {
14295
+ class RunnerJournalRpcs extends make7(make6("RecordActivity", {
14371
14296
  payload: { lease: ProgramLease, name: String4, attempt: Int, exit: Json },
14372
14297
  error: RunnerRpcError
14373
- }), make5("DeferredDone", {
14298
+ }), make6("DeferredDone", {
14374
14299
  payload: { lease: ProgramLease, name: String4, exit: Json },
14375
14300
  error: RunnerRpcError
14376
- }), make5("ScheduleClock", {
14301
+ }), make6("ScheduleClock", {
14377
14302
  payload: { lease: ProgramLease, name: String4, deferredName: String4, durationMillis: Int },
14378
14303
  error: RunnerRpcError
14379
- }), make5("Suspend", { payload: { lease: ProgramLease }, error: RunnerRpcError }), make5("FinishProgram", { payload: { lease: ProgramLease, outcome: ProgramOutcome }, error: RunnerRpcError })).middleware(RunnerAuthentication) {
14304
+ }), make6("Suspend", { payload: { lease: ProgramLease }, error: RunnerRpcError }), make6("FinishProgram", { payload: { lease: ProgramLease, outcome: ProgramOutcome }, error: RunnerRpcError })).middleware(RunnerAuthentication) {
14380
14305
  }
14381
14306
 
14382
- class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14307
+ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14383
14308
  payload: {
14384
14309
  lease: ProgramLease,
14385
14310
  step: String4,
@@ -14399,7 +14324,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14399
14324
  },
14400
14325
  success: Struct({ questionId: String4 }),
14401
14326
  error: RunnerRpcError
14402
- }), make5("StartAgentStep", {
14327
+ }), make6("StartAgentStep", {
14403
14328
  payload: {
14404
14329
  lease: ProgramLease,
14405
14330
  step: String4,
@@ -14415,7 +14340,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14415
14340
  },
14416
14341
  success: Struct({ stepAttemptId: String4 }),
14417
14342
  error: RunnerRpcError
14418
- }), make5("StartVerification", {
14343
+ }), make6("StartVerification", {
14419
14344
  payload: {
14420
14345
  lease: ProgramLease,
14421
14346
  step: String4,
@@ -14436,7 +14361,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14436
14361
  },
14437
14362
  success: Struct({ verificationId: String4 }),
14438
14363
  error: RunnerRpcError
14439
- }), make5("AwaitEvent", {
14364
+ }), make6("AwaitEvent", {
14440
14365
  payload: {
14441
14366
  lease: ProgramLease,
14442
14367
  step: String4,
@@ -14452,7 +14377,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14452
14377
  })))
14453
14378
  },
14454
14379
  error: RunnerRpcError
14455
- }), make5("ClaimResource", {
14380
+ }), make6("ClaimResource", {
14456
14381
  payload: {
14457
14382
  lease: ProgramLease,
14458
14383
  step: String4,
@@ -14461,7 +14386,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14461
14386
  action: Literals(["claim", "take_over", "let_go"])
14462
14387
  },
14463
14388
  error: RunnerRpcError
14464
- }), make5("AdmitChild", {
14389
+ }), make6("AdmitChild", {
14465
14390
  payload: {
14466
14391
  lease: ProgramLease,
14467
14392
  step: String4,
@@ -14472,7 +14397,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14472
14397
  },
14473
14398
  success: Struct({ runId: String4 }),
14474
14399
  error: RunnerRpcError
14475
- }), make5("StoreArtifact", {
14400
+ }), make6("StoreArtifact", {
14476
14401
  payload: {
14477
14402
  lease: ProgramLease,
14478
14403
  step: String4,
@@ -14484,7 +14409,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14484
14409
  },
14485
14410
  success: Struct({ artifactId: String4 }),
14486
14411
  error: RunnerRpcError
14487
- }), make5("RecordNote", {
14412
+ }), make6("RecordNote", {
14488
14413
  payload: {
14489
14414
  lease: ProgramLease,
14490
14415
  step: String4,
@@ -14493,7 +14418,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14493
14418
  kind: optional(Literals(["note", "blocker"]))
14494
14419
  },
14495
14420
  error: RunnerRpcError
14496
- }), make5("PerformHostEffect", {
14421
+ }), make6("PerformHostEffect", {
14497
14422
  payload: {
14498
14423
  lease: ProgramLease,
14499
14424
  step: String4,
@@ -14522,7 +14447,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14522
14447
  },
14523
14448
  success: UndefinedOr(Struct({ id: String4, number: String4, url: String4 })),
14524
14449
  error: RunnerRpcError
14525
- }), make5("AlertTask", {
14450
+ }), make6("AlertTask", {
14526
14451
  payload: {
14527
14452
  lease: ProgramLease,
14528
14453
  step: String4,
@@ -14539,7 +14464,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14539
14464
  joined: optionalKey(Struct({ kind: Literals(["run", "recent"]), runId: String4 }))
14540
14465
  }),
14541
14466
  error: RunnerRpcError
14542
- }), make5("ReadTranscripts", {
14467
+ }), make6("ReadTranscripts", {
14543
14468
  payload: {
14544
14469
  lease: ProgramLease,
14545
14470
  step: String4,
@@ -14574,7 +14499,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14574
14499
  })))
14575
14500
  }),
14576
14501
  error: RunnerRpcError
14577
- }), make5("PipelineStatus", {
14502
+ }), make6("PipelineStatus", {
14578
14503
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
14579
14504
  success: Struct({
14580
14505
  head: String4,
@@ -14608,11 +14533,11 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14608
14533
  }))
14609
14534
  }),
14610
14535
  error: RunnerRpcError
14611
- }), make5("ReportPipeline", {
14536
+ }), make6("ReportPipeline", {
14612
14537
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4, verification: String4 },
14613
14538
  success: Struct({ head: String4, status: Literals(["success", "failed"]) }),
14614
14539
  error: RunnerRpcError
14615
- }), make5("ReviewThreads", {
14540
+ }), make6("ReviewThreads", {
14616
14541
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
14617
14542
  success: Struct({
14618
14543
  threads: ArraySchema(Struct({
@@ -14624,7 +14549,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14624
14549
  }))
14625
14550
  }),
14626
14551
  error: RunnerRpcError
14627
- }), make5("OpenChangeRequests", {
14552
+ }), make6("OpenChangeRequests", {
14628
14553
  payload: { lease: ProgramLease, step: String4, authors: NonEmptyArray(String4) },
14629
14554
  success: Struct({
14630
14555
  changeRequests: ArraySchema(Struct({
@@ -14638,7 +14563,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14638
14563
  }))
14639
14564
  }),
14640
14565
  error: RunnerRpcError
14641
- }), make5("OwnChangeRequests", {
14566
+ }), make6("OwnChangeRequests", {
14642
14567
  payload: { lease: ProgramLease, step: String4 },
14643
14568
  success: Struct({
14644
14569
  changeRequests: ArraySchema(Struct({
@@ -14651,7 +14576,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14651
14576
  }))
14652
14577
  }),
14653
14578
  error: RunnerRpcError
14654
- }), make5("Propose", {
14579
+ }), make6("Propose", {
14655
14580
  payload: {
14656
14581
  lease: ProgramLease,
14657
14582
  step: String4,
@@ -14680,7 +14605,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14680
14605
  task: optionalKey(Struct({ id: String4, active: Boolean2 }))
14681
14606
  }),
14682
14607
  error: RunnerRpcError
14683
- }), make5("ReadProject", {
14608
+ }), make6("ReadProject", {
14684
14609
  payload: { lease: ProgramLease, step: String4, projectId: String4 },
14685
14610
  success: Struct({
14686
14611
  project: Struct({ id: String4, name: String4 }),
@@ -14703,7 +14628,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14703
14628
  taskChanges: ArraySchema(Struct({ taskKey: String4, title: String4, change: String4, at: String4 }))
14704
14629
  }),
14705
14630
  error: RunnerRpcError
14706
- }), make5("DraftUpdate", {
14631
+ }), make6("DraftUpdate", {
14707
14632
  payload: {
14708
14633
  lease: ProgramLease,
14709
14634
  step: String4,
@@ -14718,7 +14643,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14718
14643
  },
14719
14644
  success: Struct({ id: String4 }),
14720
14645
  error: RunnerRpcError
14721
- }), make5("CreatePlanTasks", {
14646
+ }), make6("CreatePlanTasks", {
14722
14647
  payload: {
14723
14648
  lease: ProgramLease,
14724
14649
  projectId: optionalKey(String4),
@@ -14736,15 +14661,15 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14736
14661
  },
14737
14662
  success: ArraySchema(Struct({ key: String4, taskId: String4 })),
14738
14663
  error: RunnerRpcError
14739
- }), make5("IntegrationBranch", {
14664
+ }), make6("IntegrationBranch", {
14740
14665
  payload: { lease: ProgramLease, repoBindingId: optionalKey(String4) },
14741
14666
  success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
14742
14667
  error: RunnerRpcError
14743
- }), make5("DeliveryBase", {
14668
+ }), make6("DeliveryBase", {
14744
14669
  payload: { lease: ProgramLease },
14745
14670
  success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
14746
14671
  error: RunnerRpcError
14747
- }), make5("MergeChangeRequest", {
14672
+ }), make6("MergeChangeRequest", {
14748
14673
  payload: {
14749
14674
  lease: ProgramLease,
14750
14675
  step: String4,
@@ -14762,7 +14687,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14762
14687
  Struct({ status: Literal("moved"), head: String4 })
14763
14688
  ]),
14764
14689
  error: RunnerRpcError
14765
- }), make5("ApproveChangeRequest", {
14690
+ }), make6("ApproveChangeRequest", {
14766
14691
  payload: {
14767
14692
  lease: ProgramLease,
14768
14693
  step: String4,
@@ -14778,7 +14703,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14778
14703
  Struct({ approved: Literal(false), reason: String4 })
14779
14704
  ]),
14780
14705
  error: RunnerRpcError
14781
- }), make5("CloseChangeRequest", {
14706
+ }), make6("CloseChangeRequest", {
14782
14707
  payload: {
14783
14708
  lease: ProgramLease,
14784
14709
  step: String4,
@@ -14788,7 +14713,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14788
14713
  },
14789
14714
  success: Struct({ closed: Boolean2, head: optionalKey(String4) }),
14790
14715
  error: RunnerRpcError
14791
- }), make5("RerunPipeline", {
14716
+ }), make6("RerunPipeline", {
14792
14717
  payload: {
14793
14718
  lease: ProgramLease,
14794
14719
  step: String4,
@@ -14798,7 +14723,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14798
14723
  },
14799
14724
  success: Struct({ head: String4, pipelines: Int }),
14800
14725
  error: RunnerRpcError
14801
- }), make5("PublishRelease", {
14726
+ }), make6("PublishRelease", {
14802
14727
  payload: {
14803
14728
  lease: ProgramLease,
14804
14729
  step: String4,
@@ -14810,14 +14735,14 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14810
14735
  },
14811
14736
  success: Struct({ tag: String4, revision: String4, url: String4 }),
14812
14737
  error: RunnerRpcError
14813
- }), make5("ProgramSecrets", {
14738
+ }), make6("ProgramSecrets", {
14814
14739
  payload: { lease: ProgramLease },
14815
14740
  success: Record(String4, String4),
14816
14741
  error: RunnerRpcError
14817
14742
  })).middleware(RunnerAuthentication) {
14818
14743
  }
14819
14744
 
14820
- class RunnerRunFileRpcs extends make6(make5("CreateRunFile", {
14745
+ class RunnerRunFileRpcs extends make7(make6("CreateRunFile", {
14821
14746
  payload: {
14822
14747
  lease: ProgramLease,
14823
14748
  step: String4,
@@ -14829,11 +14754,11 @@ class RunnerRunFileRpcs extends make6(make5("CreateRunFile", {
14829
14754
  },
14830
14755
  success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
14831
14756
  error: Union([RunnerRpcError, RunFileRefused])
14832
- }), make5("RunFileParts", {
14757
+ }), make6("RunFileParts", {
14833
14758
  payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
14834
14759
  success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
14835
14760
  error: RunnerRpcError
14836
- }), make5("CompleteRunFile", {
14761
+ }), make6("CompleteRunFile", {
14837
14762
  payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
14838
14763
  success: RunFileRecord,
14839
14764
  error: RunnerRpcError
@@ -14843,7 +14768,7 @@ var ProgramRpcs = RunnerJournalRpcs.merge(RunnerCapabilityRpcs, RunnerRunFileRpc
14843
14768
  var RunnerRpcs = RunnerReplicaRpcs.merge(RunnerJournalRpcs, RunnerCapabilityRpcs, RunnerRunFileRpcs);
14844
14769
 
14845
14770
  // apps/cli/src/oauth.ts
14846
- var Scope = "openid profile email offline_access kitman:cli";
14771
+ var Scope2 = "openid profile email offline_access kitman:cli";
14847
14772
  var CallbackPath = "/auth/callback";
14848
14773
 
14849
14774
  class OAuthCallbackTimeout extends TaggedError("OAuthCallbackTimeout") {
@@ -14862,7 +14787,7 @@ function buildAuthorizeUrl(input) {
14862
14787
  url.searchParams.set("response_type", "code");
14863
14788
  url.searchParams.set("client_id", input.clientId);
14864
14789
  url.searchParams.set("redirect_uri", input.redirectUri);
14865
- url.searchParams.set("scope", Scope);
14790
+ url.searchParams.set("scope", Scope2);
14866
14791
  url.searchParams.set("code_challenge", input.codeChallenge);
14867
14792
  url.searchParams.set("code_challenge_method", "S256");
14868
14793
  url.searchParams.set("state", input.state);
@@ -15031,7 +14956,7 @@ function createSdkClient(input) {
15031
14956
  const runPromise = runPromiseWith(yield* context());
15032
14957
  const fetchImpl = input.fetch ?? (yield* Fetch);
15033
14958
  let session = input.session;
15034
- const refreshPermit = makeUnsafe3(1);
14959
+ const refreshPermit = makeUnsafe2(1);
15035
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 })));
15036
14961
  const authorizedFetch = (resource, init) => runPromise(gen(function* () {
15037
14962
  if (session.refreshToken && shouldRefresh(yield* currentDate, session.expiresAt))
@@ -15051,7 +14976,7 @@ function createSdkClient(input) {
15051
14976
  });
15052
14977
  }
15053
14978
  function refreshSession(input) {
15054
- 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)));
15055
14980
  return withAuthLock(input.authPath, gen(function* () {
15056
14981
  const stored = yield* storedSession;
15057
14982
  if (!stored)
@@ -15066,7 +14991,7 @@ function refreshSession(input) {
15066
14991
  clientId: input.clientId ?? ClientId,
15067
14992
  refreshToken: spentToken,
15068
14993
  ...input.fetch ? { fetch: input.fetch } : undefined
15069
- }).pipe(map8((token) => toStoredSession(token, spentToken)));
14994
+ }).pipe(map7((token) => toStoredSession(token, spentToken)));
15070
14995
  const session = yield* refreshing.pipe(catch_((error) => storedSession.pipe(filterOrFail((current) => current !== undefined && current.refreshToken !== spentToken, () => error))));
15071
14996
  const current = yield* storedSession;
15072
14997
  if (current?.refreshToken !== spentToken)
@@ -15521,9 +15446,9 @@ var herdrCoreOver = (transport) => ({
15521
15446
  ...input.name === undefined ? undefined : { name: input.name },
15522
15447
  no_parent: input.noParent === true
15523
15448
  }),
15524
- 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)),
15525
15450
  get: (terminal) => request("terminal.get", Terminal2, { terminal }),
15526
- 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)),
15527
15452
  interrupt: (terminal, options = {}) => request("terminal.interrupt", Interrupted, {
15528
15453
  terminal,
15529
15454
  ...options.timeoutSeconds === undefined ? undefined : { timeout: options.timeoutSeconds }
@@ -15570,7 +15495,7 @@ var spawnedTransport = (env) => gen(function* () {
15570
15495
  const spawner = yield* ChildProcessSpawner;
15571
15496
  const input = yield* unbounded2();
15572
15497
  const encoder = new TextEncoder;
15573
- const handle = yield* spawner.spawn(make2("herdr-core", ["connect"], {
15498
+ const handle = yield* spawner.spawn(make3("herdr-core", ["connect"], {
15574
15499
  extendEnv: false,
15575
15500
  env,
15576
15501
  stdin: fromQueue(input),
@@ -15586,7 +15511,7 @@ var coreEnv = (options) => {
15586
15511
  const env = Object.fromEntries(Object.entries(options.env ?? process.env).filter((entry) => entry[0] !== "HC_SESSION" && entry[1] !== undefined));
15587
15512
  return options.session === undefined ? env : { ...env, HC_SESSION: options.session };
15588
15513
  };
15589
- 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)))));
15590
15515
  var herdrCoreTransportLayer2 = (transport) => succeed5(HerdrCore2, herdrCoreOver(transport));
15591
15516
  var UpdateRefused = Struct({
15592
15517
  error: Struct({ message: String4, hint: optionalKey(String4) })
@@ -15601,7 +15526,7 @@ var updateHerdrCore2 = (options) => gen(function* () {
15601
15526
  const spawner = yield* ChildProcessSpawner;
15602
15527
  const env = coreEnv(options);
15603
15528
  const run = (args) => gen(function* () {
15604
- const handle = yield* spawner.spawn(make2("herdr-core", args, { extendEnv: false, env, stdin: "ignore" }));
15529
+ const handle = yield* spawner.spawn(make3("herdr-core", args, { extendEnv: false, env, stdin: "ignore" }));
15605
15530
  const [stdout, stderr, exitCode] = yield* all3([
15606
15531
  mkString(decodeText(handle.stdout)),
15607
15532
  mkString(decodeText(handle.stderr)),
@@ -15609,13 +15534,13 @@ var updateHerdrCore2 = (options) => gen(function* () {
15609
15534
  ], { concurrency: 3 });
15610
15535
  return { stdout, stderr, exitCode };
15611
15536
  }).pipe(scoped, catchReason("PlatformError", "NotFound", () => fail7(new HerdrCoreMissing2)));
15612
- 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({
15613
15538
  duration: options.timeout,
15614
15539
  orElse: () => succeed6(`it did not finish within ${options.timeout}`)
15615
15540
  }));
15616
15541
  if (reason === undefined)
15617
15542
  return;
15618
- 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"));
15619
15544
  return yield* new HerdrCoreUpdateFailed2({ version, reason: reason.slice(0, 400) });
15620
15545
  });
15621
15546
 
@@ -15627,7 +15552,7 @@ class CommandFailed2 extends TaggedError("CommandFailed") {
15627
15552
  }
15628
15553
  var runCommand2 = (command, args, options = {}) => gen(function* () {
15629
15554
  const spawner = yield* ChildProcessSpawner;
15630
- const handle = yield* spawner.spawn(make2(command, args, {
15555
+ const handle = yield* spawner.spawn(make3(command, args, {
15631
15556
  stdin: "ignore",
15632
15557
  ...options.cwd === undefined ? undefined : { cwd: options.cwd },
15633
15558
  ...options.env === undefined ? undefined : { extendEnv: true, env: options.env }
@@ -15653,7 +15578,7 @@ var shellOutputTailChars2 = 64 * 1024;
15653
15578
  var runProcess2 = (argv, options) => gen(function* () {
15654
15579
  const spawner = yield* ChildProcessSpawner;
15655
15580
  const [command, ...args] = argv;
15656
- const handle = yield* spawner.spawn(make2(command, args, {
15581
+ const handle = yield* spawner.spawn(make3(command, args, {
15657
15582
  stdin: options.stdin === undefined ? "ignore" : make10(new TextEncoder().encode(options.stdin)),
15658
15583
  ...options.cwd === undefined ? undefined : { cwd: options.cwd },
15659
15584
  env: options.extendEnv === false ? { ...options.env } : { ...withoutPreloads2(), ...options.env }
@@ -15700,7 +15625,7 @@ var detectHarnesses2 = gen(function* () {
15700
15625
  const home = (yield* optionalEnv("HOME")) ?? "/";
15701
15626
  const searchPath = ((yield* optionalEnv("PATH")) ?? "").split(":").filter(Boolean);
15702
15627
  const exists = (file) => fs.exists(file).pipe(orElseSucceed(() => false));
15703
- const any = (items, test) => map8(findFirst(items, test), isSome);
15628
+ const any = (items, test) => map7(findFirst(items, test), isSome);
15704
15629
  const loginFound = (login) => gen(function* () {
15705
15630
  const file = path.join(home, login.path);
15706
15631
  if (!(yield* exists(file)))
@@ -15716,7 +15641,7 @@ var detectHarnesses2 = gen(function* () {
15716
15641
  unavailable.push({ harness: harness.id, missing: [`\`${harness.id}\` is not installed`] });
15717
15642
  continue;
15718
15643
  }
15719
- 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));
15720
15645
  if (loggedIn)
15721
15646
  harnesses.push(harness.id);
15722
15647
  else
@@ -16086,4 +16011,4 @@ function checkServices(declaration) {
16086
16011
  return isSome(decoded) ? [...new Set(decoded.value.services)] : undefined;
16087
16012
  }
16088
16013
 
16089
- 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, make4, 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, make5, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make6, 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 };