@kitman-sh/cli 0.38.0 → 0.41.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.
- package/dist/{chunk-x3t9f61a.js → chunk-0jphb7hd.js} +4 -4
- package/dist/{chunk-hc2yvtze.js → chunk-32fc44tx.js} +10 -10
- package/dist/{chunk-g7za9rja.js → chunk-5rvn8bah.js} +152 -147
- package/dist/{chunk-x127f2bb.js → chunk-amnctk9f.js} +6 -6
- package/dist/{chunk-bqbfyqx6.js → chunk-b4td2pgc.js} +61 -61
- package/dist/{chunk-71m1n92b.js → chunk-c8rck2r5.js} +4 -4
- package/dist/{chunk-6x08g7m6.js → chunk-cs66re9p.js} +10 -10
- package/dist/{chunk-wy6gmtd9.js → chunk-dhe1fwhw.js} +2 -2
- package/dist/{chunk-ns26fbmk.js → chunk-drw8m50d.js} +2 -2
- package/dist/{chunk-bhfytevh.js → chunk-f7qdzedh.js} +278 -121
- package/dist/{chunk-d4vhrja4.js → chunk-hfy8nmat.js} +3 -3
- package/dist/{chunk-pkpzf7cp.js → chunk-j4s7r8hg.js} +18 -18
- package/dist/{chunk-a2x5s9kp.js → chunk-p9ykk8h7.js} +3 -3
- package/dist/{chunk-hgvft7vy.js → chunk-pz7s0apf.js} +4 -4
- package/dist/{chunk-ea29sbaq.js → chunk-qndcafax.js} +1 -1
- package/dist/{chunk-cxr41x50.js → chunk-rt2sh0jh.js} +65 -65
- package/dist/{chunk-etrfc5cn.js → chunk-sasjamqz.js} +29 -178
- package/dist/{chunk-cnryphhh.js → chunk-svq8b6fq.js} +5 -5
- package/dist/{chunk-98azvx6g.js → chunk-tpmyf5mk.js} +1 -1
- package/dist/{chunk-an3rg14h.js → chunk-v2pk0b62.js} +3 -3
- package/dist/{chunk-wzphgw0t.js → chunk-vd9wjvwt.js} +7 -7
- package/dist/{chunk-8b02x7vv.js → chunk-wre79w3z.js} +1 -1
- package/dist/{chunk-nedj1g2c.js → chunk-xat27r93.js} +101 -27
- package/dist/{chunk-kpx9mb4f.js → chunk-yv80rgfx.js} +1 -1
- package/dist/{chunk-fyg6wzms.js → chunk-yxj4dmef.js} +13 -13
- package/dist/{chunk-rv36r6r0.js → chunk-zvp4wm6b.js} +6 -6
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -34,11 +34,8 @@ import {
|
|
|
34
34
|
getOrUndefined,
|
|
35
35
|
map4,
|
|
36
36
|
Service2,
|
|
37
|
-
|
|
38
|
-
get4,
|
|
37
|
+
get3,
|
|
39
38
|
Reference,
|
|
40
|
-
fromInputUnsafe,
|
|
41
|
-
isFinite,
|
|
42
39
|
normalize,
|
|
43
40
|
succeed,
|
|
44
41
|
fail3,
|
|
@@ -88,7 +85,6 @@ import {
|
|
|
88
85
|
fail4,
|
|
89
86
|
interrupt2,
|
|
90
87
|
void_2,
|
|
91
|
-
isSuccess2,
|
|
92
88
|
isFailure2,
|
|
93
89
|
asVoidAll,
|
|
94
90
|
makeUnsafe5,
|
|
@@ -160,14 +156,12 @@ import {
|
|
|
160
156
|
tapError2,
|
|
161
157
|
ignoreCause,
|
|
162
158
|
orElseSucceed,
|
|
163
|
-
sleep,
|
|
164
159
|
raceFirst,
|
|
165
160
|
when,
|
|
166
161
|
matchCauseEffect,
|
|
167
162
|
context,
|
|
168
163
|
contextWith,
|
|
169
164
|
provideContext2,
|
|
170
|
-
scope2,
|
|
171
165
|
scoped,
|
|
172
166
|
scopedWith,
|
|
173
167
|
acquireRelease,
|
|
@@ -178,7 +172,6 @@ import {
|
|
|
178
172
|
interrupt3,
|
|
179
173
|
onInterrupt,
|
|
180
174
|
uninterruptible,
|
|
181
|
-
uninterruptibleMask2,
|
|
182
175
|
forever,
|
|
183
176
|
forkChild,
|
|
184
177
|
forkIn,
|
|
@@ -201,11 +194,11 @@ import {
|
|
|
201
194
|
toEncoded,
|
|
202
195
|
decodeUnknownEffect,
|
|
203
196
|
SchemaError,
|
|
204
|
-
|
|
197
|
+
make16,
|
|
205
198
|
String4,
|
|
206
199
|
toCodecStringTree,
|
|
207
200
|
encodeUnknownJsonStringSync
|
|
208
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-b4td2pgc.js";
|
|
209
202
|
|
|
210
203
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
|
|
211
204
|
var headUnsafe = (self) => {
|
|
@@ -378,7 +371,7 @@ var fromStringUnsafe = (input) => {
|
|
|
378
371
|
return invalid(`${JSON.stringify(input)} does not represent an integral number of bytes`);
|
|
379
372
|
return make(value);
|
|
380
373
|
};
|
|
381
|
-
var
|
|
374
|
+
var fromInputUnsafe = (input) => {
|
|
382
375
|
switch (typeof input) {
|
|
383
376
|
case "bigint":
|
|
384
377
|
if (input < bigint0)
|
|
@@ -391,7 +384,7 @@ var fromInputUnsafe2 = (input) => {
|
|
|
391
384
|
}
|
|
392
385
|
return invalid(`unsupported input ${input}`);
|
|
393
386
|
};
|
|
394
|
-
var bytes = (value) => typeof value === "bigint" ?
|
|
387
|
+
var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe(value) : fromNumber(value);
|
|
395
388
|
|
|
396
389
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Fiber.js
|
|
397
390
|
var join = fiberJoin;
|
|
@@ -1317,7 +1310,7 @@ var publishUnsafe = /* @__PURE__ */ dual(2, (self, value) => {
|
|
|
1317
1310
|
return false;
|
|
1318
1311
|
});
|
|
1319
1312
|
var subscribe = (self) => uninterruptible(contextWith((services) => {
|
|
1320
|
-
const localScope =
|
|
1313
|
+
const localScope = get3(services, Scope);
|
|
1321
1314
|
const scope = forkUnsafe(self.scope);
|
|
1322
1315
|
const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
|
|
1323
1316
|
return addFinalizer(scope, unsubscribe(subscription)).pipe(andThen2(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
|
|
@@ -2760,7 +2753,7 @@ var runFold2 = /* @__PURE__ */ dual(3, (self, initial, f) => suspend3(() => {
|
|
|
2760
2753
|
var toPull2 = /* @__PURE__ */ fnUntraced(function* (self) {
|
|
2761
2754
|
const semaphore = makeUnsafe3(1);
|
|
2762
2755
|
const context2 = yield* context();
|
|
2763
|
-
const scope =
|
|
2756
|
+
const scope = get3(context2, Scope);
|
|
2764
2757
|
const pull = yield* toTransform(self)(done(), scope);
|
|
2765
2758
|
return pull.pipe(provideContext2(context2), semaphore.withPermits(1));
|
|
2766
2759
|
}, /* @__PURE__ */ catchCause2((cause) => succeed6(failCause3(cause))));
|
|
@@ -2821,158 +2814,16 @@ var forEachArray = (f) => fromTransform2((upstream) => upstream.pipe(flatMap3(f)
|
|
|
2821
2814
|
}), catchDone(() => endVoid)));
|
|
2822
2815
|
var unwrap3 = (effect) => fromChannel(unwrap2(map9(effect, toChannel)));
|
|
2823
2816
|
|
|
2824
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
|
|
2825
|
-
var TypeId8 = "~effect/RcRef";
|
|
2826
|
-
var stateEmpty = {
|
|
2827
|
-
_tag: "Empty"
|
|
2828
|
-
};
|
|
2829
|
-
var stateClosed = {
|
|
2830
|
-
_tag: "Closed"
|
|
2831
|
-
};
|
|
2832
|
-
var variance2 = {
|
|
2833
|
-
_A: identity,
|
|
2834
|
-
_E: identity
|
|
2835
|
-
};
|
|
2836
|
-
|
|
2837
|
-
class RcRefImpl {
|
|
2838
|
-
[TypeId8] = variance2;
|
|
2839
|
-
pipe() {
|
|
2840
|
-
return pipeArguments(this, arguments);
|
|
2841
|
-
}
|
|
2842
|
-
state = stateEmpty;
|
|
2843
|
-
acquire;
|
|
2844
|
-
context;
|
|
2845
|
-
scope;
|
|
2846
|
-
idleTimeToLive;
|
|
2847
|
-
constructor(acquire, context, scope, idleTimeToLive) {
|
|
2848
|
-
this.acquire = acquire;
|
|
2849
|
-
this.context = context;
|
|
2850
|
-
this.scope = scope;
|
|
2851
|
-
this.idleTimeToLive = idleTimeToLive;
|
|
2852
|
-
}
|
|
2853
|
-
}
|
|
2854
|
-
var make6 = (options) => withFiber2((fiber) => {
|
|
2855
|
-
const context = fiber.context;
|
|
2856
|
-
const scope = get4(context, Scope);
|
|
2857
|
-
const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
|
|
2858
|
-
return as(addFinalizerExit(scope, () => {
|
|
2859
|
-
const state = ref.state;
|
|
2860
|
-
ref.state = stateClosed;
|
|
2861
|
-
if (state._tag === "Acquired")
|
|
2862
|
-
return close(state.scope, void_2);
|
|
2863
|
-
if (state._tag === "Acquiring")
|
|
2864
|
-
return interrupt(state.fiber);
|
|
2865
|
-
return void_3;
|
|
2866
|
-
}), ref);
|
|
2867
|
-
});
|
|
2868
|
-
var getState = (self, restore) => {
|
|
2869
|
-
switch (self.state._tag) {
|
|
2870
|
-
case "Closed": {
|
|
2871
|
-
return interrupt3;
|
|
2872
|
-
}
|
|
2873
|
-
case "Acquired": {
|
|
2874
|
-
const state = self.state;
|
|
2875
|
-
state.refCount++;
|
|
2876
|
-
return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
|
|
2877
|
-
}
|
|
2878
|
-
case "Acquiring": {
|
|
2879
|
-
const state = self.state;
|
|
2880
|
-
state.awaiters++;
|
|
2881
|
-
return awaitAcquiring(self, state, restore);
|
|
2882
|
-
}
|
|
2883
|
-
case "Empty": {
|
|
2884
|
-
const acquiring = {
|
|
2885
|
-
_tag: "Acquiring",
|
|
2886
|
-
fiber: undefined,
|
|
2887
|
-
awaiters: 1,
|
|
2888
|
-
acquired: undefined
|
|
2889
|
-
};
|
|
2890
|
-
self.state = acquiring;
|
|
2891
|
-
const scope = makeUnsafe6();
|
|
2892
|
-
const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
|
|
2893
|
-
if (self.state !== acquiring) {
|
|
2894
|
-
return interrupt3;
|
|
2895
|
-
}
|
|
2896
|
-
const state = {
|
|
2897
|
-
_tag: "Acquired",
|
|
2898
|
-
value,
|
|
2899
|
-
scope,
|
|
2900
|
-
fiber: undefined,
|
|
2901
|
-
refCount: acquiring.awaiters,
|
|
2902
|
-
invalidated: false
|
|
2903
|
-
};
|
|
2904
|
-
self.state = state;
|
|
2905
|
-
acquiring.acquired = state;
|
|
2906
|
-
return succeed6(state);
|
|
2907
|
-
}), onExit((exit) => {
|
|
2908
|
-
if (isSuccess2(exit))
|
|
2909
|
-
return void_3;
|
|
2910
|
-
if (self.state === acquiring)
|
|
2911
|
-
self.state = stateEmpty;
|
|
2912
|
-
return close(scope, exit);
|
|
2913
|
-
}));
|
|
2914
|
-
acquiring.fiber = runForkWith(getCurrent().context)(acquire);
|
|
2915
|
-
return awaitAcquiring(self, acquiring, restore);
|
|
2916
|
-
}
|
|
2917
|
-
}
|
|
2918
|
-
};
|
|
2919
|
-
var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
|
|
2920
|
-
const acquired = acquiring.acquired;
|
|
2921
|
-
if (acquired !== undefined) {
|
|
2922
|
-
return isFailure2(exit) ? release(self, acquired) : void_3;
|
|
2923
|
-
}
|
|
2924
|
-
if (--acquiring.awaiters > 0 || self.state !== acquiring)
|
|
2925
|
-
return void_3;
|
|
2926
|
-
self.state = stateEmpty;
|
|
2927
|
-
return interrupt(acquiring.fiber);
|
|
2928
|
-
});
|
|
2929
|
-
var get2 = (self_) => {
|
|
2930
|
-
const self = self_;
|
|
2931
|
-
return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
|
|
2932
|
-
};
|
|
2933
|
-
var release = (self, state) => {
|
|
2934
|
-
state.refCount--;
|
|
2935
|
-
if (state.refCount > 0) {
|
|
2936
|
-
return void_3;
|
|
2937
|
-
}
|
|
2938
|
-
const idleTimeToLive = self.idleTimeToLive;
|
|
2939
|
-
if (idleTimeToLive === undefined || state.invalidated) {
|
|
2940
|
-
if (self.state === state) {
|
|
2941
|
-
self.state = stateEmpty;
|
|
2942
|
-
}
|
|
2943
|
-
return close(state.scope, void_2);
|
|
2944
|
-
} else if (!isFinite(idleTimeToLive)) {
|
|
2945
|
-
return void_3;
|
|
2946
|
-
}
|
|
2947
|
-
state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
|
|
2948
|
-
if (self.state === state && state.refCount === 0) {
|
|
2949
|
-
self.state = stateEmpty;
|
|
2950
|
-
return ignoreCause(close(state.scope, void_2), {
|
|
2951
|
-
log: "Unhandled",
|
|
2952
|
-
message: "Unhandled error in RcRef finalizer"
|
|
2953
|
-
});
|
|
2954
|
-
}
|
|
2955
|
-
return void_3;
|
|
2956
|
-
})).pipe(ensuring2(sync2(() => {
|
|
2957
|
-
state.fiber = undefined;
|
|
2958
|
-
})), runForkWith(self.context), runIn(self.scope));
|
|
2959
|
-
return void_3;
|
|
2960
|
-
};
|
|
2961
|
-
|
|
2962
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
|
|
2963
|
-
var make10 = make6;
|
|
2964
|
-
var get3 = get2;
|
|
2965
|
-
|
|
2966
2817
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
|
|
2967
|
-
var
|
|
2968
|
-
var isStream = (u) => hasProperty(u,
|
|
2818
|
+
var TypeId8 = "~effect/Stream";
|
|
2819
|
+
var isStream = (u) => hasProperty(u, TypeId8);
|
|
2969
2820
|
var fromChannel2 = fromChannel3;
|
|
2970
2821
|
var fromPull2 = (pull) => fromChannel2(fromPull(pull));
|
|
2971
2822
|
var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
|
|
2972
2823
|
var toChannel2 = (stream) => stream.channel;
|
|
2973
2824
|
var callback = (f, options) => fromChannel2(callbackArray(f, options));
|
|
2974
2825
|
var empty2 = /* @__PURE__ */ fromChannel2(empty);
|
|
2975
|
-
var
|
|
2826
|
+
var make10 = (...values) => fromArray2(values);
|
|
2976
2827
|
var suspend = (stream) => {
|
|
2977
2828
|
const suspended = fromChannel2(suspend4(() => stream().channel));
|
|
2978
2829
|
suspendedStreams.set(suspended, stream);
|
|
@@ -3171,11 +3022,11 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
|
|
|
3171
3022
|
var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map9(context(), (context) => toReadableStreamWith(self, context, options)));
|
|
3172
3023
|
|
|
3173
3024
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
|
|
3174
|
-
var
|
|
3025
|
+
var TypeId9 = "~effect/FileSystem";
|
|
3175
3026
|
var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
|
|
3176
|
-
var
|
|
3027
|
+
var make11 = (impl) => FileSystem.of({
|
|
3177
3028
|
...impl,
|
|
3178
|
-
[
|
|
3029
|
+
[TypeId9]: TypeId9,
|
|
3179
3030
|
glob: make2(impl),
|
|
3180
3031
|
exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail7(e))),
|
|
3181
3032
|
readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_2({
|
|
@@ -3191,11 +3042,11 @@ var make12 = (impl) => FileSystem.of({
|
|
|
3191
3042
|
const file = yield* impl.open(path, {
|
|
3192
3043
|
flag: "r"
|
|
3193
3044
|
});
|
|
3194
|
-
const offset = options?.offset === undefined ? undefined :
|
|
3045
|
+
const offset = options?.offset === undefined ? undefined : fromInputUnsafe(options.offset);
|
|
3195
3046
|
if (offset) {
|
|
3196
3047
|
yield* file.seek(offset, "start");
|
|
3197
3048
|
}
|
|
3198
|
-
const bytesToRead = options?.bytesToRead === undefined ? undefined :
|
|
3049
|
+
const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe(options.bytesToRead);
|
|
3199
3050
|
let totalBytesRead = BigInt(0);
|
|
3200
3051
|
const chunkSize = Number(BigInt(options?.chunkSize ?? 64 * 1024));
|
|
3201
3052
|
const readChunk = file.readAlloc(chunkSize);
|
|
@@ -3231,11 +3082,11 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
|
|
|
3231
3082
|
}
|
|
3232
3083
|
|
|
3233
3084
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
|
|
3234
|
-
var
|
|
3085
|
+
var TypeId10 = "~effect/Path";
|
|
3235
3086
|
var Path = /* @__PURE__ */ Service2("effect/Path");
|
|
3236
|
-
var
|
|
3087
|
+
var make12 = (impl) => Path.of({
|
|
3237
3088
|
...impl,
|
|
3238
|
-
[
|
|
3089
|
+
[TypeId10]: TypeId10,
|
|
3239
3090
|
resolveWithin(root, input) {
|
|
3240
3091
|
if (impl.parse(input).root !== "")
|
|
3241
3092
|
return none();
|
|
@@ -3308,7 +3159,7 @@ function makeProvider(load, mapInput) {
|
|
|
3308
3159
|
function makeSource(get, transform) {
|
|
3309
3160
|
return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
|
|
3310
3161
|
}
|
|
3311
|
-
function
|
|
3162
|
+
function make6(get) {
|
|
3312
3163
|
return makeSource(get, identityPath);
|
|
3313
3164
|
}
|
|
3314
3165
|
function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
@@ -3317,7 +3168,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
|
3317
3168
|
function fromEnvRecord(env, options) {
|
|
3318
3169
|
const preserveEmptyStrings = options?.preserveEmptyStrings === true;
|
|
3319
3170
|
const trie = buildEnvTrie(env);
|
|
3320
|
-
return
|
|
3171
|
+
return make6((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
|
|
3321
3172
|
}
|
|
3322
3173
|
function fromEnv(options) {
|
|
3323
3174
|
const env = options?.env ?? {
|
|
@@ -3370,7 +3221,7 @@ function trieNodeAt(root, path) {
|
|
|
3370
3221
|
}
|
|
3371
3222
|
|
|
3372
3223
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Config.js
|
|
3373
|
-
var
|
|
3224
|
+
var TypeId11 = "~effect/Config";
|
|
3374
3225
|
class ConfigError {
|
|
3375
3226
|
_tag = "ConfigError";
|
|
3376
3227
|
name = "ConfigError";
|
|
@@ -3392,14 +3243,14 @@ var Proto2 = {
|
|
|
3392
3243
|
return this.parse(fiber.getRef(ConfigProvider));
|
|
3393
3244
|
}
|
|
3394
3245
|
}),
|
|
3395
|
-
[
|
|
3246
|
+
[TypeId11]: TypeId11,
|
|
3396
3247
|
toJSON() {
|
|
3397
3248
|
return {
|
|
3398
3249
|
_id: "Config"
|
|
3399
3250
|
};
|
|
3400
3251
|
}
|
|
3401
3252
|
};
|
|
3402
|
-
function
|
|
3253
|
+
function make7(evaluator) {
|
|
3403
3254
|
const self = Object.create(Proto2);
|
|
3404
3255
|
self.evaluator = evaluator;
|
|
3405
3256
|
self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
|
|
@@ -3407,14 +3258,14 @@ function make14(evaluator) {
|
|
|
3407
3258
|
}
|
|
3408
3259
|
var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
|
|
3409
3260
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
3410
|
-
return
|
|
3261
|
+
return make7((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
|
|
3411
3262
|
});
|
|
3412
3263
|
function all(arg) {
|
|
3413
3264
|
const configs = globalThis.Array.isArray(arg) ? arg : (Symbol.iterator in arg) ? [...arg] : arg;
|
|
3414
|
-
return
|
|
3265
|
+
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));
|
|
3415
3266
|
}
|
|
3416
3267
|
var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
|
|
3417
|
-
return
|
|
3268
|
+
return make7((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
|
|
3418
3269
|
});
|
|
3419
3270
|
var option = (self) => self.pipe(map3(some), withDefault(none()));
|
|
3420
3271
|
var isSourceError = (u) => isTagged(u, "SourceError");
|
|
@@ -3531,9 +3382,9 @@ var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
|
|
|
3531
3382
|
function schema(codec, path) {
|
|
3532
3383
|
const codecStringTree = toCodecStringTree(codec);
|
|
3533
3384
|
const encodedAst = toEncoded(codecStringTree.ast);
|
|
3534
|
-
const decodeCursor = decodeUnknownEffect(
|
|
3385
|
+
const decodeCursor = decodeUnknownEffect(make16(toConfigCursorAST(codecStringTree.ast)));
|
|
3535
3386
|
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
3536
|
-
return
|
|
3387
|
+
return make7((provider, pathPrefix) => {
|
|
3537
3388
|
const fullPath = [...pathPrefix, ...localPath];
|
|
3538
3389
|
return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed), catchEager((issue) => {
|
|
3539
3390
|
const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
|
|
@@ -3663,4 +3514,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
|
|
|
3663
3514
|
...argv
|
|
3664
3515
|
];
|
|
3665
3516
|
|
|
3666
|
-
export { map, makeEquivalence, Clock, currentTimeMillis, 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,
|
|
3517
|
+
export { map, makeEquivalence, Clock, currentTimeMillis, bytes, join, interrupt, getCurrent, runIn, BadArgument, systemError, badArgument, makeUnsafe2, make8, unbounded, publishUnsafe, make9, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe3, fromTransform, mapDone, isSink, fromChannel, drain, isStream, fromChannel2, callback, empty2, make10, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, take2, mapAccum, transduce, decodeText, encodeText, splitLines, interruptWhen, ensuring, provideContext, run, runCollect, runFold, runHead, runForEach, runDrain, 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 };
|
|
@@ -35,19 +35,19 @@ import {
|
|
|
35
35
|
isJsonObject,
|
|
36
36
|
isString2,
|
|
37
37
|
encodeUnknownJsonStringSync
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-b4td2pgc.js";
|
|
39
39
|
import {
|
|
40
40
|
currentTimeMillis,
|
|
41
|
-
|
|
41
|
+
make10,
|
|
42
42
|
runForEach,
|
|
43
43
|
toPull,
|
|
44
44
|
FileSystem,
|
|
45
45
|
compiled2
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-sasjamqz.js";
|
|
47
47
|
import {
|
|
48
48
|
ChildProcessSpawner,
|
|
49
49
|
make3
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-cs66re9p.js";
|
|
51
51
|
|
|
52
52
|
// packages/agent-runtime/src/opencode-store.ts
|
|
53
53
|
import { lstatSync, readFileSync, realpathSync, writeSync } from "fs";
|
|
@@ -266,7 +266,7 @@ var spawnReader = (request) => gen(function* () {
|
|
|
266
266
|
const spawner = yield* ChildProcessSpawner;
|
|
267
267
|
const [command, ...args] = opencodeReaderCommand();
|
|
268
268
|
return yield* spawner.spawn(make3(command, args, {
|
|
269
|
-
stdin:
|
|
269
|
+
stdin: make10(new TextEncoder().encode(request)),
|
|
270
270
|
stderr: "ignore",
|
|
271
271
|
extendEnv: false,
|
|
272
272
|
env: {},
|
|
@@ -1341,14 +1341,14 @@ Runners execute StepAttempts in user-controlled environments. A runner advertise
|
|
|
1341
1341
|
path: "runner-operations#release-channel",
|
|
1342
1342
|
level: 3,
|
|
1343
1343
|
link: "https://kitman.sh/knowledge/docs/runner-operations#release-channel",
|
|
1344
|
-
text: "### Release channel\n\nA Workspace's release channel decides which releases its Runners update themselves to:\n\n- `stable`, the default: only stable releases, such as `0.12.0`.\n- `next`: release candidates Kitman serves too, such as `0.12.0-rc.5`.\n\nA Runner on `stable` never installs a release candidate, even one Kitman serves: offered a release, or refused for its client protocol, it checks the release Kitman serves before installing it, keeps its own version while that is a candidate or a dev build, and checks again later. Dev builds are never installed this way on either channel. A Runner refused as it starts follows the channel its last heartbeat named, or `stable` when it never had one.\n\nKitman at kitman.sh runs only stable releases. A release candidate is published to npm under `next` and never deployed, so its Runners only ever receive stable releases, and `next` brings candidates to unpinned npm Kits. A control plane you run yourself and deploy a candidate to offers it to Runners on `next` only. A Workspace admin sets the channel in Settings \u2192 General \u2192 Release channel, with `kitman workspace channel next` or `kitman workspace channel stable`, or with the SDK's `updateWorkspace(workspaceId, { releaseChannel })`. Changing it offers each connected Runner the release it now makes due. The same channel decides what its unpinned npm Kits follow; see the [Kits guide](/docs/kits#release-channel).\n\nMoving back from `next` to `stable` never downgrades a Runner: one on a release candidate keeps running it until Kitman serves a stable release newer than it. The Runners page and `kitman runner status` show the channel each Runner follows.\n\nWhen a Kitman release raises the protocol its Runners speak, Kitman gives an older Runner no more work and shows it with the `update_required` Runner Problem. The Runner installs the release Kitman serves and restarts on it by itself. If the release still reads the older protocol's work calls, the Runner first lets its running work finish, for up to 30 minutes, and any Step still running then goes back to Kitman for another Runner. Otherwise its running Steps stop and go back to Kitman once their leases expire. A Runner in a container cannot update itself: it waits for its work the same way, then stops. Run it from an image with the release Kitman serves.\n\nSome work needs a Runner new enough to run its kind, such as a Release's deploy, a benchmark or resolving revisions. While no online Runner that serves such work can run it, its Run says so instead of its place in the queue, and names the Runners that serve it and the Kitman version each runs. Within a few minutes, busy or not, each such Runner's owner, or the Workspace admins for a shared one, is told once per piece of work, with how to update it. An agent Step that no online Runner serving it can launch, for want of its Harness or sandbox, or because the Runner takes no agent Steps, says so the same way.\n\nEvery Runner start updates herdr-core to its latest release within the same protocol generation, keeping your terminals running, so herdr-core follows each Kitman update. An update that cannot happen, such as on a machine that is offline or a herdr-core a package manager installed, leaves the Runner working on the herdr-core it has and shows the `update_failed` Runner Problem with its fix.\n\nA Runner without a herdr-core it can use shows the `herdr_core_missing` Runner Problem and stops:\n\n- herdr-core is not installed: run `curl -fsSL https://releases.herdr.dev/core/install.sh | sh`, then restart the Runner.\n- herdr-core lacks something Kitman needs: run `herdr-core update`, then restart the Runner.\n- herdr-core speaks a newer protocol generation than this Kitman: update Kitman."
|
|
1344
|
+
text: "### Release channel\n\nA Workspace's release channel decides which releases its Runners update themselves to:\n\n- `stable`, the default: only stable releases, such as `0.12.0`.\n- `next`: release candidates Kitman serves too, such as `0.12.0-rc.5`.\n\nA Runner on `stable` never installs a release candidate, even one Kitman serves: offered a release, or refused for its client protocol, it checks the release Kitman serves before installing it, keeps its own version while that is a candidate or a dev build, and checks again later. Dev builds are never installed this way on either channel. A Runner refused as it starts follows the channel its last heartbeat named, or `stable` when it never had one.\n\nKitman at kitman.sh runs only stable releases. A release candidate is published to npm under `next` and never deployed, so its Runners only ever receive stable releases, and `next` brings candidates to unpinned npm Kits. A control plane you run yourself and deploy a candidate to offers it to Runners on `next` only. A Workspace admin sets the channel in Settings \u2192 General \u2192 Release channel, with `kitman workspace channel next` or `kitman workspace channel stable`, or with the SDK's `updateWorkspace(workspaceId, { releaseChannel })`. Changing it offers each connected Runner the release it now makes due. The same channel decides what its unpinned npm Kits follow; see the [Kits guide](/docs/kits#release-channel).\n\nMoving back from `next` to `stable` never downgrades a Runner: one on a release candidate keeps running it until Kitman serves a stable release newer than it. The Runners page and `kitman runner status` show the channel each Runner follows.\n\nWhen a Kitman release raises the protocol its Runners speak, Kitman gives an older Runner no more work and shows it with the `update_required` Runner Problem. The Runner installs the release Kitman serves and restarts on it by itself. If the release still reads the older protocol's work calls, the Runner first lets its running work finish, for up to 30 minutes, and any Step still running then goes back to Kitman for another Runner. Otherwise its running Steps stop and go back to Kitman once their leases expire. A Runner in a container cannot update itself: it waits for its work the same way, then stops. Run it from an image with the release Kitman serves.\n\nA Run waiting on a forge pipeline, an approval or another Event holds no slot of your Runner, and takes one again once it has work to do. A queued Run shows its place in the queue and what is ahead of it; while every Runner that could run it has all its slots taken, it also says how many Runs hold them, such as \"the 8 slots of Runner \"mk-desktop\" are held by 5 Runs\". A queued Verification counts the same way when the Runners that could run it each run as many Verifications as their verification concurrency allows.\n\nSome work needs a Runner new enough to run its kind, such as a Release's deploy, a benchmark or resolving revisions. While no online Runner that serves such work can run it, its Run says so instead of its place in the queue, and names the Runners that serve it and the Kitman version each runs. Within a few minutes, busy or not, each such Runner's owner, or the Workspace admins for a shared one, is told once per piece of work, with how to update it. An agent Step that no online Runner serving it can launch, for want of its Harness or sandbox, or because the Runner takes no agent Steps, says so the same way.\n\nEvery Runner start updates herdr-core to its latest release within the same protocol generation, keeping your terminals running, so herdr-core follows each Kitman update. An update that cannot happen, such as on a machine that is offline or a herdr-core a package manager installed, leaves the Runner working on the herdr-core it has and shows the `update_failed` Runner Problem with its fix.\n\nA Runner without a herdr-core it can use shows the `herdr_core_missing` Runner Problem and stops:\n\n- herdr-core is not installed: run `curl -fsSL https://releases.herdr.dev/core/install.sh | sh`, then restart the Runner.\n- herdr-core lacks something Kitman needs: run `herdr-core update`, then restart the Runner.\n- herdr-core speaks a newer protocol generation than this Kitman: update Kitman."
|
|
1345
1345
|
},
|
|
1346
1346
|
{
|
|
1347
1347
|
title: "Runner Operations Guide \u203A Harnesses",
|
|
1348
1348
|
path: "runner-operations#harnesses",
|
|
1349
1349
|
level: 3,
|
|
1350
1350
|
link: "https://kitman.sh/knowledge/docs/runner-operations#harnesses",
|
|
1351
|
-
text: "### Harnesses\n\nWhen it starts, the Runner offers each of Pi, Claude Code, Codex and Antigravity that is installed and logged in:\n\n| Harness | Installed when | Logged in when |\n| ----------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| Pi | `pi` is on `PATH` | `~/.pi/agent/auth.json` exists, or `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY` or `OPENROUTER_API_KEY` is set |\n| Claude Code | `claude` is on `PATH` | `~/.claude/.credentials.json` exists, `~/.claude.json` records an `oauthAccount`, or `ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN` is set |\n| Codex | `codex` is on `PATH` | `~/.codex/auth.json` exists, or `OPENAI_API_KEY` or `CODEX_API_KEY` is set |\n| Antigravity | `agy` is on `PATH` | `~/.gemini/antigravity-cli/cache/onboarding.json` records a finished onboarding, which `agy` writes once you sign in with Google |\n\nFor each Harness it does not offer, the Runner reports what is missing, and the Runners tab under **Agents** and `kitman runner doctor` show it. After you install or log in to a Harness, restart the Runner's service so it is detected. OpenCode is never detected; an Agent that names it still launches it on a Runner that offers it.\n\nA Claude Code Step runs in Claude Code's experimental Code Mode: its agent writes JavaScript that calls its tools in one `REPL` call, instead of calling them one at a time. The Runner records Code Mode's caveats as accepted in the Step's `.claude.json`, so the Step never stops at its opt-in question. It starts Claude Code with `CLAUDE_CODE_SANDBOXED=1`, so Claude Code takes the Step's directory as trusted and never shows its folder trust prompt, even when another Claude Code session on the machine saves `~/.claude.json` over the trust the Runner recorded. If a Step still stops at that prompt, Kitman starts it again, twice at most. Code Mode turns Claude in Chrome off, so a Step whose Agent has the `browser` capability runs without it.\n\nAn Antigravity Step runs only in the `host` sandbox, because your Google login is in the OS keyring, which neither `srt` nor `docker` gives the agent. A Runner whose sandbox is `srt` or `docker` does not offer it, and says so. Antigravity keeps all its config under `~/.gemini` and has no setting that moves it, so a Step runs with its config directory as `HOME`. That home links to each entry of yours, such as `~/.gitconfig` and `~/.ssh`, except `~/.gemini` and `~/.agents`, and except one the Step writes itself, such as `~/kitman-skills` for the Kit skills its Agent does not list: the Step gets the Run's Kit setup in those, not your skills, plugins, MCP servers or rules. It gets a copy of the onboarding `agy` records, so it skips the first-run setup, and settings that trust the worktree, run commands outside Antigravity's own terminal sandbox and never wait for a person to review a plan. Its Transcript and tokens come from the conversation's `transcript_full.jsonl`. A retried attempt starts a new conversation, because the one `agy` resumes is a database the Runner does not carry between attempts."
|
|
1351
|
+
text: "### Harnesses\n\nWhen it starts, the Runner offers each of Pi, Claude Code, Codex and Antigravity that is installed and logged in:\n\n| Harness | Installed when | Logged in when |\n| ----------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| Pi | `pi` is on `PATH` | `~/.pi/agent/auth.json` exists, or `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY` or `OPENROUTER_API_KEY` is set |\n| Claude Code | `claude` is on `PATH` | `~/.claude/.credentials.json` exists, `~/.claude.json` records an `oauthAccount`, or `ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN` is set |\n| Codex | `codex` is on `PATH` | `~/.codex/auth.json` exists, or `OPENAI_API_KEY` or `CODEX_API_KEY` is set |\n| Antigravity | `agy` is on `PATH` | `~/.gemini/antigravity-cli/cache/onboarding.json` records a finished onboarding, which `agy` writes once you sign in with Google |\n\nFor each Harness it does not offer, the Runner reports what is missing, and the Runners tab under **Agents** and `kitman runner doctor` show it. After you install or log in to a Harness, restart the Runner's service so it is detected. OpenCode is never detected; an Agent that names it still launches it on a Runner that offers it.\n\nEach attempt of a Step runs in a directory of its own, a worktree or a scratch directory, so mise trusts no `mise.toml` in it. Where mise is installed beside the Harness, on your machine or in the `docker` image, the Runner starts the Harness with `MISE_TRUSTED_CONFIG_PATHS` set to the paths mise trusts there, from `trusted_config_paths` in its `config.toml` or that variable, with the attempt's directory added. The Runner asks `mise` on the Harness's `PATH` for that setting, or the mise that a shim of the Harness links to, as `mise activate --shims` sets up; where it finds neither, it adds the attempt's directory to the variable the Harness inherits. The variable replaces the setting, so the Runner carries it over, and a mise shim of the Harness, or of the tools the agent runs, does not stop to ask. mise reads the variable as a colon-separated list, so the Runner refuses a `KITMAN_HERDR_ROOT_DIR` with a colon in it, and leaves the variable as it is when a path mise trusts has one.\n\nIf a Harness reports no status within 120 s of its launch and its screen ends at a question or menu that waits for an answer, such as another tool's confirmation or a login choice, the Step fails with that prompt as its reason. The Runner neither holds the Harness nor starts the Step again, and the Step keeps its saved session, so a Retry after you answer the prompt on your machine, or set the tool up so that it does not ask, resumes it. A screen that ends at anything else is held and started again like any other launch that timed out.\n\nA Claude Code Step runs in Claude Code's experimental Code Mode: its agent writes JavaScript that calls its tools in one `REPL` call, instead of calling them one at a time. The Runner records Code Mode's caveats as accepted in the Step's `.claude.json`, so the Step never stops at its opt-in question. It starts Claude Code with `CLAUDE_CODE_SANDBOXED=1`, so Claude Code takes the Step's directory as trusted and never shows its folder trust prompt, even when another Claude Code session on the machine saves `~/.claude.json` over the trust the Runner recorded. If a Step still stops at that prompt, Kitman starts it again, twice at most. Code Mode turns Claude in Chrome off, so a Step whose Agent has the `browser` capability runs without it.\n\nAn Antigravity Step runs only in the `host` sandbox, because your Google login is in the OS keyring, which neither `srt` nor `docker` gives the agent. A Runner whose sandbox is `srt` or `docker` does not offer it, and says so. Antigravity keeps all its config under `~/.gemini` and has no setting that moves it, so a Step runs with its config directory as `HOME`. That home links to each entry of yours, such as `~/.gitconfig` and `~/.ssh`, except `~/.gemini` and `~/.agents`, and except one the Step writes itself, such as `~/kitman-skills` for the Kit skills its Agent does not list: the Step gets the Run's Kit setup in those, not your skills, plugins, MCP servers or rules. It gets a copy of the onboarding `agy` records, so it skips the first-run setup, and settings that trust the worktree, run commands outside Antigravity's own terminal sandbox and never wait for a person to review a plan. Its Transcript and tokens come from the conversation's `transcript_full.jsonl`. A retried attempt starts a new conversation, because the one `agy` resumes is a database the Runner does not carry between attempts."
|
|
1352
1352
|
},
|
|
1353
1353
|
{
|
|
1354
1354
|
title: "Runner Operations Guide \u203A Default Harness",
|
|
@@ -2211,7 +2211,7 @@ var pathOfLink = (link) => {
|
|
|
2211
2211
|
return page === null ? link : page[1] || "index";
|
|
2212
2212
|
};
|
|
2213
2213
|
var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
|
|
2214
|
-
var pinnedLink2 = (link, version = "0.
|
|
2214
|
+
var pinnedLink2 = (link, version = "0.41.0") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
|
|
2215
2215
|
var pageOf = (path) => path.split("#")[0];
|
|
2216
2216
|
var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
|
|
2217
2217
|
function excerpt(text, queryTerms) {
|
|
@@ -13,17 +13,17 @@ import {
|
|
|
13
13
|
isJsonObject,
|
|
14
14
|
decodeJsonString,
|
|
15
15
|
encodePrettyJsonString
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-b4td2pgc.js";
|
|
17
17
|
import {
|
|
18
18
|
FileSystem,
|
|
19
19
|
Path
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-sasjamqz.js";
|
|
21
21
|
import {
|
|
22
22
|
tomlTableHeader2,
|
|
23
23
|
tomlKeyPath2,
|
|
24
24
|
kitmanSkillEntry,
|
|
25
25
|
isPathWithin2
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-c8rck2r5.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-
|
|
35
|
-
import"./chunk-
|
|
36
|
-
import"./chunk-
|
|
37
|
-
import"./chunk-
|
|
34
|
+
} from "./chunk-f7qdzedh.js";
|
|
35
|
+
import"./chunk-qndcafax.js";
|
|
36
|
+
import"./chunk-p9ykk8h7.js";
|
|
37
|
+
import"./chunk-cs66re9p.js";
|
|
38
38
|
|
|
39
39
|
// packages/agent-runtime/src/kit-setup-sync.ts
|
|
40
40
|
class KitSyncError extends TaggedError("KitSyncError") {
|