@cloop/runner 0.3.13 → 0.3.15

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.
@@ -5,8 +5,8 @@ import {
5
5
  } from "./chunk-IJH4O27H.js";
6
6
  import {
7
7
  serveTakeovers
8
- } from "./chunk-H4EAJ2VW.js";
9
- import "./chunk-6OWQEIFN.js";
8
+ } from "./chunk-3J5FFRLN.js";
9
+ import "./chunk-NMVZPTFM.js";
10
10
  import {
11
11
  DEFAULT_FALLBACK_MODEL,
12
12
  T3Client,
@@ -32,7 +32,7 @@ import {
32
32
  systemServices,
33
33
  unitFor,
34
34
  which
35
- } from "./chunk-T3B3OPMM.js";
35
+ } from "./chunk-RT5UZNMQ.js";
36
36
  import {
37
37
  BoxWatch,
38
38
  lockThreadsFile,
@@ -40,7 +40,7 @@ import {
40
40
  runnerStatePath,
41
41
  threadsFilePath,
42
42
  writeRunnerState
43
- } from "./chunk-VWNTDZE3.js";
43
+ } from "./chunk-BGXIAFPO.js";
44
44
  import {
45
45
  LocalDriver,
46
46
  T3Driver,
@@ -51,7 +51,7 @@ import {
51
51
  runnerPath,
52
52
  showsOtherThreads,
53
53
  writeBoxConfig
54
- } from "./chunk-QVFCIDR4.js";
54
+ } from "./chunk-B2ZI2UWS.js";
55
55
  import {
56
56
  getMachine
57
57
  } from "./chunk-NTXQLEMQ.js";
@@ -60,12 +60,12 @@ import {
60
60
  olderThan
61
61
  } from "./chunk-YEO27QQP.js";
62
62
  import "./chunk-R3CLO2FB.js";
63
- import "./chunk-6QPGSWSN.js";
64
- import "./chunk-OK7DODFL.js";
63
+ import "./chunk-NYJ6XMD4.js";
64
+ import "./chunk-M4Y4YZ46.js";
65
65
  import "./chunk-ES5BRAKJ.js";
66
66
  import {
67
67
  VERSION
68
- } from "./chunk-GFAI23T7.js";
68
+ } from "./chunk-BLSH7SNK.js";
69
69
  import {
70
70
  getMeshUrl,
71
71
  getToken,
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  findRun
4
- } from "./chunk-6OWQEIFN.js";
4
+ } from "./chunk-NMVZPTFM.js";
5
5
  import {
6
6
  lockThreadsFile,
7
7
  threadsFilePath
8
- } from "./chunk-VWNTDZE3.js";
8
+ } from "./chunk-BGXIAFPO.js";
9
9
  import {
10
10
  isLocal,
11
11
  localRunsFilePath,
12
12
  readRunRecords,
13
13
  readRunnerConfig,
14
14
  takeoverSummary
15
- } from "./chunk-QVFCIDR4.js";
15
+ } from "./chunk-B2ZI2UWS.js";
16
16
  import {
17
17
  shortMachineName
18
18
  } from "./chunk-NTXQLEMQ.js";
@@ -511,6 +511,9 @@ function limitedModel(said) {
511
511
  const name = /reached your ([\w .-]{1,40}?) limit/i.exec(said ?? "")?.[1];
512
512
  return name && !/usage|weekly|daily|session|hour|month/i.test(name) ? name : null;
513
513
  }
514
+ function refusedModel(said) {
515
+ return /The '([^']+)' model is not supported/i.exec(said ?? "")?.[1] ?? null;
516
+ }
514
517
  var LIMIT_HOLD_MS = 60 * 6e4;
515
518
  function handoverPrompt(prompt, from) {
516
519
  return `${prompt}
@@ -1426,6 +1429,8 @@ var SHARED_BRANCHES = /* @__PURE__ */ new Set(["staging", "main", "master", "HEA
1426
1429
  var COMMANDS_KEPT = 50;
1427
1430
  var SUMMARY_MAX2 = 200;
1428
1431
  var HARNESS_NAMES = { "claude-code": "Claude Code", codex: "Codex" };
1432
+ var harnessName = (name) => HARNESS_NAMES[name] ?? name;
1433
+ var movedLine = (from, to) => `${harnessName(from)} was at its usage limit, so ${harnessName(to)} did this run.`;
1429
1434
  function failedEnd(harness, run2) {
1430
1435
  const said = run2.result?.text?.trim() || run2.lastText;
1431
1436
  const limited = HARNESS_LIMIT.test(run2.result?.text ?? "");
@@ -1974,6 +1979,7 @@ ${RESULT_INSTRUCTION}`));
1974
1979
  exit,
1975
1980
  ...r.switched ? { switched: r.switched } : {}
1976
1981
  });
1982
+ if (await this.otherModel(r, live.result?.text)) return;
1977
1983
  if (end.error) this.log(`limit work=${r.work_id} error=${end.error}`);
1978
1984
  if (end.error === "harness_limit") {
1979
1985
  if (this.fallBack(r, live.result?.text)) return;
@@ -2009,6 +2015,45 @@ ${RESULT_INSTRUCTION}`));
2009
2015
  this.spawnRun(r, CONTINUE_PROMPT, true);
2010
2016
  return true;
2011
2017
  }
2018
+ /**
2019
+ * A model the account cannot use refuses the run before it does any work,
2020
+ * as ChatGPT Free does for a model `config.toml` pins. The run starts again
2021
+ * on the next model the account lists, best first, until one takes it or
2022
+ * the list runs out. It does not when the Task named its model.
2023
+ */
2024
+ async otherModel(r, said) {
2025
+ const refused = refusedModel(said);
2026
+ const dialect = this.dialectOf(r);
2027
+ if (!refused || !dialect.models || !r.prompt || r.model && !r.refused) return false;
2028
+ const tried = [...r.refused ?? [], refused];
2029
+ this.recovering.add(r.work_id);
2030
+ let listed;
2031
+ try {
2032
+ listed = await dialect.models().catch(() => []);
2033
+ } finally {
2034
+ this.recovering.delete(r.work_id);
2035
+ }
2036
+ const next = listed.find((m) => !tried.includes(m));
2037
+ if (!next)
2038
+ this.log(`model work=${r.work_id} refused=${refused} next=none catalog=${listed.length}`);
2039
+ if (!next || this.stopping || r.end) return false;
2040
+ const moved = r.harness ? movedLine(this.deps.dialect.name, r.harness) : null;
2041
+ r.refused = tried;
2042
+ r.model = next;
2043
+ r.session_id = null;
2044
+ r.switched = [
2045
+ moved,
2046
+ `${harnessName(dialect.name)} cannot use ${tried[0]} on this account, so this ran on ${next}.`
2047
+ ].filter(Boolean).join(" ");
2048
+ this.save();
2049
+ this.log(`model work=${r.work_id} refused=${refused} next=${next}`);
2050
+ this.spawnRun(
2051
+ r,
2052
+ r.harness ? handoverPrompt(r.prompt, harnessName(this.deps.dialect.name)) : r.prompt,
2053
+ false
2054
+ );
2055
+ return true;
2056
+ }
2012
2057
  /**
2013
2058
  * Once per run: a run its own harness cannot carry on starts again on the
2014
2059
  * fallback harness, in the same checkout, so the edits so far carry over.
@@ -2030,12 +2075,12 @@ ${RESULT_INSTRUCTION}`));
2030
2075
  } finally {
2031
2076
  this.recovering.delete(r.work_id);
2032
2077
  }
2033
- const from = HARNESS_NAMES[this.deps.dialect.name] ?? this.deps.dialect.name;
2034
- const name = HARNESS_NAMES[to.name] ?? to.name;
2078
+ const from = harnessName(this.deps.dialect.name);
2079
+ const name = harnessName(to.name);
2035
2080
  r.harness = to.name;
2036
2081
  r.session_id = null;
2037
2082
  r.model = void 0;
2038
- r.switched = `${from} was at its usage limit, so ${name} did this run.`;
2083
+ r.switched = movedLine(this.deps.dialect.name, to.name);
2039
2084
  this.save();
2040
2085
  this.log(`fallback work=${r.work_id} harness=${to.name}`);
2041
2086
  this.emit(r.work_id, {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  RUN_TEXT_MAX,
4
4
  runnerPath
5
- } from "./chunk-QVFCIDR4.js";
5
+ } from "./chunk-B2ZI2UWS.js";
6
6
 
7
7
  // src/box-watch.ts
8
8
  import { randomUUID } from "crypto";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/version.ts
4
- var VERSION = true ? "0.3.13" : "0.0.0-dev";
4
+ var VERSION = true ? "0.3.15" : "0.0.0-dev";
5
5
 
6
6
  export {
7
7
  VERSION
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-ES5BRAKJ.js";
6
6
  import {
7
7
  VERSION
8
- } from "./chunk-GFAI23T7.js";
8
+ } from "./chunk-BLSH7SNK.js";
9
9
  import {
10
10
  getOrigin,
11
11
  readCredentials,
@@ -8,7 +8,7 @@ import {
8
8
  readRunnerConfig,
9
9
  runLogDir,
10
10
  runLogPath
11
- } from "./chunk-QVFCIDR4.js";
11
+ } from "./chunk-B2ZI2UWS.js";
12
12
  import {
13
13
  sanitizeLabel,
14
14
  stripControl
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ConnectFailure,
4
4
  deviceLogin
5
- } from "./chunk-OK7DODFL.js";
5
+ } from "./chunk-M4Y4YZ46.js";
6
6
  import {
7
7
  ApiError,
8
8
  ReauthError,
@@ -3,7 +3,7 @@ import {
3
3
  readRunnerState,
4
4
  runnerStatePath,
5
5
  threadsFilePath
6
- } from "./chunk-VWNTDZE3.js";
6
+ } from "./chunk-BGXIAFPO.js";
7
7
  import {
8
8
  BoxToolError,
9
9
  CLOOP_THREAD_PREFIX,
@@ -31,7 +31,7 @@ import {
31
31
  windowsExecutable,
32
32
  windowsPowerShellEnv,
33
33
  writeBoxConfig
34
- } from "./chunk-QVFCIDR4.js";
34
+ } from "./chunk-B2ZI2UWS.js";
35
35
  import {
36
36
  getMachine,
37
37
  shortMachineName
@@ -49,17 +49,17 @@ import {
49
49
  } from "./chunk-R3CLO2FB.js";
50
50
  import {
51
51
  connectWebhook
52
- } from "./chunk-6QPGSWSN.js";
52
+ } from "./chunk-NYJ6XMD4.js";
53
53
  import {
54
54
  ConnectFailure,
55
55
  connectReport,
56
56
  deviceLogin,
57
57
  newAttempt,
58
58
  sendConnectReport
59
- } from "./chunk-OK7DODFL.js";
59
+ } from "./chunk-M4Y4YZ46.js";
60
60
  import {
61
61
  VERSION
62
- } from "./chunk-GFAI23T7.js";
62
+ } from "./chunk-BLSH7SNK.js";
63
63
  import {
64
64
  STAGING_ORIGIN,
65
65
  getOrigin,
@@ -771,18 +771,19 @@ function claudeDialect(bin = "claude", fallback = DEFAULT_FALLBACK_MODEL, askEve
771
771
  // src/drivers/codex.ts
772
772
  import { execFile as execFile2 } from "child_process";
773
773
  import { basename as basename2 } from "path";
774
- function exec2(bin, args) {
774
+ function exec2(bin, args, timeout = 1e4) {
775
775
  const command = commandFor(bin, args);
776
776
  return new Promise(
777
777
  (resolve3) => execFile2(
778
778
  command.file,
779
779
  command.args,
780
780
  {
781
- timeout: 1e4,
781
+ timeout,
782
782
  encoding: "utf-8",
783
+ maxBuffer: 16 * 1024 * 1024,
783
784
  ...command.windowsVerbatimArguments ? { windowsVerbatimArguments: true } : {}
784
785
  },
785
- (err, out2, errOut) => resolve3({ ok: !err, out: `${out2}${errOut}` })
786
+ (err, out2, errOut) => resolve3({ ok: !err, out: `${out2}${errOut}`, stdout: out2 })
786
787
  )
787
788
  );
788
789
  }
@@ -809,6 +810,25 @@ async function probeCodex(bin = "codex") {
809
810
  experimental: true
810
811
  };
811
812
  }
813
+ async function codexModels(bin = "codex") {
814
+ const { ok, stdout } = await exec2(bin, ["debug", "models"], 3e4);
815
+ if (!ok) return [];
816
+ try {
817
+ const { models } = JSON.parse(stdout);
818
+ const rank = (m) => typeof m.priority === "number" ? m.priority : Number.POSITIVE_INFINITY;
819
+ return (models ?? []).filter((m) => typeof m.slug === "string" && m.visibility === "list").sort((a, b) => rank(a) - rank(b)).map((m) => m.slug);
820
+ } catch {
821
+ return [];
822
+ }
823
+ }
824
+ function errorMessage(message) {
825
+ try {
826
+ const inner = JSON.parse(message).error?.message;
827
+ return typeof inner === "string" ? inner : message;
828
+ } catch {
829
+ return message;
830
+ }
831
+ }
812
832
  function parseCodexLine(raw) {
813
833
  let msg;
814
834
  try {
@@ -844,7 +864,11 @@ function parseCodexLine(raw) {
844
864
  if (msg.type === "turn.failed") {
845
865
  const message = msg.error?.message;
846
866
  return [
847
- { type: "result", ok: false, ...typeof message === "string" ? { text: message } : {} }
867
+ {
868
+ type: "result",
869
+ ok: false,
870
+ ...typeof message === "string" ? { text: errorMessage(message) } : {}
871
+ }
848
872
  ];
849
873
  }
850
874
  return [];
@@ -864,6 +888,7 @@ function codexDialect(bin = "codex") {
864
888
  return resume && run.session_id ? ["exec", ...policy, "resume", run.session_id, "--json", ...model, "-"] : ["exec", "--cd", run.repo, "--json", ...policy, ...model, "-"];
865
889
  },
866
890
  opening: (_run, prompt) => prompt,
891
+ models: () => codexModels(bin),
867
892
  parse: parseCodexLine,
868
893
  // A fresh run's command line names no id: Codex makes its session id after the start. So a run is also matched by its exact repository, which one open run per repository makes unique.
869
894
  owns: (run, command) => command.includes(basename2(bin)) && command.includes("exec") && command.includes("--json") && (run.session_id !== null && command.includes(run.session_id) || command.includes(`--cd ${run.repo} `)),
@@ -979,7 +1004,8 @@ async function disconnect(plan, opts) {
979
1004
  const env = environmentOf(plan.origin);
980
1005
  const run = opts.run ?? ((command) => void execFileSync(command[0], command.slice(1), {
981
1006
  stdio: "ignore",
982
- timeout: 15e3
1007
+ timeout: 15e3,
1008
+ ...command[0] === "powershell" ? { env: windowsPowerShellEnv() } : {}
983
1009
  }));
984
1010
  if (plan.isBox && !opts.yes) {
985
1011
  const unit = plan.services.map((s) => basename3(s.path)).find((n) => n.startsWith("cloop-box"));
@@ -1353,7 +1379,7 @@ function registerTaskScript(task, launcher) {
1353
1379
  [
1354
1380
  "try {",
1355
1381
  `Register-ScheduledTask -TaskName ${psQuote2(task)} -Force`,
1356
- "-Action (New-ScheduledTaskAction -Execute (Join-Path $env:WINDIR 'System32\\cmd.exe') -Argument ('/d /c ' + [char]34 + $launcher + [char]34))",
1382
+ "-Action (New-ScheduledTaskAction -Execute (Join-Path $env:WINDIR 'System32\\conhost.exe') -Argument ('--headless ' + (Join-Path $env:WINDIR 'System32\\cmd.exe') + ' /d /c ' + [char]34 + $launcher + [char]34))",
1357
1383
  "-Trigger (New-ScheduledTaskTrigger -AtLogOn -User $user)",
1358
1384
  "-Principal (New-ScheduledTaskPrincipal -UserId $user -LogonType Interactive -RunLevel Limited)",
1359
1385
  "-Settings (New-ScheduledTaskSettingsSet -ExecutionTimeLimit ([TimeSpan]::Zero) -MultipleInstances IgnoreNew -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable)",
@@ -1365,6 +1391,28 @@ function registerTaskScript(task, launcher) {
1365
1391
  ].join(" ")
1366
1392
  ].join("; ");
1367
1393
  }
1394
+ function endDaemonScript(statePath) {
1395
+ return [
1396
+ `$f = ${psQuote2(statePath)}`,
1397
+ [
1398
+ "if (Test-Path -LiteralPath $f) {",
1399
+ "$id = [int](Get-Content -Raw -LiteralPath $f | ConvertFrom-Json).pid;",
1400
+ "$p = Get-CimInstance Win32_Process -Filter ('ProcessId=' + $id);",
1401
+ "if ($p -and $p.CommandLine -match 'box run') { taskkill /pid $id /t /f | Out-Null }",
1402
+ "}"
1403
+ ].join(" ")
1404
+ ].join("; ");
1405
+ }
1406
+ var endDaemonStep = (environment) => ({
1407
+ command: [
1408
+ "powershell",
1409
+ "-NoProfile",
1410
+ "-NonInteractive",
1411
+ "-Command",
1412
+ endDaemonScript(runnerStatePath(environment))
1413
+ ],
1414
+ mayFail: true
1415
+ });
1368
1416
  function programFor(script, node, npx, version) {
1369
1417
  if (!/[\\/]_npx[\\/]/.test(script)) return [node, script, "box", "run"];
1370
1418
  if (!npx)
@@ -1421,6 +1469,7 @@ function installedService(opts) {
1421
1469
  path: join3(opts.dir ?? join3(opts.home, "AppData", "Local", "Cloop"), `${file}.cmd`),
1422
1470
  steps: [
1423
1471
  { command: ["schtasks", "/end", "/tn", task], mayFail: true },
1472
+ endDaemonStep(opts.environment),
1424
1473
  { command: ["schtasks", "/delete", "/tn", task, "/f"], mayFail: true }
1425
1474
  ],
1426
1475
  running: ["schtasks", "/query", "/tn", task]
@@ -1498,6 +1547,7 @@ function unitFor(opts) {
1498
1547
  contents: contents2,
1499
1548
  start: [
1500
1549
  { command: ["schtasks", "/end", "/tn", task], mayFail: true },
1550
+ endDaemonStep(opts.environment),
1501
1551
  {
1502
1552
  command: [
1503
1553
  "powershell",
@@ -2238,6 +2288,7 @@ export {
2238
2288
  cmdValue,
2239
2289
  cmdWord,
2240
2290
  registerTaskScript,
2291
+ endDaemonScript,
2241
2292
  programFor,
2242
2293
  findNpx,
2243
2294
  awaitDaemon,
@@ -17,6 +17,7 @@ import {
17
17
  connectChosen,
18
18
  connectCommand,
19
19
  detect,
20
+ endDaemonScript,
20
21
  ensureLinger,
21
22
  fallbackDriver,
22
23
  fallbackLine,
@@ -50,17 +51,17 @@ import {
50
51
  which,
51
52
  workFolder,
52
53
  workFolderLine
53
- } from "./chunk-T3B3OPMM.js";
54
- import "./chunk-VWNTDZE3.js";
55
- import "./chunk-QVFCIDR4.js";
54
+ } from "./chunk-RT5UZNMQ.js";
55
+ import "./chunk-BGXIAFPO.js";
56
+ import "./chunk-B2ZI2UWS.js";
56
57
  import "./chunk-NTXQLEMQ.js";
57
58
  import "./chunk-VK6GV757.js";
58
59
  import "./chunk-YEO27QQP.js";
59
60
  import "./chunk-R3CLO2FB.js";
60
- import "./chunk-6QPGSWSN.js";
61
- import "./chunk-OK7DODFL.js";
61
+ import "./chunk-NYJ6XMD4.js";
62
+ import "./chunk-M4Y4YZ46.js";
62
63
  import "./chunk-ES5BRAKJ.js";
63
- import "./chunk-GFAI23T7.js";
64
+ import "./chunk-BLSH7SNK.js";
64
65
  import "./chunk-D5UZW42X.js";
65
66
  export {
66
67
  DEFAULT_T3_URL,
@@ -80,6 +81,7 @@ export {
80
81
  connectChosen,
81
82
  connectCommand,
82
83
  detect,
84
+ endDaemonScript,
83
85
  ensureLinger,
84
86
  fallbackDriver,
85
87
  fallbackLine,
@@ -7,17 +7,17 @@ import {
7
7
  runnerOrigin,
8
8
  stopService,
9
9
  unitOrigin
10
- } from "./chunk-T3B3OPMM.js";
11
- import "./chunk-VWNTDZE3.js";
12
- import "./chunk-QVFCIDR4.js";
10
+ } from "./chunk-RT5UZNMQ.js";
11
+ import "./chunk-BGXIAFPO.js";
12
+ import "./chunk-B2ZI2UWS.js";
13
13
  import "./chunk-NTXQLEMQ.js";
14
14
  import "./chunk-VK6GV757.js";
15
15
  import "./chunk-YEO27QQP.js";
16
16
  import "./chunk-R3CLO2FB.js";
17
- import "./chunk-6QPGSWSN.js";
18
- import "./chunk-OK7DODFL.js";
17
+ import "./chunk-NYJ6XMD4.js";
18
+ import "./chunk-M4Y4YZ46.js";
19
19
  import "./chunk-ES5BRAKJ.js";
20
- import "./chunk-GFAI23T7.js";
20
+ import "./chunk-BLSH7SNK.js";
21
21
  import "./chunk-D5UZW42X.js";
22
22
  export {
23
23
  disconnect,
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  existingRunnerEnvironment,
4
4
  pinExistingRunner
5
- } from "./chunk-T3B3OPMM.js";
6
- import "./chunk-VWNTDZE3.js";
7
- import "./chunk-QVFCIDR4.js";
5
+ } from "./chunk-RT5UZNMQ.js";
6
+ import "./chunk-BGXIAFPO.js";
7
+ import "./chunk-B2ZI2UWS.js";
8
8
  import "./chunk-NTXQLEMQ.js";
9
9
  import "./chunk-VK6GV757.js";
10
10
  import "./chunk-YEO27QQP.js";
11
11
  import "./chunk-R3CLO2FB.js";
12
- import "./chunk-6QPGSWSN.js";
13
- import "./chunk-OK7DODFL.js";
12
+ import "./chunk-NYJ6XMD4.js";
13
+ import "./chunk-M4Y4YZ46.js";
14
14
  import "./chunk-ES5BRAKJ.js";
15
- import "./chunk-GFAI23T7.js";
15
+ import "./chunk-BLSH7SNK.js";
16
16
  import "./chunk-D5UZW42X.js";
17
17
  export {
18
18
  existingRunnerEnvironment,
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-YEO27QQP.js";
5
5
  import {
6
6
  VERSION
7
- } from "./chunk-GFAI23T7.js";
7
+ } from "./chunk-BLSH7SNK.js";
8
8
  import {
9
9
  applyEnvironmentFlag
10
10
  } from "./chunk-D5UZW42X.js";
@@ -65,7 +65,7 @@ Add --staging to any command to use Cloop staging instead of production.
65
65
  A production runner and a staging runner can run side by side on one machine.
66
66
  `;
67
67
  async function pinExistingRunner() {
68
- const { pinExistingRunner: pin } = await import("./existing-runner-NSVNMW7A.js");
68
+ const { pinExistingRunner: pin } = await import("./existing-runner-RIW2IIHJ.js");
69
69
  const { note } = pin();
70
70
  if (note) console.error(note);
71
71
  }
@@ -73,7 +73,7 @@ async function main() {
73
73
  switch (command) {
74
74
  case "login":
75
75
  case "auth": {
76
- const { loginCommand } = await import("./login-SB72KWJZ.js");
76
+ const { loginCommand } = await import("./login-3BUGMP4K.js");
77
77
  await loginCommand(argv);
78
78
  break;
79
79
  }
@@ -83,61 +83,61 @@ async function main() {
83
83
  break;
84
84
  }
85
85
  case "serve": {
86
- const { startMcpServer } = await import("./mcp-server-V4G3K5Y3.js");
86
+ const { startMcpServer } = await import("./mcp-server-6RK4RQVI.js");
87
87
  await startMcpServer();
88
88
  break;
89
89
  }
90
90
  case "statusline": {
91
- const { statuslineCommand } = await import("./statusline-ZI5YXWJ2.js");
91
+ const { statuslineCommand } = await import("./statusline-R4YJZFUC.js");
92
92
  statuslineCommand();
93
93
  break;
94
94
  }
95
95
  case "connect": {
96
- const { connectCommand } = await import("./connect-CBMPU47P.js");
96
+ const { connectCommand } = await import("./connect-7GU3JGWQ.js");
97
97
  await connectCommand(argv.slice(1));
98
98
  break;
99
99
  }
100
100
  case "use": {
101
- const { useCommand } = await import("./use-PPF2XKSX.js");
101
+ const { useCommand } = await import("./use-TIHWB3AS.js");
102
102
  process.exitCode = await useCommand(argv.slice(1));
103
103
  break;
104
104
  }
105
105
  case "disconnect": {
106
- const { disconnectCommand } = await import("./disconnect-CCBXASHZ.js");
106
+ const { disconnectCommand } = await import("./disconnect-UC2D3CHK.js");
107
107
  await disconnectCommand(argv.slice(1));
108
108
  break;
109
109
  }
110
110
  case "box": {
111
- const { boxCommand } = await import("./box-DTLW25MA.js");
111
+ const { boxCommand } = await import("./box-XFXJEHHZ.js");
112
112
  await boxCommand(argv.slice(1));
113
113
  break;
114
114
  }
115
115
  case "runs": {
116
116
  await pinExistingRunner();
117
- const { runsCommand } = await import("./runs-F3MKD7OX.js");
117
+ const { runsCommand } = await import("./runs-4BKFXNM5.js");
118
118
  process.exitCode = runsCommand();
119
119
  break;
120
120
  }
121
121
  case "watch": {
122
122
  await pinExistingRunner();
123
- const { watchCommand } = await import("./runs-F3MKD7OX.js");
123
+ const { watchCommand } = await import("./runs-4BKFXNM5.js");
124
124
  process.exitCode = await watchCommand(argv.slice(1));
125
125
  break;
126
126
  }
127
127
  case "takeover": {
128
128
  await pinExistingRunner();
129
- const { takeoverCommand } = await import("./takeover-HPDCHORW.js");
129
+ const { takeoverCommand } = await import("./takeover-FCKTVLQY.js");
130
130
  process.exitCode = await takeoverCommand(argv.slice(1));
131
131
  break;
132
132
  }
133
133
  case "resume": {
134
134
  await pinExistingRunner();
135
- const { resumeCommand } = await import("./runs-F3MKD7OX.js");
135
+ const { resumeCommand } = await import("./runs-4BKFXNM5.js");
136
136
  process.exitCode = await resumeCommand(argv.slice(1));
137
137
  break;
138
138
  }
139
139
  case "runner": {
140
- const { runnerCommand } = await import("./runner-P3D25RNX.js");
140
+ const { runnerCommand } = await import("./runner-ICPDXYOC.js");
141
141
  await runnerCommand(argv.slice(1));
142
142
  break;
143
143
  }
@@ -3,9 +3,9 @@ import {
3
3
  deviceLogin,
4
4
  loginCommand,
5
5
  refusalSentence
6
- } from "./chunk-OK7DODFL.js";
6
+ } from "./chunk-M4Y4YZ46.js";
7
7
  import "./chunk-ES5BRAKJ.js";
8
- import "./chunk-GFAI23T7.js";
8
+ import "./chunk-BLSH7SNK.js";
9
9
  import "./chunk-D5UZW42X.js";
10
10
  export {
11
11
  deviceLogin,
@@ -33,7 +33,7 @@ import {
33
33
  } from "./chunk-ES5BRAKJ.js";
34
34
  import {
35
35
  VERSION
36
- } from "./chunk-GFAI23T7.js";
36
+ } from "./chunk-BLSH7SNK.js";
37
37
  import {
38
38
  getMeshUrl,
39
39
  getToken
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  connectWebhook,
4
4
  runnerCommand
5
- } from "./chunk-6QPGSWSN.js";
6
- import "./chunk-OK7DODFL.js";
5
+ } from "./chunk-NYJ6XMD4.js";
6
+ import "./chunk-M4Y4YZ46.js";
7
7
  import "./chunk-ES5BRAKJ.js";
8
- import "./chunk-GFAI23T7.js";
8
+ import "./chunk-BLSH7SNK.js";
9
9
  import "./chunk-D5UZW42X.js";
10
10
  export {
11
11
  connectWebhook,
@@ -8,8 +8,8 @@ import {
8
8
  runsCommand,
9
9
  sessionFolder,
10
10
  watchCommand
11
- } from "./chunk-6OWQEIFN.js";
12
- import "./chunk-QVFCIDR4.js";
11
+ } from "./chunk-NMVZPTFM.js";
12
+ import "./chunk-B2ZI2UWS.js";
13
13
  import "./chunk-VK6GV757.js";
14
14
  import "./chunk-D5UZW42X.js";
15
15
  export {
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-VK6GV757.js";
8
8
  import {
9
9
  VERSION
10
- } from "./chunk-GFAI23T7.js";
10
+ } from "./chunk-BLSH7SNK.js";
11
11
  import {
12
12
  getToken
13
13
  } from "./chunk-D5UZW42X.js";
@@ -9,10 +9,10 @@ import {
9
9
  takeoverDir,
10
10
  writeTakeoverReply,
11
11
  writeTakeoverRequest
12
- } from "./chunk-H4EAJ2VW.js";
13
- import "./chunk-6OWQEIFN.js";
14
- import "./chunk-VWNTDZE3.js";
15
- import "./chunk-QVFCIDR4.js";
12
+ } from "./chunk-3J5FFRLN.js";
13
+ import "./chunk-NMVZPTFM.js";
14
+ import "./chunk-BGXIAFPO.js";
15
+ import "./chunk-B2ZI2UWS.js";
16
16
  import "./chunk-NTXQLEMQ.js";
17
17
  import "./chunk-VK6GV757.js";
18
18
  import "./chunk-ES5BRAKJ.js";
@@ -3,20 +3,20 @@ import {
3
3
  DRIVER_NAME,
4
4
  pinExistingRunner,
5
5
  runConnect
6
- } from "./chunk-T3B3OPMM.js";
7
- import "./chunk-VWNTDZE3.js";
6
+ } from "./chunk-RT5UZNMQ.js";
7
+ import "./chunk-BGXIAFPO.js";
8
8
  import {
9
9
  isLocal,
10
10
  readRunnerConfig
11
- } from "./chunk-QVFCIDR4.js";
11
+ } from "./chunk-B2ZI2UWS.js";
12
12
  import "./chunk-NTXQLEMQ.js";
13
13
  import "./chunk-VK6GV757.js";
14
14
  import "./chunk-YEO27QQP.js";
15
15
  import "./chunk-R3CLO2FB.js";
16
- import "./chunk-6QPGSWSN.js";
17
- import "./chunk-OK7DODFL.js";
16
+ import "./chunk-NYJ6XMD4.js";
17
+ import "./chunk-M4Y4YZ46.js";
18
18
  import "./chunk-ES5BRAKJ.js";
19
- import "./chunk-GFAI23T7.js";
19
+ import "./chunk-BLSH7SNK.js";
20
20
  import "./chunk-D5UZW42X.js";
21
21
 
22
22
  // src/commands/use.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloop/runner",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "Make your machine and your agents Cloop runners: device login, the runner daemon, the Cloop MCP server, and Claude Code hooks.",