@kitman-sh/cli 0.7.1 → 0.7.2

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.
@@ -10,7 +10,7 @@ import {
10
10
  RunnerHeaders,
11
11
  RunnerRpcProtocolVersion,
12
12
  RunnerRpcs
13
- } from "./chunk-5rp5hvc0.js";
13
+ } from "./chunk-704ws2q7.js";
14
14
  import {
15
15
  WebSocketConstructor,
16
16
  layerWebSocketConstructorGlobal,
@@ -19,7 +19,7 @@ import {
19
19
  make5,
20
20
  withHeaders,
21
21
  layerProtocolSocket
22
- } from "./chunk-9bje6bm0.js";
22
+ } from "./chunk-dwgta18y.js";
23
23
 
24
24
  // packages/live/src/rpc/runner-client.ts
25
25
  var proxiedWebSocket = (proxy) => succeed4(WebSocketConstructor)((target) => {
@@ -121,7 +121,7 @@ import {
121
121
  isStreamSchema,
122
122
  getStreamSchemas,
123
123
  exitSchema
124
- } from "./chunk-5rp5hvc0.js";
124
+ } from "./chunk-704ws2q7.js";
125
125
 
126
126
  // node_modules/.bun/effect@4.0.4/node_modules/effect/dist/socket/Socket.js
127
127
  var TypeId = "~effect/socket/Socket";
@@ -31,7 +31,7 @@ import {
31
31
  Int,
32
32
  TaggedError2,
33
33
  Json
34
- } from "./chunk-5rp5hvc0.js";
34
+ } from "./chunk-704ws2q7.js";
35
35
  import {
36
36
  LoopOutcome,
37
37
  defineLoop,
@@ -67,7 +67,7 @@ import {
67
67
  mergeFindings,
68
68
  settleRound,
69
69
  rallyStop
70
- } from "./chunk-tkk2synn.js";
70
+ } from "./chunk-ztmwmk8t.js";
71
71
 
72
72
  // node_modules/.bun/effect@4.0.4/node_modules/effect/dist/workflow/DurableClock.js
73
73
  var TypeId = "~effect/workflow/DurableClock";
@@ -3,9 +3,9 @@ import {
3
3
  runnerWebSocketProtocol2,
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2
6
- } from "./chunk-23ch5vdv.js";
7
- import"./chunk-9bje6bm0.js";
8
- import"./chunk-5rp5hvc0.js";
6
+ } from "./chunk-ae7gx971.js";
7
+ import"./chunk-dwgta18y.js";
8
+ import"./chunk-704ws2q7.js";
9
9
  export {
10
10
  makeRunnerRpcClient2 as makeRunnerRpcClient,
11
11
  runnerRpcUrl2 as runnerRpcUrl,
@@ -21,7 +21,7 @@ import {
21
21
  FileSystem,
22
22
  Path,
23
23
  ChildProcessSpawner,
24
- make12,
24
+ make11,
25
25
  decodeUnknownEffect,
26
26
  decodeEffect,
27
27
  optionalKey,
@@ -41,14 +41,14 @@ import {
41
41
  KitAssignmentDeclaration,
42
42
  PackageDeclarations,
43
43
  RunnerRpcProtocolVersion
44
- } from "./chunk-5rp5hvc0.js";
45
- import"./chunk-9bje6bm0.js";
46
- import"./chunk-23ch5vdv.js";
47
- import"./chunk-tkk2synn.js";
44
+ } from "./chunk-704ws2q7.js";
45
+ import"./chunk-dwgta18y.js";
46
+ import"./chunk-ae7gx971.js";
47
+ import"./chunk-ztmwmk8t.js";
48
48
  import {
49
49
  describeFlag,
50
50
  Described
51
- } from "./chunk-2vcae278.js";
51
+ } from "./chunk-6kdj8psf.js";
52
52
 
53
53
  // packages/sdk/src/build/index.ts
54
54
  class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {
@@ -96,7 +96,7 @@ var ConfigKits = Record(String2, Union([
96
96
  ]));
97
97
  var run = (command, args, cwd) => gen(function* () {
98
98
  const spawner = yield* ChildProcessSpawner;
99
- const handle = yield* spawner.spawn(make12(command, args, { cwd, stdin: "ignore" }));
99
+ const handle = yield* spawner.spawn(make11(command, args, { cwd, stdin: "ignore" }));
100
100
  const [stdout, stderr, exitCode] = yield* all([
101
101
  mkString(decodeText(handle.stdout)),
102
102
  mkString(decodeText(handle.stderr)),
@@ -107,7 +107,7 @@ import {
107
107
  interrupt3,
108
108
  makeUnsafe3,
109
109
  makeUnsafe4,
110
- make10,
110
+ make9,
111
111
  map4,
112
112
  filter,
113
113
  decodeText,
@@ -116,7 +116,7 @@ import {
116
116
  FileSystem,
117
117
  Path,
118
118
  ChildProcessSpawner,
119
- make12,
119
+ make11,
120
120
  Crypto,
121
121
  value,
122
122
  is,
@@ -161,7 +161,7 @@ import {
161
161
  herdrRunnerCapabilitiesForRepoBinding2,
162
162
  herdrRunnerCapabilities2,
163
163
  assertHerdrRunnerCapability2
164
- } from "./chunk-5rp5hvc0.js";
164
+ } from "./chunk-704ws2q7.js";
165
165
  import {
166
166
  make4,
167
167
  readerString,
@@ -172,17 +172,17 @@ import {
172
172
  SocketUpgradeError,
173
173
  SocketCloseError,
174
174
  SocketError
175
- } from "./chunk-9bje6bm0.js";
176
- import"./chunk-tkk2synn.js";
175
+ } from "./chunk-dwgta18y.js";
176
+ import"./chunk-ztmwmk8t.js";
177
177
  import {
178
178
  programLease,
179
179
  programHostsEnv,
180
180
  undeclaredHostsEnv
181
- } from "./chunk-2vcae278.js";
182
- import"./chunk-23ch5vdv.js";
181
+ } from "./chunk-6kdj8psf.js";
182
+ import"./chunk-ae7gx971.js";
183
183
  import {
184
184
  nextInt
185
- } from "./chunk-1d2e4je3.js";
185
+ } from "./chunk-6f4anyec.js";
186
186
 
187
187
  // packages/core/src/runner-trust.ts
188
188
  import { createHash } from "crypto";
@@ -2494,7 +2494,7 @@ var temporaryDirectory = map3(optionalEnv("TMPDIR"), (tmp) => tmp ?? "/tmp");
2494
2494
  var spawnServer = (input) => gen(function* () {
2495
2495
  const spawner = yield* ChildProcessSpawner;
2496
2496
  const scope = yield* make6();
2497
- const handle = yield* spawner.spawn(make12(input.command, [...input.args], {
2497
+ const handle = yield* spawner.spawn(make11(input.command, [...input.args], {
2498
2498
  env: { HERDR_SOCKET_PATH: input.socketPath },
2499
2499
  extendEnv: true,
2500
2500
  detached: true,
@@ -4451,10 +4451,10 @@ var handshake = [
4451
4451
  `).join("");
4452
4452
  var kitmanMcpPreflight = (mcp) => gen(function* () {
4453
4453
  const spawner = yield* ChildProcessSpawner;
4454
- const server = yield* spawner.spawn(make12(mcp.command, [...mcp.args], {
4454
+ const server = yield* spawner.spawn(make11(mcp.command, [...mcp.args], {
4455
4455
  extendEnv: true,
4456
4456
  env: mcp.env,
4457
- stdin: { stream: make10(new TextEncoder().encode(handshake)), endOnDone: false },
4457
+ stdin: { stream: make9(new TextEncoder().encode(handshake)), endOnDone: false },
4458
4458
  stderr: "ignore"
4459
4459
  }));
4460
4460
  const reply = yield* server.stdout.pipe(decodeText, splitLines, map4((line) => recordValue(getOrUndefined(decodeJsonStringOption(line)))), filter((message) => message?.id === 2), runHead);
@@ -4526,8 +4526,8 @@ var programProcessExecutor = (input) => (work) => gen(function* () {
4526
4526
  };
4527
4527
  const exitCode = sandbox === undefined ? yield* gen(function* () {
4528
4528
  const spawner = yield* ChildProcessSpawner;
4529
- const handle = yield* spawner.spawn(make12(input.bun ?? process.execPath, [file], {
4530
- stdin: make10(new TextEncoder().encode(stdin)),
4529
+ const handle = yield* spawner.spawn(make11(input.bun ?? process.execPath, [file], {
4530
+ stdin: make9(new TextEncoder().encode(stdin)),
4531
4531
  stdout: "inherit",
4532
4532
  stderr: "inherit",
4533
4533
  extendEnv: false,
@@ -100,7 +100,7 @@ import {
100
100
  toCodecJson,
101
101
  Json,
102
102
  LoopCapabilities
103
- } from "./chunk-5rp5hvc0.js";
103
+ } from "./chunk-704ws2q7.js";
104
104
 
105
105
  // packages/sdk/src/loop/define.ts
106
106
  var LoopOutcome = Literals(["feature", "bug", "refactor", "investigation", "docs", "migration"]);
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
3
  import {
4
+ pipeArguments,
4
5
  identity,
5
6
  isUndefined,
6
7
  isNotUndefined,
@@ -19,8 +20,12 @@ import {
19
20
  fromUndefinedOr,
20
21
  getOrUndefined,
21
22
  Service,
23
+ add,
24
+ get,
22
25
  Reference,
23
26
  of,
27
+ fromInputUnsafe,
28
+ isFinite,
24
29
  toMillis,
25
30
  TaggedError,
26
31
  squash,
@@ -29,12 +34,19 @@ import {
29
34
  UnknownError,
30
35
  succeed2,
31
36
  fail2,
37
+ void_,
38
+ isSuccess2,
39
+ isFailure2,
32
40
  makeUnsafe,
33
41
  _await,
34
42
  isDone,
35
43
  isDoneUnsafe,
36
44
  doneUnsafe,
45
+ Scope,
46
+ makeUnsafe2,
47
+ addFinalizerExit,
37
48
  addFinalizer,
49
+ close,
38
50
  succeed4,
39
51
  effect,
40
52
  mergeAll,
@@ -54,6 +66,7 @@ import {
54
66
  gen,
55
67
  fail4,
56
68
  try_,
69
+ withFiber,
57
70
  flatMap,
58
71
  andThen,
59
72
  tap,
@@ -73,19 +86,28 @@ import {
73
86
  provide3,
74
87
  provideContext,
75
88
  provideService,
89
+ scope,
76
90
  scoped,
77
91
  acquireRelease,
78
92
  addFinalizer2,
79
93
  ensuring,
94
+ onExit,
95
+ interrupt2,
80
96
  uninterruptible,
97
+ uninterruptibleMask,
81
98
  forever,
82
99
  forkScoped,
100
+ runForkWith,
83
101
  fnUntraced,
84
102
  logWarning,
85
103
  logError,
86
104
  runMain,
87
105
  systemError,
88
106
  badArgument,
107
+ join,
108
+ interrupt3,
109
+ getCurrent,
110
+ runIn,
89
111
  makeUnsafe3,
90
112
  make7,
91
113
  make8,
@@ -98,8 +120,6 @@ import {
98
120
  isSink,
99
121
  fromChannel,
100
122
  drain,
101
- make9,
102
- get2,
103
123
  isStream,
104
124
  fromChannel2,
105
125
  empty2,
@@ -115,9 +135,9 @@ import {
115
135
  ExitCode,
116
136
  ProcessId,
117
137
  makeHandle,
118
- make11,
138
+ make10,
119
139
  ChildProcessSpawner,
120
- make12,
140
+ make11,
121
141
  parseFdName,
122
142
  fdName,
123
143
  handleErrnoException,
@@ -183,8 +203,8 @@ import {
183
203
  agentCredentialForApi,
184
204
  storeAgentCredential,
185
205
  raw,
186
- make13,
187
- get3,
206
+ make12,
207
+ get2,
188
208
  put,
189
209
  execute,
190
210
  Fetch,
@@ -207,7 +227,146 @@ import {
207
227
  runCommand2,
208
228
  detectHarnesses2,
209
229
  herdrRunnerCapabilities2
210
- } from "./chunk-5rp5hvc0.js";
230
+ } from "./chunk-704ws2q7.js";
231
+
232
+ // node_modules/.bun/effect@4.0.4/node_modules/effect/dist/internal/rcRef.js
233
+ var TypeId = "~effect/RcRef";
234
+ var stateEmpty = {
235
+ _tag: "Empty"
236
+ };
237
+ var stateClosed = {
238
+ _tag: "Closed"
239
+ };
240
+ var variance = {
241
+ _A: identity,
242
+ _E: identity
243
+ };
244
+
245
+ class RcRefImpl {
246
+ [TypeId] = variance;
247
+ pipe() {
248
+ return pipeArguments(this, arguments);
249
+ }
250
+ state = stateEmpty;
251
+ acquire;
252
+ context;
253
+ scope;
254
+ idleTimeToLive;
255
+ constructor(acquire, context, scope, idleTimeToLive) {
256
+ this.acquire = acquire;
257
+ this.context = context;
258
+ this.scope = scope;
259
+ this.idleTimeToLive = idleTimeToLive;
260
+ }
261
+ }
262
+ var make = (options) => withFiber((fiber) => {
263
+ const context = fiber.context;
264
+ const scope = get(context, Scope);
265
+ const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
266
+ return as(addFinalizerExit(scope, () => {
267
+ const state = ref.state;
268
+ ref.state = stateClosed;
269
+ if (state._tag === "Acquired")
270
+ return close(state.scope, void_);
271
+ if (state._tag === "Acquiring")
272
+ return interrupt3(state.fiber);
273
+ return void_2;
274
+ }), ref);
275
+ });
276
+ var getState = (self, restore) => {
277
+ switch (self.state._tag) {
278
+ case "Closed": {
279
+ return interrupt2;
280
+ }
281
+ case "Acquired": {
282
+ const state = self.state;
283
+ state.refCount++;
284
+ return state.fiber ? as(interrupt3(state.fiber), state) : succeed5(state);
285
+ }
286
+ case "Acquiring": {
287
+ const state = self.state;
288
+ state.awaiters++;
289
+ return awaitAcquiring(self, state, restore);
290
+ }
291
+ case "Empty": {
292
+ const acquiring = {
293
+ _tag: "Acquiring",
294
+ fiber: undefined,
295
+ awaiters: 1,
296
+ acquired: undefined
297
+ };
298
+ self.state = acquiring;
299
+ const scope = makeUnsafe2();
300
+ const acquire = provideContext(self.acquire, add(self.context, Scope, scope)).pipe(flatMap((value) => {
301
+ if (self.state !== acquiring) {
302
+ return interrupt2;
303
+ }
304
+ const state = {
305
+ _tag: "Acquired",
306
+ value,
307
+ scope,
308
+ fiber: undefined,
309
+ refCount: acquiring.awaiters,
310
+ invalidated: false
311
+ };
312
+ self.state = state;
313
+ acquiring.acquired = state;
314
+ return succeed5(state);
315
+ }), onExit((exit) => {
316
+ if (isSuccess2(exit))
317
+ return void_2;
318
+ if (self.state === acquiring)
319
+ self.state = stateEmpty;
320
+ return close(scope, exit);
321
+ }));
322
+ acquiring.fiber = runForkWith(getCurrent().context)(acquire);
323
+ return awaitAcquiring(self, acquiring, restore);
324
+ }
325
+ }
326
+ };
327
+ var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
328
+ const acquired = acquiring.acquired;
329
+ if (acquired !== undefined) {
330
+ return isFailure2(exit) ? release(self, acquired) : void_2;
331
+ }
332
+ if (--acquiring.awaiters > 0 || self.state !== acquiring)
333
+ return void_2;
334
+ self.state = stateEmpty;
335
+ return interrupt3(acquiring.fiber);
336
+ });
337
+ var get3 = (self_) => {
338
+ const self = self_;
339
+ return uninterruptibleMask((restore) => flatMap(scope, (scope) => flatMap(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
340
+ };
341
+ var release = (self, state) => {
342
+ state.refCount--;
343
+ if (state.refCount > 0) {
344
+ return void_2;
345
+ }
346
+ const idleTimeToLive = self.idleTimeToLive;
347
+ if (idleTimeToLive === undefined || state.invalidated) {
348
+ if (self.state === state) {
349
+ self.state = stateEmpty;
350
+ }
351
+ return close(state.scope, void_);
352
+ } else if (!isFinite(idleTimeToLive)) {
353
+ return void_2;
354
+ }
355
+ state.fiber = uninterruptibleMask((restore) => flatMap(restore(sleep(idleTimeToLive)), () => {
356
+ if (self.state === state && state.refCount === 0) {
357
+ self.state = stateEmpty;
358
+ return close(state.scope, void_);
359
+ }
360
+ return void_2;
361
+ })).pipe(ensuring(sync(() => {
362
+ state.fiber = undefined;
363
+ })), runForkWith(self.context), runIn(self.scope));
364
+ return void_2;
365
+ };
366
+
367
+ // node_modules/.bun/effect@4.0.4/node_modules/effect/dist/RcRef.js
368
+ var make2 = make;
369
+ var get4 = get3;
211
370
 
212
371
  // node_modules/.bun/@effect+platform-node-shared@4.0.4+b8cbb99ebc524863/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
213
372
  import * as NodeChildProcess from "child_process";
@@ -385,7 +544,7 @@ var taskkill = (childProcess, onExit = () => {}) => {
385
544
  windowsHide: true
386
545
  }, onExit);
387
546
  };
388
- var make = /* @__PURE__ */ gen(function* () {
547
+ var make3 = /* @__PURE__ */ gen(function* () {
389
548
  const fs = yield* FileSystem;
390
549
  const path = yield* Path;
391
550
  const resolveWorkingDirectory = fnUntraced(function* (options) {
@@ -787,7 +946,7 @@ var make = /* @__PURE__ */ gen(function* () {
787
946
  const sourceStream = unwrap(succeed5(getSourceStream(handles[handles.length - 1], options.from)));
788
947
  const toOption = options.to ?? "stdin";
789
948
  if (toOption === "stdin") {
790
- handles.push(yield* spawnCommand(make12(command.command, command.args, {
949
+ handles.push(yield* spawnCommand(make11(command.command, command.args, {
791
950
  ...command.options,
792
951
  stdin: {
793
952
  ...stdinConfig,
@@ -799,7 +958,7 @@ var make = /* @__PURE__ */ gen(function* () {
799
958
  if (isNotUndefined(fd)) {
800
959
  const fdName2 = fdName(fd);
801
960
  const existingFds = command.options.additionalFds ?? {};
802
- handles.push(yield* spawnCommand(make12(command.command, command.args, {
961
+ handles.push(yield* spawnCommand(make11(command.command, command.args, {
803
962
  ...command.options,
804
963
  additionalFds: {
805
964
  ...existingFds,
@@ -810,7 +969,7 @@ var make = /* @__PURE__ */ gen(function* () {
810
969
  }
811
970
  })));
812
971
  } else {
813
- handles.push(yield* spawnCommand(make12(command.command, command.args, {
972
+ handles.push(yield* spawnCommand(make11(command.command, command.args, {
814
973
  ...command.options,
815
974
  stdin: {
816
975
  ...stdinConfig,
@@ -849,9 +1008,9 @@ var make = /* @__PURE__ */ gen(function* () {
849
1008
  }
850
1009
  }
851
1010
  });
852
- return make11(spawnCommand);
1011
+ return make10(spawnCommand);
853
1012
  });
854
- var layer5 = /* @__PURE__ */ effect(ChildProcessSpawner, make);
1013
+ var layer5 = /* @__PURE__ */ effect(ChildProcessSpawner, make3);
855
1014
  var flattenCommand = (command) => {
856
1015
  const commands = [];
857
1016
  const pipeOptions = [];
@@ -882,10 +1041,10 @@ var flattenCommand = (command) => {
882
1041
  };
883
1042
 
884
1043
  // node_modules/.bun/effect@4.0.4/node_modules/effect/dist/Stdio.js
885
- var TypeId = "~effect/Stdio";
886
- var Stdio = /* @__PURE__ */ Service(TypeId);
887
- var make2 = (options) => ({
888
- [TypeId]: TypeId,
1044
+ var TypeId2 = "~effect/Stdio";
1045
+ var Stdio = /* @__PURE__ */ Service(TypeId2);
1046
+ var make4 = (options) => ({
1047
+ [TypeId2]: TypeId2,
889
1048
  stdinIsTerminal: succeed5(false),
890
1049
  stdoutIsTerminal: succeed5(false),
891
1050
  stderrIsTerminal: succeed5(false),
@@ -893,7 +1052,7 @@ var make2 = (options) => ({
893
1052
  });
894
1053
 
895
1054
  // node_modules/.bun/@effect+platform-node-shared@4.0.4+b8cbb99ebc524863/node_modules/@effect/platform-node-shared/dist/NodeStdio.js
896
- var layer6 = /* @__PURE__ */ succeed4(Stdio, /* @__PURE__ */ make2({
1055
+ var layer6 = /* @__PURE__ */ succeed4(Stdio, /* @__PURE__ */ make4({
897
1056
  args: /* @__PURE__ */ sync(() => process.argv.slice(2)),
898
1057
  stdinIsTerminal: /* @__PURE__ */ sync(() => process.stdin.isTTY === true),
899
1058
  stdoutIsTerminal: /* @__PURE__ */ sync(() => process.stdout.isTTY === true),
@@ -934,7 +1093,7 @@ var layer6 = /* @__PURE__ */ succeed4(Stdio, /* @__PURE__ */ make2({
934
1093
  var layer7 = layer6;
935
1094
 
936
1095
  // node_modules/.bun/effect@4.0.4/node_modules/effect/dist/Terminal.js
937
- var TypeId2 = "~effect/Terminal";
1096
+ var TypeId3 = "~effect/Terminal";
938
1097
  var QuitErrorTypeId = "~effect/Terminal/QuitError";
939
1098
 
940
1099
  class QuitError extends (/* @__PURE__ */ Error2("QuitError")({
@@ -943,14 +1102,14 @@ class QuitError extends (/* @__PURE__ */ Error2("QuitError")({
943
1102
  [QuitErrorTypeId] = QuitErrorTypeId;
944
1103
  }
945
1104
  var Terminal = /* @__PURE__ */ Service("effect/Terminal");
946
- var make3 = (impl) => Terminal.of({
1105
+ var make5 = (impl) => Terminal.of({
947
1106
  ...impl,
948
- [TypeId2]: TypeId2
1107
+ [TypeId3]: TypeId3
949
1108
  });
950
1109
 
951
1110
  // node_modules/.bun/@effect+platform-node-shared@4.0.4+b8cbb99ebc524863/node_modules/@effect/platform-node-shared/dist/NodeTerminal.js
952
1111
  import * as readline from "readline";
953
- var make4 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
1112
+ var make6 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
954
1113
  const stdin = process.stdin;
955
1114
  const stdout = process.stdout;
956
1115
  const lines = yield* make8();
@@ -964,7 +1123,7 @@ var make4 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit
964
1123
  };
965
1124
  stdin.once("end", onStdinEnd);
966
1125
  yield* addFinalizer2(() => sync(() => stdin.off("end", onStdinEnd)));
967
- const rlRef = yield* make9({
1126
+ const rlRef = yield* make2({
968
1127
  acquire: acquireRelease(sync(() => {
969
1128
  const rl = readline.createInterface({
970
1129
  input: stdin,
@@ -1038,13 +1197,13 @@ var make4 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit
1038
1197
  if (inputEnded) {
1039
1198
  handleEnd();
1040
1199
  } else {
1041
- yield* get2(rlRef);
1200
+ yield* get4(rlRef);
1042
1201
  stdin.once("end", handleEnd);
1043
1202
  }
1044
1203
  return queue;
1045
1204
  });
1046
1205
  const readLine = suspend(() => poll(lines).pipe(flatMap(match({
1047
- onNone: () => scoped(andThen(get2(rlRef), take(lines))),
1206
+ onNone: () => scoped(andThen(get4(rlRef), take(lines))),
1048
1207
  onSome: succeed5
1049
1208
  })), mapError(() => new QuitError({}))));
1050
1209
  const display = (prompt2) => uninterruptible(callback((resume) => {
@@ -1055,7 +1214,7 @@ var make4 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit
1055
1214
  cause: err
1056
1215
  }))));
1057
1216
  }));
1058
- return make3({
1217
+ return make5({
1059
1218
  columns,
1060
1219
  rows,
1061
1220
  readInput,
@@ -1063,7 +1222,7 @@ var make4 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit
1063
1222
  display
1064
1223
  });
1065
1224
  });
1066
- var layer8 = /* @__PURE__ */ effect(Terminal, /* @__PURE__ */ make4(defaultShouldQuit));
1225
+ var layer8 = /* @__PURE__ */ effect(Terminal, /* @__PURE__ */ make6(defaultShouldQuit));
1067
1226
  function defaultShouldQuit(input) {
1068
1227
  const key = input.key;
1069
1228
  return key.name === "escape" || key.ctrl && (key.name === "c" || key.name === "d");
@@ -1770,7 +1929,7 @@ var package_default = {
1770
1929
  };
1771
1930
 
1772
1931
  // apps/cli/src/scaffold.ts
1773
- var cliVersion = "0.7.1";
1932
+ var cliVersion = "0.7.2";
1774
1933
  var packageJson = (name, scaffold) => `${JSON.stringify({
1775
1934
  name,
1776
1935
  private: true,
@@ -1890,7 +2049,7 @@ var scaffoldPackage = (directory, scaffold = {}) => gen(function* () {
1890
2049
  const path = yield* Path;
1891
2050
  const root = path.resolve(directory);
1892
2051
  if (scaffold.fork !== undefined) {
1893
- const { shippedLoops } = yield* promise(() => import("./chunk-gj8pz39x.js"));
2052
+ const { shippedLoops } = yield* promise(() => import("./chunk-epdajq63.js"));
1894
2053
  if (!(scaffold.fork in shippedLoops))
1895
2054
  return yield* new CliError({
1896
2055
  message: `Kitman ships no Loop ${scaffold.fork}; fork one of ${Object.keys(shippedLoops).join(", ")}`
@@ -1984,7 +2143,7 @@ var Usage = [
1984
2143
  `);
1985
2144
  var KitCreateValidator = guard(KitCreate);
1986
2145
  var KitUpdateValidator = guard(KitUpdate);
1987
- var agentRuntime = promise(() => import("./chunk-f1f60hgt.js"));
2146
+ var agentRuntime = promise(() => import("./chunk-vjnae06n.js"));
1988
2147
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
1989
2148
  defaultValue: () => gen(function* () {
1990
2149
  const tui = yield* tryPromise({
@@ -3290,7 +3449,7 @@ function startCanonicalHerdrRunnerCommand(input) {
3290
3449
  superviseReplica,
3291
3450
  verificationExecutor
3292
3451
  } = yield* agentRuntime;
3293
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-mx1x1b6a.js"));
3452
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-gzhxsb25.js"));
3294
3453
  const settings = yield* runnerSettings;
3295
3454
  const { concurrency, fullAccess, sshAgentAvailable } = settings;
3296
3455
  const personal = input.runner.ownership.kind === "personal";
@@ -3508,7 +3667,7 @@ function mcpCommand(args) {
3508
3667
  if (command.action === "run") {
3509
3668
  if (command.args.length > 0)
3510
3669
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
3511
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-eynqc0vm.js"));
3670
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-226sychh.js"));
3512
3671
  return yield* runMcpServerCommand({ flags: command.flags });
3513
3672
  }
3514
3673
  if (command.action !== "setup")
@@ -4528,7 +4687,7 @@ function secretCommand(args) {
4528
4687
  });
4529
4688
  }
4530
4689
  var PackageBuilder = Reference("kitman/cli/PackageBuilder", {
4531
- defaultValue: () => (directory) => flatMap(promise(() => import("./chunk-50w9z6we.js")), (build) => build.buildPackage(directory))
4690
+ defaultValue: () => (directory) => flatMap(promise(() => import("./chunk-hrd7xmax.js")), (build) => build.buildPackage(directory))
4532
4691
  });
4533
4692
  var optionalEnv = (name) => String3(name).pipe(option2, map3(getOrUndefined));
4534
4693
  var ciIdToken = (apiUrl) => gen(function* () {
@@ -4542,7 +4701,7 @@ var ciIdToken = (apiUrl) => gen(function* () {
4542
4701
  const url = new URL(requestUrl);
4543
4702
  const refused = (reason) => new CliError({ message: `GitHub Actions issued no ID token: ${reason}` });
4544
4703
  url.searchParams.set("audience", apiUrl.replace(/\/+$/, ""));
4545
- const response = yield* send(get3(url, { headers: { authorization: `Bearer ${requestToken}` } }), (cause) => refused(String(cause)));
4704
+ const response = yield* send(get2(url, { headers: { authorization: `Bearer ${requestToken}` } }), (cause) => refused(String(cause)));
4546
4705
  if (response.status < 200 || response.status >= 300)
4547
4706
  return yield* refused(`${response.status}; does the job have id-token: write?`);
4548
4707
  const body = yield* response.text.pipe(mapError((error) => refused(error.message)));
@@ -5429,7 +5588,7 @@ function downloadPresignedAsset(download, outputPath) {
5429
5588
  return gen(function* () {
5430
5589
  const fs = yield* FileSystem;
5431
5590
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
5432
- const response = yield* send(make13(download.method)(download.url), failed);
5591
+ const response = yield* send(make12(download.method)(download.url), failed);
5433
5592
  if (response.status < 200 || response.status >= 300)
5434
5593
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
5435
5594
  const body = yield* response.arrayBuffer.pipe(mapError((error) => failed(error.message)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitman-sh/cli",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {