vibelet 1.2.224 → 1.2.227

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 (75) hide show
  1. package/README.md +14 -37
  2. package/dist/index.cjs +1 -1
  3. package/dist/inventory-scan-worker.cjs +1 -1
  4. package/dist/{tailcat/vibelet-tailcat-darwin-amd64 → remoteDirect/vibelet-remote-direct-darwin-amd64} +0 -0
  5. package/dist/{tailcat/vibelet-tailcat-darwin-arm64 → remoteDirect/vibelet-remote-direct-darwin-arm64} +0 -0
  6. package/dist/{tailcat/vibelet-tailcat-linux-amd64 → remoteDirect/vibelet-remote-direct-linux-amd64} +0 -0
  7. package/dist/{tailcat/vibelet-tailcat-linux-arm64 → remoteDirect/vibelet-remote-direct-linux-arm64} +0 -0
  8. package/dist/{tailcat/vibelet-tailcat-win32-amd64.exe → remoteDirect/vibelet-remote-direct-win32-amd64.exe} +0 -0
  9. package/dist/{tailcat/vibelet-tailcat-win32-arm64.exe → remoteDirect/vibelet-remote-direct-win32-arm64.exe} +0 -0
  10. package/dist/runtime-version.cjs +1 -1
  11. package/dist/vibelet.mjs +282 -289
  12. package/dist/web/assets/App-DfyOZYmt.js +12 -0
  13. package/dist/web/assets/App-t0H-03RW.css +1 -0
  14. package/dist/web/assets/BrowserControlPanel-dQOp1WlN.js +1 -0
  15. package/dist/web/assets/ChipGroup-FQF2g0Fr.js +1 -0
  16. package/dist/web/assets/DiffDrawer-CHjkoGPE.js +2 -0
  17. package/dist/web/assets/FileCodeEditor-yqSvo7VZ.css +1 -0
  18. package/dist/web/assets/FilesControlPanel-A7LFhjRm.js +1 -0
  19. package/dist/web/assets/FilesControlPanel-DsKJrFYk.css +1 -0
  20. package/dist/web/assets/GlobalPendingDialog-BeOMI3dc.js +1 -0
  21. package/dist/web/assets/ImageViewer-BQ9YKQDY.js +1 -0
  22. package/dist/web/assets/ImageViewer-L8SQkFy1.css +1 -0
  23. package/dist/web/assets/LanguageSettingsPanel-Benilh-Y.js +1 -0
  24. package/dist/web/assets/NewSessionDialog-B0YMv6RR.js +1 -0
  25. package/dist/web/assets/NewSessionDialog-CxPwD87T.css +1 -0
  26. package/dist/web/assets/NotificationSettingsPanel-B_k_PfhC.js +1 -0
  27. package/dist/web/assets/TerminalControlPanel-DCmHOa9Y.js +13 -0
  28. package/dist/web/assets/ThemeSettingsPanel-DNDIWk0L.js +1 -0
  29. package/dist/web/assets/arrow-right-Boi1uHFr.js +1 -0
  30. package/dist/web/assets/collectMessageImages-BROUPbis.js +3 -0
  31. package/dist/web/assets/file-editor-FileCodeEditor-CTEWh6kV.js +13 -0
  32. package/dist/web/assets/file-editor-MarkdownLivePreview-Blr8OOKh.js +1 -0
  33. package/dist/web/assets/file-editor-clike-B9uivgTg.js +1 -0
  34. package/dist/web/assets/file-editor-go-CTD25R5P.js +1 -0
  35. package/dist/web/assets/file-editor-index-C1T947NK.js +13 -0
  36. package/dist/web/assets/file-editor-index-Cj9yLeGr.js +1 -0
  37. package/dist/web/assets/file-editor-index-Ckq0jexT.js +6 -0
  38. package/dist/web/assets/file-editor-index-CxU5Gq1E.js +1 -0
  39. package/dist/web/assets/file-editor-index-Dv8iMJMj.js +3 -0
  40. package/dist/web/assets/file-editor-index-DvdSLdIk.js +1 -0
  41. package/dist/web/assets/file-editor-index-DvenUGpC.js +1 -0
  42. package/dist/web/assets/file-editor-index-iFiQtQEr.js +1 -0
  43. package/dist/web/assets/file-editor-rust-Bh1DdySD.js +1 -0
  44. package/dist/web/assets/file-editor-shell-CjFT_Tl9.js +1 -0
  45. package/dist/web/assets/file-editor-sql-B0zzsL_y.js +1 -0
  46. package/dist/web/assets/file-editor-swift-BzpIVaGY.js +1 -0
  47. package/dist/web/assets/file-editor-toml-Bm5Em-hy.js +1 -0
  48. package/dist/web/assets/file-editor-yaml-DsCXHVTH.js +1 -0
  49. package/dist/web/assets/folder-plus-tHXFtdSw.js +1 -0
  50. package/dist/web/assets/ghostty-vt-DOMeXDrv.wasm +0 -0
  51. package/dist/web/assets/highlighted-body-TPN3WLV5-D5c7I9mI.js +1 -0
  52. package/dist/web/assets/index-CoCv7_xG.css +1 -0
  53. package/dist/web/assets/index-P4_gSQhN.js +71 -0
  54. package/dist/web/assets/mermaid-O7DHMXV3-BIyESbw5.js +120 -0
  55. package/dist/web/assets/mermaid-O7DHMXV3-tkqeC_Xz.css +1 -0
  56. package/dist/web/ghostty-license.txt +21 -0
  57. package/dist/web/index.html +2 -2
  58. package/package.json +3 -3
  59. package/dist/web/assets/App-CAJ3pB85.js +0 -12
  60. package/dist/web/assets/ArchiveSyncPanel-_lLATKjA.js +0 -1
  61. package/dist/web/assets/ConnectionSettingsPanel-4MhvD7ra.js +0 -1
  62. package/dist/web/assets/DaemonSettingsPanel-zHBCPi0h.js +0 -1
  63. package/dist/web/assets/DiffDrawer-BGx5Fl6h.js +0 -2
  64. package/dist/web/assets/FilesControlPanel-D7SPEihe.js +0 -2
  65. package/dist/web/assets/LanguageSettingsPanel-Bofh0WHQ.js +0 -1
  66. package/dist/web/assets/NotificationSettingsPanel-BafuO9ww.js +0 -1
  67. package/dist/web/assets/SavedTargetsPanel-lutvzUOp.js +0 -1
  68. package/dist/web/assets/ThemeSettingsPanel-ARFGBpot.js +0 -1
  69. package/dist/web/assets/file-text-CpofUkq8.js +0 -1
  70. package/dist/web/assets/highlighted-body-TPN3WLV5-CEWZdsEu.js +0 -1
  71. package/dist/web/assets/index-CFMLtw93.css +0 -1
  72. package/dist/web/assets/index-D3KotGfi.js +0 -17
  73. package/dist/web/assets/mermaid-O7DHMXV3-BPtfCfol.css +0 -1
  74. package/dist/web/assets/mermaid-O7DHMXV3-DuCy9NVb.js +0 -124
  75. /package/dist/web/assets/{splash-logo-SQcOtj-8.png → logo-SQcOtj-8.png} +0 -0
package/dist/vibelet.mjs CHANGED
@@ -14307,63 +14307,34 @@ async function tryUpdateRunningDaemonRelay({
14307
14307
  /* harmony export */ });
14308
14308
  function printCliHelp({ packageJson, port }) {
14309
14309
  process.stdout.write(`Vibelet ${packageJson.version}\n\n`);
14310
- process.stdout.write(`Package names:\n`);
14311
- process.stdout.write(` @vibelet/cli\n`);
14312
- process.stdout.write(` vibelet\n\n`);
14313
14310
  process.stdout.write(`Usage:\n`);
14314
- process.stdout.write(
14315
- ` npx ${packageJson.name} Install/start the daemon, enable Tailcat and Cloudflare access by default, and print a pairing QR code\n`,
14316
- );
14317
- process.stdout.write(` npx ${packageJson.name} start Same as above\n`);
14318
- process.stdout.write(
14319
- ` npx ${packageJson.name} --access=local Use LAN/local pairing only; skip Tailcat, Cloudflare and Tailscale\n`,
14320
- );
14321
- process.stdout.write(` npx ${packageJson.name} --cloudflare --force Force a new Cloudflare Tunnel URL\n`);
14322
- process.stdout.write(` npx ${packageJson.name} --access=https://<url> Use a custom tunnel URL for remote access\n`);
14323
- process.stdout.write(` npx ${packageJson.name} --access=<host> Set the primary LAN/Tailscale host/IP address\n`);
14324
- process.stdout.write(
14325
- ` npx ${packageJson.name} --tailcat Enable Tailcat access without automatic Cloudflare Tunnel\n`,
14326
- );
14327
- process.stdout.write(` npx ${packageJson.name} --no-tailcat Disable Tailcat access; keep Cloudflare available\n`);
14328
- process.stdout.write(` npx ${packageJson.name} --port <port> Start or query the daemon on a custom port\n`);
14329
- process.stdout.write(
14330
- ` npx ${packageJson.name} --claude-driver tui Drive the interactive Claude TUI (subscription) instead of \`claude -p\`\n`,
14331
- );
14332
- process.stdout.write(` npx ${packageJson.name} --access=<host>,<fallbacks> Set fallback LAN/Tailscale hosts\n`);
14333
- process.stdout.write(` npx ${packageJson.name} stop Stop the daemon\n`);
14334
- process.stdout.write(` npx ${packageJson.name} restart Restart the daemon\n`);
14335
- process.stdout.write(` npx ${packageJson.name} status Show service and daemon status\n`);
14336
- process.stdout.write(` npx ${packageJson.name} logs Print recent daemon logs\n`);
14337
- process.stdout.write(` npx ${packageJson.name} reset Reset pairings and print a fresh QR code\n`);
14338
- process.stdout.write(` npx ${packageJson.name} claude [...args] Start Claude Code with Vibelet App takeover\n`);
14339
- process.stdout.write(` npx ${packageJson.name} codex [...args] Start Codex with Vibelet App takeover\n`);
14340
- process.stdout.write(` npx ${packageJson.name} --help Show this help text\n`);
14341
- process.stdout.write(` npx ${packageJson.name} --version Show the installed CLI version\n`);
14342
- process.stdout.write(`\n`);
14343
- process.stdout.write(`You can also invoke the published alias with:\n`);
14344
- process.stdout.write(` npx ${packageJson.name === 'vibelet' ? '@vibelet/cli' : 'vibelet'}\n`);
14345
- process.stdout.write(` vibelet\n\n`);
14346
- process.stdout.write(`Remote access:\n`);
14347
- process.stdout.write(` # Tailcat and Cloudflare are on by default for start/reset/restart\n`);
14348
- process.stdout.write(` npx ${packageJson.name}\n\n`);
14349
- process.stdout.write(` # Want LAN/local-only pairing for this run?\n`);
14350
- process.stdout.write(` npx ${packageJson.name} --access=local\n\n`);
14351
- process.stdout.write(` # Use Cloudflare instead of Tailcat (add --force for a fresh URL):\n`);
14352
- process.stdout.write(` npx ${packageJson.name} --cloudflare\n\n`);
14353
- process.stdout.write(` # Or bring your own tunnel and pass the URL manually:\n`);
14354
- process.stdout.write(` npx cloudflared tunnel --protocol auto --url http://localhost:${port}\n`);
14355
- process.stdout.write(` ngrok http ${port}\n`);
14356
- process.stdout.write(` npx ${packageJson.name} --access=https://<your-tunnel-url>\n\n`);
14357
- process.stdout.write(` # Tailscale (P2P VPN, no tunnel needed)\n`);
14358
- process.stdout.write(` npx ${packageJson.name} --access=<tailscale-ip>\n\n`);
14359
- process.stdout.write(`\nTailcat direct access:\n`);
14360
- process.stdout.write(` npx ${packageJson.name} --tailcat\n`);
14361
- process.stdout.write(
14362
- ` # Add --cloudflare to --tailcat to enable both transports.\n # Tailcat does not change system VPN, DNS, or routes.\n\n`,
14363
- );
14364
- process.stdout.write(
14365
- `Legacy aliases still work: --access=remote, --local, --relay, --host, --fallback-hosts, --remote, --tunnel.\n`,
14366
- );
14311
+ const commands = [
14312
+ ['', 'Install/start the daemon, enable Remote Direct, and print a pairing QR code'],
14313
+ ['start', 'Start the daemon and print a pairing QR code'],
14314
+ ['--cloudflare', 'Add a Cloudflare Tunnel as an optional remote path'],
14315
+ ['--cloudflare --force', 'Add Cloudflare with a fresh tunnel URL'],
14316
+ ['--access=local', 'Use LAN/local pairing only for this run'],
14317
+ ['--access=https://<url>', 'Use your own remote relay URL'],
14318
+ ['--access=<host>,<fallbacks>', 'Set LAN or existing network addresses'],
14319
+ ['--port <port>', 'Set the daemon listening port'],
14320
+ ['--claude-code-sdk', 'Use the Claude Code SDK execution driver'],
14321
+ ['stop', 'Stop the daemon'],
14322
+ ['restart', 'Restart the daemon'],
14323
+ ['status', 'Show service and daemon diagnostics'],
14324
+ ['logs', 'Print recent daemon logs'],
14325
+ ['reset', 'Clear pairings and saved device connections; print a fresh QR code'],
14326
+ ['claude [...args]', 'Start Claude Code with Vibelet App takeover'],
14327
+ ['codex [...args]', 'Start Codex with Vibelet App takeover'],
14328
+ ['--help', 'Show this help text'],
14329
+ ['--version', 'Show the installed CLI version'],
14330
+ ];
14331
+ for (const [args, description] of commands) {
14332
+ process.stdout.write(` npx ${packageJson.name} ${args} ${description}\n`);
14333
+ }
14334
+ process.stdout.write(`\nRemote Direct is enabled by default. Cloudflare starts only when requested.\n`);
14335
+ process.stdout.write(`Scan a new QR code with the current Vibelet app after changing access mode.\n`);
14336
+ process.stdout.write(`The daemon listens on port ${port}.\n`);
14337
+ process.stdout.write(`\nPackage names: @vibelet/cli, vibelet\n`);
14367
14338
  }
14368
14339
 
14369
14340
 
@@ -14572,17 +14543,17 @@ function normalizePairingConnections(pairingPayload) {
14572
14543
  typeof target.stability === 'string',
14573
14544
  )
14574
14545
  .map((target) => {
14575
- const tailcat =
14576
- target.tailcat &&
14577
- typeof target.tailcat.serverAddress === 'string' &&
14578
- target.tailcat.serverAddress.startsWith('tc') &&
14579
- target.tailcat.serverAddress.length <= 4096 &&
14580
- Number.isInteger(target.tailcat.remotePort) &&
14581
- target.tailcat.remotePort > 0 &&
14582
- target.tailcat.remotePort <= 65535
14546
+ const remoteDirect =
14547
+ target.remoteDirect &&
14548
+ typeof target.remoteDirect.serverAddress === 'string' &&
14549
+ target.remoteDirect.serverAddress.startsWith('tc') &&
14550
+ target.remoteDirect.serverAddress.length <= 4096 &&
14551
+ Number.isInteger(target.remoteDirect.remotePort) &&
14552
+ target.remoteDirect.remotePort > 0 &&
14553
+ target.remoteDirect.remotePort <= 65535
14583
14554
  ? {
14584
- serverAddress: target.tailcat.serverAddress,
14585
- remotePort: target.tailcat.remotePort,
14555
+ serverAddress: target.remoteDirect.serverAddress,
14556
+ remotePort: target.remoteDirect.remotePort,
14586
14557
  }
14587
14558
  : null;
14588
14559
  return {
@@ -14592,7 +14563,7 @@ function normalizePairingConnections(pairingPayload) {
14592
14563
  ...(target.secure === true ? { secure: true } : {}),
14593
14564
  source: target.source,
14594
14565
  stability: target.stability,
14595
- ...(tailcat ? { tailcat } : {}),
14566
+ ...(remoteDirect ? { remoteDirect } : {}),
14596
14567
  };
14597
14568
  })
14598
14569
  .filter((target) => target.host && target.port > 0)
@@ -14602,8 +14573,8 @@ function normalizePairingConnections(pairingPayload) {
14602
14573
  const seen = new Set();
14603
14574
  return targets.filter((target) => {
14604
14575
  const key =
14605
- target.source === 'tailcat' && target.tailcat
14606
- ? `tailcat:${target.tailcat.remotePort}`
14576
+ target.source === 'remoteDirect' && target.remoteDirect
14577
+ ? `remoteDirect:${target.remoteDirect.remotePort}`
14607
14578
  : `${target.host}:${target.port}:${target.secure === true ? 'secure' : 'plain'}`;
14608
14579
  if (seen.has(key)) {
14609
14580
  return false;
@@ -14706,8 +14677,8 @@ function createCompactPairingPayload(pairingPayload) {
14706
14677
  if (connections.length > 0) {
14707
14678
  compactPayload.o = connections.map((target) => {
14708
14679
  const tuple = [target.kind, target.host, target.port, target.source, target.stability, target.secure === true];
14709
- if (target.tailcat) {
14710
- tuple.push(target.tailcat.serverAddress, target.tailcat.remotePort);
14680
+ if (target.remoteDirect) {
14681
+ tuple.push(target.remoteDirect.serverAddress, target.remoteDirect.remotePort);
14711
14682
  }
14712
14683
  return tuple;
14713
14684
  });
@@ -14717,10 +14688,9 @@ function createCompactPairingPayload(pairingPayload) {
14717
14688
 
14718
14689
  /**
14719
14690
  * Keep camera-scanned QR codes small enough for reliable terminal capture.
14720
- * The canonical target is sufficient for the initial /pair/create request;
14721
- * that response returns the daemon's complete connection list for subsequent
14722
- * reconnects. Preserve the primary tuple only when h/p cannot represent the
14723
- * transport capability on its own.
14691
+ * A RemoteDirect capability must survive QR compaction even when LAN is primary:
14692
+ * off-network phones need it before they can fetch the daemon's full routes.
14693
+ * Otherwise preserve the primary tuple when h/p cannot represent its transport.
14724
14694
  */
14725
14695
  function createScannablePairingPayload(pairingPayload) {
14726
14696
  const compactPayload = {
@@ -14733,13 +14703,16 @@ function createScannablePairingPayload(pairingPayload) {
14733
14703
  };
14734
14704
  const connections = normalizePairingConnections(pairingPayload);
14735
14705
  const [primary] = connections;
14706
+ if (connections.some((target) => target.remoteDirect)) {
14707
+ return { ...compactPayload, o: createCompactPairingPayload(pairingPayload).o };
14708
+ }
14736
14709
  // Keep the common HTTPS relay QR compact while preserving enough transport
14737
14710
  // semantics for clients to avoid treating host:443 as a legacy direct host.
14738
14711
  if (primary?.kind === 'relay' && primary.secure === true && primary.port === 443) {
14739
14712
  compactPayload.r = 1;
14740
14713
  }
14741
14714
  const needsExplicitTransport =
14742
- primary && (Boolean(primary.tailcat) || (primary.secure === true && primary.port !== 443));
14715
+ primary && (Boolean(primary.remoteDirect) || (primary.secure === true && primary.port !== 443));
14743
14716
  const compactFallback = !needsExplicitTransport
14744
14717
  ? connections
14745
14718
  .slice(1)
@@ -14748,7 +14721,7 @@ function createScannablePairingPayload(pairingPayload) {
14748
14721
  primary?.secure !== true &&
14749
14722
  target.kind === 'direct' &&
14750
14723
  target.secure !== true &&
14751
- !target.tailcat &&
14724
+ !target.remoteDirect &&
14752
14725
  target.port === primary.port,
14753
14726
  )
14754
14727
  : undefined;
@@ -14764,8 +14737,8 @@ function createScannablePairingPayload(pairingPayload) {
14764
14737
  primary.stability,
14765
14738
  primary.secure === true,
14766
14739
  ];
14767
- if (primary.tailcat) {
14768
- tuple.push(primary.tailcat.serverAddress, primary.tailcat.remotePort);
14740
+ if (primary.remoteDirect) {
14741
+ tuple.push(primary.remoteDirect.serverAddress, primary.remoteDirect.remotePort);
14769
14742
  }
14770
14743
  compactPayload.o = [tuple];
14771
14744
  }
@@ -14782,8 +14755,8 @@ function formatConnectionSourceLabel(source) {
14782
14755
  return 'Manual Host';
14783
14756
  case 'tailscale':
14784
14757
  return 'Tailscale';
14785
- case 'tailcat':
14786
- return 'Tailcat Direct';
14758
+ case 'remoteDirect':
14759
+ return 'Remote Direct';
14787
14760
  case 'local_network':
14788
14761
  return 'LAN';
14789
14762
  case 'fallback':
@@ -14794,6 +14767,7 @@ function formatConnectionSourceLabel(source) {
14794
14767
 
14795
14768
  function formatConnectionSummary(target) {
14796
14769
  const stabilityLabel = target.stability === 'ephemeral' ? 'ephemeral' : 'stable';
14770
+ if (target.source === 'remoteDirect') return `Remote Direct [${stabilityLabel}]`;
14797
14771
  return `${target.host}:${target.port} [${formatConnectionSourceLabel(target.source)}, ${stabilityLabel}]`;
14798
14772
  }
14799
14773
 
@@ -15810,6 +15784,76 @@ async function writePairingOutput(pairingPayload, { directory, pairingCodePath,
15810
15784
  }
15811
15785
 
15812
15786
 
15787
+ /***/ }),
15788
+
15789
+ /***/ 6736:
15790
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
15791
+
15792
+ /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
15793
+ /* harmony export */ FN: () => (/* binding */ configureRemoteDirectMode),
15794
+ /* harmony export */ OW: () => (/* binding */ shouldRequestCloudflare),
15795
+ /* harmony export */ Tl: () => (/* binding */ createRemoteDirectConfigStore)
15796
+ /* harmony export */ });
15797
+ /* unused harmony export resolveRemoteDirectChoice */
15798
+ /* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(3024);
15799
+ /* harmony import */ var _vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(6927);
15800
+
15801
+
15802
+
15803
+ function createRemoteDirectConfigStore(configPath, dataDirectory) {
15804
+ return {
15805
+ load() {
15806
+ try {
15807
+ const enabled = JSON.parse((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(configPath, 'utf8')).enabled;
15808
+ return typeof enabled === 'boolean' ? enabled : true;
15809
+ } catch {
15810
+ return true;
15811
+ }
15812
+ },
15813
+ save(enabled) {
15814
+ (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync)(dataDirectory, { recursive: true });
15815
+ (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync)(configPath, `${JSON.stringify({ enabled }, null, 2)}\n`, { encoding: 'utf8', mode: 0o600 });
15816
+ },
15817
+ };
15818
+ }
15819
+
15820
+ function resolveRemoteDirectChoice({ enable, disable, environmentEnabled, savedEnabled }) {
15821
+ if (enable) return true;
15822
+ if (disable) return false;
15823
+ return environmentEnabled || savedEnabled;
15824
+ }
15825
+
15826
+ function configureRemoteDirectMode({
15827
+ readFlag,
15828
+ fail,
15829
+ config,
15830
+ localMode,
15831
+ cloudflareRequested,
15832
+ environment = process.env,
15833
+ }) {
15834
+ const enable = readFlag('remote-direct');
15835
+ const disable = readFlag('no-remote-direct');
15836
+ if (enable && disable) fail('Do not combine --remote-direct with --no-remote-direct.');
15837
+ const requested = resolveRemoteDirectChoice({
15838
+ enable,
15839
+ disable,
15840
+ cloudflareRequested,
15841
+ environmentEnabled: (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isTruthyEnvFlag */ .ap)(environment.VIBELET_REMOTE_DIRECT),
15842
+ savedEnabled: config.load(),
15843
+ });
15844
+ if (enable || disable) config.save(requested);
15845
+ // Local access overrides RemoteDirect for this run without changing its saved choice.
15846
+ const enabled = !localMode && requested;
15847
+ if (enabled) environment.VIBELET_REMOTE_DIRECT = '1';
15848
+ else delete environment.VIBELET_REMOTE_DIRECT;
15849
+ return { enabled, explicitChoice: enable || disable };
15850
+ }
15851
+
15852
+ function shouldRequestCloudflare({ accessTarget }) {
15853
+ return accessTarget?.kind === 'remote';
15854
+ }
15855
+
15856
+
15813
15857
  /***/ }),
15814
15858
 
15815
15859
  /***/ 4:
@@ -15819,7 +15863,7 @@ async function writePairingOutput(pairingPayload, { directory, pairingCodePath,
15819
15863
  /* harmony export */ Ne: () => (/* binding */ shouldRefuseRuntimeDowngrade),
15820
15864
  /* harmony export */ Pg: () => (/* binding */ shouldRetireManagedQuickTunnel),
15821
15865
  /* harmony export */ ZN: () => (/* binding */ shouldReuseHealthyDaemon),
15822
- /* harmony export */ Zg: () => (/* binding */ isTailcatConfigurationMismatch),
15866
+ /* harmony export */ _4: () => (/* binding */ isRemoteDirectConfigurationMismatch),
15823
15867
  /* harmony export */ gm: () => (/* binding */ shouldManageQuickTunnel),
15824
15868
  /* harmony export */ iX: () => (/* binding */ doesHealthSupportTerminalControl),
15825
15869
  /* harmony export */ nW: () => (/* binding */ doesHealthMatchRequestedConnectionConfig)
@@ -15865,10 +15909,10 @@ function shouldReuseHealthyDaemon({
15865
15909
  return !hasExplicitConfigOverrides || canApplyConnectionConfigWithoutRestart;
15866
15910
  }
15867
15911
 
15868
- function isTailcatConfigurationMismatch({ health, tailcatEnabled }) {
15912
+ function isRemoteDirectConfigurationMismatch({ health, remoteDirectEnabled }) {
15869
15913
  if (!health) return false;
15870
- const reportedEnabled = health?.tailcat?.enabled;
15871
- return typeof reportedEnabled === 'boolean' ? reportedEnabled !== tailcatEnabled : tailcatEnabled;
15914
+ const reportedEnabled = health?.remoteDirect?.enabled;
15915
+ return typeof reportedEnabled === 'boolean' ? reportedEnabled !== remoteDirectEnabled : remoteDirectEnabled;
15872
15916
  }
15873
15917
 
15874
15918
  function doesHealthSupportTerminalControl(health) {
@@ -15923,7 +15967,7 @@ function shouldManageQuickTunnel({
15923
15967
  savedRelayUrl = '',
15924
15968
  force = false,
15925
15969
  preserveAccess = false,
15926
- tailcatEnabled = false,
15970
+ remoteDirectEnabled = false,
15927
15971
  remoteRequested = false,
15928
15972
  }) {
15929
15973
  if (preserveAccess || !remoteRequested) return false;
@@ -15973,13 +16017,13 @@ function doesHealthMatchRequestedConnectionConfig({
15973
16017
  canonicalHost = '',
15974
16018
  fallbackHosts = '',
15975
16019
  localMode = false,
15976
- tailcatEnabled,
16020
+ remoteDirectEnabled,
15977
16021
  }) {
15978
16022
  if (!health) return false;
15979
16023
 
15980
- if (typeof tailcatEnabled === 'boolean') {
15981
- const runningTailcatEnabled = health.tailcat?.enabled === true;
15982
- if (runningTailcatEnabled !== tailcatEnabled) return false;
16024
+ if (typeof remoteDirectEnabled === 'boolean') {
16025
+ const runningRemoteDirectEnabled = health.remoteDirect?.enabled === true;
16026
+ if (runningRemoteDirectEnabled !== remoteDirectEnabled) return false;
15983
16027
  }
15984
16028
 
15985
16029
  const currentRelayUrl = typeof health.relayUrl === 'string' ? health.relayUrl : '';
@@ -16044,71 +16088,81 @@ async function stopDaemonWithHooks({
16044
16088
 
16045
16089
  /***/ }),
16046
16090
 
16047
- /***/ 5798:
16091
+ /***/ 7775:
16048
16092
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
16049
16093
 
16050
16094
  /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
16051
- /* harmony export */ OW: () => (/* binding */ shouldRequestCloudflare),
16052
- /* harmony export */ SS: () => (/* binding */ configureTailcatMode),
16053
- /* harmony export */ SY: () => (/* binding */ createTailcatConfigStore)
16095
+ /* harmony export */ J: () => (/* binding */ createUpdateChecker)
16054
16096
  /* harmony export */ });
16055
- /* unused harmony export resolveTailcatChoice */
16056
- /* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(3024);
16057
- /* harmony import */ var _vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(6927);
16097
+ /* harmony import */ var node_child_process__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(1421);
16098
+ /* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3024);
16099
+ /* harmony import */ var _vibelet_value_validation_mjs__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(50);
16058
16100
 
16059
16101
 
16060
16102
 
16061
- function createTailcatConfigStore(configPath, dataDirectory) {
16062
- return {
16063
- load() {
16064
- try {
16065
- const enabled = JSON.parse((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(configPath, 'utf8')).enabled;
16066
- return typeof enabled === 'boolean' ? enabled : true;
16067
- } catch {
16068
- return true;
16069
- }
16070
- },
16071
- save(enabled) {
16072
- (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync)(dataDirectory, { recursive: true });
16073
- (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync)(configPath, `${JSON.stringify({ enabled }, null, 2)}\n`, { encoding: 'utf8', mode: 0o600 });
16074
- },
16075
- };
16076
- }
16077
16103
 
16078
- function resolveTailcatChoice({ enable, disable, cloudflareRequested, environmentEnabled, savedEnabled }) {
16079
- if (enable) return true;
16080
- if (disable || cloudflareRequested) return false;
16081
- return environmentEnabled || savedEnabled;
16082
- }
16104
+ function createUpdateChecker({ updateCheckPath, packageJson }) {
16105
+ const UPDATE_CHECK_INTERVAL_MS = 4 * 60 * 60 * 1000;
16106
+ function readUpdateCheck() {
16107
+ try {
16108
+ return JSON.parse((0,node_fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync)(updateCheckPath, 'utf8'));
16109
+ } catch {
16110
+ return null;
16111
+ }
16112
+ }
16083
16113
 
16084
- function configureTailcatMode({
16085
- readFlag,
16086
- fail,
16087
- config,
16088
- localMode,
16089
- cloudflareRequested,
16090
- environment = process.env,
16091
- }) {
16092
- const enable = readFlag('tailcat');
16093
- const disable = readFlag('no-tailcat');
16094
- if (enable && disable) fail('Do not combine --tailcat with --no-tailcat.');
16095
- const requested = resolveTailcatChoice({
16096
- enable,
16097
- disable,
16098
- cloudflareRequested,
16099
- environmentEnabled: (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isTruthyEnvFlag */ .ap)(environment.VIBELET_TAILCAT),
16100
- savedEnabled: config.load(),
16101
- });
16102
- if (enable || disable) config.save(requested);
16103
- // Local access overrides Tailcat for this run without changing its saved choice.
16104
- const enabled = !localMode && requested;
16105
- if (enabled) environment.VIBELET_TAILCAT = '1';
16106
- else delete environment.VIBELET_TAILCAT;
16107
- return { enabled, explicitChoice: enable || disable };
16108
- }
16114
+ function checkForUpdateFromCache() {
16115
+ const cached = readUpdateCheck();
16116
+ if (!cached?.latestVersion) return;
16117
+ if ((0,_vibelet_value_validation_mjs__WEBPACK_IMPORTED_MODULE_2__/* .compareVersions */ .Z)(packageJson.version, cached.latestVersion) < 0) {
16118
+ return (
16119
+ `\x1b[33m╭───────────────────────────────────────────╮\x1b[0m\n` +
16120
+ `\x1b[33m│\x1b[0m Update available: \x1b[90m${packageJson.version}\x1b[0m → \x1b[32m${cached.latestVersion}\x1b[0m${' '.repeat(Math.max(0, 14 - packageJson.version.length - cached.latestVersion.length))}\x1b[33m│\x1b[0m\n` +
16121
+ `\x1b[33m│\x1b[0m Run \x1b[36mnpx -y vibelet@latest\x1b[0m to upgrade \x1b[33m│\x1b[0m\n` +
16122
+ `\x1b[33m╰───────────────────────────────────────────╯\x1b[0m`
16123
+ );
16124
+ }
16125
+ }
16126
+
16127
+ function fetchLatestVersionInBackground() {
16128
+ const cached = readUpdateCheck();
16129
+ const now = Date.now();
16130
+ if (cached?.checkedAt && now - cached.checkedAt < UPDATE_CHECK_INTERVAL_MS) {
16131
+ return; // Checked recently; skip.
16132
+ }
16109
16133
 
16110
- function shouldRequestCloudflare({ accessTarget, tailcatEnabled, explicitTailcatChoice }) {
16111
- return accessTarget?.kind === 'remote' || (!accessTarget && !(explicitTailcatChoice && tailcatEnabled));
16134
+ // Fire-and-forget: spawn a detached process to query the registry so we
16135
+ // never block the CLI. Results are read on the *next* invocation.
16136
+ const script = `
16137
+ const https = await import('node:https');
16138
+ const fs = await import('node:fs');
16139
+ const url = 'https://registry.npmjs.org/@vibelet/cli/latest';
16140
+ https.get(url, { headers: { 'Accept': 'application/json' }, timeout: 8000 }, (res) => {
16141
+ let data = '';
16142
+ res.on('data', (c) => data += c);
16143
+ res.on('end', () => {
16144
+ try {
16145
+ const version = JSON.parse(data).version;
16146
+ if (version) {
16147
+ fs.writeFileSync(${JSON.stringify(updateCheckPath)}, JSON.stringify({
16148
+ latestVersion: version,
16149
+ checkedAt: Date.now(),
16150
+ }, null, 2) + '\\n');
16151
+ }
16152
+ } catch {}
16153
+ });
16154
+ }).on('error', () => {});
16155
+ `;
16156
+
16157
+ const child = (0,node_child_process__WEBPACK_IMPORTED_MODULE_0__.spawn)(process.execPath, ['--input-type=module', '-e', script], {
16158
+ detached: true,
16159
+ stdio: 'ignore',
16160
+ windowsHide: true,
16161
+ });
16162
+ child.unref();
16163
+ }
16164
+
16165
+ return { checkForUpdateFromCache, fetchLatestVersionInBackground };
16112
16166
  }
16113
16167
 
16114
16168
 
@@ -16154,24 +16208,26 @@ function compareVersions(a, b) {
16154
16208
 
16155
16209
  __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
16156
16210
  /* harmony import */ var node_child_process__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(1421);
16157
- /* harmony import */ var _vibelet_value_validation_mjs__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(50);
16211
+ /* harmony import */ var _vibelet_value_validation_mjs__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(50);
16158
16212
  /* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3024);
16159
16213
  /* harmony import */ var node_module__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(8995);
16160
16214
  /* harmony import */ var node_os__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(8161);
16161
16215
  /* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(6760);
16162
16216
  /* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(3136);
16163
- /* harmony import */ var _vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(6927);
16217
+ /* harmony import */ var _vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__ = __nccwpck_require__(6927);
16164
16218
  /* harmony import */ var _cloudflared_tunnel_manager_mjs__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(1484);
16165
16219
  /* harmony import */ var _vibelet_cloudflare_runtime_mjs__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(3869);
16166
- /* harmony import */ var _vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(1010);
16220
+ /* harmony import */ var _vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(1010);
16167
16221
  /* harmony import */ var _linux_systemd_mjs__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(4217);
16168
- /* harmony import */ var _vibelet_stop_logic_mjs__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(6274);
16169
- /* harmony import */ var _vibelet_help_mjs__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(4162);
16170
- /* harmony import */ var _vibelet_tailcat_config_mjs__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(5798);
16171
- /* harmony import */ var _vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__ = __nccwpck_require__(4);
16172
- /* harmony import */ var _terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(5028);
16173
- /* harmony import */ var _vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(7721);
16174
- /* harmony import */ var _vibelet_pairing_output_mjs__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(9485);
16222
+ /* harmony import */ var _vibelet_stop_logic_mjs__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(6274);
16223
+ /* harmony import */ var _vibelet_update_check_mjs__WEBPACK_IMPORTED_MODULE_9__ = __nccwpck_require__(7775);
16224
+ /* harmony import */ var _vibelet_help_mjs__WEBPACK_IMPORTED_MODULE_18__ = __nccwpck_require__(4162);
16225
+ /* harmony import */ var _vibelet_remote_direct_config_mjs__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(6736);
16226
+ /* harmony import */ var _vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__ = __nccwpck_require__(4);
16227
+ /* harmony import */ var _terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(5028);
16228
+ /* harmony import */ var _vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_17__ = __nccwpck_require__(7721);
16229
+ /* harmony import */ var _vibelet_pairing_output_mjs__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(9485);
16230
+
16175
16231
 
16176
16232
 
16177
16233
 
@@ -16207,21 +16263,20 @@ const runtimeDir = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, '
16207
16263
  const runtimeCurrentDir = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(runtimeDir, 'current');
16208
16264
  const runtimeMetadataPath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(runtimeCurrentDir, 'runtime.json');
16209
16265
  const runtimeDaemonEntryPath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(runtimeCurrentDir, 'dist', 'index.cjs');
16210
- const runtimeTerminalControlTokenPath = _terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_10__/* .terminalControlTokenPath */ .gJ;
16266
+ const runtimeTerminalControlTokenPath = _terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_11__/* .terminalControlTokenPath */ .gJ;
16211
16267
  const stdoutLogPath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(logDir, 'daemon.stdout.log');
16212
16268
  const stderrLogPath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(logDir, 'daemon.stderr.log');
16213
16269
  const pidFilePath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'daemon.pid');
16214
16270
  const relayConfig = (0,_vibelet_cloudflare_runtime_mjs__WEBPACK_IMPORTED_MODULE_7__/* .createRelayConfigStore */ .T7)((0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'relay.json'));
16215
- const tailcatConfig = (0,_vibelet_tailcat_config_mjs__WEBPACK_IMPORTED_MODULE_9__/* .createTailcatConfigStore */ .SY)((0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'tailcat.json'), vibeletDir);
16271
+ const remoteDirectConfig = (0,_vibelet_remote_direct_config_mjs__WEBPACK_IMPORTED_MODULE_10__/* .createRemoteDirectConfigStore */ .Tl)((0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'remote-direct.json'), vibeletDir);
16216
16272
  const tunnelStatePath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'tunnel.json');
16217
16273
  const cloudflaredUpdateStatePath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'cloudflared-update.json');
16218
16274
  const updateCheckPath = (0,node_path__WEBPACK_IMPORTED_MODULE_4__.join)(vibeletDir, 'update-check.json');
16219
16275
  const OFFICIAL_SITE_URL = 'https://vibelet.icu';
16220
- const UPDATE_CHECK_INTERVAL_MS = 4 * 60 * 60 * 1000; // 4 hours
16221
16276
 
16222
16277
  let officialSitePrinted = false;
16223
16278
  let updateMessage = '';
16224
- let port = (0,_vibelet_value_validation_mjs__WEBPACK_IMPORTED_MODULE_12__/* .normalizePortValue */ .Q)(process.env.VIBE_PORT) ?? 9876;
16279
+ let port = (0,_vibelet_value_validation_mjs__WEBPACK_IMPORTED_MODULE_13__/* .normalizePortValue */ .Q)(process.env.VIBE_PORT) ?? 9876;
16225
16280
 
16226
16281
  function printOfficialSite() {
16227
16282
  if (officialSitePrinted) return;
@@ -16236,72 +16291,10 @@ function printOfficialSite() {
16236
16291
 
16237
16292
  // ─── Update check ──────────────────────────────────────────────────────────────
16238
16293
 
16239
- function readUpdateCheck() {
16240
- try {
16241
- return JSON.parse((0,node_fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync)(updateCheckPath, 'utf8'));
16242
- } catch {
16243
- return null;
16244
- }
16245
- }
16246
-
16247
- function writeUpdateCheck(data) {
16248
- try {
16249
- mkdirSync(vibeletDir, { recursive: true });
16250
- writeFileSync(updateCheckPath, JSON.stringify(data, null, 2) + '\n', 'utf8');
16251
- } catch {
16252
- // Best-effort; failing to persist is fine.
16253
- }
16254
- }
16255
-
16256
- function checkForUpdateFromCache() {
16257
- const cached = readUpdateCheck();
16258
- if (!cached?.latestVersion) return;
16259
- if ((0,_vibelet_value_validation_mjs__WEBPACK_IMPORTED_MODULE_12__/* .compareVersions */ .Z)(packageJson.version, cached.latestVersion) < 0) {
16260
- updateMessage =
16261
- `\x1b[33m╭───────────────────────────────────────────╮\x1b[0m\n` +
16262
- `\x1b[33m│\x1b[0m Update available: \x1b[90m${packageJson.version}\x1b[0m → \x1b[32m${cached.latestVersion}\x1b[0m${' '.repeat(Math.max(0, 14 - packageJson.version.length - cached.latestVersion.length))}\x1b[33m│\x1b[0m\n` +
16263
- `\x1b[33m│\x1b[0m Run \x1b[36mnpx -y vibelet@latest\x1b[0m to upgrade \x1b[33m│\x1b[0m\n` +
16264
- `\x1b[33m╰───────────────────────────────────────────╯\x1b[0m`;
16265
- }
16266
- }
16267
-
16268
- function fetchLatestVersionInBackground() {
16269
- const cached = readUpdateCheck();
16270
- const now = Date.now();
16271
- if (cached?.checkedAt && now - cached.checkedAt < UPDATE_CHECK_INTERVAL_MS) {
16272
- return; // Checked recently; skip.
16273
- }
16274
-
16275
- // Fire-and-forget: spawn a detached process to query the registry so we
16276
- // never block the CLI. Results are read on the *next* invocation.
16277
- const script = `
16278
- const https = await import('node:https');
16279
- const fs = await import('node:fs');
16280
- const url = 'https://registry.npmjs.org/@vibelet/cli/latest';
16281
- https.get(url, { headers: { 'Accept': 'application/json' }, timeout: 8000 }, (res) => {
16282
- let data = '';
16283
- res.on('data', (c) => data += c);
16284
- res.on('end', () => {
16285
- try {
16286
- const version = JSON.parse(data).version;
16287
- if (version) {
16288
- fs.writeFileSync(${JSON.stringify(updateCheckPath)}, JSON.stringify({
16289
- latestVersion: version,
16290
- checkedAt: Date.now(),
16291
- }, null, 2) + '\\n');
16292
- }
16293
- } catch {}
16294
- });
16295
- }).on('error', () => {});
16296
- `;
16297
-
16298
- const child = (0,node_child_process__WEBPACK_IMPORTED_MODULE_0__.spawn)(process.execPath, ['--input-type=module', '-e', script], {
16299
- detached: true,
16300
- stdio: 'ignore',
16301
- windowsHide: true,
16302
- });
16303
- child.unref();
16304
- }
16294
+ const { checkForUpdateFromCache, fetchLatestVersionInBackground } = (0,_vibelet_update_check_mjs__WEBPACK_IMPORTED_MODULE_9__/* .createUpdateChecker */ .J)({
16295
+ updateCheckPath,
16296
+ packageJson,
16297
+ });
16305
16298
 
16306
16299
  // ─── Helpers ────────────────────────────────────────────────────────────────────
16307
16300
 
@@ -16334,7 +16327,7 @@ function ensureRuntimeInstalled() {
16334
16327
  const runtimeMetadata = readRuntimeMetadata();
16335
16328
 
16336
16329
  if (
16337
- (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__/* .shouldRefuseRuntimeDowngrade */ .Ne)({
16330
+ (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__/* .shouldRefuseRuntimeDowngrade */ .Ne)({
16338
16331
  cliVersion: packageJson.version,
16339
16332
  runtimeVersion: runtimeMetadata?.version,
16340
16333
  runtimeEntryExists: (0,node_fs__WEBPACK_IMPORTED_MODULE_1__.existsSync)(runtimeDaemonEntryPath),
@@ -16538,7 +16531,7 @@ function createDarwinBackend() {
16538
16531
  }
16539
16532
 
16540
16533
  function bootoutService() {
16541
- return (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_14__/* .bootoutLaunchdService */ .B)({
16534
+ return (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_15__/* .bootoutLaunchdService */ .B)({
16542
16535
  launchctl,
16543
16536
  launchDomain,
16544
16537
  label,
@@ -16563,7 +16556,7 @@ function createDarwinBackend() {
16563
16556
  if (process.env.VIBELET_CANONICAL_HOST) envVars.VIBELET_CANONICAL_HOST = process.env.VIBELET_CANONICAL_HOST;
16564
16557
  if (process.env.VIBELET_FALLBACK_HOSTS) envVars.VIBELET_FALLBACK_HOSTS = process.env.VIBELET_FALLBACK_HOSTS;
16565
16558
  if (process.env.VIBELET_LOCAL_ONLY) envVars.VIBELET_LOCAL_ONLY = process.env.VIBELET_LOCAL_ONLY;
16566
- if (process.env.VIBELET_TAILCAT) envVars.VIBELET_TAILCAT = process.env.VIBELET_TAILCAT;
16559
+ if (process.env.VIBELET_REMOTE_DIRECT) envVars.VIBELET_REMOTE_DIRECT = process.env.VIBELET_REMOTE_DIRECT;
16567
16560
  if (process.env.VIBE_CLAUDE_DRIVER) envVars.VIBE_CLAUDE_DRIVER = process.env.VIBE_CLAUDE_DRIVER;
16568
16561
  if (process.env.CODEX_PATH) envVars.CODEX_PATH = process.env.CODEX_PATH;
16569
16562
  if (process.env.CLAUDE_PATH) envVars.CLAUDE_PATH = process.env.CLAUDE_PATH;
@@ -16628,7 +16621,7 @@ ${envSection}
16628
16621
  if (result.status !== 0) {
16629
16622
  fail(
16630
16623
  'Failed to bootstrap vibelet launch agent.',
16631
- [(0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_14__/* .describeLaunchctlResult */ .N)(bootoutResult.result), (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_14__/* .describeLaunchctlResult */ .N)(result)].filter(Boolean).join('\n'),
16624
+ [(0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_15__/* .describeLaunchctlResult */ .N)(bootoutResult.result), (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_15__/* .describeLaunchctlResult */ .N)(result)].filter(Boolean).join('\n'),
16632
16625
  );
16633
16626
  }
16634
16627
  }
@@ -16644,7 +16637,7 @@ ${envSection}
16644
16637
  stop() {
16645
16638
  const bootoutResult = bootoutService();
16646
16639
  if (!bootoutResult.ok) {
16647
- fail('Failed to unload vibelet launch agent.', (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_14__/* .describeLaunchctlResult */ .N)(bootoutResult.result));
16640
+ fail('Failed to unload vibelet launch agent.', (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_15__/* .describeLaunchctlResult */ .N)(bootoutResult.result));
16648
16641
  }
16649
16642
  // bootout returns before launchd actually finishes unloading. Poll
16650
16643
  // until the service is gone so a follow-up install() doesn't see a
@@ -16700,7 +16693,7 @@ RestartSec=3
16700
16693
  StandardOutput=append:${stdoutLogPath}
16701
16694
  StandardError=append:${stderrLogPath}
16702
16695
  Environment=PATH=${servicePath}
16703
- 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}` : ''}
16696
+ 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_REMOTE_DIRECT ? `\nEnvironment=VIBELET_REMOTE_DIRECT=${process.env.VIBELET_REMOTE_DIRECT}` : ''}${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}` : ''}
16704
16697
 
16705
16698
  [Install]
16706
16699
  WantedBy=default.target
@@ -16987,7 +16980,7 @@ function retireTrackedQuickTunnel({ required = false } = {}) {
16987
16980
 
16988
16981
  async function stopRunningDaemon(backend) {
16989
16982
  try {
16990
- await (0,_vibelet_stop_logic_mjs__WEBPACK_IMPORTED_MODULE_15__/* .stopDaemonWithHooks */ .v)({
16983
+ await (0,_vibelet_stop_logic_mjs__WEBPACK_IMPORTED_MODULE_16__/* .stopDaemonWithHooks */ .v)({
16991
16984
  requestShutdown,
16992
16985
  backendStop: () => backend.stop(),
16993
16986
  waitForDaemonExit,
@@ -17000,13 +16993,13 @@ async function stopRunningDaemon(backend) {
17000
16993
  async function ensureDaemonForTerminalControl(backend) {
17001
16994
  const healthyDaemon = await probeHealth(1_500);
17002
16995
  const tokenReady = (0,node_fs__WEBPACK_IMPORTED_MODULE_1__.existsSync)(runtimeTerminalControlTokenPath);
17003
- const terminalControlReady = healthyDaemon && tokenReady && (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__/* .doesHealthSupportTerminalControl */ .iX)(healthyDaemon);
16996
+ const terminalControlReady = healthyDaemon && tokenReady && (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__/* .doesHealthSupportTerminalControl */ .iX)(healthyDaemon);
17004
16997
  if (terminalControlReady) return healthyDaemon;
17005
16998
 
17006
16999
  if (healthyDaemon && !terminalControlReady) {
17007
17000
  const activeSessions = typeof healthyDaemon.activeSessions === 'number' ? healthyDaemon.activeSessions : 0;
17008
17001
  if (activeSessions > 0) {
17009
- const reason = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__/* .doesHealthSupportTerminalControl */ .iX)(healthyDaemon)
17002
+ const reason = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__/* .doesHealthSupportTerminalControl */ .iX)(healthyDaemon)
17010
17003
  ? 'terminal-control token is missing'
17011
17004
  : 'the running daemon does not advertise terminal-control support';
17012
17005
  process.stderr.write(
@@ -17025,12 +17018,12 @@ async function ensureDaemonForTerminalControl(backend) {
17025
17018
  }
17026
17019
 
17027
17020
  function validateExplicitCleartextHosts({ hostArg, fallbackHostsArg }) {
17028
- const [unsafeHost] = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_16__/* .findUnsafeCleartextHosts */ .dE)({ hostArg, fallbackHostsArg });
17021
+ const [unsafeHost] = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_17__/* .findUnsafeCleartextHosts */ .dE)({ hostArg, fallbackHostsArg });
17029
17022
  if (unsafeHost) fail(`Refusing public cleartext host ${unsafeHost}. Use HTTPS, Tailscale, LAN, or local access.`);
17030
17023
  }
17031
17024
 
17032
17025
  async function printPairingQr(pairingPayload) {
17033
- await (0,_vibelet_pairing_output_mjs__WEBPACK_IMPORTED_MODULE_11__/* .writePairingOutput */ .pO)(pairingPayload, {
17026
+ await (0,_vibelet_pairing_output_mjs__WEBPACK_IMPORTED_MODULE_12__/* .writePairingOutput */ .pO)(pairingPayload, {
17034
17027
  directory: vibeletDir,
17035
17028
  pairingCodePath,
17036
17029
  pairingQrPngPath,
@@ -17046,11 +17039,11 @@ async function printPairingSummary(existingHealth = null, { relayUrlOverride = n
17046
17039
  const pairingPayload =
17047
17040
  relayUrlOverride === null
17048
17041
  ? daemonPairingPayload
17049
- : (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_16__/* .applyRelayUrlToPairingPayload */ .mp)(daemonPairingPayload, relayUrlOverride);
17050
- const connections = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_16__/* .normalizePairingConnections */ .No)(pairingPayload);
17042
+ : (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_17__/* .applyRelayUrlToPairingPayload */ .mp)(daemonPairingPayload, relayUrlOverride);
17043
+ const connections = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_17__/* .normalizePairingConnections */ .No)(pairingPayload);
17051
17044
  const [preferredConnection, ...otherConnections] = connections;
17052
- const webUiConnection = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_16__/* .selectWebUiConnectionTarget */ .SF)(connections);
17053
- const compactPairingPayload = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_16__/* .createCompactPairingPayload */ .YP)(pairingPayload);
17045
+ const webUiConnection = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_17__/* .selectWebUiConnectionTarget */ .SF)(connections);
17046
+ const compactPairingPayload = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_17__/* .createCompactPairingPayload */ .YP)(pairingPayload);
17054
17047
 
17055
17048
  process.stdout.write(`Vibelet daemon is ready.\n\n`);
17056
17049
  process.stdout.write(`Device: ${health.displayName}\n`);
@@ -17058,26 +17051,26 @@ async function printPairingSummary(existingHealth = null, { relayUrlOverride = n
17058
17051
  process.stdout.write(`Host: ${pairingPayload.canonicalHost}\n`);
17059
17052
  process.stdout.write(`Port: ${pairingPayload.port}\n`);
17060
17053
  if (preferredConnection) {
17061
- process.stdout.write(`Preferred path: ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_16__/* .formatConnectionSummary */ .uR)(preferredConnection)}\n`);
17054
+ process.stdout.write(`Preferred path: ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_17__/* .formatConnectionSummary */ .uR)(preferredConnection)}\n`);
17062
17055
  }
17063
17056
  if (otherConnections.length > 0) {
17064
17057
  process.stdout.write(`Other paths:\n`);
17065
17058
  otherConnections.forEach((target) => {
17066
- process.stdout.write(` - ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_16__/* .formatConnectionSummary */ .uR)(target)}\n`);
17059
+ process.stdout.write(` - ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_17__/* .formatConnectionSummary */ .uR)(target)}\n`);
17067
17060
  });
17068
17061
  }
17069
- process.stdout.write(`Web UI: ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_16__/* .buildWebUiUrl */ .Gv)({ host: 'localhost', port }, compactPairingPayload)}\n`);
17062
+ process.stdout.write(`Web UI: ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_17__/* .buildWebUiUrl */ .Gv)({ host: 'localhost', port }, compactPairingPayload)}\n`);
17070
17063
  if (webUiConnection && webUiConnection.host !== 'localhost') {
17071
- process.stdout.write(`Web UI (other devices): ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_16__/* .buildWebUiUrl */ .Gv)(webUiConnection, compactPairingPayload)}\n`);
17064
+ process.stdout.write(`Web UI (other devices): ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_17__/* .buildWebUiUrl */ .Gv)(webUiConnection, compactPairingPayload)}\n`);
17072
17065
  }
17073
17066
  process.stdout.write(`Paired devices: ${health.pairedDevices}\n`);
17074
17067
  await printPairingQr(pairingPayload);
17075
17068
  }
17076
17069
 
17077
- const printHelp = () => (0,_vibelet_help_mjs__WEBPACK_IMPORTED_MODULE_17__/* .printCliHelp */ .n)({ packageJson, port });
17070
+ const printHelp = () => (0,_vibelet_help_mjs__WEBPACK_IMPORTED_MODULE_18__/* .printCliHelp */ .n)({ packageJson, port });
17078
17071
 
17079
17072
  function parseNamedArg(name, errorHint) {
17080
- return (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .parseNamedArg */ .nE)(process.argv, name, errorHint, fail);
17073
+ return (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .parseNamedArg */ .nE)(process.argv, name, errorHint, fail);
17081
17074
  }
17082
17075
 
17083
17076
  function parseRelayArg() {
@@ -17087,7 +17080,7 @@ function parseRelayArg() {
17087
17080
  function parsePortArg() {
17088
17081
  const rawValue = parseNamedArg('port', '9876');
17089
17082
  if (rawValue === null) return null;
17090
- const parsed = (0,_vibelet_value_validation_mjs__WEBPACK_IMPORTED_MODULE_12__/* .normalizePortValue */ .Q)(rawValue);
17083
+ const parsed = (0,_vibelet_value_validation_mjs__WEBPACK_IMPORTED_MODULE_13__/* .normalizePortValue */ .Q)(rawValue);
17091
17084
  if (parsed === null) {
17092
17085
  fail('--port must be an integer between 1 and 65535');
17093
17086
  }
@@ -17134,8 +17127,8 @@ function parseCommandArg(argv) {
17134
17127
  arg === '--tunnel' ||
17135
17128
  arg === '--force' ||
17136
17129
  arg === '--preserve-access' ||
17137
- arg === '--tailcat' ||
17138
- arg === '--no-tailcat'
17130
+ arg === '--remote-direct' ||
17131
+ arg === '--no-remote-direct'
17139
17132
  ) {
17140
17133
  continue;
17141
17134
  }
@@ -17150,7 +17143,7 @@ async function tryUpdateRunningDaemonRelay(relayUrl) {
17150
17143
 
17151
17144
  async function main() {
17152
17145
  // Update check: read cached result (sync, instant) and spawn background fetch.
17153
- checkForUpdateFromCache();
17146
+ updateMessage = checkForUpdateFromCache() ?? '';
17154
17147
  fetchLatestVersionInBackground();
17155
17148
 
17156
17149
  const portArg = parsePortArg();
@@ -17177,10 +17170,10 @@ async function main() {
17177
17170
  return;
17178
17171
  }
17179
17172
 
17180
- if ((0,_terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_10__/* .isTerminalAgentCommand */ .$c)(command)) {
17173
+ if ((0,_terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_11__/* .isTerminalAgentCommand */ .$c)(command)) {
17181
17174
  const backend = resolveBackend();
17182
17175
  await ensureDaemonForTerminalControl(backend);
17183
- process.exitCode = await (0,_terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_10__/* .runManagedNativeTerminal */ .WA)({
17176
+ process.exitCode = await (0,_terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_11__/* .runManagedNativeTerminal */ .WA)({
17184
17177
  agent: command,
17185
17178
  args: process.argv.slice(3),
17186
17179
  port,
@@ -17189,12 +17182,12 @@ async function main() {
17189
17182
  return;
17190
17183
  }
17191
17184
 
17192
- let accessTarget = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .parseAccessTargetArg */ .tY)(process.argv, fail);
17193
- const cloudflareFlag = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .consumeFlag */ .PC)(process.argv, 'cloudflare') || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .readNpmConfigFlag */ .AW)('cloudflare');
17185
+ let accessTarget = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .parseAccessTargetArg */ .tY)(process.argv, fail);
17186
+ const cloudflareFlag = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .consumeFlag */ .PC)(process.argv, 'cloudflare') || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .readNpmConfigFlag */ .AW)('cloudflare');
17194
17187
  if (cloudflareFlag && accessTarget && accessTarget.kind !== 'remote')
17195
17188
  fail('Do not combine --cloudflare with another --access mode.');
17196
17189
  if (cloudflareFlag) accessTarget = { kind: 'remote' };
17197
- if (accessTarget && (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .hasLegacyAccessArgs */ .NT)(process.argv, process.env)) {
17190
+ if (accessTarget && (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .hasLegacyAccessArgs */ .NT)(process.argv, process.env)) {
17198
17191
  fail(
17199
17192
  'Do not combine --access with legacy access flags.',
17200
17193
  'Use one form, for example `--access=local`, `--access=remote`, `--access=https://...`, or `--access=<host>`.',
@@ -17202,25 +17195,25 @@ async function main() {
17202
17195
  }
17203
17196
  if (!accessTarget) {
17204
17197
  const legacyRemote =
17205
- (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .consumeFlag */ .PC)(process.argv, 'remote') ||
17206
- (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .consumeFlag */ .PC)(process.argv, 'tunnel') ||
17207
- (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .readNpmConfigFlag */ .AW)('remote') ||
17208
- (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .readNpmConfigFlag */ .AW)('tunnel');
17198
+ (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .consumeFlag */ .PC)(process.argv, 'remote') ||
17199
+ (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .consumeFlag */ .PC)(process.argv, 'tunnel') ||
17200
+ (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .readNpmConfigFlag */ .AW)('remote') ||
17201
+ (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .readNpmConfigFlag */ .AW)('tunnel');
17209
17202
  if (legacyRemote) accessTarget = { kind: 'remote' };
17210
17203
  }
17211
17204
  const localFlag =
17212
17205
  accessTarget?.kind === 'local' ||
17213
17206
  (!accessTarget &&
17214
- ((0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .consumeFlag */ .PC)(process.argv, 'local') ||
17215
- (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .readNpmConfigFlag */ .AW)('local') ||
17216
- (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .isTruthyEnvFlag */ .ap)(process.env.VIBELET_LOCAL_ONLY)));
17217
- const forceFlag = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .consumeFlag */ .PC)(process.argv, 'force') || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .readNpmConfigFlag */ .AW)('force');
17207
+ ((0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .consumeFlag */ .PC)(process.argv, 'local') ||
17208
+ (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .readNpmConfigFlag */ .AW)('local') ||
17209
+ (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .isTruthyEnvFlag */ .ap)(process.env.VIBELET_LOCAL_ONLY)));
17210
+ const forceFlag = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .consumeFlag */ .PC)(process.argv, 'force') || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .readNpmConfigFlag */ .AW)('force');
17218
17211
  // App-triggered upgrades keep the currently working connection intact.
17219
- const preserveAccess = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .consumeFlag */ .PC)(process.argv, 'preserve-access') || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .readNpmConfigFlag */ .AW)('preserve-access');
17220
- const { enabled: tailcatEnabled, explicitChoice: explicitTailcatChoice } = (0,_vibelet_tailcat_config_mjs__WEBPACK_IMPORTED_MODULE_9__/* .configureTailcatMode */ .SS)({
17221
- readFlag: (name) => (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .consumeFlag */ .PC)(process.argv, name) || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_18__/* .readNpmConfigFlag */ .AW)(name),
17212
+ const preserveAccess = (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .consumeFlag */ .PC)(process.argv, 'preserve-access') || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .readNpmConfigFlag */ .AW)('preserve-access');
17213
+ const { enabled: remoteDirectEnabled, explicitChoice: explicitRemoteDirectChoice } = (0,_vibelet_remote_direct_config_mjs__WEBPACK_IMPORTED_MODULE_10__/* .configureRemoteDirectMode */ .FN)({
17214
+ readFlag: (name) => (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .consumeFlag */ .PC)(process.argv, name) || (0,_vibelet_cli_args_mjs__WEBPACK_IMPORTED_MODULE_19__/* .readNpmConfigFlag */ .AW)(name),
17222
17215
  fail,
17223
- config: tailcatConfig,
17216
+ config: remoteDirectConfig,
17224
17217
  localMode: localFlag,
17225
17218
  cloudflareRequested: accessTarget?.kind === 'remote',
17226
17219
  });
@@ -17248,7 +17241,7 @@ async function main() {
17248
17241
  command = parseCommandArg(process.argv);
17249
17242
  const startCommand = isDaemonStartCommand(command);
17250
17243
  const savedRelayUrl = relayConfig.load();
17251
- const shouldManageTunnel = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__/* .shouldManageQuickTunnel */ .gm)({
17244
+ const shouldManageTunnel = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__/* .shouldManageQuickTunnel */ .gm)({
17252
17245
  startCommand,
17253
17246
  localMode: localFlag,
17254
17247
  relayArg,
@@ -17257,8 +17250,8 @@ async function main() {
17257
17250
  savedRelayUrl,
17258
17251
  force: forceFlag,
17259
17252
  preserveAccess,
17260
- tailcatEnabled,
17261
- remoteRequested: (0,_vibelet_tailcat_config_mjs__WEBPACK_IMPORTED_MODULE_9__/* .shouldRequestCloudflare */ .OW)({ accessTarget, tailcatEnabled, explicitTailcatChoice }),
17253
+ remoteDirectEnabled,
17254
+ remoteRequested: (0,_vibelet_remote_direct_config_mjs__WEBPACK_IMPORTED_MODULE_10__/* .shouldRequestCloudflare */ .OW)({ accessTarget, remoteDirectEnabled, explicitRemoteDirectChoice }),
17262
17255
  });
17263
17256
  const cloudflaredProtocol = process.env.VIBELET_CLOUDFLARED_PROTOCOL?.trim() || 'http2';
17264
17257
  if (shouldManageTunnel && !['auto', 'quic', 'http2'].includes(cloudflaredProtocol)) {
@@ -17266,7 +17259,7 @@ async function main() {
17266
17259
  }
17267
17260
 
17268
17261
  if (
17269
- (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__/* .shouldRetireManagedQuickTunnel */ .Pg)({
17262
+ (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__/* .shouldRetireManagedQuickTunnel */ .Pg)({
17270
17263
  startCommand,
17271
17264
  manageQuickTunnel: shouldManageTunnel,
17272
17265
  preserveAccess,
@@ -17314,7 +17307,7 @@ async function main() {
17314
17307
  Boolean(hostArg) ||
17315
17308
  Boolean(fallbackHostsArg) ||
17316
17309
  managedTunnelFailed ||
17317
- (tailcatEnabled && !shouldManageTunnel && !preserveAccess));
17310
+ (remoteDirectEnabled && !shouldManageTunnel && !preserveAccess));
17318
17311
  const relayUrl = relayArg !== null ? relayArg : shouldIgnoreSavedRelay ? '' : relayConfig.load();
17319
17312
  if (relayUrl) {
17320
17313
  process.env.VIBELET_RELAY_URL = relayUrl;
@@ -17409,22 +17402,22 @@ async function main() {
17409
17402
  if (command === 'reset') {
17410
17403
  const healthyDaemon = await probeHealth(1_500);
17411
17404
  const hasExplicitConfigOverrides =
17412
- !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
17405
+ !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
17413
17406
  health: healthyDaemon,
17414
17407
  relayUrl,
17415
17408
  canonicalHost: hostArg || '',
17416
17409
  fallbackHosts: fallbackHostsArg || '',
17417
17410
  localMode: localFlag,
17418
- tailcatEnabled,
17411
+ remoteDirectEnabled,
17419
17412
  }) &&
17420
17413
  (localFlag ||
17421
17414
  relayArg !== null ||
17422
17415
  Boolean(relayUrl) ||
17423
17416
  Boolean(hostArg) ||
17424
17417
  Boolean(fallbackHostsArg) ||
17425
- explicitTailcatChoice ||
17426
- tailcatEnabled ||
17427
- healthyDaemon?.tailcat?.enabled === true);
17418
+ explicitRemoteDirectChoice ||
17419
+ remoteDirectEnabled ||
17420
+ healthyDaemon?.remoteDirect?.enabled === true);
17428
17421
  const shouldReplaceDetachedDaemon =
17429
17422
  !healthyDaemon && !backend.handlesProcessLifecycle && backend.isServiceInstalled();
17430
17423
  if (shouldReplaceDetachedDaemon || (healthyDaemon && hasExplicitConfigOverrides)) {
@@ -17445,15 +17438,15 @@ async function main() {
17445
17438
  }
17446
17439
 
17447
17440
  let healthyDaemon = await probeHealth(1_500);
17448
- let tailcatMismatch = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__/* .isTailcatConfigurationMismatch */ .Zg)({ health: healthyDaemon, tailcatEnabled });
17441
+ let remoteDirectMismatch = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__/* .isRemoteDirectConfigurationMismatch */ ._4)({ health: healthyDaemon, remoteDirectEnabled });
17449
17442
  let hasExplicitConfigOverrides =
17450
- !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
17443
+ !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
17451
17444
  health: healthyDaemon,
17452
17445
  relayUrl,
17453
17446
  canonicalHost: hostArg || '',
17454
17447
  fallbackHosts: fallbackHostsArg || '',
17455
17448
  localMode: localFlag,
17456
- tailcatEnabled,
17449
+ remoteDirectEnabled,
17457
17450
  }) &&
17458
17451
  (localFlag ||
17459
17452
  shouldManageTunnel ||
@@ -17461,30 +17454,30 @@ async function main() {
17461
17454
  Boolean(relayUrl) ||
17462
17455
  Boolean(hostArg) ||
17463
17456
  Boolean(fallbackHostsArg) ||
17464
- explicitTailcatChoice ||
17465
- tailcatEnabled ||
17466
- healthyDaemon?.tailcat?.enabled === true);
17457
+ explicitRemoteDirectChoice ||
17458
+ remoteDirectEnabled ||
17459
+ healthyDaemon?.remoteDirect?.enabled === true);
17467
17460
  const relayOverrideRequested =
17468
17461
  !localFlag && !hostArg && !fallbackHostsArg && (shouldManageTunnel || relayArg !== null || Boolean(savedRelayUrl));
17469
17462
  const canApplyConnectionConfigWithoutRestart = Boolean(
17470
- healthyDaemon && relayOverrideRequested && hasExplicitConfigOverrides && !tailcatMismatch,
17463
+ healthyDaemon && relayOverrideRequested && hasExplicitConfigOverrides && !remoteDirectMismatch,
17471
17464
  );
17472
17465
  if (healthyDaemon && hasExplicitConfigOverrides && canApplyConnectionConfigWithoutRestart) {
17473
17466
  const refreshedHealth = await tryUpdateRunningDaemonRelay(relayUrl);
17474
17467
  if (refreshedHealth) {
17475
17468
  healthyDaemon = refreshedHealth;
17476
- hasExplicitConfigOverrides = !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
17469
+ hasExplicitConfigOverrides = !(0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__/* .doesHealthMatchRequestedConnectionConfig */ .nW)({
17477
17470
  health: healthyDaemon,
17478
17471
  relayUrl,
17479
17472
  canonicalHost: '',
17480
17473
  fallbackHosts: '',
17481
17474
  localMode: false,
17482
- tailcatEnabled,
17475
+ remoteDirectEnabled,
17483
17476
  });
17484
- tailcatMismatch = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__/* .isTailcatConfigurationMismatch */ .Zg)({ health: healthyDaemon, tailcatEnabled });
17477
+ remoteDirectMismatch = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__/* .isRemoteDirectConfigurationMismatch */ ._4)({ health: healthyDaemon, remoteDirectEnabled });
17485
17478
  }
17486
17479
  }
17487
- const existingHealth = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_13__/* .shouldReuseHealthyDaemon */ .ZN)({
17480
+ const existingHealth = (0,_vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_14__/* .shouldReuseHealthyDaemon */ .ZN)({
17488
17481
  command,
17489
17482
  daemonHealthy: Boolean(healthyDaemon),
17490
17483
  hasExplicitConfigOverrides,
@@ -17496,7 +17489,7 @@ async function main() {
17496
17489
  if (existingHealth) {
17497
17490
  const runningVersion = typeof existingHealth.version === 'string' ? existingHealth.version : '';
17498
17491
  const activeSessions = typeof existingHealth.activeSessions === 'number' ? existingHealth.activeSessions : 0;
17499
- const isOutdated = runningVersion && (0,_vibelet_value_validation_mjs__WEBPACK_IMPORTED_MODULE_12__/* .compareVersions */ .Z)(runningVersion, packageJson.version) < 0;
17492
+ const isOutdated = runningVersion && (0,_vibelet_value_validation_mjs__WEBPACK_IMPORTED_MODULE_13__/* .compareVersions */ .Z)(runningVersion, packageJson.version) < 0;
17500
17493
  // Only force a driver switch when the user explicitly requested one (flag/env).
17501
17494
  const requestedDriver = process.env.VIBE_CLAUDE_DRIVER ? normalizeDriver(process.env.VIBE_CLAUDE_DRIVER) : null;
17502
17495
  const runningDriver = normalizeDriver(existingHealth.claudeDriverMode);