@vibelet/cli 1.2.182 → 1.2.184

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 (39) hide show
  1. package/README.md +4 -0
  2. package/dist/index.cjs +1 -1
  3. package/dist/inventory-scan-worker.cjs +1 -1
  4. package/dist/runtime-version.cjs +1 -1
  5. package/dist/tailcat/vibelet-tailcat-darwin-amd64 +0 -0
  6. package/dist/tailcat/vibelet-tailcat-darwin-arm64 +0 -0
  7. package/dist/tailcat/vibelet-tailcat-linux-amd64 +0 -0
  8. package/dist/tailcat/vibelet-tailcat-linux-arm64 +0 -0
  9. package/dist/tailcat/vibelet-tailcat-win32-amd64.exe +0 -0
  10. package/dist/tailcat/vibelet-tailcat-win32-arm64.exe +0 -0
  11. package/dist/vibelet.mjs +242 -125
  12. package/dist/web/assets/App-1V1UoQkP.js +12 -0
  13. package/dist/web/assets/{ArchiveSyncPanel-CQW9sGn8.js → ArchiveSyncPanel-HfbSbAJT.js} +1 -1
  14. package/dist/web/assets/{ConnectionSettingsPanel-CvgjycC_.js → ConnectionSettingsPanel-Y8Um-67e.js} +1 -1
  15. package/dist/web/assets/{DaemonSettingsPanel-8WGOLUs-.js → DaemonSettingsPanel--znFJEC6.js} +1 -1
  16. package/dist/web/assets/{DiffDrawer-8wyT-3Bj.js → DiffDrawer-BI-wtkQ_.js} +1 -1
  17. package/dist/web/assets/FilesControlPanel-B5M5ueO9.js +2 -0
  18. package/dist/web/assets/LanguageSettingsPanel-BLwzc7Dm.js +1 -0
  19. package/dist/web/assets/{NotificationSettingsPanel--Ov_1saA.js → NotificationSettingsPanel-IgZdwrhi.js} +1 -1
  20. package/dist/web/assets/SavedTargetsPanel-DggmoRgT.js +1 -0
  21. package/dist/web/assets/ThemeSettingsPanel-vB2Ox3sA.js +1 -0
  22. package/dist/web/assets/{file-text-B-0kY5qg.js → file-text-NAVq0aqX.js} +1 -1
  23. package/dist/web/assets/highlighted-body-TPN3WLV5-ClieluW-.js +1 -0
  24. package/dist/web/assets/{index-DRV2XMZs.js → index-CXts92Zv.js} +10 -10
  25. package/dist/web/assets/index-D8mZeSsk.css +1 -0
  26. package/dist/web/assets/{mermaid-O7DHMXV3-DaZ-aNWp.css → mermaid-O7DHMXV3-BPtfCfol.css} +1 -1
  27. package/dist/web/assets/{mermaid-O7DHMXV3-COP4-7nw.js → mermaid-O7DHMXV3-D0ujIgIK.js} +49 -49
  28. package/dist/web/assets/splash-logo-SQcOtj-8.png +0 -0
  29. package/dist/web/icon.svg +1 -1
  30. package/dist/web/index.html +3 -3
  31. package/dist/web/logo.svg +13 -0
  32. package/dist/web/manifest.webmanifest +1 -1
  33. package/package.json +2 -1
  34. package/dist/web/assets/App-20rnW-dS.js +0 -11
  35. package/dist/web/assets/FilesControlPanel-CM73JghJ.js +0 -2
  36. package/dist/web/assets/LanguageSettingsPanel-3P8xvsNr.js +0 -1
  37. package/dist/web/assets/SavedTargetsPanel-B4UDMnAq.js +0 -1
  38. package/dist/web/assets/highlighted-body-TPN3WLV5-BgMEhjMq.js +0 -1
  39. package/dist/web/assets/index-nF-4Ar2D.css +0 -1
package/dist/vibelet.mjs CHANGED
@@ -14083,6 +14083,72 @@ async function tryUpdateRunningDaemonRelay({
14083
14083
  }
14084
14084
 
14085
14085
 
14086
+ /***/ }),
14087
+
14088
+ /***/ 4162:
14089
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
14090
+
14091
+ /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
14092
+ /* harmony export */ n: () => (/* binding */ printCliHelp)
14093
+ /* harmony export */ });
14094
+ function printCliHelp({ packageJson, port }) {
14095
+ process.stdout.write(`Vibelet ${packageJson.version}\n\n`);
14096
+ process.stdout.write(`Package names:\n`);
14097
+ process.stdout.write(` @vibelet/cli\n`);
14098
+ process.stdout.write(` vibelet\n\n`);
14099
+ process.stdout.write(`Usage:\n`);
14100
+ process.stdout.write(
14101
+ ` npx ${packageJson.name} Install/start the daemon, auto-enable remote access, and print a pairing QR code\n`,
14102
+ );
14103
+ process.stdout.write(` npx ${packageJson.name} start Same as above\n`);
14104
+ process.stdout.write(
14105
+ ` npx ${packageJson.name} --access=local Use LAN/local pairing only; skip Cloudflare and Tailscale\n`,
14106
+ );
14107
+ process.stdout.write(` npx ${packageJson.name} --access=remote --force Force a new Cloudflare Tunnel URL\n`);
14108
+ process.stdout.write(` npx ${packageJson.name} --access=https://<url> Use a custom tunnel URL for remote access\n`);
14109
+ process.stdout.write(` npx ${packageJson.name} --access=<host> Set the primary LAN/Tailscale host/IP address\n`);
14110
+ process.stdout.write(
14111
+ ` npx ${packageJson.name} --tailcat Enable userspace Tailcat direct access (keeps existing fallbacks)\n`,
14112
+ );
14113
+ process.stdout.write(` npx ${packageJson.name} --no-tailcat Disable previously enabled Tailcat access\n`);
14114
+ process.stdout.write(` npx ${packageJson.name} --port <port> Start or query the daemon on a custom port\n`);
14115
+ process.stdout.write(
14116
+ ` npx ${packageJson.name} --claude-driver tui Drive the interactive Claude TUI (subscription) instead of \`claude -p\`\n`,
14117
+ );
14118
+ process.stdout.write(` npx ${packageJson.name} --access=<host>,<fallbacks> Set fallback LAN/Tailscale hosts\n`);
14119
+ process.stdout.write(` npx ${packageJson.name} stop Stop the daemon\n`);
14120
+ process.stdout.write(` npx ${packageJson.name} restart Restart the daemon\n`);
14121
+ process.stdout.write(` npx ${packageJson.name} status Show service and daemon status\n`);
14122
+ process.stdout.write(` npx ${packageJson.name} logs Print recent daemon logs\n`);
14123
+ process.stdout.write(` npx ${packageJson.name} reset Reset pairings and print a fresh QR code\n`);
14124
+ process.stdout.write(` npx ${packageJson.name} claude [...args] Start Claude Code with Vibelet App takeover\n`);
14125
+ process.stdout.write(` npx ${packageJson.name} codex [...args] Start Codex with Vibelet App takeover\n`);
14126
+ process.stdout.write(` npx ${packageJson.name} --help Show this help text\n`);
14127
+ process.stdout.write(` npx ${packageJson.name} --version Show the installed CLI version\n`);
14128
+ process.stdout.write(`\n`);
14129
+ process.stdout.write(`You can also invoke the published alias with:\n`);
14130
+ process.stdout.write(` npx ${packageJson.name === 'vibelet' ? '@vibelet/cli' : 'vibelet'}\n`);
14131
+ process.stdout.write(` vibelet\n\n`);
14132
+ process.stdout.write(`Remote access:\n`);
14133
+ process.stdout.write(` # Remote access is on by default for start/reset/restart\n`);
14134
+ process.stdout.write(` npx ${packageJson.name}\n\n`);
14135
+ process.stdout.write(` # Want LAN/local-only pairing for this run?\n`);
14136
+ process.stdout.write(` npx ${packageJson.name} --access=local\n\n`);
14137
+ process.stdout.write(` # Need a fresh Cloudflare Tunnel URL?\n`);
14138
+ process.stdout.write(` npx ${packageJson.name} --access=remote --force\n\n`);
14139
+ process.stdout.write(` # Or bring your own tunnel and pass the URL manually:\n`);
14140
+ process.stdout.write(` npx cloudflared tunnel --protocol auto --url http://localhost:${port}\n`);
14141
+ process.stdout.write(` ngrok http ${port}\n`);
14142
+ process.stdout.write(` npx ${packageJson.name} --access=https://<your-tunnel-url>\n\n`);
14143
+ process.stdout.write(` # Tailscale (P2P VPN, no tunnel needed)\n`);
14144
+ process.stdout.write(` npx ${packageJson.name} --access=<tailscale-ip>\n\n`);
14145
+ process.stdout.write(`\nTailcat direct access:\n`);
14146
+ process.stdout.write(` npx ${packageJson.name} --tailcat\n`);
14147
+ process.stdout.write(` # Tailcat runs inside Vibelet and does not change system VPN, DNS, or routes.\n\n`);
14148
+ process.stdout.write(`Legacy aliases still work: --local, --relay, --host, --fallback-hosts, --remote, --tunnel.\n`);
14149
+ }
14150
+
14151
+
14086
14152
  /***/ }),
14087
14153
 
14088
14154
  /***/ 1010:
@@ -14286,21 +14352,40 @@ function normalizePairingConnections(pairingPayload) {
14286
14352
  typeof target.source === 'string' &&
14287
14353
  typeof target.stability === 'string',
14288
14354
  )
14289
- .map((target) => ({
14290
- kind: target.kind === 'relay' ? 'relay' : 'direct',
14291
- host: normalizeHostValue(target.host),
14292
- port: Math.floor(Number(target.port)),
14293
- ...(target.secure === true ? { secure: true } : {}),
14294
- source: target.source,
14295
- stability: target.stability,
14296
- }))
14355
+ .map((target) => {
14356
+ const tailcat =
14357
+ target.tailcat &&
14358
+ typeof target.tailcat.serverAddress === 'string' &&
14359
+ target.tailcat.serverAddress.startsWith('tc') &&
14360
+ target.tailcat.serverAddress.length <= 4096 &&
14361
+ Number.isInteger(target.tailcat.remotePort) &&
14362
+ target.tailcat.remotePort > 0 &&
14363
+ target.tailcat.remotePort <= 65535
14364
+ ? {
14365
+ serverAddress: target.tailcat.serverAddress,
14366
+ remotePort: target.tailcat.remotePort,
14367
+ }
14368
+ : null;
14369
+ return {
14370
+ kind: target.kind === 'relay' ? 'relay' : 'direct',
14371
+ host: normalizeHostValue(target.host),
14372
+ port: Math.floor(Number(target.port)),
14373
+ ...(target.secure === true ? { secure: true } : {}),
14374
+ source: target.source,
14375
+ stability: target.stability,
14376
+ ...(tailcat ? { tailcat } : {}),
14377
+ };
14378
+ })
14297
14379
  .filter((target) => target.host && target.port > 0)
14298
14380
  : [];
14299
14381
 
14300
14382
  const dedupe = (targets) => {
14301
14383
  const seen = new Set();
14302
14384
  return targets.filter((target) => {
14303
- const key = `${target.host}:${target.port}:${target.secure === true ? 'secure' : 'plain'}`;
14385
+ const key =
14386
+ target.source === 'tailcat' && target.tailcat
14387
+ ? `tailcat:${target.tailcat.remotePort}`
14388
+ : `${target.host}:${target.port}:${target.secure === true ? 'secure' : 'plain'}`;
14304
14389
  if (seen.has(key)) {
14305
14390
  return false;
14306
14391
  }
@@ -14400,14 +14485,13 @@ function createCompactPairingPayload(pairingPayload) {
14400
14485
  };
14401
14486
  if (pairingPayload.fallbackHosts) compactPayload.f = pairingPayload.fallbackHosts;
14402
14487
  if (connections.length > 0) {
14403
- compactPayload.o = connections.map((target) => [
14404
- target.kind,
14405
- target.host,
14406
- target.port,
14407
- target.source,
14408
- target.stability,
14409
- target.secure === true,
14410
- ]);
14488
+ compactPayload.o = connections.map((target) => {
14489
+ const tuple = [target.kind, target.host, target.port, target.source, target.stability, target.secure === true];
14490
+ if (target.tailcat) {
14491
+ tuple.push(target.tailcat.serverAddress, target.tailcat.remotePort);
14492
+ }
14493
+ return tuple;
14494
+ });
14411
14495
  }
14412
14496
  return compactPayload;
14413
14497
  }
@@ -14422,6 +14506,8 @@ function formatConnectionSourceLabel(source) {
14422
14506
  return 'Manual Host';
14423
14507
  case 'tailscale':
14424
14508
  return 'Tailscale';
14509
+ case 'tailcat':
14510
+ return 'Tailcat Direct';
14425
14511
  case 'local_network':
14426
14512
  return 'LAN';
14427
14513
  case 'fallback':
@@ -14490,6 +14576,7 @@ function buildWebUiUrl(target, pairingPayload) {
14490
14576
  /* harmony export */ Ne: () => (/* binding */ shouldRefuseRuntimeDowngrade),
14491
14577
  /* harmony export */ Pg: () => (/* binding */ shouldRetireManagedQuickTunnel),
14492
14578
  /* harmony export */ ZN: () => (/* binding */ shouldReuseHealthyDaemon),
14579
+ /* harmony export */ Zg: () => (/* binding */ isTailcatConfigurationMismatch),
14493
14580
  /* harmony export */ gm: () => (/* binding */ shouldManageQuickTunnel),
14494
14581
  /* harmony export */ iX: () => (/* binding */ doesHealthSupportTerminalControl),
14495
14582
  /* harmony export */ nW: () => (/* binding */ doesHealthMatchRequestedConnectionConfig)
@@ -14535,6 +14622,12 @@ function shouldReuseHealthyDaemon({
14535
14622
  return !hasExplicitConfigOverrides || canApplyConnectionConfigWithoutRestart;
14536
14623
  }
14537
14624
 
14625
+ function isTailcatConfigurationMismatch({ health, tailcatEnabled }) {
14626
+ if (!health) return false;
14627
+ const reportedEnabled = health?.tailcat?.enabled;
14628
+ return typeof reportedEnabled === 'boolean' ? reportedEnabled !== tailcatEnabled : tailcatEnabled;
14629
+ }
14630
+
14538
14631
  function doesHealthSupportTerminalControl(health) {
14539
14632
  if (!health || typeof health !== 'object') return false;
14540
14633
  const terminals = health.terminals;
@@ -14633,9 +14726,15 @@ function doesHealthMatchRequestedConnectionConfig({
14633
14726
  canonicalHost = '',
14634
14727
  fallbackHosts = '',
14635
14728
  localMode = false,
14729
+ tailcatEnabled,
14636
14730
  }) {
14637
14731
  if (!health) return false;
14638
14732
 
14733
+ if (typeof tailcatEnabled === 'boolean') {
14734
+ const runningTailcatEnabled = health.tailcat?.enabled === true;
14735
+ if (runningTailcatEnabled !== tailcatEnabled) return false;
14736
+ }
14737
+
14639
14738
  const currentRelayUrl = typeof health.relayUrl === 'string' ? health.relayUrl : '';
14640
14739
  if (relayUrl) {
14641
14740
  return currentRelayUrl === relayUrl;
@@ -14696,6 +14795,34 @@ async function stopDaemonWithHooks({
14696
14795
  }
14697
14796
 
14698
14797
 
14798
+ /***/ }),
14799
+
14800
+ /***/ 5798:
14801
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
14802
+
14803
+ /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
14804
+ /* harmony export */ S: () => (/* binding */ createTailcatConfigStore)
14805
+ /* harmony export */ });
14806
+ /* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(3024);
14807
+
14808
+
14809
+ function createTailcatConfigStore(configPath, dataDirectory) {
14810
+ return {
14811
+ load() {
14812
+ try {
14813
+ return JSON.parse((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(configPath, 'utf8')).enabled === true;
14814
+ } catch {
14815
+ return false;
14816
+ }
14817
+ },
14818
+ save(enabled) {
14819
+ (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync)(dataDirectory, { recursive: true });
14820
+ (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync)(configPath, `${JSON.stringify({ enabled }, null, 2)}\n`, { encoding: 'utf8', mode: 0o600 });
14821
+ },
14822
+ };
14823
+ }
14824
+
14825
+
14699
14826
  /***/ }),
14700
14827
 
14701
14828
  /***/ 4566:
@@ -14709,15 +14836,19 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
14709
14836
  /* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(6760);
14710
14837
  /* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(3136);
14711
14838
  /* harmony import */ var qrcode__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(7514);
14712
- /* harmony import */ var _vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(6927);
14839
+ /* harmony import */ var _vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(6927);
14713
14840
  /* harmony import */ var _cloudflared_tunnel_manager_mjs__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(2755);
14714
14841
  /* harmony import */ var _vibelet_cloudflare_runtime_mjs__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(3869);
14715
- /* harmony import */ var _vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(1010);
14842
+ /* harmony import */ var _vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(1010);
14716
14843
  /* harmony import */ var _linux_systemd_mjs__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(4217);
14717
- /* harmony import */ var _vibelet_stop_logic_mjs__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(6274);
14718
- /* harmony import */ var _vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(4);
14719
- /* harmony import */ var _terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(636);
14720
- /* harmony import */ var _vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(7721);
14844
+ /* harmony import */ var _vibelet_stop_logic_mjs__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(6274);
14845
+ /* harmony import */ var _vibelet_help_mjs__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(4162);
14846
+ /* harmony import */ var _vibelet_tailcat_config_mjs__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(5798);
14847
+ /* harmony import */ var _vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(4);
14848
+ /* harmony import */ var _terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(636);
14849
+ /* harmony import */ var _vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(7721);
14850
+
14851
+
14721
14852
 
14722
14853
 
14723
14854
 
@@ -14750,11 +14881,12 @@ const runtimeDir = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, '
14750
14881
  const runtimeCurrentDir = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(runtimeDir, 'current');
14751
14882
  const runtimeMetadataPath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(runtimeCurrentDir, 'runtime.json');
14752
14883
  const runtimeDaemonEntryPath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(runtimeCurrentDir, 'dist', 'index.cjs');
14753
- const runtimeTerminalControlTokenPath = _terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_10__/* .terminalControlTokenPath */ .gJ;
14884
+ const runtimeTerminalControlTokenPath = _terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_11__/* .terminalControlTokenPath */ .gJ;
14754
14885
  const stdoutLogPath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(logDir, 'daemon.stdout.log');
14755
14886
  const stderrLogPath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(logDir, 'daemon.stderr.log');
14756
14887
  const pidFilePath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'daemon.pid');
14757
14888
  const relayConfig = (0,_vibelet_cloudflare_runtime_mjs__WEBPACK_IMPORTED_MODULE_8__/* .createRelayConfigStore */ .T7)((0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'relay.json'));
14889
+ const tailcatConfig = (0,_vibelet_tailcat_config_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createTailcatConfigStore */ .S)((0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'tailcat.json'), vibeletDir);
14758
14890
  const tunnelStatePath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'tunnel.json');
14759
14891
  const cloudflaredUpdateStatePath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'cloudflared-update.json');
14760
14892
  const updateCheckPath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'update-check.json');
@@ -14907,7 +15039,7 @@ function ensureRuntimeInstalled() {
14907
15039
  const runtimeMetadata = readRuntimeMetadata();
14908
15040
 
14909
15041
  if (
14910
- (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_11__/* .shouldRefuseRuntimeDowngrade */ .Ne)({
15042
+ (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__/* .shouldRefuseRuntimeDowngrade */ .Ne)({
14911
15043
  cliVersion: packageJson.version,
14912
15044
  runtimeVersion: runtimeMetadata?.version,
14913
15045
  runtimeEntryExists: (0,node_fs__WEBPACK_IMPORTED_MODULE_1__.existsSync)(runtimeDaemonEntryPath),
@@ -15111,7 +15243,7 @@ function createDarwinBackend() {
15111
15243
  }
15112
15244
 
15113
15245
  function bootoutService() {
15114
- return (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_12__/* .bootoutLaunchdService */ .B)({
15246
+ return (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_13__/* .bootoutLaunchdService */ .B)({
15115
15247
  launchctl,
15116
15248
  launchDomain,
15117
15249
  label,
@@ -15136,6 +15268,7 @@ function createDarwinBackend() {
15136
15268
  if (process.env.VIBELET_CANONICAL_HOST) envVars.VIBELET_CANONICAL_HOST = process.env.VIBELET_CANONICAL_HOST;
15137
15269
  if (process.env.VIBELET_FALLBACK_HOSTS) envVars.VIBELET_FALLBACK_HOSTS = process.env.VIBELET_FALLBACK_HOSTS;
15138
15270
  if (process.env.VIBELET_LOCAL_ONLY) envVars.VIBELET_LOCAL_ONLY = process.env.VIBELET_LOCAL_ONLY;
15271
+ if (process.env.VIBELET_TAILCAT) envVars.VIBELET_TAILCAT = process.env.VIBELET_TAILCAT;
15139
15272
  if (process.env.VIBE_CLAUDE_DRIVER) envVars.VIBE_CLAUDE_DRIVER = process.env.VIBE_CLAUDE_DRIVER;
15140
15273
  if (process.env.CODEX_PATH) envVars.CODEX_PATH = process.env.CODEX_PATH;
15141
15274
  if (process.env.CLAUDE_PATH) envVars.CLAUDE_PATH = process.env.CLAUDE_PATH;
@@ -15200,7 +15333,7 @@ ${envSection}
15200
15333
  if (result.status !== 0) {
15201
15334
  fail(
15202
15335
  'Failed to bootstrap vibelet launch agent.',
15203
- [(0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_12__/* .describeLaunchctlResult */ .N)(bootoutResult.result), (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_12__/* .describeLaunchctlResult */ .N)(result)].filter(Boolean).join('\n'),
15336
+ [(0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_13__/* .describeLaunchctlResult */ .N)(bootoutResult.result), (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_13__/* .describeLaunchctlResult */ .N)(result)].filter(Boolean).join('\n'),
15204
15337
  );
15205
15338
  }
15206
15339
  }
@@ -15216,7 +15349,7 @@ ${envSection}
15216
15349
  stop() {
15217
15350
  const bootoutResult = bootoutService();
15218
15351
  if (!bootoutResult.ok) {
15219
- fail('Failed to unload vibelet launch agent.', (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_12__/* .describeLaunchctlResult */ .N)(bootoutResult.result));
15352
+ fail('Failed to unload vibelet launch agent.', (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_13__/* .describeLaunchctlResult */ .N)(bootoutResult.result));
15220
15353
  }
15221
15354
  // bootout returns before launchd actually finishes unloading. Poll
15222
15355
  // until the service is gone so a follow-up install() doesn't see a
@@ -15272,7 +15405,7 @@ RestartSec=3
15272
15405
  StandardOutput=append:${stdoutLogPath}
15273
15406
  StandardError=append:${stderrLogPath}
15274
15407
  Environment=PATH=${servicePath}
15275
- Environment=VIBE_PORT=${port}${process.env.VIBELET_RELAY_URL ? `\nEnvironment=VIBELET_RELAY_URL=${process.env.VIBELET_RELAY_URL}` : ''}${process.env.VIBELET_CANONICAL_HOST ? `\nEnvironment=VIBELET_CANONICAL_HOST=${process.env.VIBELET_CANONICAL_HOST}` : ''}${process.env.VIBELET_FALLBACK_HOSTS ? `\nEnvironment=VIBELET_FALLBACK_HOSTS=${process.env.VIBELET_FALLBACK_HOSTS}` : ''}${process.env.VIBELET_LOCAL_ONLY ? `\nEnvironment=VIBELET_LOCAL_ONLY=${process.env.VIBELET_LOCAL_ONLY}` : ''}${process.env.VIBE_CLAUDE_DRIVER ? `\nEnvironment=VIBE_CLAUDE_DRIVER=${process.env.VIBE_CLAUDE_DRIVER}` : ''}${process.env.CODEX_PATH ? `\nEnvironment=CODEX_PATH=${process.env.CODEX_PATH}` : ''}${process.env.CLAUDE_PATH ? `\nEnvironment=CLAUDE_PATH=${process.env.CLAUDE_PATH}` : ''}
15408
+ Environment=VIBE_PORT=${port}${process.env.VIBELET_RELAY_URL ? `\nEnvironment=VIBELET_RELAY_URL=${process.env.VIBELET_RELAY_URL}` : ''}${process.env.VIBELET_CANONICAL_HOST ? `\nEnvironment=VIBELET_CANONICAL_HOST=${process.env.VIBELET_CANONICAL_HOST}` : ''}${process.env.VIBELET_FALLBACK_HOSTS ? `\nEnvironment=VIBELET_FALLBACK_HOSTS=${process.env.VIBELET_FALLBACK_HOSTS}` : ''}${process.env.VIBELET_LOCAL_ONLY ? `\nEnvironment=VIBELET_LOCAL_ONLY=${process.env.VIBELET_LOCAL_ONLY}` : ''}${process.env.VIBELET_TAILCAT ? `\nEnvironment=VIBELET_TAILCAT=${process.env.VIBELET_TAILCAT}` : ''}${process.env.VIBE_CLAUDE_DRIVER ? `\nEnvironment=VIBE_CLAUDE_DRIVER=${process.env.VIBE_CLAUDE_DRIVER}` : ''}${process.env.CODEX_PATH ? `\nEnvironment=CODEX_PATH=${process.env.CODEX_PATH}` : ''}${process.env.CLAUDE_PATH ? `\nEnvironment=CLAUDE_PATH=${process.env.CLAUDE_PATH}` : ''}
15276
15409
 
15277
15410
  [Install]
15278
15411
  WantedBy=default.target
@@ -15539,8 +15672,7 @@ async function requestShutdown() {
15539
15672
  signal: AbortSignal.timeout(2000),
15540
15673
  });
15541
15674
  } catch {
15542
- // Request timed out or connection refused daemon may be deadlocked or
15543
- // already gone. Either way, fall through to polling for actual exit.
15675
+ // A timeout or refusal means the daemon may be deadlocked or gone; poll for its actual exit.
15544
15676
  }
15545
15677
  return waitForDaemonExit(5_000);
15546
15678
  }
@@ -15560,7 +15692,7 @@ function retireTrackedQuickTunnel({ required = false } = {}) {
15560
15692
 
15561
15693
  async function stopRunningDaemon(backend) {
15562
15694
  try {
15563
- await (0,_vibelet_stop_logic_mjs__WEBPACK_IMPORTED_MODULE_13__/* .stopDaemonWithHooks */ .v)({
15695
+ await (0,_vibelet_stop_logic_mjs__WEBPACK_IMPORTED_MODULE_14__/* .stopDaemonWithHooks */ .v)({
15564
15696
  requestShutdown,
15565
15697
  backendStop: () => backend.stop(),
15566
15698
  waitForDaemonExit,
@@ -15573,7 +15705,7 @@ async function stopRunningDaemon(backend) {
15573
15705
  async function ensureDaemonForTerminalControl(backend) {
15574
15706
  const healthyDaemon = await probeHealth(1_500);
15575
15707
  const tokenReady = (0,node_fs__WEBPACK_IMPORTED_MODULE_1__.existsSync)(runtimeTerminalControlTokenPath);
15576
- const terminalControlReady = healthyDaemon && tokenReady && (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_11__/* .doesHealthSupportTerminalControl */ .iX)(healthyDaemon);
15708
+ const terminalControlReady = healthyDaemon && tokenReady && (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__/* .doesHealthSupportTerminalControl */ .iX)(healthyDaemon);
15577
15709
  if (terminalControlReady) {
15578
15710
  return healthyDaemon;
15579
15711
  }
@@ -15581,7 +15713,7 @@ async function ensureDaemonForTerminalControl(backend) {
15581
15713
  if (healthyDaemon && !terminalControlReady) {
15582
15714
  const activeSessions = typeof healthyDaemon.activeSessions === 'number' ? healthyDaemon.activeSessions : 0;
15583
15715
  if (activeSessions > 0) {
15584
- const reason = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_11__/* .doesHealthSupportTerminalControl */ .iX)(healthyDaemon)
15716
+ const reason = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__/* .doesHealthSupportTerminalControl */ .iX)(healthyDaemon)
15585
15717
  ? 'terminal-control token is missing'
15586
15718
  : 'the running daemon does not advertise terminal-control support';
15587
15719
  process.stderr.write(
@@ -15600,18 +15732,13 @@ async function ensureDaemonForTerminalControl(backend) {
15600
15732
  }
15601
15733
 
15602
15734
  function validateExplicitCleartextHosts({ hostArg, fallbackHostsArg }) {
15603
- const unsafeHosts = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_14__/* .findUnsafeCleartextHosts */ .dE)({ hostArg, fallbackHostsArg });
15604
- if (unsafeHosts.length === 0) {
15605
- return;
15606
- }
15607
- fail(
15608
- `Refusing public cleartext host ${unsafeHosts[0]}. Use --access=https://..., a Tailscale host, or a LAN/local address.`,
15609
- );
15735
+ const [unsafeHost] = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__/* .findUnsafeCleartextHosts */ .dE)({ hostArg, fallbackHostsArg });
15736
+ if (unsafeHost) fail(`Refusing public cleartext host ${unsafeHost}. Use HTTPS, Tailscale, LAN, or local access.`);
15610
15737
  }
15611
15738
 
15612
15739
  async function printPairingQr(pairingPayload) {
15613
- const payload = JSON.stringify((0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_14__/* .createCompactPairingPayload */ .YP)(pairingPayload));
15614
- const deepLink = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_14__/* .buildPairingDeepLink */ .N7)(payload);
15740
+ const payload = JSON.stringify((0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__/* .createCompactPairingPayload */ .YP)(pairingPayload));
15741
+ const deepLink = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__/* .buildPairingDeepLink */ .N7)(payload);
15615
15742
  (0,node_fs__WEBPACK_IMPORTED_MODULE_1__.mkdirSync)(vibeletDir, { recursive: true });
15616
15743
  await qrcode__WEBPACK_IMPORTED_MODULE_6__.toFile(pairingQrPngPath, payload, {
15617
15744
  type: 'png',
@@ -15640,10 +15767,11 @@ async function printPairingSummary(existingHealth = null, { relayUrlOverride = n
15640
15767
  const pairingPayload =
15641
15768
  relayUrlOverride === null
15642
15769
  ? daemonPairingPayload
15643
- : (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_14__/* .applyRelayUrlToPairingPayload */ .mp)(daemonPairingPayload, relayUrlOverride);
15644
- const connections = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_14__/* .normalizePairingConnections */ .No)(pairingPayload);
15770
+ : (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__/* .applyRelayUrlToPairingPayload */ .mp)(daemonPairingPayload, relayUrlOverride);
15771
+ const connections = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__/* .normalizePairingConnections */ .No)(pairingPayload);
15645
15772
  const [preferredConnection, ...otherConnections] = connections;
15646
- const webUiConnection = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_14__/* .selectWebUiConnectionTarget */ .SF)(connections);
15773
+ const webUiConnection = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__/* .selectWebUiConnectionTarget */ .SF)(connections);
15774
+ const compactPairingPayload = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__/* .createCompactPairingPayload */ .YP)(pairingPayload);
15647
15775
 
15648
15776
  process.stdout.write(`Vibelet daemon is ready.\n\n`);
15649
15777
  process.stdout.write(`Device: ${health.displayName}\n`);
@@ -15651,73 +15779,26 @@ async function printPairingSummary(existingHealth = null, { relayUrlOverride = n
15651
15779
  process.stdout.write(`Host: ${pairingPayload.canonicalHost}\n`);
15652
15780
  process.stdout.write(`Port: ${pairingPayload.port}\n`);
15653
15781
  if (preferredConnection) {
15654
- process.stdout.write(`Preferred path: ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_14__/* .formatConnectionSummary */ .uR)(preferredConnection)}\n`);
15782
+ process.stdout.write(`Preferred path: ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__/* .formatConnectionSummary */ .uR)(preferredConnection)}\n`);
15655
15783
  }
15656
15784
  if (otherConnections.length > 0) {
15657
15785
  process.stdout.write(`Other paths:\n`);
15658
15786
  otherConnections.forEach((target) => {
15659
- process.stdout.write(` - ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_14__/* .formatConnectionSummary */ .uR)(target)}\n`);
15787
+ process.stdout.write(` - ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__/* .formatConnectionSummary */ .uR)(target)}\n`);
15660
15788
  });
15661
15789
  }
15662
- if (webUiConnection) {
15663
- process.stdout.write(`Web UI: ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_14__/* .buildWebUiUrl */ .Gv)(webUiConnection, (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_14__/* .createCompactPairingPayload */ .YP)(pairingPayload))}\n`);
15790
+ process.stdout.write(`Web UI: ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__/* .buildWebUiUrl */ .Gv)({ host: 'localhost', port }, compactPairingPayload)}\n`);
15791
+ if (webUiConnection && webUiConnection.host !== 'localhost') {
15792
+ process.stdout.write(`Web UI (other devices): ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__/* .buildWebUiUrl */ .Gv)(webUiConnection, compactPairingPayload)}\n`);
15664
15793
  }
15665
15794
  process.stdout.write(`Paired devices: ${health.pairedDevices}\n`);
15666
15795
  await printPairingQr(pairingPayload);
15667
15796
  }
15668
15797
 
15669
- function printHelp() {
15670
- process.stdout.write(`Vibelet ${packageJson.version}\n\n`);
15671
- process.stdout.write(`Package names:\n`);
15672
- process.stdout.write(` @vibelet/cli\n`);
15673
- process.stdout.write(` vibelet\n\n`);
15674
- process.stdout.write(`Usage:\n`);
15675
- process.stdout.write(
15676
- ` npx ${packageJson.name} Install/start the daemon, auto-enable remote access, and print a pairing QR code\n`,
15677
- );
15678
- process.stdout.write(` npx ${packageJson.name} start Same as above\n`);
15679
- process.stdout.write(
15680
- ` npx ${packageJson.name} --access=local Use LAN/local pairing only; skip Cloudflare and Tailscale\n`,
15681
- );
15682
- process.stdout.write(` npx ${packageJson.name} --access=remote --force Force a new Cloudflare Tunnel URL\n`);
15683
- process.stdout.write(` npx ${packageJson.name} --access=https://<url> Use a custom tunnel URL for remote access\n`);
15684
- process.stdout.write(` npx ${packageJson.name} --access=<host> Set the primary LAN/Tailscale host/IP address\n`);
15685
- process.stdout.write(` npx ${packageJson.name} --port <port> Start or query the daemon on a custom port\n`);
15686
- process.stdout.write(
15687
- ` npx ${packageJson.name} --claude-driver tui Drive the interactive Claude TUI (subscription) instead of \`claude -p\`\n`,
15688
- );
15689
- process.stdout.write(` npx ${packageJson.name} --access=<host>,<fallbacks> Set fallback LAN/Tailscale hosts\n`);
15690
- process.stdout.write(` npx ${packageJson.name} stop Stop the daemon\n`);
15691
- process.stdout.write(` npx ${packageJson.name} restart Restart the daemon\n`);
15692
- process.stdout.write(` npx ${packageJson.name} status Show service and daemon status\n`);
15693
- process.stdout.write(` npx ${packageJson.name} logs Print recent daemon logs\n`);
15694
- process.stdout.write(` npx ${packageJson.name} reset Reset pairings and print a fresh QR code\n`);
15695
- process.stdout.write(` npx ${packageJson.name} claude [...args] Start Claude Code with Vibelet App takeover\n`);
15696
- process.stdout.write(` npx ${packageJson.name} codex [...args] Start Codex with Vibelet App takeover\n`);
15697
- process.stdout.write(` npx ${packageJson.name} --help Show this help text\n`);
15698
- process.stdout.write(` npx ${packageJson.name} --version Show the installed CLI version\n`);
15699
- process.stdout.write(`\n`);
15700
- process.stdout.write(`You can also invoke the published alias with:\n`);
15701
- process.stdout.write(` npx ${packageJson.name === 'vibelet' ? '@vibelet/cli' : 'vibelet'}\n`);
15702
- process.stdout.write(` vibelet\n\n`);
15703
- process.stdout.write(`Remote access:\n`);
15704
- process.stdout.write(` # Remote access is on by default for start/reset/restart\n`);
15705
- process.stdout.write(` npx ${packageJson.name}\n\n`);
15706
- process.stdout.write(` # Want LAN/local-only pairing for this run?\n`);
15707
- process.stdout.write(` npx ${packageJson.name} --access=local\n\n`);
15708
- process.stdout.write(` # Need a fresh Cloudflare Tunnel URL?\n`);
15709
- process.stdout.write(` npx ${packageJson.name} --access=remote --force\n\n`);
15710
- process.stdout.write(` # Or bring your own tunnel and pass the URL manually:\n`);
15711
- process.stdout.write(` npx cloudflared tunnel --protocol auto --url http://localhost:${port}\n`);
15712
- process.stdout.write(` ngrok http ${port}\n`);
15713
- process.stdout.write(` npx ${packageJson.name} --access=https://<your-tunnel-url>\n\n`);
15714
- process.stdout.write(` # Tailscale (P2P VPN, no tunnel needed)\n`);
15715
- process.stdout.write(` npx ${packageJson.name} --access=<tailscale-ip>\n\n`);
15716
- process.stdout.write(`Legacy aliases still work: --local, --relay, --host, --fallback-hosts, --remote, --tunnel.\n`);
15717
- }
15798
+ const printHelp = () => (0,_vibelet_help_mjs__WEBPACK_IMPORTED_MODULE_16__/* .printCliHelp */ .n)({ packageJson, port });
15718
15799
 
15719
15800
  function parseNamedArg(name, errorHint) {
15720
- return (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__/* .parseNamedArg */ .nE)(process.argv, name, errorHint, fail);
15801
+ return (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .parseNamedArg */ .nE)(process.argv, name, errorHint, fail);
15721
15802
  }
15722
15803
 
15723
15804
  function parseRelayArg() {
@@ -15767,7 +15848,14 @@ function parseCommandArg(argv) {
15767
15848
  ) {
15768
15849
  continue;
15769
15850
  }
15770
- if (arg === '--local' || arg === '--remote' || arg === '--tunnel' || arg === '--force') {
15851
+ if (
15852
+ arg === '--local' ||
15853
+ arg === '--remote' ||
15854
+ arg === '--tunnel' ||
15855
+ arg === '--force' ||
15856
+ arg === '--tailcat' ||
15857
+ arg === '--no-tailcat'
15858
+ ) {
15771
15859
  continue;
15772
15860
  }
15773
15861
  return arg;
@@ -15792,9 +15880,7 @@ async function main() {
15792
15880
  process.env.VIBE_PORT = String(portArg);
15793
15881
  }
15794
15882
 
15795
- // Select the Claude driver: 'print' (claude -p, default) or 'tui' (interactive
15796
- // TUI). Forwarded to the daemon via env so every backend (detached/launchd/
15797
- // systemd) picks it up.
15883
+ // Forward the selected Claude driver to every daemon backend.
15798
15884
  const claudeDriverArg = parseNamedArg('claude-driver', 'tui');
15799
15885
  if (claudeDriverArg !== null) {
15800
15886
  process.env.VIBE_CLAUDE_DRIVER = claudeDriverArg;
@@ -15812,10 +15898,10 @@ async function main() {
15812
15898
  return;
15813
15899
  }
15814
15900
 
15815
- if ((0,_terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_10__/* .isTerminalAgentCommand */ .$c)(command)) {
15901
+ if ((0,_terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_11__/* .isTerminalAgentCommand */ .$c)(command)) {
15816
15902
  const backend = resolveBackend();
15817
15903
  await ensureDaemonForTerminalControl(backend);
15818
- process.exitCode = await (0,_terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_10__/* .runManagedNativeTerminal */ .WA)({
15904
+ process.exitCode = await (0,_terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_11__/* .runManagedNativeTerminal */ .WA)({
15819
15905
  agent: command,
15820
15906
  args: process.argv.slice(3),
15821
15907
  port,
@@ -15824,26 +15910,40 @@ async function main() {
15824
15910
  return;
15825
15911
  }
15826
15912
 
15827
- const accessTarget = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__/* .parseAccessTargetArg */ .tY)(process.argv, fail);
15828
- if (accessTarget && (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__/* .hasLegacyAccessArgs */ .NT)(process.argv, process.env)) {
15913
+ const accessTarget = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .parseAccessTargetArg */ .tY)(process.argv, fail);
15914
+ if (accessTarget && (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .hasLegacyAccessArgs */ .NT)(process.argv, process.env)) {
15829
15915
  fail(
15830
15916
  'Do not combine --access with legacy access flags.',
15831
15917
  'Use one form, for example `--access=local`, `--access=remote`, `--access=https://...`, or `--access=<host>`.',
15832
15918
  );
15833
15919
  }
15834
15920
  if (!accessTarget) {
15835
- (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__/* .consumeFlag */ .PC)(process.argv, 'remote') ||
15836
- (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__/* .consumeFlag */ .PC)(process.argv, 'tunnel') ||
15837
- (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__/* .readNpmConfigFlag */ .AW)('remote') ||
15838
- (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__/* .readNpmConfigFlag */ .AW)('tunnel');
15921
+ (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .consumeFlag */ .PC)(process.argv, 'remote') ||
15922
+ (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .consumeFlag */ .PC)(process.argv, 'tunnel') ||
15923
+ (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .readNpmConfigFlag */ .AW)('remote') ||
15924
+ (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .readNpmConfigFlag */ .AW)('tunnel');
15839
15925
  }
15840
15926
  const localFlag =
15841
15927
  accessTarget?.kind === 'local' ||
15842
15928
  (!accessTarget &&
15843
- ((0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__/* .consumeFlag */ .PC)(process.argv, 'local') ||
15844
- (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__/* .readNpmConfigFlag */ .AW)('local') ||
15929
+ ((0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .consumeFlag */ .PC)(process.argv, 'local') ||
15930
+ (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .readNpmConfigFlag */ .AW)('local') ||
15845
15931
  isTruthyEnvFlag(process.env.VIBELET_LOCAL_ONLY)));
15846
- const forceFlag = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__/* .consumeFlag */ .PC)(process.argv, 'force') || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_15__/* .readNpmConfigFlag */ .AW)('force');
15932
+ const forceFlag = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .consumeFlag */ .PC)(process.argv, 'force') || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .readNpmConfigFlag */ .AW)('force');
15933
+ const enableTailcatFlag = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .consumeFlag */ .PC)(process.argv, 'tailcat') || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .readNpmConfigFlag */ .AW)('tailcat');
15934
+ const disableTailcatFlag = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .consumeFlag */ .PC)(process.argv, 'no-tailcat') || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_17__/* .readNpmConfigFlag */ .AW)('no-tailcat');
15935
+ if (enableTailcatFlag && disableTailcatFlag) {
15936
+ fail('Do not combine --tailcat with --no-tailcat.');
15937
+ }
15938
+ const explicitTailcatChoice = enableTailcatFlag || disableTailcatFlag;
15939
+ const tailcatEnabled = enableTailcatFlag
15940
+ ? true
15941
+ : disableTailcatFlag
15942
+ ? false
15943
+ : isTruthyEnvFlag(process.env.VIBELET_TAILCAT) || tailcatConfig.load();
15944
+ if (explicitTailcatChoice) tailcatConfig.save(tailcatEnabled);
15945
+ if (tailcatEnabled) process.env.VIBELET_TAILCAT = '1';
15946
+ else delete process.env.VIBELET_TAILCAT;
15847
15947
  const relayArg =
15848
15948
  accessTarget?.kind === 'relay'
15849
15949
  ? accessTarget.relayUrl
@@ -15870,7 +15970,7 @@ async function main() {
15870
15970
  const savedRelayUrl = relayConfig.load();
15871
15971
  // --remote/--tunnel remain accepted for compatibility, but startup commands
15872
15972
  // now default to managed remote access unless another connection target wins.
15873
- const shouldManageTunnel = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_11__/* .shouldManageQuickTunnel */ .gm)({
15973
+ const shouldManageTunnel = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__/* .shouldManageQuickTunnel */ .gm)({
15874
15974
  startCommand,
15875
15975
  localMode: localFlag,
15876
15976
  relayArg,
@@ -15885,7 +15985,7 @@ async function main() {
15885
15985
  }
15886
15986
 
15887
15987
  if (
15888
- (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_11__/* .shouldRetireManagedQuickTunnel */ .Pg)({
15988
+ (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__/* .shouldRetireManagedQuickTunnel */ .Pg)({
15889
15989
  startCommand,
15890
15990
  manageQuickTunnel: shouldManageTunnel,
15891
15991
  })
@@ -15977,7 +16077,9 @@ async function main() {
15977
16077
  }
15978
16078
  const health = await probeHealth(1_500);
15979
16079
  if (health) {
15980
- process.stdout.write(JSON.stringify(health, null, 2) + '\n');
16080
+ process.stdout.write(
16081
+ JSON.stringify(health, (key, value) => (key === 'serverAddress' ? '[redacted]' : value), 2) + '\n',
16082
+ );
15981
16083
  } else {
15982
16084
  process.stdout.write('Daemon is not responding.\n');
15983
16085
  }
@@ -16020,14 +16122,22 @@ async function main() {
16020
16122
  if (command === 'reset') {
16021
16123
  const healthyDaemon = await probeHealth(1_500);
16022
16124
  const hasExplicitConfigOverrides =
16023
- !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_11__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
16125
+ !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
16024
16126
  health: healthyDaemon,
16025
16127
  relayUrl,
16026
16128
  canonicalHost: hostArg || '',
16027
16129
  fallbackHosts: fallbackHostsArg || '',
16028
16130
  localMode: localFlag,
16131
+ tailcatEnabled,
16029
16132
  }) &&
16030
- (localFlag || relayArg !== null || Boolean(relayUrl) || Boolean(hostArg) || Boolean(fallbackHostsArg));
16133
+ (localFlag ||
16134
+ relayArg !== null ||
16135
+ Boolean(relayUrl) ||
16136
+ Boolean(hostArg) ||
16137
+ Boolean(fallbackHostsArg) ||
16138
+ explicitTailcatChoice ||
16139
+ tailcatEnabled ||
16140
+ healthyDaemon?.tailcat?.enabled === true);
16031
16141
  const shouldReplaceDetachedDaemon =
16032
16142
  !healthyDaemon && !backend.handlesProcessLifecycle && backend.isServiceInstalled();
16033
16143
  if (shouldReplaceDetachedDaemon || (healthyDaemon && hasExplicitConfigOverrides)) {
@@ -16048,39 +16158,46 @@ async function main() {
16048
16158
  }
16049
16159
 
16050
16160
  let healthyDaemon = await probeHealth(1_500);
16161
+ let tailcatMismatch = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__/* .isTailcatConfigurationMismatch */ .Zg)({ health: healthyDaemon, tailcatEnabled });
16051
16162
  let hasExplicitConfigOverrides =
16052
- !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_11__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
16163
+ !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
16053
16164
  health: healthyDaemon,
16054
16165
  relayUrl,
16055
16166
  canonicalHost: hostArg || '',
16056
16167
  fallbackHosts: fallbackHostsArg || '',
16057
16168
  localMode: localFlag,
16169
+ tailcatEnabled,
16058
16170
  }) &&
16059
16171
  (localFlag ||
16060
16172
  shouldManageTunnel ||
16061
16173
  relayArg !== null ||
16062
16174
  Boolean(relayUrl) ||
16063
16175
  Boolean(hostArg) ||
16064
- Boolean(fallbackHostsArg));
16176
+ Boolean(fallbackHostsArg) ||
16177
+ explicitTailcatChoice ||
16178
+ tailcatEnabled ||
16179
+ healthyDaemon?.tailcat?.enabled === true);
16065
16180
  const relayOverrideRequested =
16066
16181
  !localFlag && !hostArg && !fallbackHostsArg && (shouldManageTunnel || relayArg !== null || Boolean(savedRelayUrl));
16067
16182
  const canApplyConnectionConfigWithoutRestart = Boolean(
16068
- healthyDaemon && relayOverrideRequested && hasExplicitConfigOverrides,
16183
+ healthyDaemon && relayOverrideRequested && hasExplicitConfigOverrides && !tailcatMismatch,
16069
16184
  );
16070
16185
  if (healthyDaemon && hasExplicitConfigOverrides && canApplyConnectionConfigWithoutRestart) {
16071
16186
  const refreshedHealth = await tryUpdateRunningDaemonRelay(relayUrl);
16072
16187
  if (refreshedHealth) {
16073
16188
  healthyDaemon = refreshedHealth;
16074
- hasExplicitConfigOverrides = !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_11__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
16189
+ hasExplicitConfigOverrides = !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
16075
16190
  health: healthyDaemon,
16076
16191
  relayUrl,
16077
16192
  canonicalHost: '',
16078
16193
  fallbackHosts: '',
16079
16194
  localMode: false,
16195
+ tailcatEnabled,
16080
16196
  });
16197
+ tailcatMismatch = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__/* .isTailcatConfigurationMismatch */ .Zg)({ health: healthyDaemon, tailcatEnabled });
16081
16198
  }
16082
16199
  }
16083
- const existingHealth = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_11__/* .shouldReuseHealthyDaemon */ .ZN)({
16200
+ const existingHealth = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__/* .shouldReuseHealthyDaemon */ .ZN)({
16084
16201
  command,
16085
16202
  daemonHealthy: Boolean(healthyDaemon),
16086
16203
  hasExplicitConfigOverrides,