@kitman-sh/cli 0.52.0 → 0.54.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-h5ydhdhx.js → chunk-0my9yc76.js} +72 -72
  2. package/dist/{chunk-kt26vpwf.js → chunk-0yqsrr9j.js} +9 -9
  3. package/dist/{chunk-eqh0h088.js → chunk-176b6p9g.js} +117 -42
  4. package/dist/{chunk-wb04fv2s.js → chunk-47ftjd7j.js} +50 -32
  5. package/dist/{chunk-qsbq9gvr.js → chunk-7eqzzcvj.js} +200 -347
  6. package/dist/{chunk-mmt6xq48.js → chunk-b0zap0sc.js} +2 -2
  7. package/dist/{chunk-2t1hcdeq.js → chunk-ctrk0mrt.js} +20 -20
  8. package/dist/{chunk-zb4t1yrt.js → chunk-e4ced6vj.js} +102 -60
  9. package/dist/{chunk-bhz25x76.js → chunk-fd9cfazr.js} +3 -3
  10. package/dist/{chunk-xbqd3kqc.js → chunk-h52fkf0n.js} +19 -19
  11. package/dist/{chunk-5yygjn0k.js → chunk-hnfq9egr.js} +1 -1
  12. package/dist/{chunk-tqspx38s.js → chunk-hs9frges.js} +2 -2
  13. package/dist/{chunk-bj0zchck.js → chunk-jz2b3htb.js} +193 -35
  14. package/dist/{chunk-q2z8rct0.js → chunk-keveyqbv.js} +4 -4
  15. package/dist/{chunk-a40yta1r.js → chunk-kpgkhx9j.js} +3 -3
  16. package/dist/{chunk-trtgab3h.js → chunk-p77428sa.js} +11 -19
  17. package/dist/{chunk-tfznw549.js → chunk-q22ar0q6.js} +2 -2
  18. package/dist/{chunk-axfp5tzk.js → chunk-sygnhza2.js} +10 -10
  19. package/dist/{chunk-my9db578.js → chunk-t94stfev.js} +9 -9
  20. package/dist/{chunk-84qb67e2.js → chunk-wsm4adrn.js} +1 -1
  21. package/dist/{chunk-chbdcf34.js → chunk-xfhrsdc6.js} +17 -13
  22. package/dist/{chunk-qjfzcrv5.js → chunk-xs1cdxfn.js} +4 -4
  23. package/dist/{chunk-wxg9k10v.js → chunk-xwte7af6.js} +1 -1
  24. package/dist/{chunk-pppryg54.js → chunk-yn5c3tzd.js} +12 -12
  25. package/dist/{chunk-2nq80r46.js → chunk-z1d5jx6m.js} +14 -60
  26. package/dist/{chunk-9hde8p6b.js → chunk-zs1maxqg.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,
@@ -86,6 +89,7 @@ import {
86
89
  fail4,
87
90
  interrupt2,
88
91
  void_2,
92
+ isSuccess2,
89
93
  isFailure2,
90
94
  asVoidAll,
91
95
  makeUnsafe5,
@@ -157,12 +161,14 @@ import {
157
161
  tapError2,
158
162
  ignoreCause,
159
163
  orElseSucceed,
164
+ sleep,
160
165
  raceFirst,
161
166
  when,
162
167
  matchCauseEffect,
163
168
  context,
164
169
  contextWith,
165
170
  provideContext2,
171
+ scope2,
166
172
  scoped,
167
173
  scopedWith,
168
174
  acquireRelease,
@@ -173,6 +179,7 @@ import {
173
179
  interrupt3,
174
180
  onInterrupt,
175
181
  uninterruptible,
182
+ uninterruptibleMask2,
176
183
  forever,
177
184
  forkChild,
178
185
  forkIn,
@@ -195,11 +202,11 @@ import {
195
202
  toEncoded,
196
203
  decodeUnknownEffect,
197
204
  SchemaError,
198
- make16,
205
+ make17,
199
206
  String4,
200
207
  toCodecStringTree,
201
208
  encodeUnknownJsonStringSync
202
- } from "./chunk-zb4t1yrt.js";
209
+ } from "./chunk-e4ced6vj.js";
203
210
 
204
211
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
205
212
  var headUnsafe = (self) => {
@@ -253,6 +260,15 @@ var makeEquivalence = (equivalence) => {
253
260
  var Clock = ClockRef;
254
261
  var currentTimeMillis = currentTimeMillis2;
255
262
 
263
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
264
+ var BigInt2 = globalThis.BigInt;
265
+ var toNumber = (b) => {
266
+ if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
267
+ return none();
268
+ }
269
+ return some(Number(b));
270
+ };
271
+
256
272
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/ByteSize.js
257
273
  var bigint0 = /* @__PURE__ */ BigInt(0);
258
274
  var bigint1 = /* @__PURE__ */ BigInt(1);
@@ -373,7 +389,7 @@ var fromStringUnsafe = (input) => {
373
389
  return invalid(`${JSON.stringify(input)} does not represent an integral number of bytes`);
374
390
  return make(value);
375
391
  };
376
- var fromInputUnsafe = (input) => {
392
+ var fromInputUnsafe2 = (input) => {
377
393
  switch (typeof input) {
378
394
  case "bigint":
379
395
  if (input < bigint0)
@@ -386,7 +402,7 @@ var fromInputUnsafe = (input) => {
386
402
  }
387
403
  return invalid(`unsupported input ${input}`);
388
404
  };
389
- var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe(value) : fromNumber(value);
405
+ var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe2(value) : fromNumber(value);
390
406
 
391
407
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Fiber.js
392
408
  var join = fiberJoin;
@@ -1133,7 +1149,7 @@ var MutableRefProto = {
1133
1149
  };
1134
1150
  }
1135
1151
  };
1136
- var make8 = (value) => {
1152
+ var make7 = (value) => {
1137
1153
  const ref = Object.create(MutableRefProto);
1138
1154
  ref.current = value;
1139
1155
  return ref;
@@ -1294,7 +1310,7 @@ var remove = (self, value) => filter2(self, (v) => v !== value);
1294
1310
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/PubSub.js
1295
1311
  var TypeId3 = "~effect/PubSub";
1296
1312
  var SubscriptionTypeId = "~effect/PubSub/Subscription";
1297
- var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make8(false), options.strategy(), make8(none())));
1313
+ var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make7(false), options.strategy(), make7(none())));
1298
1314
  var unbounded = (options) => make5({
1299
1315
  atomicPubSub: () => makeAtomicUnbounded(options),
1300
1316
  strategy: () => new DroppingStrategy
@@ -1313,7 +1329,7 @@ var publishUnsafe = /* @__PURE__ */ dual(2, (self, value) => {
1313
1329
  return false;
1314
1330
  });
1315
1331
  var subscribe = (self) => uninterruptible(contextWith((services) => {
1316
- const localScope = get3(services, Scope);
1332
+ const localScope = get4(services, Scope);
1317
1333
  const scope = forkUnsafe2(self.scope);
1318
1334
  const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
1319
1335
  return addFinalizer(scope, unsubscribe(subscription)).pipe(andThen2(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
@@ -1389,7 +1405,7 @@ var removeSubscribers = (subscribers, subscription, pollers) => {
1389
1405
  subscribers.delete(subscription);
1390
1406
  }
1391
1407
  };
1392
- var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false), make8(false), strategy, pubsub.replayWindow(), ended);
1408
+ var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false), make7(false), strategy, pubsub.replayWindow(), ended);
1393
1409
  class UnboundedPubSub {
1394
1410
  publisherHead = {
1395
1411
  value: AbsentValue,
@@ -1806,7 +1822,7 @@ var QueueProto = {
1806
1822
  };
1807
1823
  }
1808
1824
  };
1809
- var make9 = (options) => withFiber((fiber) => {
1825
+ var make8 = (options) => withFiber((fiber) => {
1810
1826
  const self = Object.create(QueueProto);
1811
1827
  self.dispatcher = fiber.currentDispatcher;
1812
1828
  self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
@@ -1821,14 +1837,14 @@ var make9 = (options) => withFiber((fiber) => {
1821
1837
  };
1822
1838
  return succeed2(self);
1823
1839
  });
1824
- var bounded = (capacity) => make9({
1840
+ var bounded = (capacity) => make8({
1825
1841
  capacity
1826
1842
  });
1827
- var sliding = (capacity) => make9({
1843
+ var sliding = (capacity) => make8({
1828
1844
  capacity,
1829
1845
  strategy: "sliding"
1830
1846
  });
1831
- var unbounded2 = () => make9();
1847
+ var unbounded2 = () => make8();
1832
1848
  var offer = /* @__PURE__ */ dual(2, (self, message) => suspend2(() => offerUnsafe(self, message) ? exitTrue : self.state._tag === "Open" && self.strategy === "suspend" ? offerOrWait(self, message) : exitFalse));
1833
1849
  var offerUnsafe = (self, message) => {
1834
1850
  if (self.state._tag !== "Open") {
@@ -2254,7 +2270,7 @@ var fromTransformBracket = (f) => fromTransform(fnUntraced(function* (upstream,
2254
2270
  return onError(pull, onCause);
2255
2271
  }));
2256
2272
  var toTransform = (channel) => channel.transform;
2257
- var asyncQueue = (scope, f, options) => make9({
2273
+ var asyncQueue = (scope, f, options) => make8({
2258
2274
  capacity: options?.bufferSize,
2259
2275
  strategy: options?.strategy
2260
2276
  }).pipe(tap2((queue) => addFinalizer(scope, shutdown(queue))), tap2((queue) => provide(f(queue), scope).pipe(catchCause2((cause) => failCause(queue, cause)), forkIn(scope, {
@@ -2295,7 +2311,7 @@ var fromReadableStream2 = (options) => fromTransform((_, scope) => readableStrea
2295
2311
  }));
2296
2312
  var readableStreamToPullUnsafe = (options) => {
2297
2313
  const reader = options.readable.getReader();
2298
- const exit = options.exit ?? make8(undefined);
2314
+ const exit = options.exit ?? make7(undefined);
2299
2315
  const pull = suspend3(() => {
2300
2316
  if (exit.current)
2301
2317
  return exit.current;
@@ -2756,7 +2772,7 @@ var runFold2 = /* @__PURE__ */ dual(3, (self, initial, f) => suspend3(() => {
2756
2772
  var toPull2 = /* @__PURE__ */ fnUntraced(function* (self) {
2757
2773
  const semaphore = makeUnsafe3(1);
2758
2774
  const context2 = yield* context();
2759
- const scope = get3(context2, Scope);
2775
+ const scope = get4(context2, Scope);
2760
2776
  const pull = yield* toTransform(self)(done(), scope);
2761
2777
  return pull.pipe(provideContext2(context2), semaphore.withPermits(1));
2762
2778
  }, /* @__PURE__ */ catchCause2((cause) => succeed6(failCause3(cause))));
@@ -2817,9 +2833,151 @@ var forEachArray = (f) => fromTransform2((upstream) => upstream.pipe(flatMap3(f)
2817
2833
  }), catchDone(() => endVoid)));
2818
2834
  var unwrap3 = (effect) => fromChannel(unwrap2(map9(effect, toChannel)));
2819
2835
 
2836
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
2837
+ var TypeId8 = "~effect/RcRef";
2838
+ var stateEmpty = {
2839
+ _tag: "Empty"
2840
+ };
2841
+ var stateClosed = {
2842
+ _tag: "Closed"
2843
+ };
2844
+ var variance2 = {
2845
+ _A: identity,
2846
+ _E: identity
2847
+ };
2848
+
2849
+ class RcRefImpl {
2850
+ [TypeId8] = variance2;
2851
+ pipe() {
2852
+ return pipeArguments(this, arguments);
2853
+ }
2854
+ state = stateEmpty;
2855
+ acquire;
2856
+ context;
2857
+ scope;
2858
+ idleTimeToLive;
2859
+ constructor(acquire, context, scope, idleTimeToLive) {
2860
+ this.acquire = acquire;
2861
+ this.context = context;
2862
+ this.scope = scope;
2863
+ this.idleTimeToLive = idleTimeToLive;
2864
+ }
2865
+ }
2866
+ var make6 = (options) => withFiber2((fiber) => {
2867
+ const context = fiber.context;
2868
+ const scope = get4(context, Scope);
2869
+ const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
2870
+ return as(addFinalizerExit(scope, () => {
2871
+ const state = ref.state;
2872
+ ref.state = stateClosed;
2873
+ if (state._tag === "Acquired")
2874
+ return close(state.scope, void_2);
2875
+ if (state._tag === "Acquiring")
2876
+ return interrupt(state.fiber);
2877
+ return void_3;
2878
+ }), ref);
2879
+ });
2880
+ var getState = (self, restore) => {
2881
+ switch (self.state._tag) {
2882
+ case "Closed": {
2883
+ return interrupt3;
2884
+ }
2885
+ case "Acquired": {
2886
+ const state = self.state;
2887
+ state.refCount++;
2888
+ return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
2889
+ }
2890
+ case "Acquiring": {
2891
+ const state = self.state;
2892
+ state.awaiters++;
2893
+ return awaitAcquiring(self, state, restore);
2894
+ }
2895
+ case "Empty": {
2896
+ const acquiring = {
2897
+ _tag: "Acquiring",
2898
+ fiber: undefined,
2899
+ awaiters: 1,
2900
+ acquired: undefined
2901
+ };
2902
+ self.state = acquiring;
2903
+ const scope = makeUnsafe6();
2904
+ const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
2905
+ if (self.state !== acquiring) {
2906
+ return interrupt3;
2907
+ }
2908
+ const state = {
2909
+ _tag: "Acquired",
2910
+ value,
2911
+ scope,
2912
+ fiber: undefined,
2913
+ refCount: acquiring.awaiters,
2914
+ invalidated: false
2915
+ };
2916
+ self.state = state;
2917
+ acquiring.acquired = state;
2918
+ return succeed6(state);
2919
+ }), onExit((exit) => {
2920
+ if (isSuccess2(exit))
2921
+ return void_3;
2922
+ if (self.state === acquiring)
2923
+ self.state = stateEmpty;
2924
+ return close(scope, exit);
2925
+ }));
2926
+ acquiring.fiber = runForkWith(getCurrent().context)(acquire);
2927
+ return awaitAcquiring(self, acquiring, restore);
2928
+ }
2929
+ }
2930
+ };
2931
+ var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
2932
+ const acquired = acquiring.acquired;
2933
+ if (acquired !== undefined) {
2934
+ return isFailure2(exit) ? release(self, acquired) : void_3;
2935
+ }
2936
+ if (--acquiring.awaiters > 0 || self.state !== acquiring)
2937
+ return void_3;
2938
+ self.state = stateEmpty;
2939
+ return interrupt(acquiring.fiber);
2940
+ });
2941
+ var get2 = (self_) => {
2942
+ const self = self_;
2943
+ return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
2944
+ };
2945
+ var release = (self, state) => {
2946
+ state.refCount--;
2947
+ if (state.refCount > 0) {
2948
+ return void_3;
2949
+ }
2950
+ const idleTimeToLive = self.idleTimeToLive;
2951
+ if (idleTimeToLive === undefined || state.invalidated) {
2952
+ if (self.state === state) {
2953
+ self.state = stateEmpty;
2954
+ }
2955
+ return close(state.scope, void_2);
2956
+ } else if (!isFinite(idleTimeToLive)) {
2957
+ return void_3;
2958
+ }
2959
+ state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
2960
+ if (self.state === state && state.refCount === 0) {
2961
+ self.state = stateEmpty;
2962
+ return ignoreCause(close(state.scope, void_2), {
2963
+ log: "Unhandled",
2964
+ message: "Unhandled error in RcRef finalizer"
2965
+ });
2966
+ }
2967
+ return void_3;
2968
+ })).pipe(ensuring2(sync2(() => {
2969
+ state.fiber = undefined;
2970
+ })), runForkWith(self.context), runIn(self.scope));
2971
+ return void_3;
2972
+ };
2973
+
2974
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
2975
+ var make9 = make6;
2976
+ var get3 = get2;
2977
+
2820
2978
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
2821
- var TypeId8 = "~effect/Stream";
2822
- var isStream = (u) => hasProperty(u, TypeId8);
2979
+ var TypeId9 = "~effect/Stream";
2980
+ var isStream = (u) => hasProperty(u, TypeId9);
2823
2981
  var fromChannel2 = fromChannel3;
2824
2982
  var fromPull2 = (pull) => fromChannel2(fromPull(pull));
2825
2983
  var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
@@ -3025,11 +3183,11 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
3025
3183
  var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map9(context(), (context) => toReadableStreamWith(self, context, options)));
3026
3184
 
3027
3185
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
3028
- var TypeId9 = "~effect/FileSystem";
3186
+ var TypeId10 = "~effect/FileSystem";
3029
3187
  var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
3030
3188
  var make11 = (impl) => FileSystem.of({
3031
3189
  ...impl,
3032
- [TypeId9]: TypeId9,
3190
+ [TypeId10]: TypeId10,
3033
3191
  glob: make2(impl),
3034
3192
  exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail7(e))),
3035
3193
  readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_2({
@@ -3045,11 +3203,11 @@ var make11 = (impl) => FileSystem.of({
3045
3203
  const file = yield* impl.open(path, {
3046
3204
  flag: "r"
3047
3205
  });
3048
- const offset = options?.offset === undefined ? undefined : fromInputUnsafe(options.offset);
3206
+ const offset = options?.offset === undefined ? undefined : fromInputUnsafe2(options.offset);
3049
3207
  if (offset) {
3050
3208
  yield* file.seek(offset, "start");
3051
3209
  }
3052
- const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe(options.bytesToRead);
3210
+ const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe2(options.bytesToRead);
3053
3211
  let totalBytesRead = BigInt(0);
3054
3212
  const chunkSize = Number(BigInt(options?.chunkSize ?? 64 * 1024));
3055
3213
  const readChunk = file.readAlloc(chunkSize);
@@ -3085,11 +3243,11 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
3085
3243
  }
3086
3244
 
3087
3245
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
3088
- var TypeId10 = "~effect/Path";
3246
+ var TypeId11 = "~effect/Path";
3089
3247
  var Path = /* @__PURE__ */ Service2("effect/Path");
3090
3248
  var make12 = (impl) => Path.of({
3091
3249
  ...impl,
3092
- [TypeId10]: TypeId10,
3250
+ [TypeId11]: TypeId11,
3093
3251
  resolveWithin(root, input) {
3094
3252
  if (impl.parse(input).root !== "")
3095
3253
  return none();
@@ -3162,7 +3320,7 @@ function makeProvider(load, mapInput) {
3162
3320
  function makeSource(get, transform) {
3163
3321
  return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
3164
3322
  }
3165
- function make6(get) {
3323
+ function make13(get) {
3166
3324
  return makeSource(get, identityPath);
3167
3325
  }
3168
3326
  function emptyStringAsMissing(value, preserveEmptyStrings) {
@@ -3171,7 +3329,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
3171
3329
  function fromEnvRecord(env, options) {
3172
3330
  const preserveEmptyStrings = options?.preserveEmptyStrings === true;
3173
3331
  const trie = buildEnvTrie(env);
3174
- return make6((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
3332
+ return make13((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
3175
3333
  }
3176
3334
  function fromEnv(options) {
3177
3335
  const env = options?.env ?? {
@@ -3224,7 +3382,7 @@ function trieNodeAt(root, path) {
3224
3382
  }
3225
3383
 
3226
3384
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Config.js
3227
- var TypeId11 = "~effect/Config";
3385
+ var TypeId12 = "~effect/Config";
3228
3386
  class ConfigError {
3229
3387
  _tag = "ConfigError";
3230
3388
  name = "ConfigError";
@@ -3246,14 +3404,14 @@ var Proto2 = {
3246
3404
  return this.parse(fiber.getRef(ConfigProvider));
3247
3405
  }
3248
3406
  }),
3249
- [TypeId11]: TypeId11,
3407
+ [TypeId12]: TypeId12,
3250
3408
  toJSON() {
3251
3409
  return {
3252
3410
  _id: "Config"
3253
3411
  };
3254
3412
  }
3255
3413
  };
3256
- function make7(evaluator) {
3414
+ function make14(evaluator) {
3257
3415
  const self = Object.create(Proto2);
3258
3416
  self.evaluator = evaluator;
3259
3417
  self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
@@ -3261,14 +3419,14 @@ function make7(evaluator) {
3261
3419
  }
3262
3420
  var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
3263
3421
  var map3 = /* @__PURE__ */ dual(2, (self, f) => {
3264
- return make7((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
3422
+ return make14((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
3265
3423
  });
3266
3424
  function all(arg) {
3267
3425
  const configs = globalThis.Array.isArray(arg) ? arg : (Symbol.iterator in arg) ? [...arg] : arg;
3268
- 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));
3426
+ 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));
3269
3427
  }
3270
3428
  var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
3271
- return make7((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
3429
+ return make14((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
3272
3430
  });
3273
3431
  var option = (self) => self.pipe(map3(some), withDefault(none()));
3274
3432
  var isSourceError = (u) => isTagged(u, "SourceError");
@@ -3385,9 +3543,9 @@ var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
3385
3543
  function schema(codec, path) {
3386
3544
  const codecStringTree = toCodecStringTree(codec);
3387
3545
  const encodedAst = toEncoded(codecStringTree.ast);
3388
- const decodeCursor = decodeUnknownEffect(make16(toConfigCursorAST(codecStringTree.ast)));
3546
+ const decodeCursor = decodeUnknownEffect(make17(toConfigCursorAST(codecStringTree.ast)));
3389
3547
  const localPath = typeof path === "string" ? [path] : path ?? [];
3390
- return make7((provider, pathPrefix) => {
3548
+ return make14((provider, pathPrefix) => {
3391
3549
  const fullPath = [...pathPrefix, ...localPath];
3392
3550
  return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed), catchEager((issue) => {
3393
3551
  const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
@@ -3517,4 +3675,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
3517
3675
  ...argv
3518
3676
  ];
3519
3677
 
3520
- export { empty2, map, makeEquivalence, Clock, currentTimeMillis, bytes, join, interrupt, interruptAll, 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, empty3, 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, toPull, 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 };
3678
+ export { empty2, map, makeEquivalence, Clock, currentTimeMillis, toNumber, bytes, join, interrupt, interruptAll, 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, empty3, 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, toPull, 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 };
@@ -9,10 +9,10 @@ import {
9
9
  readOpencode2,
10
10
  databaseStamp2,
11
11
  runOpencodeReader2
12
- } from "./chunk-pppryg54.js";
13
- import"./chunk-2nq80r46.js";
14
- import"./chunk-bj0zchck.js";
15
- import"./chunk-zb4t1yrt.js";
12
+ } from "./chunk-yn5c3tzd.js";
13
+ import"./chunk-z1d5jx6m.js";
14
+ import"./chunk-jz2b3htb.js";
15
+ import"./chunk-e4ced6vj.js";
16
16
  export {
17
17
  databaseStamp2 as databaseStamp,
18
18
  decoded2 as decoded,
@@ -24,11 +24,11 @@ import {
24
24
  Record,
25
25
  Int,
26
26
  fromJsonString
27
- } from "./chunk-zb4t1yrt.js";
27
+ } from "./chunk-e4ced6vj.js";
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-bj0zchck.js";
31
+ } from "./chunk-jz2b3htb.js";
32
32
  import {
33
33
  newerKitmanVersion,
34
34
  digestSha256,
@@ -39,7 +39,7 @@ import {
39
39
  get2,
40
40
  layer4,
41
41
  KitDigest
42
- } from "./chunk-qsbq9gvr.js";
42
+ } from "./chunk-7eqzzcvj.js";
43
43
 
44
44
  // packages/core/src/npm-registry.ts
45
45
  var KitManifest = Struct({
@@ -529,24 +529,7 @@ Agents should record implementation evidence, verification, and delivery artifac
529
529
  path: "loop-operations#intent",
530
530
  level: 2,
531
531
  link: "https://kitman.sh/knowledge/docs/loop-operations#intent",
532
- text: `## Intent
533
-
534
- Every Run is held to an Intent, seeded when Kitman admits it:
535
-
536
- - **Goal:** the launch words, or the Task's title, Promise, description and Out of scope list. A Child Run, such as the Review or Shepherd a Build calls, is held instead to doing the work its parent's call input asks for and reporting the result in its Output, naming the parent's Task.
537
- - **Done when:** the Task's Acceptance Criteria. A Child Run has none: its parent's evidence settles them.
538
- - **Constraints:** see below.
539
-
540
- Each agent Step's brief states the Intent. While the Run is going, its Delivery Owner amends it on the Run page or with:
541
-
542
- \`\`\`sh
543
- kitman run intent <run> --set-goal "<text>"
544
- kitman run intent <run> --add-constraint "<text>"
545
- kitman run intent <run> --remove-constraint <id>
546
- kitman run intent <run> --corrections off
547
- \`\`\`
548
-
549
- Each amendment is a new version with its author, and \`kitman run intent <run>\` lists them all. On the Run page's Intent tab, edit the goal or a constraint in place: each save is one new version. An edited constraint takes the old one's place under a new id, so Drift Reports against the old wording stay with it. A constraint a person removed or reworded never comes back. A settled or closed Run refuses amendments.`
532
+ text: "## Intent\n\nEvery Run is held to an Intent, seeded when Kitman admits it from what its Loop declares:\n\n- **Goal:** for a Loop that does its Task's work, as Build and Hillclimb do, the launch words, or the Task's title, Promise, description and Out of scope list, or `Run the <loop> Loop` with neither. Any other Loop's Run is held to the goal its Loop declares, `Run the <loop> Loop` when it declares none, and nothing of its Task; launch words replace that goal. A Loop from a Kit built before Loops declared an Intent is seeded from its Task. A Run that pins a private Team's Kit while it is in another Team gets `Run the <loop> Loop` instead of that Kit's declared goal and list.\n- **Child Runs:** a Child Run, such as the Review or Shepherd a Build calls, is held instead to doing the work its parent's call input asks for and reporting the result in its Output, quoting its parent's current goal and nothing of its own Task. It quotes no goal when its parent was admitted before Runs had an Intent, and then inherits no constraint, or when its parent's goal is private to a Team the Child Run is not in. Launch words given to a Child Run are its goal.\n- **Done when:** for a Loop that does its Task's work, the Task's Acceptance Criteria, also when launch words set the goal. Any other Loop's Run has the list its Loop declares, and none when launch words set its goal. A Child Run has none, whatever its Loop declares: its parent's evidence settles them.\n- **Constraints:** see below.\n\nEach agent Step's brief states the Intent. While the Run is going, its Delivery Owner amends it on the Run page or with:\n\n```sh\nkitman run intent <run> --set-goal \"<text>\"\nkitman run intent <run> --add-constraint \"<text>\"\nkitman run intent <run> --remove-constraint <id>\nkitman run intent <run> --corrections off\n```\n\nEach amendment is a new version with its author, and `kitman run intent <run>` lists them all. On the Run page's Intent tab, edit the goal or a constraint in place: each save is one new version. An edited constraint takes the old one's place under a new id, so Drift Reports against the old wording stay with it. A constraint a person removed or reworded never comes back. A settled or closed Run refuses amendments."
550
533
  },
551
534
  {
552
535
  title: "Loop Operations Guide \u203A Steering, pausing and resuming",
@@ -1450,6 +1433,7 @@ Read this before you create a Task or write a plan's ticket.`
1450
1433
  text: `## One Promise per Task
1451
1434
 
1452
1435
  - Give a Task one Promise: one sentence that says what is true once it is done. Write it in the Task's \`promise\`. Two Promises are two Tasks.
1436
+ - Every Acceptance Criterion serves the Task's Promise. One that serves another Promise belongs to another Task.
1453
1437
  - A Promise is open-ended when it covers cases nobody can list, such as every path, any input or all source code. Reviews of it keep finding one more case. Split it into a first Task with a bounded case, whose cases you list, and later Tasks that each widen it.
1454
1438
  - Size a Task to fit one agent session under 200k tokens of context, from reading the code to a verified change. Split one that does not fit.`
1455
1439
  },
@@ -1929,6 +1913,11 @@ export type LoopDefinition<In, Out, E> = {
1929
1913
  readonly input: LoopSchema<In>
1930
1914
  readonly output: LoopSchema<Out>
1931
1915
  readonly outcome?: LoopOutcome
1916
+ /**
1917
+ * What a top-level Run is held to: \`task\` takes the goal and done-when list from the Run's Task; otherwise the
1918
+ * declared non-blank goal and list. Left out, the goal is \`Run the <id> Loop\`.
1919
+ */
1920
+ readonly intent?: 'task' | { readonly goal: string; readonly doneWhen?: readonly string[] }
1932
1921
  /**
1933
1922
  * The role it plays, whose powers the control plane gives any Loop that declares it: \`review\` approves a
1934
1923
  * ChangeRequest's head, is reused and covers a fix, as Kitman's Review does; \`release\` delivers a Project, as
@@ -2068,6 +2057,8 @@ export const loopManifest = <In, Out, E>(
2068
2057
  message: 'description must be one line of 1 to 160 characters'
2069
2058
  })
2070
2059
 
2060
+ const intent = yield* declaredIntent(definition)
2061
+
2071
2062
  const input = yield* jsonSchemaOf(definition.id, definition.input)
2072
2063
  const output = yield* jsonSchemaOf(definition.id, definition.output)
2073
2064
 
@@ -2082,6 +2073,7 @@ export const loopManifest = <In, Out, E>(
2082
2073
  output,
2083
2074
  ...(definition.outcome === undefined ? undefined : { outcome: definition.outcome }),
2084
2075
  ...(definition.role === undefined ? undefined : { role: definition.role }),
2076
+ intent,
2085
2077
  agents: definition.agents,
2086
2078
  checkout: definition.checkout,
2087
2079
  when: yield* namedWhenClauses(definition.id, definition.when ?? []),
@@ -2230,7 +2222,7 @@ var pathOfLink = (link) => {
2230
2222
  return page === null ? link : page[1] || "index";
2231
2223
  };
2232
2224
  var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
2233
- var pinnedLink2 = (link, version = "0.52.0") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
2225
+ var pinnedLink2 = (link, version = "0.54.0") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
2234
2226
  var pageOf = (path) => path.split("#")[0];
2235
2227
  var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
2236
2228
  function excerpt(text, queryTerms) {
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-zb4t1yrt.js";
16
+ } from "./chunk-e4ced6vj.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-wxg9k10v.js";
20
+ } from "./chunk-xwte7af6.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
@@ -1,4 +1,8 @@
1
1
  // @bun
2
+ import {
3
+ FileSystem,
4
+ Path
5
+ } from "./chunk-jz2b3htb.js";
2
6
  import {
3
7
  isObject,
4
8
  isUint8Array,
@@ -13,17 +17,13 @@ import {
13
17
  isJsonObject,
14
18
  decodeJsonString,
15
19
  encodePrettyJsonString
16
- } from "./chunk-zb4t1yrt.js";
17
- import {
18
- FileSystem,
19
- Path
20
- } from "./chunk-bj0zchck.js";
20
+ } from "./chunk-e4ced6vj.js";
21
21
  import {
22
22
  tomlTableHeader2,
23
23
  tomlKeyPath2,
24
24
  kitmanSkillEntry,
25
25
  isPathWithin2
26
- } from "./chunk-my9db578.js";
26
+ } from "./chunk-t94stfev.js";
27
27
  import {
28
28
  instructionsStart,
29
29
  instructionsEnd,
@@ -31,10 +31,10 @@ import {
31
31
  antigravityPlugins,
32
32
  materializeKitSetup,
33
33
  tomlInline
34
- } from "./chunk-qsbq9gvr.js";
35
- import"./chunk-a40yta1r.js";
36
- import"./chunk-2nq80r46.js";
37
- import"./chunk-wxg9k10v.js";
34
+ } from "./chunk-7eqzzcvj.js";
35
+ import"./chunk-kpgkhx9j.js";
36
+ import"./chunk-z1d5jx6m.js";
37
+ import"./chunk-xwte7af6.js";
38
38
 
39
39
  // packages/agent-runtime/src/kit-setup-sync.ts
40
40
  class KitSyncError extends TaggedError("KitSyncError") {
@@ -1,4 +1,10 @@
1
1
  // @bun
2
+ import {
3
+ FileSystem,
4
+ Path,
5
+ optionalEnv,
6
+ tempDirectoryScoped
7
+ } from "./chunk-jz2b3htb.js";
2
8
  import {
3
9
  Reference,
4
10
  TaggedError,
@@ -25,21 +31,15 @@ import {
25
31
  isString2,
26
32
  encodePrettyJsonString,
27
33
  decodeJsonStringSync
28
- } from "./chunk-zb4t1yrt.js";
29
- import {
30
- FileSystem,
31
- Path,
32
- optionalEnv,
33
- tempDirectoryScoped
34
- } from "./chunk-bj0zchck.js";
34
+ } from "./chunk-e4ced6vj.js";
35
35
  import {
36
36
  AgentHarnessIds,
37
37
  sha2562,
38
38
  runCommand2
39
- } from "./chunk-qsbq9gvr.js";
39
+ } from "./chunk-7eqzzcvj.js";
40
40
  import {
41
41
  NpmRegistry
42
- } from "./chunk-a40yta1r.js";
42
+ } from "./chunk-kpgkhx9j.js";
43
43
 
44
44
  // packages/agent-runtime/src/config-convergence.ts
45
45
  var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
@@ -4,7 +4,7 @@ import {
4
4
  searchDocs2,
5
5
  readDoc2,
6
6
  pinnedLink2
7
- } from "./chunk-trtgab3h.js";
7
+ } from "./chunk-p77428sa.js";
8
8
  export {
9
9
  DefaultDocsSearchLimit2 as DefaultDocsSearchLimit,
10
10
  pinnedLink2 as pinnedLink,