@kitman-sh/cli 0.13.9 → 0.13.10

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-ksgt1tdc.js → chunk-0nh3w4vn.js} +7 -7
  2. package/dist/{chunk-cw61zyh5.js → chunk-24h0y27w.js} +1 -1
  3. package/dist/{chunk-0wj65j5e.js → chunk-2dwqak36.js} +7 -7
  4. package/dist/{chunk-53qp6kcp.js → chunk-4crf5vhd.js} +2 -2
  5. package/dist/{chunk-wzr1n3zy.js → chunk-6n3m0t02.js} +25 -5
  6. package/dist/{chunk-hezxa6q5.js → chunk-6x4wkf0x.js} +7 -7
  7. package/dist/{chunk-s63fjc69.js → chunk-813vn8sn.js} +20 -20
  8. package/dist/{chunk-rz18qefg.js → chunk-bkecckjn.js} +7 -7
  9. package/dist/{chunk-6jtjcvnc.js → chunk-c60xk73g.js} +46 -46
  10. package/dist/{chunk-qkjfx2ts.js → chunk-d4pxty7x.js} +16 -16
  11. package/dist/{chunk-z5f7g1w1.js → chunk-ggmwpwhf.js} +2 -2
  12. package/dist/{chunk-1ht6jwzm.js → chunk-hkg8s472.js} +8 -8
  13. package/dist/{chunk-v190zzc5.js → chunk-j34gensq.js} +1 -1
  14. package/dist/{chunk-69fcvx7d.js → chunk-jkddgvev.js} +74 -54
  15. package/dist/{chunk-a44ebqzx.js → chunk-kj1zjrs9.js} +6 -6
  16. package/dist/{chunk-ezv4p0zr.js → chunk-kk32jckf.js} +4 -4
  17. package/dist/{chunk-fh58za51.js → chunk-mmd7mjv0.js} +3 -3
  18. package/dist/{chunk-tspf987k.js → chunk-mtdz4k32.js} +5 -5
  19. package/dist/{chunk-0tjg9eya.js → chunk-pxvd8w2v.js} +1 -1
  20. package/dist/{chunk-x8sewxzm.js → chunk-r5v7df8h.js} +106 -106
  21. package/dist/{chunk-9gg1w4aa.js → chunk-rz01craf.js} +434 -350
  22. package/dist/{chunk-pj3mer60.js → chunk-s00cj5sw.js} +4 -4
  23. package/dist/{chunk-aezq3fyy.js → chunk-t82w7459.js} +218 -69
  24. package/dist/{chunk-kq88aaa3.js → chunk-vxfajzpz.js} +16 -62
  25. package/dist/{chunk-qjqa338f.js → chunk-zgraq2y3.js} +111 -308
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -17,9 +17,14 @@ import {
17
17
  isNullish,
18
18
  hasProperty,
19
19
  symbol,
20
+ hash,
21
+ combine,
22
+ number,
23
+ string,
20
24
  structure,
21
25
  array,
22
26
  symbol2,
27
+ equals,
23
28
  asEquivalence,
24
29
  symbolRedactable,
25
30
  redact,
@@ -47,20 +52,19 @@ import {
47
52
  fromNullishOr,
48
53
  fromUndefinedOr,
49
54
  getOrUndefined,
55
+ liftThrowable,
50
56
  map4,
51
57
  flatMap,
52
58
  Service2,
53
- makeUnsafe3,
59
+ makeUnsafe4,
54
60
  empty3,
55
61
  make14,
56
62
  add,
57
63
  getOrUndefined2,
58
64
  getOrUndefinedUnsafe,
59
- get3,
65
+ get4,
60
66
  merge3,
61
67
  Reference,
62
- fromInputUnsafe,
63
- isFinite,
64
68
  millis,
65
69
  seconds,
66
70
  toMillis,
@@ -79,13 +83,14 @@ import {
79
83
  TaggedError,
80
84
  DisablePropagation,
81
85
  sync,
86
+ map7,
87
+ ClockRef,
88
+ currentTimeMillis2,
82
89
  ConsoleRef,
83
90
  succeed3,
84
91
  fail4,
85
- void_2,
86
92
  isSuccess2,
87
- isFailure2,
88
- makeUnsafe4,
93
+ makeUnsafe5,
89
94
  make15,
90
95
  _await,
91
96
  fail5,
@@ -94,12 +99,8 @@ import {
94
99
  succeed4,
95
100
  doneUnsafe,
96
101
  TracerTimingEnabled,
97
- Scope,
98
- makeUnsafe5,
99
102
  provide,
100
- addFinalizerExit,
101
103
  addFinalizer,
102
- close,
103
104
  succeed5,
104
105
  effect,
105
106
  effectContext,
@@ -112,9 +113,8 @@ import {
112
113
  hasInterrupts2,
113
114
  Done2,
114
115
  done,
116
+ IllegalArgumentError,
115
117
  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
- map7,
143
+ map8,
144
144
  as,
145
145
  asVoid,
146
146
  catch_,
@@ -152,7 +152,6 @@ import {
152
152
  tapCause,
153
153
  retry,
154
154
  ignore,
155
- ignoreCause,
156
155
  orElseSucceed,
157
156
  timeout,
158
157
  timeoutOrElse,
@@ -164,7 +163,6 @@ import {
164
163
  context,
165
164
  contextWith,
166
165
  provide3,
167
- provideContext2,
168
166
  serviceOption,
169
167
  updateContext,
170
168
  provideService,
@@ -175,7 +173,6 @@ import {
175
173
  addFinalizer2,
176
174
  ensuring2,
177
175
  onError,
178
- onExit,
179
176
  cached,
180
177
  interrupt3,
181
178
  interruptible,
@@ -187,7 +184,6 @@ import {
187
184
  withParentSpan,
188
185
  forkScoped,
189
186
  runFork,
190
- runForkWith,
191
187
  runPromise,
192
188
  runPromiseWith,
193
189
  runSync,
@@ -198,16 +194,12 @@ import {
198
194
  logError,
199
195
  effectify,
200
196
  decode,
201
- makeUnsafe6,
197
+ isRedacted,
202
198
  make16,
203
- now,
204
- nowUnsafe,
205
- toDateUtc,
206
- toEpochMillis,
207
- formatIso,
199
+ value,
208
200
  defaultParseOptions,
209
201
  omit,
210
- map8,
202
+ map9,
211
203
  declare,
212
204
  decodeUnknownEffect2,
213
205
  decodeEffect,
@@ -272,22 +264,18 @@ import {
272
264
  decodeJsonStringOption,
273
265
  encodeJsonStringSync,
274
266
  encodePrettyJsonString
275
- } from "./chunk-qjqa338f.js";
267
+ } from "./chunk-zgraq2y3.js";
276
268
  import {
277
269
  map,
278
270
  makeEquivalence,
279
271
  toNumber,
280
272
  bytes,
281
- join,
282
- interrupt,
283
- getCurrent,
284
- runIn,
285
273
  BadArgument,
286
274
  systemError,
287
275
  badArgument,
288
- makeUnsafe,
276
+ makeUnsafe2,
277
+ make7,
289
278
  make8,
290
- make9,
291
279
  sliding,
292
280
  unbounded2,
293
281
  offer,
@@ -297,12 +285,14 @@ import {
297
285
  endUnsafe,
298
286
  take,
299
287
  poll,
300
- makeUnsafe2,
288
+ makeUnsafe3,
301
289
  fromTransform,
302
290
  mapDone,
303
291
  isSink,
304
292
  fromChannel,
305
293
  drain,
294
+ make9,
295
+ get3,
306
296
  isStream,
307
297
  fromChannel2,
308
298
  callback,
@@ -342,7 +332,7 @@ import {
342
332
  String2,
343
333
  optionalEnv,
344
334
  harnessesUnsupportedInSrt2
345
- } from "./chunk-aezq3fyy.js";
335
+ } from "./chunk-t82w7459.js";
346
336
  import {
347
337
  isDateTime,
348
338
  Numeric,
@@ -355,25 +345,252 @@ import {
355
345
  SecretScope,
356
346
  SecretHosts,
357
347
  isSecretReference
358
- } from "./chunk-0tjg9eya.js";
348
+ } from "./chunk-pxvd8w2v.js";
359
349
  import {
360
- isRedacted,
361
- make,
362
- value,
363
350
  ExitCode,
364
351
  ProcessId,
365
352
  makeHandle,
366
- make2,
353
+ make,
367
354
  ChildProcessSpawner,
368
355
  display,
369
- make3,
356
+ make2,
370
357
  parseFdName,
371
358
  fdName
372
- } from "./chunk-kq88aaa3.js";
359
+ } from "./chunk-vxfajzpz.js";
373
360
 
374
361
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
375
362
  var makeEquivalence3 = Tuple;
376
363
 
364
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
365
+ var Clock = ClockRef;
366
+ var currentTimeMillis = currentTimeMillis2;
367
+
368
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/dateTime.js
369
+ var TypeId = "~effect/DateTime";
370
+ var TimeZoneTypeId = "~effect/DateTime/TimeZone";
371
+ var Proto = {
372
+ [TypeId]: TypeId,
373
+ pipe() {
374
+ return pipeArguments(this, arguments);
375
+ },
376
+ [NodeInspectSymbol]() {
377
+ return this.toString();
378
+ },
379
+ toJSON() {
380
+ return toDateUtc(this).toJSON();
381
+ }
382
+ };
383
+ var ProtoUtc = {
384
+ ...Proto,
385
+ _tag: "Utc",
386
+ [symbol]() {
387
+ return number(this.epochMilliseconds);
388
+ },
389
+ [symbol2](that) {
390
+ return isDateTime2(that) && that._tag === "Utc" && this.epochMilliseconds === that.epochMilliseconds;
391
+ },
392
+ toString() {
393
+ return `DateTime.Utc(${toDateUtc(this).toJSON()})`;
394
+ }
395
+ };
396
+ var ProtoZoned = {
397
+ ...Proto,
398
+ _tag: "Zoned",
399
+ [symbol]() {
400
+ return combine(number(this.epochMilliseconds))(hash(this.zone));
401
+ },
402
+ [symbol2](that) {
403
+ return isDateTime2(that) && that._tag === "Zoned" && this.epochMilliseconds === that.epochMilliseconds && equals(this.zone, that.zone);
404
+ },
405
+ toString() {
406
+ return `DateTime.Zoned(${formatIsoZoned(this)})`;
407
+ }
408
+ };
409
+ var ProtoTimeZone = {
410
+ [TimeZoneTypeId]: TimeZoneTypeId,
411
+ [NodeInspectSymbol]() {
412
+ return this.toString();
413
+ }
414
+ };
415
+ var ProtoTimeZoneNamed = {
416
+ ...ProtoTimeZone,
417
+ _tag: "Named",
418
+ [symbol]() {
419
+ return string(`Named:${this.id}`);
420
+ },
421
+ [symbol2](that) {
422
+ return isTimeZone(that) && that._tag === "Named" && this.id === that.id;
423
+ },
424
+ toString() {
425
+ return `TimeZone.Named(${this.id})`;
426
+ },
427
+ toJSON() {
428
+ return {
429
+ _id: "TimeZone",
430
+ _tag: "Named",
431
+ id: this.id
432
+ };
433
+ }
434
+ };
435
+ var ProtoTimeZoneOffset = {
436
+ ...ProtoTimeZone,
437
+ _tag: "Offset",
438
+ [symbol]() {
439
+ return string(`Offset:${this.offset}`);
440
+ },
441
+ [symbol2](that) {
442
+ return isTimeZone(that) && that._tag === "Offset" && this.offset === that.offset;
443
+ },
444
+ toString() {
445
+ return `TimeZone.Offset(${offsetToString(this.offset)})`;
446
+ },
447
+ toJSON() {
448
+ return {
449
+ _id: "TimeZone",
450
+ _tag: "Offset",
451
+ offset: this.offset
452
+ };
453
+ }
454
+ };
455
+ var cacheSlot = {
456
+ value: undefined,
457
+ enumerable: false,
458
+ writable: true
459
+ };
460
+ var sealedCaches = /* @__PURE__ */ new WeakMap;
461
+ var cacheAccessor = (key, slots) => ({
462
+ get() {
463
+ return Object.isExtensible(this) ? undefined : sealedCaches.get(this)?.[key];
464
+ },
465
+ set(value) {
466
+ if (Object.isExtensible(this)) {
467
+ for (const slot of slots) {
468
+ Object.defineProperty(this, slot, cacheSlot);
469
+ }
470
+ this[key] = value;
471
+ } else {
472
+ let caches = sealedCaches.get(this);
473
+ if (caches === undefined) {
474
+ caches = {};
475
+ sealedCaches.set(this, caches);
476
+ }
477
+ caches[key] = value;
478
+ }
479
+ }
480
+ });
481
+ var zonedSlots = ["partsUtc", "adjustedEpochMilliseconds", "partsAdjusted"];
482
+ Object.defineProperty(ProtoUtc, "partsUtc", cacheAccessor("partsUtc", ["partsUtc"]));
483
+ Object.defineProperties(ProtoZoned, {
484
+ partsUtc: cacheAccessor("partsUtc", zonedSlots),
485
+ adjustedEpochMilliseconds: cacheAccessor("adjustedEpochMilliseconds", zonedSlots),
486
+ partsAdjusted: cacheAccessor("partsAdjusted", zonedSlots)
487
+ });
488
+ var isDateTime2 = (u) => hasProperty(u, TypeId);
489
+ var isTimeZone = (u) => hasProperty(u, TimeZoneTypeId);
490
+ var makeUtc = (epochMillis) => {
491
+ const self = Object.create(ProtoUtc);
492
+ self.epochMilliseconds = epochMillis;
493
+ return self;
494
+ };
495
+ var fromDateUnsafe = (date) => {
496
+ const epochMillis = date.getTime();
497
+ if (Number.isNaN(epochMillis)) {
498
+ throw new IllegalArgumentError("Invalid date");
499
+ }
500
+ return makeUtc(epochMillis);
501
+ };
502
+ var makeUnsafe6 = (input) => {
503
+ if (isDateTime2(input)) {
504
+ return input;
505
+ } else if (input instanceof Date) {
506
+ return fromDateUnsafe(input);
507
+ } else if (typeof input === "object") {
508
+ if ("epochMilliseconds" in input) {
509
+ return fromDateUnsafe(new Date(input.epochMilliseconds));
510
+ }
511
+ const date = new Date(0);
512
+ setPartsDate(date, input);
513
+ return fromDateUnsafe(date);
514
+ } else if (typeof input === "string" && !hasZone(input)) {
515
+ return fromDateUnsafe(new Date(input + "Z"));
516
+ }
517
+ return fromDateUnsafe(new Date(input));
518
+ };
519
+ var hasZone = (input) => /Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(input) || /z$|gmt$/i.test(input);
520
+ var minEpochMillis = -8640000000000000 + 12 * 60 * 60 * 1000;
521
+ var maxEpochMillis = 8640000000000000 - 14 * 60 * 60 * 1000;
522
+ var make3 = /* @__PURE__ */ liftThrowable(makeUnsafe6);
523
+ var now = /* @__PURE__ */ map7(currentTimeMillis, makeUtc);
524
+ var nowUnsafe = () => makeUtc(Date.now());
525
+ var toDateUtc = (self) => new Date(self.epochMilliseconds);
526
+ var toDate2 = (self) => {
527
+ if (self._tag === "Utc") {
528
+ return new Date(self.epochMilliseconds);
529
+ } else if (self.zone._tag === "Offset") {
530
+ return new Date(self.epochMilliseconds + self.zone.offset);
531
+ } else if (self.adjustedEpochMilliseconds !== undefined) {
532
+ return new Date(self.adjustedEpochMilliseconds);
533
+ }
534
+ let bc = false;
535
+ const parts = self.zone.format.formatToParts(self.epochMilliseconds).filter((_) => {
536
+ if (_.type === "era") {
537
+ bc = _.value === "BC";
538
+ return false;
539
+ }
540
+ return _.type !== "literal";
541
+ });
542
+ const year = Number(parts[2].value);
543
+ const date = new Date(0);
544
+ date.setUTCFullYear(bc ? 1 - year : year, Number(parts[0].value) - 1, Number(parts[1].value));
545
+ 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);
546
+ self.adjustedEpochMilliseconds = date.getTime();
547
+ return date;
548
+ };
549
+ var zonedOffset = (self) => {
550
+ const date = toDate2(self);
551
+ return date.getTime() - toEpochMillis(self);
552
+ };
553
+ var offsetToString = (offset) => {
554
+ const abs = Math.abs(offset);
555
+ let hours = Math.floor(abs / (60 * 60 * 1000));
556
+ let minutes = Math.round(abs % (60 * 60 * 1000) / (60 * 1000));
557
+ if (minutes === 60) {
558
+ hours += 1;
559
+ minutes = 0;
560
+ }
561
+ return `${offset < 0 ? "-" : "+"}${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
562
+ };
563
+ var zonedOffsetIso = (self) => offsetToString(zonedOffset(self));
564
+ var toEpochMillis = (self) => self.epochMilliseconds;
565
+ var setPartsDate = (date, parts) => {
566
+ if (parts.year !== undefined || parts.month !== undefined || parts.day !== undefined) {
567
+ date.setUTCFullYear(parts.year ?? date.getUTCFullYear(), parts.month !== undefined ? parts.month - 1 : date.getUTCMonth(), parts.day ?? date.getUTCDate());
568
+ }
569
+ if (parts.weekDay !== undefined) {
570
+ const diff = parts.weekDay - date.getUTCDay();
571
+ date.setUTCDate(date.getUTCDate() + diff);
572
+ }
573
+ if (parts.hour !== undefined) {
574
+ date.setUTCHours(parts.hour);
575
+ }
576
+ if (parts.minute !== undefined) {
577
+ date.setUTCMinutes(parts.minute);
578
+ }
579
+ if (parts.second !== undefined) {
580
+ date.setUTCSeconds(parts.second);
581
+ }
582
+ if (parts.millisecond !== undefined) {
583
+ date.setUTCMilliseconds(parts.millisecond);
584
+ }
585
+ };
586
+ var constDayMillis = 24 * 60 * 60 * 1000;
587
+ var formatIso2 = (self) => toDateUtc(self).toISOString();
588
+ var formatIsoOffset = (self) => {
589
+ const date = toDate2(self);
590
+ return self._tag === "Utc" ? date.toISOString() : `${date.toISOString().slice(0, -1)}${zonedOffsetIso(self)}`;
591
+ };
592
+ var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
593
+
377
594
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Metric.js
378
595
  var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
379
596
  var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
@@ -383,10 +600,10 @@ var MetricRegistryKey = "effect/Metric/MetricRegistry";
383
600
  var MetricRegistry = /* @__PURE__ */ Reference(MetricRegistryKey, {
384
601
  defaultValue: () => new Map
385
602
  });
386
- var TypeId = "~effect/Metric";
603
+ var TypeId2 = "~effect/Metric";
387
604
 
388
605
  class Metric$ {
389
- [TypeId] = TypeId;
606
+ [TypeId2] = TypeId2;
390
607
  #extraAttributes;
391
608
  #mergedAttributes;
392
609
  #key = "";
@@ -409,7 +626,7 @@ class Metric$ {
409
626
  }
410
627
  hook(context) {
411
628
  const key = this.key(context);
412
- const registry = get3(context, MetricRegistry);
629
+ const registry = get4(context, MetricRegistry);
413
630
  let metadata = registry.get(key);
414
631
  if (isUndefined(metadata)) {
415
632
  metadata = this.metadata(this.createHooks());
@@ -418,11 +635,11 @@ class Metric$ {
418
635
  return metadata.hooks;
419
636
  }
420
637
  removeUnsafe(context) {
421
- get3(context, MetricRegistry).delete(this.key(context));
638
+ get4(context, MetricRegistry).delete(this.key(context));
422
639
  }
423
640
  registerUnsafe(context, hooks) {
424
641
  const key = this.key(context);
425
- const registry = get3(context, MetricRegistry);
642
+ const registry = get4(context, MetricRegistry);
426
643
  const metadata = this.metadata({
427
644
  get: hooks.get,
428
645
  update: constVoid,
@@ -438,7 +655,7 @@ class Metric$ {
438
655
  };
439
656
  }
440
657
  key(context) {
441
- const extraAttributes = get3(context, CurrentMetricAttributes);
658
+ const extraAttributes = get4(context, CurrentMetricAttributes);
442
659
  if (extraAttributes !== this.#extraAttributes) {
443
660
  this.#extraAttributes = extraAttributes;
444
661
  const merged = mergeAttributes(this.attributes, extraAttributes);
@@ -681,147 +898,14 @@ var runMain2 = /* @__PURE__ */ makeRunMain(({
681
898
  // node_modules/.bun/@effect+platform-bun@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-bun/dist/BunRuntime.js
682
899
  var runMain = runMain2;
683
900
 
684
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
685
- var TypeId2 = "~effect/RcRef";
686
- var stateEmpty = {
687
- _tag: "Empty"
688
- };
689
- var stateClosed = {
690
- _tag: "Closed"
691
- };
692
- var variance = {
693
- _A: identity,
694
- _E: identity
695
- };
696
-
697
- class RcRefImpl {
698
- [TypeId2] = variance;
699
- pipe() {
700
- return pipeArguments(this, arguments);
701
- }
702
- state = stateEmpty;
703
- acquire;
704
- context;
705
- scope;
706
- idleTimeToLive;
707
- constructor(acquire, context, scope, idleTimeToLive) {
708
- this.acquire = acquire;
709
- this.context = context;
710
- this.scope = scope;
711
- this.idleTimeToLive = idleTimeToLive;
712
- }
713
- }
714
- var make4 = (options) => withFiber2((fiber) => {
715
- const context = fiber.context;
716
- const scope = get3(context, Scope);
717
- const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
718
- return as(addFinalizerExit(scope, () => {
719
- const state = ref.state;
720
- ref.state = stateClosed;
721
- if (state._tag === "Acquired")
722
- return close(state.scope, void_2);
723
- if (state._tag === "Acquiring")
724
- return interrupt(state.fiber);
725
- return void_3;
726
- }), ref);
727
- });
728
- var getState = (self, restore) => {
729
- switch (self.state._tag) {
730
- case "Closed": {
731
- return interrupt3;
732
- }
733
- case "Acquired": {
734
- const state = self.state;
735
- state.refCount++;
736
- return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
737
- }
738
- case "Acquiring": {
739
- const state = self.state;
740
- state.awaiters++;
741
- return awaitAcquiring(self, state, restore);
742
- }
743
- case "Empty": {
744
- const acquiring = {
745
- _tag: "Acquiring",
746
- fiber: undefined,
747
- awaiters: 1,
748
- acquired: undefined
749
- };
750
- self.state = acquiring;
751
- const scope = makeUnsafe5();
752
- const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
753
- if (self.state !== acquiring) {
754
- return interrupt3;
755
- }
756
- const state = {
757
- _tag: "Acquired",
758
- value,
759
- scope,
760
- fiber: undefined,
761
- refCount: acquiring.awaiters,
762
- invalidated: false
763
- };
764
- self.state = state;
765
- acquiring.acquired = state;
766
- return succeed6(state);
767
- }), onExit((exit) => {
768
- if (isSuccess2(exit))
769
- return void_3;
770
- if (self.state === acquiring)
771
- self.state = stateEmpty;
772
- return close(scope, exit);
773
- }));
774
- acquiring.fiber = runForkWith(getCurrent().context)(acquire);
775
- return awaitAcquiring(self, acquiring, restore);
776
- }
777
- }
778
- };
779
- var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
780
- const acquired = acquiring.acquired;
781
- if (acquired !== undefined) {
782
- return isFailure2(exit) ? release(self, acquired) : void_3;
783
- }
784
- if (--acquiring.awaiters > 0 || self.state !== acquiring)
785
- return void_3;
786
- self.state = stateEmpty;
787
- return interrupt(acquiring.fiber);
788
- });
789
- var get4 = (self_) => {
790
- const self = self_;
791
- return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
792
- };
793
- var release = (self, state) => {
794
- state.refCount--;
795
- if (state.refCount > 0) {
796
- return void_3;
797
- }
798
- const idleTimeToLive = self.idleTimeToLive;
799
- if (idleTimeToLive === undefined || state.invalidated) {
800
- if (self.state === state) {
801
- self.state = stateEmpty;
802
- }
803
- return close(state.scope, void_2);
804
- } else if (!isFinite(idleTimeToLive)) {
805
- return void_3;
806
- }
807
- state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
808
- if (self.state === state && state.refCount === 0) {
809
- self.state = stateEmpty;
810
- return ignoreCause(close(state.scope, void_2), {
811
- log: "Unhandled",
812
- message: "Unhandled error in RcRef finalizer"
813
- });
814
- }
815
- return void_3;
816
- })).pipe(ensuring2(sync2(() => {
817
- state.fiber = undefined;
818
- })), runForkWith(self.context), runIn(self.scope));
819
- return void_3;
820
- };
821
-
822
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
823
- var make18 = make4;
824
- var get5 = get4;
901
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
902
+ var makeUnsafe = makeUnsafe6;
903
+ var make18 = make3;
904
+ var now2 = now;
905
+ var nowUnsafe2 = nowUnsafe;
906
+ var toDateUtc2 = toDateUtc;
907
+ var toEpochMillis2 = toEpochMillis;
908
+ var formatIso = formatIso2;
825
909
 
826
910
  // node_modules/.bun/@effect+platform-node-shared@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
827
911
  import * as NodeChildProcess from "child_process";
@@ -937,8 +1021,8 @@ var releaseWritable = (writable) => callback3((resume) => {
937
1021
  });
938
1022
  var pullIntoWritable = (options) => withFiber2((fiber) => {
939
1023
  const dispatcher = fiber.currentDispatcher;
940
- const completion = makeUnsafe4();
941
- const failure = makeUnsafe4();
1024
+ const completion = makeUnsafe5();
1025
+ const failure = makeUnsafe5();
942
1026
  const onError = (error) => doneUnsafe(failure, failSync(() => options.onError(error)));
943
1027
  let errorEmitted = false;
944
1028
  const onStreamError = (error) => {
@@ -1031,8 +1115,8 @@ var readableToPullUnsafe = (options) => {
1031
1115
  const readable = options.readable;
1032
1116
  const chunkSize = options.chunkSize ?? 4096;
1033
1117
  const closeOnDone = options.closeOnDone ?? true;
1034
- const exit = options.exit ?? make8(undefined);
1035
- const latch = options.latch ?? makeUnsafe(false);
1118
+ const exit = options.exit ?? make7(undefined);
1119
+ const latch = options.latch ?? makeUnsafe2(false);
1036
1120
  function onReadable() {
1037
1121
  latch.openUnsafe();
1038
1122
  }
@@ -1262,7 +1346,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1262
1346
  });
1263
1347
  }
1264
1348
  if (stream) {
1265
- return map7(runInputStream(stream, sink, inputFailure), () => {
1349
+ return map8(runInputStream(stream, sink, inputFailure), () => {
1266
1350
  inputSinks.set(fd, sink);
1267
1351
  });
1268
1352
  }
@@ -1368,7 +1452,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1368
1452
  };
1369
1453
  };
1370
1454
  const spawn2 = (command, spawnOptions) => callback3((resume) => {
1371
- const deferred = makeUnsafe4();
1455
+ const deferred = makeUnsafe5();
1372
1456
  const handle = NodeChildProcess.spawn(command.command, command.args.map(unwrap2), spawnOptions);
1373
1457
  handle.on("error", (error) => {
1374
1458
  if (command.args.some(isRedacted)) {
@@ -1544,7 +1628,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1544
1628
  }
1545
1629
  return reref;
1546
1630
  });
1547
- const inputFailure = makeUnsafe4();
1631
+ const inputFailure = makeUnsafe5();
1548
1632
  const stdin = yield* setupChildStdin(cmd, childProcess, stdinConfig, inputFailure);
1549
1633
  const {
1550
1634
  all,
@@ -1555,7 +1639,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1555
1639
  getInputFd,
1556
1640
  getOutputFd
1557
1641
  } = yield* setupAdditionalFds(cmd, childProcess, resolvedAdditionalFds, inputFailure);
1558
- const isRunning = map7(isDone(exitSignal), (done) => !done);
1642
+ const isRunning = map8(isDone(exitSignal), (done) => !done);
1559
1643
  const exitCode = flatMap3(raceFirst(_await(exitSignal), _await(inputFailure)), ([code, signal]) => {
1560
1644
  if (isDoneUnsafe(inputFailure)) {
1561
1645
  return _await(inputFailure);
@@ -1595,7 +1679,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1595
1679
  const sourceStream = unwrap(succeed6(getSourceStream(handles[handles.length - 1], options.from)));
1596
1680
  const toOption = options.to ?? "stdin";
1597
1681
  if (toOption === "stdin") {
1598
- handles.push(yield* spawnCommand(make3(command.command, command.args, {
1682
+ handles.push(yield* spawnCommand(make2(command.command, command.args, {
1599
1683
  ...command.options,
1600
1684
  stdin: {
1601
1685
  ...stdinConfig,
@@ -1615,7 +1699,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1615
1699
  type: "input",
1616
1700
  stream: sourceStream
1617
1701
  };
1618
- handles.push(yield* spawnCommand(make3(command.command, command.args, {
1702
+ handles.push(yield* spawnCommand(make2(command.command, command.args, {
1619
1703
  ...command.options,
1620
1704
  additionalFds: {
1621
1705
  ...existingFds,
@@ -1623,7 +1707,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1623
1707
  }
1624
1708
  })));
1625
1709
  } else {
1626
- handles.push(yield* spawnCommand(make3(command.command, command.args, {
1710
+ handles.push(yield* spawnCommand(make2(command.command, command.args, {
1627
1711
  ...command.options,
1628
1712
  stdin: {
1629
1713
  ...stdinConfig,
@@ -1662,7 +1746,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1662
1746
  }
1663
1747
  }
1664
1748
  });
1665
- return make2(spawnCommand);
1749
+ return make(spawnCommand);
1666
1750
  });
1667
1751
  var layer5 = /* @__PURE__ */ effect(ChildProcessSpawner, make19);
1668
1752
  var flattenCommand = (command) => {
@@ -1836,7 +1920,7 @@ var noFollowFlags = (method, flag) => suspend3(() => {
1836
1920
  var openFactory = (method) => {
1837
1921
  const nodeOpen = effectify(NFS.open, handleErrnoException("FileSystem", method), handleBadArgument(method));
1838
1922
  const nodeClose = effectify(NFS.close, handleErrnoException("FileSystem", method), handleBadArgument(method));
1839
- 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
+ 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)));
1840
1924
  };
1841
1925
  var open2 = /* @__PURE__ */ openFactory("open");
1842
1926
  var negativePosition = (method) => badArgument({
@@ -1897,7 +1981,7 @@ var makeFile = /* @__PURE__ */ (() => {
1897
1981
  });
1898
1982
  }
1899
1983
  const position = this.position;
1900
- return map7(nodeRead(this.fd, {
1984
+ return map8(nodeRead(this.fd, {
1901
1985
  buffer,
1902
1986
  position
1903
1987
  }), (bytesRead) => {
@@ -1918,7 +2002,7 @@ var makeFile = /* @__PURE__ */ (() => {
1918
2002
  }
1919
2003
  const buffer = Buffer.allocUnsafeSlow(size);
1920
2004
  const position = explicit ?? this.position;
1921
- return map7(nodeReadAlloc(this.fd, {
2005
+ return map8(nodeReadAlloc(this.fd, {
1922
2006
  buffer,
1923
2007
  position
1924
2008
  }), (bytesRead) => {
@@ -1941,7 +2025,7 @@ var makeFile = /* @__PURE__ */ (() => {
1941
2025
  });
1942
2026
  }
1943
2027
  truncate(length) {
1944
- return map7(nodeTruncate(this.fd, length || undefined), () => {
2028
+ return map8(nodeTruncate(this.fd, length || undefined), () => {
1945
2029
  if (!this.append) {
1946
2030
  const len = BigInt(length ?? 0);
1947
2031
  if (this.position > len) {
@@ -1953,7 +2037,7 @@ var makeFile = /* @__PURE__ */ (() => {
1953
2037
  write(buffer) {
1954
2038
  return suspend3(() => {
1955
2039
  const position = this.position;
1956
- return flatMap3(this.append ? succeed6(undefined) : positionToNumber(position, "write"), (nodePosition) => map7(nodeWrite(this.fd, buffer, undefined, undefined, nodePosition), (bytesWritten) => {
2040
+ return flatMap3(this.append ? succeed6(undefined) : positionToNumber(position, "write"), (nodePosition) => map8(nodeWrite(this.fd, buffer, undefined, undefined, nodePosition), (bytesWritten) => {
1957
2041
  if (!this.append) {
1958
2042
  this.position = position + BigInt(bytesWritten);
1959
2043
  }
@@ -2015,7 +2099,7 @@ var readDirectoryEntries = (path) => tryPromise({
2015
2099
  withFileTypes: true
2016
2100
  }),
2017
2101
  catch: (err) => handleErrnoException("FileSystem", "readDirectoryEntries")(err, [path])
2018
- }).pipe(map7((entries) => entries.map((entry) => ({
2102
+ }).pipe(map8((entries) => entries.map((entry) => ({
2019
2103
  name: entry.name,
2020
2104
  type: fileType(entry)
2021
2105
  }))));
@@ -2130,7 +2214,7 @@ var watchNode = (path, info, options) => callback((queue) => acquireRelease(sync
2130
2214
  });
2131
2215
  return watcher;
2132
2216
  }), (watcher) => sync2(() => watcher.close())).pipe(tap2(() => sync2(() => options?.onReady?.()))));
2133
- 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
+ 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);
2134
2218
  var writeFile2 = (path, data, options) => callback3((resume, signal) => {
2135
2219
  try {
2136
2220
  NFS.writeFile(path, data, {
@@ -2148,7 +2232,7 @@ var writeFile2 = (path, data, options) => callback3((resume, signal) => {
2148
2232
  resume(fail7(handleBadArgument("writeFile")(err)));
2149
2233
  }
2150
2234
  });
2151
- var makeFileSystem = /* @__PURE__ */ map7(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make11({
2235
+ var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make11({
2152
2236
  access: access2,
2153
2237
  chmod: chmod2,
2154
2238
  chown: chown2,
@@ -2475,7 +2559,7 @@ var layerWebCrypto = /* @__PURE__ */ effect(SecureRandom, /* @__PURE__ */ WebCry
2475
2559
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Cookies.js
2476
2560
  var TypeId4 = "~effect/http/Cookies";
2477
2561
  var CookieTypeId = "~effect/http/Cookies/Cookie";
2478
- var Proto = {
2562
+ var Proto2 = {
2479
2563
  [TypeId4]: TypeId4,
2480
2564
  ...BaseProto,
2481
2565
  toJSON() {
@@ -2489,7 +2573,7 @@ var Proto = {
2489
2573
  }
2490
2574
  };
2491
2575
  var fromReadonlyRecord = (cookies) => {
2492
- const self = Object.create(Proto);
2576
+ const self = Object.create(Proto2);
2493
2577
  self.cookies = cookies;
2494
2578
  return self;
2495
2579
  };
@@ -2656,13 +2740,13 @@ var tryDecodeURIComponent = (str) => {
2656
2740
 
2657
2741
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Headers.js
2658
2742
  var TypeId5 = /* @__PURE__ */ Symbol.for("~effect/http/Headers");
2659
- var Proto2 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
2743
+ var Proto3 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
2660
2744
  [TypeId5]: {
2661
2745
  value: TypeId5
2662
2746
  },
2663
2747
  [symbolRedactable]: {
2664
2748
  value(context) {
2665
- return redact2(this, get3(context, CurrentRedactedNames));
2749
+ return redact2(this, get4(context, CurrentRedactedNames));
2666
2750
  }
2667
2751
  },
2668
2752
  toJSON: {
@@ -2672,7 +2756,7 @@ var Proto2 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
2672
2756
  },
2673
2757
  [symbol2]: {
2674
2758
  value(that) {
2675
- return Equivalence(this, that);
2759
+ return Equivalence2(this, that);
2676
2760
  }
2677
2761
  },
2678
2762
  [symbol]: {
@@ -2687,20 +2771,20 @@ var Proto2 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
2687
2771
  value: BaseProto[NodeInspectSymbol]
2688
2772
  }
2689
2773
  });
2690
- var make22 = (input) => Object.assign(Object.create(Proto2), input);
2691
- var Equivalence = /* @__PURE__ */ makeEquivalence(/* @__PURE__ */ strictEqual());
2692
- var empty = /* @__PURE__ */ Object.create(Proto2);
2774
+ var make22 = (input) => Object.assign(Object.create(Proto3), input);
2775
+ var Equivalence2 = /* @__PURE__ */ makeEquivalence(/* @__PURE__ */ strictEqual());
2776
+ var empty = /* @__PURE__ */ Object.create(Proto3);
2693
2777
  var fromInput = (input) => {
2694
2778
  if (input === undefined) {
2695
2779
  return empty;
2696
2780
  } else if (Symbol.iterator in input) {
2697
- const out = Object.create(Proto2);
2781
+ const out = Object.create(Proto3);
2698
2782
  for (const [k, v] of input) {
2699
2783
  out[k.toLowerCase()] = v;
2700
2784
  }
2701
2785
  return out;
2702
2786
  }
2703
- const out = Object.create(Proto2);
2787
+ const out = Object.create(Proto3);
2704
2788
  for (const [k, v] of Object.entries(input)) {
2705
2789
  if (Array.isArray(v)) {
2706
2790
  out[k.toLowerCase()] = v.join(", ");
@@ -2710,7 +2794,7 @@ var fromInput = (input) => {
2710
2794
  }
2711
2795
  return out;
2712
2796
  };
2713
- var fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto2);
2797
+ var fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto3);
2714
2798
  var set = /* @__PURE__ */ dual(3, (self, key, value) => {
2715
2799
  const out = make22(self);
2716
2800
  out[key.toLowerCase()] = value;
@@ -2738,12 +2822,12 @@ var redact2 = /* @__PURE__ */ dual(2, (self, key) => {
2738
2822
  if (typeof key === "string") {
2739
2823
  const k = key.toLowerCase();
2740
2824
  if (k in self) {
2741
- out[k] = make(self[k]);
2825
+ out[k] = make16(self[k]);
2742
2826
  }
2743
2827
  } else {
2744
2828
  for (const name in self) {
2745
2829
  if (name.search(key) !== -1) {
2746
- out[name] = make(self[name]);
2830
+ out[name] = make16(self[name]);
2747
2831
  }
2748
2832
  }
2749
2833
  }
@@ -2785,7 +2869,7 @@ var fromBody = (bytes) => new URLSearchParams(bodyDecoder.decode(bytes).replace(
2785
2869
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/UrlParams.js
2786
2870
  var TypeId6 = "~effect/http/UrlParams";
2787
2871
  var isUrlParams = (u) => hasProperty(u, TypeId6);
2788
- var Proto3 = {
2872
+ var Proto4 = {
2789
2873
  ...PipeInspectableProto,
2790
2874
  [TypeId6]: TypeId6,
2791
2875
  [Symbol.iterator]() {
@@ -2794,21 +2878,21 @@ var Proto3 = {
2794
2878
  [symbolRedactable](context) {
2795
2879
  return {
2796
2880
  _id: "UrlParams",
2797
- params: Object.fromEntries(redact3(this, get3(context, CurrentRedactedNames2)))
2881
+ params: Object.fromEntries(redact3(this, get4(context, CurrentRedactedNames2)))
2798
2882
  };
2799
2883
  },
2800
2884
  toJSON() {
2801
2885
  return redact(this);
2802
2886
  },
2803
2887
  [symbol2](that) {
2804
- return Equivalence2(this, that);
2888
+ return Equivalence3(this, that);
2805
2889
  },
2806
2890
  [symbol]() {
2807
2891
  return array(this.params.flat());
2808
2892
  }
2809
2893
  };
2810
2894
  var make23 = (params) => {
2811
- const self = Object.create(Proto3);
2895
+ const self = Object.create(Proto4);
2812
2896
  self.params = params;
2813
2897
  return self;
2814
2898
  };
@@ -2850,7 +2934,7 @@ var fromInputNested = (input) => {
2850
2934
  return out;
2851
2935
  };
2852
2936
  var coerce = (value) => isRedacted(value) ? value : String(value);
2853
- var Equivalence2 = /* @__PURE__ */ make13((a, b) => arrayEquivalence(a.params, b.params));
2937
+ var Equivalence3 = /* @__PURE__ */ make13((a, b) => arrayEquivalence(a.params, b.params));
2854
2938
  var arrayEquivalence = /* @__PURE__ */ makeEquivalence2(/* @__PURE__ */ makeEquivalence3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
2855
2939
  var empty4 = /* @__PURE__ */ make23([]);
2856
2940
  var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
@@ -2869,7 +2953,7 @@ var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
2869
2953
  var toString = (input) => new URLSearchParams(fromInput2(input).params.map(([key, value]) => [key, unwrap3(value)])).toString();
2870
2954
  var redact3 = /* @__PURE__ */ dual(2, (self, key) => {
2871
2955
  const patterns = Array.isArray(key) ? key : [key];
2872
- return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ? make(value) : value]);
2956
+ return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ? make16(value) : value]);
2873
2957
  });
2874
2958
  var isRedactedName2 = isRedactedName;
2875
2959
  var redactUrl = (url, redactedNames = currentRedactedNames()) => {
@@ -2920,7 +3004,7 @@ var decodeQueryKey = (key) => {
2920
3004
  return key;
2921
3005
  }
2922
3006
  };
2923
- var currentRedactedNames = () => get3(globalThis[currentFiberTypeId]?.context ?? empty3(), CurrentRedactedNames2);
3007
+ var currentRedactedNames = () => get4(globalThis[currentFiberTypeId]?.context ?? empty3(), CurrentRedactedNames2);
2924
3008
  var CurrentRedactedNames2 = /* @__PURE__ */ Reference("effect/http/UrlParams/CurrentRedactedNames", {
2925
3009
  defaultValue: () => ["X-Amz-Signature", "X-Amz-Credential", "X-Amz-Security-Token", "AWSAccessKeyId", "Signature", "sig", "X-Goog-Signature"]
2926
3010
  });
@@ -2945,7 +3029,7 @@ import * as readline from "readline";
2945
3029
  var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
2946
3030
  const stdin = process.stdin;
2947
3031
  const stdout = process.stdout;
2948
- const lines = yield* make9();
3032
+ const lines = yield* make8();
2949
3033
  let inputEnded = stdin.readableEnded;
2950
3034
  let readlineActive = false;
2951
3035
  const onStdinEnd = () => {
@@ -2956,7 +3040,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
2956
3040
  };
2957
3041
  stdin.once("end", onStdinEnd);
2958
3042
  yield* addFinalizer2(() => sync2(() => stdin.off("end", onStdinEnd)));
2959
- const rlRef = yield* make18({
3043
+ const rlRef = yield* make9({
2960
3044
  acquire: acquireRelease(sync2(() => {
2961
3045
  const rl = readline.createInterface({
2962
3046
  input: stdin,
@@ -2995,7 +3079,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
2995
3079
  if (stdin.isTTY)
2996
3080
  stdin.setRawMode(enabled);
2997
3081
  });
2998
- const rawModeRef = yield* make18({
3082
+ const rawModeRef = yield* make9({
2999
3083
  acquire: acquireRelease(setRawMode(true), () => setRawMode(false)),
3000
3084
  idleTimeToLive: "10 millis"
3001
3085
  });
@@ -3016,7 +3100,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3016
3100
  return queue;
3017
3101
  });
3018
3102
  const readInput = gen(function* () {
3019
- const queue = yield* make9();
3103
+ const queue = yield* make8();
3020
3104
  const handleKeypress = (s, k) => {
3021
3105
  const userInput = {
3022
3106
  input: fromUndefinedOr(s),
@@ -3046,14 +3130,14 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3046
3130
  if (inputEnded) {
3047
3131
  handleEnd();
3048
3132
  } else {
3049
- yield* get5(rlRef);
3050
- yield* get5(rawModeRef);
3133
+ yield* get3(rlRef);
3134
+ yield* get3(rawModeRef);
3051
3135
  stdin.once("end", handleEnd);
3052
3136
  }
3053
3137
  return queue;
3054
3138
  });
3055
3139
  const readLine = suspend3(() => poll(lines).pipe(flatMap3(match({
3056
- onNone: () => scoped(andThen2(get5(rlRef), take(lines))),
3140
+ onNone: () => scoped(andThen2(get3(rlRef), take(lines))),
3057
3141
  onSome: succeed6
3058
3142
  })), mapError2(() => new QuitError({}))));
3059
3143
  const display = (prompt) => uninterruptible(callback3((resume) => {
@@ -3097,17 +3181,17 @@ var log = (...args) => consoleWith((console) => sync(() => {
3097
3181
 
3098
3182
  // packages/core/src/time.ts
3099
3183
  function toDate(input) {
3100
- return toDateUtc(makeUnsafe6(input));
3184
+ return toDateUtc2(makeUnsafe(input));
3101
3185
  }
3102
3186
  function parseDate(input) {
3103
- return getOrUndefined(map4(make16(input), toDateUtc));
3187
+ return getOrUndefined(map4(make18(input), toDateUtc2));
3104
3188
  }
3105
3189
  function toIso(input) {
3106
- return formatIso(makeUnsafe6(input));
3190
+ return formatIso(makeUnsafe(input));
3107
3191
  }
3108
- var currentDate = map7(now, toDateUtc);
3192
+ var currentDate = map8(now2, toDateUtc2);
3109
3193
  function wallClockMillis() {
3110
- return toEpochMillis(nowUnsafe());
3194
+ return toEpochMillis2(nowUnsafe2());
3111
3195
  }
3112
3196
 
3113
3197
  // packages/core/src/waiting-on.ts
@@ -6732,7 +6816,7 @@ var WorkUnitLease = Struct({
6732
6816
  leaseExpiresAt: Timestamp,
6733
6817
  lastHeartbeatAt: Timestamp
6734
6818
  });
6735
- var WorkUnitLeaseProjection = Struct(map8(WorkUnitLease.fields, optionalKey));
6819
+ var WorkUnitLeaseProjection = Struct(map9(WorkUnitLease.fields, optionalKey));
6736
6820
  var WorkUnitRepoBinding = Struct({
6737
6821
  id: Id,
6738
6822
  provider: RepoBindingProvider,
@@ -9570,7 +9654,7 @@ var TranscriptSearchResult = Struct({
9570
9654
  });
9571
9655
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpBody.js
9572
9656
  var TypeId8 = "~effect/http/HttpBody";
9573
- class Proto4 {
9657
+ class Proto5 {
9574
9658
  [TypeId8];
9575
9659
  constructor() {
9576
9660
  this[TypeId8] = TypeId8;
@@ -9585,7 +9669,7 @@ class Proto4 {
9585
9669
  }
9586
9670
  }
9587
9671
 
9588
- class Empty extends Proto4 {
9672
+ class Empty extends Proto5 {
9589
9673
  _tag = "Empty";
9590
9674
  toJSON() {
9591
9675
  return {
@@ -9596,7 +9680,7 @@ class Empty extends Proto4 {
9596
9680
  }
9597
9681
  var empty5 = /* @__PURE__ */ new Empty;
9598
9682
 
9599
- class Raw extends Proto4 {
9683
+ class Raw extends Proto5 {
9600
9684
  _tag = "Raw";
9601
9685
  body;
9602
9686
  contentType;
@@ -9619,7 +9703,7 @@ class Raw extends Proto4 {
9619
9703
  }
9620
9704
  var raw = (body, options) => new Raw(body, options?.contentType, options?.contentLength);
9621
9705
 
9622
- class Uint8Array2 extends Proto4 {
9706
+ class Uint8Array2 extends Proto5 {
9623
9707
  _tag = "Uint8Array";
9624
9708
  contentType;
9625
9709
  contentLength;
@@ -9846,7 +9930,7 @@ var baseUrl = () => {
9846
9930
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpClientRequest.js
9847
9931
  var TypeId10 = "~effect/http/HttpClientRequest";
9848
9932
  var isHttpClientRequest = (u) => hasProperty(u, TypeId10);
9849
- var Proto5 = {
9933
+ var Proto6 = {
9850
9934
  [TypeId10]: TypeId10,
9851
9935
  ...BaseProto,
9852
9936
  toJSON() {
@@ -9865,7 +9949,7 @@ var Proto5 = {
9865
9949
  }
9866
9950
  };
9867
9951
  function makeWith(method, url, urlParams, hash, headers, body) {
9868
- const self = Object.create(Proto5);
9952
+ const self = Object.create(Proto6);
9869
9953
  self.method = method;
9870
9954
  self.url = url;
9871
9955
  self.urlParams = urlParams;
@@ -9875,14 +9959,14 @@ function makeWith(method, url, urlParams, hash, headers, body) {
9875
9959
  return self;
9876
9960
  }
9877
9961
  var empty6 = /* @__PURE__ */ makeWith("GET", "", empty4, /* @__PURE__ */ none(), empty, empty5);
9878
- var make5 = (method) => (url, options) => modify(empty6, {
9962
+ var make4 = (method) => (url, options) => modify(empty6, {
9879
9963
  method,
9880
9964
  url,
9881
9965
  ...options ?? undefined
9882
9966
  });
9883
- var get = /* @__PURE__ */ make5("GET");
9884
- var post = /* @__PURE__ */ make5("POST");
9885
- var put = /* @__PURE__ */ make5("PUT");
9967
+ var get = /* @__PURE__ */ make4("GET");
9968
+ var post = /* @__PURE__ */ make4("POST");
9969
+ var put = /* @__PURE__ */ make4("PUT");
9886
9970
  var modify = /* @__PURE__ */ dual(2, (self, options) => {
9887
9971
  let result = self;
9888
9972
  if (options.method) {
@@ -10052,7 +10136,7 @@ class WebHttpClientResponse extends Class {
10052
10136
  }
10053
10137
  textBody;
10054
10138
  get text() {
10055
- return this.textBody ??= map7(this.arrayBuffer, (_) => new TextDecoder().decode(_));
10139
+ return this.textBody ??= map8(this.arrayBuffer, (_) => new TextDecoder().decode(_));
10056
10140
  }
10057
10141
  get urlParamsBody() {
10058
10142
  return flatMap3(this.arrayBuffer, (bytes) => try_2({
@@ -10163,7 +10247,7 @@ var get2 = /* @__PURE__ */ accessor("get");
10163
10247
  var transform = /* @__PURE__ */ dual(2, (self, f) => makeWith2(flatMap3((request) => f(self.postprocess(succeed6(request)), request)), self.preprocess));
10164
10248
  var transformResponse = /* @__PURE__ */ dual(2, (self, f) => makeWith2((request) => f(self.postprocess(request)), self.preprocess));
10165
10249
  var makeWith2 = (postprocess, preprocess) => {
10166
- const self = Object.create(Proto6);
10250
+ const self = Object.create(Proto7);
10167
10251
  self.preprocess = preprocess;
10168
10252
  self.postprocess = postprocess;
10169
10253
  self.execute = function(request) {
@@ -10171,7 +10255,7 @@ var makeWith2 = (postprocess, preprocess) => {
10171
10255
  };
10172
10256
  return self;
10173
10257
  };
10174
- var Proto6 = {
10258
+ var Proto7 = {
10175
10259
  [TypeId13]: TypeId13,
10176
10260
  pipe() {
10177
10261
  return pipeArguments(this, arguments);
@@ -10183,7 +10267,7 @@ var Proto6 = {
10183
10267
  };
10184
10268
  },
10185
10269
  .../* @__PURE__ */ Object.fromEntries(/* @__PURE__ */ allShort.map(([fullMethod, method]) => [method, function(url, options) {
10186
- return this.execute(make5(fullMethod)(url, options));
10270
+ return this.execute(make4(fullMethod)(url, options));
10187
10271
  }]))
10188
10272
  };
10189
10273
  var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFiber2((fiber) => {
@@ -10203,7 +10287,7 @@ var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFibe
10203
10287
  if (tracerDisabled) {
10204
10288
  const effect = f(request, url, controller.signal, fiber);
10205
10289
  if (scopedController)
10206
- return map7(effect, (response) => trackResponse(response, controller, true));
10290
+ return map8(effect, (response) => trackResponse(response, controller, true));
10207
10291
  return uninterruptibleMask2((restore) => matchCauseEffect(restore(effect), {
10208
10292
  onSuccess(response) {
10209
10293
  return succeed6(trackResponse(response, controller, false));
@@ -10274,7 +10358,7 @@ var TracerPropagationEnabled = /* @__PURE__ */ Reference("effect/http/HttpClient
10274
10358
  var SpanNameGenerator = /* @__PURE__ */ Reference("effect/http/HttpClient/SpanNameGenerator", {
10275
10359
  defaultValue: () => (request) => request.method
10276
10360
  });
10277
- var layerMergedContext = (effect2) => effect(HttpClient)(contextWith((context) => map7(effect2, (client) => transformResponse(client, updateContext((input) => merge3(context, input))))));
10361
+ var layerMergedContext = (effect2) => effect(HttpClient)(contextWith((context) => map8(effect2, (client) => transformResponse(client, updateContext((input) => merge3(context, input))))));
10278
10362
  var responseRegistry = /* @__PURE__ */ (() => {
10279
10363
  if ("FinalizationRegistry" in globalThis && globalThis.FinalizationRegistry) {
10280
10364
  const registry = /* @__PURE__ */ new FinalizationRegistry((controller) => {
@@ -10439,7 +10523,7 @@ var fetch2 = /* @__PURE__ */ make27((request, url, signal, fiber) => {
10439
10523
  }
10440
10524
  let uploadController;
10441
10525
  const stopUpload = sync2(() => uploadController?.abort());
10442
- const send = (body) => map7(tryPromise({
10526
+ const send = (body) => map8(tryPromise({
10443
10527
  try: () => fetch2(url, {
10444
10528
  ...options,
10445
10529
  method: request.method,
@@ -10610,14 +10694,14 @@ var layerWebSocketConstructorGlobal = /* @__PURE__ */ succeed5(WebSocketConstruc
10610
10694
  }
10611
10695
  return new globalThis.WebSocket(url, options);
10612
10696
  });
10613
- 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 : {
10697
+ 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 : {
10614
10698
  protocols: options.protocols,
10615
10699
  headers: options.headers
10616
10700
  }))), (ws) => sync2(() => ws.close(1000))), options));
10617
10701
  var isPausable = (ws) => ("pause" in ws) && typeof ws.pause === "function";
10618
10702
  var fromWebSocket = (acquire, options) => withFiber2((fiber) => {
10619
10703
  let currentWS;
10620
- const latch = makeUnsafe(false);
10704
+ const latch = makeUnsafe2(false);
10621
10705
  const acquireContext = fiber.context;
10622
10706
  const reader = gen(function* () {
10623
10707
  const scope = yield* scope2;
@@ -11245,7 +11329,7 @@ var effectMetrics = new Map(MetricDefinitions.map((definition) => {
11245
11329
  var processTelemetryRegistry = new Map;
11246
11330
  var processMetricRegistry = new Map;
11247
11331
  var collectorTimeout = "10 seconds";
11248
- var collectorHttpClient = effect(HttpClient)(map7(HttpClient, (client) => transform(client, (response, request) => timeoutOrElse(response, {
11332
+ var collectorHttpClient = effect(HttpClient)(map8(HttpClient, (client) => transform(client, (response, request) => timeoutOrElse(response, {
11249
11333
  duration: collectorTimeout,
11250
11334
  orElse: () => fail7(new HttpClientError({
11251
11335
  reason: new TransportError({
@@ -13144,7 +13228,7 @@ class KitmanEffectClient {
13144
13228
  return tryPromise({
13145
13229
  try: () => this.fetchImpl(this.url(path), { ...init, headers, signal: abort.signal }),
13146
13230
  catch: failed
13147
- }).pipe(flatMap3((answer) => tryPromise({ try: () => answer.arrayBuffer(), catch: failed }).pipe(map7((body) => new Response(body.byteLength === 0 ? null : body, answer)))), onInterrupt(() => sync2(() => abort.abort())));
13231
+ }).pipe(flatMap3((answer) => tryPromise({ try: () => answer.arrayBuffer(), catch: failed }).pipe(map8((body) => new Response(body.byteLength === 0 ? null : body, answer)))), onInterrupt(() => sync2(() => abort.abort())));
13148
13232
  });
13149
13233
  const response = yield* method !== "GET" ? send.pipe(retry({ schedule: unansweredGetRetry, times: 5, while: refusedConnection })) : sendAndRead.pipe(timeoutOrElse({
13150
13234
  duration: getAnswerTimeout,
@@ -13206,8 +13290,8 @@ class KitmanEffectClient {
13206
13290
  function errorResponseDetails(response) {
13207
13291
  const contentType = response.headers.get("content-type") ?? "";
13208
13292
  if (contentType.includes("application/json"))
13209
- return tryPromise(() => response.json()).pipe(map7(parseErrorResponse), orElseSucceed(() => ({})));
13210
- return tryPromise(() => response.text()).pipe(map7((text) => {
13293
+ return tryPromise(() => response.json()).pipe(map8(parseErrorResponse), orElseSucceed(() => ({})));
13294
+ return tryPromise(() => response.text()).pipe(map8((text) => {
13211
13295
  const message = sanitizeErrorDetail(text);
13212
13296
  return message === undefined ? {} : { message };
13213
13297
  }), orElseSucceed(() => ({})));
@@ -13503,13 +13587,13 @@ function resolveConfig(input) {
13503
13587
  ...userAgentPreferences === undefined ? undefined : { userAgentPreferences }
13504
13588
  };
13505
13589
  }
13506
- var apiUrlFromEnv = String2("KITMAN_API_URL").pipe(option, map7(getOrUndefined));
13507
- var stepCredentialFromEnv = String2("KITMAN_STEP_CREDENTIAL").pipe(option, map7(getOrUndefined));
13508
- var stepWorkspaceFromEnv = String2("KITMAN_STEP_WORKSPACE").pipe(option, map7(getOrUndefined));
13509
- var stepSkillsDirFromEnv = String2("KITMAN_STEP_SKILLS_DIR").pipe(option, map7(getOrUndefined));
13510
- var stepFittingSkillsFromEnv = String2("KITMAN_STEP_FITTING_SKILLS").pipe(option, map7((names) => getOrElse(names, () => "").split(",").filter((name) => name !== "")));
13511
- var stepOutputOnlyFromEnv = String2("KITMAN_STEP_TOOLS").pipe(option, map7((tools) => getOrUndefined(tools) === "output"));
13512
- var mcpCredentialNameFromEnv = String2("KITMAN_MCP_CREDENTIAL_NAME").pipe(option, map7(getOrUndefined));
13590
+ var apiUrlFromEnv = String2("KITMAN_API_URL").pipe(option, map8(getOrUndefined));
13591
+ var stepCredentialFromEnv = String2("KITMAN_STEP_CREDENTIAL").pipe(option, map8(getOrUndefined));
13592
+ var stepWorkspaceFromEnv = String2("KITMAN_STEP_WORKSPACE").pipe(option, map8(getOrUndefined));
13593
+ var stepSkillsDirFromEnv = String2("KITMAN_STEP_SKILLS_DIR").pipe(option, map8(getOrUndefined));
13594
+ var stepFittingSkillsFromEnv = String2("KITMAN_STEP_FITTING_SKILLS").pipe(option, map8((names) => getOrElse(names, () => "").split(",").filter((name) => name !== "")));
13595
+ var stepOutputOnlyFromEnv = String2("KITMAN_STEP_TOOLS").pipe(option, map8((tools) => getOrUndefined(tools) === "output"));
13596
+ var mcpCredentialNameFromEnv = String2("KITMAN_MCP_CREDENTIAL_NAME").pipe(option, map8(getOrUndefined));
13513
13597
  var kitmanConfigDir = gen(function* () {
13514
13598
  const path = yield* Path;
13515
13599
  const xdgConfigHome = yield* String2("XDG_CONFIG_HOME").pipe(option);
@@ -13527,7 +13611,7 @@ var userHarnessSyncPath = configFile("harness-sync.json");
13527
13611
  var kitSetupCacheDir = configFile("kit-setups");
13528
13612
  var bundleCacheDir = configFile("bundles");
13529
13613
  var runnerReleaseChannelPath = (runnerId) => configFile(`runner-release-channels/${runnerId}`);
13530
- var localConfigPath = Path.pipe(map7((path) => path.resolve(".kitman/config.json")));
13614
+ var localConfigPath = Path.pipe(map8((path) => path.resolve(".kitman/config.json")));
13531
13615
  function readUserConfig(path) {
13532
13616
  return gen(function* () {
13533
13617
  const filePath = path ?? (yield* userConfigPath);
@@ -13655,7 +13739,7 @@ function sessionForApi(auth, apiUrl) {
13655
13739
  return auth.sessions[normalizeApiUrl(apiUrl)];
13656
13740
  }
13657
13741
  function readAuthStore(path) {
13658
- return readUserAuth(path).pipe(map7((auth) => isAuthStore(auth) ? normalizeAuthStore(auth) : { sessions: {} }), catchTag("SchemaError", () => succeed6({ sessions: {} })));
13742
+ return readUserAuth(path).pipe(map8((auth) => isAuthStore(auth) ? normalizeAuthStore(auth) : { sessions: {} }), catchTag("SchemaError", () => succeed6({ sessions: {} })));
13659
13743
  }
13660
13744
  function writeAuthStore(auth, path) {
13661
13745
  return writeUserAuth(auth, path);
@@ -13803,7 +13887,7 @@ function Stream(success, error) {
13803
13887
 
13804
13888
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/rpc/Rpc.js
13805
13889
  var TypeId15 = "~effect/rpc/Rpc";
13806
- var Proto7 = {
13890
+ var Proto8 = {
13807
13891
  [TypeId15]: TypeId15,
13808
13892
  pipe() {
13809
13893
  return pipeArguments(this, arguments);
@@ -13888,12 +13972,12 @@ var Proto7 = {
13888
13972
  };
13889
13973
  var makeProto = (options) => {
13890
13974
  function Rpc() {}
13891
- Object.setPrototypeOf(Rpc, Proto7);
13975
+ Object.setPrototypeOf(Rpc, Proto8);
13892
13976
  Object.assign(Rpc, options);
13893
13977
  Rpc.key = `effect/rpc/Rpc/${options._tag}`;
13894
13978
  return Rpc;
13895
13979
  };
13896
- var make6 = (tag, options) => {
13980
+ var make5 = (tag, options) => {
13897
13981
  const successSchema = options?.success ?? Void;
13898
13982
  const errorSchema = options?.error ?? Never;
13899
13983
  const defectSchema = options?.defect ?? Defect();
@@ -14014,7 +14098,7 @@ var RpcGroupProto = {
14014
14098
  }
14015
14099
  return makeProto2({
14016
14100
  requests,
14017
- annotations: makeUnsafe3(annotations)
14101
+ annotations: makeUnsafe4(annotations)
14018
14102
  });
14019
14103
  },
14020
14104
  omit(...tags) {
@@ -14050,7 +14134,7 @@ var RpcGroupProto = {
14050
14134
  context: services
14051
14135
  });
14052
14136
  });
14053
- return makeUnsafe3(contextMap);
14137
+ return makeUnsafe4(contextMap);
14054
14138
  });
14055
14139
  },
14056
14140
  prefix(prefix) {
@@ -14079,7 +14163,7 @@ var RpcGroupProto = {
14079
14163
  handler,
14080
14164
  context: services
14081
14165
  });
14082
- return makeUnsafe3(contextMap);
14166
+ return makeUnsafe4(contextMap);
14083
14167
  }));
14084
14168
  },
14085
14169
  accessHandler(service) {
@@ -14127,7 +14211,7 @@ var makeProto2 = (options) => Object.assign(function() {}, RpcGroupProto, {
14127
14211
  requests: options.requests,
14128
14212
  annotations: options.annotations
14129
14213
  });
14130
- var make7 = (...rpcs) => makeProto2({
14214
+ var make6 = (...rpcs) => makeProto2({
14131
14215
  requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
14132
14216
  annotations: empty3()
14133
14217
  });
@@ -14233,96 +14317,96 @@ var ProgramOutcome = Union([
14233
14317
  Struct({ status: Literal("failed"), failureSummary: String4 })
14234
14318
  ]);
14235
14319
 
14236
- class RunnerReplicaRpcs extends make7(make6("Claim", {
14320
+ class RunnerReplicaRpcs extends make6(make5("Claim", {
14237
14321
  payload: WorkUnitClaimInput,
14238
14322
  success: WorkUnitClaimResult,
14239
14323
  error: RunnerRpcError
14240
- }), make6("Heartbeat", {
14324
+ }), make5("Heartbeat", {
14241
14325
  payload: WorkUnitHeartbeatInput,
14242
14326
  success: WorkUnitHeartbeatResult,
14243
14327
  error: RunnerRpcError
14244
- }), make6("Complete", {
14328
+ }), make5("Complete", {
14245
14329
  payload: WorkUnitCompletion,
14246
14330
  error: RunnerRpcError
14247
- }), make6("Release", {
14331
+ }), make5("Release", {
14248
14332
  payload: WorkUnitReleaseInput,
14249
14333
  error: RunnerRpcError
14250
- }), make6("Signals", {
14334
+ }), make5("Signals", {
14251
14335
  payload: { runnerReplicaId: String4 },
14252
14336
  success: RunnerSignal,
14253
14337
  error: RunnerRpcError,
14254
14338
  stream: true
14255
- }), make6("ReportSteer", {
14339
+ }), make5("ReportSteer", {
14256
14340
  payload: { workUnitId: String4, messageId: String4, delivered: Boolean2 },
14257
14341
  success: Void,
14258
14342
  error: RunnerRpcError
14259
- }), make6("AppendTranscript", {
14343
+ }), make5("AppendTranscript", {
14260
14344
  payload: { workUnitId: String4, entries: ArraySchema(TranscriptAppendEntry).check(isMaxLength(100)) },
14261
14345
  success: Void,
14262
14346
  error: RunnerRpcError
14263
- }), make6("CreateCheckpointFile", {
14347
+ }), make5("CreateCheckpointFile", {
14264
14348
  payload: { lease: ProgramLease, byteSize: Int, sha256: String4 },
14265
14349
  success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
14266
14350
  error: Union([RunnerRpcError, RunFileRefused])
14267
- }), make6("CheckpointFileParts", {
14351
+ }), make5("CheckpointFileParts", {
14268
14352
  payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
14269
14353
  success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
14270
14354
  error: RunnerRpcError
14271
- }), make6("CompleteCheckpointFile", {
14355
+ }), make5("CompleteCheckpointFile", {
14272
14356
  payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
14273
14357
  success: RunFileRecord,
14274
14358
  error: RunnerRpcError
14275
- }), make6("SaveCheckpoint", {
14359
+ }), make5("SaveCheckpoint", {
14276
14360
  payload: { lease: ProgramLease, checkpoint: StepCheckpoint },
14277
14361
  success: Void,
14278
14362
  error: RunnerRpcError
14279
- }), make6("ResumeCheckpoint", {
14363
+ }), make5("ResumeCheckpoint", {
14280
14364
  payload: { lease: ProgramLease },
14281
14365
  success: UndefinedOr(ResumedCheckpoint),
14282
14366
  error: RunnerRpcError
14283
- }), make6("SettledCheckpoints", {
14367
+ }), make5("SettledCheckpoints", {
14284
14368
  success: ArraySchema(Struct({
14285
14369
  stepAttemptId: String4,
14286
14370
  ref: optionalKey(String4),
14287
14371
  repoBinding: optionalKey(WorkUnitRepoBinding)
14288
14372
  })),
14289
14373
  error: RunnerRpcError
14290
- }), make6("ForgetCheckpoints", {
14374
+ }), make5("ForgetCheckpoints", {
14291
14375
  payload: { stepAttemptIds: ArraySchema(String4) },
14292
14376
  success: Void,
14293
14377
  error: RunnerRpcError
14294
- }), make6("GitCredential", {
14378
+ }), make5("GitCredential", {
14295
14379
  payload: { repoBindingId: String4 },
14296
14380
  success: UndefinedOr(Struct({ username: String4, password: String4 })),
14297
14381
  error: RunnerRpcError
14298
- }), make6("Bundle", {
14382
+ }), make5("Bundle", {
14299
14383
  payload: { digest: String4 },
14300
14384
  success: Struct({ bundle: String4 }),
14301
14385
  error: RunnerRpcError
14302
- }), make6("SettledRuns", {
14386
+ }), make5("SettledRuns", {
14303
14387
  payload: { runIds: ArraySchema(String4) },
14304
14388
  success: ArraySchema(String4),
14305
14389
  error: RunnerRpcError
14306
- }), make6("KnownEvidence", {
14390
+ }), make5("KnownEvidence", {
14307
14391
  payload: { lease: ProgramLease, trees: ArraySchema(String4) },
14308
14392
  success: ArraySchema(Struct({ tree: String4, name: String4, command: String4 })),
14309
14393
  error: RunnerRpcError
14310
14394
  })).middleware(RunnerAuthentication) {
14311
14395
  }
14312
14396
 
14313
- class RunnerJournalRpcs extends make7(make6("RecordActivity", {
14397
+ class RunnerJournalRpcs extends make6(make5("RecordActivity", {
14314
14398
  payload: { lease: ProgramLease, name: String4, attempt: Int, exit: Json },
14315
14399
  error: RunnerRpcError
14316
- }), make6("DeferredDone", {
14400
+ }), make5("DeferredDone", {
14317
14401
  payload: { lease: ProgramLease, name: String4, exit: Json },
14318
14402
  error: RunnerRpcError
14319
- }), make6("ScheduleClock", {
14403
+ }), make5("ScheduleClock", {
14320
14404
  payload: { lease: ProgramLease, name: String4, deferredName: String4, durationMillis: Int },
14321
14405
  error: RunnerRpcError
14322
- }), make6("Suspend", { payload: { lease: ProgramLease }, error: RunnerRpcError }), make6("FinishProgram", { payload: { lease: ProgramLease, outcome: ProgramOutcome }, error: RunnerRpcError })).middleware(RunnerAuthentication) {
14406
+ }), make5("Suspend", { payload: { lease: ProgramLease }, error: RunnerRpcError }), make5("FinishProgram", { payload: { lease: ProgramLease, outcome: ProgramOutcome }, error: RunnerRpcError })).middleware(RunnerAuthentication) {
14323
14407
  }
14324
14408
 
14325
- class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14409
+ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14326
14410
  payload: {
14327
14411
  lease: ProgramLease,
14328
14412
  step: String4,
@@ -14342,7 +14426,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14342
14426
  },
14343
14427
  success: Struct({ questionId: String4 }),
14344
14428
  error: RunnerRpcError
14345
- }), make6("StartAgentStep", {
14429
+ }), make5("StartAgentStep", {
14346
14430
  payload: {
14347
14431
  lease: ProgramLease,
14348
14432
  step: String4,
@@ -14358,7 +14442,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14358
14442
  },
14359
14443
  success: Struct({ stepAttemptId: String4 }),
14360
14444
  error: RunnerRpcError
14361
- }), make6("StartVerification", {
14445
+ }), make5("StartVerification", {
14362
14446
  payload: {
14363
14447
  lease: ProgramLease,
14364
14448
  step: String4,
@@ -14379,7 +14463,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14379
14463
  },
14380
14464
  success: Struct({ verificationId: String4 }),
14381
14465
  error: RunnerRpcError
14382
- }), make6("AwaitEvent", {
14466
+ }), make5("AwaitEvent", {
14383
14467
  payload: {
14384
14468
  lease: ProgramLease,
14385
14469
  step: String4,
@@ -14395,7 +14479,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14395
14479
  })))
14396
14480
  },
14397
14481
  error: RunnerRpcError
14398
- }), make6("ClaimResource", {
14482
+ }), make5("ClaimResource", {
14399
14483
  payload: {
14400
14484
  lease: ProgramLease,
14401
14485
  step: String4,
@@ -14404,7 +14488,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14404
14488
  action: Literals(["claim", "take_over", "let_go"])
14405
14489
  },
14406
14490
  error: RunnerRpcError
14407
- }), make6("AdmitChild", {
14491
+ }), make5("AdmitChild", {
14408
14492
  payload: {
14409
14493
  lease: ProgramLease,
14410
14494
  step: String4,
@@ -14415,7 +14499,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14415
14499
  },
14416
14500
  success: Struct({ runId: String4 }),
14417
14501
  error: RunnerRpcError
14418
- }), make6("StoreArtifact", {
14502
+ }), make5("StoreArtifact", {
14419
14503
  payload: {
14420
14504
  lease: ProgramLease,
14421
14505
  step: String4,
@@ -14427,7 +14511,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14427
14511
  },
14428
14512
  success: Struct({ artifactId: String4 }),
14429
14513
  error: RunnerRpcError
14430
- }), make6("RecordNote", {
14514
+ }), make5("RecordNote", {
14431
14515
  payload: {
14432
14516
  lease: ProgramLease,
14433
14517
  step: String4,
@@ -14436,7 +14520,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14436
14520
  kind: optional(Literals(["note", "blocker"]))
14437
14521
  },
14438
14522
  error: RunnerRpcError
14439
- }), make6("PerformHostEffect", {
14523
+ }), make5("PerformHostEffect", {
14440
14524
  payload: {
14441
14525
  lease: ProgramLease,
14442
14526
  step: String4,
@@ -14465,7 +14549,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14465
14549
  },
14466
14550
  success: UndefinedOr(Struct({ id: String4, number: String4, url: String4 })),
14467
14551
  error: RunnerRpcError
14468
- }), make6("AlertTask", {
14552
+ }), make5("AlertTask", {
14469
14553
  payload: {
14470
14554
  lease: ProgramLease,
14471
14555
  step: String4,
@@ -14482,7 +14566,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14482
14566
  joined: optionalKey(Struct({ kind: Literals(["run", "recent"]), runId: String4 }))
14483
14567
  }),
14484
14568
  error: RunnerRpcError
14485
- }), make6("ReadTranscripts", {
14569
+ }), make5("ReadTranscripts", {
14486
14570
  payload: {
14487
14571
  lease: ProgramLease,
14488
14572
  step: String4,
@@ -14517,7 +14601,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14517
14601
  })))
14518
14602
  }),
14519
14603
  error: RunnerRpcError
14520
- }), make6("PipelineStatus", {
14604
+ }), make5("PipelineStatus", {
14521
14605
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
14522
14606
  success: Struct({
14523
14607
  head: String4,
@@ -14551,11 +14635,11 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14551
14635
  }))
14552
14636
  }),
14553
14637
  error: RunnerRpcError
14554
- }), make6("ReportPipeline", {
14638
+ }), make5("ReportPipeline", {
14555
14639
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4, verification: String4 },
14556
14640
  success: Struct({ head: String4, status: Literals(["success", "failed"]) }),
14557
14641
  error: RunnerRpcError
14558
- }), make6("ReviewThreads", {
14642
+ }), make5("ReviewThreads", {
14559
14643
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
14560
14644
  success: Struct({
14561
14645
  threads: ArraySchema(Struct({
@@ -14567,7 +14651,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14567
14651
  }))
14568
14652
  }),
14569
14653
  error: RunnerRpcError
14570
- }), make6("OpenChangeRequests", {
14654
+ }), make5("OpenChangeRequests", {
14571
14655
  payload: { lease: ProgramLease, step: String4, authors: NonEmptyArray(String4) },
14572
14656
  success: Struct({
14573
14657
  changeRequests: ArraySchema(Struct({
@@ -14581,7 +14665,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14581
14665
  }))
14582
14666
  }),
14583
14667
  error: RunnerRpcError
14584
- }), make6("OwnChangeRequests", {
14668
+ }), make5("OwnChangeRequests", {
14585
14669
  payload: { lease: ProgramLease, step: String4 },
14586
14670
  success: Struct({
14587
14671
  changeRequests: ArraySchema(Struct({
@@ -14594,7 +14678,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14594
14678
  }))
14595
14679
  }),
14596
14680
  error: RunnerRpcError
14597
- }), make6("Propose", {
14681
+ }), make5("Propose", {
14598
14682
  payload: {
14599
14683
  lease: ProgramLease,
14600
14684
  step: String4,
@@ -14623,7 +14707,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14623
14707
  task: optionalKey(Struct({ id: String4, active: Boolean2 }))
14624
14708
  }),
14625
14709
  error: RunnerRpcError
14626
- }), make6("ReadProject", {
14710
+ }), make5("ReadProject", {
14627
14711
  payload: { lease: ProgramLease, step: String4, projectId: String4 },
14628
14712
  success: Struct({
14629
14713
  project: Struct({ id: String4, name: String4 }),
@@ -14646,7 +14730,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14646
14730
  taskChanges: ArraySchema(Struct({ taskKey: String4, title: String4, change: String4, at: String4 }))
14647
14731
  }),
14648
14732
  error: RunnerRpcError
14649
- }), make6("DraftUpdate", {
14733
+ }), make5("DraftUpdate", {
14650
14734
  payload: {
14651
14735
  lease: ProgramLease,
14652
14736
  step: String4,
@@ -14661,7 +14745,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14661
14745
  },
14662
14746
  success: Struct({ id: String4 }),
14663
14747
  error: RunnerRpcError
14664
- }), make6("CreatePlanTasks", {
14748
+ }), make5("CreatePlanTasks", {
14665
14749
  payload: {
14666
14750
  lease: ProgramLease,
14667
14751
  projectId: optionalKey(String4),
@@ -14681,15 +14765,15 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14681
14765
  },
14682
14766
  success: ArraySchema(Struct({ key: String4, taskId: String4 })),
14683
14767
  error: RunnerRpcError
14684
- }), make6("IntegrationBranch", {
14768
+ }), make5("IntegrationBranch", {
14685
14769
  payload: { lease: ProgramLease, repoBindingId: optionalKey(String4) },
14686
14770
  success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
14687
14771
  error: RunnerRpcError
14688
- }), make6("DeliveryBase", {
14772
+ }), make5("DeliveryBase", {
14689
14773
  payload: { lease: ProgramLease },
14690
14774
  success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
14691
14775
  error: RunnerRpcError
14692
- }), make6("MergeChangeRequest", {
14776
+ }), make5("MergeChangeRequest", {
14693
14777
  payload: {
14694
14778
  lease: ProgramLease,
14695
14779
  step: String4,
@@ -14707,7 +14791,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14707
14791
  Struct({ status: Literal("moved"), head: String4 })
14708
14792
  ]),
14709
14793
  error: RunnerRpcError
14710
- }), make6("ApproveChangeRequest", {
14794
+ }), make5("ApproveChangeRequest", {
14711
14795
  payload: {
14712
14796
  lease: ProgramLease,
14713
14797
  step: String4,
@@ -14723,7 +14807,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14723
14807
  Struct({ approved: Literal(false), reason: String4 })
14724
14808
  ]),
14725
14809
  error: RunnerRpcError
14726
- }), make6("CloseChangeRequest", {
14810
+ }), make5("CloseChangeRequest", {
14727
14811
  payload: {
14728
14812
  lease: ProgramLease,
14729
14813
  step: String4,
@@ -14733,7 +14817,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14733
14817
  },
14734
14818
  success: Struct({ closed: Boolean2, head: optionalKey(String4) }),
14735
14819
  error: RunnerRpcError
14736
- }), make6("RerunPipeline", {
14820
+ }), make5("RerunPipeline", {
14737
14821
  payload: {
14738
14822
  lease: ProgramLease,
14739
14823
  step: String4,
@@ -14743,7 +14827,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14743
14827
  },
14744
14828
  success: Struct({ head: String4, pipelines: Int }),
14745
14829
  error: RunnerRpcError
14746
- }), make6("PublishRelease", {
14830
+ }), make5("PublishRelease", {
14747
14831
  payload: {
14748
14832
  lease: ProgramLease,
14749
14833
  step: String4,
@@ -14755,14 +14839,14 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14755
14839
  },
14756
14840
  success: Struct({ tag: String4, revision: String4, url: String4 }),
14757
14841
  error: RunnerRpcError
14758
- }), make6("ProgramSecrets", {
14842
+ }), make5("ProgramSecrets", {
14759
14843
  payload: { lease: ProgramLease },
14760
14844
  success: Record(String4, String4),
14761
14845
  error: RunnerRpcError
14762
14846
  })).middleware(RunnerAuthentication) {
14763
14847
  }
14764
14848
 
14765
- class RunnerRunFileRpcs extends make7(make6("CreateRunFile", {
14849
+ class RunnerRunFileRpcs extends make6(make5("CreateRunFile", {
14766
14850
  payload: {
14767
14851
  lease: ProgramLease,
14768
14852
  step: String4,
@@ -14774,11 +14858,11 @@ class RunnerRunFileRpcs extends make7(make6("CreateRunFile", {
14774
14858
  },
14775
14859
  success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
14776
14860
  error: Union([RunnerRpcError, RunFileRefused])
14777
- }), make6("RunFileParts", {
14861
+ }), make5("RunFileParts", {
14778
14862
  payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
14779
14863
  success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
14780
14864
  error: RunnerRpcError
14781
- }), make6("CompleteRunFile", {
14865
+ }), make5("CompleteRunFile", {
14782
14866
  payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
14783
14867
  success: RunFileRecord,
14784
14868
  error: RunnerRpcError
@@ -14788,7 +14872,7 @@ var ProgramRpcs = RunnerJournalRpcs.merge(RunnerCapabilityRpcs, RunnerRunFileRpc
14788
14872
  var RunnerRpcs = RunnerReplicaRpcs.merge(RunnerJournalRpcs, RunnerCapabilityRpcs, RunnerRunFileRpcs);
14789
14873
 
14790
14874
  // apps/cli/src/oauth.ts
14791
- var Scope2 = "openid profile email offline_access kitman:cli";
14875
+ var Scope = "openid profile email offline_access kitman:cli";
14792
14876
  var CallbackPath = "/auth/callback";
14793
14877
 
14794
14878
  class OAuthCallbackTimeout extends TaggedError("OAuthCallbackTimeout") {
@@ -14807,7 +14891,7 @@ function buildAuthorizeUrl(input) {
14807
14891
  url.searchParams.set("response_type", "code");
14808
14892
  url.searchParams.set("client_id", input.clientId);
14809
14893
  url.searchParams.set("redirect_uri", input.redirectUri);
14810
- url.searchParams.set("scope", Scope2);
14894
+ url.searchParams.set("scope", Scope);
14811
14895
  url.searchParams.set("code_challenge", input.codeChallenge);
14812
14896
  url.searchParams.set("code_challenge_method", "S256");
14813
14897
  url.searchParams.set("state", input.state);
@@ -14976,7 +15060,7 @@ function createSdkClient(input) {
14976
15060
  const runPromise = runPromiseWith(yield* context());
14977
15061
  const fetchImpl = input.fetch ?? (yield* Fetch);
14978
15062
  let session = input.session;
14979
- const refreshPermit = makeUnsafe2(1);
15063
+ const refreshPermit = makeUnsafe3(1);
14980
15064
  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 })));
14981
15065
  const authorizedFetch = (resource, init) => runPromise(gen(function* () {
14982
15066
  if (session.refreshToken && shouldRefresh(yield* currentDate, session.expiresAt))
@@ -14996,7 +15080,7 @@ function createSdkClient(input) {
14996
15080
  });
14997
15081
  }
14998
15082
  function refreshSession(input) {
14999
- const storedSession = readAuthStore(input.authPath).pipe(map7((auth) => sessionForApi(auth, input.apiUrl)));
15083
+ const storedSession = readAuthStore(input.authPath).pipe(map8((auth) => sessionForApi(auth, input.apiUrl)));
15000
15084
  return withAuthLock(input.authPath, gen(function* () {
15001
15085
  const stored = yield* storedSession;
15002
15086
  if (!stored)
@@ -15011,7 +15095,7 @@ function refreshSession(input) {
15011
15095
  clientId: input.clientId ?? ClientId,
15012
15096
  refreshToken: spentToken,
15013
15097
  ...input.fetch ? { fetch: input.fetch } : undefined
15014
- }).pipe(map7((token) => toStoredSession(token, spentToken)));
15098
+ }).pipe(map8((token) => toStoredSession(token, spentToken)));
15015
15099
  const session = yield* refreshing.pipe(catch_((error) => storedSession.pipe(filterOrFail((current) => current !== undefined && current.refreshToken !== spentToken, () => error))));
15016
15100
  const current = yield* storedSession;
15017
15101
  if (current?.refreshToken !== spentToken)
@@ -15466,9 +15550,9 @@ var herdrCoreOver = (transport) => ({
15466
15550
  ...input.name === undefined ? undefined : { name: input.name },
15467
15551
  no_parent: input.noParent === true
15468
15552
  }),
15469
- list: (filter = {}) => request("terminal.list", Listed, { labels: filter.labels ?? {}, all: filter.all === true }).pipe(map7((listed) => listed.terminals)),
15553
+ list: (filter = {}) => request("terminal.list", Listed, { labels: filter.labels ?? {}, all: filter.all === true }).pipe(map8((listed) => listed.terminals)),
15470
15554
  get: (terminal) => request("terminal.get", Terminal2, { terminal }),
15471
- read: (terminal) => request("terminal.read", Screen, { terminal }).pipe(map7((screen) => screen.text)),
15555
+ read: (terminal) => request("terminal.read", Screen, { terminal }).pipe(map8((screen) => screen.text)),
15472
15556
  interrupt: (terminal, options = {}) => request("terminal.interrupt", Interrupted, {
15473
15557
  terminal,
15474
15558
  ...options.timeoutSeconds === undefined ? undefined : { timeout: options.timeoutSeconds }
@@ -15515,7 +15599,7 @@ var spawnedTransport = (env) => gen(function* () {
15515
15599
  const spawner = yield* ChildProcessSpawner;
15516
15600
  const input = yield* unbounded2();
15517
15601
  const encoder = new TextEncoder;
15518
- const handle = yield* spawner.spawn(make3("herdr-core", ["connect"], {
15602
+ const handle = yield* spawner.spawn(make2("herdr-core", ["connect"], {
15519
15603
  extendEnv: false,
15520
15604
  env,
15521
15605
  stdin: fromQueue(input),
@@ -15531,7 +15615,7 @@ var coreEnv = (options) => {
15531
15615
  const env = Object.fromEntries(Object.entries(options.env ?? process.env).filter((entry) => entry[0] !== "HC_SESSION" && entry[1] !== undefined));
15532
15616
  return options.session === undefined ? env : { ...env, HC_SESSION: options.session };
15533
15617
  };
15534
- var herdrCoreLayer2 = (options) => effect(HerdrCore2, map7(ChildProcessSpawner, (spawner) => herdrCoreOver(spawnedTransport(coreEnv(options)).pipe(provideService(ChildProcessSpawner, spawner)))));
15618
+ var herdrCoreLayer2 = (options) => effect(HerdrCore2, map8(ChildProcessSpawner, (spawner) => herdrCoreOver(spawnedTransport(coreEnv(options)).pipe(provideService(ChildProcessSpawner, spawner)))));
15535
15619
  var herdrCoreTransportLayer2 = (transport) => succeed5(HerdrCore2, herdrCoreOver(transport));
15536
15620
  var UpdateRefused = Struct({
15537
15621
  error: Struct({ message: String4, hint: optionalKey(String4) })
@@ -15546,7 +15630,7 @@ var updateHerdrCore2 = (options) => gen(function* () {
15546
15630
  const spawner = yield* ChildProcessSpawner;
15547
15631
  const env = coreEnv(options);
15548
15632
  const run = (args) => gen(function* () {
15549
- const handle = yield* spawner.spawn(make3("herdr-core", args, { extendEnv: false, env, stdin: "ignore" }));
15633
+ const handle = yield* spawner.spawn(make2("herdr-core", args, { extendEnv: false, env, stdin: "ignore" }));
15550
15634
  const [stdout, stderr, exitCode] = yield* all3([
15551
15635
  mkString(decodeText(handle.stdout)),
15552
15636
  mkString(decodeText(handle.stderr)),
@@ -15554,13 +15638,13 @@ var updateHerdrCore2 = (options) => gen(function* () {
15554
15638
  ], { concurrency: 3 });
15555
15639
  return { stdout, stderr, exitCode };
15556
15640
  }).pipe(scoped, catchReason("PlatformError", "NotFound", () => fail7(new HerdrCoreMissing2)));
15557
- 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({
15641
+ 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({
15558
15642
  duration: options.timeout,
15559
15643
  orElse: () => succeed6(`it did not finish within ${options.timeout}`)
15560
15644
  }));
15561
15645
  if (reason === undefined)
15562
15646
  return;
15563
- const version = yield* run(["--version"]).pipe(map7(({ stdout }) => stdout.trim() || "an unknown version"), timeout("10 seconds"), orElseSucceed(() => "an unknown version"));
15647
+ const version = yield* run(["--version"]).pipe(map8(({ stdout }) => stdout.trim() || "an unknown version"), timeout("10 seconds"), orElseSucceed(() => "an unknown version"));
15564
15648
  return yield* new HerdrCoreUpdateFailed2({ version, reason: reason.slice(0, 400) });
15565
15649
  });
15566
15650
 
@@ -15572,7 +15656,7 @@ class CommandFailed2 extends TaggedError("CommandFailed") {
15572
15656
  }
15573
15657
  var runCommand2 = (command, args, options = {}) => gen(function* () {
15574
15658
  const spawner = yield* ChildProcessSpawner;
15575
- const handle = yield* spawner.spawn(make3(command, args, {
15659
+ const handle = yield* spawner.spawn(make2(command, args, {
15576
15660
  stdin: "ignore",
15577
15661
  ...options.cwd === undefined ? undefined : { cwd: options.cwd },
15578
15662
  ...options.env === undefined ? undefined : { extendEnv: true, env: options.env }
@@ -15598,7 +15682,7 @@ var shellOutputTailChars2 = 64 * 1024;
15598
15682
  var runProcess2 = (argv, options) => gen(function* () {
15599
15683
  const spawner = yield* ChildProcessSpawner;
15600
15684
  const [command, ...args] = argv;
15601
- const handle = yield* spawner.spawn(make3(command, args, {
15685
+ const handle = yield* spawner.spawn(make2(command, args, {
15602
15686
  stdin: options.stdin === undefined ? "ignore" : make10(new TextEncoder().encode(options.stdin)),
15603
15687
  ...options.cwd === undefined ? undefined : { cwd: options.cwd },
15604
15688
  env: options.extendEnv === false ? { ...options.env } : { ...withoutPreloads2(), ...options.env }
@@ -15645,7 +15729,7 @@ var detectHarnesses2 = gen(function* () {
15645
15729
  const home = (yield* optionalEnv("HOME")) ?? "/";
15646
15730
  const searchPath = ((yield* optionalEnv("PATH")) ?? "").split(":").filter(Boolean);
15647
15731
  const exists = (file) => fs.exists(file).pipe(orElseSucceed(() => false));
15648
- const any = (items, test) => map7(findFirst(items, test), isSome);
15732
+ const any = (items, test) => map8(findFirst(items, test), isSome);
15649
15733
  const loginFound = (login) => gen(function* () {
15650
15734
  const file = path.join(home, login.path);
15651
15735
  if (!(yield* exists(file)))
@@ -15661,7 +15745,7 @@ var detectHarnesses2 = gen(function* () {
15661
15745
  unavailable.push({ harness: harness.id, missing: [`\`${harness.id}\` is not installed`] });
15662
15746
  continue;
15663
15747
  }
15664
- const loggedIn = (yield* any(harness.keys, (key) => map7(optionalEnv(key), Boolean))) || (yield* any(harness.logins, loginFound));
15748
+ const loggedIn = (yield* any(harness.keys, (key) => map8(optionalEnv(key), Boolean))) || (yield* any(harness.logins, loginFound));
15665
15749
  if (loggedIn)
15666
15750
  harnesses.push(harness.id);
15667
15751
  else
@@ -16031,4 +16115,4 @@ function checkServices(declaration) {
16031
16115
  return isSome(decoded) ? [...new Set(decoded.value.services)] : undefined;
16032
16116
  }
16033
16117
 
16034
- 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, releaseChannelOffers, 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, runnerReleaseChannelPath, 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 };
16118
+ 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, releaseChannelOffers, 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, runnerReleaseChannelPath, 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 };