@kitman-sh/cli 0.12.8 → 0.12.9

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 (27) hide show
  1. package/dist/{chunk-c8wpw9nh.js → chunk-0h49y8gf.js} +214 -65
  2. package/dist/{chunk-bh9k3kty.js → chunk-4gkp713b.js} +55 -55
  3. package/dist/{chunk-gyek54h3.js → chunk-4gy4ty6k.js} +8 -8
  4. package/dist/{chunk-cr3qw0xf.js → chunk-4w0c1ykv.js} +381 -297
  5. package/dist/{chunk-j1cnq2j0.js → chunk-5zhh41gb.js} +4 -4
  6. package/dist/{chunk-kzwdhdej.js → chunk-5zth85pj.js} +2 -2
  7. package/dist/{chunk-9qp59fht.js → chunk-6pq0yj40.js} +32 -32
  8. package/dist/{chunk-tgwa9vqw.js → chunk-7afnkx5b.js} +6 -6
  9. package/dist/{chunk-n9351czb.js → chunk-azfjx5d8.js} +7 -7
  10. package/dist/{chunk-31gpnkq3.js → chunk-cbpb2rww.js} +5 -5
  11. package/dist/{chunk-wcvfkdwd.js → chunk-fr79hgq2.js} +24 -24
  12. package/dist/{chunk-6w7ajkm8.js → chunk-fyvtc3xv.js} +18 -18
  13. package/dist/{chunk-cw61zyh5.js → chunk-gq7y5v3e.js} +1 -1
  14. package/dist/{chunk-jwrs9pfa.js → chunk-gwnyxm1r.js} +107 -107
  15. package/dist/{chunk-3x6cbhzd.js → chunk-gxbcvd4q.js} +4 -4
  16. package/dist/{chunk-fh58za51.js → chunk-gy9rf14f.js} +3 -3
  17. package/dist/{chunk-c8hwfktd.js → chunk-jn7w2ntt.js} +7 -7
  18. package/dist/{chunk-6d53ezj1.js → chunk-mtkstrh3.js} +4 -4
  19. package/dist/{chunk-0tjg9eya.js → chunk-q5w3v4k1.js} +1 -1
  20. package/dist/{chunk-xng6j3a8.js → chunk-rtpk65fj.js} +1 -1
  21. package/dist/{chunk-93ypzdpa.js → chunk-vkg40ysx.js} +7 -7
  22. package/dist/{chunk-z5f7g1w1.js → chunk-y1krmnbv.js} +2 -2
  23. package/dist/{chunk-s5pzy86v.js → chunk-ywzxwgrz.js} +6 -6
  24. package/dist/{chunk-pjpfc3sd.js → chunk-z0q62687.js} +1 -1
  25. package/dist/{chunk-qjqa338f.js → chunk-zw3gf6r5.js} +94 -333
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -12,7 +12,7 @@ import {
12
12
  succeed,
13
13
  isSuccess,
14
14
  TaggedError,
15
- make15,
15
+ make16,
16
16
  _await,
17
17
  fail5,
18
18
  succeed5,
@@ -20,7 +20,6 @@ import {
20
20
  provideMerge,
21
21
  squash,
22
22
  pretty,
23
- currentTimeMillis,
24
23
  max2,
25
24
  during,
26
25
  min2,
@@ -43,7 +42,7 @@ import {
43
42
  andThen2,
44
43
  tap2,
45
44
  result,
46
- map7,
45
+ map8,
47
46
  as,
48
47
  asSome2,
49
48
  asVoid,
@@ -105,8 +104,21 @@ import {
105
104
  decodeJsonString,
106
105
  encodeJsonStringSync,
107
106
  encodePrettyJsonString
108
- } from "./chunk-qjqa338f.js";
107
+ } from "./chunk-zw3gf6r5.js";
108
+ import {
109
+ tap,
110
+ mapError,
111
+ decodeText,
112
+ run,
113
+ mkString,
114
+ FileSystem,
115
+ Path,
116
+ withDefault,
117
+ option,
118
+ String2
119
+ } from "./chunk-0h49y8gf.js";
109
120
  import {
121
+ currentTimeMillis,
110
122
  SecureRandom,
111
123
  layerWebCrypto,
112
124
  runMain,
@@ -216,26 +228,14 @@ import {
216
228
  harnessNames,
217
229
  herdrRunnerCapabilities2,
218
230
  declaredChecks
219
- } from "./chunk-cr3qw0xf.js";
231
+ } from "./chunk-4w0c1ykv.js";
220
232
  import {
221
233
  Id
222
- } from "./chunk-0tjg9eya.js";
223
- import {
224
- tap,
225
- mapError,
226
- decodeText,
227
- run,
228
- mkString,
229
- FileSystem,
230
- Path,
231
- withDefault,
232
- option,
233
- String2
234
- } from "./chunk-c8wpw9nh.js";
234
+ } from "./chunk-q5w3v4k1.js";
235
235
  import {
236
236
  ChildProcessSpawner,
237
237
  make3
238
- } from "./chunk-6d53ezj1.js";
238
+ } from "./chunk-mtkstrh3.js";
239
239
 
240
240
  // apps/cli/src/cli-error.ts
241
241
  function cliErrorCode(error, status) {
@@ -864,7 +864,7 @@ function herdrRunnerCredentialName(runnerId) {
864
864
  return `herdr-runner:${runnerId}`;
865
865
  }
866
866
  function storedHerdrRunnerCredential(apiUrl, runnerId) {
867
- return map7(readAuthStore(), (auth) => agentCredentialForApi(auth, apiUrl, herdrRunnerCredentialName(runnerId)));
867
+ return map8(readAuthStore(), (auth) => agentCredentialForApi(auth, apiUrl, herdrRunnerCredentialName(runnerId)));
868
868
  }
869
869
  function writeRunnerCredentialFile(path, file) {
870
870
  return gen(function* () {
@@ -989,10 +989,10 @@ var sandboxMissing = (sandbox, missing) => ({
989
989
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
990
990
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
991
991
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
992
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-3x6cbhzd.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
992
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-gxbcvd4q.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
993
993
  });
994
994
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
995
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-3x6cbhzd.js")), (module) => module.updateHerdrCore(options))
995
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-gxbcvd4q.js")), (module) => module.updateHerdrCore(options))
996
996
  });
997
997
  var herdrCoreMissing = (error) => {
998
998
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1184,7 +1184,7 @@ var managedKitmanPath = gen(function* () {
1184
1184
  var installedKitmanVersion = gen(function* () {
1185
1185
  const fs = yield* FileSystem;
1186
1186
  const path = yield* Path;
1187
- return yield* fs.readLink(yield* managedKitmanPath).pipe(map7((target) => path.basename(path.dirname(target))), orElseSucceed(() => {
1187
+ return yield* fs.readLink(yield* managedKitmanPath).pipe(map8((target) => path.basename(path.dirname(target))), orElseSucceed(() => {
1188
1188
  return;
1189
1189
  }));
1190
1190
  });
@@ -1229,7 +1229,7 @@ var downloadManagedKitman = (apiUrl, platform) => gen(function* () {
1229
1229
  const binary = yield* fetchFrom(release.url).pipe(filterOrFail((downloaded) => downloaded.ok, (downloaded) => new CliError({ message: `Downloading kitman ${manifest.version} answered ${downloaded.status}` })), flatMap3((downloaded) => tryPromise({
1230
1230
  try: () => downloaded.arrayBuffer(),
1231
1231
  catch: (error) => new CliError({ message: `Downloading kitman ${manifest.version} failed: ${String(error)}` })
1232
- })), map7((bytes) => new Uint8Array(bytes)));
1232
+ })), map8((bytes) => new Uint8Array(bytes)));
1233
1233
  if (digestSha256(binary, "hex") !== release.sha256)
1234
1234
  return yield* new CliError({
1235
1235
  message: `The downloaded kitman ${manifest.version} for ${os}/${architecture} does not match its sha256; nothing was installed`
@@ -1412,12 +1412,12 @@ var syncTargets = (harness) => gen(function* () {
1412
1412
  });
1413
1413
  var syncKits = (input) => gen(function* () {
1414
1414
  const fs = yield* FileSystem;
1415
- const { syncKitSetup } = yield* promise(() => import("./chunk-93ypzdpa.js"));
1415
+ const { syncKitSetup } = yield* promise(() => import("./chunk-vkg40ysx.js"));
1416
1416
  const harnesses = yield* syncTargets(input.harness);
1417
1417
  const chain = yield* input.client.getKitChain(input.workspaceId);
1418
1418
  for (const { name, problem } of chain.skipped)
1419
1419
  yield* log(`Warning: skipped Kit ${name}: ${problem}`);
1420
- const kits = yield* forEach(chain.kits, (kit) => map7(flatMap3(setupArchive(input.client, input.workspaceId, kit.setupDigest), decodeArchive), (archive) => ({ name: kit.name, version: kit.version, archive })));
1420
+ const kits = yield* forEach(chain.kits, (kit) => map8(flatMap3(setupArchive(input.client, input.workspaceId, kit.setupDigest), decodeArchive), (archive) => ({ name: kit.name, version: kit.version, archive })));
1421
1421
  const manifest = yield* userHarnessSyncPath;
1422
1422
  const previous = yield* fs.readFileString(manifest).pipe(flatMap3(decodeEffect(SyncedHarnesses)), orElseSucceed(() => ({})));
1423
1423
  const kitman = (yield* runningManagedInstall(process.platform)) ? yield* managedKitmanPath : "kitman";
@@ -1558,7 +1558,7 @@ function idempotencyKey(value, operation) {
1558
1558
  const explicit = value?.trim();
1559
1559
  if (explicit)
1560
1560
  return succeed6(explicit);
1561
- return SecureRandom.pipe(flatMap3((random) => random.uuidV4()), map7((id) => `kitman-cli:${operation}:${id}`), provide3(layerWebCrypto));
1561
+ return SecureRandom.pipe(flatMap3((random) => random.uuidV4()), map8((id) => `kitman-cli:${operation}:${id}`), provide3(layerWebCrypto));
1562
1562
  }
1563
1563
  function segment(value) {
1564
1564
  return encodeURIComponent(value);
@@ -1676,7 +1676,7 @@ var machineRunnerServices = gen(function* () {
1676
1676
  return yield* forEach(files.flatMap((file) => {
1677
1677
  const runnerId = pattern.exec(file)?.[1];
1678
1678
  return runnerId === undefined ? [] : [{ runnerId, file: path.join(directory, file) }];
1679
- }), ({ runnerId, file }) => map7(fs.readFileString(file), (definition) => ({
1679
+ }), ({ runnerId, file }) => map8(fs.readFileString(file), (definition) => ({
1680
1680
  runnerId,
1681
1681
  command: serviceCommand(platform, definition)
1682
1682
  })));
@@ -1691,7 +1691,7 @@ var ownersRunners = (apiUrl) => gen(function* () {
1691
1691
  return;
1692
1692
  const client = yield* clientFor(apiUrl, session);
1693
1693
  const workspaces = (yield* client.listWorkspaces()).items;
1694
- const lists = yield* forEach(workspaces, (workspace) => map7(client.listRunners(workspace.id), (list) => list.items));
1694
+ const lists = yield* forEach(workspaces, (workspace) => map8(client.listRunners(workspace.id), (list) => list.items));
1695
1695
  return new Map(lists.flat().map((runner) => [runner.id, runner]));
1696
1696
  }).pipe(orElseSucceed(() => {
1697
1697
  return;
@@ -1814,7 +1814,7 @@ var machineRunnerCommand = (action, apiUrl, options) => gen(function* () {
1814
1814
 
1815
1815
  // apps/cli/src/repo-binding-setup.ts
1816
1816
  var Git = Reference("kitman/cli/Git", {
1817
- defaultValue: () => (args) => runCommand2("git", args).pipe(map7((stdout) => stdout.trim()))
1817
+ defaultValue: () => (args) => runCommand2("git", args).pipe(map8((stdout) => stdout.trim()))
1818
1818
  });
1819
1819
  var repoBindingInputFromCurrentRepo = flatMap3(Git, repoBindingInput);
1820
1820
  function repoBindingInput(git) {
@@ -1951,8 +1951,8 @@ function initCommand(args) {
1951
1951
  const apiUrl = yield* resolveApiUrl(flags.apiUrl);
1952
1952
  const steps = [];
1953
1953
  const step = (name, outcome, detail) => andThen2(sync2(() => steps.push({ name, outcome, detail })), log(`${name}: ${outcomeLabel[outcome]} (${detail})`));
1954
- const ask = (prompt, fallback) => flags.yes ? succeed6(fallback) : promptLine(fallback === "" ? `${prompt}: ` : `${prompt} [${fallback}]: `).pipe(map7((answer) => answer.trim() || fallback));
1955
- const confirm = (prompt, fallback) => map7(ask(`${prompt} (y/n)`, fallback ? "y" : "n"), (answer) => /^y(es)?$/i.test(answer));
1954
+ const ask = (prompt, fallback) => flags.yes ? succeed6(fallback) : promptLine(fallback === "" ? `${prompt}: ` : `${prompt} [${fallback}]: `).pipe(map8((answer) => answer.trim() || fallback));
1955
+ const confirm = (prompt, fallback) => map8(ask(`${prompt} (y/n)`, fallback ? "y" : "n"), (answer) => /^y(es)?$/i.test(answer));
1956
1956
  const existingSession = yield* sessionForApiWithRefresh(apiUrl);
1957
1957
  const session = existingSession ?? (yield* (yield* Login)(apiUrl));
1958
1958
  yield* step("Login", existingSession === undefined ? "set_up" : "already", apiUrl);
@@ -2137,7 +2137,7 @@ var runnerServiceStep = (apiUrl, runnerId, change, step) => gen(function* () {
2137
2137
  yield* step("Runner service", change.fresh ? "set_up" : "repaired", "started");
2138
2138
  });
2139
2139
  var credentialNote = { missing: ", credential restored", refused: ", credential re-keyed", accepted: "" };
2140
- var machineName = map7(option(String2("KITMAN_RUNNER_NAME")), (name) => getOrElse(name, () => hostname()));
2140
+ var machineName = map8(option(String2("KITMAN_RUNNER_NAME")), (name) => getOrElse(name, () => hostname()));
2141
2141
  var managedRunnerService = (runnerId, apiUrl) => gen(function* () {
2142
2142
  const kitman = yield* managedKitmanPath;
2143
2143
  const bin = (yield* Path).dirname(kitman);
@@ -2258,9 +2258,9 @@ function runnerServiceState(name) {
2258
2258
  return gen(function* () {
2259
2259
  const manager = yield* ServiceManager;
2260
2260
  if (manager.platform === "linux")
2261
- return yield* manager.run("systemctl", ["--user", "is-active", `${name}.service`]).pipe(map7((state) => `systemd: ${state.trim()}`), orElseSucceed(() => "systemd: not running"));
2261
+ return yield* manager.run("systemctl", ["--user", "is-active", `${name}.service`]).pipe(map8((state) => `systemd: ${state.trim()}`), orElseSucceed(() => "systemd: not running"));
2262
2262
  if (manager.platform === "darwin")
2263
- return yield* manager.run("launchctl", ["print", `${yield* launchdDomain}/${launchdLabel(name)}`]).pipe(map7((printed) => `launchd: ${/^\s*state = (\S+)/mu.exec(printed)?.[1] ?? "loaded"}`), orElseSucceed(() => "launchd: not installed"));
2263
+ return yield* manager.run("launchctl", ["print", `${yield* launchdDomain}/${launchdLabel(name)}`]).pipe(map8((printed) => `launchd: ${/^\s*state = (\S+)/mu.exec(printed)?.[1] ?? "loaded"}`), orElseSucceed(() => "launchd: not installed"));
2264
2264
  return;
2265
2265
  });
2266
2266
  }
@@ -2331,7 +2331,7 @@ var package_default = {
2331
2331
  };
2332
2332
 
2333
2333
  // apps/cli/src/scaffold.ts
2334
- var cliVersion = "0.12.8";
2334
+ var cliVersion = "0.12.9";
2335
2335
  var packageJson = (name, scaffold) => `${JSON.stringify({
2336
2336
  name,
2337
2337
  private: true,
@@ -2483,7 +2483,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2483
2483
 
2484
2484
  // apps/cli/src/commands.ts
2485
2485
  var ClientId = "kitman-cli";
2486
- var agentRuntime = promise(() => import("./chunk-jwrs9pfa.js"));
2486
+ var agentRuntime = promise(() => import("./chunk-gwnyxm1r.js"));
2487
2487
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2488
2488
  defaultValue: () => gen(function* () {
2489
2489
  const tui = yield* tryPromise({
@@ -2915,7 +2915,7 @@ function harnessSync(args) {
2915
2915
  });
2916
2916
  });
2917
2917
  }
2918
- var readStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map7((text) => text.trim()));
2918
+ var readStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map8((text) => text.trim()));
2919
2919
  function promptLine(prompt) {
2920
2920
  return gen(function* () {
2921
2921
  const terminal = yield* Terminal;
@@ -3507,7 +3507,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3507
3507
  });
3508
3508
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3509
3509
  defaultValue: () => (options) => gen(function* () {
3510
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-s5pzy86v.js"));
3510
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-ywzxwgrz.js"));
3511
3511
  return yield* makeRunnerRpcClient({
3512
3512
  runnerId: options.runnerId,
3513
3513
  bearer: options.bearer,
@@ -3522,7 +3522,7 @@ var runnerHostSettings = gen(function* () {
3522
3522
  "KITMAN_RUNNER_FULL_ACCESS",
3523
3523
  "SSH_AUTH_SOCK"
3524
3524
  ];
3525
- const environment = Object.fromEntries(yield* forEach(names, (name) => String2(name).pipe(option, map7((value) => [name, getOrUndefined(value)?.trim()]))));
3525
+ const environment = Object.fromEntries(yield* forEach(names, (name) => String2(name).pipe(option, map8((value) => [name, getOrUndefined(value)?.trim()]))));
3526
3526
  return {
3527
3527
  fullAccess: environment["KITMAN_RUNNER_FULL_ACCESS"] === "1",
3528
3528
  sshAgentAvailable: environment["SSH_AUTH_SOCK"] !== undefined,
@@ -3781,13 +3781,13 @@ function startCanonicalHerdrRunnerCommand(input) {
3781
3781
  }).pipe(tap2((opened) => opened.settledRuns([])))));
3782
3782
  const signals = yield* makeReplicaSignals;
3783
3783
  const bundles = yield* kitmanBundles({
3784
- fetch: (digest) => rpc.bundle(digest).pipe(map7((found) => found.bundle)),
3784
+ fetch: (digest) => rpc.bundle(digest).pipe(map8((found) => found.bundle)),
3785
3785
  cacheDir: bundleCache
3786
3786
  });
3787
3787
  const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
3788
- yield* controlPlane.client.listRepoBindings(runner.workspaceId).pipe(flatMap3(({ items }) => forEach(items.filter((binding) => binding.status === "active" && (teamId === undefined || binding.teamId === teamId)), (repoBinding) => map7(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);
3788
+ yield* controlPlane.client.listRepoBindings(runner.workspaceId).pipe(flatMap3(({ items }) => forEach(items.filter((binding) => binding.status === "active" && (teamId === undefined || binding.teamId === teamId)), (repoBinding) => map8(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);
3789
3789
  const platform = yield* context();
3790
- const updated = yield* make15();
3790
+ const updated = yield* make16();
3791
3791
  const scope = yield* scope2;
3792
3792
  const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
3793
3793
  const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
@@ -3895,18 +3895,18 @@ function startCanonicalHerdrRunnerCommand(input) {
3895
3895
  ...work.secretDestinations === undefined ? undefined : { secretDestinations: work.secretDestinations }
3896
3896
  },
3897
3897
  recordRefusal: refused,
3898
- revokedSecrets: heartbeatOf(work).pipe(map7((state) => state.revokedSecrets ?? [])),
3898
+ revokedSecrets: heartbeatOf(work).pipe(map8((state) => state.revokedSecrets ?? [])),
3899
3899
  sandbox: {
3900
3900
  backend: work.sandbox ?? sandboxOf(work),
3901
3901
  policy: agentStepSandboxPolicy(work, input.apiUrl, runnerState)
3902
3902
  },
3903
- settled: heartbeatOf(work).pipe(map7((state) => state.settled || state.outputSubmitted === true)),
3903
+ settled: heartbeatOf(work).pipe(map8((state) => state.settled || state.outputSubmitted === true)),
3904
3904
  ...agentStepExecutionLimit(work, now),
3905
3905
  steering: {
3906
3906
  ...signals.steers(work.id),
3907
3907
  report: (note, delivered) => andThen2(delivered ? steered(note) : void_3, rpc.reportSteer({ workUnitId: work.id, messageId: note.messageId, delivered }).pipe(catch_((error) => logWarning("runner_steer_report_failed", error.message))))
3908
3908
  }
3909
- }).pipe(map7((outcome) => agentStepRunOutcome(outcome, {
3909
+ }).pipe(map8((outcome) => agentStepRunOutcome(outcome, {
3910
3910
  sandbox: work.sandbox ?? sandboxOf(work),
3911
3911
  lacksLoginSecret: lacksLoginSecret(work.brief.harness, work.secrets)
3912
3912
  })), catch_((refusal) => succeed6({ status: "failed", summary: refusal.summary }))))
@@ -4039,7 +4039,7 @@ function mcpCommand(args) {
4039
4039
  if (command.action === "run") {
4040
4040
  if (command.args.length > 0)
4041
4041
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4042
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-9qp59fht.js"));
4042
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-6pq0yj40.js"));
4043
4043
  return yield* runMcpServerCommand({ flags: command.flags });
4044
4044
  }
4045
4045
  if (command.action !== "setup")
@@ -4527,7 +4527,7 @@ function programLoopCommand(command) {
4527
4527
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4528
4528
  });
4529
4529
  }
4530
- var docsModule = promise(() => import("./chunk-pjpfc3sd.js"));
4530
+ var docsModule = promise(() => import("./chunk-z0q62687.js"));
4531
4531
  function docsCommand(args) {
4532
4532
  return gen(function* () {
4533
4533
  const command = parseCommand(args);
@@ -4947,7 +4947,7 @@ function transcriptCommand(args) {
4947
4947
  return yield* new CliError({
4948
4948
  message: `Run ${runId} has no ${stepKey === undefined ? "Step attempts" : `attempt of ${stepKey}`}${attempt === undefined ? "" : ` numbered ${attempt}`}`
4949
4949
  });
4950
- const items = yield* forEach(asked, (found) => map7(transcriptAfter(client, runId, found.id, 0), (entries) => ({
4950
+ const items = yield* forEach(asked, (found) => map8(transcriptAfter(client, runId, found.id, 0), (entries) => ({
4951
4951
  stepKey: found.stepKey,
4952
4952
  attempt: found.attempt,
4953
4953
  stepAttemptId: found.id,
@@ -5227,7 +5227,7 @@ function verifyCommand(args) {
5227
5227
  }
5228
5228
  });
5229
5229
  }
5230
- var secretValueFromStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map7((text) => text.replace(/\r?\n$/, "")));
5230
+ var secretValueFromStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map8((text) => text.replace(/\r?\n$/, "")));
5231
5231
  function secretCommand(args) {
5232
5232
  return gen(function* () {
5233
5233
  const command = parseCommand(args.length === 1 ? [...args, "list"] : args);
@@ -5361,9 +5361,9 @@ function changeRequestCommand(args) {
5361
5361
  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}`);
5362
5362
  });
5363
5363
  }
5364
- var KitWriter = map7(promise(() => import("./chunk-6w7ajkm8.js")), (build) => build.writeKit);
5364
+ var KitWriter = map8(promise(() => import("./chunk-fyvtc3xv.js")), (build) => build.writeKit);
5365
5365
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5366
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-6w7ajkm8.js")), (build) => build.buildKit(directory))
5366
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-fyvtc3xv.js")), (build) => build.buildKit(directory))
5367
5367
  });
5368
5368
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5369
5369
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -5380,7 +5380,7 @@ var buildKitInto = (command) => gen(function* () {
5380
5380
  yield* (yield* KitWriter)(directory, built, out).pipe(mapError2(() => new CliError({ message: `${path.join(directory, "package.json")} is not a JSON object` })));
5381
5381
  yield* log(`Built ${built.name} ${built.version} into ${out}`);
5382
5382
  });
5383
- var optionalEnv = (name) => String2(name).pipe(option, map7(getOrUndefined));
5383
+ var optionalEnv = (name) => String2(name).pipe(option, map8(getOrUndefined));
5384
5384
  var ciIdToken = (apiUrl) => gen(function* () {
5385
5385
  const gitlab = yield* optionalEnv("KITMAN_ID_TOKEN");
5386
5386
  if (gitlab !== undefined)
@@ -6057,9 +6057,9 @@ var runnerDelivery = (client, runner, askedTeamId) => {
6057
6057
  providerActions: postures === undefined ? "" : Object.entries(postures).map(([action, posture]) => `${action}=${posture}`).join(",")
6058
6058
  };
6059
6059
  };
6060
- return teamId === undefined ? succeed6(row("per_team")) : client.getTeamDeliverySettings(teamId).pipe(map7((settings) => row(settings.delivery)), catchTag("KitmanClientError", (error) => succeed6(row("unknown", error.message))));
6060
+ return teamId === undefined ? succeed6(row("per_team")) : client.getTeamDeliverySettings(teamId).pipe(map8((settings) => row(settings.delivery)), catchTag("KitmanClientError", (error) => succeed6(row("unknown", error.message))));
6061
6061
  };
6062
- var runnerDoctorRowOnThisMachine = (runner) => map7(runnerServiceState(runnerServiceName(runner.id)), (service) => ({
6062
+ var runnerDoctorRowOnThisMachine = (runner) => map8(runnerServiceState(runnerServiceName(runner.id)), (service) => ({
6063
6063
  ...runnerDoctorRow(runner),
6064
6064
  ...service === undefined ? undefined : { service }
6065
6065
  }));
@@ -13,7 +13,6 @@ import {
13
13
  isSuccess2,
14
14
  addFinalizerExit,
15
15
  effectDiscard,
16
- currentTimeMillis,
17
16
  forEach,
18
17
  promise,
19
18
  tryPromise,
@@ -25,7 +24,7 @@ import {
25
24
  flatMap3,
26
25
  andThen2,
27
26
  tap2,
28
- map7,
27
+ map8,
29
28
  orDie,
30
29
  context,
31
30
  contextWith,
@@ -76,11 +75,12 @@ import {
76
75
  toEquivalence,
77
76
  toCodecJson,
78
77
  Json
79
- } from "./chunk-qjqa338f.js";
78
+ } from "./chunk-zw3gf6r5.js";
80
79
  import {
81
80
  guard
82
- } from "./chunk-0tjg9eya.js";
81
+ } from "./chunk-q5w3v4k1.js";
83
82
  import {
83
+ currentTimeMillis,
84
84
  WebCrypto,
85
85
  SafeJson,
86
86
  AgentSandboxNetwork,
@@ -105,11 +105,11 @@ import {
105
105
  KitDigest,
106
106
  KitSetup,
107
107
  RunnerRpcError
108
- } from "./chunk-cr3qw0xf.js";
108
+ } from "./chunk-4w0c1ykv.js";
109
109
  import {
110
110
  runForEach,
111
111
  FileSystem
112
- } from "./chunk-c8wpw9nh.js";
112
+ } from "./chunk-0h49y8gf.js";
113
113
 
114
114
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/crypto/internal/webCrypto.js
115
115
  var subtleUnavailable = () => new Error("crypto.subtle is unavailable; browsers expose it only in secure contexts");
@@ -350,7 +350,7 @@ class ManifestInvalid extends TaggedError2()("ManifestInvalid", {
350
350
  var JsonObjectSchema = Record(String4, Json);
351
351
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workflow/internal/crypto.js
352
352
  var encoder = /* @__PURE__ */ new TextEncoder;
353
- var makeHashDigest = (original) => WebCrypto.use((crypto) => map7(webCryptoDigest(crypto, sha256, encoder.encode(original)), (bytes) => encode(bytes).slice(0, 32)));
353
+ var makeHashDigest = (original) => WebCrypto.use((crypto) => map8(webCryptoDigest(crypto, sha256, encoder.encode(original)), (bytes) => encode(bytes).slice(0, 32)));
354
354
 
355
355
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workflow/Workflow.js
356
356
  var TypeId = "~effect/workflow/Workflow";
@@ -1120,7 +1120,7 @@ var programLease = (work) => ({
1120
1120
  });
1121
1121
  var rpcRunFiles = (rpc, lease) => ({
1122
1122
  createRunFile: (file) => rpc.createRunFile({ lease, ...file }),
1123
- runFileParts: (request) => map7(rpc.runFileParts({ lease, ...request, partNumbers: [...request.partNumbers] }), ({ parts }) => parts),
1123
+ runFileParts: (request) => map8(rpc.runFileParts({ lease, ...request, partNumbers: [...request.partNumbers] }), ({ parts }) => parts),
1124
1124
  completeRunFile: ({ parts, ...request }) => rpc.completeRunFile({ lease, ...request, ...parts === undefined ? undefined : { parts: [...parts] } })
1125
1125
  });
1126
1126