@kitman-sh/cli 0.20.0 → 0.21.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-s9fwm42m.js → chunk-0j884359.js} +3 -3
  2. package/dist/{chunk-rekh8azw.js → chunk-0v70erwa.js} +10 -10
  3. package/dist/{chunk-qvpkwnky.js → chunk-4qjfn1sa.js} +1 -1
  4. package/dist/{chunk-y7bth30s.js → chunk-5kqt4bqp.js} +1 -1
  5. package/dist/{chunk-8xd2jvgj.js → chunk-746tbgvb.js} +18 -18
  6. package/dist/{chunk-89a53j2y.js → chunk-7re3n1ze.js} +8 -8
  7. package/dist/{chunk-7dcq58d0.js → chunk-7swf974v.js} +12 -12
  8. package/dist/{chunk-yecj64ke.js → chunk-7vngg2n8.js} +17 -17
  9. package/dist/{chunk-spazhq67.js → chunk-8t2wcrvv.js} +2 -2
  10. package/dist/{chunk-3vgv5ba7.js → chunk-atswrrsb.js} +6 -6
  11. package/dist/{chunk-v30yf453.js → chunk-bsgvmq34.js} +2 -2
  12. package/dist/{chunk-535m9qxp.js → chunk-d1826dj4.js} +130 -263
  13. package/dist/{chunk-ew07nt2d.js → chunk-h2f26xbd.js} +61 -61
  14. package/dist/{chunk-kntnw6r0.js → chunk-j4b1yvcd.js} +177 -37
  15. package/dist/{chunk-avg3cz82.js → chunk-js28a12p.js} +9 -9
  16. package/dist/{chunk-centvmrd.js → chunk-kw46ktwg.js} +4 -4
  17. package/dist/{chunk-2scq36fm.js → chunk-mqs553x5.js} +21 -8
  18. package/dist/{chunk-3hyggg9w.js → chunk-npfdbssf.js} +4 -4
  19. package/dist/{chunk-3wct0tsd.js → chunk-pr7wx6vh.js} +1 -1
  20. package/dist/{chunk-fvdnmgsy.js → chunk-remt6mfx.js} +4 -4
  21. package/dist/{chunk-6hxtg6eb.js → chunk-samxkpbz.js} +3 -3
  22. package/dist/{chunk-dtgp724s.js → chunk-t8e5ky8f.js} +1 -1
  23. package/dist/{chunk-haq904fk.js → chunk-tsx0347c.js} +1 -1
  24. package/dist/{chunk-6387vj9z.js → chunk-vz38kngm.js} +2 -2
  25. package/dist/{chunk-g00ewhrb.js → chunk-wmf3hq5w.js} +63 -63
  26. package/dist/{chunk-rrbnxea1.js → chunk-y756hc0e.js} +6 -6
  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,
@@ -192,11 +199,11 @@ import {
192
199
  toEncoded,
193
200
  decodeUnknownEffect,
194
201
  SchemaError,
195
- make16,
202
+ make17,
196
203
  String4,
197
204
  toCodecStringTree,
198
205
  encodeUnknownJsonStringSync
199
- } from "./chunk-ew07nt2d.js";
206
+ } from "./chunk-h2f26xbd.js";
200
207
 
201
208
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
202
209
  var headUnsafe = (self) => {
@@ -245,15 +252,6 @@ var makeEquivalence = (equivalence) => {
245
252
  return (self, that) => is(self, that) && is(that, self);
246
253
  };
247
254
 
248
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
249
- var BigInt2 = globalThis.BigInt;
250
- var toNumber = (b) => {
251
- if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
252
- return none();
253
- }
254
- return some(Number(b));
255
- };
256
-
257
255
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/ByteSize.js
258
256
  var bigint0 = /* @__PURE__ */ BigInt(0);
259
257
  var bigint1 = /* @__PURE__ */ BigInt(1);
@@ -374,7 +372,7 @@ var fromStringUnsafe = (input) => {
374
372
  return invalid(`${JSON.stringify(input)} does not represent an integral number of bytes`);
375
373
  return make(value);
376
374
  };
377
- var fromInputUnsafe = (input) => {
375
+ var fromInputUnsafe2 = (input) => {
378
376
  switch (typeof input) {
379
377
  case "bigint":
380
378
  if (input < bigint0)
@@ -387,7 +385,7 @@ var fromInputUnsafe = (input) => {
387
385
  }
388
386
  return invalid(`unsupported input ${input}`);
389
387
  };
390
- var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe(value) : fromNumber(value);
388
+ var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe2(value) : fromNumber(value);
391
389
 
392
390
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Fiber.js
393
391
  var join = fiberJoin;
@@ -1313,7 +1311,7 @@ var publishUnsafe = /* @__PURE__ */ dual(2, (self, value) => {
1313
1311
  return false;
1314
1312
  });
1315
1313
  var subscribe = (self) => uninterruptible(contextWith((services) => {
1316
- const localScope = get3(services, Scope);
1314
+ const localScope = get4(services, Scope);
1317
1315
  const scope = forkUnsafe(self.scope);
1318
1316
  const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
1319
1317
  return addFinalizer(scope, unsubscribe(subscription)).pipe(andThen2(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
@@ -2810,16 +2808,158 @@ var forEachArray = (f) => fromTransform2((upstream) => upstream.pipe(flatMap3(f)
2810
2808
  }), catchDone(() => endVoid)));
2811
2809
  var unwrap3 = (effect) => fromChannel(unwrap2(map9(effect, toChannel)));
2812
2810
 
2811
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
2812
+ var TypeId8 = "~effect/RcRef";
2813
+ var stateEmpty = {
2814
+ _tag: "Empty"
2815
+ };
2816
+ var stateClosed = {
2817
+ _tag: "Closed"
2818
+ };
2819
+ var variance2 = {
2820
+ _A: identity,
2821
+ _E: identity
2822
+ };
2823
+
2824
+ class RcRefImpl {
2825
+ [TypeId8] = variance2;
2826
+ pipe() {
2827
+ return pipeArguments(this, arguments);
2828
+ }
2829
+ state = stateEmpty;
2830
+ acquire;
2831
+ context;
2832
+ scope;
2833
+ idleTimeToLive;
2834
+ constructor(acquire, context, scope, idleTimeToLive) {
2835
+ this.acquire = acquire;
2836
+ this.context = context;
2837
+ this.scope = scope;
2838
+ this.idleTimeToLive = idleTimeToLive;
2839
+ }
2840
+ }
2841
+ var make6 = (options) => withFiber2((fiber) => {
2842
+ const context = fiber.context;
2843
+ const scope = get4(context, Scope);
2844
+ const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
2845
+ return as(addFinalizerExit(scope, () => {
2846
+ const state = ref.state;
2847
+ ref.state = stateClosed;
2848
+ if (state._tag === "Acquired")
2849
+ return close(state.scope, void_2);
2850
+ if (state._tag === "Acquiring")
2851
+ return interrupt(state.fiber);
2852
+ return void_3;
2853
+ }), ref);
2854
+ });
2855
+ var getState = (self, restore) => {
2856
+ switch (self.state._tag) {
2857
+ case "Closed": {
2858
+ return interrupt3;
2859
+ }
2860
+ case "Acquired": {
2861
+ const state = self.state;
2862
+ state.refCount++;
2863
+ return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
2864
+ }
2865
+ case "Acquiring": {
2866
+ const state = self.state;
2867
+ state.awaiters++;
2868
+ return awaitAcquiring(self, state, restore);
2869
+ }
2870
+ case "Empty": {
2871
+ const acquiring = {
2872
+ _tag: "Acquiring",
2873
+ fiber: undefined,
2874
+ awaiters: 1,
2875
+ acquired: undefined
2876
+ };
2877
+ self.state = acquiring;
2878
+ const scope = makeUnsafe6();
2879
+ const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
2880
+ if (self.state !== acquiring) {
2881
+ return interrupt3;
2882
+ }
2883
+ const state = {
2884
+ _tag: "Acquired",
2885
+ value,
2886
+ scope,
2887
+ fiber: undefined,
2888
+ refCount: acquiring.awaiters,
2889
+ invalidated: false
2890
+ };
2891
+ self.state = state;
2892
+ acquiring.acquired = state;
2893
+ return succeed6(state);
2894
+ }), onExit((exit) => {
2895
+ if (isSuccess2(exit))
2896
+ return void_3;
2897
+ if (self.state === acquiring)
2898
+ self.state = stateEmpty;
2899
+ return close(scope, exit);
2900
+ }));
2901
+ acquiring.fiber = runForkWith(getCurrent().context)(acquire);
2902
+ return awaitAcquiring(self, acquiring, restore);
2903
+ }
2904
+ }
2905
+ };
2906
+ var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
2907
+ const acquired = acquiring.acquired;
2908
+ if (acquired !== undefined) {
2909
+ return isFailure2(exit) ? release(self, acquired) : void_3;
2910
+ }
2911
+ if (--acquiring.awaiters > 0 || self.state !== acquiring)
2912
+ return void_3;
2913
+ self.state = stateEmpty;
2914
+ return interrupt(acquiring.fiber);
2915
+ });
2916
+ var get2 = (self_) => {
2917
+ const self = self_;
2918
+ return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
2919
+ };
2920
+ var release = (self, state) => {
2921
+ state.refCount--;
2922
+ if (state.refCount > 0) {
2923
+ return void_3;
2924
+ }
2925
+ const idleTimeToLive = self.idleTimeToLive;
2926
+ if (idleTimeToLive === undefined || state.invalidated) {
2927
+ if (self.state === state) {
2928
+ self.state = stateEmpty;
2929
+ }
2930
+ return close(state.scope, void_2);
2931
+ } else if (!isFinite(idleTimeToLive)) {
2932
+ return void_3;
2933
+ }
2934
+ state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
2935
+ if (self.state === state && state.refCount === 0) {
2936
+ self.state = stateEmpty;
2937
+ return ignoreCause(close(state.scope, void_2), {
2938
+ log: "Unhandled",
2939
+ message: "Unhandled error in RcRef finalizer"
2940
+ });
2941
+ }
2942
+ return void_3;
2943
+ })).pipe(ensuring2(sync2(() => {
2944
+ state.fiber = undefined;
2945
+ })), runForkWith(self.context), runIn(self.scope));
2946
+ return void_3;
2947
+ };
2948
+
2949
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
2950
+ var make10 = make6;
2951
+ var get3 = get2;
2952
+
2813
2953
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
2814
- var TypeId8 = "~effect/Stream";
2815
- var isStream = (u) => hasProperty(u, TypeId8);
2954
+ var TypeId9 = "~effect/Stream";
2955
+ var isStream = (u) => hasProperty(u, TypeId9);
2816
2956
  var fromChannel2 = fromChannel3;
2817
2957
  var fromPull2 = (pull) => fromChannel2(fromPull(pull));
2818
2958
  var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
2819
2959
  var toChannel2 = (stream) => stream.channel;
2820
2960
  var callback = (f, options) => fromChannel2(callbackArray(f, options));
2821
2961
  var empty2 = /* @__PURE__ */ fromChannel2(empty);
2822
- var make10 = (...values) => fromArray2(values);
2962
+ var make11 = (...values) => fromArray2(values);
2823
2963
  var suspend = (stream) => {
2824
2964
  const suspended = fromChannel2(suspend4(() => stream().channel));
2825
2965
  suspendedStreams.set(suspended, stream);
@@ -3017,11 +3157,11 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
3017
3157
  var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map9(context(), (context) => toReadableStreamWith(self, context, options)));
3018
3158
 
3019
3159
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
3020
- var TypeId9 = "~effect/FileSystem";
3160
+ var TypeId10 = "~effect/FileSystem";
3021
3161
  var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
3022
- var make11 = (impl) => FileSystem.of({
3162
+ var make12 = (impl) => FileSystem.of({
3023
3163
  ...impl,
3024
- [TypeId9]: TypeId9,
3164
+ [TypeId10]: TypeId10,
3025
3165
  glob: make2(impl),
3026
3166
  exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail7(e))),
3027
3167
  readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_2({
@@ -3037,11 +3177,11 @@ var make11 = (impl) => FileSystem.of({
3037
3177
  const file = yield* impl.open(path, {
3038
3178
  flag: "r"
3039
3179
  });
3040
- const offset = options?.offset === undefined ? undefined : fromInputUnsafe(options.offset);
3180
+ const offset = options?.offset === undefined ? undefined : fromInputUnsafe2(options.offset);
3041
3181
  if (offset) {
3042
3182
  yield* file.seek(offset, "start");
3043
3183
  }
3044
- const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe(options.bytesToRead);
3184
+ const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe2(options.bytesToRead);
3045
3185
  let totalBytesRead = BigInt(0);
3046
3186
  const chunkSize = Number(BigInt(options?.chunkSize ?? 64 * 1024));
3047
3187
  const readChunk = file.readAlloc(chunkSize);
@@ -3077,11 +3217,11 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
3077
3217
  }
3078
3218
 
3079
3219
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
3080
- var TypeId10 = "~effect/Path";
3220
+ var TypeId11 = "~effect/Path";
3081
3221
  var Path = /* @__PURE__ */ Service2("effect/Path");
3082
- var make12 = (impl) => Path.of({
3222
+ var make13 = (impl) => Path.of({
3083
3223
  ...impl,
3084
- [TypeId10]: TypeId10,
3224
+ [TypeId11]: TypeId11,
3085
3225
  resolveWithin(root, input) {
3086
3226
  if (impl.parse(input).root !== "")
3087
3227
  return none();
@@ -3154,7 +3294,7 @@ function makeProvider(load, mapInput) {
3154
3294
  function makeSource(get, transform) {
3155
3295
  return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
3156
3296
  }
3157
- function make6(get) {
3297
+ function make7(get) {
3158
3298
  return makeSource(get, identityPath);
3159
3299
  }
3160
3300
  function emptyStringAsMissing(value, preserveEmptyStrings) {
@@ -3163,7 +3303,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
3163
3303
  function fromEnvRecord(env, options) {
3164
3304
  const preserveEmptyStrings = options?.preserveEmptyStrings === true;
3165
3305
  const trie = buildEnvTrie(env);
3166
- return make6((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
3306
+ return make7((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
3167
3307
  }
3168
3308
  function fromEnv(options) {
3169
3309
  const env = options?.env ?? {
@@ -3216,7 +3356,7 @@ function trieNodeAt(root, path) {
3216
3356
  }
3217
3357
 
3218
3358
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Config.js
3219
- var TypeId11 = "~effect/Config";
3359
+ var TypeId12 = "~effect/Config";
3220
3360
  class ConfigError {
3221
3361
  _tag = "ConfigError";
3222
3362
  name = "ConfigError";
@@ -3238,14 +3378,14 @@ var Proto2 = {
3238
3378
  return this.parse(fiber.getRef(ConfigProvider));
3239
3379
  }
3240
3380
  }),
3241
- [TypeId11]: TypeId11,
3381
+ [TypeId12]: TypeId12,
3242
3382
  toJSON() {
3243
3383
  return {
3244
3384
  _id: "Config"
3245
3385
  };
3246
3386
  }
3247
3387
  };
3248
- function make7(evaluator) {
3388
+ function make14(evaluator) {
3249
3389
  const self = Object.create(Proto2);
3250
3390
  self.evaluator = evaluator;
3251
3391
  self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
@@ -3253,14 +3393,14 @@ function make7(evaluator) {
3253
3393
  }
3254
3394
  var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
3255
3395
  var map3 = /* @__PURE__ */ dual(2, (self, f) => {
3256
- return make7((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
3396
+ return make14((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
3257
3397
  });
3258
3398
  function all(arg) {
3259
3399
  const configs = globalThis.Array.isArray(arg) ? arg : (Symbol.iterator in arg) ? [...arg] : arg;
3260
- 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));
3400
+ return make14((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));
3261
3401
  }
3262
3402
  var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
3263
- return make7((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
3403
+ return make14((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
3264
3404
  });
3265
3405
  var option = (self) => self.pipe(map3(some), withDefault(none()));
3266
3406
  var isSourceError = (u) => isTagged(u, "SourceError");
@@ -3377,9 +3517,9 @@ var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
3377
3517
  function schema(codec, path) {
3378
3518
  const codecStringTree = toCodecStringTree(codec);
3379
3519
  const encodedAst = toEncoded(codecStringTree.ast);
3380
- const decodeCursor = decodeUnknownEffect(make16(toConfigCursorAST(codecStringTree.ast)));
3520
+ const decodeCursor = decodeUnknownEffect(make17(toConfigCursorAST(codecStringTree.ast)));
3381
3521
  const localPath = typeof path === "string" ? [path] : path ?? [];
3382
- return make7((provider, pathPrefix) => {
3522
+ return make14((provider, pathPrefix) => {
3383
3523
  const fullPath = [...pathPrefix, ...localPath];
3384
3524
  return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed), catchEager((issue) => {
3385
3525
  const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
@@ -3495,4 +3635,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
3495
3635
  ...argv
3496
3636
  ];
3497
3637
 
3498
- export { map, makeEquivalence, toNumber, 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 };
3638
+ export { map, makeEquivalence, bytes, join, interrupt, getCurrent, 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, make10, get3, isStream, fromChannel2, callback, empty2, make11, 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, make12, FileTypeId, WatchBackend, Path, make13, 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 };
@@ -1,10 +1,4 @@
1
1
  // @bun
2
- import {
3
- FileSystem,
4
- Path,
5
- optionalEnv,
6
- tempDirectoryScoped
7
- } from "./chunk-kntnw6r0.js";
8
2
  import {
9
3
  Reference,
10
4
  TaggedError,
@@ -31,15 +25,21 @@ import {
31
25
  isString2,
32
26
  encodePrettyJsonString,
33
27
  decodeJsonStringSync
34
- } from "./chunk-ew07nt2d.js";
28
+ } from "./chunk-h2f26xbd.js";
29
+ import {
30
+ FileSystem,
31
+ Path,
32
+ optionalEnv,
33
+ tempDirectoryScoped
34
+ } from "./chunk-j4b1yvcd.js";
35
35
  import {
36
36
  AgentHarnessIds,
37
37
  sha2562,
38
38
  runCommand2
39
- } from "./chunk-535m9qxp.js";
39
+ } from "./chunk-d1826dj4.js";
40
40
  import {
41
41
  NpmRegistry
42
- } from "./chunk-s9fwm42m.js";
42
+ } from "./chunk-0j884359.js";
43
43
 
44
44
  // packages/agent-runtime/src/config-convergence.ts
45
45
  var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-v30yf453.js";
2
+ import"./chunk-bsgvmq34.js";
3
3
  import {
4
4
  HERDR_CORE_GENERATION2,
5
5
  HERDR_CORE_INSTALL_COMMAND2,
@@ -12,9 +12,9 @@ import {
12
12
  herdrCoreLayer2,
13
13
  herdrCoreTransportLayer2,
14
14
  updateHerdrCore2
15
- } from "./chunk-535m9qxp.js";
16
- import"./chunk-kntnw6r0.js";
17
- import"./chunk-ew07nt2d.js";
15
+ } from "./chunk-d1826dj4.js";
16
+ import"./chunk-j4b1yvcd.js";
17
+ import"./chunk-h2f26xbd.js";
18
18
  export {
19
19
  HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
20
20
  HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,
@@ -118,7 +118,7 @@ import {
118
118
  decodeJsonStringOption,
119
119
  encodeJsonStringSync,
120
120
  encodePrettyJsonString
121
- } from "./chunk-ew07nt2d.js";
121
+ } from "./chunk-h2f26xbd.js";
122
122
  import {
123
123
  currentTimeMillis,
124
124
  SecureRandom,
@@ -170,7 +170,7 @@ import {
170
170
  runMcpEffect,
171
171
  createAgentAuthSignedFetch,
172
172
  setupMcpAgentCredential
173
- } from "./chunk-535m9qxp.js";
173
+ } from "./chunk-d1826dj4.js";
174
174
  import {
175
175
  join,
176
176
  interrupt,
@@ -187,30 +187,30 @@ import {
187
187
  withDefault,
188
188
  option,
189
189
  String2
190
- } from "./chunk-kntnw6r0.js";
190
+ } from "./chunk-j4b1yvcd.js";
191
191
  import {
192
192
  searchDocs2,
193
193
  readDoc2
194
- } from "./chunk-3wct0tsd.js";
194
+ } from "./chunk-pr7wx6vh.js";
195
195
  import {
196
196
  nextInt
197
- } from "./chunk-y7bth30s.js";
197
+ } from "./chunk-5kqt4bqp.js";
198
198
  import {
199
199
  recommendationProblem
200
- } from "./chunk-haq904fk.js";
200
+ } from "./chunk-tsx0347c.js";
201
201
  import {
202
202
  layerJson,
203
203
  make4,
204
204
  withHeaders,
205
205
  layerProtocolSocket,
206
206
  ConnectionHooks
207
- } from "./chunk-3vgv5ba7.js";
207
+ } from "./chunk-atswrrsb.js";
208
208
  import {
209
209
  guard,
210
210
  Id,
211
211
  Timestamp,
212
212
  ActorType
213
- } from "./chunk-qvpkwnky.js";
213
+ } from "./chunk-4qjfn1sa.js";
214
214
 
215
215
  // apps/cli/src/mcp.ts
216
216
  import { tmpdir as tmpdir2 } from "os";
@@ -2324,6 +2324,7 @@ var generatedOpenApiSchemas = {
2324
2324
  "44196db5b615faa3": JSON.parse('{"type":"object","additionalProperties":false,"required":["runId"],"properties":{"runId":{"type":"string"},"options":{"type":"object","additionalProperties":false,"properties":{"until":{"type":"string","enum":["attention","finished"]},"timeoutSeconds":{"anyOf":[{"type":"number"},{"type":"string"}],"minimum":0,"maximum":8}}}}}'),
2325
2325
  "44204524a95aad66": JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":214,"pattern":"^(@[a-z0-9-~][a-z0-9-._~]*\\\\/)?[a-z0-9-~][a-z0-9-._~]*$"},"owner":{"type":"string","enum":["workspace","team","personal"]},"teamId":{"type":"string","minLength":1},"version":{"type":"string","minLength":1,"maxLength":200},"pinnedVersion":{"type":"string","minLength":1,"maxLength":200},"lastCheckedAt":{"type":"string","format":"date-time"},"problem":{"type":"string"},"actsFor":{"type":"string"}},"required":["name","owner"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
2326
2326
  "447e9fb41c948abf": JSON.parse('{"type":"object","properties":{"kits":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":214,"pattern":"^(@[a-z0-9-~][a-z0-9-._~]*\\\\/)?[a-z0-9-~][a-z0-9-._~]*$"},"version":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","enum":["deployed","installed"]}},"required":["name","version","source"],"additionalProperties":false}}},"required":["kits"],"additionalProperties":false}'),
2327
+ "44d3f661e439ad19": JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId","options"],"properties":{"workspaceId":{"type":"string"},"options":{"type":"object","additionalProperties":false,"required":["loops"],"properties":{"loops":{"type":"string","maxLength":20000},"teamId":{"type":"string"}}}}}'),
2327
2328
  "45564933894e30ae": JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"taskId":{"type":"string","minLength":1},"sessionId":{"type":"string","minLength":1},"sourceSession":{"type":"object","properties":{"id":{"type":"string","minLength":1},"actorType":{"type":"string","enum":["human","delegated_agent","agent"]},"agentIdentityId":{"type":"string","minLength":1},"agentName":{"type":"string"},"runtimeProfile":{"type":"string"},"modelProvider":{"type":"string"},"modelName":{"type":"string"},"modelId":{"type":"string"},"startedAt":{"type":"string","format":"date-time"}},"required":["id","actorType","startedAt"],"additionalProperties":true},"replyToEntryId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["note","question","answer","decision","blocker","finding","handoff","test_result","file_reference","status_change","assignment_change","link","change_request_review"]},"content":{"type":"string","minLength":1},"metadata":{"type":"object"},"actorType":{"type":"string","enum":["human","delegated_agent","agent"]},"actorId":{"type":"string","minLength":1},"delegatedByUserId":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time"},"reactions":{"type":"array","items":{"type":"object","properties":{"reaction":{"type":"string","enum":["thumbs_up","thumbs_down","heart","laugh","hooray","confused","eyes","rocket"]},"actors":{"type":"array","items":{"type":"object","properties":{"actorType":{"type":"string","enum":["human","delegated_agent","agent"]},"actorId":{"type":"string","minLength":1}},"required":["actorType","actorId"],"additionalProperties":true}}},"required":["reaction","actors"],"additionalProperties":true}}},"required":["id","workspaceId","taskId","kind","content","metadata","actorType","actorId","createdAt"],"additionalProperties":true}'),
2328
2329
  "45a04f181b727de3": JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId","query"],"properties":{"workspaceId":{"type":"string"},"query":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":214,"pattern":"^(@[a-z0-9-~][a-z0-9-._~]*\\\\/)?[a-z0-9-~][a-z0-9-._~]*$"},"version":{"type":"string","minLength":1,"maxLength":200}}}}}'),
2329
2330
  "45c226b28a80c0b3": JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId","input"],"properties":{"workspaceId":{"type":"string"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1},"key":{"type":"string"},"description":{"type":"string"}},"required":["name"],"additionalProperties":true}}}'),
@@ -2544,6 +2545,7 @@ var generatedOpenApiSchemas = {
2544
2545
  c944fe423f0b8d52: JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId","input"],"properties":{"workspaceId":{"type":"string"},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["kit"]},"id":{"type":"string","minLength":1,"maxLength":200},"teamId":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}}'),
2545
2546
  c9612b3f7fde9ac3: JSON.parse('{"type":"object","additionalProperties":false,"required":["input"],"properties":{"input":{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":2048},"code":{"type":"string","minLength":1,"maxLength":512}},"required":["state","code"],"additionalProperties":false}}}'),
2546
2547
  c9c08ed93c7ab1d9: JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"teamId":{"type":"string","minLength":1},"taskId":{"type":"string","minLength":1},"step":{"type":"string"},"kind":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"data":{},"createdAt":{"type":"string","format":"date-time"}},"required":["id","runId","step","kind","title","text","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
2548
+ c9c40ed133832513: JSON.parse('{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"loopId":{"type":"string"},"runId":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time"}},"required":["loopId","runId","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}'),
2547
2549
  c9ccf7b5ddbe6e6f: JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId","projectId","userId"],"properties":{"workspaceId":{"type":"string"},"projectId":{"type":"string"},"userId":{"type":"string"}}}'),
2548
2550
  c9cedaaab04ee107: JSON.parse('{"type":"object","additionalProperties":false,"required":["workspaceId","taskId","input"],"properties":{"workspaceId":{"type":"string"},"taskId":{"type":"string","description":"The Task: its id or any key it has had, such as `KIT-12`."},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"labelIds":{"type":"array","items":{"type":"string"}}},"required":["labelIds"],"additionalProperties":true}}}'),
2549
2551
  ca3740c8616abdf4: JSON.parse('{"type":"object","additionalProperties":false,"required":["assetId"],"properties":{"assetId":{"type":"string"}}}'),
@@ -2790,6 +2792,7 @@ var generatedOpenApiOperationContracts = {
2790
2792
  listKitInstalls: { inputSchemaId: "895ed3078f5b3bb9", outputSchemaId: "44204524a95aad66" },
2791
2793
  listKits: { inputSchemaId: "6e3d1c6bfb5b7371", outputSchemaId: "b111d39afd4c9019" },
2792
2794
  listLabels: { inputSchemaId: "fcc72cba1350bf89", outputSchemaId: "3a43b10facade293" },
2795
+ listLatestLoopRuns: { inputSchemaId: "44d3f661e439ad19", outputSchemaId: "c9c40ed133832513" },
2793
2796
  listLatestTaskRuns: { inputSchemaId: "1ca455dfc12235e0", outputSchemaId: "cd73d7f5dde87ccf" },
2794
2797
  listMarketplace: { inputSchemaId: "c806a2ead9f09282", outputSchemaId: "f2180e737ebdfec9" },
2795
2798
  listMemories: { inputSchemaId: "52312cb544bea2a1", outputSchemaId: "c22ed8f45d9b6fec" },
@@ -4816,6 +4819,13 @@ var operationSpecs = [
4816
4819
  tags: ["runs"],
4817
4820
  summary: "The newest Run of each of these Tasks that has one, with its status, and `agent` while the Task has an unsettled Run: the most recently started one, with its Loop and display state."
4818
4821
  },
4822
+ {
4823
+ name: "listLatestLoopRuns",
4824
+ parameters: ["workspaceId", "options"],
4825
+ namespacePath: ["runs", "latestForLoops"],
4826
+ tags: ["runs"],
4827
+ summary: "The newest top-level Run of each Loop in `loops` that has one, in `teamId` when it names one: its id, `createdAt` and `startedAt`."
4828
+ },
4819
4829
  {
4820
4830
  name: "createTeamTaskForLoop",
4821
4831
  parameters: ["workspaceId", "input"],
@@ -8273,6 +8283,9 @@ class KitmanClient {
8273
8283
  listLatestTaskRuns(workspaceId, taskIds) {
8274
8284
  return this.run(this.effectClient.listLatestTaskRuns(workspaceId, taskIds));
8275
8285
  }
8286
+ listLatestLoopRuns(workspaceId, options) {
8287
+ return this.run(this.effectClient.listLatestLoopRuns(workspaceId, options));
8288
+ }
8276
8289
  readTranscript(runId, stepAttemptId, options = {}) {
8277
8290
  return this.run(this.effectClient.readTranscript(runId, stepAttemptId, options));
8278
8291
  }
@@ -7,10 +7,10 @@ import {
7
7
  decoded2,
8
8
  readOpencode2,
9
9
  runOpencodeReader2
10
- } from "./chunk-89a53j2y.js";
11
- import"./chunk-v30yf453.js";
12
- import"./chunk-kntnw6r0.js";
13
- import"./chunk-ew07nt2d.js";
10
+ } from "./chunk-7re3n1ze.js";
11
+ import"./chunk-bsgvmq34.js";
12
+ import"./chunk-j4b1yvcd.js";
13
+ import"./chunk-h2f26xbd.js";
14
14
  export {
15
15
  decoded2 as decoded,
16
16
  decodedOption2 as decodedOption,
@@ -2195,7 +2195,7 @@ var pathOfLink = (link) => {
2195
2195
  return page === null ? link : page[1] || "index";
2196
2196
  };
2197
2197
  var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
2198
- var pinnedLink2 = (link, version = "0.20.0") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
2198
+ var pinnedLink2 = (link, version = "0.21.0") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
2199
2199
  var pageOf = (path) => path.split("#")[0];
2200
2200
  var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
2201
2201
  function excerpt(text, queryTerms) {
@@ -6,10 +6,10 @@ import {
6
6
  gen,
7
7
  flatMap3,
8
8
  provideContext2
9
- } from "./chunk-ew07nt2d.js";
9
+ } from "./chunk-h2f26xbd.js";
10
10
  import {
11
11
  runForEach
12
- } from "./chunk-kntnw6r0.js";
12
+ } from "./chunk-j4b1yvcd.js";
13
13
  import {
14
14
  WebSocketConstructor,
15
15
  layerWebSocketConstructorGlobal,
@@ -19,13 +19,13 @@ import {
19
19
  RunnerReplicaRpcs,
20
20
  RunnerRunFileRpcs,
21
21
  ProgramRpcs
22
- } from "./chunk-535m9qxp.js";
22
+ } from "./chunk-d1826dj4.js";
23
23
  import {
24
24
  layerJson,
25
25
  make4,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-3vgv5ba7.js";
28
+ } from "./chunk-atswrrsb.js";
29
29
 
30
30
  // packages/live/src/rpc/runner-client.ts
31
31
  var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
@@ -4,9 +4,9 @@ import {
4
4
  opaqueTunnelRefusal2,
5
5
  isOpaqueConnectReason2,
6
6
  runSrtStep2
7
- } from "./chunk-6387vj9z.js";
8
- import"./chunk-qvpkwnky.js";
9
- import"./chunk-ew07nt2d.js";
7
+ } from "./chunk-vz38kngm.js";
8
+ import"./chunk-4qjfn1sa.js";
9
+ import"./chunk-h2f26xbd.js";
10
10
  export {
11
11
  isOpaqueConnectReason2 as isOpaqueConnectReason,
12
12
  opaqueTunnelRefusal2 as opaqueTunnelRefusal,
@@ -4,7 +4,7 @@ import {
4
4
  searchDocs2,
5
5
  readDoc2,
6
6
  pinnedLink2
7
- } from "./chunk-3wct0tsd.js";
7
+ } from "./chunk-pr7wx6vh.js";
8
8
  export {
9
9
  DefaultDocsSearchLimit2 as DefaultDocsSearchLimit,
10
10
  pinnedLink2 as pinnedLink,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  isString2
4
- } from "./chunk-ew07nt2d.js";
4
+ } from "./chunk-h2f26xbd.js";
5
5
 
6
6
  // packages/core/src/question-recommendation.ts
7
7
  var optionValue = (option) => isString2(option) ? option : option.value;
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-ew07nt2d.js";
16
+ } from "./chunk-h2f26xbd.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-qvpkwnky.js";
20
+ } from "./chunk-4qjfn1sa.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";