@vibelet/cli 1.2.108 → 1.2.109

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.
@@ -1,2 +1,2 @@
1
- var c=require("node:fs"),n=require("node:path"),p="@vibelet/cli";function i(r){try{let e=JSON.parse((0,c.readFileSync)(r,"utf8"));if(e.name===p&&typeof e.version=="string"&&e.version.length>0)return e.version}catch{}return null}function l(){return"1.2.108"}var a=l();process.stdout.write(`${a}
1
+ var c=require("node:fs"),n=require("node:path"),p="@vibelet/cli";function i(r){try{let e=JSON.parse((0,c.readFileSync)(r,"utf8"));if(e.name===p&&typeof e.version=="string"&&e.version.length>0)return e.version}catch{}return null}function l(){return"1.2.109"}var a=l();process.stdout.write(`${a}
2
2
  `);
package/dist/vibelet.mjs CHANGED
@@ -14546,6 +14546,14 @@ function parsePortArg() {
14546
14546
  return parsed;
14547
14547
  }
14548
14548
 
14549
+ function normalizeDriver(value) {
14550
+ return String(value ?? '')
14551
+ .trim()
14552
+ .toLowerCase() === 'tui'
14553
+ ? 'tui'
14554
+ : 'print';
14555
+ }
14556
+
14549
14557
  function parseCommandArg(argv) {
14550
14558
  const namedArgsWithValues = new Set([
14551
14559
  '--access',
@@ -14873,9 +14881,16 @@ async function main() {
14873
14881
  const runningVersion = typeof existingHealth.version === 'string' ? existingHealth.version : '';
14874
14882
  const activeSessions = typeof existingHealth.activeSessions === 'number' ? existingHealth.activeSessions : 0;
14875
14883
  const isOutdated = runningVersion && compareVersions(runningVersion, packageJson.version) < 0;
14876
- if (isOutdated && activeSessions === 0) {
14884
+ // Only force a driver switch when the user explicitly requested one (flag/env).
14885
+ const requestedDriver = process.env.VIBE_CLAUDE_DRIVER ? normalizeDriver(process.env.VIBE_CLAUDE_DRIVER) : null;
14886
+ const runningDriver = normalizeDriver(existingHealth.claudeDriverMode);
14887
+ const driverMismatch = requestedDriver !== null && runningDriver !== requestedDriver;
14888
+ const needsRestart = Boolean(isOutdated) || driverMismatch;
14889
+ if (needsRestart && activeSessions === 0) {
14877
14890
  process.stdout.write(
14878
- `Daemon is running v${runningVersion}, CLI is v${packageJson.version}. Restarting daemon to upgrade...\n`,
14891
+ isOutdated
14892
+ ? `Daemon is running v${runningVersion}, CLI is v${packageJson.version}. Restarting daemon to upgrade...\n`
14893
+ : `Daemon is using the "${runningDriver}" Claude driver; you requested "${requestedDriver}". Restarting to switch...\n`,
14879
14894
  );
14880
14895
  await stopRunningDaemon(backend);
14881
14896
  process.stdout.write('Daemon stopped. Starting...\n');
@@ -14890,6 +14905,13 @@ async function main() {
14890
14905
  `Daemon is running v${runningVersion}, CLI is v${packageJson.version}, but ${activeSessions} active session(s) would be interrupted.\n`,
14891
14906
  );
14892
14907
  process.stdout.write('Run `npx vibelet restart` once those sessions are idle to upgrade the daemon.\n');
14908
+ } else if (driverMismatch) {
14909
+ process.stdout.write(
14910
+ `Daemon is using the "${runningDriver}" Claude driver; you requested "${requestedDriver}", but ${activeSessions} active session(s) would be interrupted.\n`,
14911
+ );
14912
+ process.stdout.write(
14913
+ `Run \`npx vibelet restart --claude-driver ${requestedDriver}\` once those sessions are idle to switch.\n`,
14914
+ );
14893
14915
  } else {
14894
14916
  process.stdout.write('Vibelet daemon is already running.\n');
14895
14917
  process.stdout.write('Reusing the current runtime so active sessions stay alive.\n');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibelet/cli",
3
- "version": "1.2.108",
3
+ "version": "1.2.109",
4
4
  "description": "Cross-platform CLI for installing and running the Vibelet daemon",
5
5
  "homepage": "https://vibelet.icu",
6
6
  "files": [