@kitman-sh/cli 0.33.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/{chunk-nwbry6c8.js → chunk-0m8ktgmz.js} +286 -114
  2. package/dist/{chunk-hgxhpj6m.js → chunk-2a40hhfz.js} +4 -4
  3. package/dist/{chunk-a9ncx2a8.js → chunk-2gz59jcx.js} +1 -1
  4. package/dist/{chunk-8fyfsajs.js → chunk-337drcr7.js} +29 -178
  5. package/dist/{chunk-np5n54ky.js → chunk-3jxdtkwd.js} +18 -18
  6. package/dist/{chunk-vz38kngm.js → chunk-6387vj9z.js} +2 -2
  7. package/dist/{chunk-samxkpbz.js → chunk-6hxtg6eb.js} +3 -3
  8. package/dist/{chunk-yveqd8ye.js → chunk-89ygm64f.js} +4 -4
  9. package/dist/{chunk-jrwpte6y.js → chunk-8p5csa63.js} +46 -46
  10. package/dist/{chunk-9tyv6211.js → chunk-9da9b7ys.js} +17 -17
  11. package/dist/{chunk-bnhb3cth.js → chunk-a230abnk.js} +2 -2
  12. package/dist/{chunk-ak1qrm4q.js → chunk-d64j8v9n.js} +7 -7
  13. package/dist/{chunk-racse7zf.js → chunk-djzfaqaq.js} +20 -20
  14. package/dist/{chunk-h2f26xbd.js → chunk-ew07nt2d.js} +61 -61
  15. package/dist/{chunk-gnq1ryhx.js → chunk-fr0qseam.js} +4 -4
  16. package/dist/{chunk-s34am3kw.js → chunk-g5b61tek.js} +5 -5
  17. package/dist/{chunk-9nbqzdqp.js → chunk-gy7nygep.js} +2 -2
  18. package/dist/{chunk-tsx0347c.js → chunk-haq904fk.js} +1 -1
  19. package/dist/{chunk-x29m7k25.js → chunk-hwjp28rh.js} +2 -2
  20. package/dist/{chunk-sgkgwzvb.js → chunk-phx3zffc.js} +8 -8
  21. package/dist/{chunk-4qjfn1sa.js → chunk-qvpkwnky.js} +1 -1
  22. package/dist/{chunk-mhx0tgm3.js → chunk-r90j80q5.js} +6 -6
  23. package/dist/{chunk-xkkyx7bn.js → chunk-swc0ctf2.js} +3 -3
  24. package/dist/{chunk-1zb8h7gv.js → chunk-w8hf2etp.js} +59 -40
  25. package/dist/{chunk-py3133q0.js → chunk-wkbsbxp8.js} +6 -6
  26. package/dist/{chunk-5kqt4bqp.js → chunk-y7bth30s.js} +1 -1
  27. package/dist/index.js +4 -4
  28. package/package.json +1 -1
@@ -9,10 +9,10 @@ import {
9
9
  readOpencode2,
10
10
  databaseStamp2,
11
11
  runOpencodeReader2
12
- } from "./chunk-s34am3kw.js";
13
- import"./chunk-9nbqzdqp.js";
14
- import"./chunk-8fyfsajs.js";
15
- import"./chunk-h2f26xbd.js";
12
+ } from "./chunk-g5b61tek.js";
13
+ import"./chunk-gy7nygep.js";
14
+ import"./chunk-337drcr7.js";
15
+ import"./chunk-ew07nt2d.js";
16
16
  export {
17
17
  databaseStamp2 as databaseStamp,
18
18
  decoded2 as decoded,
@@ -35,19 +35,19 @@ import {
35
35
  isJsonObject,
36
36
  isString2,
37
37
  encodeUnknownJsonStringSync
38
- } from "./chunk-h2f26xbd.js";
38
+ } from "./chunk-ew07nt2d.js";
39
39
  import {
40
40
  currentTimeMillis,
41
- make11,
41
+ make10,
42
42
  runForEach,
43
43
  toPull,
44
44
  FileSystem,
45
45
  compiled2
46
- } from "./chunk-8fyfsajs.js";
46
+ } from "./chunk-337drcr7.js";
47
47
  import {
48
48
  ChildProcessSpawner,
49
49
  make3
50
- } from "./chunk-9nbqzdqp.js";
50
+ } from "./chunk-gy7nygep.js";
51
51
 
52
52
  // packages/agent-runtime/src/opencode-store.ts
53
53
  import { lstatSync, readFileSync, realpathSync, writeSync } from "fs";
@@ -266,7 +266,7 @@ var spawnReader = (request) => gen(function* () {
266
266
  const spawner = yield* ChildProcessSpawner;
267
267
  const [command, ...args] = opencodeReaderCommand();
268
268
  return yield* spawner.spawn(make3(command, args, {
269
- stdin: make11(new TextEncoder().encode(request)),
269
+ stdin: make10(new TextEncoder().encode(request)),
270
270
  stderr: "ignore",
271
271
  extendEnv: false,
272
272
  env: {},
@@ -22,7 +22,7 @@ import {
22
22
  map9,
23
23
  raceFirst,
24
24
  scoped
25
- } from "./chunk-h2f26xbd.js";
25
+ } from "./chunk-ew07nt2d.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-8fyfsajs.js";
34
+ } from "./chunk-337drcr7.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;
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  isString2
4
- } from "./chunk-h2f26xbd.js";
4
+ } from "./chunk-ew07nt2d.js";
5
5
 
6
6
  // packages/core/src/question-recommendation.ts
7
7
  var optionValue = (option) => isString2(option) ? option : option.value;
@@ -15,8 +15,8 @@ import {
15
15
  writeSrtSettings2,
16
16
  srtStepArgv2,
17
17
  srtArgv2
18
- } from "./chunk-8fyfsajs.js";
19
- import"./chunk-h2f26xbd.js";
18
+ } from "./chunk-337drcr7.js";
19
+ import"./chunk-ew07nt2d.js";
20
20
  export {
21
21
  compiled2 as compiled,
22
22
  harnessesUnsupportedInDocker2 as harnessesUnsupportedInDocker,
@@ -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-h2f26xbd.js";
141
+ } from "./chunk-ew07nt2d.js";
142
142
  import {
143
143
  WebCrypto,
144
144
  makeUnsafe,
@@ -175,24 +175,24 @@ import {
175
175
  StepManifest,
176
176
  KitSetup,
177
177
  RunnerRpcError
178
- } from "./chunk-nwbry6c8.js";
178
+ } from "./chunk-0m8ktgmz.js";
179
179
  import {
180
180
  currentTimeMillis,
181
181
  getCurrent,
182
182
  runForEach,
183
183
  FileSystem
184
- } from "./chunk-8fyfsajs.js";
184
+ } from "./chunk-337drcr7.js";
185
185
  import {
186
186
  splitQuestionOptions,
187
187
  recommendationProblem,
188
188
  questionAdvice
189
- } from "./chunk-tsx0347c.js";
189
+ } from "./chunk-haq904fk.js";
190
190
  import {
191
191
  guard,
192
192
  Id,
193
193
  Timestamp,
194
194
  ActorType
195
- } from "./chunk-4qjfn1sa.js";
195
+ } from "./chunk-qvpkwnky.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
  })
@@ -18,7 +18,7 @@ import {
18
18
  isMinLength,
19
19
  isMaxLength,
20
20
  FiniteFromString
21
- } from "./chunk-h2f26xbd.js";
21
+ } from "./chunk-ew07nt2d.js";
22
22
 
23
23
  // packages/core/src/schema.ts
24
24
  var Days = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
@@ -6,10 +6,7 @@ import {
6
6
  gen,
7
7
  flatMap3,
8
8
  provideContext2
9
- } from "./chunk-h2f26xbd.js";
10
- import {
11
- runForEach
12
- } from "./chunk-8fyfsajs.js";
9
+ } from "./chunk-ew07nt2d.js";
13
10
  import {
14
11
  WebSocketConstructor,
15
12
  layerWebSocketConstructorGlobal,
@@ -19,13 +16,16 @@ import {
19
16
  RunnerReplicaRpcs,
20
17
  RunnerRunFileRpcs,
21
18
  ProgramRpcs
22
- } from "./chunk-nwbry6c8.js";
19
+ } from "./chunk-0m8ktgmz.js";
20
+ import {
21
+ runForEach
22
+ } from "./chunk-337drcr7.js";
23
23
  import {
24
24
  layerJson,
25
25
  make4,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-np5n54ky.js";
28
+ } from "./chunk-3jxdtkwd.js";
29
29
 
30
30
  // packages/live/src/rpc/runner-client.ts
31
31
  var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
@@ -24,11 +24,11 @@ import {
24
24
  Record,
25
25
  Int,
26
26
  fromJsonString
27
- } from "./chunk-h2f26xbd.js";
27
+ } from "./chunk-ew07nt2d.js";
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-8fyfsajs.js";
31
+ } from "./chunk-337drcr7.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-nwbry6c8.js";
42
+ } from "./chunk-0m8ktgmz.js";
43
43
 
44
44
  // packages/core/src/npm-registry.ts
45
45
  var KitManifest = Struct({
@@ -12,9 +12,10 @@ import {
12
12
  succeed,
13
13
  isSuccess,
14
14
  TaggedError,
15
- make16,
15
+ make15,
16
16
  _await,
17
17
  fail5,
18
+ succeed4,
18
19
  succeed5,
19
20
  provide2,
20
21
  squash,
@@ -108,20 +109,7 @@ import {
108
109
  decodeJsonStringOption,
109
110
  encodeJsonStringSync,
110
111
  encodePrettyJsonString
111
- } from "./chunk-h2f26xbd.js";
112
- import {
113
- currentTimeMillis,
114
- tap,
115
- mapError,
116
- decodeText,
117
- run,
118
- mkString,
119
- FileSystem,
120
- Path,
121
- withDefault,
122
- option,
123
- String2
124
- } from "./chunk-8fyfsajs.js";
112
+ } from "./chunk-ew07nt2d.js";
125
113
  import {
126
114
  SecureRandom,
127
115
  layerWebCrypto,
@@ -251,15 +239,28 @@ import {
251
239
  harnessNames,
252
240
  herdrRunnerCapabilities2,
253
241
  declaredChecks
254
- } from "./chunk-nwbry6c8.js";
242
+ } from "./chunk-0m8ktgmz.js";
243
+ import {
244
+ currentTimeMillis,
245
+ tap,
246
+ mapError,
247
+ decodeText,
248
+ run,
249
+ mkString,
250
+ FileSystem,
251
+ Path,
252
+ withDefault,
253
+ option,
254
+ String2
255
+ } from "./chunk-337drcr7.js";
255
256
  import {
256
257
  ChildProcessSpawner,
257
258
  make3
258
- } from "./chunk-9nbqzdqp.js";
259
+ } from "./chunk-gy7nygep.js";
259
260
  import {
260
261
  Id,
261
262
  Timestamp
262
- } from "./chunk-4qjfn1sa.js";
263
+ } from "./chunk-qvpkwnky.js";
263
264
 
264
265
  // apps/cli/src/cli-error.ts
265
266
  function cliErrorCode(error, status) {
@@ -1326,10 +1327,10 @@ var sandboxMissing = (sandbox, missing) => ({
1326
1327
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
1327
1328
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
1328
1329
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
1329
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-yveqd8ye.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1330
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-89ygm64f.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1330
1331
  });
1331
1332
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
1332
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-yveqd8ye.js")), (module) => module.updateHerdrCore(options))
1333
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-89ygm64f.js")), (module) => module.updateHerdrCore(options))
1333
1334
  });
1334
1335
  var herdrCoreMissing = (error) => {
1335
1336
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1630,15 +1631,28 @@ var runnerUpdater = (input) => {
1630
1631
  let claiming = true;
1631
1632
  let updating = false;
1632
1633
  let problems = [];
1634
+ let draining;
1633
1635
  const failed = new Set;
1634
1636
  let requiredFailedAt;
1635
- const drain = suspend3(() => {
1637
+ const drain = (version) => gen(function* () {
1636
1638
  claiming = false;
1637
- return gen(function* () {
1639
+ const since = yield* currentTimeMillis;
1640
+ const switchNow = yield* make15();
1641
+ if (version !== undefined)
1642
+ draining = {
1643
+ report: {
1644
+ version,
1645
+ since: toIso(since),
1646
+ until: toIso(since + toMillis(DrainLimit))
1647
+ },
1648
+ switchNow
1649
+ };
1650
+ const idle = gen(function* () {
1638
1651
  while ((yield* input.inFlight) > 0)
1639
1652
  yield* sleep("1 second");
1640
- }).pipe(timeoutOrElse({ duration: DrainLimit, orElse: () => void_3 }));
1641
- });
1653
+ });
1654
+ yield* raceFirst(idle.pipe(timeoutOrElse({ duration: DrainLimit, orElse: () => void_3 })), _await(switchNow));
1655
+ }).pipe(ensuring2(sync2(() => draining = undefined)));
1642
1656
  const channel = () => input.releaseChannel?.() ?? DefaultReleaseChannel;
1643
1657
  const onChannel = (version) => releaseChannelOffers(channel(), version);
1644
1658
  const attempt = gen(function* () {
@@ -1654,11 +1668,13 @@ var runnerUpdater = (input) => {
1654
1668
  const reported = (yield* runCommand2(downloaded.kitman, ["--version"], { timeout: "30 seconds" }).pipe(step("start"))).trim();
1655
1669
  if (reported !== downloaded.version)
1656
1670
  return yield* new UpdateStepFailed({ step: "start", reason: `it reported version ${reported || "none"}` });
1657
- yield* drain;
1671
+ yield* drain(downloaded.version);
1658
1672
  yield* linkManagedKitman(downloaded.kitman).pipe(step("switch"));
1659
1673
  return yield* new RunnerUpdated({ version: downloaded.version });
1660
1674
  });
1661
- const update = (version) => suspend3(() => {
1675
+ const update = (version, options) => suspend3(() => {
1676
+ if (options?.now === true && draining !== undefined)
1677
+ return succeed4(draining.switchNow, undefined);
1662
1678
  if (updating || failed.has(version))
1663
1679
  return void_3;
1664
1680
  updating = true;
@@ -1706,7 +1722,7 @@ var runnerUpdater = (input) => {
1706
1722
  updating = true;
1707
1723
  const served = input.version === undefined ? succeed(undefined) : yield* result(servedKitmanRelease(input.apiUrl));
1708
1724
  if (isSuccess(served) && servesNewer(served.success))
1709
- return yield* andThen2(drain, fail7(stop));
1725
+ return yield* andThen2(drain(served.success?.version), fail7(stop));
1710
1726
  requiredFailedAt = now;
1711
1727
  updating = false;
1712
1728
  const reason = isSuccess(served) ? `serves kitman ${served.success?.version}, not newer than this Runner's ${input.version} on its ${channel()} channel` : `its release could not be read: ${served.failure.message}`;
@@ -1723,6 +1739,7 @@ var runnerUpdater = (input) => {
1723
1739
  });
1724
1740
  return {
1725
1741
  claiming: () => claiming,
1742
+ updateDrain: () => draining?.report,
1726
1743
  problems: () => problems,
1727
1744
  update,
1728
1745
  cannotUpdate,
@@ -1773,7 +1790,7 @@ var syncTargets = (harness) => gen(function* () {
1773
1790
  });
1774
1791
  var syncKits = (input) => gen(function* () {
1775
1792
  const fs = yield* FileSystem;
1776
- const { syncKitSetup } = yield* promise(() => import("./chunk-ak1qrm4q.js"));
1793
+ const { syncKitSetup } = yield* promise(() => import("./chunk-d64j8v9n.js"));
1777
1794
  const harnesses = yield* syncTargets(input.harness);
1778
1795
  const chain = yield* input.client.getKitChain(input.workspaceId);
1779
1796
  for (const { name, problem } of chain.skipped)
@@ -3268,7 +3285,7 @@ var shipped_steps_generated_default = {
3268
3285
  };
3269
3286
 
3270
3287
  // apps/cli/src/scaffold-files.ts
3271
- var cliVersion = "0.33.0";
3288
+ var cliVersion = "0.34.0";
3272
3289
  var shippedLoopSteps = new Map(Object.entries(shipped_steps_generated_default));
3273
3290
  var loopSteps = (loop) => shippedLoopSteps.get(loop) ?? [];
3274
3291
  var replacedStep = (loop) => loopSteps(loop).find((step) => step.from === defaultKitName && step.exported?.startsWith("steps.") === true);
@@ -3533,7 +3550,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
3533
3550
 
3534
3551
  // apps/cli/src/commands.ts
3535
3552
  var ClientId = "kitman-cli";
3536
- var agentRuntime = promise(() => import("./chunk-racse7zf.js"));
3553
+ var agentRuntime = promise(() => import("./chunk-djzfaqaq.js"));
3537
3554
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
3538
3555
  defaultValue: () => gen(function* () {
3539
3556
  const tui = yield* tryPromise({
@@ -5072,7 +5089,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
5072
5089
  });
5073
5090
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
5074
5091
  defaultValue: () => (options) => gen(function* () {
5075
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-py3133q0.js"));
5092
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-wkbsbxp8.js"));
5076
5093
  return yield* makeRunnerRpcClient({
5077
5094
  runnerId: options.runnerId,
5078
5095
  bearer: options.bearer,
@@ -5155,6 +5172,7 @@ var updateRefusedRunner = (input) => gen(function* () {
5155
5172
  }
5156
5173
  yield* sleep(RequiredRetryAfter);
5157
5174
  });
5175
+ var updateDrainReport = (updateDrain) => updateDrain === undefined ? undefined : { updateDrain };
5158
5176
  function startCanonicalHerdrRunnerCommand(input) {
5159
5177
  const startOnce = gen(function* () {
5160
5178
  const {
@@ -5400,7 +5418,7 @@ function startCanonicalHerdrRunnerCommand(input) {
5400
5418
  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);
5401
5419
  yield* suspend3(() => sleep(ownerLogin.expired() ? ownerLoginRetryInterval : ownerLoginInterval)).pipe(andThen2(checkOwnerLogin), forever, forkScoped);
5402
5420
  const platform = yield* context();
5403
- const updated = yield* make16();
5421
+ const updated = yield* make15();
5404
5422
  const scope = yield* scope2;
5405
5423
  const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
5406
5424
  const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
@@ -5411,7 +5429,7 @@ function startCanonicalHerdrRunnerCommand(input) {
5411
5429
  signals,
5412
5430
  checkouts,
5413
5431
  reconnectAfter: "2 seconds",
5414
- update: (version) => container ? updater.cannotUpdate(version) : startUpdate(updater.update(version))
5432
+ update: (version, { now }) => container ? updater.cannotUpdate(version) : startUpdate(updater.update(version, { now }))
5415
5433
  }).pipe(forkScoped);
5416
5434
  const sharedSandbox = personal ? undefined : {
5417
5435
  runner: runnerState,
@@ -5582,7 +5600,8 @@ function startCanonicalHerdrRunnerCommand(input) {
5582
5600
  problems: [...problemsNow(), ...updater.problems(), ...unreaped, ...disk],
5583
5601
  capabilities: capabilitiesNow(),
5584
5602
  labels: runner.labels,
5585
- ...appliedSettingsReport()
5603
+ ...appliedSettingsReport(),
5604
+ ...updateDrainReport(updater.updateDrain())
5586
5605
  })).pipe(tap2(followReleaseChannel), flatMap3((heartbeat) => applySettings(heartbeat.settings)), flatMap3(() => controlPlane.client.heartbeatRunnerReplica(input.runnerId, replica.id, {
5587
5606
  healthStatus: "healthy",
5588
5607
  drainState: updater.claiming() ? "accepting" : "draining",
@@ -5661,7 +5680,7 @@ function mcpCommand(args) {
5661
5680
  if (command.action === "run") {
5662
5681
  if (command.args.length > 0)
5663
5682
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
5664
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-jrwpte6y.js"));
5683
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-8p5csa63.js"));
5665
5684
  return yield* runMcpServerCommand({ flags: command.flags });
5666
5685
  }
5667
5686
  if (command.action !== "setup")
@@ -6161,7 +6180,7 @@ function programLoopCommand(command) {
6161
6180
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
6162
6181
  });
6163
6182
  }
6164
- var docsModule = promise(() => import("./chunk-a9ncx2a8.js"));
6183
+ var docsModule = promise(() => import("./chunk-2gz59jcx.js"));
6165
6184
  function docsCommand(args) {
6166
6185
  return gen(function* () {
6167
6186
  const command = parseCommand(args);
@@ -6538,7 +6557,7 @@ var runShowLines = (shown) => [
6538
6557
  ...questionLines2(shown.questions.filter((question) => question.status === "open")),
6539
6558
  ...shown.artifacts.flatMap((artifact) => [`Artifact ${artifact.kind}: ${artifact.title}`, artifact.text]),
6540
6559
  ...shown.children.map((child) => `Child ${child.name}: ${child.runId} ${child.status}`),
6541
- ...shown.waiting.map((waiting) => waiting.kind === "queue" ? waiting.quotaUntil !== undefined ? `${waiting.name}: ${queueWords(waiting)}` : `${waiting.unrunnable === undefined ? "Waiting for a Runner slot for" : "Waiting for a Runner that can run"} ${waiting.name}: ${queueWords(waiting)}` : `Waiting on ${waiting.kind} ${waiting.name}`)
6560
+ ...shown.waiting.map((waiting) => waiting.kind === "queue" ? waiting.quotaUntil !== undefined ? `${waiting.name}: ${queueWords(waiting)}` : `${waiting.unrunnable !== undefined ? "Waiting for a Runner that can run" : waiting.updating !== undefined ? "Waiting for a Runner to update for" : "Waiting for a Runner slot for"} ${waiting.name}: ${queueWords(waiting)}` : `Waiting on ${waiting.kind} ${waiting.name}`)
6542
6561
  ];
6543
6562
  var myTeamsSections = [
6544
6563
  ["needsYou", "Needs you"],
@@ -7165,7 +7184,7 @@ function changeRequestCommand(args) {
7165
7184
  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}`);
7166
7185
  });
7167
7186
  }
7168
- var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-9tyv6211.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7187
+ var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-9da9b7ys.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7169
7188
  var loopOutline = (command) => gen(function* () {
7170
7189
  const path = yield* Path;
7171
7190
  const loop = requiredArg(command, "a Loop id");
@@ -7185,9 +7204,9 @@ var loopOutline = (command) => gen(function* () {
7185
7204
  `).pipe(mapError2((error) => new CliError({ message: error.message })));
7186
7205
  yield* log(`Wrote the outline of ${loop} to ${out}`);
7187
7206
  });
7188
- var KitWriter = map9(promise(() => import("./chunk-9tyv6211.js")), (build) => build.writeKit);
7207
+ var KitWriter = map9(promise(() => import("./chunk-9da9b7ys.js")), (build) => build.writeKit);
7189
7208
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
7190
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-9tyv6211.js")), (build) => build.buildKit(directory))
7209
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-9da9b7ys.js")), (build) => build.buildKit(directory))
7191
7210
  });
7192
7211
  var uploadKit = (client, workspaceId, built) => gen(function* () {
7193
7212
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -4,12 +4,12 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-mhx0tgm3.js";
8
- import"./chunk-np5n54ky.js";
9
- import"./chunk-nwbry6c8.js";
10
- import"./chunk-4qjfn1sa.js";
11
- import"./chunk-8fyfsajs.js";
12
- import"./chunk-h2f26xbd.js";
7
+ } from "./chunk-r90j80q5.js";
8
+ import"./chunk-3jxdtkwd.js";
9
+ import"./chunk-0m8ktgmz.js";
10
+ import"./chunk-qvpkwnky.js";
11
+ import"./chunk-337drcr7.js";
12
+ import"./chunk-ew07nt2d.js";
13
13
  export {
14
14
  makeProgramRpcClient2 as makeProgramRpcClient,
15
15
  makeRunnerRpcClient2 as makeRunnerRpcClient,
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed6,
5
5
  withFiber2
6
- } from "./chunk-h2f26xbd.js";
6
+ } from "./chunk-ew07nt2d.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;
package/dist/index.js CHANGED
@@ -5,15 +5,15 @@
5
5
  var args = process.argv.slice(2);
6
6
  if (args[0] === "srt") {
7
7
  process.argv.splice(2, 1);
8
- const { runSrtCli } = await import("./chunk-x29m7k25.js");
8
+ const { runSrtCli } = await import("./chunk-hwjp28rh.js");
9
9
  await runSrtCli();
10
10
  } else if (args[0] === "srt-step") {
11
- const { runSrtStep } = await import("./chunk-samxkpbz.js");
11
+ const { runSrtStep } = await import("./chunk-6hxtg6eb.js");
12
12
  await runSrtStep(args.slice(1));
13
13
  } else if (args[0] === "opencode-read") {
14
- const { runOpencodeReader } = await import("./chunk-gnq1ryhx.js");
14
+ const { runOpencodeReader } = await import("./chunk-fr0qseam.js");
15
15
  runOpencodeReader();
16
16
  } else {
17
- const { runCli } = await import("./chunk-1zb8h7gv.js");
17
+ const { runCli } = await import("./chunk-w8hf2etp.js");
18
18
  runCli(args);
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitman-sh/cli",
3
- "version": "0.33.0",
3
+ "version": "0.34.0",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "bin": {