@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
@@ -109,7 +109,20 @@ import {
109
109
  decodeJsonStringOption,
110
110
  encodeJsonStringSync,
111
111
  encodePrettyJsonString
112
- } from "./chunk-zb4t1yrt.js";
112
+ } from "./chunk-e4ced6vj.js";
113
+ import {
114
+ currentTimeMillis,
115
+ tap,
116
+ mapError,
117
+ decodeText,
118
+ run,
119
+ mkString,
120
+ FileSystem,
121
+ Path,
122
+ withDefault,
123
+ option,
124
+ String2
125
+ } from "./chunk-jz2b3htb.js";
113
126
  import {
114
127
  SecureRandom,
115
128
  layerWebCrypto,
@@ -174,7 +187,7 @@ import {
174
187
  digestSha256,
175
188
  sha256Hasher,
176
189
  raw,
177
- make5,
190
+ make4,
178
191
  get,
179
192
  put,
180
193
  HttpClient,
@@ -240,28 +253,15 @@ import {
240
253
  harnessNames,
241
254
  herdrRunnerCapabilities2,
242
255
  declaredChecks
243
- } from "./chunk-qsbq9gvr.js";
244
- import {
245
- currentTimeMillis,
246
- tap,
247
- mapError,
248
- decodeText,
249
- run,
250
- mkString,
251
- FileSystem,
252
- Path,
253
- withDefault,
254
- option,
255
- String2
256
- } from "./chunk-bj0zchck.js";
256
+ } from "./chunk-7eqzzcvj.js";
257
257
  import {
258
258
  ChildProcessSpawner,
259
- make3
260
- } from "./chunk-2nq80r46.js";
259
+ make2
260
+ } from "./chunk-z1d5jx6m.js";
261
261
  import {
262
262
  Id,
263
263
  Timestamp
264
- } from "./chunk-wxg9k10v.js";
264
+ } from "./chunk-xwte7af6.js";
265
265
 
266
266
  // apps/cli/src/cli-error.ts
267
267
  function cliErrorCode(error, status) {
@@ -1329,10 +1329,10 @@ var sandboxMissing = (sandbox, missing) => ({
1329
1329
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
1330
1330
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
1331
1331
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
1332
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-qjfzcrv5.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1332
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-xs1cdxfn.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1333
1333
  });
1334
1334
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
1335
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-qjfzcrv5.js")), (module) => module.updateHerdrCore(options))
1335
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-xs1cdxfn.js")), (module) => module.updateHerdrCore(options))
1336
1336
  });
1337
1337
  var herdrCoreMissing = (error) => {
1338
1338
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1799,7 +1799,7 @@ var syncTargets = (harness) => gen(function* () {
1799
1799
  });
1800
1800
  var syncKits = (input) => gen(function* () {
1801
1801
  const fs = yield* FileSystem;
1802
- const { syncKitSetup } = yield* promise(() => import("./chunk-axfp5tzk.js"));
1802
+ const { syncKitSetup } = yield* promise(() => import("./chunk-sygnhza2.js"));
1803
1803
  const harnesses = yield* syncTargets(input.harness);
1804
1804
  const chain = yield* input.client.getKitChain(input.workspaceId);
1805
1805
  for (const { name, problem } of chain.skipped)
@@ -1983,6 +1983,23 @@ function queryString(query) {
1983
1983
  var indent = (text, by) => text.split(`
1984
1984
  `).map((line) => line === "" ? "" : `${by}${line}`).join(`
1985
1985
  `);
1986
+ var terminalControl = /[\p{Cc}\u2028\u2029\u202A-\u202E\u2066-\u2069]/gu;
1987
+ var visible = (control) => `\\u{${control.codePointAt(0)?.toString(16)}}`;
1988
+ var valueLines = (value, by) => value.split(/\r\n|\r|\n/).map((line) => `${by}${line.replaceAll(terminalControl, visible)}`);
1989
+ var splitLines = (split) => [
1990
+ " Split would move these acceptance criteria to new Tasks",
1991
+ ...split.entries.flatMap((entry, index) => [
1992
+ ` New Task ${index + 1} of ${split.entries.length}`,
1993
+ " Title:",
1994
+ ...valueLines(entry.title, " "),
1995
+ " Promise:",
1996
+ ...valueLines(entry.promise, " "),
1997
+ ...entry.criteria.flatMap((criterion, at) => [
1998
+ ` Criterion ${at + 1} of ${entry.criteria.length}:`,
1999
+ ...valueLines(criterion, " ")
2000
+ ])
2001
+ ])
2002
+ ];
1986
2003
  var takesWords = (question) => question.freeText === true || !question.options?.length;
1987
2004
  var enterAnswer = (question) => {
1988
2005
  const { recommended, options } = question;
@@ -1997,6 +2014,7 @@ var questionLines = (question) => {
1997
2014
  return [
1998
2015
  `Question ${question.stepKey}:`,
1999
2016
  indent(question.prompt, " "),
2017
+ ...question.split === undefined ? [] : splitLines(question.split),
2000
2018
  ...options.flatMap((option, index) => {
2001
2019
  const description = question.optionDescriptions?.[option];
2002
2020
  const isRecommended = option === recommended;
@@ -2317,7 +2335,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
2317
2335
  run: (command, args) => runCommand2(command, args),
2318
2336
  attach: (command, args) => gen(function* () {
2319
2337
  const spawner = yield* ChildProcessSpawner;
2320
- const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
2338
+ const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
2321
2339
  const exitCode = yield* handle.exitCode;
2322
2340
  if (exitCode !== 0)
2323
2341
  return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
@@ -3295,7 +3313,7 @@ var shipped_steps_generated_default = {
3295
3313
  };
3296
3314
 
3297
3315
  // apps/cli/src/scaffold-files.ts
3298
- var cliVersion = "0.52.0";
3316
+ var cliVersion = "0.54.0";
3299
3317
  var shippedLoopSteps = new Map(Object.entries(shipped_steps_generated_default));
3300
3318
  var loopSteps = (loop) => shippedLoopSteps.get(loop) ?? [];
3301
3319
  var replacedStep = (loop) => loopSteps(loop).find((step) => step.from === defaultKitName && step.exported?.startsWith("steps.") === true);
@@ -3560,7 +3578,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
3560
3578
 
3561
3579
  // apps/cli/src/commands.ts
3562
3580
  var ClientId = "kitman-cli";
3563
- var agentRuntime = promise(() => import("./chunk-h5ydhdhx.js"));
3581
+ var agentRuntime = promise(() => import("./chunk-0my9yc76.js"));
3564
3582
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
3565
3583
  defaultValue: () => gen(function* () {
3566
3584
  const tui = yield* tryPromise({
@@ -5099,7 +5117,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
5099
5117
  });
5100
5118
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
5101
5119
  defaultValue: () => (options) => gen(function* () {
5102
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-9hde8p6b.js"));
5120
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-zs1maxqg.js"));
5103
5121
  return yield* makeRunnerRpcClient({
5104
5122
  runnerId: options.runnerId,
5105
5123
  bearer: options.bearer,
@@ -5711,7 +5729,7 @@ function mcpCommand(args) {
5711
5729
  if (command.action === "run") {
5712
5730
  if (command.args.length > 0)
5713
5731
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
5714
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-eqh0h088.js"));
5732
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-176b6p9g.js"));
5715
5733
  return yield* runMcpServerCommand({ flags: command.flags });
5716
5734
  }
5717
5735
  if (command.action !== "setup")
@@ -6211,7 +6229,7 @@ function programLoopCommand(command) {
6211
6229
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
6212
6230
  });
6213
6231
  }
6214
- var docsModule = promise(() => import("./chunk-84qb67e2.js"));
6232
+ var docsModule = promise(() => import("./chunk-wsm4adrn.js"));
6215
6233
  function docsCommand(args) {
6216
6234
  return gen(function* () {
6217
6235
  const command = parseCommand(args);
@@ -7222,7 +7240,7 @@ function changeRequestCommand(args) {
7222
7240
  yield* log(command.action === "approve" ? `Approved ${short} of ${changeRequest.title}. A Run waiting on approval of ${short} resumes; one waiting on another head does not.` : `Requested changes to ${short} of ${changeRequest.title}`);
7223
7241
  });
7224
7242
  }
7225
- var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-xbqd3kqc.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7243
+ var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-h52fkf0n.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7226
7244
  var loopOutline = (command) => gen(function* () {
7227
7245
  const path = yield* Path;
7228
7246
  const loop = requiredArg(command, "a Loop id");
@@ -7242,9 +7260,9 @@ var loopOutline = (command) => gen(function* () {
7242
7260
  `).pipe(mapError2((error) => new CliError({ message: error.message })));
7243
7261
  yield* log(`Wrote the outline of ${loop} to ${out}`);
7244
7262
  });
7245
- var KitWriter = map9(promise(() => import("./chunk-xbqd3kqc.js")), (build) => build.writeKit);
7263
+ var KitWriter = map9(promise(() => import("./chunk-h52fkf0n.js")), (build) => build.writeKit);
7246
7264
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
7247
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-xbqd3kqc.js")), (build) => build.buildKit(directory))
7265
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-h52fkf0n.js")), (build) => build.buildKit(directory))
7248
7266
  });
7249
7267
  var uploadKit = (client, workspaceId, built) => gen(function* () {
7250
7268
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -8023,7 +8041,7 @@ function downloadPresignedAsset(download, outputPath) {
8023
8041
  return gen(function* () {
8024
8042
  const fs = yield* FileSystem;
8025
8043
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
8026
- const response = yield* send(make5(download.method)(download.url), failed);
8044
+ const response = yield* send(make4(download.method)(download.url), failed);
8027
8045
  if (response.status < 200 || response.status >= 300)
8028
8046
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
8029
8047
  const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));