@kitman-sh/cli 0.13.10 → 0.13.12

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-813vn8sn.js → chunk-02ye1s9f.js} +18 -18
  2. package/dist/{chunk-4crf5vhd.js → chunk-1bkrxc3v.js} +2 -2
  3. package/dist/{chunk-hkg8s472.js → chunk-2xh5p0na.js} +11 -10
  4. package/dist/{chunk-r5v7df8h.js → chunk-36s51mp6.js} +78 -69
  5. package/dist/{chunk-vxfajzpz.js → chunk-3z9yz32f.js} +60 -14
  6. package/dist/{chunk-6x4wkf0x.js → chunk-4m923rz8.js} +3 -3
  7. package/dist/{chunk-kk32jckf.js → chunk-4t6nrgxw.js} +4 -4
  8. package/dist/{chunk-jkddgvev.js → chunk-8cxh8j07.js} +145 -55
  9. package/dist/{chunk-zgraq2y3.js → chunk-8pbnfqaz.js} +59 -101
  10. package/dist/{chunk-s00cj5sw.js → chunk-8t1vygmr.js} +4 -4
  11. package/dist/{chunk-kj1zjrs9.js → chunk-95w14qxp.js} +6 -6
  12. package/dist/{chunk-2dwqak36.js → chunk-9d03t0pn.js} +10 -10
  13. package/dist/{chunk-ggmwpwhf.js → chunk-eahqsd8h.js} +2 -2
  14. package/dist/{chunk-24h0y27w.js → chunk-fwja3qb1.js} +1 -1
  15. package/dist/{chunk-pxvd8w2v.js → chunk-mcw7wvtx.js} +1 -6
  16. package/dist/{chunk-bkecckjn.js → chunk-n1aqwdc2.js} +10 -10
  17. package/dist/{chunk-j34gensq.js → chunk-n734b61f.js} +1 -1
  18. package/dist/{chunk-mtdz4k32.js → chunk-nge8fq10.js} +9 -9
  19. package/dist/{chunk-0nh3w4vn.js → chunk-npjpmb0w.js} +9 -9
  20. package/dist/{chunk-t82w7459.js → chunk-szt25e0z.js} +61 -195
  21. package/dist/{chunk-rz01craf.js → chunk-ths93svq.js} +463 -195
  22. package/dist/{chunk-6n3m0t02.js → chunk-x5nv63jj.js} +3 -3
  23. package/dist/{chunk-mmd7mjv0.js → chunk-yab3j170.js} +3 -3
  24. package/dist/{chunk-d4pxty7x.js → chunk-z74fnmqb.js} +20 -20
  25. package/dist/{chunk-c60xk73g.js → chunk-zb5pnthp.js} +66 -33
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -594,7 +594,7 @@ kitman run drift <run> --dismiss <constraint> --reason "fixtures, not released m
594
594
  path: "loop-operations#tokens",
595
595
  level: 2,
596
596
  link: "https://kitman.sh/knowledge/docs/loop-operations#tokens",
597
- text: "## Tokens\n\nEach attempt of an agent Step records the input, output and cached tokens its Harness reported in its session: Claude Code, Codex and Pi do. Input counts tokens read fresh or written to the cache; cached counts tokens read from it. Claude Code's subagents write their own session files, and their tokens count with the attempt that ran them. An attempt parked on a Question and resumed adds both parts, and one that ran past its time budget or whose Run was stopped still records what its Harness spent. An attempt whose Harness wrote no usage records that it reported none. `runs.show` and `kitman run show` give the Run's total and each Step's. A Child Run shows its own."
597
+ text: "## Tokens\n\nEach attempt of an agent Step records the input, output and cached tokens its Harness reported in its session: Claude Code, Codex and Pi do. Input counts tokens read fresh or written to the cache; cached counts tokens read from it. Claude Code's subagents write their own session files, and their tokens count with the attempt that ran them. An attempt parked on a Question and resumed adds both parts, and one that ran past its time budget or whose Run was stopped still records what its Harness spent. An attempt whose Harness wrote no usage records that it reported none. `runs.show` and `kitman run show` give the Run's total and each Step's. `runs.show` also gives the Harness each started attempt launched on and the model its launch named; an attempt left to its Harness's default model gives no model. A Child Run shows its own."
598
598
  },
599
599
  {
600
600
  title: "Loop Operations Guide \u203A Automatic starts",
@@ -709,7 +709,7 @@ Runners execute StepAttempts in user-controlled environments. A runner advertise
709
709
  path: "runner-operations#runner-settings",
710
710
  level: 3,
711
711
  link: "https://kitman.sh/knowledge/docs/runner-operations#runner-settings",
712
- text: "### Runner settings\n\nKitman keeps how your Runner behaves, so you change it on the Runner's page in the **Runners** tab, or with `kitman runner settings <runner>`, without touching its service. Its owner, or a Workspace admin, may change it; each change is in its History with who made it, when, and the old and new value (`kitman runner settings history <runner>`).\n\n- **Concurrency**: how many Work Units it runs at once, 1 to 4. It applies a change within about 10 seconds, and work in flight finishes first.\n- **Sandbox**: `srt` (the default), `docker` or `host`. New Steps and checks use a change; a running Step keeps its own.\n- **Docker image**: the image `docker` runs agents in, pinned by digest. It applies when the Runner restarts.\n- **Check hosts**: hosts every check this Runner runs, for any Team, may also reach.\n- **Checks' Docker image** and **checks' registry image**: for a pipeline check's own Docker daemon (below), each pinned by digest. They apply when the Runner restarts.\n\n```sh\nkitman runner settings <runner> --concurrency 2 --check-hosts github.com\n```\n\nThe Runner's page shows where what the Runner applies differs from its settings, and why.\n\nA few things stay on your machine, because they start the Runner or protect it: the Runner's id, the API URL and its credential, `KITMAN_RUNNER_FULL_ACCESS`, and your consent to run agents with no sandbox, `KITMAN_RUNNER_ALLOW_FULL_ACCESS=1`. Kitman cannot give that consent, so nobody who can change the Runner's settings, nor a compromised control plane, can turn off your machine's sandbox: a Runner set to `host` on a machine without it runs its agents in `srt` and shows the `full_access_refused` Runner Problem.\n\nBefore Kitman kept these, they were the environment variables `KITMAN_RUNNER_CONCURRENCY`, `KITMAN_RUNNER_SANDBOX`, `KITMAN_RUNNER_DOCKER_IMAGE`, `KITMAN_RUNNER_CHECK_HOSTS`, `KITMAN_RUNNER_CHECK_DOCKER_IMAGE` and `KITMAN_RUNNER_CHECK_REGISTRY_IMAGE`. The first time a Runner starts on a version with settings, Kitman adopts the values they give, once, for each setting nobody has set yet (a shared Runner's sandbox excepted); after that the Runner ignores them and warns at each start that each one still set is deprecated. Remove them from its service when its settings look right. While `KITMAN_RUNNER_SANDBOX=host` stays set, it counts as your consent to run agents on the host."
712
+ text: "### Runner settings\n\nKitman keeps how your Runner behaves, so you change it on the Runner's page in the **Runners** tab, or with `kitman runner settings <runner>`, without touching its service. Its owner, or a Workspace admin, may change it; each change is in its History with who made it, when, and the old and new value (`kitman runner settings history <runner>`).\n\n- **Concurrency**: how many Work Units it runs at once, 1 to 4. It applies a change within about 10 seconds, and work in flight finishes first.\n- **Sandbox**: `srt` (the default), `docker` or `host`. New Steps and checks use a change; a running Step keeps its own.\n- **Docker image**: the image `docker` runs agents in, pinned by digest. It applies when the Runner restarts.\n- **Check hosts**: hosts every check this Runner runs, for any Team, may also reach.\n- **Checks' Docker image** and **checks' registry image**: for a pipeline check's own Docker daemon (below), each pinned by digest. They apply when the Runner restarts.\n\n```sh\nkitman runner settings <runner> --concurrency 2 --check-hosts github.com\n```\n\nThe Runner's page shows where what the Runner applies differs from its settings, and why.\n\nA few things stay on your machine, because they start the Runner or protect it: the Runner's id, the API URL and its credential, `KITMAN_RUNNER_FULL_ACCESS`, and your consent to run agents with no sandbox, `KITMAN_RUNNER_ALLOW_FULL_ACCESS=1`. Kitman cannot give that consent, so nobody who can change the Runner's settings, nor a compromised control plane, can turn off your machine's sandbox: a Runner set to `host` on a machine without it runs its agents in `srt` and shows the `full_access_refused` Runner Problem. A Runner set to `host` on a machine with it runs agents that use your own `kitman` login. When Kitman refuses that login, the Runner shows the `cli_session_expired` Runner Problem: run `kitman login` on the machine.\n\nBefore Kitman kept these, they were the environment variables `KITMAN_RUNNER_CONCURRENCY`, `KITMAN_RUNNER_SANDBOX`, `KITMAN_RUNNER_DOCKER_IMAGE`, `KITMAN_RUNNER_CHECK_HOSTS`, `KITMAN_RUNNER_CHECK_DOCKER_IMAGE` and `KITMAN_RUNNER_CHECK_REGISTRY_IMAGE`. The first time a Runner starts on a version with settings, Kitman adopts the values they give, once, for each setting nobody has set yet (a shared Runner's sandbox excepted); after that the Runner ignores them and warns at each start that each one still set is deprecated. Remove them from its service when its settings look right. While `KITMAN_RUNNER_SANDBOX=host` stays set, it counts as your consent to run agents on the host."
713
713
  },
714
714
  {
715
715
  title: "Runner Operations Guide \u203A The sandbox",
@@ -1555,7 +1555,7 @@ var pathOfLink = (link) => {
1555
1555
  return page === null ? link : page[1] || "index";
1556
1556
  };
1557
1557
  var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
1558
- var pinnedLink2 = (link, version = "0.13.10") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
1558
+ var pinnedLink2 = (link, version = "0.13.12") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
1559
1559
  var pageOf = (path) => path.split("#")[0];
1560
1560
  var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
1561
1561
  function excerpt(text, queryTerms) {
@@ -4,9 +4,9 @@ import {
4
4
  opaqueTunnelRefusal2,
5
5
  isOpaqueConnectReason2,
6
6
  runSrtStep2
7
- } from "./chunk-ggmwpwhf.js";
8
- import"./chunk-pxvd8w2v.js";
9
- import"./chunk-zgraq2y3.js";
7
+ } from "./chunk-eahqsd8h.js";
8
+ import"./chunk-mcw7wvtx.js";
9
+ import"./chunk-8pbnfqaz.js";
10
10
  export {
11
11
  isOpaqueConnectReason2 as isOpaqueConnectReason,
12
12
  opaqueTunnelRefusal2 as opaqueTunnelRefusal,
@@ -12,7 +12,7 @@ import {
12
12
  add,
13
13
  getOrUndefinedUnsafe,
14
14
  getUnsafe,
15
- get4,
15
+ get3,
16
16
  Reference,
17
17
  toMillis,
18
18
  isSuccess,
@@ -96,21 +96,8 @@ import {
96
96
  Defect,
97
97
  Exit,
98
98
  toCodecJson
99
- } from "./chunk-zgraq2y3.js";
99
+ } from "./chunk-8pbnfqaz.js";
100
100
  import {
101
- interrupt,
102
- getCurrent,
103
- makeUnsafe2,
104
- bounded,
105
- offerAll,
106
- failCause,
107
- end,
108
- shutdownUnsafe,
109
- fromQueue,
110
- unwrap
111
- } from "./chunk-t82w7459.js";
112
- import {
113
- Clock,
114
101
  empty,
115
102
  fromInput,
116
103
  merge,
@@ -123,7 +110,20 @@ import {
123
110
  ParseOptions,
124
111
  RpcClientDefect,
125
112
  RpcClientError
126
- } from "./chunk-rz01craf.js";
113
+ } from "./chunk-ths93svq.js";
114
+ import {
115
+ Clock,
116
+ interrupt,
117
+ getCurrent,
118
+ makeUnsafe2,
119
+ bounded,
120
+ offerAll,
121
+ failCause,
122
+ end,
123
+ shutdownUnsafe,
124
+ fromQueue,
125
+ unwrap
126
+ } from "./chunk-szt25e0z.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")) {
@@ -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 = get4(services, Scope);
240
+ const scope = get3(services, Scope);
241
241
  const entries = new Map;
242
242
  let isShutdown = false;
243
243
  yield* addFinalizer(scope, withFiber2((parent) => {
@@ -483,7 +483,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
483
483
  };
484
484
  });
485
485
  var clientIdCounter = 0;
486
- var make3 = /* @__PURE__ */ fnUntraced(function* (group, options) {
486
+ var make4 = /* @__PURE__ */ fnUntraced(function* (group, options) {
487
487
  const clientId = clientIdCounter++;
488
488
  const {
489
489
  codecFor,
@@ -643,7 +643,7 @@ var makeRpcSchemas = (codecFor) => {
643
643
  return entry;
644
644
  }
645
645
  const streamSchemas = getStreamSchemas(rpc.successSchema);
646
- const parseOptions = get4(rpc.annotations, ParseOptions);
646
+ const parseOptions = get3(rpc.annotations, ParseOptions);
647
647
  const exitSchema2 = exitSchema(rpc);
648
648
  let decodeDiscardExit;
649
649
  entry = {
@@ -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, make3, withHeaders, layerProtocolSocket, ConnectionHooks };
832
+ export { layerJson, make4, withHeaders, layerProtocolSocket, ConnectionHooks };
@@ -104,21 +104,8 @@ import {
104
104
  decodeJsonString,
105
105
  encodeJsonStringSync,
106
106
  encodePrettyJsonString
107
- } from "./chunk-zgraq2y3.js";
107
+ } from "./chunk-8pbnfqaz.js";
108
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-t82w7459.js";
120
- import {
121
- currentTimeMillis,
122
109
  SecureRandom,
123
110
  layerWebCrypto,
124
111
  runMain,
@@ -167,7 +154,7 @@ import {
167
154
  digestSha256,
168
155
  sha256Hasher,
169
156
  raw,
170
- make4,
157
+ make5,
171
158
  get,
172
159
  put,
173
160
  HttpClient,
@@ -230,14 +217,27 @@ import {
230
217
  harnessNames,
231
218
  herdrRunnerCapabilities2,
232
219
  declaredChecks
233
- } from "./chunk-rz01craf.js";
220
+ } from "./chunk-ths93svq.js";
234
221
  import {
235
- Id
236
- } from "./chunk-pxvd8w2v.js";
222
+ currentTimeMillis,
223
+ tap,
224
+ mapError,
225
+ decodeText,
226
+ run,
227
+ mkString,
228
+ FileSystem,
229
+ Path,
230
+ withDefault,
231
+ option,
232
+ String2
233
+ } from "./chunk-szt25e0z.js";
237
234
  import {
238
235
  ChildProcessSpawner,
239
- make2
240
- } from "./chunk-vxfajzpz.js";
236
+ make3
237
+ } from "./chunk-3z9yz32f.js";
238
+ import {
239
+ Id
240
+ } from "./chunk-mcw7wvtx.js";
241
241
 
242
242
  // apps/cli/src/cli-error.ts
243
243
  function cliErrorCode(error, status) {
@@ -403,6 +403,31 @@ var notListTypes = new Set([
403
403
  ]);
404
404
  var unbindable = new Set("arguments await break case catch class config const continue debugger default defineKit delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof undefined var void while with yield".split(" "));
405
405
 
406
+ // apps/cli/src/cli-session.ts
407
+ var cliSessionExpired = {
408
+ code: "cli_session_expired",
409
+ message: "The kitman login on this machine has expired. This Runner runs agents on the host, where the kitman commands they run now get 401.",
410
+ fix: "Run `kitman login` on this machine."
411
+ };
412
+ var checkTimeout = "10 seconds";
413
+ var cliSessionChecker = (apiUrl) => {
414
+ let refused;
415
+ const check = gen(function* () {
416
+ const session = sessionForApi(yield* readAuthStore(), apiUrl);
417
+ if (session === undefined || session.accessToken !== refused) {
418
+ refused = undefined;
419
+ if (session === undefined)
420
+ return;
421
+ const client = yield* createSdkClient({ apiUrl, session });
422
+ yield* client.whoami().pipe(catchIf((error) => error.status === 401, () => sync2(() => refused = session.accessToken)));
423
+ }
424
+ });
425
+ return {
426
+ check: check.pipe(timeout(checkTimeout), catch_((error) => logWarning("runner_cli_session_unchecked", error.message))),
427
+ expired: () => refused !== undefined
428
+ };
429
+ };
430
+
406
431
  // apps/cli/src/command-help.ts
407
432
  var Usage = [
408
433
  "Usage: kitman <init|pair|docs|run|inbox|loop|agent|deploy|verify|secret|claim|team|repo|constraint|mcp|sync|whoami|config|kit|task|memory|proposal|decision|context|schedule|delivery|reconcile|lifecycle|logout> [options]",
@@ -993,10 +1018,10 @@ var sandboxMissing = (sandbox, missing) => ({
993
1018
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
994
1019
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
995
1020
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
996
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-s00cj5sw.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1021
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-8t1vygmr.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
997
1022
  });
998
1023
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
999
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-s00cj5sw.js")), (module) => module.updateHerdrCore(options))
1024
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-8t1vygmr.js")), (module) => module.updateHerdrCore(options))
1000
1025
  });
1001
1026
  var herdrCoreMissing = (error) => {
1002
1027
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1422,7 +1447,7 @@ var syncTargets = (harness) => gen(function* () {
1422
1447
  });
1423
1448
  var syncKits = (input) => gen(function* () {
1424
1449
  const fs = yield* FileSystem;
1425
- const { syncKitSetup } = yield* promise(() => import("./chunk-bkecckjn.js"));
1450
+ const { syncKitSetup } = yield* promise(() => import("./chunk-n1aqwdc2.js"));
1426
1451
  const harnesses = yield* syncTargets(input.harness);
1427
1452
  const chain = yield* input.client.getKitChain(input.workspaceId);
1428
1453
  for (const { name, problem } of chain.skipped)
@@ -1939,7 +1964,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
1939
1964
  run: (command, args) => runCommand2(command, args),
1940
1965
  attach: (command, args) => gen(function* () {
1941
1966
  const spawner = yield* ChildProcessSpawner;
1942
- const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1967
+ const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1943
1968
  const exitCode = yield* handle.exitCode;
1944
1969
  if (exitCode !== 0)
1945
1970
  return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
@@ -2341,7 +2366,7 @@ var package_default = {
2341
2366
  };
2342
2367
 
2343
2368
  // apps/cli/src/scaffold.ts
2344
- var cliVersion = "0.13.10";
2369
+ var cliVersion = "0.13.12";
2345
2370
  var packageJson = (name, scaffold) => `${JSON.stringify({
2346
2371
  name,
2347
2372
  private: true,
@@ -2493,7 +2518,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2493
2518
 
2494
2519
  // apps/cli/src/commands.ts
2495
2520
  var ClientId = "kitman-cli";
2496
- var agentRuntime = promise(() => import("./chunk-r5v7df8h.js"));
2521
+ var agentRuntime = promise(() => import("./chunk-36s51mp6.js"));
2497
2522
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2498
2523
  defaultValue: () => gen(function* () {
2499
2524
  const tui = yield* tryPromise({
@@ -3529,7 +3554,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3529
3554
  });
3530
3555
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3531
3556
  defaultValue: () => (options) => gen(function* () {
3532
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-kj1zjrs9.js"));
3557
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-95w14qxp.js"));
3533
3558
  return yield* makeRunnerRpcClient({
3534
3559
  runnerId: options.runnerId,
3535
3560
  bearer: options.bearer,
@@ -3736,6 +3761,8 @@ function startCanonicalHerdrRunnerCommand(input) {
3736
3761
  let reached = [];
3737
3762
  const repositoryProbeInterval = "5 minutes";
3738
3763
  const repositoryRetryInterval = "30 seconds";
3764
+ const ownerLoginInterval = "5 minutes";
3765
+ const ownerLoginRetryInterval = "30 seconds";
3739
3766
  const capabilitiesNow = () => {
3740
3767
  const harnesses = live.sandbox === "srt" && live.inSrt !== undefined ? live.inSrt.detection : detected;
3741
3768
  const profile = {
@@ -3752,12 +3779,16 @@ function startCanonicalHerdrRunnerCommand(input) {
3752
3779
  resourceLimits: { ...advertised.resourceLimits, maxConcurrentRuns: live.settings.concurrency }
3753
3780
  };
3754
3781
  };
3782
+ const ownerLogin = cliSessionChecker(input.apiUrl);
3783
+ const checkOwnerLogin = suspend3(() => input.credential === undefined && live.sandbox === "host" ? ownerLogin.check : void_3);
3784
+ yield* checkOwnerLogin;
3755
3785
  const problemsNow = () => {
3756
3786
  const uncontained = stepProcessesUncontained({ sandbox: live.sandbox, scoped: stepProcesses.scoped });
3757
3787
  return [
3758
3788
  ...coreProblems,
3759
3789
  ...uncontained === undefined ? [] : [uncontained],
3760
- ...live.sandboxProblem === undefined ? [] : [live.sandboxProblem]
3790
+ ...live.sandboxProblem === undefined ? [] : [live.sandboxProblem],
3791
+ ...live.sandbox === "host" && ownerLogin.expired() ? [cliSessionExpired] : []
3761
3792
  ];
3762
3793
  };
3763
3794
  assertHerdrRunnerCapability(capabilitiesNow());
@@ -3833,6 +3864,7 @@ function startCanonicalHerdrRunnerCommand(input) {
3833
3864
  });
3834
3865
  const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
3835
3866
  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);
3867
+ yield* suspend3(() => sleep(ownerLogin.expired() ? ownerLoginRetryInterval : ownerLoginInterval)).pipe(andThen2(checkOwnerLogin), forever, forkScoped);
3836
3868
  const platform = yield* context();
3837
3869
  const updated = yield* make15();
3838
3870
  const scope = yield* scope2;
@@ -4086,7 +4118,7 @@ function mcpCommand(args) {
4086
4118
  if (command.action === "run") {
4087
4119
  if (command.args.length > 0)
4088
4120
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4089
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-jkddgvev.js"));
4121
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-8cxh8j07.js"));
4090
4122
  return yield* runMcpServerCommand({ flags: command.flags });
4091
4123
  }
4092
4124
  if (command.action !== "setup")
@@ -4574,7 +4606,7 @@ function programLoopCommand(command) {
4574
4606
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4575
4607
  });
4576
4608
  }
4577
- var docsModule = promise(() => import("./chunk-j34gensq.js"));
4609
+ var docsModule = promise(() => import("./chunk-n734b61f.js"));
4578
4610
  function docsCommand(args) {
4579
4611
  return gen(function* () {
4580
4612
  const command = parseCommand(args);
@@ -4743,6 +4775,7 @@ var evidenceLines = (evidence) => evidence.flatMap((entry) => {
4743
4775
  ];
4744
4776
  return [
4745
4777
  `Evidence ${entry.step} ${entry.name}: ${entry.status}${entry.preExisting ? " (pre-existing)" : ""}${neverRan.length === 0 ? "" : `, ${neverRan.length} test${neverRan.length === 1 ? "" : "s"} never ran`} at tree ${entry.tree} (${entry.revision}, ${entry.durationMs}ms)`,
4778
+ ...(entry.failedTests ?? []).map((test) => ` Failed: ${test}`),
4746
4779
  ...neverRan
4747
4780
  ];
4748
4781
  });
@@ -5408,9 +5441,9 @@ function changeRequestCommand(args) {
5408
5441
  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
5442
  });
5410
5443
  }
5411
- var KitWriter = map8(promise(() => import("./chunk-813vn8sn.js")), (build) => build.writeKit);
5444
+ var KitWriter = map8(promise(() => import("./chunk-02ye1s9f.js")), (build) => build.writeKit);
5412
5445
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5413
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-813vn8sn.js")), (build) => build.buildKit(directory))
5446
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-02ye1s9f.js")), (build) => build.buildKit(directory))
5414
5447
  });
5415
5448
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5416
5449
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -6187,7 +6220,7 @@ function downloadPresignedAsset(download, outputPath) {
6187
6220
  return gen(function* () {
6188
6221
  const fs = yield* FileSystem;
6189
6222
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
6190
- const response = yield* send(make4(download.method)(download.url), failed);
6223
+ const response = yield* send(make5(download.method)(download.url), failed);
6191
6224
  if (response.status < 200 || response.status >= 300)
6192
6225
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
6193
6226
  const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
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-4crf5vhd.js");
8
+ const { runSrtCli } = await import("./chunk-1bkrxc3v.js");
9
9
  await runSrtCli();
10
10
  } else if (args[0] === "srt-step") {
11
- const { runSrtStep } = await import("./chunk-mmd7mjv0.js");
11
+ const { runSrtStep } = await import("./chunk-yab3j170.js");
12
12
  await runSrtStep(args.slice(1));
13
13
  } else if (args[0] === "opencode-read") {
14
- const { runOpencodeReader } = await import("./chunk-kk32jckf.js");
14
+ const { runOpencodeReader } = await import("./chunk-4t6nrgxw.js");
15
15
  runOpencodeReader();
16
16
  } else {
17
- const { runCli } = await import("./chunk-c60xk73g.js");
17
+ const { runCli } = await import("./chunk-zb5pnthp.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.13.10",
3
+ "version": "0.13.12",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {