@kitman-sh/cli 0.16.1 → 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-hwqecp0m.js → chunk-0f67q0tf.js} +8 -8
  2. package/dist/{chunk-ft3gnwd1.js → chunk-0wqkz371.js} +3 -3
  3. package/dist/{chunk-bcqqrwsk.js → chunk-2928qj8m.js} +42 -26
  4. package/dist/{chunk-eavx040m.js → chunk-2sazk478.js} +4 -4
  5. package/dist/{chunk-tc7td60t.js → chunk-5me7tnrw.js} +3 -3
  6. package/dist/{chunk-8f632x21.js → chunk-829r4kya.js} +4 -4
  7. package/dist/{chunk-tx7et9g7.js → chunk-8r1a93rc.js} +4 -4
  8. package/dist/{chunk-djdhep8n.js → chunk-9a6wbk11.js} +3 -3
  9. package/dist/{chunk-9qfyb5r2.js → chunk-ebpjd7kg.js} +6 -6
  10. package/dist/{chunk-5s4sgrak.js → chunk-ekyj0bps.js} +7 -7
  11. package/dist/{chunk-1r026thg.js → chunk-g3jqqpky.js} +9 -9
  12. package/dist/{chunk-dxfab1aj.js → chunk-j37p2y71.js} +183 -348
  13. package/dist/{chunk-yja59yh8.js → chunk-jg1pjhba.js} +21 -21
  14. package/dist/{chunk-xy3hcdhr.js → chunk-kx8rpa62.js} +5 -5
  15. package/dist/{chunk-gwzzacep.js → chunk-m1qp6swh.js} +1 -1
  16. package/dist/{chunk-e42hjb3j.js → chunk-nf9rfrvv.js} +33 -33
  17. package/dist/{chunk-3b198ntn.js → chunk-nqh0pbgt.js} +1 -1
  18. package/dist/{chunk-f2y0z04q.js → chunk-pd3azxev.js} +1 -1
  19. package/dist/{chunk-4yjcehqr.js → chunk-pnckztvv.js} +19 -19
  20. package/dist/{chunk-scwj3w7m.js → chunk-qjxgew0k.js} +2 -2
  21. package/dist/{chunk-x83q18w0.js → chunk-r2kzvdrg.js} +1 -1
  22. package/dist/{chunk-b0b9v7t9.js → chunk-r3d2yjsh.js} +24 -24
  23. package/dist/{chunk-g1f0cjqe.js → chunk-vh2a72d1.js} +14 -60
  24. package/dist/{chunk-rfnasm3c.js → chunk-y64ssczv.js} +289 -71
  25. package/dist/{chunk-bkteq6b3.js → chunk-z59pvcbk.js} +187 -172
  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,
@@ -83,6 +86,7 @@ import {
83
86
  fail4,
84
87
  interrupt2,
85
88
  void_2,
89
+ isSuccess2,
86
90
  isFailure2,
87
91
  asVoidAll,
88
92
  makeUnsafe5,
@@ -154,12 +158,14 @@ import {
154
158
  tapError2,
155
159
  ignoreCause,
156
160
  orElseSucceed,
161
+ sleep,
157
162
  raceFirst,
158
163
  when,
159
164
  matchCauseEffect,
160
165
  context,
161
166
  contextWith,
162
167
  provideContext2,
168
+ scope2,
163
169
  scoped,
164
170
  scopedWith,
165
171
  acquireRelease,
@@ -170,6 +176,7 @@ import {
170
176
  interrupt3,
171
177
  onInterrupt,
172
178
  uninterruptible,
179
+ uninterruptibleMask2,
173
180
  forever,
174
181
  forkChild,
175
182
  forkIn,
@@ -181,6 +188,7 @@ import {
181
188
  mapEager,
182
189
  flatMapEager,
183
190
  catchEager,
191
+ fromInputUnsafe2,
184
192
  Pointer,
185
193
  passthrough,
186
194
  transformEffect,
@@ -192,11 +200,11 @@ import {
192
200
  toEncoded,
193
201
  decodeUnknownEffect,
194
202
  SchemaError,
195
- make16,
203
+ make17,
196
204
  String4,
197
205
  toCodecStringTree,
198
206
  encodeUnknownJsonStringSync
199
- } from "./chunk-rfnasm3c.js";
207
+ } from "./chunk-y64ssczv.js";
200
208
 
201
209
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
202
210
  var headUnsafe = (self) => {
@@ -245,141 +253,6 @@ var makeEquivalence = (equivalence) => {
245
253
  return (self, that) => is(self, that) && is(that, self);
246
254
  };
247
255
 
248
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/ByteSize.js
249
- var bigint0 = /* @__PURE__ */ BigInt(0);
250
- var bigint1 = /* @__PURE__ */ BigInt(1);
251
- var decimalBase = /* @__PURE__ */ BigInt(1000);
252
- var binaryBase = /* @__PURE__ */ BigInt(1024);
253
- var decimalUnits = [{
254
- symbol: "B",
255
- factor: bigint1,
256
- names: ["B", "byte", "bytes"]
257
- }, {
258
- symbol: "kB",
259
- factor: decimalBase,
260
- names: ["kB", "kilobyte", "kilobytes"]
261
- }, {
262
- symbol: "MB",
263
- factor: decimalBase ** /* @__PURE__ */ BigInt(2),
264
- names: ["MB", "megabyte", "megabytes"]
265
- }, {
266
- symbol: "GB",
267
- factor: decimalBase ** /* @__PURE__ */ BigInt(3),
268
- names: ["GB", "gigabyte", "gigabytes"]
269
- }, {
270
- symbol: "TB",
271
- factor: decimalBase ** /* @__PURE__ */ BigInt(4),
272
- names: ["TB", "terabyte", "terabytes"]
273
- }, {
274
- symbol: "PB",
275
- factor: decimalBase ** /* @__PURE__ */ BigInt(5),
276
- names: ["PB", "petabyte", "petabytes"]
277
- }, {
278
- symbol: "EB",
279
- factor: decimalBase ** /* @__PURE__ */ BigInt(6),
280
- names: ["EB", "exabyte", "exabytes"]
281
- }, {
282
- symbol: "ZB",
283
- factor: decimalBase ** /* @__PURE__ */ BigInt(7),
284
- names: ["ZB", "zettabyte", "zettabytes"]
285
- }, {
286
- symbol: "YB",
287
- factor: decimalBase ** /* @__PURE__ */ BigInt(8),
288
- names: ["YB", "yottabyte", "yottabytes"]
289
- }, {
290
- symbol: "RB",
291
- factor: decimalBase ** /* @__PURE__ */ BigInt(9),
292
- names: ["RB", "ronnabyte", "ronnabytes"]
293
- }, {
294
- symbol: "QB",
295
- factor: decimalBase ** /* @__PURE__ */ BigInt(10),
296
- names: ["QB", "quettabyte", "quettabytes"]
297
- }];
298
- var binaryUnits = [decimalUnits[0], {
299
- symbol: "KiB",
300
- factor: binaryBase,
301
- names: ["KiB", "kibibyte", "kibibytes"]
302
- }, {
303
- symbol: "MiB",
304
- factor: binaryBase ** /* @__PURE__ */ BigInt(2),
305
- names: ["MiB", "mebibyte", "mebibytes"]
306
- }, {
307
- symbol: "GiB",
308
- factor: binaryBase ** /* @__PURE__ */ BigInt(3),
309
- names: ["GiB", "gibibyte", "gibibytes"]
310
- }, {
311
- symbol: "TiB",
312
- factor: binaryBase ** /* @__PURE__ */ BigInt(4),
313
- names: ["TiB", "tebibyte", "tebibytes"]
314
- }, {
315
- symbol: "PiB",
316
- factor: binaryBase ** /* @__PURE__ */ BigInt(5),
317
- names: ["PiB", "pebibyte", "pebibytes"]
318
- }, {
319
- symbol: "EiB",
320
- factor: binaryBase ** /* @__PURE__ */ BigInt(6),
321
- names: ["EiB", "exbibyte", "exbibytes"]
322
- }, {
323
- symbol: "ZiB",
324
- factor: binaryBase ** /* @__PURE__ */ BigInt(7),
325
- names: ["ZiB", "zebibyte", "zebibytes"]
326
- }, {
327
- symbol: "YiB",
328
- factor: binaryBase ** /* @__PURE__ */ BigInt(8),
329
- names: ["YiB", "yobibyte", "yobibytes"]
330
- }];
331
- var allUnits = [...decimalUnits, .../* @__PURE__ */ binaryUnits.slice(1)];
332
- var unitsByName = /* @__PURE__ */ new Map(/* @__PURE__ */ allUnits.flatMap((unit) => unit.names.map((name) => [name, unit])));
333
- var make = (value) => value;
334
- var invalid = (message) => {
335
- throw new Error(`Invalid ByteSize: ${message}`);
336
- };
337
- var fromNumber = (input) => {
338
- if (!Number.isSafeInteger(input) || input < 0) {
339
- return invalid(`expected a non-negative safe integer, received ${input}`);
340
- }
341
- return make(BigInt(input));
342
- };
343
- var maxSafeInteger = /* @__PURE__ */ BigInt(Number.MAX_SAFE_INTEGER);
344
- var scaleDecimal = (quantity, factor) => {
345
- const match = /^(\d+)(?:\.(\d+))?(?:e([+-]\d+))?$/.exec(quantity);
346
- if (match === null)
347
- return;
348
- const fraction = match[2] ?? "";
349
- const numerator = BigInt(match[1] + fraction) * factor;
350
- const shift = Number(match[3] ?? 0) - fraction.length;
351
- if (shift >= 0)
352
- return numerator * BigInt(10) ** BigInt(shift);
353
- const scale = BigInt(10) ** BigInt(-shift);
354
- return numerator % scale === bigint0 ? numerator / scale : undefined;
355
- };
356
- var fromStringUnsafe = (input) => {
357
- const match = /^\s*(\d+(?:\.\d+)?)\s*([A-Za-z]+)\s*$/.exec(input);
358
- if (match === null)
359
- return invalid(`unsupported syntax ${JSON.stringify(input)}`);
360
- const unit = unitsByName.get(match[2]);
361
- if (unit === undefined)
362
- return invalid(`unsupported unit ${JSON.stringify(match[2])}`);
363
- const value = scaleDecimal(match[1], unit.factor);
364
- if (value === undefined)
365
- return invalid(`${JSON.stringify(input)} does not represent an integral number of bytes`);
366
- return make(value);
367
- };
368
- var fromInputUnsafe = (input) => {
369
- switch (typeof input) {
370
- case "bigint":
371
- if (input < bigint0)
372
- return invalid(`expected a non-negative bigint, received ${input}`);
373
- return make(input);
374
- case "number":
375
- return fromNumber(input);
376
- case "string":
377
- return fromStringUnsafe(input);
378
- }
379
- return invalid(`unsupported input ${input}`);
380
- };
381
- var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe(value) : fromNumber(value);
382
-
383
256
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Fiber.js
384
257
  var join = fiberJoin;
385
258
  var interrupt = fiberInterrupt;
@@ -932,7 +805,7 @@ var isIgnorable = (error) => isMissing(error) || error.reason._tag === "Permissi
932
805
  var isNotLink = (error) => isIgnorable(error) || error.reason._tag === "Unknown";
933
806
  var DIRECTORY_CONCURRENCY = 16;
934
807
  var byName = /* @__PURE__ */ mapInput(String3, (entry) => entry.name);
935
- 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);
936
809
  var walk = /* @__PURE__ */ fnUntraced(function* (fs, compiled, options) {
937
810
  if (compiled.initial.size === 0) {
938
811
  return [];
@@ -1110,7 +983,7 @@ var badArgument = (options) => new PlatformError(new BadArgument(options));
1110
983
 
1111
984
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Latch.js
1112
985
  var makeUnsafe2 = makeLatchUnsafe;
1113
- var make3 = makeLatch;
986
+ var make2 = makeLatch;
1114
987
 
1115
988
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/MutableRef.js
1116
989
  var TypeId2 = "~effect/MutableRef";
@@ -1124,7 +997,7 @@ var MutableRefProto = {
1124
997
  };
1125
998
  }
1126
999
  };
1127
- var make8 = (value) => {
1000
+ var make7 = (value) => {
1128
1001
  const ref = Object.create(MutableRefProto);
1129
1002
  ref.current = value;
1130
1003
  return ref;
@@ -1136,7 +1009,7 @@ var set = /* @__PURE__ */ dual(2, (self, value) => {
1136
1009
 
1137
1010
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/MutableList.js
1138
1011
  var Empty = /* @__PURE__ */ Symbol.for("effect/MutableList/Empty");
1139
- var make4 = () => ({
1012
+ var make3 = () => ({
1140
1013
  head: undefined,
1141
1014
  tail: undefined,
1142
1015
  length: 0
@@ -1285,8 +1158,8 @@ var remove = (self, value) => filter2(self, (v) => v !== value);
1285
1158
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/PubSub.js
1286
1159
  var TypeId3 = "~effect/PubSub";
1287
1160
  var SubscriptionTypeId = "~effect/PubSub/Subscription";
1288
- var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make8(false), options.strategy(), make8(none())));
1289
- 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({
1290
1163
  atomicPubSub: () => makeAtomicUnbounded(options),
1291
1164
  strategy: () => new DroppingStrategy
1292
1165
  });
@@ -1304,7 +1177,7 @@ var publishUnsafe = /* @__PURE__ */ dual(2, (self, value) => {
1304
1177
  return false;
1305
1178
  });
1306
1179
  var subscribe = (self) => uninterruptible(contextWith((services) => {
1307
- const localScope = get3(services, Scope);
1180
+ const localScope = get4(services, Scope);
1308
1181
  const scope = forkUnsafe(self.scope);
1309
1182
  const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
1310
1183
  return addFinalizer(scope, unsubscribe(subscription)).pipe(andThen2(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
@@ -1380,7 +1253,7 @@ var removeSubscribers = (subscribers, subscription, pollers) => {
1380
1253
  subscribers.delete(subscription);
1381
1254
  }
1382
1255
  };
1383
- 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);
1384
1257
  class UnboundedPubSub {
1385
1258
  publisherHead = {
1386
1259
  value: AbsentValue,
@@ -1797,12 +1670,12 @@ var QueueProto = {
1797
1670
  };
1798
1671
  }
1799
1672
  };
1800
- var make9 = (options) => withFiber((fiber) => {
1673
+ var make8 = (options) => withFiber((fiber) => {
1801
1674
  const self = Object.create(QueueProto);
1802
1675
  self.dispatcher = fiber.currentDispatcher;
1803
1676
  self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
1804
1677
  self.strategy = options?.strategy ?? "suspend";
1805
- self.messages = make4();
1678
+ self.messages = make3();
1806
1679
  self.scheduleRunning = false;
1807
1680
  self.state = {
1808
1681
  _tag: "Open",
@@ -1812,14 +1685,14 @@ var make9 = (options) => withFiber((fiber) => {
1812
1685
  };
1813
1686
  return succeed2(self);
1814
1687
  });
1815
- var bounded = (capacity) => make9({
1688
+ var bounded = (capacity) => make8({
1816
1689
  capacity
1817
1690
  });
1818
- var sliding = (capacity) => make9({
1691
+ var sliding = (capacity) => make8({
1819
1692
  capacity,
1820
1693
  strategy: "sliding"
1821
1694
  });
1822
- var unbounded2 = () => make9();
1695
+ var unbounded2 = () => make8();
1823
1696
  var offer = /* @__PURE__ */ dual(2, (self, message) => suspend2(() => offerUnsafe(self, message) ? exitTrue : self.state._tag === "Open" && self.strategy === "suspend" ? offerOrWait(self, message) : exitFalse));
1824
1697
  var offerUnsafe = (self, message) => {
1825
1698
  if (self.state._tag !== "Open") {
@@ -2245,7 +2118,7 @@ var fromTransformBracket = (f) => fromTransform(fnUntraced(function* (upstream,
2245
2118
  return onError(pull, onCause);
2246
2119
  }));
2247
2120
  var toTransform = (channel) => channel.transform;
2248
- var asyncQueue = (scope, f, options) => make9({
2121
+ var asyncQueue = (scope, f, options) => make8({
2249
2122
  capacity: options?.bufferSize,
2250
2123
  strategy: options?.strategy
2251
2124
  }).pipe(tap2((queue) => addFinalizer(scope, shutdown(queue))), tap2((queue) => provide(f(queue), scope).pipe(catchCause2((cause) => failCause(queue, cause)), forkIn(scope, {
@@ -2286,7 +2159,7 @@ var fromReadableStream2 = (options) => fromTransform((_, scope) => readableStrea
2286
2159
  }));
2287
2160
  var readableStreamToPullUnsafe = (options) => {
2288
2161
  const reader = options.readable.getReader();
2289
- const exit = options.exit ?? make8(undefined);
2162
+ const exit = options.exit ?? make7(undefined);
2290
2163
  const pull = suspend3(() => {
2291
2164
  if (exit.current)
2292
2165
  return exit.current;
@@ -2494,7 +2367,7 @@ var mergeAll = /* @__PURE__ */ dual(2, (channels, {
2494
2367
  }) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
2495
2368
  const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : Math.max(1, concurrency);
2496
2369
  const semaphore = switch_ ? undefined : makeUnsafe3(concurrencyN);
2497
- const doneLatch = yield* make3(true);
2370
+ const doneLatch = yield* make2(true);
2498
2371
  const fibers = new Map;
2499
2372
  const queue = yield* bounded(bufferSize);
2500
2373
  yield* addFinalizer(forkedScope, shutdown(queue));
@@ -2801,9 +2674,151 @@ var forEachArray = (f) => fromTransform2((upstream) => upstream.pipe(flatMap3(f)
2801
2674
  }), catchDone(() => endVoid)));
2802
2675
  var unwrap3 = (effect) => fromChannel(unwrap2(map9(effect, toChannel)));
2803
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
+
2804
2819
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
2805
- var TypeId8 = "~effect/Stream";
2806
- var isStream = (u) => hasProperty(u, TypeId8);
2820
+ var TypeId9 = "~effect/Stream";
2821
+ var isStream = (u) => hasProperty(u, TypeId9);
2807
2822
  var fromChannel2 = fromChannel3;
2808
2823
  var fromPull2 = (pull) => fromChannel2(fromPull(pull));
2809
2824
  var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
@@ -3008,12 +3023,12 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
3008
3023
  var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map9(context(), (context) => toReadableStreamWith(self, context, options)));
3009
3024
 
3010
3025
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
3011
- var TypeId9 = "~effect/FileSystem";
3026
+ var TypeId10 = "~effect/FileSystem";
3012
3027
  var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
3013
3028
  var make11 = (impl) => FileSystem.of({
3014
3029
  ...impl,
3015
- [TypeId9]: TypeId9,
3016
- glob: make2(impl),
3030
+ [TypeId10]: TypeId10,
3031
+ glob: make(impl),
3017
3032
  exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail7(e))),
3018
3033
  readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_2({
3019
3034
  try: () => new TextDecoder(encoding).decode(_),
@@ -3028,11 +3043,11 @@ var make11 = (impl) => FileSystem.of({
3028
3043
  const file = yield* impl.open(path, {
3029
3044
  flag: "r"
3030
3045
  });
3031
- const offset = options?.offset === undefined ? undefined : fromInputUnsafe(options.offset);
3046
+ const offset = options?.offset === undefined ? undefined : fromInputUnsafe2(options.offset);
3032
3047
  if (offset) {
3033
3048
  yield* file.seek(offset, "start");
3034
3049
  }
3035
- const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe(options.bytesToRead);
3050
+ const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe2(options.bytesToRead);
3036
3051
  let totalBytesRead = BigInt(0);
3037
3052
  const chunkSize = Number(BigInt(options?.chunkSize ?? 64 * 1024));
3038
3053
  const readChunk = file.readAlloc(chunkSize);
@@ -3068,11 +3083,11 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
3068
3083
  }
3069
3084
 
3070
3085
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
3071
- var TypeId10 = "~effect/Path";
3086
+ var TypeId11 = "~effect/Path";
3072
3087
  var Path = /* @__PURE__ */ Service2("effect/Path");
3073
3088
  var make12 = (impl) => Path.of({
3074
3089
  ...impl,
3075
- [TypeId10]: TypeId10,
3090
+ [TypeId11]: TypeId11,
3076
3091
  resolveWithin(root, input) {
3077
3092
  if (impl.parse(input).root !== "")
3078
3093
  return none();
@@ -3207,7 +3222,7 @@ function trieNodeAt(root, path) {
3207
3222
  }
3208
3223
 
3209
3224
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Config.js
3210
- var TypeId11 = "~effect/Config";
3225
+ var TypeId12 = "~effect/Config";
3211
3226
  class ConfigError {
3212
3227
  _tag = "ConfigError";
3213
3228
  name = "ConfigError";
@@ -3229,14 +3244,14 @@ var Proto2 = {
3229
3244
  return this.parse(fiber.getRef(ConfigProvider));
3230
3245
  }
3231
3246
  }),
3232
- [TypeId11]: TypeId11,
3247
+ [TypeId12]: TypeId12,
3233
3248
  toJSON() {
3234
3249
  return {
3235
3250
  _id: "Config"
3236
3251
  };
3237
3252
  }
3238
3253
  };
3239
- function make7(evaluator) {
3254
+ function make13(evaluator) {
3240
3255
  const self = Object.create(Proto2);
3241
3256
  self.evaluator = evaluator;
3242
3257
  self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
@@ -3244,14 +3259,14 @@ function make7(evaluator) {
3244
3259
  }
3245
3260
  var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
3246
3261
  var map3 = /* @__PURE__ */ dual(2, (self, f) => {
3247
- return make7((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
3262
+ return make13((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
3248
3263
  });
3249
3264
  function all(arg) {
3250
3265
  const configs = globalThis.Array.isArray(arg) ? arg : (Symbol.iterator in arg) ? [...arg] : arg;
3251
- 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));
3252
3267
  }
3253
3268
  var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
3254
- 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));
3255
3270
  });
3256
3271
  var option = (self) => self.pipe(map3(some), withDefault(none()));
3257
3272
  var isSourceError = (u) => isTagged(u, "SourceError");
@@ -3368,9 +3383,9 @@ var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
3368
3383
  function schema(codec, path) {
3369
3384
  const codecStringTree = toCodecStringTree(codec);
3370
3385
  const encodedAst = toEncoded(codecStringTree.ast);
3371
- const decodeCursor = decodeUnknownEffect(make16(toConfigCursorAST(codecStringTree.ast)));
3386
+ const decodeCursor = decodeUnknownEffect(make17(toConfigCursorAST(codecStringTree.ast)));
3372
3387
  const localPath = typeof path === "string" ? [path] : path ?? [];
3373
- return make7((provider, pathPrefix) => {
3388
+ return make13((provider, pathPrefix) => {
3374
3389
  const fullPath = [...pathPrefix, ...localPath];
3375
3390
  return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed), catchEager((issue) => {
3376
3391
  const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
@@ -3486,4 +3501,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
3486
3501
  ...argv
3487
3502
  ];
3488
3503
 
3489
- export { map, makeEquivalence, 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-scwj3w7m.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-eavx040m.js");
14
+ const { runOpencodeReader } = await import("./chunk-2sazk478.js");
15
15
  runOpencodeReader();
16
16
  } else {
17
- const { runCli } = await import("./chunk-e42hjb3j.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.1",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "bin": {