@kitman-sh/cli 0.13.9 → 0.13.11

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-aezq3fyy.js → chunk-0h49y8gf.js} +214 -74
  2. package/dist/{chunk-a44ebqzx.js → chunk-3rkhx6gq.js} +6 -6
  3. package/dist/{chunk-qkjfx2ts.js → chunk-5an78wy8.js} +14 -14
  4. package/dist/{chunk-ezv4p0zr.js → chunk-5zhh41gb.js} +4 -4
  5. package/dist/{chunk-53qp6kcp.js → chunk-5zth85pj.js} +2 -2
  6. package/dist/{chunk-v190zzc5.js → chunk-7rpd6a98.js} +1 -1
  7. package/dist/{chunk-69fcvx7d.js → chunk-acneym1p.js} +65 -45
  8. package/dist/{chunk-tspf987k.js → chunk-cbpb2rww.js} +8 -8
  9. package/dist/{chunk-9gg1w4aa.js → chunk-dtkejy3r.js} +377 -283
  10. package/dist/{chunk-rz18qefg.js → chunk-fcb6skhx.js} +10 -10
  11. package/dist/{chunk-cw61zyh5.js → chunk-gq7y5v3e.js} +1 -1
  12. package/dist/{chunk-fh58za51.js → chunk-gy9rf14f.js} +3 -3
  13. package/dist/{chunk-ksgt1tdc.js → chunk-h7mnz0w3.js} +4 -4
  14. package/dist/{chunk-pj3mer60.js → chunk-j48k8j8y.js} +4 -4
  15. package/dist/{chunk-s63fjc69.js → chunk-jyq4790r.js} +25 -25
  16. package/dist/{chunk-0wj65j5e.js → chunk-krqb80g6.js} +12 -12
  17. package/dist/{chunk-kq88aaa3.js → chunk-mtkstrh3.js} +4 -4
  18. package/dist/{chunk-x8sewxzm.js → chunk-mx3zt8v8.js} +145 -145
  19. package/dist/{chunk-wzr1n3zy.js → chunk-p0vqjc0n.js} +26 -6
  20. package/dist/{chunk-hezxa6q5.js → chunk-p8fhxfa0.js} +7 -7
  21. package/dist/{chunk-0tjg9eya.js → chunk-q5w3v4k1.js} +1 -1
  22. package/dist/{chunk-6jtjcvnc.js → chunk-rh9g6sef.js} +44 -44
  23. package/dist/{chunk-1ht6jwzm.js → chunk-xzfj61cp.js} +11 -11
  24. package/dist/{chunk-z5f7g1w1.js → chunk-y1krmnbv.js} +2 -2
  25. package/dist/{chunk-qjqa338f.js → chunk-zw3gf6r5.js} +94 -333
  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,
@@ -33,7 +38,7 @@ import {
33
38
  assignProperty,
34
39
  PipeInspectableProto,
35
40
  withFiber,
36
- make13,
41
+ make14,
37
42
  strictEqual,
38
43
  Tuple,
39
44
  Number2,
@@ -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
- make14,
61
+ make15,
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,14 +83,15 @@ 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,
89
- make15,
93
+ makeUnsafe5,
94
+ make16,
90
95
  _await,
91
96
  fail5,
92
97
  isDone,
@@ -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,9 @@ import {
198
194
  logError,
199
195
  effectify,
200
196
  decode,
201
- makeUnsafe6,
202
- make16,
203
- now,
204
- nowUnsafe,
205
- toDateUtc,
206
- toEpochMillis,
207
- formatIso,
208
197
  defaultParseOptions,
209
198
  omit,
210
- map8,
199
+ map9,
211
200
  declare,
212
201
  decodeUnknownEffect2,
213
202
  decodeEffect,
@@ -272,20 +261,15 @@ import {
272
261
  decodeJsonStringOption,
273
262
  encodeJsonStringSync,
274
263
  encodePrettyJsonString
275
- } from "./chunk-qjqa338f.js";
264
+ } from "./chunk-zw3gf6r5.js";
276
265
  import {
277
266
  map,
278
267
  makeEquivalence,
279
- toNumber,
280
268
  bytes,
281
- join,
282
- interrupt,
283
- getCurrent,
284
- runIn,
285
269
  BadArgument,
286
270
  systemError,
287
271
  badArgument,
288
- makeUnsafe,
272
+ makeUnsafe2,
289
273
  make8,
290
274
  make9,
291
275
  sliding,
@@ -297,17 +281,19 @@ import {
297
281
  endUnsafe,
298
282
  take,
299
283
  poll,
300
- makeUnsafe2,
284
+ makeUnsafe3,
301
285
  fromTransform,
302
286
  mapDone,
303
287
  isSink,
304
288
  fromChannel,
305
289
  drain,
290
+ make10,
291
+ get3,
306
292
  isStream,
307
293
  fromChannel2,
308
294
  callback,
309
295
  empty2,
310
- make10,
296
+ make11,
311
297
  suspend,
312
298
  fail2,
313
299
  fromQueue,
@@ -333,16 +319,16 @@ import {
333
319
  mkArrayBuffer,
334
320
  toReadableStreamEffect,
335
321
  FileSystem,
336
- make11,
322
+ make12,
337
323
  FileTypeId,
338
324
  WatchBackend,
339
325
  Path,
340
- make12,
326
+ make13,
341
327
  option,
342
328
  String2,
343
329
  optionalEnv,
344
330
  harnessesUnsupportedInSrt2
345
- } from "./chunk-aezq3fyy.js";
331
+ } from "./chunk-0h49y8gf.js";
346
332
  import {
347
333
  isDateTime,
348
334
  Numeric,
@@ -355,7 +341,7 @@ import {
355
341
  SecretScope,
356
342
  SecretHosts,
357
343
  isSecretReference
358
- } from "./chunk-0tjg9eya.js";
344
+ } from "./chunk-q5w3v4k1.js";
359
345
  import {
360
346
  isRedacted,
361
347
  make,
@@ -369,11 +355,241 @@ import {
369
355
  make3,
370
356
  parseFdName,
371
357
  fdName
372
- } from "./chunk-kq88aaa3.js";
358
+ } from "./chunk-mtkstrh3.js";
373
359
 
374
360
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
375
361
  var makeEquivalence3 = Tuple;
376
362
 
363
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
364
+ var Clock = ClockRef;
365
+ var currentTimeMillis = currentTimeMillis2;
366
+
367
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/dateTime.js
368
+ var TypeId = "~effect/DateTime";
369
+ var TimeZoneTypeId = "~effect/DateTime/TimeZone";
370
+ var Proto = {
371
+ [TypeId]: TypeId,
372
+ pipe() {
373
+ return pipeArguments(this, arguments);
374
+ },
375
+ [NodeInspectSymbol]() {
376
+ return this.toString();
377
+ },
378
+ toJSON() {
379
+ return toDateUtc(this).toJSON();
380
+ }
381
+ };
382
+ var ProtoUtc = {
383
+ ...Proto,
384
+ _tag: "Utc",
385
+ [symbol]() {
386
+ return number(this.epochMilliseconds);
387
+ },
388
+ [symbol2](that) {
389
+ return isDateTime2(that) && that._tag === "Utc" && this.epochMilliseconds === that.epochMilliseconds;
390
+ },
391
+ toString() {
392
+ return `DateTime.Utc(${toDateUtc(this).toJSON()})`;
393
+ }
394
+ };
395
+ var ProtoZoned = {
396
+ ...Proto,
397
+ _tag: "Zoned",
398
+ [symbol]() {
399
+ return combine(number(this.epochMilliseconds))(hash(this.zone));
400
+ },
401
+ [symbol2](that) {
402
+ return isDateTime2(that) && that._tag === "Zoned" && this.epochMilliseconds === that.epochMilliseconds && equals(this.zone, that.zone);
403
+ },
404
+ toString() {
405
+ return `DateTime.Zoned(${formatIsoZoned(this)})`;
406
+ }
407
+ };
408
+ var ProtoTimeZone = {
409
+ [TimeZoneTypeId]: TimeZoneTypeId,
410
+ [NodeInspectSymbol]() {
411
+ return this.toString();
412
+ }
413
+ };
414
+ var ProtoTimeZoneNamed = {
415
+ ...ProtoTimeZone,
416
+ _tag: "Named",
417
+ [symbol]() {
418
+ return string(`Named:${this.id}`);
419
+ },
420
+ [symbol2](that) {
421
+ return isTimeZone(that) && that._tag === "Named" && this.id === that.id;
422
+ },
423
+ toString() {
424
+ return `TimeZone.Named(${this.id})`;
425
+ },
426
+ toJSON() {
427
+ return {
428
+ _id: "TimeZone",
429
+ _tag: "Named",
430
+ id: this.id
431
+ };
432
+ }
433
+ };
434
+ var ProtoTimeZoneOffset = {
435
+ ...ProtoTimeZone,
436
+ _tag: "Offset",
437
+ [symbol]() {
438
+ return string(`Offset:${this.offset}`);
439
+ },
440
+ [symbol2](that) {
441
+ return isTimeZone(that) && that._tag === "Offset" && this.offset === that.offset;
442
+ },
443
+ toString() {
444
+ return `TimeZone.Offset(${offsetToString(this.offset)})`;
445
+ },
446
+ toJSON() {
447
+ return {
448
+ _id: "TimeZone",
449
+ _tag: "Offset",
450
+ offset: this.offset
451
+ };
452
+ }
453
+ };
454
+ var cacheSlot = {
455
+ value: undefined,
456
+ enumerable: false,
457
+ writable: true
458
+ };
459
+ var sealedCaches = /* @__PURE__ */ new WeakMap;
460
+ var cacheAccessor = (key, slots) => ({
461
+ get() {
462
+ return Object.isExtensible(this) ? undefined : sealedCaches.get(this)?.[key];
463
+ },
464
+ set(value) {
465
+ if (Object.isExtensible(this)) {
466
+ for (const slot of slots) {
467
+ Object.defineProperty(this, slot, cacheSlot);
468
+ }
469
+ this[key] = value;
470
+ } else {
471
+ let caches = sealedCaches.get(this);
472
+ if (caches === undefined) {
473
+ caches = {};
474
+ sealedCaches.set(this, caches);
475
+ }
476
+ caches[key] = value;
477
+ }
478
+ }
479
+ });
480
+ var zonedSlots = ["partsUtc", "adjustedEpochMilliseconds", "partsAdjusted"];
481
+ Object.defineProperty(ProtoUtc, "partsUtc", cacheAccessor("partsUtc", ["partsUtc"]));
482
+ Object.defineProperties(ProtoZoned, {
483
+ partsUtc: cacheAccessor("partsUtc", zonedSlots),
484
+ adjustedEpochMilliseconds: cacheAccessor("adjustedEpochMilliseconds", zonedSlots),
485
+ partsAdjusted: cacheAccessor("partsAdjusted", zonedSlots)
486
+ });
487
+ var isDateTime2 = (u) => hasProperty(u, TypeId);
488
+ var isTimeZone = (u) => hasProperty(u, TimeZoneTypeId);
489
+ var makeUtc = (epochMillis) => {
490
+ const self = Object.create(ProtoUtc);
491
+ self.epochMilliseconds = epochMillis;
492
+ return self;
493
+ };
494
+ var fromDateUnsafe = (date) => {
495
+ const epochMillis = date.getTime();
496
+ if (Number.isNaN(epochMillis)) {
497
+ throw new IllegalArgumentError("Invalid date");
498
+ }
499
+ return makeUtc(epochMillis);
500
+ };
501
+ var makeUnsafe6 = (input) => {
502
+ if (isDateTime2(input)) {
503
+ return input;
504
+ } else if (input instanceof Date) {
505
+ return fromDateUnsafe(input);
506
+ } else if (typeof input === "object") {
507
+ if ("epochMilliseconds" in input) {
508
+ return fromDateUnsafe(new Date(input.epochMilliseconds));
509
+ }
510
+ const date = new Date(0);
511
+ setPartsDate(date, input);
512
+ return fromDateUnsafe(date);
513
+ } else if (typeof input === "string" && !hasZone(input)) {
514
+ return fromDateUnsafe(new Date(input + "Z"));
515
+ }
516
+ return fromDateUnsafe(new Date(input));
517
+ };
518
+ var hasZone = (input) => /Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(input) || /z$|gmt$/i.test(input);
519
+ var minEpochMillis = -8640000000000000 + 12 * 60 * 60 * 1000;
520
+ var maxEpochMillis = 8640000000000000 - 14 * 60 * 60 * 1000;
521
+ var make4 = /* @__PURE__ */ liftThrowable(makeUnsafe6);
522
+ var now = /* @__PURE__ */ map7(currentTimeMillis, makeUtc);
523
+ var nowUnsafe = () => makeUtc(Date.now());
524
+ var toDateUtc = (self) => new Date(self.epochMilliseconds);
525
+ var toDate2 = (self) => {
526
+ if (self._tag === "Utc") {
527
+ return new Date(self.epochMilliseconds);
528
+ } else if (self.zone._tag === "Offset") {
529
+ return new Date(self.epochMilliseconds + self.zone.offset);
530
+ } else if (self.adjustedEpochMilliseconds !== undefined) {
531
+ return new Date(self.adjustedEpochMilliseconds);
532
+ }
533
+ let bc = false;
534
+ const parts = self.zone.format.formatToParts(self.epochMilliseconds).filter((_) => {
535
+ if (_.type === "era") {
536
+ bc = _.value === "BC";
537
+ return false;
538
+ }
539
+ return _.type !== "literal";
540
+ });
541
+ const year = Number(parts[2].value);
542
+ const date = new Date(0);
543
+ date.setUTCFullYear(bc ? 1 - year : year, Number(parts[0].value) - 1, Number(parts[1].value));
544
+ date.setUTCHours(Number(parts[3].value), Number(parts[4].value), Number(parts[5].value), parts[6]?.type === "fractionalSecond" ? Number(parts[6].value) : (self.epochMilliseconds % 1000 + 1000) % 1000);
545
+ self.adjustedEpochMilliseconds = date.getTime();
546
+ return date;
547
+ };
548
+ var zonedOffset = (self) => {
549
+ const date = toDate2(self);
550
+ return date.getTime() - toEpochMillis(self);
551
+ };
552
+ var offsetToString = (offset) => {
553
+ const abs = Math.abs(offset);
554
+ let hours = Math.floor(abs / (60 * 60 * 1000));
555
+ let minutes = Math.round(abs % (60 * 60 * 1000) / (60 * 1000));
556
+ if (minutes === 60) {
557
+ hours += 1;
558
+ minutes = 0;
559
+ }
560
+ return `${offset < 0 ? "-" : "+"}${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
561
+ };
562
+ var zonedOffsetIso = (self) => offsetToString(zonedOffset(self));
563
+ var toEpochMillis = (self) => self.epochMilliseconds;
564
+ var setPartsDate = (date, parts) => {
565
+ if (parts.year !== undefined || parts.month !== undefined || parts.day !== undefined) {
566
+ date.setUTCFullYear(parts.year ?? date.getUTCFullYear(), parts.month !== undefined ? parts.month - 1 : date.getUTCMonth(), parts.day ?? date.getUTCDate());
567
+ }
568
+ if (parts.weekDay !== undefined) {
569
+ const diff = parts.weekDay - date.getUTCDay();
570
+ date.setUTCDate(date.getUTCDate() + diff);
571
+ }
572
+ if (parts.hour !== undefined) {
573
+ date.setUTCHours(parts.hour);
574
+ }
575
+ if (parts.minute !== undefined) {
576
+ date.setUTCMinutes(parts.minute);
577
+ }
578
+ if (parts.second !== undefined) {
579
+ date.setUTCSeconds(parts.second);
580
+ }
581
+ if (parts.millisecond !== undefined) {
582
+ date.setUTCMilliseconds(parts.millisecond);
583
+ }
584
+ };
585
+ var constDayMillis = 24 * 60 * 60 * 1000;
586
+ var formatIso2 = (self) => toDateUtc(self).toISOString();
587
+ var formatIsoOffset = (self) => {
588
+ const date = toDate2(self);
589
+ return self._tag === "Utc" ? date.toISOString() : `${date.toISOString().slice(0, -1)}${zonedOffsetIso(self)}`;
590
+ };
591
+ var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
592
+
377
593
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Metric.js
378
594
  var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
379
595
  var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
@@ -383,10 +599,10 @@ var MetricRegistryKey = "effect/Metric/MetricRegistry";
383
599
  var MetricRegistry = /* @__PURE__ */ Reference(MetricRegistryKey, {
384
600
  defaultValue: () => new Map
385
601
  });
386
- var TypeId = "~effect/Metric";
602
+ var TypeId2 = "~effect/Metric";
387
603
 
388
604
  class Metric$ {
389
- [TypeId] = TypeId;
605
+ [TypeId2] = TypeId2;
390
606
  #extraAttributes;
391
607
  #mergedAttributes;
392
608
  #key = "";
@@ -409,7 +625,7 @@ class Metric$ {
409
625
  }
410
626
  hook(context) {
411
627
  const key = this.key(context);
412
- const registry = get3(context, MetricRegistry);
628
+ const registry = get4(context, MetricRegistry);
413
629
  let metadata = registry.get(key);
414
630
  if (isUndefined(metadata)) {
415
631
  metadata = this.metadata(this.createHooks());
@@ -418,11 +634,11 @@ class Metric$ {
418
634
  return metadata.hooks;
419
635
  }
420
636
  removeUnsafe(context) {
421
- get3(context, MetricRegistry).delete(this.key(context));
637
+ get4(context, MetricRegistry).delete(this.key(context));
422
638
  }
423
639
  registerUnsafe(context, hooks) {
424
640
  const key = this.key(context);
425
- const registry = get3(context, MetricRegistry);
641
+ const registry = get4(context, MetricRegistry);
426
642
  const metadata = this.metadata({
427
643
  get: hooks.get,
428
644
  update: constVoid,
@@ -438,7 +654,7 @@ class Metric$ {
438
654
  };
439
655
  }
440
656
  key(context) {
441
- const extraAttributes = get3(context, CurrentMetricAttributes);
657
+ const extraAttributes = get4(context, CurrentMetricAttributes);
442
658
  if (extraAttributes !== this.#extraAttributes) {
443
659
  this.#extraAttributes = extraAttributes;
444
660
  const merged = mergeAttributes(this.attributes, extraAttributes);
@@ -681,147 +897,23 @@ var runMain2 = /* @__PURE__ */ makeRunMain(({
681
897
  // node_modules/.bun/@effect+platform-bun@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-bun/dist/BunRuntime.js
682
898
  var runMain = runMain2;
683
899
 
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;
900
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
901
+ var BigInt2 = globalThis.BigInt;
902
+ var toNumber = (b) => {
903
+ if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
904
+ return none();
806
905
  }
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;
906
+ return some(Number(b));
820
907
  };
821
908
 
822
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
909
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
910
+ var makeUnsafe = makeUnsafe6;
823
911
  var make18 = make4;
824
- var get5 = get4;
912
+ var now2 = now;
913
+ var nowUnsafe2 = nowUnsafe;
914
+ var toDateUtc2 = toDateUtc;
915
+ var toEpochMillis2 = toEpochMillis;
916
+ var formatIso = formatIso2;
825
917
 
826
918
  // node_modules/.bun/@effect+platform-node-shared@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
827
919
  import * as NodeChildProcess from "child_process";
@@ -937,8 +1029,8 @@ var releaseWritable = (writable) => callback3((resume) => {
937
1029
  });
938
1030
  var pullIntoWritable = (options) => withFiber2((fiber) => {
939
1031
  const dispatcher = fiber.currentDispatcher;
940
- const completion = makeUnsafe4();
941
- const failure = makeUnsafe4();
1032
+ const completion = makeUnsafe5();
1033
+ const failure = makeUnsafe5();
942
1034
  const onError = (error) => doneUnsafe(failure, failSync(() => options.onError(error)));
943
1035
  let errorEmitted = false;
944
1036
  const onStreamError = (error) => {
@@ -1032,7 +1124,7 @@ var readableToPullUnsafe = (options) => {
1032
1124
  const chunkSize = options.chunkSize ?? 4096;
1033
1125
  const closeOnDone = options.closeOnDone ?? true;
1034
1126
  const exit = options.exit ?? make8(undefined);
1035
- const latch = options.latch ?? makeUnsafe(false);
1127
+ const latch = options.latch ?? makeUnsafe2(false);
1036
1128
  function onReadable() {
1037
1129
  latch.openUnsafe();
1038
1130
  }
@@ -1262,7 +1354,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1262
1354
  });
1263
1355
  }
1264
1356
  if (stream) {
1265
- return map7(runInputStream(stream, sink, inputFailure), () => {
1357
+ return map8(runInputStream(stream, sink, inputFailure), () => {
1266
1358
  inputSinks.set(fd, sink);
1267
1359
  });
1268
1360
  }
@@ -1368,7 +1460,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1368
1460
  };
1369
1461
  };
1370
1462
  const spawn2 = (command, spawnOptions) => callback3((resume) => {
1371
- const deferred = makeUnsafe4();
1463
+ const deferred = makeUnsafe5();
1372
1464
  const handle = NodeChildProcess.spawn(command.command, command.args.map(unwrap2), spawnOptions);
1373
1465
  handle.on("error", (error) => {
1374
1466
  if (command.args.some(isRedacted)) {
@@ -1544,7 +1636,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1544
1636
  }
1545
1637
  return reref;
1546
1638
  });
1547
- const inputFailure = makeUnsafe4();
1639
+ const inputFailure = makeUnsafe5();
1548
1640
  const stdin = yield* setupChildStdin(cmd, childProcess, stdinConfig, inputFailure);
1549
1641
  const {
1550
1642
  all,
@@ -1555,7 +1647,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1555
1647
  getInputFd,
1556
1648
  getOutputFd
1557
1649
  } = yield* setupAdditionalFds(cmd, childProcess, resolvedAdditionalFds, inputFailure);
1558
- const isRunning = map7(isDone(exitSignal), (done) => !done);
1650
+ const isRunning = map8(isDone(exitSignal), (done) => !done);
1559
1651
  const exitCode = flatMap3(raceFirst(_await(exitSignal), _await(inputFailure)), ([code, signal]) => {
1560
1652
  if (isDoneUnsafe(inputFailure)) {
1561
1653
  return _await(inputFailure);
@@ -1836,7 +1928,7 @@ var noFollowFlags = (method, flag) => suspend3(() => {
1836
1928
  var openFactory = (method) => {
1837
1929
  const nodeOpen = effectify(NFS.open, handleErrnoException("FileSystem", method), handleBadArgument(method));
1838
1930
  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)));
1931
+ return (path, options) => pipe(acquireRelease(options?.noFollow === true ? flatMap3(noFollowFlags(method, options.flag ?? "r"), (flags) => nodeOpen(path, flags, options.mode)) : nodeOpen(path, options?.flag ?? "r", options?.mode), (fd) => orDie(nodeClose(fd))), map8((fd) => makeFile(fd, options?.flag?.startsWith("a") ?? false)));
1840
1932
  };
1841
1933
  var open2 = /* @__PURE__ */ openFactory("open");
1842
1934
  var negativePosition = (method) => badArgument({
@@ -1897,7 +1989,7 @@ var makeFile = /* @__PURE__ */ (() => {
1897
1989
  });
1898
1990
  }
1899
1991
  const position = this.position;
1900
- return map7(nodeRead(this.fd, {
1992
+ return map8(nodeRead(this.fd, {
1901
1993
  buffer,
1902
1994
  position
1903
1995
  }), (bytesRead) => {
@@ -1918,7 +2010,7 @@ var makeFile = /* @__PURE__ */ (() => {
1918
2010
  }
1919
2011
  const buffer = Buffer.allocUnsafeSlow(size);
1920
2012
  const position = explicit ?? this.position;
1921
- return map7(nodeReadAlloc(this.fd, {
2013
+ return map8(nodeReadAlloc(this.fd, {
1922
2014
  buffer,
1923
2015
  position
1924
2016
  }), (bytesRead) => {
@@ -1941,7 +2033,7 @@ var makeFile = /* @__PURE__ */ (() => {
1941
2033
  });
1942
2034
  }
1943
2035
  truncate(length) {
1944
- return map7(nodeTruncate(this.fd, length || undefined), () => {
2036
+ return map8(nodeTruncate(this.fd, length || undefined), () => {
1945
2037
  if (!this.append) {
1946
2038
  const len = BigInt(length ?? 0);
1947
2039
  if (this.position > len) {
@@ -1953,7 +2045,7 @@ var makeFile = /* @__PURE__ */ (() => {
1953
2045
  write(buffer) {
1954
2046
  return suspend3(() => {
1955
2047
  const position = this.position;
1956
- return flatMap3(this.append ? succeed6(undefined) : positionToNumber(position, "write"), (nodePosition) => map7(nodeWrite(this.fd, buffer, undefined, undefined, nodePosition), (bytesWritten) => {
2048
+ return flatMap3(this.append ? succeed6(undefined) : positionToNumber(position, "write"), (nodePosition) => map8(nodeWrite(this.fd, buffer, undefined, undefined, nodePosition), (bytesWritten) => {
1957
2049
  if (!this.append) {
1958
2050
  this.position = position + BigInt(bytesWritten);
1959
2051
  }
@@ -2015,7 +2107,7 @@ var readDirectoryEntries = (path) => tryPromise({
2015
2107
  withFileTypes: true
2016
2108
  }),
2017
2109
  catch: (err) => handleErrnoException("FileSystem", "readDirectoryEntries")(err, [path])
2018
- }).pipe(map7((entries) => entries.map((entry) => ({
2110
+ }).pipe(map8((entries) => entries.map((entry) => ({
2019
2111
  name: entry.name,
2020
2112
  type: fileType(entry)
2021
2113
  }))));
@@ -2130,7 +2222,7 @@ var watchNode = (path, info, options) => callback((queue) => acquireRelease(sync
2130
2222
  });
2131
2223
  return watcher;
2132
2224
  }), (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);
2225
+ var watch2 = (backend, path, options) => all3([stat2(path), serviceOption(WatchBackend)]).pipe(map8(([stat, callerBackend]) => orElse(callerBackend, () => backend).pipe(flatMap((_) => _.register(path, stat, options)), getOrElse(() => watchNode(path, stat, options)))), unwrap);
2134
2226
  var writeFile2 = (path, data, options) => callback3((resume, signal) => {
2135
2227
  try {
2136
2228
  NFS.writeFile(path, data, {
@@ -2148,7 +2240,7 @@ var writeFile2 = (path, data, options) => callback3((resume, signal) => {
2148
2240
  resume(fail7(handleBadArgument("writeFile")(err)));
2149
2241
  }
2150
2242
  });
2151
- var makeFileSystem = /* @__PURE__ */ map7(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make11({
2243
+ var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make12({
2152
2244
  access: access2,
2153
2245
  chmod: chmod2,
2154
2246
  chown: chown2,
@@ -2208,15 +2300,15 @@ var fileUrlOps = (windows) => ({
2208
2300
  })
2209
2301
  })
2210
2302
  });
2211
- var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2303
+ var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2212
2304
  ...NodePath.posix,
2213
2305
  .../* @__PURE__ */ fileUrlOps(false)
2214
2306
  }));
2215
- var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2307
+ var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2216
2308
  ...NodePath.win32,
2217
2309
  .../* @__PURE__ */ fileUrlOps(true)
2218
2310
  }));
2219
- var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2311
+ var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2220
2312
  ...NodePath,
2221
2313
  .../* @__PURE__ */ fileUrlOps(undefined)
2222
2314
  }));
@@ -2475,7 +2567,7 @@ var layerWebCrypto = /* @__PURE__ */ effect(SecureRandom, /* @__PURE__ */ WebCry
2475
2567
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Cookies.js
2476
2568
  var TypeId4 = "~effect/http/Cookies";
2477
2569
  var CookieTypeId = "~effect/http/Cookies/Cookie";
2478
- var Proto = {
2570
+ var Proto2 = {
2479
2571
  [TypeId4]: TypeId4,
2480
2572
  ...BaseProto,
2481
2573
  toJSON() {
@@ -2489,7 +2581,7 @@ var Proto = {
2489
2581
  }
2490
2582
  };
2491
2583
  var fromReadonlyRecord = (cookies) => {
2492
- const self = Object.create(Proto);
2584
+ const self = Object.create(Proto2);
2493
2585
  self.cookies = cookies;
2494
2586
  return self;
2495
2587
  };
@@ -2656,13 +2748,13 @@ var tryDecodeURIComponent = (str) => {
2656
2748
 
2657
2749
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Headers.js
2658
2750
  var TypeId5 = /* @__PURE__ */ Symbol.for("~effect/http/Headers");
2659
- var Proto2 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
2751
+ var Proto3 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
2660
2752
  [TypeId5]: {
2661
2753
  value: TypeId5
2662
2754
  },
2663
2755
  [symbolRedactable]: {
2664
2756
  value(context) {
2665
- return redact2(this, get3(context, CurrentRedactedNames));
2757
+ return redact2(this, get4(context, CurrentRedactedNames));
2666
2758
  }
2667
2759
  },
2668
2760
  toJSON: {
@@ -2672,7 +2764,7 @@ var Proto2 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
2672
2764
  },
2673
2765
  [symbol2]: {
2674
2766
  value(that) {
2675
- return Equivalence(this, that);
2767
+ return Equivalence2(this, that);
2676
2768
  }
2677
2769
  },
2678
2770
  [symbol]: {
@@ -2687,20 +2779,20 @@ var Proto2 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
2687
2779
  value: BaseProto[NodeInspectSymbol]
2688
2780
  }
2689
2781
  });
2690
- var make22 = (input) => Object.assign(Object.create(Proto2), input);
2691
- var Equivalence = /* @__PURE__ */ makeEquivalence(/* @__PURE__ */ strictEqual());
2692
- var empty = /* @__PURE__ */ Object.create(Proto2);
2782
+ var make22 = (input) => Object.assign(Object.create(Proto3), input);
2783
+ var Equivalence2 = /* @__PURE__ */ makeEquivalence(/* @__PURE__ */ strictEqual());
2784
+ var empty = /* @__PURE__ */ Object.create(Proto3);
2693
2785
  var fromInput = (input) => {
2694
2786
  if (input === undefined) {
2695
2787
  return empty;
2696
2788
  } else if (Symbol.iterator in input) {
2697
- const out = Object.create(Proto2);
2789
+ const out = Object.create(Proto3);
2698
2790
  for (const [k, v] of input) {
2699
2791
  out[k.toLowerCase()] = v;
2700
2792
  }
2701
2793
  return out;
2702
2794
  }
2703
- const out = Object.create(Proto2);
2795
+ const out = Object.create(Proto3);
2704
2796
  for (const [k, v] of Object.entries(input)) {
2705
2797
  if (Array.isArray(v)) {
2706
2798
  out[k.toLowerCase()] = v.join(", ");
@@ -2710,7 +2802,7 @@ var fromInput = (input) => {
2710
2802
  }
2711
2803
  return out;
2712
2804
  };
2713
- var fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto2);
2805
+ var fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto3);
2714
2806
  var set = /* @__PURE__ */ dual(3, (self, key, value) => {
2715
2807
  const out = make22(self);
2716
2808
  out[key.toLowerCase()] = value;
@@ -2785,7 +2877,7 @@ var fromBody = (bytes) => new URLSearchParams(bodyDecoder.decode(bytes).replace(
2785
2877
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/UrlParams.js
2786
2878
  var TypeId6 = "~effect/http/UrlParams";
2787
2879
  var isUrlParams = (u) => hasProperty(u, TypeId6);
2788
- var Proto3 = {
2880
+ var Proto4 = {
2789
2881
  ...PipeInspectableProto,
2790
2882
  [TypeId6]: TypeId6,
2791
2883
  [Symbol.iterator]() {
@@ -2794,21 +2886,21 @@ var Proto3 = {
2794
2886
  [symbolRedactable](context) {
2795
2887
  return {
2796
2888
  _id: "UrlParams",
2797
- params: Object.fromEntries(redact3(this, get3(context, CurrentRedactedNames2)))
2889
+ params: Object.fromEntries(redact3(this, get4(context, CurrentRedactedNames2)))
2798
2890
  };
2799
2891
  },
2800
2892
  toJSON() {
2801
2893
  return redact(this);
2802
2894
  },
2803
2895
  [symbol2](that) {
2804
- return Equivalence2(this, that);
2896
+ return Equivalence3(this, that);
2805
2897
  },
2806
2898
  [symbol]() {
2807
2899
  return array(this.params.flat());
2808
2900
  }
2809
2901
  };
2810
2902
  var make23 = (params) => {
2811
- const self = Object.create(Proto3);
2903
+ const self = Object.create(Proto4);
2812
2904
  self.params = params;
2813
2905
  return self;
2814
2906
  };
@@ -2850,7 +2942,7 @@ var fromInputNested = (input) => {
2850
2942
  return out;
2851
2943
  };
2852
2944
  var coerce = (value) => isRedacted(value) ? value : String(value);
2853
- var Equivalence2 = /* @__PURE__ */ make13((a, b) => arrayEquivalence(a.params, b.params));
2945
+ var Equivalence3 = /* @__PURE__ */ make14((a, b) => arrayEquivalence(a.params, b.params));
2854
2946
  var arrayEquivalence = /* @__PURE__ */ makeEquivalence2(/* @__PURE__ */ makeEquivalence3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
2855
2947
  var empty4 = /* @__PURE__ */ make23([]);
2856
2948
  var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
@@ -2920,7 +3012,7 @@ var decodeQueryKey = (key) => {
2920
3012
  return key;
2921
3013
  }
2922
3014
  };
2923
- var currentRedactedNames = () => get3(globalThis[currentFiberTypeId]?.context ?? empty3(), CurrentRedactedNames2);
3015
+ var currentRedactedNames = () => get4(globalThis[currentFiberTypeId]?.context ?? empty3(), CurrentRedactedNames2);
2924
3016
  var CurrentRedactedNames2 = /* @__PURE__ */ Reference("effect/http/UrlParams/CurrentRedactedNames", {
2925
3017
  defaultValue: () => ["X-Amz-Signature", "X-Amz-Credential", "X-Amz-Security-Token", "AWSAccessKeyId", "Signature", "sig", "X-Goog-Signature"]
2926
3018
  });
@@ -2956,7 +3048,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
2956
3048
  };
2957
3049
  stdin.once("end", onStdinEnd);
2958
3050
  yield* addFinalizer2(() => sync2(() => stdin.off("end", onStdinEnd)));
2959
- const rlRef = yield* make18({
3051
+ const rlRef = yield* make10({
2960
3052
  acquire: acquireRelease(sync2(() => {
2961
3053
  const rl = readline.createInterface({
2962
3054
  input: stdin,
@@ -2995,7 +3087,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
2995
3087
  if (stdin.isTTY)
2996
3088
  stdin.setRawMode(enabled);
2997
3089
  });
2998
- const rawModeRef = yield* make18({
3090
+ const rawModeRef = yield* make10({
2999
3091
  acquire: acquireRelease(setRawMode(true), () => setRawMode(false)),
3000
3092
  idleTimeToLive: "10 millis"
3001
3093
  });
@@ -3046,14 +3138,14 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3046
3138
  if (inputEnded) {
3047
3139
  handleEnd();
3048
3140
  } else {
3049
- yield* get5(rlRef);
3050
- yield* get5(rawModeRef);
3141
+ yield* get3(rlRef);
3142
+ yield* get3(rawModeRef);
3051
3143
  stdin.once("end", handleEnd);
3052
3144
  }
3053
3145
  return queue;
3054
3146
  });
3055
3147
  const readLine = suspend3(() => poll(lines).pipe(flatMap3(match({
3056
- onNone: () => scoped(andThen2(get5(rlRef), take(lines))),
3148
+ onNone: () => scoped(andThen2(get3(rlRef), take(lines))),
3057
3149
  onSome: succeed6
3058
3150
  })), mapError2(() => new QuitError({}))));
3059
3151
  const display = (prompt) => uninterruptible(callback3((resume) => {
@@ -3097,17 +3189,17 @@ var log = (...args) => consoleWith((console) => sync(() => {
3097
3189
 
3098
3190
  // packages/core/src/time.ts
3099
3191
  function toDate(input) {
3100
- return toDateUtc(makeUnsafe6(input));
3192
+ return toDateUtc2(makeUnsafe(input));
3101
3193
  }
3102
3194
  function parseDate(input) {
3103
- return getOrUndefined(map4(make16(input), toDateUtc));
3195
+ return getOrUndefined(map4(make18(input), toDateUtc2));
3104
3196
  }
3105
3197
  function toIso(input) {
3106
- return formatIso(makeUnsafe6(input));
3198
+ return formatIso(makeUnsafe(input));
3107
3199
  }
3108
- var currentDate = map7(now, toDateUtc);
3200
+ var currentDate = map8(now2, toDateUtc2);
3109
3201
  function wallClockMillis() {
3110
- return toEpochMillis(nowUnsafe());
3202
+ return toEpochMillis2(nowUnsafe2());
3111
3203
  }
3112
3204
 
3113
3205
  // packages/core/src/waiting-on.ts
@@ -6424,6 +6516,8 @@ var RunStepSummary = Struct({
6424
6516
  failureSummary: optionalKey(String4),
6425
6517
  output: optionalKey(Unknown),
6426
6518
  revision: optionalKey(String4),
6519
+ harness: optionalKey(String4),
6520
+ model: optionalKey(String4),
6427
6521
  tokens: optionalKey(AttemptTokens)
6428
6522
  })),
6429
6523
  tokens: optionalKey(TokenUsage)
@@ -6732,7 +6826,7 @@ var WorkUnitLease = Struct({
6732
6826
  leaseExpiresAt: Timestamp,
6733
6827
  lastHeartbeatAt: Timestamp
6734
6828
  });
6735
- var WorkUnitLeaseProjection = Struct(map8(WorkUnitLease.fields, optionalKey));
6829
+ var WorkUnitLeaseProjection = Struct(map9(WorkUnitLease.fields, optionalKey));
6736
6830
  var WorkUnitRepoBinding = Struct({
6737
6831
  id: Id,
6738
6832
  provider: RepoBindingProvider,
@@ -9570,7 +9664,7 @@ var TranscriptSearchResult = Struct({
9570
9664
  });
9571
9665
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpBody.js
9572
9666
  var TypeId8 = "~effect/http/HttpBody";
9573
- class Proto4 {
9667
+ class Proto5 {
9574
9668
  [TypeId8];
9575
9669
  constructor() {
9576
9670
  this[TypeId8] = TypeId8;
@@ -9585,7 +9679,7 @@ class Proto4 {
9585
9679
  }
9586
9680
  }
9587
9681
 
9588
- class Empty extends Proto4 {
9682
+ class Empty extends Proto5 {
9589
9683
  _tag = "Empty";
9590
9684
  toJSON() {
9591
9685
  return {
@@ -9596,7 +9690,7 @@ class Empty extends Proto4 {
9596
9690
  }
9597
9691
  var empty5 = /* @__PURE__ */ new Empty;
9598
9692
 
9599
- class Raw extends Proto4 {
9693
+ class Raw extends Proto5 {
9600
9694
  _tag = "Raw";
9601
9695
  body;
9602
9696
  contentType;
@@ -9619,7 +9713,7 @@ class Raw extends Proto4 {
9619
9713
  }
9620
9714
  var raw = (body, options) => new Raw(body, options?.contentType, options?.contentLength);
9621
9715
 
9622
- class Uint8Array2 extends Proto4 {
9716
+ class Uint8Array2 extends Proto5 {
9623
9717
  _tag = "Uint8Array";
9624
9718
  contentType;
9625
9719
  contentLength;
@@ -9846,7 +9940,7 @@ var baseUrl = () => {
9846
9940
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpClientRequest.js
9847
9941
  var TypeId10 = "~effect/http/HttpClientRequest";
9848
9942
  var isHttpClientRequest = (u) => hasProperty(u, TypeId10);
9849
- var Proto5 = {
9943
+ var Proto6 = {
9850
9944
  [TypeId10]: TypeId10,
9851
9945
  ...BaseProto,
9852
9946
  toJSON() {
@@ -9865,7 +9959,7 @@ var Proto5 = {
9865
9959
  }
9866
9960
  };
9867
9961
  function makeWith(method, url, urlParams, hash, headers, body) {
9868
- const self = Object.create(Proto5);
9962
+ const self = Object.create(Proto6);
9869
9963
  self.method = method;
9870
9964
  self.url = url;
9871
9965
  self.urlParams = urlParams;
@@ -10052,7 +10146,7 @@ class WebHttpClientResponse extends Class {
10052
10146
  }
10053
10147
  textBody;
10054
10148
  get text() {
10055
- return this.textBody ??= map7(this.arrayBuffer, (_) => new TextDecoder().decode(_));
10149
+ return this.textBody ??= map8(this.arrayBuffer, (_) => new TextDecoder().decode(_));
10056
10150
  }
10057
10151
  get urlParamsBody() {
10058
10152
  return flatMap3(this.arrayBuffer, (bytes) => try_2({
@@ -10163,7 +10257,7 @@ var get2 = /* @__PURE__ */ accessor("get");
10163
10257
  var transform = /* @__PURE__ */ dual(2, (self, f) => makeWith2(flatMap3((request) => f(self.postprocess(succeed6(request)), request)), self.preprocess));
10164
10258
  var transformResponse = /* @__PURE__ */ dual(2, (self, f) => makeWith2((request) => f(self.postprocess(request)), self.preprocess));
10165
10259
  var makeWith2 = (postprocess, preprocess) => {
10166
- const self = Object.create(Proto6);
10260
+ const self = Object.create(Proto7);
10167
10261
  self.preprocess = preprocess;
10168
10262
  self.postprocess = postprocess;
10169
10263
  self.execute = function(request) {
@@ -10171,7 +10265,7 @@ var makeWith2 = (postprocess, preprocess) => {
10171
10265
  };
10172
10266
  return self;
10173
10267
  };
10174
- var Proto6 = {
10268
+ var Proto7 = {
10175
10269
  [TypeId13]: TypeId13,
10176
10270
  pipe() {
10177
10271
  return pipeArguments(this, arguments);
@@ -10203,7 +10297,7 @@ var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFibe
10203
10297
  if (tracerDisabled) {
10204
10298
  const effect = f(request, url, controller.signal, fiber);
10205
10299
  if (scopedController)
10206
- return map7(effect, (response) => trackResponse(response, controller, true));
10300
+ return map8(effect, (response) => trackResponse(response, controller, true));
10207
10301
  return uninterruptibleMask2((restore) => matchCauseEffect(restore(effect), {
10208
10302
  onSuccess(response) {
10209
10303
  return succeed6(trackResponse(response, controller, false));
@@ -10274,7 +10368,7 @@ var TracerPropagationEnabled = /* @__PURE__ */ Reference("effect/http/HttpClient
10274
10368
  var SpanNameGenerator = /* @__PURE__ */ Reference("effect/http/HttpClient/SpanNameGenerator", {
10275
10369
  defaultValue: () => (request) => request.method
10276
10370
  });
10277
- var layerMergedContext = (effect2) => effect(HttpClient)(contextWith((context) => map7(effect2, (client) => transformResponse(client, updateContext((input) => merge3(context, input))))));
10371
+ var layerMergedContext = (effect2) => effect(HttpClient)(contextWith((context) => map8(effect2, (client) => transformResponse(client, updateContext((input) => merge3(context, input))))));
10278
10372
  var responseRegistry = /* @__PURE__ */ (() => {
10279
10373
  if ("FinalizationRegistry" in globalThis && globalThis.FinalizationRegistry) {
10280
10374
  const registry = /* @__PURE__ */ new FinalizationRegistry((controller) => {
@@ -10439,7 +10533,7 @@ var fetch2 = /* @__PURE__ */ make27((request, url, signal, fiber) => {
10439
10533
  }
10440
10534
  let uploadController;
10441
10535
  const stopUpload = sync2(() => uploadController?.abort());
10442
- const send = (body) => map7(tryPromise({
10536
+ const send = (body) => map8(tryPromise({
10443
10537
  try: () => fetch2(url, {
10444
10538
  ...options,
10445
10539
  method: request.method,
@@ -10610,14 +10704,14 @@ var layerWebSocketConstructorGlobal = /* @__PURE__ */ succeed5(WebSocketConstruc
10610
10704
  }
10611
10705
  return new globalThis.WebSocket(url, options);
10612
10706
  });
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 : {
10707
+ 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
10708
  protocols: options.protocols,
10615
10709
  headers: options.headers
10616
10710
  }))), (ws) => sync2(() => ws.close(1000))), options));
10617
10711
  var isPausable = (ws) => ("pause" in ws) && typeof ws.pause === "function";
10618
10712
  var fromWebSocket = (acquire, options) => withFiber2((fiber) => {
10619
10713
  let currentWS;
10620
- const latch = makeUnsafe(false);
10714
+ const latch = makeUnsafe2(false);
10621
10715
  const acquireContext = fiber.context;
10622
10716
  const reader = gen(function* () {
10623
10717
  const scope = yield* scope2;
@@ -11245,7 +11339,7 @@ var effectMetrics = new Map(MetricDefinitions.map((definition) => {
11245
11339
  var processTelemetryRegistry = new Map;
11246
11340
  var processMetricRegistry = new Map;
11247
11341
  var collectorTimeout = "10 seconds";
11248
- var collectorHttpClient = effect(HttpClient)(map7(HttpClient, (client) => transform(client, (response, request) => timeoutOrElse(response, {
11342
+ var collectorHttpClient = effect(HttpClient)(map8(HttpClient, (client) => transform(client, (response, request) => timeoutOrElse(response, {
11249
11343
  duration: collectorTimeout,
11250
11344
  orElse: () => fail7(new HttpClientError({
11251
11345
  reason: new TransportError({
@@ -13144,7 +13238,7 @@ class KitmanEffectClient {
13144
13238
  return tryPromise({
13145
13239
  try: () => this.fetchImpl(this.url(path), { ...init, headers, signal: abort.signal }),
13146
13240
  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())));
13241
+ }).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
13242
  });
13149
13243
  const response = yield* method !== "GET" ? send.pipe(retry({ schedule: unansweredGetRetry, times: 5, while: refusedConnection })) : sendAndRead.pipe(timeoutOrElse({
13150
13244
  duration: getAnswerTimeout,
@@ -13206,8 +13300,8 @@ class KitmanEffectClient {
13206
13300
  function errorResponseDetails(response) {
13207
13301
  const contentType = response.headers.get("content-type") ?? "";
13208
13302
  if (contentType.includes("application/json"))
13209
- return tryPromise(() => response.json()).pipe(map7(parseErrorResponse), orElseSucceed(() => ({})));
13210
- return tryPromise(() => response.text()).pipe(map7((text) => {
13303
+ return tryPromise(() => response.json()).pipe(map8(parseErrorResponse), orElseSucceed(() => ({})));
13304
+ return tryPromise(() => response.text()).pipe(map8((text) => {
13211
13305
  const message = sanitizeErrorDetail(text);
13212
13306
  return message === undefined ? {} : { message };
13213
13307
  }), orElseSucceed(() => ({})));
@@ -13503,13 +13597,13 @@ function resolveConfig(input) {
13503
13597
  ...userAgentPreferences === undefined ? undefined : { userAgentPreferences }
13504
13598
  };
13505
13599
  }
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));
13600
+ var apiUrlFromEnv = String2("KITMAN_API_URL").pipe(option, map8(getOrUndefined));
13601
+ var stepCredentialFromEnv = String2("KITMAN_STEP_CREDENTIAL").pipe(option, map8(getOrUndefined));
13602
+ var stepWorkspaceFromEnv = String2("KITMAN_STEP_WORKSPACE").pipe(option, map8(getOrUndefined));
13603
+ var stepSkillsDirFromEnv = String2("KITMAN_STEP_SKILLS_DIR").pipe(option, map8(getOrUndefined));
13604
+ var stepFittingSkillsFromEnv = String2("KITMAN_STEP_FITTING_SKILLS").pipe(option, map8((names) => getOrElse(names, () => "").split(",").filter((name) => name !== "")));
13605
+ var stepOutputOnlyFromEnv = String2("KITMAN_STEP_TOOLS").pipe(option, map8((tools) => getOrUndefined(tools) === "output"));
13606
+ var mcpCredentialNameFromEnv = String2("KITMAN_MCP_CREDENTIAL_NAME").pipe(option, map8(getOrUndefined));
13513
13607
  var kitmanConfigDir = gen(function* () {
13514
13608
  const path = yield* Path;
13515
13609
  const xdgConfigHome = yield* String2("XDG_CONFIG_HOME").pipe(option);
@@ -13527,7 +13621,7 @@ var userHarnessSyncPath = configFile("harness-sync.json");
13527
13621
  var kitSetupCacheDir = configFile("kit-setups");
13528
13622
  var bundleCacheDir = configFile("bundles");
13529
13623
  var runnerReleaseChannelPath = (runnerId) => configFile(`runner-release-channels/${runnerId}`);
13530
- var localConfigPath = Path.pipe(map7((path) => path.resolve(".kitman/config.json")));
13624
+ var localConfigPath = Path.pipe(map8((path) => path.resolve(".kitman/config.json")));
13531
13625
  function readUserConfig(path) {
13532
13626
  return gen(function* () {
13533
13627
  const filePath = path ?? (yield* userConfigPath);
@@ -13655,7 +13749,7 @@ function sessionForApi(auth, apiUrl) {
13655
13749
  return auth.sessions[normalizeApiUrl(apiUrl)];
13656
13750
  }
13657
13751
  function readAuthStore(path) {
13658
- return readUserAuth(path).pipe(map7((auth) => isAuthStore(auth) ? normalizeAuthStore(auth) : { sessions: {} }), catchTag("SchemaError", () => succeed6({ sessions: {} })));
13752
+ return readUserAuth(path).pipe(map8((auth) => isAuthStore(auth) ? normalizeAuthStore(auth) : { sessions: {} }), catchTag("SchemaError", () => succeed6({ sessions: {} })));
13659
13753
  }
13660
13754
  function writeAuthStore(auth, path) {
13661
13755
  return writeUserAuth(auth, path);
@@ -13803,7 +13897,7 @@ function Stream(success, error) {
13803
13897
 
13804
13898
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/rpc/Rpc.js
13805
13899
  var TypeId15 = "~effect/rpc/Rpc";
13806
- var Proto7 = {
13900
+ var Proto8 = {
13807
13901
  [TypeId15]: TypeId15,
13808
13902
  pipe() {
13809
13903
  return pipeArguments(this, arguments);
@@ -13888,7 +13982,7 @@ var Proto7 = {
13888
13982
  };
13889
13983
  var makeProto = (options) => {
13890
13984
  function Rpc() {}
13891
- Object.setPrototypeOf(Rpc, Proto7);
13985
+ Object.setPrototypeOf(Rpc, Proto8);
13892
13986
  Object.assign(Rpc, options);
13893
13987
  Rpc.key = `effect/rpc/Rpc/${options._tag}`;
13894
13988
  return Rpc;
@@ -14014,7 +14108,7 @@ var RpcGroupProto = {
14014
14108
  }
14015
14109
  return makeProto2({
14016
14110
  requests,
14017
- annotations: makeUnsafe3(annotations)
14111
+ annotations: makeUnsafe4(annotations)
14018
14112
  });
14019
14113
  },
14020
14114
  omit(...tags) {
@@ -14050,7 +14144,7 @@ var RpcGroupProto = {
14050
14144
  context: services
14051
14145
  });
14052
14146
  });
14053
- return makeUnsafe3(contextMap);
14147
+ return makeUnsafe4(contextMap);
14054
14148
  });
14055
14149
  },
14056
14150
  prefix(prefix) {
@@ -14079,7 +14173,7 @@ var RpcGroupProto = {
14079
14173
  handler,
14080
14174
  context: services
14081
14175
  });
14082
- return makeUnsafe3(contextMap);
14176
+ return makeUnsafe4(contextMap);
14083
14177
  }));
14084
14178
  },
14085
14179
  accessHandler(service) {
@@ -14104,7 +14198,7 @@ var RpcGroupProto = {
14104
14198
  });
14105
14199
  },
14106
14200
  annotateRpcs(service, value) {
14107
- return this.annotateRpcsMerge(make14(service, value));
14201
+ return this.annotateRpcsMerge(make15(service, value));
14108
14202
  },
14109
14203
  annotateMerge(context) {
14110
14204
  return makeProto2({
@@ -14788,7 +14882,7 @@ var ProgramRpcs = RunnerJournalRpcs.merge(RunnerCapabilityRpcs, RunnerRunFileRpc
14788
14882
  var RunnerRpcs = RunnerReplicaRpcs.merge(RunnerJournalRpcs, RunnerCapabilityRpcs, RunnerRunFileRpcs);
14789
14883
 
14790
14884
  // apps/cli/src/oauth.ts
14791
- var Scope2 = "openid profile email offline_access kitman:cli";
14885
+ var Scope = "openid profile email offline_access kitman:cli";
14792
14886
  var CallbackPath = "/auth/callback";
14793
14887
 
14794
14888
  class OAuthCallbackTimeout extends TaggedError("OAuthCallbackTimeout") {
@@ -14807,7 +14901,7 @@ function buildAuthorizeUrl(input) {
14807
14901
  url.searchParams.set("response_type", "code");
14808
14902
  url.searchParams.set("client_id", input.clientId);
14809
14903
  url.searchParams.set("redirect_uri", input.redirectUri);
14810
- url.searchParams.set("scope", Scope2);
14904
+ url.searchParams.set("scope", Scope);
14811
14905
  url.searchParams.set("code_challenge", input.codeChallenge);
14812
14906
  url.searchParams.set("code_challenge_method", "S256");
14813
14907
  url.searchParams.set("state", input.state);
@@ -14867,7 +14961,7 @@ function toStoredSession(token, existingRefreshToken) {
14867
14961
  }
14868
14962
  function startLoopbackServer(input) {
14869
14963
  return gen(function* () {
14870
- const code = yield* make15();
14964
+ const code = yield* make16();
14871
14965
  const context2 = yield* context();
14872
14966
  const runSyncExit = runSyncExitWith(context2);
14873
14967
  const server = yield* acquireRelease(sync2(() => Bun.serve({
@@ -14976,7 +15070,7 @@ function createSdkClient(input) {
14976
15070
  const runPromise = runPromiseWith(yield* context());
14977
15071
  const fetchImpl = input.fetch ?? (yield* Fetch);
14978
15072
  let session = input.session;
14979
- const refreshPermit = makeUnsafe2(1);
15073
+ const refreshPermit = makeUnsafe3(1);
14980
15074
  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
15075
  const authorizedFetch = (resource, init) => runPromise(gen(function* () {
14982
15076
  if (session.refreshToken && shouldRefresh(yield* currentDate, session.expiresAt))
@@ -14996,7 +15090,7 @@ function createSdkClient(input) {
14996
15090
  });
14997
15091
  }
14998
15092
  function refreshSession(input) {
14999
- const storedSession = readAuthStore(input.authPath).pipe(map7((auth) => sessionForApi(auth, input.apiUrl)));
15093
+ const storedSession = readAuthStore(input.authPath).pipe(map8((auth) => sessionForApi(auth, input.apiUrl)));
15000
15094
  return withAuthLock(input.authPath, gen(function* () {
15001
15095
  const stored = yield* storedSession;
15002
15096
  if (!stored)
@@ -15011,7 +15105,7 @@ function refreshSession(input) {
15011
15105
  clientId: input.clientId ?? ClientId,
15012
15106
  refreshToken: spentToken,
15013
15107
  ...input.fetch ? { fetch: input.fetch } : undefined
15014
- }).pipe(map7((token) => toStoredSession(token, spentToken)));
15108
+ }).pipe(map8((token) => toStoredSession(token, spentToken)));
15015
15109
  const session = yield* refreshing.pipe(catch_((error) => storedSession.pipe(filterOrFail((current) => current !== undefined && current.refreshToken !== spentToken, () => error))));
15016
15110
  const current = yield* storedSession;
15017
15111
  if (current?.refreshToken !== spentToken)
@@ -15407,7 +15501,7 @@ var openConnection = (transport) => gen(function* () {
15407
15501
  let lastId = 0;
15408
15502
  let lost = false;
15409
15503
  const notifications = yield* unbounded2();
15410
- const ended = yield* make15();
15504
+ const ended = yield* make16();
15411
15505
  const settle = (line) => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Response2)), {
15412
15506
  onNone: () => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Notification)), {
15413
15507
  onNone: () => void_3,
@@ -15434,7 +15528,7 @@ var openConnection = (transport) => gen(function* () {
15434
15528
  if (lost)
15435
15529
  return yield* new HerdrCoreConnectionLost2({ method });
15436
15530
  const id = ++lastId;
15437
- const deferred = yield* make15();
15531
+ const deferred = yield* make16();
15438
15532
  pending.set(id, { method, deferred });
15439
15533
  yield* pipe.write(encodeJsonStringSync({ jsonrpc: "2.0", id, method, params }));
15440
15534
  return yield* _await(deferred);
@@ -15466,9 +15560,9 @@ var herdrCoreOver = (transport) => ({
15466
15560
  ...input.name === undefined ? undefined : { name: input.name },
15467
15561
  no_parent: input.noParent === true
15468
15562
  }),
15469
- list: (filter = {}) => request("terminal.list", Listed, { labels: filter.labels ?? {}, all: filter.all === true }).pipe(map7((listed) => listed.terminals)),
15563
+ list: (filter = {}) => request("terminal.list", Listed, { labels: filter.labels ?? {}, all: filter.all === true }).pipe(map8((listed) => listed.terminals)),
15470
15564
  get: (terminal) => request("terminal.get", Terminal2, { terminal }),
15471
- read: (terminal) => request("terminal.read", Screen, { terminal }).pipe(map7((screen) => screen.text)),
15565
+ read: (terminal) => request("terminal.read", Screen, { terminal }).pipe(map8((screen) => screen.text)),
15472
15566
  interrupt: (terminal, options = {}) => request("terminal.interrupt", Interrupted, {
15473
15567
  terminal,
15474
15568
  ...options.timeoutSeconds === undefined ? undefined : { timeout: options.timeoutSeconds }
@@ -15508,7 +15602,7 @@ var herdrCoreOver = (transport) => ({
15508
15602
  return { type: "event", terminal: event.value.terminal, kind: event.value.type, data: event.value.data };
15509
15603
  };
15510
15604
  const snapshot = { type: "snapshot", terminals: subscribed.terminals };
15511
- return concat(make10(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
15605
+ return concat(make11(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
15512
15606
  }))
15513
15607
  });
15514
15608
  var spawnedTransport = (env) => gen(function* () {
@@ -15531,7 +15625,7 @@ var coreEnv = (options) => {
15531
15625
  const env = Object.fromEntries(Object.entries(options.env ?? process.env).filter((entry) => entry[0] !== "HC_SESSION" && entry[1] !== undefined));
15532
15626
  return options.session === undefined ? env : { ...env, HC_SESSION: options.session };
15533
15627
  };
15534
- var herdrCoreLayer2 = (options) => effect(HerdrCore2, map7(ChildProcessSpawner, (spawner) => herdrCoreOver(spawnedTransport(coreEnv(options)).pipe(provideService(ChildProcessSpawner, spawner)))));
15628
+ var herdrCoreLayer2 = (options) => effect(HerdrCore2, map8(ChildProcessSpawner, (spawner) => herdrCoreOver(spawnedTransport(coreEnv(options)).pipe(provideService(ChildProcessSpawner, spawner)))));
15535
15629
  var herdrCoreTransportLayer2 = (transport) => succeed5(HerdrCore2, herdrCoreOver(transport));
15536
15630
  var UpdateRefused = Struct({
15537
15631
  error: Struct({ message: String4, hint: optionalKey(String4) })
@@ -15554,13 +15648,13 @@ var updateHerdrCore2 = (options) => gen(function* () {
15554
15648
  ], { concurrency: 3 });
15555
15649
  return { stdout, stderr, exitCode };
15556
15650
  }).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({
15651
+ 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
15652
  duration: options.timeout,
15559
15653
  orElse: () => succeed6(`it did not finish within ${options.timeout}`)
15560
15654
  }));
15561
15655
  if (reason === undefined)
15562
15656
  return;
15563
- const version = yield* run(["--version"]).pipe(map7(({ stdout }) => stdout.trim() || "an unknown version"), timeout("10 seconds"), orElseSucceed(() => "an unknown version"));
15657
+ const version = yield* run(["--version"]).pipe(map8(({ stdout }) => stdout.trim() || "an unknown version"), timeout("10 seconds"), orElseSucceed(() => "an unknown version"));
15564
15658
  return yield* new HerdrCoreUpdateFailed2({ version, reason: reason.slice(0, 400) });
15565
15659
  });
15566
15660
 
@@ -15599,7 +15693,7 @@ var runProcess2 = (argv, options) => gen(function* () {
15599
15693
  const spawner = yield* ChildProcessSpawner;
15600
15694
  const [command, ...args] = argv;
15601
15695
  const handle = yield* spawner.spawn(make3(command, args, {
15602
- stdin: options.stdin === undefined ? "ignore" : make10(new TextEncoder().encode(options.stdin)),
15696
+ stdin: options.stdin === undefined ? "ignore" : make11(new TextEncoder().encode(options.stdin)),
15603
15697
  ...options.cwd === undefined ? undefined : { cwd: options.cwd },
15604
15698
  env: options.extendEnv === false ? { ...options.env } : { ...withoutPreloads2(), ...options.env }
15605
15699
  }));
@@ -15645,7 +15739,7 @@ var detectHarnesses2 = gen(function* () {
15645
15739
  const home = (yield* optionalEnv("HOME")) ?? "/";
15646
15740
  const searchPath = ((yield* optionalEnv("PATH")) ?? "").split(":").filter(Boolean);
15647
15741
  const exists = (file) => fs.exists(file).pipe(orElseSucceed(() => false));
15648
- const any = (items, test) => map7(findFirst(items, test), isSome);
15742
+ const any = (items, test) => map8(findFirst(items, test), isSome);
15649
15743
  const loginFound = (login) => gen(function* () {
15650
15744
  const file = path.join(home, login.path);
15651
15745
  if (!(yield* exists(file)))
@@ -15661,7 +15755,7 @@ var detectHarnesses2 = gen(function* () {
15661
15755
  unavailable.push({ harness: harness.id, missing: [`\`${harness.id}\` is not installed`] });
15662
15756
  continue;
15663
15757
  }
15664
- const loggedIn = (yield* any(harness.keys, (key) => map7(optionalEnv(key), Boolean))) || (yield* any(harness.logins, loginFound));
15758
+ const loggedIn = (yield* any(harness.keys, (key) => map8(optionalEnv(key), Boolean))) || (yield* any(harness.logins, loginFound));
15665
15759
  if (loggedIn)
15666
15760
  harnesses.push(harness.id);
15667
15761
  else
@@ -16031,4 +16125,4 @@ function checkServices(declaration) {
16031
16125
  return isSome(decoded) ? [...new Set(decoded.value.services)] : undefined;
16032
16126
  }
16033
16127
 
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 };
16128
+ 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, 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 };