@kitman-sh/cli 0.13.7 → 0.13.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-pxvd8w2v.js → chunk-0tjg9eya.js} +1 -1
  2. package/dist/{chunk-9g8tc40f.js → chunk-0wj65j5e.js} +7 -7
  3. package/dist/{chunk-4bgj3b5r.js → chunk-1ht6jwzm.js} +10 -9
  4. package/dist/{chunk-4crf5vhd.js → chunk-53qp6kcp.js} +2 -2
  5. package/dist/{chunk-xt97vb58.js → chunk-69fcvx7d.js} +109 -65
  6. package/dist/{chunk-bbks1scp.js → chunk-6jtjcvnc.js} +60 -46
  7. package/dist/{chunk-4x3zm541.js → chunk-9gg1w4aa.js} +353 -434
  8. package/dist/{chunk-m406nanz.js → chunk-a44ebqzx.js} +6 -6
  9. package/dist/{chunk-t82w7459.js → chunk-aezq3fyy.js} +69 -218
  10. package/dist/{chunk-24h0y27w.js → chunk-cw61zyh5.js} +1 -1
  11. package/dist/{chunk-kk32jckf.js → chunk-ezv4p0zr.js} +4 -4
  12. package/dist/{chunk-mmd7mjv0.js → chunk-fh58za51.js} +3 -3
  13. package/dist/{chunk-m079pjdy.js → chunk-hezxa6q5.js} +7 -7
  14. package/dist/{chunk-vxfajzpz.js → chunk-kq88aaa3.js} +62 -16
  15. package/dist/{chunk-x44re8th.js → chunk-ksgt1tdc.js} +7 -7
  16. package/dist/{chunk-t37qzgmb.js → chunk-pj3mer60.js} +4 -4
  17. package/dist/{chunk-zgraq2y3.js → chunk-qjqa338f.js} +308 -111
  18. package/dist/{chunk-1nxcn08k.js → chunk-qkjfx2ts.js} +16 -16
  19. package/dist/{chunk-byg71zra.js → chunk-rz18qefg.js} +7 -7
  20. package/dist/{chunk-bs5bh8ys.js → chunk-s63fjc69.js} +20 -20
  21. package/dist/{chunk-mtdz4k32.js → chunk-tspf987k.js} +5 -5
  22. package/dist/{chunk-8v0t5kzg.js → chunk-v190zzc5.js} +1 -1
  23. package/dist/{chunk-22z1yemd.js → chunk-wzr1n3zy.js} +11 -5
  24. package/dist/{chunk-jbjz7b6n.js → chunk-x8sewxzm.js} +106 -106
  25. package/dist/{chunk-ggmwpwhf.js → chunk-z5f7g1w1.js} +2 -2
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -20,6 +20,7 @@ import {
20
20
  provideMerge,
21
21
  squash,
22
22
  pretty,
23
+ currentTimeMillis,
23
24
  max2,
24
25
  during,
25
26
  min2,
@@ -42,7 +43,7 @@ import {
42
43
  andThen2,
43
44
  tap2,
44
45
  result,
45
- map8,
46
+ map7,
46
47
  as,
47
48
  asSome2,
48
49
  asVoid,
@@ -104,7 +105,7 @@ import {
104
105
  decodeJsonString,
105
106
  encodeJsonStringSync,
106
107
  encodePrettyJsonString
107
- } from "./chunk-zgraq2y3.js";
108
+ } from "./chunk-qjqa338f.js";
108
109
  import {
109
110
  tap,
110
111
  mapError,
@@ -116,9 +117,8 @@ import {
116
117
  withDefault,
117
118
  option,
118
119
  String2
119
- } from "./chunk-t82w7459.js";
120
+ } from "./chunk-aezq3fyy.js";
120
121
  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
- make4,
170
+ make5,
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-4x3zm541.js";
233
+ } from "./chunk-9gg1w4aa.js";
234
234
  import {
235
235
  Id
236
- } from "./chunk-pxvd8w2v.js";
236
+ } from "./chunk-0tjg9eya.js";
237
237
  import {
238
238
  ChildProcessSpawner,
239
- make2
240
- } from "./chunk-vxfajzpz.js";
239
+ make3
240
+ } from "./chunk-kq88aaa3.js";
241
241
 
242
242
  // apps/cli/src/cli-error.ts
243
243
  function cliErrorCode(error, status) {
@@ -488,6 +488,7 @@ var Usage = [
488
488
  " kitman team open <team>",
489
489
  " kitman team invite <team> <person>",
490
490
  " kitman team delivery <team> gated|auto (only a person, signed in as an owner or admin)",
491
+ " kitman team scope <team> required|optional (whether agents must state a Task's scope; only a person)",
491
492
  "",
492
493
  "When Release runs: on each merge, when a Milestone is done, or when a Project is done. A Project inherits its Team's, a Team the Workspace's:",
493
494
  " kitman release workspace [merge|milestone|project] (setting it needs an owner or admin)",
@@ -718,6 +719,7 @@ var examples = [
718
719
  "kitman team open platform",
719
720
  "kitman team invite platform ada@example.com",
720
721
  "kitman team delivery platform gated",
722
+ "kitman team scope platform required",
721
723
  "kitman release workspace merge",
722
724
  "kitman release team platform milestone",
723
725
  'kitman release project "Loop stability" inherit',
@@ -866,7 +868,7 @@ function herdrRunnerCredentialName(runnerId) {
866
868
  return `herdr-runner:${runnerId}`;
867
869
  }
868
870
  function storedHerdrRunnerCredential(apiUrl, runnerId) {
869
- return map8(readAuthStore(), (auth) => agentCredentialForApi(auth, apiUrl, herdrRunnerCredentialName(runnerId)));
871
+ return map7(readAuthStore(), (auth) => agentCredentialForApi(auth, apiUrl, herdrRunnerCredentialName(runnerId)));
870
872
  }
871
873
  function writeRunnerCredentialFile(path, file) {
872
874
  return gen(function* () {
@@ -991,10 +993,10 @@ var sandboxMissing = (sandbox, missing) => ({
991
993
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
992
994
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
993
995
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
994
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-t37qzgmb.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
996
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-pj3mer60.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
995
997
  });
996
998
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
997
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-t37qzgmb.js")), (module) => module.updateHerdrCore(options))
999
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-pj3mer60.js")), (module) => module.updateHerdrCore(options))
998
1000
  });
999
1001
  var herdrCoreMissing = (error) => {
1000
1002
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1186,7 +1188,7 @@ var managedKitmanPath = gen(function* () {
1186
1188
  var installedKitmanVersion = gen(function* () {
1187
1189
  const fs = yield* FileSystem;
1188
1190
  const path = yield* Path;
1189
- return yield* fs.readLink(yield* managedKitmanPath).pipe(map8((target) => path.basename(path.dirname(target))), orElseSucceed(() => {
1191
+ return yield* fs.readLink(yield* managedKitmanPath).pipe(map7((target) => path.basename(path.dirname(target))), orElseSucceed(() => {
1190
1192
  return;
1191
1193
  }));
1192
1194
  });
@@ -1231,7 +1233,7 @@ var downloadManagedKitman = (apiUrl, platform) => gen(function* () {
1231
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({
1232
1234
  try: () => downloaded.arrayBuffer(),
1233
1235
  catch: (error) => new CliError({ message: `Downloading kitman ${manifest.version} failed: ${String(error)}` })
1234
- })), map8((bytes) => new Uint8Array(bytes)));
1236
+ })), map7((bytes) => new Uint8Array(bytes)));
1235
1237
  if (digestSha256(binary, "hex") !== release.sha256)
1236
1238
  return yield* new CliError({
1237
1239
  message: `The downloaded kitman ${manifest.version} for ${os}/${architecture} does not match its sha256; nothing was installed`
@@ -1420,12 +1422,12 @@ var syncTargets = (harness) => gen(function* () {
1420
1422
  });
1421
1423
  var syncKits = (input) => gen(function* () {
1422
1424
  const fs = yield* FileSystem;
1423
- const { syncKitSetup } = yield* promise(() => import("./chunk-byg71zra.js"));
1425
+ const { syncKitSetup } = yield* promise(() => import("./chunk-rz18qefg.js"));
1424
1426
  const harnesses = yield* syncTargets(input.harness);
1425
1427
  const chain = yield* input.client.getKitChain(input.workspaceId);
1426
1428
  for (const { name, problem } of chain.skipped)
1427
1429
  yield* log(`Warning: skipped Kit ${name}: ${problem}`);
1428
- 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 })));
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 })));
1429
1431
  const manifest = yield* userHarnessSyncPath;
1430
1432
  const previous = yield* fs.readFileString(manifest).pipe(flatMap3(decodeEffect(SyncedHarnesses)), orElseSucceed(() => ({})));
1431
1433
  const kitman = (yield* runningManagedInstall(process.platform)) ? yield* managedKitmanPath : "kitman";
@@ -1566,7 +1568,7 @@ function idempotencyKey(value, operation) {
1566
1568
  const explicit = value?.trim();
1567
1569
  if (explicit)
1568
1570
  return succeed6(explicit);
1569
- return SecureRandom.pipe(flatMap3((random) => random.uuidV4()), map8((id) => `kitman-cli:${operation}:${id}`), provide3(layerWebCrypto));
1571
+ return SecureRandom.pipe(flatMap3((random) => random.uuidV4()), map7((id) => `kitman-cli:${operation}:${id}`), provide3(layerWebCrypto));
1570
1572
  }
1571
1573
  function segment(value) {
1572
1574
  return encodeURIComponent(value);
@@ -1684,7 +1686,7 @@ var machineRunnerServices = gen(function* () {
1684
1686
  return yield* forEach(files.flatMap((file) => {
1685
1687
  const runnerId = pattern.exec(file)?.[1];
1686
1688
  return runnerId === undefined ? [] : [{ runnerId, file: path.join(directory, file) }];
1687
- }), ({ runnerId, file }) => map8(fs.readFileString(file), (definition) => ({
1689
+ }), ({ runnerId, file }) => map7(fs.readFileString(file), (definition) => ({
1688
1690
  runnerId,
1689
1691
  command: serviceCommand(platform, definition)
1690
1692
  })));
@@ -1699,7 +1701,7 @@ var ownersRunners = (apiUrl) => gen(function* () {
1699
1701
  return;
1700
1702
  const client = yield* clientFor(apiUrl, session);
1701
1703
  const workspaces = (yield* client.listWorkspaces()).items;
1702
- const lists = yield* forEach(workspaces, (workspace) => map8(client.listRunners(workspace.id), (list) => list.items));
1704
+ const lists = yield* forEach(workspaces, (workspace) => map7(client.listRunners(workspace.id), (list) => list.items));
1703
1705
  return new Map(lists.flat().map((runner) => [runner.id, runner]));
1704
1706
  }).pipe(orElseSucceed(() => {
1705
1707
  return;
@@ -1822,7 +1824,7 @@ var machineRunnerCommand = (action, apiUrl, options) => gen(function* () {
1822
1824
 
1823
1825
  // apps/cli/src/repo-binding-setup.ts
1824
1826
  var Git = Reference("kitman/cli/Git", {
1825
- defaultValue: () => (args) => runCommand2("git", args).pipe(map8((stdout) => stdout.trim()))
1827
+ defaultValue: () => (args) => runCommand2("git", args).pipe(map7((stdout) => stdout.trim()))
1826
1828
  });
1827
1829
  var repoBindingInputFromCurrentRepo = flatMap3(Git, repoBindingInput);
1828
1830
  function repoBindingInput(git) {
@@ -1937,7 +1939,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
1937
1939
  run: (command, args) => runCommand2(command, args),
1938
1940
  attach: (command, args) => gen(function* () {
1939
1941
  const spawner = yield* ChildProcessSpawner;
1940
- const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1942
+ const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1941
1943
  const exitCode = yield* handle.exitCode;
1942
1944
  if (exitCode !== 0)
1943
1945
  return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
@@ -1959,8 +1961,8 @@ function initCommand(args) {
1959
1961
  const apiUrl = yield* resolveApiUrl(flags.apiUrl);
1960
1962
  const steps = [];
1961
1963
  const step = (name, outcome, detail) => andThen2(sync2(() => steps.push({ name, outcome, detail })), log(`${name}: ${outcomeLabel[outcome]} (${detail})`));
1962
- const ask = (prompt, fallback) => flags.yes ? succeed6(fallback) : promptLine(fallback === "" ? `${prompt}: ` : `${prompt} [${fallback}]: `).pipe(map8((answer) => answer.trim() || fallback));
1963
- const confirm = (prompt, fallback) => map8(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(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
1966
  const existingSession = yield* sessionForApiWithRefresh(apiUrl);
1965
1967
  const session = existingSession ?? (yield* (yield* Login)(apiUrl));
1966
1968
  yield* step("Login", existingSession === undefined ? "set_up" : "already", apiUrl);
@@ -2145,7 +2147,7 @@ var runnerServiceStep = (apiUrl, runnerId, change, step) => gen(function* () {
2145
2147
  yield* step("Runner service", change.fresh ? "set_up" : "repaired", "started");
2146
2148
  });
2147
2149
  var credentialNote = { missing: ", credential restored", refused: ", credential re-keyed", accepted: "" };
2148
- var machineName = map8(option(String2("KITMAN_RUNNER_NAME")), (name) => getOrElse(name, () => hostname()));
2150
+ var machineName = map7(option(String2("KITMAN_RUNNER_NAME")), (name) => getOrElse(name, () => hostname()));
2149
2151
  var managedRunnerService = (runnerId, apiUrl) => gen(function* () {
2150
2152
  const kitman = yield* managedKitmanPath;
2151
2153
  const bin = (yield* Path).dirname(kitman);
@@ -2266,9 +2268,9 @@ function runnerServiceState(name) {
2266
2268
  return gen(function* () {
2267
2269
  const manager = yield* ServiceManager;
2268
2270
  if (manager.platform === "linux")
2269
- return yield* manager.run("systemctl", ["--user", "is-active", `${name}.service`]).pipe(map8((state) => `systemd: ${state.trim()}`), orElseSucceed(() => "systemd: not running"));
2271
+ return yield* manager.run("systemctl", ["--user", "is-active", `${name}.service`]).pipe(map7((state) => `systemd: ${state.trim()}`), orElseSucceed(() => "systemd: not running"));
2270
2272
  if (manager.platform === "darwin")
2271
- 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"));
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"));
2272
2274
  return;
2273
2275
  });
2274
2276
  }
@@ -2339,7 +2341,7 @@ var package_default = {
2339
2341
  };
2340
2342
 
2341
2343
  // apps/cli/src/scaffold.ts
2342
- var cliVersion = "0.13.7";
2344
+ var cliVersion = "0.13.9";
2343
2345
  var packageJson = (name, scaffold) => `${JSON.stringify({
2344
2346
  name,
2345
2347
  private: true,
@@ -2491,7 +2493,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2491
2493
 
2492
2494
  // apps/cli/src/commands.ts
2493
2495
  var ClientId = "kitman-cli";
2494
- var agentRuntime = promise(() => import("./chunk-jbjz7b6n.js"));
2496
+ var agentRuntime = promise(() => import("./chunk-x8sewxzm.js"));
2495
2497
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2496
2498
  defaultValue: () => gen(function* () {
2497
2499
  const tui = yield* tryPromise({
@@ -2923,7 +2925,7 @@ function harnessSync(args) {
2923
2925
  });
2924
2926
  });
2925
2927
  }
2926
- var readStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map8((text) => text.trim()));
2928
+ var readStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map7((text) => text.trim()));
2927
2929
  function promptLine(prompt) {
2928
2930
  return gen(function* () {
2929
2931
  const terminal = yield* Terminal;
@@ -3143,6 +3145,18 @@ function teamCommand(args) {
3143
3145
  yield* client.updateTeamDeliverySettings(team.id, { delivery, expectedRevision: revision });
3144
3146
  return yield* log(delivery === "auto" ? `${team.key} delivers in full auto: a passing Review of the head approves it, and its Loops merge and release with nobody asked` : `${team.key} is gated: a person approves each merge and release`);
3145
3147
  }
3148
+ if (command.action === "scope") {
3149
+ const team = yield* teamNamed(client, workspaceId, requiredArg(command, "team"));
3150
+ const scope = command.args[1];
3151
+ if (scope !== "required" && scope !== "optional")
3152
+ return yield* new CliError({ message: "team scope requires <team> required|optional" });
3153
+ const { revision } = yield* client.getTeamDeliverySettings(team.id);
3154
+ yield* client.updateTeamDeliverySettings(team.id, {
3155
+ agentsStateScope: scope === "required",
3156
+ expectedRevision: revision
3157
+ });
3158
+ return yield* log(scope === "required" ? `${team.key}'s agents must state a Task's scope: one without a Promise is refused, with how to scope it` : `${team.key}'s agents may leave out a Task's scope`);
3159
+ }
3146
3160
  if (command.action === "invite") {
3147
3161
  const team = yield* teamNamed(client, workspaceId, requiredArg(command, "team"));
3148
3162
  const userId = command.args[1];
@@ -3515,7 +3529,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3515
3529
  });
3516
3530
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3517
3531
  defaultValue: () => (options) => gen(function* () {
3518
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-m406nanz.js"));
3532
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-a44ebqzx.js"));
3519
3533
  return yield* makeRunnerRpcClient({
3520
3534
  runnerId: options.runnerId,
3521
3535
  bearer: options.bearer,
@@ -3530,7 +3544,7 @@ var runnerHostSettings = gen(function* () {
3530
3544
  "KITMAN_RUNNER_FULL_ACCESS",
3531
3545
  "SSH_AUTH_SOCK"
3532
3546
  ];
3533
- const environment = Object.fromEntries(yield* forEach(names, (name) => String2(name).pipe(option, map8((value) => [name, getOrUndefined(value)?.trim()]))));
3547
+ const environment = Object.fromEntries(yield* forEach(names, (name) => String2(name).pipe(option, map7((value) => [name, getOrUndefined(value)?.trim()]))));
3534
3548
  return {
3535
3549
  fullAccess: environment["KITMAN_RUNNER_FULL_ACCESS"] === "1",
3536
3550
  sshAgentAvailable: environment["SSH_AUTH_SOCK"] !== undefined,
@@ -3814,11 +3828,11 @@ function startCanonicalHerdrRunnerCommand(input) {
3814
3828
  }).pipe(tap2((opened) => opened.settledRuns([])))));
3815
3829
  const signals = yield* makeReplicaSignals;
3816
3830
  const bundles = yield* kitmanBundles({
3817
- fetch: (digest) => rpc.bundle(digest).pipe(map8((found) => found.bundle)),
3831
+ fetch: (digest) => rpc.bundle(digest).pipe(map7((found) => found.bundle)),
3818
3832
  cacheDir: bundleCache
3819
3833
  });
3820
3834
  const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
3821
- 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);
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);
3822
3836
  const platform = yield* context();
3823
3837
  const updated = yield* make15();
3824
3838
  const scope = yield* scope2;
@@ -3928,18 +3942,18 @@ function startCanonicalHerdrRunnerCommand(input) {
3928
3942
  ...work.secretDestinations === undefined ? undefined : { secretDestinations: work.secretDestinations }
3929
3943
  },
3930
3944
  recordRefusal: refused,
3931
- revokedSecrets: heartbeatOf(work).pipe(map8((state) => state.revokedSecrets ?? [])),
3945
+ revokedSecrets: heartbeatOf(work).pipe(map7((state) => state.revokedSecrets ?? [])),
3932
3946
  sandbox: {
3933
3947
  backend: work.sandbox ?? sandboxOf(work),
3934
3948
  policy: agentStepSandboxPolicy(work, input.apiUrl, runnerState)
3935
3949
  },
3936
- settled: heartbeatOf(work).pipe(map8((state) => state.settled || state.outputSubmitted === true)),
3950
+ settled: heartbeatOf(work).pipe(map7((state) => state.settled || state.outputSubmitted === true)),
3937
3951
  ...agentStepExecutionLimit(work, now),
3938
3952
  steering: {
3939
3953
  ...signals.steers(work.id),
3940
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))))
3941
3955
  }
3942
- }).pipe(map8((outcome) => agentStepRunOutcome(outcome, {
3956
+ }).pipe(map7((outcome) => agentStepRunOutcome(outcome, {
3943
3957
  sandbox: work.sandbox ?? sandboxOf(work),
3944
3958
  lacksLoginSecret: lacksLoginSecret(work.brief.harness, work.secrets)
3945
3959
  })), catch_((refusal) => succeed6({ status: "failed", summary: refusal.summary }))))
@@ -4072,7 +4086,7 @@ function mcpCommand(args) {
4072
4086
  if (command.action === "run") {
4073
4087
  if (command.args.length > 0)
4074
4088
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4075
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-xt97vb58.js"));
4089
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-69fcvx7d.js"));
4076
4090
  return yield* runMcpServerCommand({ flags: command.flags });
4077
4091
  }
4078
4092
  if (command.action !== "setup")
@@ -4560,7 +4574,7 @@ function programLoopCommand(command) {
4560
4574
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4561
4575
  });
4562
4576
  }
4563
- var docsModule = promise(() => import("./chunk-8v0t5kzg.js"));
4577
+ var docsModule = promise(() => import("./chunk-v190zzc5.js"));
4564
4578
  function docsCommand(args) {
4565
4579
  return gen(function* () {
4566
4580
  const command = parseCommand(args);
@@ -4980,7 +4994,7 @@ function transcriptCommand(args) {
4980
4994
  return yield* new CliError({
4981
4995
  message: `Run ${runId} has no ${stepKey === undefined ? "Step attempts" : `attempt of ${stepKey}`}${attempt === undefined ? "" : ` numbered ${attempt}`}`
4982
4996
  });
4983
- const items = yield* forEach(asked, (found) => map8(transcriptAfter(client, runId, found.id, 0), (entries) => ({
4997
+ const items = yield* forEach(asked, (found) => map7(transcriptAfter(client, runId, found.id, 0), (entries) => ({
4984
4998
  stepKey: found.stepKey,
4985
4999
  attempt: found.attempt,
4986
5000
  stepAttemptId: found.id,
@@ -5260,7 +5274,7 @@ function verifyCommand(args) {
5260
5274
  }
5261
5275
  });
5262
5276
  }
5263
- var secretValueFromStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map8((text) => text.replace(/\r?\n$/, "")));
5277
+ var secretValueFromStdin = Stdio.pipe(flatMap3((stdio) => mkString(decodeText(stdio.stdin))), map7((text) => text.replace(/\r?\n$/, "")));
5264
5278
  function secretCommand(args) {
5265
5279
  return gen(function* () {
5266
5280
  const command = parseCommand(args.length === 1 ? [...args, "list"] : args);
@@ -5394,9 +5408,9 @@ function changeRequestCommand(args) {
5394
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}`);
5395
5409
  });
5396
5410
  }
5397
- var KitWriter = map8(promise(() => import("./chunk-bs5bh8ys.js")), (build) => build.writeKit);
5411
+ var KitWriter = map7(promise(() => import("./chunk-s63fjc69.js")), (build) => build.writeKit);
5398
5412
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5399
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-bs5bh8ys.js")), (build) => build.buildKit(directory))
5413
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-s63fjc69.js")), (build) => build.buildKit(directory))
5400
5414
  });
5401
5415
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5402
5416
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -5413,7 +5427,7 @@ var buildKitInto = (command) => gen(function* () {
5413
5427
  yield* (yield* KitWriter)(directory, built, out).pipe(mapError2(() => new CliError({ message: `${path.join(directory, "package.json")} is not a JSON object` })));
5414
5428
  yield* log(`Built ${built.name} ${built.version} into ${out}`);
5415
5429
  });
5416
- var optionalEnv = (name) => String2(name).pipe(option, map8(getOrUndefined));
5430
+ var optionalEnv = (name) => String2(name).pipe(option, map7(getOrUndefined));
5417
5431
  var ciIdToken = (apiUrl) => gen(function* () {
5418
5432
  const gitlab = yield* optionalEnv("KITMAN_ID_TOKEN");
5419
5433
  if (gitlab !== undefined)
@@ -6090,9 +6104,9 @@ var runnerDelivery = (client, runner, askedTeamId) => {
6090
6104
  providerActions: postures === undefined ? "" : Object.entries(postures).map(([action, posture]) => `${action}=${posture}`).join(",")
6091
6105
  };
6092
6106
  };
6093
- return teamId === undefined ? succeed6(row("per_team")) : client.getTeamDeliverySettings(teamId).pipe(map8((settings) => row(settings.delivery)), catchTag("KitmanClientError", (error) => succeed6(row("unknown", error.message))));
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))));
6094
6108
  };
6095
- var runnerDoctorRowOnThisMachine = (runner) => map8(runnerServiceState(runnerServiceName(runner.id)), (service) => ({
6109
+ var runnerDoctorRowOnThisMachine = (runner) => map7(runnerServiceState(runnerServiceName(runner.id)), (service) => ({
6096
6110
  ...runnerDoctorRow(runner),
6097
6111
  ...service === undefined ? undefined : { service }
6098
6112
  }));
@@ -6173,7 +6187,7 @@ function downloadPresignedAsset(download, outputPath) {
6173
6187
  return gen(function* () {
6174
6188
  const fs = yield* FileSystem;
6175
6189
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
6176
- const response = yield* send(make4(download.method)(download.url), failed);
6190
+ const response = yield* send(make5(download.method)(download.url), failed);
6177
6191
  if (response.status < 200 || response.status >= 300)
6178
6192
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
6179
6193
  const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));