@kitman-sh/cli 0.15.1 → 0.16.1

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-zy4sv70r.js → chunk-1r026thg.js} +6 -6
  2. package/dist/{chunk-69xka6ew.js → chunk-3b198ntn.js} +1 -1
  3. package/dist/{chunk-91tmbf95.js → chunk-4yjcehqr.js} +17 -17
  4. package/dist/{chunk-6h70kent.js → chunk-5s4sgrak.js} +7 -7
  5. package/dist/{chunk-wh4bpc4w.js → chunk-8f632x21.js} +4 -4
  6. package/dist/{chunk-tgt9a3yz.js → chunk-9qfyb5r2.js} +6 -6
  7. package/dist/{chunk-fggwdr03.js → chunk-b0b9v7t9.js} +17 -17
  8. package/dist/{chunk-60fhzjx3.js → chunk-bcqqrwsk.js} +114 -26
  9. package/dist/{chunk-vg78dz3w.js → chunk-bkteq6b3.js} +28 -177
  10. package/dist/{chunk-fzaecdgv.js → chunk-djdhep8n.js} +3 -3
  11. package/dist/{chunk-f36s9s1g.js → chunk-dxfab1aj.js} +273 -113
  12. package/dist/{chunk-dv4v0tbn.js → chunk-e42hjb3j.js} +33 -29
  13. package/dist/{chunk-xx711t5r.js → chunk-eavx040m.js} +4 -4
  14. package/dist/{chunk-csxxwscf.js → chunk-f2y0z04q.js} +1 -1
  15. package/dist/{chunk-kskb0hkb.js → chunk-ft3gnwd1.js} +3 -3
  16. package/dist/{chunk-k2wd9r6t.js → chunk-g1f0cjqe.js} +2 -2
  17. package/dist/{chunk-3ns4sbfb.js → chunk-gwzzacep.js} +1 -1
  18. package/dist/{chunk-d40233pm.js → chunk-hwqecp0m.js} +8 -8
  19. package/dist/{chunk-dx792s4w.js → chunk-rfnasm3c.js} +61 -61
  20. package/dist/{chunk-8wpg3rph.js → chunk-scwj3w7m.js} +2 -2
  21. package/dist/{chunk-0ws25xvg.js → chunk-sd8b4k1t.js} +2 -2
  22. package/dist/{chunk-2vxb3q01.js → chunk-tc7td60t.js} +1 -1
  23. package/dist/{chunk-ygx2pda7.js → chunk-tx7et9g7.js} +4 -4
  24. package/dist/{chunk-5hkdgzh4.js → chunk-x83q18w0.js} +1 -1
  25. package/dist/{chunk-39ykbhq8.js → chunk-xy3hcdhr.js} +5 -5
  26. package/dist/{chunk-xrjt25ns.js → chunk-yja59yh8.js} +10 -10
  27. package/dist/index.js +4 -4
  28. package/package.json +1 -1
@@ -12,7 +12,7 @@ import {
12
12
  succeed,
13
13
  isSuccess,
14
14
  TaggedError,
15
- make16,
15
+ make15,
16
16
  _await,
17
17
  fail5,
18
18
  succeed5,
@@ -108,19 +108,7 @@ import {
108
108
  decodeJsonStringOption,
109
109
  encodeJsonStringSync,
110
110
  encodePrettyJsonString
111
- } from "./chunk-dx792s4w.js";
112
- import {
113
- tap,
114
- mapError,
115
- decodeText,
116
- run,
117
- mkString,
118
- FileSystem,
119
- Path,
120
- withDefault,
121
- option,
122
- String2
123
- } from "./chunk-vg78dz3w.js";
111
+ } from "./chunk-rfnasm3c.js";
124
112
  import {
125
113
  currentTimeMillis,
126
114
  SecureRandom,
@@ -251,15 +239,27 @@ import {
251
239
  harnessNames,
252
240
  herdrRunnerCapabilities2,
253
241
  declaredChecks
254
- } from "./chunk-f36s9s1g.js";
242
+ } from "./chunk-dxfab1aj.js";
243
+ import {
244
+ tap,
245
+ mapError,
246
+ decodeText,
247
+ run,
248
+ mkString,
249
+ FileSystem,
250
+ Path,
251
+ withDefault,
252
+ option,
253
+ String2
254
+ } from "./chunk-bkteq6b3.js";
255
255
  import {
256
256
  ChildProcessSpawner,
257
257
  make3
258
- } from "./chunk-k2wd9r6t.js";
258
+ } from "./chunk-g1f0cjqe.js";
259
259
  import {
260
260
  Id,
261
261
  Timestamp
262
- } from "./chunk-5hkdgzh4.js";
262
+ } from "./chunk-x83q18w0.js";
263
263
 
264
264
  // apps/cli/src/cli-error.ts
265
265
  function cliErrorCode(error, status) {
@@ -1326,10 +1326,10 @@ var sandboxMissing = (sandbox, missing) => ({
1326
1326
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
1327
1327
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
1328
1328
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
1329
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-wh4bpc4w.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1329
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-8f632x21.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1330
1330
  });
1331
1331
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
1332
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-wh4bpc4w.js")), (module) => module.updateHerdrCore(options))
1332
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-8f632x21.js")), (module) => module.updateHerdrCore(options))
1333
1333
  });
1334
1334
  var herdrCoreMissing = (error) => {
1335
1335
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1773,7 +1773,7 @@ var syncTargets = (harness) => gen(function* () {
1773
1773
  });
1774
1774
  var syncKits = (input) => gen(function* () {
1775
1775
  const fs = yield* FileSystem;
1776
- const { syncKitSetup } = yield* promise(() => import("./chunk-6h70kent.js"));
1776
+ const { syncKitSetup } = yield* promise(() => import("./chunk-5s4sgrak.js"));
1777
1777
  const harnesses = yield* syncTargets(input.harness);
1778
1778
  const chain = yield* input.client.getKitChain(input.workspaceId);
1779
1779
  for (const { name, problem } of chain.skipped)
@@ -3268,7 +3268,7 @@ var shipped_steps_generated_default = {
3268
3268
  };
3269
3269
 
3270
3270
  // apps/cli/src/scaffold-files.ts
3271
- var cliVersion = "0.15.1";
3271
+ var cliVersion = "0.16.1";
3272
3272
  var shippedLoopSteps = new Map(Object.entries(shipped_steps_generated_default));
3273
3273
  var loopSteps = (loop) => shippedLoopSteps.get(loop) ?? [];
3274
3274
  var replacedStep = (loop) => loopSteps(loop).find((step) => step.from === defaultKitName && step.exported?.startsWith("steps.") === true);
@@ -3533,7 +3533,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
3533
3533
 
3534
3534
  // apps/cli/src/commands.ts
3535
3535
  var ClientId = "kitman-cli";
3536
- var agentRuntime = promise(() => import("./chunk-60fhzjx3.js"));
3536
+ var agentRuntime = promise(() => import("./chunk-bcqqrwsk.js"));
3537
3537
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
3538
3538
  defaultValue: () => gen(function* () {
3539
3539
  const tui = yield* tryPromise({
@@ -5072,7 +5072,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
5072
5072
  });
5073
5073
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
5074
5074
  defaultValue: () => (options) => gen(function* () {
5075
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-tgt9a3yz.js"));
5075
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-9qfyb5r2.js"));
5076
5076
  return yield* makeRunnerRpcClient({
5077
5077
  runnerId: options.runnerId,
5078
5078
  bearer: options.bearer,
@@ -5385,7 +5385,7 @@ function startCanonicalHerdrRunnerCommand(input) {
5385
5385
  yield* controlPlane.client.listRepoBindings(runner.workspaceId).pipe(flatMap3(({ items }) => forEach(items.filter((binding) => binding.status === "active" && (teamId === undefined || binding.teamId === teamId)), (repoBinding) => map9(checkouts.reaches(repoBinding), (reachable) => ({ repoBinding, reachable })), { concurrency: 4 })), tap2((probed) => sync2(() => reached = probed)), catch_((error) => logWarning("runner_repository_probe_failed", error.message)), flatMap3(() => sleep(reached.some((probe) => !probe.reachable) ? repositoryRetryInterval : repositoryProbeInterval)), forever, forkScoped);
5386
5386
  yield* suspend3(() => sleep(ownerLogin.expired() ? ownerLoginRetryInterval : ownerLoginInterval)).pipe(andThen2(checkOwnerLogin), forever, forkScoped);
5387
5387
  const platform = yield* context();
5388
- const updated = yield* make16();
5388
+ const updated = yield* make15();
5389
5389
  const scope = yield* scope2;
5390
5390
  const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
5391
5391
  const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
@@ -5645,7 +5645,7 @@ function mcpCommand(args) {
5645
5645
  if (command.action === "run") {
5646
5646
  if (command.args.length > 0)
5647
5647
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
5648
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-fggwdr03.js"));
5648
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-b0b9v7t9.js"));
5649
5649
  return yield* runMcpServerCommand({ flags: command.flags });
5650
5650
  }
5651
5651
  if (command.action !== "setup")
@@ -6145,7 +6145,7 @@ function programLoopCommand(command) {
6145
6145
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
6146
6146
  });
6147
6147
  }
6148
- var docsModule = promise(() => import("./chunk-69xka6ew.js"));
6148
+ var docsModule = promise(() => import("./chunk-3b198ntn.js"));
6149
6149
  function docsCommand(args) {
6150
6150
  return gen(function* () {
6151
6151
  const command = parseCommand(args);
@@ -6648,6 +6648,8 @@ var transcriptEventLine = (event) => {
6648
6648
  return `${event.kind}: ${event.text}`;
6649
6649
  case "secret_refused":
6650
6650
  return `refused ${event.reference ?? "a tunnel"} for ${event.host}: ${event.reason}`;
6651
+ case "harness_error":
6652
+ return `harness error: ${event.text}`;
6651
6653
  case "lifecycle":
6652
6654
  return `session ${event.state}`;
6653
6655
  }
@@ -7147,7 +7149,7 @@ function changeRequestCommand(args) {
7147
7149
  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}`);
7148
7150
  });
7149
7151
  }
7150
- var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-xrjt25ns.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7152
+ var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-yja59yh8.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7151
7153
  var loopOutline = (command) => gen(function* () {
7152
7154
  const path = yield* Path;
7153
7155
  const loop = requiredArg(command, "a Loop id");
@@ -7167,9 +7169,9 @@ var loopOutline = (command) => gen(function* () {
7167
7169
  `).pipe(mapError2((error) => new CliError({ message: error.message })));
7168
7170
  yield* log(`Wrote the outline of ${loop} to ${out}`);
7169
7171
  });
7170
- var KitWriter = map9(promise(() => import("./chunk-xrjt25ns.js")), (build) => build.writeKit);
7172
+ var KitWriter = map9(promise(() => import("./chunk-yja59yh8.js")), (build) => build.writeKit);
7171
7173
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
7172
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-xrjt25ns.js")), (build) => build.buildKit(directory))
7174
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-yja59yh8.js")), (build) => build.buildKit(directory))
7173
7175
  });
7174
7176
  var uploadKit = (client, workspaceId, built) => gen(function* () {
7175
7177
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -8218,6 +8220,8 @@ function agentStepRunOutcome(outcome, step) {
8218
8220
  case "failed":
8219
8221
  if (outcome.reason === "harness_login_lost")
8220
8222
  return { status: "failed", summary: outcome.summary, restart: { reason: "login_revoked" } };
8223
+ if (outcome.reason === "harness_error")
8224
+ return { status: "failed", summary: outcome.summary, restart: { reason: "harness_error" } };
8221
8225
  if (!failedToStart(outcome.reason))
8222
8226
  return { status: "failed", summary: outcome.summary };
8223
8227
  return {
@@ -7,10 +7,10 @@ import {
7
7
  decoded2,
8
8
  readOpencode2,
9
9
  runOpencodeReader2
10
- } from "./chunk-39ykbhq8.js";
11
- import"./chunk-k2wd9r6t.js";
12
- import"./chunk-vg78dz3w.js";
13
- import"./chunk-dx792s4w.js";
10
+ } from "./chunk-xy3hcdhr.js";
11
+ import"./chunk-g1f0cjqe.js";
12
+ import"./chunk-bkteq6b3.js";
13
+ import"./chunk-rfnasm3c.js";
14
14
  export {
15
15
  decoded2 as decoded,
16
16
  decodedOption2 as decodedOption,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  isString2
4
- } from "./chunk-dx792s4w.js";
4
+ } from "./chunk-rfnasm3c.js";
5
5
 
6
6
  // packages/core/src/question-recommendation.ts
7
7
  var optionValue = (option) => isString2(option) ? option : option.value;
@@ -24,11 +24,11 @@ import {
24
24
  Record,
25
25
  Int,
26
26
  fromJsonString
27
- } from "./chunk-dx792s4w.js";
27
+ } from "./chunk-rfnasm3c.js";
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-vg78dz3w.js";
31
+ } from "./chunk-bkteq6b3.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-f36s9s1g.js";
42
+ } from "./chunk-dxfab1aj.js";
43
43
 
44
44
  // packages/core/src/npm-registry.ts
45
45
  var KitManifest = Struct({
@@ -22,7 +22,7 @@ import {
22
22
  map9,
23
23
  raceFirst,
24
24
  scoped
25
- } from "./chunk-dx792s4w.js";
25
+ } from "./chunk-rfnasm3c.js";
26
26
  import {
27
27
  unwrap,
28
28
  drainFork,
@@ -31,7 +31,7 @@ import {
31
31
  runCollect,
32
32
  runDrain,
33
33
  mkString
34
- } from "./chunk-vg78dz3w.js";
34
+ } from "./chunk-bkteq6b3.js";
35
35
 
36
36
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/redacted.js
37
37
  var redactedRegistry = /* @__PURE__ */ new WeakMap;
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed6,
5
5
  withFiber2
6
- } from "./chunk-dx792s4w.js";
6
+ } from "./chunk-rfnasm3c.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;
@@ -12,7 +12,7 @@ import {
12
12
  empty3,
13
13
  add,
14
14
  getOrUndefined2,
15
- get4,
15
+ get3,
16
16
  merge3,
17
17
  Reference,
18
18
  fromInputUnsafe,
@@ -138,7 +138,7 @@ import {
138
138
  toJsonSchemaDocument,
139
139
  toCodecJson,
140
140
  Json
141
- } from "./chunk-dx792s4w.js";
141
+ } from "./chunk-rfnasm3c.js";
142
142
  import {
143
143
  currentTimeMillis,
144
144
  WebCrypto,
@@ -176,23 +176,23 @@ import {
176
176
  StepManifest,
177
177
  KitSetup,
178
178
  RunnerRpcError
179
- } from "./chunk-f36s9s1g.js";
179
+ } from "./chunk-dxfab1aj.js";
180
180
  import {
181
181
  getCurrent,
182
182
  runForEach,
183
183
  FileSystem
184
- } from "./chunk-vg78dz3w.js";
184
+ } from "./chunk-bkteq6b3.js";
185
185
  import {
186
186
  splitQuestionOptions,
187
187
  recommendationProblem,
188
188
  questionAdvice
189
- } from "./chunk-csxxwscf.js";
189
+ } from "./chunk-f2y0z04q.js";
190
190
  import {
191
191
  guard,
192
192
  Id,
193
193
  Timestamp,
194
194
  ActorType
195
- } from "./chunk-5hkdgzh4.js";
195
+ } from "./chunk-x83q18w0.js";
196
196
  var __defProp = Object.defineProperty;
197
197
  var __returnValue = (v) => v;
198
198
  function __exportSetter(name, newValue) {
@@ -769,7 +769,7 @@ class Suspended extends (/* @__PURE__ */ Class2("effect/workflow/Workflow/Suspen
769
769
  [ResultTypeId] = ResultTypeId;
770
770
  }
771
771
  var wrapActivityResult = (effect, isSuspend) => contextWith((context) => {
772
- const instance = get4(context, InstanceTag);
772
+ const instance = get3(context, InstanceTag);
773
773
  return acquireUseRelease(sync2(() => adoptActivityUnsafe(context, instance) ?? registerActivityUnsafe(instance)), () => effect, (registration, exit) => {
774
774
  releaseActivityUnsafe(registration);
775
775
  const isSuspended = isSuccess2(exit) && isSuspend(exit.value);
@@ -1420,7 +1420,7 @@ var scopingActivities = (engine) => ({
1420
1420
  }),
1421
1421
  activityExecute: (activity, attempt) => gen(function* () {
1422
1422
  const scope = yield* StepScope;
1423
- if (scope === "" || get4(activity.annotations, ActivityNamed))
1423
+ if (scope === "" || get3(activity.annotations, ActivityNamed))
1424
1424
  return yield* engine.activityExecute(activity, attempt);
1425
1425
  return yield* engine.activityExecute(renamed(activity, scopedName(scope, activity.name)), attempt);
1426
1426
  })