@kitman-sh/cli 0.13.9 → 0.13.10

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-ksgt1tdc.js → chunk-0nh3w4vn.js} +7 -7
  2. package/dist/{chunk-cw61zyh5.js → chunk-24h0y27w.js} +1 -1
  3. package/dist/{chunk-0wj65j5e.js → chunk-2dwqak36.js} +7 -7
  4. package/dist/{chunk-53qp6kcp.js → chunk-4crf5vhd.js} +2 -2
  5. package/dist/{chunk-wzr1n3zy.js → chunk-6n3m0t02.js} +25 -5
  6. package/dist/{chunk-hezxa6q5.js → chunk-6x4wkf0x.js} +7 -7
  7. package/dist/{chunk-s63fjc69.js → chunk-813vn8sn.js} +20 -20
  8. package/dist/{chunk-rz18qefg.js → chunk-bkecckjn.js} +7 -7
  9. package/dist/{chunk-6jtjcvnc.js → chunk-c60xk73g.js} +46 -46
  10. package/dist/{chunk-qkjfx2ts.js → chunk-d4pxty7x.js} +16 -16
  11. package/dist/{chunk-z5f7g1w1.js → chunk-ggmwpwhf.js} +2 -2
  12. package/dist/{chunk-1ht6jwzm.js → chunk-hkg8s472.js} +8 -8
  13. package/dist/{chunk-v190zzc5.js → chunk-j34gensq.js} +1 -1
  14. package/dist/{chunk-69fcvx7d.js → chunk-jkddgvev.js} +74 -54
  15. package/dist/{chunk-a44ebqzx.js → chunk-kj1zjrs9.js} +6 -6
  16. package/dist/{chunk-ezv4p0zr.js → chunk-kk32jckf.js} +4 -4
  17. package/dist/{chunk-fh58za51.js → chunk-mmd7mjv0.js} +3 -3
  18. package/dist/{chunk-tspf987k.js → chunk-mtdz4k32.js} +5 -5
  19. package/dist/{chunk-0tjg9eya.js → chunk-pxvd8w2v.js} +1 -1
  20. package/dist/{chunk-x8sewxzm.js → chunk-r5v7df8h.js} +106 -106
  21. package/dist/{chunk-9gg1w4aa.js → chunk-rz01craf.js} +434 -350
  22. package/dist/{chunk-pj3mer60.js → chunk-s00cj5sw.js} +4 -4
  23. package/dist/{chunk-aezq3fyy.js → chunk-t82w7459.js} +218 -69
  24. package/dist/{chunk-kq88aaa3.js → chunk-vxfajzpz.js} +16 -62
  25. package/dist/{chunk-qjqa338f.js → chunk-zgraq2y3.js} +111 -308
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -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,7 +104,7 @@ import {
105
104
  decodeJsonString,
106
105
  encodeJsonStringSync,
107
106
  encodePrettyJsonString
108
- } from "./chunk-qjqa338f.js";
107
+ } from "./chunk-zgraq2y3.js";
109
108
  import {
110
109
  tap,
111
110
  mapError,
@@ -117,8 +116,9 @@ import {
117
116
  withDefault,
118
117
  option,
119
118
  String2
120
- } from "./chunk-aezq3fyy.js";
119
+ } from "./chunk-t82w7459.js";
121
120
  import {
121
+ currentTimeMillis,
122
122
  SecureRandom,
123
123
  layerWebCrypto,
124
124
  runMain,
@@ -167,7 +167,7 @@ import {
167
167
  digestSha256,
168
168
  sha256Hasher,
169
169
  raw,
170
- make5,
170
+ make4,
171
171
  get,
172
172
  put,
173
173
  HttpClient,
@@ -230,14 +230,14 @@ import {
230
230
  harnessNames,
231
231
  herdrRunnerCapabilities2,
232
232
  declaredChecks
233
- } from "./chunk-9gg1w4aa.js";
233
+ } from "./chunk-rz01craf.js";
234
234
  import {
235
235
  Id
236
- } from "./chunk-0tjg9eya.js";
236
+ } from "./chunk-pxvd8w2v.js";
237
237
  import {
238
238
  ChildProcessSpawner,
239
- make3
240
- } from "./chunk-kq88aaa3.js";
239
+ make2
240
+ } from "./chunk-vxfajzpz.js";
241
241
 
242
242
  // apps/cli/src/cli-error.ts
243
243
  function cliErrorCode(error, status) {
@@ -868,7 +868,7 @@ function herdrRunnerCredentialName(runnerId) {
868
868
  return `herdr-runner:${runnerId}`;
869
869
  }
870
870
  function storedHerdrRunnerCredential(apiUrl, runnerId) {
871
- return map7(readAuthStore(), (auth) => agentCredentialForApi(auth, apiUrl, herdrRunnerCredentialName(runnerId)));
871
+ return map8(readAuthStore(), (auth) => agentCredentialForApi(auth, apiUrl, herdrRunnerCredentialName(runnerId)));
872
872
  }
873
873
  function writeRunnerCredentialFile(path, file) {
874
874
  return gen(function* () {
@@ -993,10 +993,10 @@ var sandboxMissing = (sandbox, missing) => ({
993
993
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
994
994
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
995
995
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
996
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-pj3mer60.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
996
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-s00cj5sw.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
997
997
  });
998
998
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
999
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-pj3mer60.js")), (module) => module.updateHerdrCore(options))
999
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-s00cj5sw.js")), (module) => module.updateHerdrCore(options))
1000
1000
  });
1001
1001
  var herdrCoreMissing = (error) => {
1002
1002
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1188,7 +1188,7 @@ var managedKitmanPath = gen(function* () {
1188
1188
  var installedKitmanVersion = gen(function* () {
1189
1189
  const fs = yield* FileSystem;
1190
1190
  const path = yield* Path;
1191
- return yield* fs.readLink(yield* managedKitmanPath).pipe(map7((target) => path.basename(path.dirname(target))), orElseSucceed(() => {
1191
+ return yield* fs.readLink(yield* managedKitmanPath).pipe(map8((target) => path.basename(path.dirname(target))), orElseSucceed(() => {
1192
1192
  return;
1193
1193
  }));
1194
1194
  });
@@ -1233,7 +1233,7 @@ var downloadManagedKitman = (apiUrl, platform) => gen(function* () {
1233
1233
  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({
1234
1234
  try: () => downloaded.arrayBuffer(),
1235
1235
  catch: (error) => new CliError({ message: `Downloading kitman ${manifest.version} failed: ${String(error)}` })
1236
- })), map7((bytes) => new Uint8Array(bytes)));
1236
+ })), map8((bytes) => new Uint8Array(bytes)));
1237
1237
  if (digestSha256(binary, "hex") !== release.sha256)
1238
1238
  return yield* new CliError({
1239
1239
  message: `The downloaded kitman ${manifest.version} for ${os}/${architecture} does not match its sha256; nothing was installed`
@@ -1422,12 +1422,12 @@ var syncTargets = (harness) => gen(function* () {
1422
1422
  });
1423
1423
  var syncKits = (input) => gen(function* () {
1424
1424
  const fs = yield* FileSystem;
1425
- const { syncKitSetup } = yield* promise(() => import("./chunk-rz18qefg.js"));
1425
+ const { syncKitSetup } = yield* promise(() => import("./chunk-bkecckjn.js"));
1426
1426
  const harnesses = yield* syncTargets(input.harness);
1427
1427
  const chain = yield* input.client.getKitChain(input.workspaceId);
1428
1428
  for (const { name, problem } of chain.skipped)
1429
1429
  yield* log(`Warning: skipped Kit ${name}: ${problem}`);
1430
- 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 })));
1430
+ 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 })));
1431
1431
  const manifest = yield* userHarnessSyncPath;
1432
1432
  const previous = yield* fs.readFileString(manifest).pipe(flatMap3(decodeEffect(SyncedHarnesses)), orElseSucceed(() => ({})));
1433
1433
  const kitman = (yield* runningManagedInstall(process.platform)) ? yield* managedKitmanPath : "kitman";
@@ -1568,7 +1568,7 @@ function idempotencyKey(value, operation) {
1568
1568
  const explicit = value?.trim();
1569
1569
  if (explicit)
1570
1570
  return succeed6(explicit);
1571
- return SecureRandom.pipe(flatMap3((random) => random.uuidV4()), map7((id) => `kitman-cli:${operation}:${id}`), provide3(layerWebCrypto));
1571
+ return SecureRandom.pipe(flatMap3((random) => random.uuidV4()), map8((id) => `kitman-cli:${operation}:${id}`), provide3(layerWebCrypto));
1572
1572
  }
1573
1573
  function segment(value) {
1574
1574
  return encodeURIComponent(value);
@@ -1686,7 +1686,7 @@ var machineRunnerServices = gen(function* () {
1686
1686
  return yield* forEach(files.flatMap((file) => {
1687
1687
  const runnerId = pattern.exec(file)?.[1];
1688
1688
  return runnerId === undefined ? [] : [{ runnerId, file: path.join(directory, file) }];
1689
- }), ({ runnerId, file }) => map7(fs.readFileString(file), (definition) => ({
1689
+ }), ({ runnerId, file }) => map8(fs.readFileString(file), (definition) => ({
1690
1690
  runnerId,
1691
1691
  command: serviceCommand(platform, definition)
1692
1692
  })));
@@ -1701,7 +1701,7 @@ var ownersRunners = (apiUrl) => gen(function* () {
1701
1701
  return;
1702
1702
  const client = yield* clientFor(apiUrl, session);
1703
1703
  const workspaces = (yield* client.listWorkspaces()).items;
1704
- const lists = yield* forEach(workspaces, (workspace) => map7(client.listRunners(workspace.id), (list) => list.items));
1704
+ const lists = yield* forEach(workspaces, (workspace) => map8(client.listRunners(workspace.id), (list) => list.items));
1705
1705
  return new Map(lists.flat().map((runner) => [runner.id, runner]));
1706
1706
  }).pipe(orElseSucceed(() => {
1707
1707
  return;
@@ -1824,7 +1824,7 @@ var machineRunnerCommand = (action, apiUrl, options) => gen(function* () {
1824
1824
 
1825
1825
  // apps/cli/src/repo-binding-setup.ts
1826
1826
  var Git = Reference("kitman/cli/Git", {
1827
- defaultValue: () => (args) => runCommand2("git", args).pipe(map7((stdout) => stdout.trim()))
1827
+ defaultValue: () => (args) => runCommand2("git", args).pipe(map8((stdout) => stdout.trim()))
1828
1828
  });
1829
1829
  var repoBindingInputFromCurrentRepo = flatMap3(Git, repoBindingInput);
1830
1830
  function repoBindingInput(git) {
@@ -1939,7 +1939,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
1939
1939
  run: (command, args) => runCommand2(command, args),
1940
1940
  attach: (command, args) => gen(function* () {
1941
1941
  const spawner = yield* ChildProcessSpawner;
1942
- const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1942
+ const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1943
1943
  const exitCode = yield* handle.exitCode;
1944
1944
  if (exitCode !== 0)
1945
1945
  return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
@@ -1961,8 +1961,8 @@ function initCommand(args) {
1961
1961
  const apiUrl = yield* resolveApiUrl(flags.apiUrl);
1962
1962
  const steps = [];
1963
1963
  const step = (name, outcome, detail) => andThen2(sync2(() => steps.push({ name, outcome, detail })), log(`${name}: ${outcomeLabel[outcome]} (${detail})`));
1964
- const ask = (prompt, fallback) => flags.yes ? succeed6(fallback) : promptLine(fallback === "" ? `${prompt}: ` : `${prompt} [${fallback}]: `).pipe(map7((answer) => answer.trim() || fallback));
1965
- const confirm = (prompt, fallback) => map7(ask(`${prompt} (y/n)`, fallback ? "y" : "n"), (answer) => /^y(es)?$/i.test(answer));
1964
+ const ask = (prompt, fallback) => flags.yes ? succeed6(fallback) : promptLine(fallback === "" ? `${prompt}: ` : `${prompt} [${fallback}]: `).pipe(map8((answer) => answer.trim() || fallback));
1965
+ const confirm = (prompt, fallback) => map8(ask(`${prompt} (y/n)`, fallback ? "y" : "n"), (answer) => /^y(es)?$/i.test(answer));
1966
1966
  const existingSession = yield* sessionForApiWithRefresh(apiUrl);
1967
1967
  const session = existingSession ?? (yield* (yield* Login)(apiUrl));
1968
1968
  yield* step("Login", existingSession === undefined ? "set_up" : "already", apiUrl);
@@ -2147,7 +2147,7 @@ var runnerServiceStep = (apiUrl, runnerId, change, step) => gen(function* () {
2147
2147
  yield* step("Runner service", change.fresh ? "set_up" : "repaired", "started");
2148
2148
  });
2149
2149
  var credentialNote = { missing: ", credential restored", refused: ", credential re-keyed", accepted: "" };
2150
- var machineName = map7(option(String2("KITMAN_RUNNER_NAME")), (name) => getOrElse(name, () => hostname()));
2150
+ var machineName = map8(option(String2("KITMAN_RUNNER_NAME")), (name) => getOrElse(name, () => hostname()));
2151
2151
  var managedRunnerService = (runnerId, apiUrl) => gen(function* () {
2152
2152
  const kitman = yield* managedKitmanPath;
2153
2153
  const bin = (yield* Path).dirname(kitman);
@@ -2268,9 +2268,9 @@ function runnerServiceState(name) {
2268
2268
  return gen(function* () {
2269
2269
  const manager = yield* ServiceManager;
2270
2270
  if (manager.platform === "linux")
2271
- return yield* manager.run("systemctl", ["--user", "is-active", `${name}.service`]).pipe(map7((state) => `systemd: ${state.trim()}`), orElseSucceed(() => "systemd: not running"));
2271
+ return yield* manager.run("systemctl", ["--user", "is-active", `${name}.service`]).pipe(map8((state) => `systemd: ${state.trim()}`), orElseSucceed(() => "systemd: not running"));
2272
2272
  if (manager.platform === "darwin")
2273
- 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"));
2273
+ 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"));
2274
2274
  return;
2275
2275
  });
2276
2276
  }
@@ -2341,7 +2341,7 @@ var package_default = {
2341
2341
  };
2342
2342
 
2343
2343
  // apps/cli/src/scaffold.ts
2344
- var cliVersion = "0.13.9";
2344
+ var cliVersion = "0.13.10";
2345
2345
  var packageJson = (name, scaffold) => `${JSON.stringify({
2346
2346
  name,
2347
2347
  private: true,
@@ -2493,7 +2493,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2493
2493
 
2494
2494
  // apps/cli/src/commands.ts
2495
2495
  var ClientId = "kitman-cli";
2496
- var agentRuntime = promise(() => import("./chunk-x8sewxzm.js"));
2496
+ var agentRuntime = promise(() => import("./chunk-r5v7df8h.js"));
2497
2497
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2498
2498
  defaultValue: () => gen(function* () {
2499
2499
  const tui = yield* tryPromise({
@@ -2925,7 +2925,7 @@ function harnessSync(args) {
2925
2925
  });
2926
2926
  });
2927
2927
  }
2928
- var readStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map7((text) => text.trim()));
2928
+ var readStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map8((text) => text.trim()));
2929
2929
  function promptLine(prompt) {
2930
2930
  return gen(function* () {
2931
2931
  const terminal = yield* Terminal;
@@ -3529,7 +3529,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3529
3529
  });
3530
3530
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3531
3531
  defaultValue: () => (options) => gen(function* () {
3532
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-a44ebqzx.js"));
3532
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-kj1zjrs9.js"));
3533
3533
  return yield* makeRunnerRpcClient({
3534
3534
  runnerId: options.runnerId,
3535
3535
  bearer: options.bearer,
@@ -3544,7 +3544,7 @@ var runnerHostSettings = gen(function* () {
3544
3544
  "KITMAN_RUNNER_FULL_ACCESS",
3545
3545
  "SSH_AUTH_SOCK"
3546
3546
  ];
3547
- const environment = Object.fromEntries(yield* forEach(names, (name) => String2(name).pipe(option, map7((value) => [name, getOrUndefined(value)?.trim()]))));
3547
+ const environment = Object.fromEntries(yield* forEach(names, (name) => String2(name).pipe(option, map8((value) => [name, getOrUndefined(value)?.trim()]))));
3548
3548
  return {
3549
3549
  fullAccess: environment["KITMAN_RUNNER_FULL_ACCESS"] === "1",
3550
3550
  sshAgentAvailable: environment["SSH_AUTH_SOCK"] !== undefined,
@@ -3828,11 +3828,11 @@ function startCanonicalHerdrRunnerCommand(input) {
3828
3828
  }).pipe(tap2((opened) => opened.settledRuns([])))));
3829
3829
  const signals = yield* makeReplicaSignals;
3830
3830
  const bundles = yield* kitmanBundles({
3831
- fetch: (digest) => rpc.bundle(digest).pipe(map7((found) => found.bundle)),
3831
+ fetch: (digest) => rpc.bundle(digest).pipe(map8((found) => found.bundle)),
3832
3832
  cacheDir: bundleCache
3833
3833
  });
3834
3834
  const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
3835
- 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);
3835
+ 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);
3836
3836
  const platform = yield* context();
3837
3837
  const updated = yield* make15();
3838
3838
  const scope = yield* scope2;
@@ -3942,18 +3942,18 @@ function startCanonicalHerdrRunnerCommand(input) {
3942
3942
  ...work.secretDestinations === undefined ? undefined : { secretDestinations: work.secretDestinations }
3943
3943
  },
3944
3944
  recordRefusal: refused,
3945
- revokedSecrets: heartbeatOf(work).pipe(map7((state) => state.revokedSecrets ?? [])),
3945
+ revokedSecrets: heartbeatOf(work).pipe(map8((state) => state.revokedSecrets ?? [])),
3946
3946
  sandbox: {
3947
3947
  backend: work.sandbox ?? sandboxOf(work),
3948
3948
  policy: agentStepSandboxPolicy(work, input.apiUrl, runnerState)
3949
3949
  },
3950
- settled: heartbeatOf(work).pipe(map7((state) => state.settled || state.outputSubmitted === true)),
3950
+ settled: heartbeatOf(work).pipe(map8((state) => state.settled || state.outputSubmitted === true)),
3951
3951
  ...agentStepExecutionLimit(work, now),
3952
3952
  steering: {
3953
3953
  ...signals.steers(work.id),
3954
3954
  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))))
3955
3955
  }
3956
- }).pipe(map7((outcome) => agentStepRunOutcome(outcome, {
3956
+ }).pipe(map8((outcome) => agentStepRunOutcome(outcome, {
3957
3957
  sandbox: work.sandbox ?? sandboxOf(work),
3958
3958
  lacksLoginSecret: lacksLoginSecret(work.brief.harness, work.secrets)
3959
3959
  })), catch_((refusal) => succeed6({ status: "failed", summary: refusal.summary }))))
@@ -4086,7 +4086,7 @@ function mcpCommand(args) {
4086
4086
  if (command.action === "run") {
4087
4087
  if (command.args.length > 0)
4088
4088
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4089
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-69fcvx7d.js"));
4089
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-jkddgvev.js"));
4090
4090
  return yield* runMcpServerCommand({ flags: command.flags });
4091
4091
  }
4092
4092
  if (command.action !== "setup")
@@ -4574,7 +4574,7 @@ function programLoopCommand(command) {
4574
4574
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4575
4575
  });
4576
4576
  }
4577
- var docsModule = promise(() => import("./chunk-v190zzc5.js"));
4577
+ var docsModule = promise(() => import("./chunk-j34gensq.js"));
4578
4578
  function docsCommand(args) {
4579
4579
  return gen(function* () {
4580
4580
  const command = parseCommand(args);
@@ -4994,7 +4994,7 @@ function transcriptCommand(args) {
4994
4994
  return yield* new CliError({
4995
4995
  message: `Run ${runId} has no ${stepKey === undefined ? "Step attempts" : `attempt of ${stepKey}`}${attempt === undefined ? "" : ` numbered ${attempt}`}`
4996
4996
  });
4997
- const items = yield* forEach(asked, (found) => map7(transcriptAfter(client, runId, found.id, 0), (entries) => ({
4997
+ const items = yield* forEach(asked, (found) => map8(transcriptAfter(client, runId, found.id, 0), (entries) => ({
4998
4998
  stepKey: found.stepKey,
4999
4999
  attempt: found.attempt,
5000
5000
  stepAttemptId: found.id,
@@ -5274,7 +5274,7 @@ function verifyCommand(args) {
5274
5274
  }
5275
5275
  });
5276
5276
  }
5277
- var secretValueFromStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map7((text) => text.replace(/\r?\n$/, "")));
5277
+ var secretValueFromStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map8((text) => text.replace(/\r?\n$/, "")));
5278
5278
  function secretCommand(args) {
5279
5279
  return gen(function* () {
5280
5280
  const command = parseCommand(args.length === 1 ? [...args, "list"] : args);
@@ -5408,9 +5408,9 @@ function changeRequestCommand(args) {
5408
5408
  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}`);
5409
5409
  });
5410
5410
  }
5411
- var KitWriter = map7(promise(() => import("./chunk-s63fjc69.js")), (build) => build.writeKit);
5411
+ var KitWriter = map8(promise(() => import("./chunk-813vn8sn.js")), (build) => build.writeKit);
5412
5412
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5413
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-s63fjc69.js")), (build) => build.buildKit(directory))
5413
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-813vn8sn.js")), (build) => build.buildKit(directory))
5414
5414
  });
5415
5415
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5416
5416
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -5427,7 +5427,7 @@ var buildKitInto = (command) => gen(function* () {
5427
5427
  yield* (yield* KitWriter)(directory, built, out).pipe(mapError2(() => new CliError({ message: `${path.join(directory, "package.json")} is not a JSON object` })));
5428
5428
  yield* log(`Built ${built.name} ${built.version} into ${out}`);
5429
5429
  });
5430
- var optionalEnv = (name) => String2(name).pipe(option, map7(getOrUndefined));
5430
+ var optionalEnv = (name) => String2(name).pipe(option, map8(getOrUndefined));
5431
5431
  var ciIdToken = (apiUrl) => gen(function* () {
5432
5432
  const gitlab = yield* optionalEnv("KITMAN_ID_TOKEN");
5433
5433
  if (gitlab !== undefined)
@@ -6104,9 +6104,9 @@ var runnerDelivery = (client, runner, askedTeamId) => {
6104
6104
  providerActions: postures === undefined ? "" : Object.entries(postures).map(([action, posture]) => `${action}=${posture}`).join(",")
6105
6105
  };
6106
6106
  };
6107
- return teamId === undefined ? succeed6(row("per_team")) : client.getTeamDeliverySettings(teamId).pipe(map7((settings) => row(settings.delivery)), catchTag("KitmanClientError", (error) => succeed6(row("unknown", error.message))));
6107
+ return teamId === undefined ? succeed6(row("per_team")) : client.getTeamDeliverySettings(teamId).pipe(map8((settings) => row(settings.delivery)), catchTag("KitmanClientError", (error) => succeed6(row("unknown", error.message))));
6108
6108
  };
6109
- var runnerDoctorRowOnThisMachine = (runner) => map7(runnerServiceState(runnerServiceName(runner.id)), (service) => ({
6109
+ var runnerDoctorRowOnThisMachine = (runner) => map8(runnerServiceState(runnerServiceName(runner.id)), (service) => ({
6110
6110
  ...runnerDoctorRow(runner),
6111
6111
  ...service === undefined ? undefined : { service }
6112
6112
  }));
@@ -6187,7 +6187,7 @@ function downloadPresignedAsset(download, outputPath) {
6187
6187
  return gen(function* () {
6188
6188
  const fs = yield* FileSystem;
6189
6189
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
6190
- const response = yield* send(make5(download.method)(download.url), failed);
6190
+ const response = yield* send(make4(download.method)(download.url), failed);
6191
6191
  if (response.status < 200 || response.status >= 300)
6192
6192
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
6193
6193
  const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
@@ -12,7 +12,7 @@ import {
12
12
  add,
13
13
  getOrUndefinedUnsafe,
14
14
  getUnsafe,
15
- get3,
15
+ get4,
16
16
  Reference,
17
17
  toMillis,
18
18
  isSuccess,
@@ -22,7 +22,7 @@ import {
22
22
  interrupt2,
23
23
  void_2,
24
24
  isFailure2,
25
- makeUnsafe4,
25
+ makeUnsafe5,
26
26
  _await,
27
27
  isDoneUnsafe,
28
28
  succeed4,
@@ -36,7 +36,6 @@ import {
36
36
  findError,
37
37
  hasInterrupts2,
38
38
  interruptors,
39
- Clock,
40
39
  min2,
41
40
  exponential,
42
41
  spaced,
@@ -52,7 +51,7 @@ import {
52
51
  withFiber2,
53
52
  flatMap3,
54
53
  andThen2,
55
- map7,
54
+ map8,
56
55
  catchCause2,
57
56
  catchCauseIf,
58
57
  orDie,
@@ -97,11 +96,11 @@ import {
97
96
  Defect,
98
97
  Exit,
99
98
  toCodecJson
100
- } from "./chunk-qjqa338f.js";
99
+ } from "./chunk-zgraq2y3.js";
101
100
  import {
102
101
  interrupt,
103
102
  getCurrent,
104
- makeUnsafe,
103
+ makeUnsafe2,
105
104
  bounded,
106
105
  offerAll,
107
106
  failCause,
@@ -109,8 +108,9 @@ import {
109
108
  shutdownUnsafe,
110
109
  fromQueue,
111
110
  unwrap
112
- } from "./chunk-aezq3fyy.js";
111
+ } from "./chunk-t82w7459.js";
113
112
  import {
113
+ Clock,
114
114
  empty,
115
115
  fromInput,
116
116
  merge,
@@ -123,7 +123,7 @@ import {
123
123
  ParseOptions,
124
124
  RpcClientDefect,
125
125
  RpcClientError
126
- } from "./chunk-9gg1w4aa.js";
126
+ } from "./chunk-rz01craf.js";
127
127
 
128
128
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workers/Transferable.js
129
129
  class Collector extends (/* @__PURE__ */ Service2()("effect/workers/Transferable/Collector")) {
@@ -200,7 +200,7 @@ var withRunClient = (f) => suspend3(() => {
200
200
  buffer.push([data, context]);
201
201
  return void_3;
202
202
  });
203
- return map7(f((clientId, data) => {
203
+ return map8(f((clientId, data) => {
204
204
  const clientWrite = clientWrites.get(clientId);
205
205
  if (clientWrite) {
206
206
  return clientWrite(data);
@@ -237,7 +237,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
237
237
  const disableTracing = options?.disableTracing ?? false;
238
238
  const generateRequestId = options?.generateRequestId ?? (() => requestIdCounter++);
239
239
  const services = yield* context();
240
- const scope = get3(services, Scope);
240
+ const scope = get4(services, Scope);
241
241
  const entries = new Map;
242
242
  let isShutdown = false;
243
243
  yield* addFinalizer(scope, withFiber2((parent) => {
@@ -271,7 +271,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
271
271
  const queue = onStreamRequest(rpc, middleware, rpc.payloadSchema.make(payload), headers, opts?.streamBufferSize ?? 16, context);
272
272
  if (opts?.asQueue)
273
273
  return queue;
274
- return unwrap(map7(queue, fromQueue));
274
+ return unwrap(map8(queue, fromQueue));
275
275
  };
276
276
  };
277
277
  const onEffectRequest = (rpc, middleware, span, payload, headers, context, discard) => withFiber2((parentFiber) => {
@@ -483,7 +483,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
483
483
  };
484
484
  });
485
485
  var clientIdCounter = 0;
486
- var make4 = /* @__PURE__ */ fnUntraced(function* (group, options) {
486
+ var make3 = /* @__PURE__ */ fnUntraced(function* (group, options) {
487
487
  const clientId = clientIdCounter++;
488
488
  const {
489
489
  codecFor,
@@ -495,7 +495,7 @@ var make4 = /* @__PURE__ */ fnUntraced(function* (group, options) {
495
495
  const rpcSchemas = makeRpcSchemas(codecFor);
496
496
  const decodeDefect = decodeSync(codecFor(Defect()));
497
497
  const entries = new Map;
498
- const closing = makeUnsafe4();
498
+ const closing = makeUnsafe5();
499
499
  const interruptRequest = (requestId) => {
500
500
  if (!entries.has(requestId))
501
501
  return void_3;
@@ -643,7 +643,7 @@ var makeRpcSchemas = (codecFor) => {
643
643
  return entry;
644
644
  }
645
645
  const streamSchemas = getStreamSchemas(rpc.successSchema);
646
- const parseOptions = get3(rpc.annotations, ParseOptions);
646
+ const parseOptions = get4(rpc.annotations, ParseOptions);
647
647
  const exitSchema2 = exitSchema(rpc);
648
648
  let decodeDiscardExit;
649
649
  entry = {
@@ -804,7 +804,7 @@ var makePinger = /* @__PURE__ */ fnUntraced(function* (writePing, options) {
804
804
  const timeoutMillis = toMillis(options?.pingTimeout ?? interval);
805
805
  let lastSeen = clock.currentTimeMillisUnsafe();
806
806
  let awaitingResponse = false;
807
- const latch = makeUnsafe();
807
+ const latch = makeUnsafe2();
808
808
  const onFrame = () => {
809
809
  lastSeen = clock.currentTimeMillisUnsafe();
810
810
  awaitingResponse = false;
@@ -829,4 +829,4 @@ var layerProtocolSocket = (options) => effect(Protocol)(makeProtocolSocket(optio
829
829
  class ConnectionHooks extends (/* @__PURE__ */ Service2()("effect/rpc/RpcClient/ConnectionHooks")) {
830
830
  }
831
831
 
832
- export { layerJson, make4, withHeaders, layerProtocolSocket, ConnectionHooks };
832
+ export { layerJson, make3, withHeaders, layerProtocolSocket, ConnectionHooks };
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-qjqa338f.js";
16
+ } from "./chunk-zgraq2y3.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-0tjg9eya.js";
20
+ } from "./chunk-pxvd8w2v.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
@@ -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,15 +75,16 @@ import {
76
75
  toEquivalence,
77
76
  toCodecJson,
78
77
  Json
79
- } from "./chunk-qjqa338f.js";
78
+ } from "./chunk-zgraq2y3.js";
80
79
  import {
81
80
  runForEach,
82
81
  FileSystem
83
- } from "./chunk-aezq3fyy.js";
82
+ } from "./chunk-t82w7459.js";
84
83
  import {
85
84
  guard
86
- } from "./chunk-0tjg9eya.js";
85
+ } from "./chunk-pxvd8w2v.js";
87
86
  import {
87
+ currentTimeMillis,
88
88
  WebCrypto,
89
89
  SafeJson,
90
90
  AgentSandboxNetwork,
@@ -109,7 +109,7 @@ import {
109
109
  KitDigest,
110
110
  KitSetup,
111
111
  RunnerRpcError
112
- } from "./chunk-9gg1w4aa.js";
112
+ } from "./chunk-rz01craf.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";
@@ -1124,7 +1124,7 @@ var programLease = (work) => ({
1124
1124
  });
1125
1125
  var rpcRunFiles = (rpc, lease) => ({
1126
1126
  createRunFile: (file) => rpc.createRunFile({ lease, ...file }),
1127
- runFileParts: (request) => map7(rpc.runFileParts({ lease, ...request, partNumbers: [...request.partNumbers] }), ({ parts }) => parts),
1127
+ runFileParts: (request) => map8(rpc.runFileParts({ lease, ...request, partNumbers: [...request.partNumbers] }), ({ parts }) => parts),
1128
1128
  completeRunFile: ({ parts, ...request }) => rpc.completeRunFile({ lease, ...request, ...parts === undefined ? undefined : { parts: [...parts] } })
1129
1129
  });
1130
1130
 
@@ -4,7 +4,7 @@ import {
4
4
  searchDocs2,
5
5
  readDoc2,
6
6
  pinnedLink2
7
- } from "./chunk-wzr1n3zy.js";
7
+ } from "./chunk-6n3m0t02.js";
8
8
  export {
9
9
  DefaultDocsSearchLimit2 as DefaultDocsSearchLimit,
10
10
  pinnedLink2 as pinnedLink,