@rayu-dev/rayu-cli 1.4.466 → 1.4.467

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.
package/dist/rayu.js CHANGED
@@ -148855,7 +148855,7 @@ var init_isEqual = __esm(() => {
148855
148855
 
148856
148856
  // src/utils/userAgent.ts
148857
148857
  function getRayuUserAgent() {
148858
- return `rayu/${"1.4.466"}`;
148858
+ return `rayu/${"1.4.467"}`;
148859
148859
  }
148860
148860
  var getClaudeCodeUserAgent;
148861
148861
  var init_userAgent = __esm(() => {
@@ -148881,7 +148881,7 @@ function getUserAgent() {
148881
148881
  const clientApp = process.env.RAYU_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.RAYU_AGENT_SDK_CLIENT_APP}` : "";
148882
148882
  const workload = getWorkload();
148883
148883
  const workloadSuffix = workload ? `, workload/${workload}` : "";
148884
- return `rayu/${"1.4.466"} (${"external"}, ${process.env.RAYU_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
148884
+ return `rayu/${"1.4.467"} (${"external"}, ${process.env.RAYU_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
148885
148885
  }
148886
148886
  function getMCPUserAgent() {
148887
148887
  const parts = [];
@@ -148895,7 +148895,7 @@ function getMCPUserAgent() {
148895
148895
  parts.push(`client-app/${process.env.RAYU_AGENT_SDK_CLIENT_APP}`);
148896
148896
  }
148897
148897
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
148898
- return `rayu/${"1.4.466"}${suffix}`;
148898
+ return `rayu/${"1.4.467"}${suffix}`;
148899
148899
  }
148900
148900
  function getWebFetchUserAgent() {
148901
148901
  return `Rayu-User (${getRayuUserAgent()})`;
@@ -205143,7 +205143,7 @@ function getAttributionHeader(fingerprint) {
205143
205143
  if (!isAttributionHeaderEnabled()) {
205144
205144
  return "";
205145
205145
  }
205146
- const version2 = `${"1.4.466"}.${fingerprint}`;
205146
+ const version2 = `${"1.4.467"}.${fingerprint}`;
205147
205147
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
205148
205148
  const cch = "";
205149
205149
  const workload = getWorkload();
@@ -259106,7 +259106,7 @@ var init_metadata = __esm(() => {
259106
259106
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
259107
259107
  WHITESPACE_REGEX = /\s+/;
259108
259108
  getVersionBase = memoize_default(() => {
259109
- const match = "1.4.466".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
259109
+ const match = "1.4.467".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
259110
259110
  return match ? match[0] : undefined;
259111
259111
  });
259112
259112
  buildEnvContext = memoize_default(async () => {
@@ -259145,7 +259145,7 @@ var init_metadata = __esm(() => {
259145
259145
  },
259146
259146
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
259147
259147
  isRayuAction: isEnvTruthy(process.env.RAYU_ACTION),
259148
- version: "1.4.466",
259148
+ version: "1.4.467",
259149
259149
  versionBase: getVersionBase(),
259150
259150
  buildTime: "",
259151
259151
  deploymentEnvironment: env3.detectDeploymentEnvironment(),
@@ -291159,7 +291159,7 @@ function getTelemetryAttributes() {
291159
291159
  attributes["session.id"] = sessionId;
291160
291160
  }
291161
291161
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
291162
- attributes["app.version"] = "1.4.466";
291162
+ attributes["app.version"] = "1.4.467";
291163
291163
  }
291164
291164
  const oauthAccount = getOauthAccountInfo();
291165
291165
  if (oauthAccount) {
@@ -401516,7 +401516,7 @@ function getInstallationEnv() {
401516
401516
  return;
401517
401517
  }
401518
401518
  function getClaudeCodeVersion() {
401519
- return "1.4.466";
401519
+ return "1.4.467";
401520
401520
  }
401521
401521
  async function getInstalledVSCodeExtensionVersion(command) {
401522
401522
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -406754,7 +406754,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
406754
406754
  const client3 = new Client({
406755
406755
  name: "claude-code",
406756
406756
  title: "RAYU",
406757
- version: "1.4.466",
406757
+ version: "1.4.467",
406758
406758
  description: "Anthropic's agentic coding tool",
406759
406759
  websiteUrl: PRODUCT_URL
406760
406760
  }, {
@@ -407071,7 +407071,7 @@ var init_client7 = __esm(() => {
407071
407071
  const client3 = new Client({
407072
407072
  name: "claude-code",
407073
407073
  title: "RAYU",
407074
- version: "1.4.466",
407074
+ version: "1.4.467",
407075
407075
  description: "Anthropic's agentic coding tool",
407076
407076
  websiteUrl: PRODUCT_URL
407077
407077
  }, {
@@ -421890,7 +421890,7 @@ function computeFingerprint(messageText, version2) {
421890
421890
  }
421891
421891
  function computeFingerprintFromMessages(messages) {
421892
421892
  const firstMessageText = extractFirstMessageText(messages);
421893
- return computeFingerprint(firstMessageText, "1.4.466");
421893
+ return computeFingerprint(firstMessageText, "1.4.467");
421894
421894
  }
421895
421895
  var FINGERPRINT_SALT = "59cf53e54c78";
421896
421896
  var init_fingerprint = () => {};
@@ -421932,7 +421932,7 @@ async function sideQuery(opts) {
421932
421932
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
421933
421933
  }
421934
421934
  const messageText = extractFirstUserMessageText(messages);
421935
- const fingerprint = computeFingerprint(messageText, "1.4.466");
421935
+ const fingerprint = computeFingerprint(messageText, "1.4.467");
421936
421936
  const attributionHeader = getAttributionHeader(fingerprint);
421937
421937
  const systemBlocks = [
421938
421938
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -521268,9 +521268,9 @@ async function assertMinVersion() {
521268
521268
  if (false) {}
521269
521269
  try {
521270
521270
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
521271
- if (versionConfig.minVersion && lt("1.4.466", versionConfig.minVersion)) {
521271
+ if (versionConfig.minVersion && lt("1.4.467", versionConfig.minVersion)) {
521272
521272
  console.error(`
521273
- It looks like your version of RAYU (${"1.4.466"}) needs an update.
521273
+ It looks like your version of RAYU (${"1.4.467"}) needs an update.
521274
521274
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
521275
521275
 
521276
521276
  To update, please run:
@@ -521496,7 +521496,7 @@ async function installGlobalPackage(specificVersion) {
521496
521496
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
521497
521497
  logEvent("tengu_auto_updater_lock_contention", {
521498
521498
  pid: process.pid,
521499
- currentVersion: "1.4.466"
521499
+ currentVersion: "1.4.467"
521500
521500
  });
521501
521501
  return "in_progress";
521502
521502
  }
@@ -521505,7 +521505,7 @@ async function installGlobalPackage(specificVersion) {
521505
521505
  if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
521506
521506
  logError2(new Error("Windows NPM detected in WSL environment"));
521507
521507
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
521508
- currentVersion: "1.4.466"
521508
+ currentVersion: "1.4.467"
521509
521509
  });
521510
521510
  console.error(`
521511
521511
  Error: Windows NPM detected in WSL
@@ -522036,7 +522036,7 @@ function detectLinuxGlobPatternWarnings() {
522036
522036
  }
522037
522037
  async function getDoctorDiagnostic() {
522038
522038
  const installationType = await getCurrentInstallationType();
522039
- const version2 = typeof MACRO !== "undefined" ? "1.4.466" : "unknown";
522039
+ const version2 = typeof MACRO !== "undefined" ? "1.4.467" : "unknown";
522040
522040
  const installationPath = await getInstallationPath();
522041
522041
  const invokedBinary = getInvokedBinary();
522042
522042
  const multipleInstallations = await detectMultipleInstallations();
@@ -522830,8 +522830,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
522830
522830
  const maxVersion = await getMaxVersion();
522831
522831
  if (maxVersion && gt(version2, maxVersion)) {
522832
522832
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
522833
- if (gte("1.4.466", maxVersion)) {
522834
- logForDebugging(`Native installer: current version ${"1.4.466"} is already at or above maxVersion ${maxVersion}, skipping update`);
522833
+ if (gte("1.4.467", maxVersion)) {
522834
+ logForDebugging(`Native installer: current version ${"1.4.467"} is already at or above maxVersion ${maxVersion}, skipping update`);
522835
522835
  logEvent("tengu_native_update_skipped_max_version", {
522836
522836
  latency_ms: Date.now() - startTime2,
522837
522837
  max_version: maxVersion,
@@ -522842,7 +522842,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
522842
522842
  version2 = maxVersion;
522843
522843
  }
522844
522844
  }
522845
- if (!forceReinstall && version2 === "1.4.466" && await versionIsAvailable(version2) && await isPossibleClaudeBinary(executablePath)) {
522845
+ if (!forceReinstall && version2 === "1.4.467" && await versionIsAvailable(version2) && await isPossibleClaudeBinary(executablePath)) {
522846
522846
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
522847
522847
  logEvent("tengu_native_update_complete", {
522848
522848
  latency_ms: Date.now() - startTime2,
@@ -524038,7 +524038,7 @@ function buildPrimarySection() {
524038
524038
  });
524039
524039
  return [{
524040
524040
  label: "Version",
524041
- value: "1.4.466"
524041
+ value: "1.4.467"
524042
524042
  }, {
524043
524043
  label: "Session name",
524044
524044
  value: nameValue
@@ -527709,7 +527709,7 @@ function Config({
527709
527709
  }
527710
527710
  })
527711
527711
  }) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime168.jsx(ChannelDowngradeDialog, {
527712
- currentVersion: "1.4.466",
527712
+ currentVersion: "1.4.467",
527713
527713
  onChoice: (choice) => {
527714
527714
  setShowSubmenu(null);
527715
527715
  setTabsHidden(false);
@@ -527721,7 +527721,7 @@ function Config({
527721
527721
  autoUpdatesChannel: "stable"
527722
527722
  };
527723
527723
  if (choice === "stay") {
527724
- newSettings.minimumVersion = "1.4.466";
527724
+ newSettings.minimumVersion = "1.4.467";
527725
527725
  }
527726
527726
  updateSettingsForSource("userSettings", newSettings);
527727
527727
  setSettingsData((prev_27) => ({
@@ -535781,7 +535781,7 @@ function HelpV2(t0) {
535781
535781
  let t6;
535782
535782
  if ($3[31] !== tabs) {
535783
535783
  t6 = /* @__PURE__ */ jsx_runtime195.jsx(Tabs, {
535784
- title: `Rayu-CLI v${"1.4.466"}`,
535784
+ title: `Rayu-CLI v${"1.4.467"}`,
535785
535785
  color: "professionalBlue",
535786
535786
  defaultTab: "general",
535787
535787
  children: tabs
@@ -555864,7 +555864,7 @@ function getRecentReleaseNotes(currentVersion, previousVersion, changelogContent
555864
555864
  }
555865
555865
  return [];
555866
555866
  }
555867
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.4.466") {
555867
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.4.467") {
555868
555868
  if (false) {}
555869
555869
  const cachedChangelog = await getStoredChangelog();
555870
555870
  if (lastSeenVersion !== currentVersion || !cachedChangelog) {
@@ -555877,7 +555877,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.4.466")
555877
555877
  releaseNotes
555878
555878
  };
555879
555879
  }
555880
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.4.466") {
555880
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.4.467") {
555881
555881
  if (false) {}
555882
555882
  const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion);
555883
555883
  return {
@@ -556005,7 +556005,7 @@ function getRecentActivitySync() {
556005
556005
  return cachedActivity;
556006
556006
  }
556007
556007
  function getLogoDisplayData() {
556008
- const version2 = process.env.DEMO_VERSION ?? "1.4.466";
556008
+ const version2 = process.env.DEMO_VERSION ?? "1.4.467";
556009
556009
  const serverUrl = getDirectConnectServerUrl();
556010
556010
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
556011
556011
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -557169,7 +557169,7 @@ function LogoV2() {
557169
557169
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
557170
557170
  t2 = () => {
557171
557171
  const currentConfig = getGlobalConfig();
557172
- if (currentConfig.lastReleaseNotesSeen === "1.4.466") {
557172
+ if (currentConfig.lastReleaseNotesSeen === "1.4.467") {
557173
557173
  return;
557174
557174
  }
557175
557175
  saveGlobalConfig(_temp327);
@@ -557647,7 +557647,7 @@ function LogoV2() {
557647
557647
  t24 = $3[61];
557648
557648
  }
557649
557649
  const _latestNpm = getCachedLatestNpmVersionSync();
557650
- const _updateFeeds = _latestNpm && gt(_latestNpm, "1.4.466") ? [createUpdateAvailableFeed("1.4.466", _latestNpm)] : [];
557650
+ const _updateFeeds = _latestNpm && gt(_latestNpm, "1.4.467") ? [createUpdateAvailableFeed("1.4.467", _latestNpm)] : [];
557651
557651
  const t25 = layoutMode === "horizontal" && /* @__PURE__ */ jsx_runtime236.jsx(FeedColumn, {
557652
557652
  feeds: showOnboarding ? [createProjectOnboardingFeed(getSteps()), createRecentActivityFeed(activities)] : showGuestPassesUpsell ? [createRecentActivityFeed(activities), createGuestPassesFeed()] : showOverageCreditUpsell ? [createRecentActivityFeed(activities), createOverageCreditFeed()] : [createRecentActivityFeed(activities), ..._updateFeeds, createWhatsNewFeed(changelog)],
557653
557653
  maxWidth: rightWidth
@@ -557847,12 +557847,12 @@ function LogoV2() {
557847
557847
  return t41;
557848
557848
  }
557849
557849
  function _temp327(current) {
557850
- if (current.lastReleaseNotesSeen === "1.4.466") {
557850
+ if (current.lastReleaseNotesSeen === "1.4.467") {
557851
557851
  return current;
557852
557852
  }
557853
557853
  return {
557854
557854
  ...current,
557855
- lastReleaseNotesSeen: "1.4.466"
557855
+ lastReleaseNotesSeen: "1.4.467"
557856
557856
  };
557857
557857
  }
557858
557858
  function _temp241(s_0) {
@@ -582850,7 +582850,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
582850
582850
  smapsRollup,
582851
582851
  platform: process.platform,
582852
582852
  nodeVersion: process.version,
582853
- ccVersion: "1.4.466"
582853
+ ccVersion: "1.4.467"
582854
582854
  };
582855
582855
  }
582856
582856
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -583372,7 +583372,7 @@ var init_bridge_kick = __esm(() => {
583372
583372
  var call50 = async () => {
583373
583373
  return {
583374
583374
  type: "text",
583375
- value: "1.4.466"
583375
+ value: "1.4.467"
583376
583376
  };
583377
583377
  }, version2, version_default;
583378
583378
  var init_version = __esm(() => {
@@ -593564,7 +593564,7 @@ function generateHtmlReport(data, insights) {
593564
593564
  </html>`;
593565
593565
  }
593566
593566
  function buildExportData(data, insights, facets, remoteStats) {
593567
- const version3 = typeof MACRO !== "undefined" ? "1.4.466" : "unknown";
593567
+ const version3 = typeof MACRO !== "undefined" ? "1.4.467" : "unknown";
593568
593568
  const remote_hosts_collected = remoteStats?.hosts.filter((h3) => h3.sessionCount > 0).map((h3) => h3.name);
593569
593569
  const facets_summary = {
593570
593570
  total: facets.size,
@@ -597474,7 +597474,7 @@ var init_sessionStorage = __esm(() => {
597474
597474
  init_settings2();
597475
597475
  init_slowOperations();
597476
597476
  init_uuid();
597477
- VERSION6 = typeof MACRO !== "undefined" ? "1.4.466" : "unknown";
597477
+ VERSION6 = typeof MACRO !== "undefined" ? "1.4.467" : "unknown";
597478
597478
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
597479
597479
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
597480
597480
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -598692,7 +598692,7 @@ var init_filesystem = __esm(() => {
598692
598692
  });
598693
598693
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
598694
598694
  const nonce = randomBytes19(16).toString("hex");
598695
- return join153(getClaudeTempDir(), "bundled-skills", "1.4.466", nonce);
598695
+ return join153(getClaudeTempDir(), "bundled-skills", "1.4.467", nonce);
598696
598696
  });
598697
598697
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
598698
598698
  });
@@ -603799,15 +603799,16 @@ var init_worktree = __esm(() => {
603799
603799
  ];
603800
603800
  });
603801
603801
 
603802
- // src/cli/update.ts
603803
- var exports_update = {};
603804
- __export(exports_update, {
603805
- update: () => update
603806
- });
603802
+ // src/utils/npmExec.ts
603807
603803
  import { execFileSync as execFileSync3 } from "node:child_process";
603808
603804
  import { homedir as homedir35 } from "os";
603809
603805
  function execNpmSync(npmArgs, options) {
603810
603806
  if (IS_WINDOWS2) {
603807
+ for (const a2 of npmArgs) {
603808
+ if (a2.includes('"')) {
603809
+ throw new Error(`execNpmSync: refusing to quote an argument containing a double quote on Windows (unsafe): ${JSON.stringify(a2)}`);
603810
+ }
603811
+ }
603811
603812
  const commandStr = `npm ${npmArgs.map((a2) => `"${a2}"`).join(" ")}`;
603812
603813
  return execFileSync3(commandStr, [], {
603813
603814
  encoding: "utf8",
@@ -603824,8 +603825,44 @@ function execNpmSync(npmArgs, options) {
603824
603825
  stdio: options.stdio
603825
603826
  });
603826
603827
  }
603828
+ function describeNpmError(err2) {
603829
+ if (!(err2 instanceof Error))
603830
+ return String(err2);
603831
+ const anyErr = err2;
603832
+ const parts = [];
603833
+ if (anyErr.code)
603834
+ parts.push(`code: ${anyErr.code}`);
603835
+ const stderrText = typeof anyErr.stderr === "string" ? anyErr.stderr : Buffer.isBuffer(anyErr.stderr) ? anyErr.stderr.toString("utf8") : "";
603836
+ const trimmedStderr = stderrText.trim();
603837
+ if (trimmedStderr) {
603838
+ parts.push(trimmedStderr);
603839
+ } else if (err2.message) {
603840
+ parts.push(err2.message);
603841
+ }
603842
+ return parts.join(`
603843
+ `);
603844
+ }
603845
+ function isLikelyEacces(err2) {
603846
+ if (!(err2 instanceof Error))
603847
+ return false;
603848
+ const anyErr = err2;
603849
+ if (anyErr.code === "EACCES" || anyErr.code === "EPERM")
603850
+ return true;
603851
+ const stderrText = typeof anyErr.stderr === "string" ? anyErr.stderr : Buffer.isBuffer(anyErr.stderr) ? anyErr.stderr.toString("utf8") : "";
603852
+ return /EACCES|permission denied/i.test(stderrText) || /EACCES|permission denied/i.test(err2.message);
603853
+ }
603854
+ var IS_WINDOWS2;
603855
+ var init_npmExec = __esm(() => {
603856
+ IS_WINDOWS2 = process.platform === "win32";
603857
+ });
603858
+
603859
+ // src/cli/update.ts
603860
+ var exports_update = {};
603861
+ __export(exports_update, {
603862
+ update: () => update
603863
+ });
603827
603864
  async function update() {
603828
- writeToStdout(`Current version: ${"1.4.466"}
603865
+ writeToStdout(`Current version: ${"1.4.467"}
603829
603866
  `);
603830
603867
  const isBundled = isInBundledMode();
603831
603868
  if (isBundled) {
@@ -603840,10 +603877,15 @@ async function updateNpmPackage() {
603840
603877
  let latestVersion;
603841
603878
  try {
603842
603879
  latestVersion = execNpmSync(["view", `${"@rayu-dev/rayu-cli"}@latest`, "version", "--prefer-online"], { timeout: 15000, stdio: ["pipe", "pipe", "pipe"] }).trim();
603843
- } catch {
603880
+ } catch (err2) {
603844
603881
  process.stderr.write(source_default.red(`Failed to check for updates
603845
603882
  `));
603846
603883
  process.stderr.write(`Unable to reach npm registry. Check your network.
603884
+ `);
603885
+ const detail = describeNpmError(err2);
603886
+ if (detail)
603887
+ process.stderr.write(`
603888
+ ${detail}
603847
603889
  `);
603848
603890
  process.stderr.write(`
603849
603891
  Manual check: npm view ${"@rayu-dev/rayu-cli"} version
@@ -603851,40 +603893,69 @@ Manual check: npm view ${"@rayu-dev/rayu-cli"} version
603851
603893
  process.exit(1);
603852
603894
  return;
603853
603895
  }
603854
- if (latestVersion === "1.4.466") {
603896
+ if (latestVersion === "1.4.467") {
603855
603897
  writeToStdout(source_default.green(`
603856
- Rayu CLI is up to date (${"1.4.466"})
603898
+ Rayu CLI is up to date (${"1.4.467"})
603857
603899
  `));
603858
603900
  process.exit(0);
603859
603901
  }
603860
- writeToStdout(`New version available: ${latestVersion} (current: ${"1.4.466"})
603902
+ writeToStdout(`New version available: ${latestVersion} (current: ${"1.4.467"})
603861
603903
  `);
603862
603904
  writeToStdout(`Installing update...
603863
603905
 
603864
603906
  `);
603865
603907
  try {
603866
603908
  execNpmSync(["install", "-g", `${"@rayu-dev/rayu-cli"}@latest`], { stdio: "inherit" });
603867
- } catch {
603909
+ } catch (err2) {
603868
603910
  process.stderr.write(source_default.red(`
603869
603911
  Failed to install update
603870
603912
  `));
603913
+ const detail = describeNpmError(err2);
603914
+ if (detail)
603915
+ process.stderr.write(`${detail}
603916
+ `);
603871
603917
  process.stderr.write(`
603872
603918
  Try manually:
603873
603919
  `);
603874
603920
  process.stderr.write(source_default.bold(` npm install -g ${"@rayu-dev/rayu-cli"}@latest
603875
603921
  `));
603876
- process.stderr.write(`Or with sudo if you have permission issues:
603922
+ if (isLikelyEacces(err2)) {
603923
+ process.stderr.write(`
603924
+ This looks like a permissions error on npm's global install
603925
+ ` + `directory. If Node was installed via nvm, Homebrew, Volta, or fnm,
603926
+ ` + `do NOT use sudo — it installs into a root-owned path that will
603927
+ ` + `conflict with your user-owned Node version. Instead fix npm's
603928
+ ` + `global prefix, e.g.:
603929
+ ` + ` mkdir -p ~/.npm-global
603930
+ ` + ` npm config set prefix ~/.npm-global
603931
+ ` + ` export PATH=~/.npm-global/bin:$PATH # add to your shell rc file
603932
+ ` + `Only use sudo if Node was installed system-wide (e.g. via apt/yum
603933
+ ` + `or the nodejs.org installer):
603934
+ ` + ` sudo npm install -g ${"@rayu-dev/rayu-cli"}@latest
603935
+ `);
603936
+ } else {
603937
+ process.stderr.write(`Or with sudo if you have permission issues:
603877
603938
  `);
603878
- process.stderr.write(source_default.bold(` sudo npm install -g ${"@rayu-dev/rayu-cli"}@latest
603939
+ process.stderr.write(source_default.bold(` sudo npm install -g ${"@rayu-dev/rayu-cli"}@latest
603879
603940
  `));
603941
+ }
603880
603942
  process.exit(1);
603881
603943
  return;
603882
603944
  }
603883
603945
  writeToStdout(source_default.green(`
603884
- Successfully updated from ${"1.4.466"} to ${latestVersion}
603946
+ Successfully updated to ${getInstalledVersion() ?? latestVersion}
603885
603947
  `));
603886
603948
  process.exit(0);
603887
603949
  }
603950
+ function getInstalledVersion() {
603951
+ try {
603952
+ const output = execNpmSync(["list", "-g", "@rayu-dev/rayu-cli", "--depth=0", "--json"], { timeout: 1e4, stdio: ["pipe", "pipe", "pipe"] });
603953
+ const parsed = JSON.parse(output);
603954
+ return parsed.dependencies?.["@rayu-dev/rayu-cli"]?.version ?? null;
603955
+ } catch {
603956
+ return null;
603957
+ }
603958
+ }
603888
603959
  async function updateNativeBinary() {
603889
603960
  writeToStdout(`Checking for updates...
603890
603961
  `);
@@ -603895,14 +603966,14 @@ async function updateNativeBinary() {
603895
603966
  } catch {
603896
603967
  latestVersion = "";
603897
603968
  }
603898
- if (latestVersion && latestVersion === "1.4.466") {
603969
+ if (latestVersion && latestVersion === "1.4.467") {
603899
603970
  writeToStdout(source_default.green(`
603900
- Rayu CLI is up to date (1.4.466)
603971
+ Rayu CLI is up to date (1.4.467)
603901
603972
  `));
603902
603973
  process.exit(0);
603903
603974
  }
603904
603975
  if (latestVersion) {
603905
- writeToStdout(`New version available: ${latestVersion} (current: 1.4.466)
603976
+ writeToStdout(`New version available: ${latestVersion} (current: 1.4.467)
603906
603977
  `);
603907
603978
  }
603908
603979
  writeToStdout(`Downloading and installing update...
@@ -603917,13 +603988,13 @@ Rayu CLI is up to date (1.4.466)
603917
603988
  return;
603918
603989
  }
603919
603990
  writeToStdout(source_default.green(`
603920
- Rayu CLI is up to date (1.4.466)
603991
+ Rayu CLI is up to date (1.4.467)
603921
603992
  `));
603922
603993
  process.exit(0);
603923
603994
  }
603924
603995
  const updatedTo = result.latestVersion ?? latestVersion ?? "latest";
603925
603996
  writeToStdout(source_default.green(`
603926
- Successfully updated from 1.4.466 to ${updatedTo}
603997
+ Successfully updated from 1.4.467 to ${updatedTo}
603927
603998
  `));
603928
603999
  writeToStdout(`Restart your terminal to use the new version.
603929
604000
  `);
@@ -603942,10 +604013,9 @@ Try manually:
603942
604013
  process.exit(1);
603943
604014
  }
603944
604015
  }
603945
- var IS_WINDOWS2;
603946
604016
  var init_update = __esm(() => {
603947
604017
  init_source2();
603948
- IS_WINDOWS2 = process.platform === "win32";
604018
+ init_npmExec();
603949
604019
  });
603950
604020
 
603951
604021
  // src/cli/uninstall.ts
@@ -603953,26 +604023,11 @@ var exports_uninstall = {};
603953
604023
  __export(exports_uninstall, {
603954
604024
  uninstall: () => uninstall
603955
604025
  });
603956
- import { execFileSync as execFileSync4 } from "node:child_process";
603957
604026
  import { rm as rm17 } from "node:fs/promises";
603958
604027
  import { existsSync as existsSync28 } from "node:fs";
603959
604028
  import { createInterface as createInterface3 } from "node:readline";
603960
- import { homedir as homedir36 } from "os";
603961
604029
  function execNpmUninstallSync() {
603962
- if (IS_WINDOWS3) {
603963
- execFileSync4(`npm uninstall -g "${"@rayu-dev/rayu-cli"}"`, [], {
603964
- encoding: "utf8",
603965
- cwd: homedir36(),
603966
- stdio: "inherit",
603967
- shell: true
603968
- });
603969
- return;
603970
- }
603971
- execFileSync4("npm", ["uninstall", "-g", "@rayu-dev/rayu-cli"], {
603972
- encoding: "utf8",
603973
- cwd: homedir36(),
603974
- stdio: "inherit"
603975
- });
604030
+ execNpmSync(["uninstall", "-g", "@rayu-dev/rayu-cli"], { stdio: "inherit" });
603976
604031
  }
603977
604032
  async function confirm(question, defaultYes) {
603978
604033
  if (!process.stdin.isTTY)
@@ -604004,14 +604059,14 @@ async function removeDataDir(dir) {
604004
604059
  async function uninstall(args = []) {
604005
604060
  const yes = args.includes("--yes") || args.includes("-y");
604006
604061
  const keepData = args.includes("--keep-data");
604007
- writeToStdout(`Uninstalling Rayu CLI (${"1.4.466"})...
604062
+ writeToStdout(`Uninstalling Rayu CLI (${"1.4.467"})...
604008
604063
  `);
604009
604064
  writeToStdout(`Running: npm uninstall -g ${"@rayu-dev/rayu-cli"}
604010
604065
 
604011
604066
  `);
604012
604067
  try {
604013
604068
  execNpmUninstallSync();
604014
- } catch {
604069
+ } catch (err2) {
604015
604070
  process.stderr.write(source_default.red(`
604016
604071
  Failed to uninstall ${"@rayu-dev/rayu-cli"}
604017
604072
  `));
@@ -604020,15 +604075,25 @@ Try running manually:
604020
604075
  `);
604021
604076
  process.stderr.write(source_default.bold(` npm uninstall -g ${"@rayu-dev/rayu-cli"}
604022
604077
  `));
604023
- process.stderr.write(`Or with sudo if you installed with elevated permissions:
604078
+ if (isLikelyEacces(err2)) {
604079
+ process.stderr.write(`
604080
+ This looks like a permissions error on npm's global install
604081
+ ` + `directory. If Node was installed via nvm, Homebrew, Volta, or fnm,
604082
+ ` + `do NOT use sudo. Only use sudo if Node was installed system-wide
604083
+ ` + `(e.g. via apt/yum or the nodejs.org installer):
604084
+ ` + ` sudo npm uninstall -g ${"@rayu-dev/rayu-cli"}
604024
604085
  `);
604025
- process.stderr.write(source_default.bold(` sudo npm uninstall -g ${"@rayu-dev/rayu-cli"}
604086
+ } else {
604087
+ process.stderr.write(`Or with sudo if you installed with elevated permissions:
604088
+ `);
604089
+ process.stderr.write(source_default.bold(` sudo npm uninstall -g ${"@rayu-dev/rayu-cli"}
604026
604090
  `));
604091
+ }
604027
604092
  process.exit(1);
604028
604093
  return;
604029
604094
  }
604030
604095
  writeToStdout(source_default.green(`
604031
- Successfully uninstalled ${"@rayu-dev/rayu-cli"} ${"1.4.466"}
604096
+ Successfully uninstalled ${"@rayu-dev/rayu-cli"} ${"1.4.467"}
604032
604097
  `));
604033
604098
  const configDir = getRayuConfigHomeDir();
604034
604099
  const dataExists = existsSync28(configDir);
@@ -604063,11 +604128,10 @@ Thanks for using Rayu CLI!
604063
604128
  `);
604064
604129
  process.exit(0);
604065
604130
  }
604066
- var IS_WINDOWS3;
604067
604131
  var init_uninstall = __esm(() => {
604068
604132
  init_source2();
604069
604133
  init_envUtils();
604070
- IS_WINDOWS3 = process.platform === "win32";
604134
+ init_npmExec();
604071
604135
  });
604072
604136
 
604073
604137
  // src/utils/firstRun.ts
@@ -604112,7 +604176,7 @@ function showFirstRunWelcome() {
604112
604176
  `);
604113
604177
  try {
604114
604178
  mkdirSync16(getRayuConfigHomeDir(), { recursive: true });
604115
- writeFileSync18(markerPath(), "1.4.466", "utf8");
604179
+ writeFileSync18(markerPath(), "1.4.467", "utf8");
604116
604180
  } catch {}
604117
604181
  }
604118
604182
  var init_firstRun = __esm(() => {
@@ -620298,7 +620362,7 @@ async function initializeBetaTracing(resource) {
620298
620362
  });
620299
620363
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
620300
620364
  setLoggerProvider(loggerProvider);
620301
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.4.466");
620365
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.4.467");
620302
620366
  setEventLogger(eventLogger);
620303
620367
  process.on("beforeExit", async () => {
620304
620368
  await loggerProvider?.forceFlush();
@@ -620338,7 +620402,7 @@ async function initializeTelemetry() {
620338
620402
  const platform4 = getPlatform();
620339
620403
  const baseAttributes = {
620340
620404
  [import_semantic_conventions.ATTR_SERVICE_NAME]: "claude-code",
620341
- [import_semantic_conventions.ATTR_SERVICE_VERSION]: "1.4.466"
620405
+ [import_semantic_conventions.ATTR_SERVICE_VERSION]: "1.4.467"
620342
620406
  };
620343
620407
  if (platform4 === "wsl") {
620344
620408
  const wslVersion = getWslVersion();
@@ -620383,7 +620447,7 @@ async function initializeTelemetry() {
620383
620447
  } catch {}
620384
620448
  };
620385
620449
  registerCleanup(shutdownTelemetry2);
620386
- return meterProvider2.getMeter("com.anthropic.claude_code", "1.4.466");
620450
+ return meterProvider2.getMeter("com.anthropic.claude_code", "1.4.467");
620387
620451
  }
620388
620452
  const meterProvider = new import_sdk_metrics2.MeterProvider({
620389
620453
  resource,
@@ -620403,7 +620467,7 @@ async function initializeTelemetry() {
620403
620467
  });
620404
620468
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
620405
620469
  setLoggerProvider(loggerProvider);
620406
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.4.466");
620470
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "1.4.467");
620407
620471
  setEventLogger(eventLogger);
620408
620472
  logForDebugging("[3P telemetry] Event logger set successfully");
620409
620473
  process.on("beforeExit", async () => {
@@ -620465,7 +620529,7 @@ Current timeout: ${timeoutMs}ms
620465
620529
  }
620466
620530
  };
620467
620531
  registerCleanup(shutdownTelemetry);
620468
- return meterProvider.getMeter("com.anthropic.claude_code", "1.4.466");
620532
+ return meterProvider.getMeter("com.anthropic.claude_code", "1.4.467");
620469
620533
  }
620470
620534
  async function flushTelemetry() {
620471
620535
  const meterProvider = getMeterProvider();
@@ -621967,7 +622031,7 @@ function buildSystemInitMessage(inputs) {
621967
622031
  slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
621968
622032
  apiKeySource: getAnthropicApiKeyWithSource().source,
621969
622033
  betas: getSdkBetas(),
621970
- claude_code_version: "1.4.466",
622034
+ claude_code_version: "1.4.467",
621971
622035
  output_style: outputStyle2,
621972
622036
  agents: inputs.agents.map((agent) => agent.agentType),
621973
622037
  skills: inputs.skills.filter((s2) => s2.userInvocable !== false).map((skill) => skill.name),
@@ -629690,7 +629754,7 @@ var init_ShowInIDEPrompt = __esm(() => {
629690
629754
  });
629691
629755
 
629692
629756
  // src/components/permissions/FilePermissionDialog/permissionOptions.tsx
629693
- import { homedir as homedir37 } from "os";
629757
+ import { homedir as homedir36 } from "os";
629694
629758
  import { basename as basename52, join as join158, sep as sep40 } from "path";
629695
629759
  function isInRayuFolder(filePath) {
629696
629760
  const absolutePath = expandPath(filePath);
@@ -629701,7 +629765,7 @@ function isInRayuFolder(filePath) {
629701
629765
  }
629702
629766
  function isInGlobalRayuFolder(filePath) {
629703
629767
  const absolutePath = expandPath(filePath);
629704
- const globalRayuFolderPath = join158(homedir37(), ".rayu");
629768
+ const globalRayuFolderPath = join158(homedir36(), ".rayu");
629705
629769
  const normalizedAbsolutePath = normalizeCaseForComparison2(absolutePath);
629706
629770
  const normalizedGlobalRayuFolderPath = normalizeCaseForComparison2(globalRayuFolderPath);
629707
629771
  return normalizedAbsolutePath.startsWith(normalizedGlobalRayuFolderPath + sep40.toLowerCase()) || normalizedAbsolutePath.startsWith(normalizedGlobalRayuFolderPath + "/");
@@ -638298,7 +638362,7 @@ var init_useVoiceEnabled = __esm(() => {
638298
638362
  function getSemverPart(version3) {
638299
638363
  return `${import_semver12.major(version3, { loose: true })}.${import_semver12.minor(version3, { loose: true })}.${import_semver12.patch(version3, { loose: true })}`;
638300
638364
  }
638301
- function useUpdateNotification(updatedVersion, initialVersion = "1.4.466") {
638365
+ function useUpdateNotification(updatedVersion, initialVersion = "1.4.467") {
638302
638366
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react216.useState(() => getSemverPart(initialVersion));
638303
638367
  if (!updatedVersion) {
638304
638368
  return null;
@@ -638338,7 +638402,7 @@ function AutoUpdater({
638338
638402
  return;
638339
638403
  }
638340
638404
  if (false) {}
638341
- const currentVersion = "1.4.466";
638405
+ const currentVersion = "1.4.467";
638342
638406
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
638343
638407
  let latestVersion = await getLatestVersion(channel2);
638344
638408
  const isDisabled = isAutoUpdaterDisabled();
@@ -638551,12 +638615,12 @@ function NativeAutoUpdater({
638551
638615
  logEvent("tengu_native_auto_updater_start", {});
638552
638616
  try {
638553
638617
  const maxVersion = await getMaxVersion();
638554
- if (maxVersion && gt("1.4.466", maxVersion)) {
638618
+ if (maxVersion && gt("1.4.467", maxVersion)) {
638555
638619
  const msg = await getMaxVersionMessage();
638556
638620
  setMaxVersionIssue(msg ?? "affects your version");
638557
638621
  }
638558
638622
  const result = await installLatest(channel2);
638559
- const currentVersion = "1.4.466";
638623
+ const currentVersion = "1.4.467";
638560
638624
  const latencyMs = Date.now() - startTime2;
638561
638625
  if (result.lockFailed) {
638562
638626
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -638693,17 +638757,17 @@ function PackageManagerAutoUpdater(t0) {
638693
638757
  const maxVersion = await getMaxVersion();
638694
638758
  if (maxVersion && latest && gt(latest, maxVersion)) {
638695
638759
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
638696
- if (gte("1.4.466", maxVersion)) {
638697
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.4.466"} is already at or above maxVersion ${maxVersion}, skipping update`);
638760
+ if (gte("1.4.467", maxVersion)) {
638761
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.4.467"} is already at or above maxVersion ${maxVersion}, skipping update`);
638698
638762
  setUpdateAvailable(false);
638699
638763
  return;
638700
638764
  }
638701
638765
  latest = maxVersion;
638702
638766
  }
638703
- const hasUpdate = latest && !gte("1.4.466", latest) && !shouldSkipVersion(latest);
638767
+ const hasUpdate = latest && !gte("1.4.467", latest) && !shouldSkipVersion(latest);
638704
638768
  setUpdateAvailable(!!hasUpdate);
638705
638769
  if (hasUpdate) {
638706
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.4.466"} -> ${latest}`);
638770
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.4.467"} -> ${latest}`);
638707
638771
  }
638708
638772
  };
638709
638773
  $3[0] = t1;
@@ -638737,7 +638801,7 @@ function PackageManagerAutoUpdater(t0) {
638737
638801
  wrap: "truncate",
638738
638802
  children: [
638739
638803
  "currentVersion: ",
638740
- "1.4.466"
638804
+ "1.4.467"
638741
638805
  ]
638742
638806
  });
638743
638807
  $3[3] = verbose;
@@ -646901,7 +646965,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
646901
646965
  project_dir: getOriginalCwd(),
646902
646966
  added_dirs: addedDirs
646903
646967
  },
646904
- version: "1.4.466",
646968
+ version: "1.4.467",
646905
646969
  output_style: {
646906
646970
  name: outputStyleName
646907
646971
  },
@@ -649080,7 +649144,7 @@ var init_user = __esm(() => {
649080
649144
  deviceId,
649081
649145
  sessionId: getSessionId(),
649082
649146
  email: getEmail(),
649083
- appVersion: "1.4.466",
649147
+ appVersion: "1.4.467",
649084
649148
  platform: getHostPlatformForAnalytics(),
649085
649149
  organizationUuid,
649086
649150
  accountUuid,
@@ -658519,7 +658583,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
658519
658583
  } catch {}
658520
658584
  const data = {
658521
658585
  trigger,
658522
- version: "1.4.466",
658586
+ version: "1.4.467",
658523
658587
  platform: process.platform,
658524
658588
  transcript,
658525
658589
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -670486,7 +670550,7 @@ function WelcomeV2() {
670486
670550
  dimColor: true,
670487
670551
  children: [
670488
670552
  "v",
670489
- "1.4.466"
670553
+ "1.4.467"
670490
670554
  ]
670491
670555
  })
670492
670556
  ]
@@ -671025,7 +671089,7 @@ var exports_TrustDialog = {};
671025
671089
  __export(exports_TrustDialog, {
671026
671090
  TrustDialog: () => TrustDialog
671027
671091
  });
671028
- import { homedir as homedir38 } from "os";
671092
+ import { homedir as homedir37 } from "os";
671029
671093
  function TrustDialog(t0) {
671030
671094
  const $3 = import_compiler_runtime346.c(33);
671031
671095
  const {
@@ -671136,7 +671200,7 @@ function TrustDialog(t0) {
671136
671200
  let t13;
671137
671201
  if ($3[13] !== hasAnyBashExecution) {
671138
671202
  t12 = () => {
671139
- const isHomeDir = homedir38() === getCwd();
671203
+ const isHomeDir = homedir37() === getCwd();
671140
671204
  logEvent("tengu_trust_dialog_shown", {
671141
671205
  isHomeDir,
671142
671206
  hasMcpServers,
@@ -671165,7 +671229,7 @@ function TrustDialog(t0) {
671165
671229
  gracefulShutdownSync(1);
671166
671230
  return;
671167
671231
  }
671168
- const isHomeDir_0 = homedir38() === getCwd();
671232
+ const isHomeDir_0 = homedir37() === getCwd();
671169
671233
  logEvent("tengu_trust_dialog_accept", {
671170
671234
  isHomeDir: isHomeDir_0,
671171
671235
  hasMcpServers,
@@ -671493,7 +671557,7 @@ function completeOnboarding() {
671493
671557
  saveGlobalConfig((current) => ({
671494
671558
  ...current,
671495
671559
  hasCompletedOnboarding: true,
671496
- lastOnboardingVersion: "1.4.466"
671560
+ lastOnboardingVersion: "1.4.467"
671497
671561
  }));
671498
671562
  }
671499
671563
  function showDialog(root2, renderer) {
@@ -676426,7 +676490,7 @@ function appendToLog(path29, message) {
676426
676490
  cwd: getFsImplementation().cwd(),
676427
676491
  userType: "external",
676428
676492
  sessionId: getSessionId(),
676429
- version: "1.4.466"
676493
+ version: "1.4.467"
676430
676494
  };
676431
676495
  getLogWriter(path29).write(messageWithTimestamp);
676432
676496
  }
@@ -676716,7 +676780,7 @@ var init_sessionMemory = __esm(() => {
676716
676780
 
676717
676781
  // src/utils/iTermBackup.ts
676718
676782
  import { copyFile as copyFile12, stat as stat47 } from "fs/promises";
676719
- import { homedir as homedir39 } from "os";
676783
+ import { homedir as homedir38 } from "os";
676720
676784
  import { join as join167 } from "path";
676721
676785
  function markITerm2SetupComplete() {
676722
676786
  saveGlobalConfig((current) => ({
@@ -676732,7 +676796,7 @@ function getIterm2RecoveryInfo() {
676732
676796
  };
676733
676797
  }
676734
676798
  function getITerm2PlistPath() {
676735
- return join167(homedir39(), "Library", "Preferences", "com.googlecode.iterm2.plist");
676799
+ return join167(homedir38(), "Library", "Preferences", "com.googlecode.iterm2.plist");
676736
676800
  }
676737
676801
  async function checkAndRestoreITerm2Backup() {
676738
676802
  const { inProgress, backupPath } = getIterm2RecoveryInfo();
@@ -680531,8 +680595,8 @@ async function getEnvLessBridgeConfig() {
680531
680595
  }
680532
680596
  async function checkEnvLessBridgeMinVersion() {
680533
680597
  const cfg = await getEnvLessBridgeConfig();
680534
- if (cfg.min_version && lt("1.4.466", cfg.min_version)) {
680535
- return `Your version of RAYU (${"1.4.466"}) is too old for Remote Control.
680598
+ if (cfg.min_version && lt("1.4.467", cfg.min_version)) {
680599
+ return `Your version of RAYU (${"1.4.467"}) is too old for Remote Control.
680536
680600
  Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
680537
680601
  }
680538
680602
  return null;
@@ -681005,7 +681069,7 @@ async function initBridgeCore(params) {
681005
681069
  const rawApi = createBridgeApiClient({
681006
681070
  baseUrl,
681007
681071
  getAccessToken,
681008
- runnerVersion: "1.4.466",
681072
+ runnerVersion: "1.4.467",
681009
681073
  onDebug: logForDebugging,
681010
681074
  onAuth401,
681011
681075
  getTrustedDeviceToken
@@ -686360,7 +686424,7 @@ async function startMCPServer(cwd3, debug4, verbose) {
686360
686424
  setCwd(cwd3);
686361
686425
  const server = new Server({
686362
686426
  name: "claude/tengu",
686363
- version: "1.4.466"
686427
+ version: "1.4.467"
686364
686428
  }, {
686365
686429
  capabilities: {
686366
686430
  tools: {}
@@ -687341,11 +687405,11 @@ var exports_install = {};
687341
687405
  __export(exports_install, {
687342
687406
  install: () => install
687343
687407
  });
687344
- import { homedir as homedir40 } from "node:os";
687408
+ import { homedir as homedir39 } from "node:os";
687345
687409
  import { join as join171 } from "node:path";
687346
687410
  function getInstallationPath2() {
687347
687411
  const isWindows2 = env3.platform === "win32";
687348
- const homeDir = homedir40();
687412
+ const homeDir = homedir39();
687349
687413
  if (isWindows2) {
687350
687414
  const windowsPath = join171(homeDir, ".local", "bin", "claude.exe");
687351
687415
  return windowsPath.replace(/\//g, "\\");
@@ -688886,7 +688950,7 @@ ${customInstructions}` : customInstructions;
688886
688950
  }
688887
688951
  }
688888
688952
  logForDiagnosticsNoPII("info", "started", {
688889
- version: "1.4.466",
688953
+ version: "1.4.467",
688890
688954
  is_native_binary: isInBundledMode()
688891
688955
  });
688892
688956
  registerCleanup(async () => {
@@ -689605,7 +689669,7 @@ Usage: rayu --remote "your task description"`, () => gracefulShutdown(1));
689605
689669
  pendingHookMessages
689606
689670
  }, renderAndRun);
689607
689671
  }
689608
- }).version(`1.4.466 (${PRODUCT_NAME})`, "-v, --version", "Output the version number");
689672
+ }).version(`1.4.467 (${PRODUCT_NAME})`, "-v, --version", "Output the version number");
689609
689673
  program.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
689610
689674
  program.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
689611
689675
  if (canUserConfigureAdvisor()) {
@@ -690065,7 +690129,7 @@ if (false) {}
690065
690129
  async function main2() {
690066
690130
  const args = process.argv.slice(2);
690067
690131
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
690068
- console.log(`${"1.4.466"} (Rayu-CLI)`);
690132
+ console.log(`${"1.4.467"} (Rayu-CLI)`);
690069
690133
  return;
690070
690134
  }
690071
690135
  if (!isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rayu-dev/rayu-cli",
3
- "version": "1.4.466",
3
+ "version": "1.4.467",
4
4
  "description": "Rayu-CLI — a multi-provider AI coding CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,59 +1,29 @@
1
1
  'use strict';
2
2
 
3
- const { execSync } = require('child_process');
4
- const fs = require('fs');
5
-
6
- // Check if rayu is already installed
7
- let currentVersion = null;
8
- try {
9
- const output = execSync('rayu --version', {
10
- encoding: 'utf8',
11
- stdio: ['pipe', 'pipe', 'pipe'],
12
- timeout: 5000,
13
- });
14
- const match = output.match(/(\d+\.\d+\.\d+)/);
15
- if (match) currentVersion = match[1];
16
- } catch (_) {
17
- // rayu not installed fresh install, proceed silently
18
- }
19
-
20
- if (!currentVersion) {
21
- process.exit(0);
22
- }
23
-
24
- // npm redirects stdin away from the terminal when running lifecycle scripts,
25
- // so process.stdin.isTTY is always false. Open /dev/tty directly to get
26
- // real interactive input from the user.
27
- let ttyFd;
28
- try {
29
- ttyFd = fs.openSync('/dev/tty', 'r+');
30
- } catch (_) {
31
- // Non-interactive environment (CI, pipes, Windows) — proceed with install
32
- process.exit(0);
33
- }
34
-
35
- process.stdout.write(
36
- '\n Rayu CLI v' + currentVersion + ' is already installed.\n' +
37
- ' Replace with the latest version? Your config will not be changed. [y/N] '
38
- );
39
-
40
- // Read answer synchronously directly from the terminal
41
- const buf = Buffer.alloc(256);
42
- let bytesRead = 0;
43
- try {
44
- bytesRead = fs.readSync(ttyFd, buf, 0, buf.length, null);
45
- } catch (_) {
46
- fs.closeSync(ttyFd);
47
- process.exit(0);
48
- }
49
- fs.closeSync(ttyFd);
50
-
51
- const answer = buf.slice(0, bytesRead).toString().trim();
52
-
53
- if (answer.toLowerCase() === 'y') {
54
- process.stdout.write(' Installing latest version...\n\n');
55
- process.exit(0);
56
- } else {
57
- process.stdout.write(' Keeping current version. No changes made.\n\n');
58
- process.exit(1);
59
- }
3
+ // This script intentionally does nothing interactive.
4
+ //
5
+ // It previously prompted "Replace with the latest version? [y/N]" via a
6
+ // blocking fs.readSync() on /dev/tty, and exited 1 (aborting the whole
7
+ // `npm install` per npm's lifecycle-script contract) on any answer other
8
+ // than "y".
9
+ //
10
+ // That was broken in two independent ways:
11
+ // 1. The prompt's answer never actually controlled anything — npm always
12
+ // overwrites the previous global install once preinstall exits 0,
13
+ // regardless of what the script printed. The y/N choice was purely
14
+ // cosmetic.
15
+ // 2. When `npm install -g` is spawned as a child process (e.g. from
16
+ // `rayu update`) or run inside another tool's spinner/output, this
17
+ // prompt's text can be interleaved with or overwritten by the parent
18
+ // process's own terminal output, making the prompt invisible. Users
19
+ // would see a stalled spinner while the script silently blocked on
20
+ // readSync waiting for a keypress that was never visibly requested —
21
+ // indistinguishable from a hang, forcing a Ctrl-C. Any non-"y" answer
22
+ // (including "no answer available", e.g. non-interactive CI/pipes)
23
+ // then aborted the install with a non-zero exit, breaking automated
24
+ // and headless updates entirely.
25
+ //
26
+ // Always exit 0 so `npm install -g @rayu-dev/rayu-cli[@latest]` completes
27
+ // deterministically and non-interactively on every OS and in every
28
+ // environment (interactive terminal, CI, piped, Windows).
29
+ process.exit(0);