@kitman-sh/cli 0.16.0 → 0.17.0

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 (28) hide show
  1. package/dist/{chunk-rv6d2r5v.js → chunk-0f67q0tf.js} +9 -9
  2. package/dist/{chunk-gpcrp0tc.js → chunk-0wqkz371.js} +3 -3
  3. package/dist/{chunk-cqejv8e6.js → chunk-2928qj8m.js} +51 -30
  4. package/dist/{chunk-hbm0hybe.js → chunk-2sazk478.js} +4 -4
  5. package/dist/{chunk-f02v4cdn.js → chunk-5me7tnrw.js} +3 -3
  6. package/dist/{chunk-gt7gk0d4.js → chunk-829r4kya.js} +4 -4
  7. package/dist/{chunk-5jt8b98c.js → chunk-8r1a93rc.js} +4 -4
  8. package/dist/{chunk-djdhep8n.js → chunk-9a6wbk11.js} +3 -3
  9. package/dist/{chunk-r58fc2x9.js → chunk-ebpjd7kg.js} +6 -6
  10. package/dist/{chunk-xc76s9kk.js → chunk-ekyj0bps.js} +7 -7
  11. package/dist/{chunk-4g7cj90y.js → chunk-g3jqqpky.js} +9 -9
  12. package/dist/{chunk-zgbjha6j.js → chunk-j37p2y71.js} +190 -350
  13. package/dist/{chunk-9n6hd7es.js → chunk-jg1pjhba.js} +21 -21
  14. package/dist/{chunk-yg34g1m8.js → chunk-kx8rpa62.js} +5 -5
  15. package/dist/{chunk-gwzzacep.js → chunk-m1qp6swh.js} +1 -1
  16. package/dist/{chunk-n9fhwgzm.js → chunk-nf9rfrvv.js} +34 -34
  17. package/dist/{chunk-23nvmnkp.js → chunk-nqh0pbgt.js} +1 -1
  18. package/dist/{chunk-f2y0z04q.js → chunk-pd3azxev.js} +1 -1
  19. package/dist/{chunk-4v691rg5.js → chunk-pnckztvv.js} +20 -20
  20. package/dist/{chunk-1scjh42j.js → chunk-qjxgew0k.js} +2 -2
  21. package/dist/{chunk-x83q18w0.js → chunk-r2kzvdrg.js} +1 -1
  22. package/dist/{chunk-g6nhny28.js → chunk-r3d2yjsh.js} +25 -25
  23. package/dist/{chunk-4pq5vq59.js → chunk-vh2a72d1.js} +14 -60
  24. package/dist/{chunk-rfnasm3c.js → chunk-y64ssczv.js} +289 -71
  25. package/dist/{chunk-ppdf5m4j.js → chunk-z59pvcbk.js} +187 -178
  26. package/dist/{chunk-sd8b4k1t.js → chunk-zy21drtv.js} +2 -2
  27. package/dist/index.js +4 -4
  28. package/package.json +1 -1
@@ -34,8 +34,11 @@ import {
34
34
  getOrUndefined,
35
35
  map4,
36
36
  Service2,
37
- get3,
37
+ add,
38
+ get4,
38
39
  Reference,
40
+ fromInputUnsafe,
41
+ isFinite,
39
42
  normalize,
40
43
  succeed,
41
44
  fail3,
@@ -78,13 +81,12 @@ import {
78
81
  fiberRunIn,
79
82
  makeLatchUnsafe,
80
83
  makeLatch,
81
- ClockRef,
82
- currentTimeMillis2,
83
84
  succeed3,
84
85
  failCause2,
85
86
  fail4,
86
87
  interrupt2,
87
88
  void_2,
89
+ isSuccess2,
88
90
  isFailure2,
89
91
  asVoidAll,
90
92
  makeUnsafe5,
@@ -156,12 +158,14 @@ import {
156
158
  tapError2,
157
159
  ignoreCause,
158
160
  orElseSucceed,
161
+ sleep,
159
162
  raceFirst,
160
163
  when,
161
164
  matchCauseEffect,
162
165
  context,
163
166
  contextWith,
164
167
  provideContext2,
168
+ scope2,
165
169
  scoped,
166
170
  scopedWith,
167
171
  acquireRelease,
@@ -172,6 +176,7 @@ import {
172
176
  interrupt3,
173
177
  onInterrupt,
174
178
  uninterruptible,
179
+ uninterruptibleMask2,
175
180
  forever,
176
181
  forkChild,
177
182
  forkIn,
@@ -183,6 +188,7 @@ import {
183
188
  mapEager,
184
189
  flatMapEager,
185
190
  catchEager,
191
+ fromInputUnsafe2,
186
192
  Pointer,
187
193
  passthrough,
188
194
  transformEffect,
@@ -194,11 +200,11 @@ import {
194
200
  toEncoded,
195
201
  decodeUnknownEffect,
196
202
  SchemaError,
197
- make16,
203
+ make17,
198
204
  String4,
199
205
  toCodecStringTree,
200
206
  encodeUnknownJsonStringSync
201
- } from "./chunk-rfnasm3c.js";
207
+ } from "./chunk-y64ssczv.js";
202
208
 
203
209
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
204
210
  var headUnsafe = (self) => {
@@ -247,145 +253,6 @@ var makeEquivalence = (equivalence) => {
247
253
  return (self, that) => is(self, that) && is(that, self);
248
254
  };
249
255
 
250
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
251
- var Clock = ClockRef;
252
- var currentTimeMillis = currentTimeMillis2;
253
-
254
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/ByteSize.js
255
- var bigint0 = /* @__PURE__ */ BigInt(0);
256
- var bigint1 = /* @__PURE__ */ BigInt(1);
257
- var decimalBase = /* @__PURE__ */ BigInt(1000);
258
- var binaryBase = /* @__PURE__ */ BigInt(1024);
259
- var decimalUnits = [{
260
- symbol: "B",
261
- factor: bigint1,
262
- names: ["B", "byte", "bytes"]
263
- }, {
264
- symbol: "kB",
265
- factor: decimalBase,
266
- names: ["kB", "kilobyte", "kilobytes"]
267
- }, {
268
- symbol: "MB",
269
- factor: decimalBase ** /* @__PURE__ */ BigInt(2),
270
- names: ["MB", "megabyte", "megabytes"]
271
- }, {
272
- symbol: "GB",
273
- factor: decimalBase ** /* @__PURE__ */ BigInt(3),
274
- names: ["GB", "gigabyte", "gigabytes"]
275
- }, {
276
- symbol: "TB",
277
- factor: decimalBase ** /* @__PURE__ */ BigInt(4),
278
- names: ["TB", "terabyte", "terabytes"]
279
- }, {
280
- symbol: "PB",
281
- factor: decimalBase ** /* @__PURE__ */ BigInt(5),
282
- names: ["PB", "petabyte", "petabytes"]
283
- }, {
284
- symbol: "EB",
285
- factor: decimalBase ** /* @__PURE__ */ BigInt(6),
286
- names: ["EB", "exabyte", "exabytes"]
287
- }, {
288
- symbol: "ZB",
289
- factor: decimalBase ** /* @__PURE__ */ BigInt(7),
290
- names: ["ZB", "zettabyte", "zettabytes"]
291
- }, {
292
- symbol: "YB",
293
- factor: decimalBase ** /* @__PURE__ */ BigInt(8),
294
- names: ["YB", "yottabyte", "yottabytes"]
295
- }, {
296
- symbol: "RB",
297
- factor: decimalBase ** /* @__PURE__ */ BigInt(9),
298
- names: ["RB", "ronnabyte", "ronnabytes"]
299
- }, {
300
- symbol: "QB",
301
- factor: decimalBase ** /* @__PURE__ */ BigInt(10),
302
- names: ["QB", "quettabyte", "quettabytes"]
303
- }];
304
- var binaryUnits = [decimalUnits[0], {
305
- symbol: "KiB",
306
- factor: binaryBase,
307
- names: ["KiB", "kibibyte", "kibibytes"]
308
- }, {
309
- symbol: "MiB",
310
- factor: binaryBase ** /* @__PURE__ */ BigInt(2),
311
- names: ["MiB", "mebibyte", "mebibytes"]
312
- }, {
313
- symbol: "GiB",
314
- factor: binaryBase ** /* @__PURE__ */ BigInt(3),
315
- names: ["GiB", "gibibyte", "gibibytes"]
316
- }, {
317
- symbol: "TiB",
318
- factor: binaryBase ** /* @__PURE__ */ BigInt(4),
319
- names: ["TiB", "tebibyte", "tebibytes"]
320
- }, {
321
- symbol: "PiB",
322
- factor: binaryBase ** /* @__PURE__ */ BigInt(5),
323
- names: ["PiB", "pebibyte", "pebibytes"]
324
- }, {
325
- symbol: "EiB",
326
- factor: binaryBase ** /* @__PURE__ */ BigInt(6),
327
- names: ["EiB", "exbibyte", "exbibytes"]
328
- }, {
329
- symbol: "ZiB",
330
- factor: binaryBase ** /* @__PURE__ */ BigInt(7),
331
- names: ["ZiB", "zebibyte", "zebibytes"]
332
- }, {
333
- symbol: "YiB",
334
- factor: binaryBase ** /* @__PURE__ */ BigInt(8),
335
- names: ["YiB", "yobibyte", "yobibytes"]
336
- }];
337
- var allUnits = [...decimalUnits, .../* @__PURE__ */ binaryUnits.slice(1)];
338
- var unitsByName = /* @__PURE__ */ new Map(/* @__PURE__ */ allUnits.flatMap((unit) => unit.names.map((name) => [name, unit])));
339
- var make = (value) => value;
340
- var invalid = (message) => {
341
- throw new Error(`Invalid ByteSize: ${message}`);
342
- };
343
- var fromNumber = (input) => {
344
- if (!Number.isSafeInteger(input) || input < 0) {
345
- return invalid(`expected a non-negative safe integer, received ${input}`);
346
- }
347
- return make(BigInt(input));
348
- };
349
- var maxSafeInteger = /* @__PURE__ */ BigInt(Number.MAX_SAFE_INTEGER);
350
- var scaleDecimal = (quantity, factor) => {
351
- const match = /^(\d+)(?:\.(\d+))?(?:e([+-]\d+))?$/.exec(quantity);
352
- if (match === null)
353
- return;
354
- const fraction = match[2] ?? "";
355
- const numerator = BigInt(match[1] + fraction) * factor;
356
- const shift = Number(match[3] ?? 0) - fraction.length;
357
- if (shift >= 0)
358
- return numerator * BigInt(10) ** BigInt(shift);
359
- const scale = BigInt(10) ** BigInt(-shift);
360
- return numerator % scale === bigint0 ? numerator / scale : undefined;
361
- };
362
- var fromStringUnsafe = (input) => {
363
- const match = /^\s*(\d+(?:\.\d+)?)\s*([A-Za-z]+)\s*$/.exec(input);
364
- if (match === null)
365
- return invalid(`unsupported syntax ${JSON.stringify(input)}`);
366
- const unit = unitsByName.get(match[2]);
367
- if (unit === undefined)
368
- return invalid(`unsupported unit ${JSON.stringify(match[2])}`);
369
- const value = scaleDecimal(match[1], unit.factor);
370
- if (value === undefined)
371
- return invalid(`${JSON.stringify(input)} does not represent an integral number of bytes`);
372
- return make(value);
373
- };
374
- var fromInputUnsafe = (input) => {
375
- switch (typeof input) {
376
- case "bigint":
377
- if (input < bigint0)
378
- return invalid(`expected a non-negative bigint, received ${input}`);
379
- return make(input);
380
- case "number":
381
- return fromNumber(input);
382
- case "string":
383
- return fromStringUnsafe(input);
384
- }
385
- return invalid(`unsupported input ${input}`);
386
- };
387
- var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe(value) : fromNumber(value);
388
-
389
256
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Fiber.js
390
257
  var join = fiberJoin;
391
258
  var interrupt = fiberInterrupt;
@@ -938,7 +805,7 @@ var isIgnorable = (error) => isMissing(error) || error.reason._tag === "Permissi
938
805
  var isNotLink = (error) => isIgnorable(error) || error.reason._tag === "Unknown";
939
806
  var DIRECTORY_CONCURRENCY = 16;
940
807
  var byName = /* @__PURE__ */ mapInput(String3, (entry) => entry.name);
941
- var make2 = (fs) => (pattern, options) => walk(fs, compile([pattern], options?.dot ?? false), options);
808
+ var make = (fs) => (pattern, options) => walk(fs, compile([pattern], options?.dot ?? false), options);
942
809
  var walk = /* @__PURE__ */ fnUntraced(function* (fs, compiled, options) {
943
810
  if (compiled.initial.size === 0) {
944
811
  return [];
@@ -1116,7 +983,7 @@ var badArgument = (options) => new PlatformError(new BadArgument(options));
1116
983
 
1117
984
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Latch.js
1118
985
  var makeUnsafe2 = makeLatchUnsafe;
1119
- var make3 = makeLatch;
986
+ var make2 = makeLatch;
1120
987
 
1121
988
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/MutableRef.js
1122
989
  var TypeId2 = "~effect/MutableRef";
@@ -1130,7 +997,7 @@ var MutableRefProto = {
1130
997
  };
1131
998
  }
1132
999
  };
1133
- var make8 = (value) => {
1000
+ var make7 = (value) => {
1134
1001
  const ref = Object.create(MutableRefProto);
1135
1002
  ref.current = value;
1136
1003
  return ref;
@@ -1142,7 +1009,7 @@ var set = /* @__PURE__ */ dual(2, (self, value) => {
1142
1009
 
1143
1010
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/MutableList.js
1144
1011
  var Empty = /* @__PURE__ */ Symbol.for("effect/MutableList/Empty");
1145
- var make4 = () => ({
1012
+ var make3 = () => ({
1146
1013
  head: undefined,
1147
1014
  tail: undefined,
1148
1015
  length: 0
@@ -1291,8 +1158,8 @@ var remove = (self, value) => filter2(self, (v) => v !== value);
1291
1158
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/PubSub.js
1292
1159
  var TypeId3 = "~effect/PubSub";
1293
1160
  var SubscriptionTypeId = "~effect/PubSub/Subscription";
1294
- var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make8(false), options.strategy(), make8(none())));
1295
- var unbounded = (options) => make5({
1161
+ var make4 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make7(false), options.strategy(), make7(none())));
1162
+ var unbounded = (options) => make4({
1296
1163
  atomicPubSub: () => makeAtomicUnbounded(options),
1297
1164
  strategy: () => new DroppingStrategy
1298
1165
  });
@@ -1310,7 +1177,7 @@ var publishUnsafe = /* @__PURE__ */ dual(2, (self, value) => {
1310
1177
  return false;
1311
1178
  });
1312
1179
  var subscribe = (self) => uninterruptible(contextWith((services) => {
1313
- const localScope = get3(services, Scope);
1180
+ const localScope = get4(services, Scope);
1314
1181
  const scope = forkUnsafe(self.scope);
1315
1182
  const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
1316
1183
  return addFinalizer(scope, unsubscribe(subscription)).pipe(andThen2(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
@@ -1386,7 +1253,7 @@ var removeSubscribers = (subscribers, subscription, pollers) => {
1386
1253
  subscribers.delete(subscription);
1387
1254
  }
1388
1255
  };
1389
- var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false), make8(false), strategy, pubsub.replayWindow(), ended);
1256
+ var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make3(), makeUnsafe2(false), make7(false), strategy, pubsub.replayWindow(), ended);
1390
1257
  class UnboundedPubSub {
1391
1258
  publisherHead = {
1392
1259
  value: AbsentValue,
@@ -1803,12 +1670,12 @@ var QueueProto = {
1803
1670
  };
1804
1671
  }
1805
1672
  };
1806
- var make9 = (options) => withFiber((fiber) => {
1673
+ var make8 = (options) => withFiber((fiber) => {
1807
1674
  const self = Object.create(QueueProto);
1808
1675
  self.dispatcher = fiber.currentDispatcher;
1809
1676
  self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
1810
1677
  self.strategy = options?.strategy ?? "suspend";
1811
- self.messages = make4();
1678
+ self.messages = make3();
1812
1679
  self.scheduleRunning = false;
1813
1680
  self.state = {
1814
1681
  _tag: "Open",
@@ -1818,14 +1685,14 @@ var make9 = (options) => withFiber((fiber) => {
1818
1685
  };
1819
1686
  return succeed2(self);
1820
1687
  });
1821
- var bounded = (capacity) => make9({
1688
+ var bounded = (capacity) => make8({
1822
1689
  capacity
1823
1690
  });
1824
- var sliding = (capacity) => make9({
1691
+ var sliding = (capacity) => make8({
1825
1692
  capacity,
1826
1693
  strategy: "sliding"
1827
1694
  });
1828
- var unbounded2 = () => make9();
1695
+ var unbounded2 = () => make8();
1829
1696
  var offer = /* @__PURE__ */ dual(2, (self, message) => suspend2(() => offerUnsafe(self, message) ? exitTrue : self.state._tag === "Open" && self.strategy === "suspend" ? offerOrWait(self, message) : exitFalse));
1830
1697
  var offerUnsafe = (self, message) => {
1831
1698
  if (self.state._tag !== "Open") {
@@ -2251,7 +2118,7 @@ var fromTransformBracket = (f) => fromTransform(fnUntraced(function* (upstream,
2251
2118
  return onError(pull, onCause);
2252
2119
  }));
2253
2120
  var toTransform = (channel) => channel.transform;
2254
- var asyncQueue = (scope, f, options) => make9({
2121
+ var asyncQueue = (scope, f, options) => make8({
2255
2122
  capacity: options?.bufferSize,
2256
2123
  strategy: options?.strategy
2257
2124
  }).pipe(tap2((queue) => addFinalizer(scope, shutdown(queue))), tap2((queue) => provide(f(queue), scope).pipe(catchCause2((cause) => failCause(queue, cause)), forkIn(scope, {
@@ -2292,7 +2159,7 @@ var fromReadableStream2 = (options) => fromTransform((_, scope) => readableStrea
2292
2159
  }));
2293
2160
  var readableStreamToPullUnsafe = (options) => {
2294
2161
  const reader = options.readable.getReader();
2295
- const exit = options.exit ?? make8(undefined);
2162
+ const exit = options.exit ?? make7(undefined);
2296
2163
  const pull = suspend3(() => {
2297
2164
  if (exit.current)
2298
2165
  return exit.current;
@@ -2500,7 +2367,7 @@ var mergeAll = /* @__PURE__ */ dual(2, (channels, {
2500
2367
  }) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
2501
2368
  const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : Math.max(1, concurrency);
2502
2369
  const semaphore = switch_ ? undefined : makeUnsafe3(concurrencyN);
2503
- const doneLatch = yield* make3(true);
2370
+ const doneLatch = yield* make2(true);
2504
2371
  const fibers = new Map;
2505
2372
  const queue = yield* bounded(bufferSize);
2506
2373
  yield* addFinalizer(forkedScope, shutdown(queue));
@@ -2807,9 +2674,151 @@ var forEachArray = (f) => fromTransform2((upstream) => upstream.pipe(flatMap3(f)
2807
2674
  }), catchDone(() => endVoid)));
2808
2675
  var unwrap3 = (effect) => fromChannel(unwrap2(map9(effect, toChannel)));
2809
2676
 
2677
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
2678
+ var TypeId8 = "~effect/RcRef";
2679
+ var stateEmpty = {
2680
+ _tag: "Empty"
2681
+ };
2682
+ var stateClosed = {
2683
+ _tag: "Closed"
2684
+ };
2685
+ var variance2 = {
2686
+ _A: identity,
2687
+ _E: identity
2688
+ };
2689
+
2690
+ class RcRefImpl {
2691
+ [TypeId8] = variance2;
2692
+ pipe() {
2693
+ return pipeArguments(this, arguments);
2694
+ }
2695
+ state = stateEmpty;
2696
+ acquire;
2697
+ context;
2698
+ scope;
2699
+ idleTimeToLive;
2700
+ constructor(acquire, context, scope, idleTimeToLive) {
2701
+ this.acquire = acquire;
2702
+ this.context = context;
2703
+ this.scope = scope;
2704
+ this.idleTimeToLive = idleTimeToLive;
2705
+ }
2706
+ }
2707
+ var make5 = (options) => withFiber2((fiber) => {
2708
+ const context = fiber.context;
2709
+ const scope = get4(context, Scope);
2710
+ const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
2711
+ return as(addFinalizerExit(scope, () => {
2712
+ const state = ref.state;
2713
+ ref.state = stateClosed;
2714
+ if (state._tag === "Acquired")
2715
+ return close(state.scope, void_2);
2716
+ if (state._tag === "Acquiring")
2717
+ return interrupt(state.fiber);
2718
+ return void_3;
2719
+ }), ref);
2720
+ });
2721
+ var getState = (self, restore) => {
2722
+ switch (self.state._tag) {
2723
+ case "Closed": {
2724
+ return interrupt3;
2725
+ }
2726
+ case "Acquired": {
2727
+ const state = self.state;
2728
+ state.refCount++;
2729
+ return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
2730
+ }
2731
+ case "Acquiring": {
2732
+ const state = self.state;
2733
+ state.awaiters++;
2734
+ return awaitAcquiring(self, state, restore);
2735
+ }
2736
+ case "Empty": {
2737
+ const acquiring = {
2738
+ _tag: "Acquiring",
2739
+ fiber: undefined,
2740
+ awaiters: 1,
2741
+ acquired: undefined
2742
+ };
2743
+ self.state = acquiring;
2744
+ const scope = makeUnsafe6();
2745
+ const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
2746
+ if (self.state !== acquiring) {
2747
+ return interrupt3;
2748
+ }
2749
+ const state = {
2750
+ _tag: "Acquired",
2751
+ value,
2752
+ scope,
2753
+ fiber: undefined,
2754
+ refCount: acquiring.awaiters,
2755
+ invalidated: false
2756
+ };
2757
+ self.state = state;
2758
+ acquiring.acquired = state;
2759
+ return succeed6(state);
2760
+ }), onExit((exit) => {
2761
+ if (isSuccess2(exit))
2762
+ return void_3;
2763
+ if (self.state === acquiring)
2764
+ self.state = stateEmpty;
2765
+ return close(scope, exit);
2766
+ }));
2767
+ acquiring.fiber = runForkWith(getCurrent().context)(acquire);
2768
+ return awaitAcquiring(self, acquiring, restore);
2769
+ }
2770
+ }
2771
+ };
2772
+ var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
2773
+ const acquired = acquiring.acquired;
2774
+ if (acquired !== undefined) {
2775
+ return isFailure2(exit) ? release(self, acquired) : void_3;
2776
+ }
2777
+ if (--acquiring.awaiters > 0 || self.state !== acquiring)
2778
+ return void_3;
2779
+ self.state = stateEmpty;
2780
+ return interrupt(acquiring.fiber);
2781
+ });
2782
+ var get2 = (self_) => {
2783
+ const self = self_;
2784
+ return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
2785
+ };
2786
+ var release = (self, state) => {
2787
+ state.refCount--;
2788
+ if (state.refCount > 0) {
2789
+ return void_3;
2790
+ }
2791
+ const idleTimeToLive = self.idleTimeToLive;
2792
+ if (idleTimeToLive === undefined || state.invalidated) {
2793
+ if (self.state === state) {
2794
+ self.state = stateEmpty;
2795
+ }
2796
+ return close(state.scope, void_2);
2797
+ } else if (!isFinite(idleTimeToLive)) {
2798
+ return void_3;
2799
+ }
2800
+ state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
2801
+ if (self.state === state && state.refCount === 0) {
2802
+ self.state = stateEmpty;
2803
+ return ignoreCause(close(state.scope, void_2), {
2804
+ log: "Unhandled",
2805
+ message: "Unhandled error in RcRef finalizer"
2806
+ });
2807
+ }
2808
+ return void_3;
2809
+ })).pipe(ensuring2(sync2(() => {
2810
+ state.fiber = undefined;
2811
+ })), runForkWith(self.context), runIn(self.scope));
2812
+ return void_3;
2813
+ };
2814
+
2815
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
2816
+ var make9 = make5;
2817
+ var get3 = get2;
2818
+
2810
2819
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
2811
- var TypeId8 = "~effect/Stream";
2812
- var isStream = (u) => hasProperty(u, TypeId8);
2820
+ var TypeId9 = "~effect/Stream";
2821
+ var isStream = (u) => hasProperty(u, TypeId9);
2813
2822
  var fromChannel2 = fromChannel3;
2814
2823
  var fromPull2 = (pull) => fromChannel2(fromPull(pull));
2815
2824
  var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
@@ -3014,12 +3023,12 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
3014
3023
  var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map9(context(), (context) => toReadableStreamWith(self, context, options)));
3015
3024
 
3016
3025
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
3017
- var TypeId9 = "~effect/FileSystem";
3026
+ var TypeId10 = "~effect/FileSystem";
3018
3027
  var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
3019
3028
  var make11 = (impl) => FileSystem.of({
3020
3029
  ...impl,
3021
- [TypeId9]: TypeId9,
3022
- glob: make2(impl),
3030
+ [TypeId10]: TypeId10,
3031
+ glob: make(impl),
3023
3032
  exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail7(e))),
3024
3033
  readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_2({
3025
3034
  try: () => new TextDecoder(encoding).decode(_),
@@ -3034,11 +3043,11 @@ var make11 = (impl) => FileSystem.of({
3034
3043
  const file = yield* impl.open(path, {
3035
3044
  flag: "r"
3036
3045
  });
3037
- const offset = options?.offset === undefined ? undefined : fromInputUnsafe(options.offset);
3046
+ const offset = options?.offset === undefined ? undefined : fromInputUnsafe2(options.offset);
3038
3047
  if (offset) {
3039
3048
  yield* file.seek(offset, "start");
3040
3049
  }
3041
- const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe(options.bytesToRead);
3050
+ const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe2(options.bytesToRead);
3042
3051
  let totalBytesRead = BigInt(0);
3043
3052
  const chunkSize = Number(BigInt(options?.chunkSize ?? 64 * 1024));
3044
3053
  const readChunk = file.readAlloc(chunkSize);
@@ -3074,11 +3083,11 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
3074
3083
  }
3075
3084
 
3076
3085
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
3077
- var TypeId10 = "~effect/Path";
3086
+ var TypeId11 = "~effect/Path";
3078
3087
  var Path = /* @__PURE__ */ Service2("effect/Path");
3079
3088
  var make12 = (impl) => Path.of({
3080
3089
  ...impl,
3081
- [TypeId10]: TypeId10,
3090
+ [TypeId11]: TypeId11,
3082
3091
  resolveWithin(root, input) {
3083
3092
  if (impl.parse(input).root !== "")
3084
3093
  return none();
@@ -3213,7 +3222,7 @@ function trieNodeAt(root, path) {
3213
3222
  }
3214
3223
 
3215
3224
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Config.js
3216
- var TypeId11 = "~effect/Config";
3225
+ var TypeId12 = "~effect/Config";
3217
3226
  class ConfigError {
3218
3227
  _tag = "ConfigError";
3219
3228
  name = "ConfigError";
@@ -3235,14 +3244,14 @@ var Proto2 = {
3235
3244
  return this.parse(fiber.getRef(ConfigProvider));
3236
3245
  }
3237
3246
  }),
3238
- [TypeId11]: TypeId11,
3247
+ [TypeId12]: TypeId12,
3239
3248
  toJSON() {
3240
3249
  return {
3241
3250
  _id: "Config"
3242
3251
  };
3243
3252
  }
3244
3253
  };
3245
- function make7(evaluator) {
3254
+ function make13(evaluator) {
3246
3255
  const self = Object.create(Proto2);
3247
3256
  self.evaluator = evaluator;
3248
3257
  self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
@@ -3250,14 +3259,14 @@ function make7(evaluator) {
3250
3259
  }
3251
3260
  var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
3252
3261
  var map3 = /* @__PURE__ */ dual(2, (self, f) => {
3253
- return make7((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
3262
+ return make13((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
3254
3263
  });
3255
3264
  function all(arg) {
3256
3265
  const configs = globalThis.Array.isArray(arg) ? arg : (Symbol.iterator in arg) ? [...arg] : arg;
3257
- return make7((provider, pathPrefix) => globalThis.Array.isArray(configs) ? mapEager(all3(configs.map((config) => evaluateAt(config, provider, pathPrefix))), all2) : mapEager(all3(map(configs, (config) => evaluateAt(config, provider, pathPrefix))), all2));
3266
+ return make13((provider, pathPrefix) => globalThis.Array.isArray(configs) ? mapEager(all3(configs.map((config) => evaluateAt(config, provider, pathPrefix))), all2) : mapEager(all3(map(configs, (config) => evaluateAt(config, provider, pathPrefix))), all2));
3258
3267
  }
3259
3268
  var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
3260
- return make7((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
3269
+ return make13((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
3261
3270
  });
3262
3271
  var option = (self) => self.pipe(map3(some), withDefault(none()));
3263
3272
  var isSourceError = (u) => isTagged(u, "SourceError");
@@ -3374,9 +3383,9 @@ var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
3374
3383
  function schema(codec, path) {
3375
3384
  const codecStringTree = toCodecStringTree(codec);
3376
3385
  const encodedAst = toEncoded(codecStringTree.ast);
3377
- const decodeCursor = decodeUnknownEffect(make16(toConfigCursorAST(codecStringTree.ast)));
3386
+ const decodeCursor = decodeUnknownEffect(make17(toConfigCursorAST(codecStringTree.ast)));
3378
3387
  const localPath = typeof path === "string" ? [path] : path ?? [];
3379
- return make7((provider, pathPrefix) => {
3388
+ return make13((provider, pathPrefix) => {
3380
3389
  const fullPath = [...pathPrefix, ...localPath];
3381
3390
  return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed), catchEager((issue) => {
3382
3391
  const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
@@ -3492,4 +3501,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
3492
3501
  ...argv
3493
3502
  ];
3494
3503
 
3495
- export { map, makeEquivalence, Clock, currentTimeMillis, bytes, join, interrupt, getCurrent, runIn, BadArgument, systemError, badArgument, makeUnsafe2, make8, unbounded, publishUnsafe, make9, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe3, fromTransform, mapDone, isSink, fromChannel, drain, isStream, fromChannel2, callback, empty2, make10, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, take2, mapAccum, transduce, decodeText, encodeText, splitLines, interruptWhen, ensuring, provideContext, run, runCollect, runFold, runHead, runForEach, runDrain, mkString, mkArrayBuffer, toReadableStreamEffect, FileSystem, make11, FileTypeId, WatchBackend, Path, make12, embeddedFile, extractEmbeddedFile, map3, all, withDefault, option, String2, optionalEnv, operatorConfigHome, tempDirectoryScoped, harnessesUnsupportedInSrt2, harnessesUnsupportedInDocker2, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
3504
+ export { map, makeEquivalence, join, interrupt, getCurrent, BadArgument, systemError, badArgument, makeUnsafe2, make7, unbounded, publishUnsafe, make8, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe3, fromTransform, mapDone, isSink, fromChannel, drain, make9, get3, isStream, fromChannel2, callback, empty2, make10, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, take2, mapAccum, transduce, decodeText, encodeText, splitLines, interruptWhen, ensuring, provideContext, run, runCollect, runFold, runHead, runForEach, runDrain, mkString, mkArrayBuffer, toReadableStreamEffect, FileSystem, make11, FileTypeId, WatchBackend, Path, make12, embeddedFile, extractEmbeddedFile, map3, all, withDefault, option, String2, optionalEnv, operatorConfigHome, tempDirectoryScoped, harnessesUnsupportedInSrt2, harnessesUnsupportedInDocker2, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-rfnasm3c.js";
16
+ } from "./chunk-y64ssczv.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-x83q18w0.js";
20
+ } from "./chunk-r2kzvdrg.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
package/dist/index.js CHANGED
@@ -5,15 +5,15 @@
5
5
  var args = process.argv.slice(2);
6
6
  if (args[0] === "srt") {
7
7
  process.argv.splice(2, 1);
8
- const { runSrtCli } = await import("./chunk-1scjh42j.js");
8
+ const { runSrtCli } = await import("./chunk-qjxgew0k.js");
9
9
  await runSrtCli();
10
10
  } else if (args[0] === "srt-step") {
11
- const { runSrtStep } = await import("./chunk-djdhep8n.js");
11
+ const { runSrtStep } = await import("./chunk-9a6wbk11.js");
12
12
  await runSrtStep(args.slice(1));
13
13
  } else if (args[0] === "opencode-read") {
14
- const { runOpencodeReader } = await import("./chunk-hbm0hybe.js");
14
+ const { runOpencodeReader } = await import("./chunk-2sazk478.js");
15
15
  runOpencodeReader();
16
16
  } else {
17
- const { runCli } = await import("./chunk-n9fhwgzm.js");
17
+ const { runCli } = await import("./chunk-nf9rfrvv.js");
18
18
  runCli(args);
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitman-sh/cli",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "bin": {