snowcode 0.9.1 → 0.9.21

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 (2) hide show
  1. package/dist/cli.mjs +308 -393
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -811,6 +811,9 @@ function updateAccount(id, updates) {
811
811
  Object.assign(acc, updates);
812
812
  saveAccounts(data);
813
813
  }
814
+ function getEnabledAccounts(type) {
815
+ return loadAccounts().accounts.filter((a) => a.enabled && (type == null || a.type === type));
816
+ }
814
817
  var ACCOUNT_TYPE_LABELS;
815
818
  var init_accountManager = __esm(() => {
816
819
  init_envUtils();
@@ -125645,7 +125648,7 @@ var init_metadata = __esm(() => {
125645
125648
  isClaudeAiAuth: isClaudeAISubscriber(),
125646
125649
  version: "99.0.0",
125647
125650
  versionBase: getVersionBase(),
125648
- buildTime: "2026-04-05T03:08:12.888Z",
125651
+ buildTime: "2026-04-05T03:49:47.637Z",
125649
125652
  deploymentEnvironment: env2.detectDeploymentEnvironment(),
125650
125653
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
125651
125654
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -129986,7 +129989,6 @@ var init_antigravityOAuth = __esm(() => {
129986
129989
 
129987
129990
  // src/services/api/providerConfig.ts
129988
129991
  import { existsSync as existsSync7, mkdirSync as mkdirSync5, readFileSync as readFileSync9, writeFileSync as writeFileSync4 } from "node:fs";
129989
- import { homedir as homedir11 } from "node:os";
129990
129992
  import { dirname as dirname12, join as join29 } from "node:path";
129991
129993
  function asTrimmedString(value) {
129992
129994
  return typeof value === "string" && value.trim() ? value.trim() : undefined;
@@ -130341,10 +130343,7 @@ function resolveCodexAuthPath(env4 = process.env) {
130341
130343
  const explicit = asTrimmedString(env4.CODEX_AUTH_JSON_PATH);
130342
130344
  if (explicit)
130343
130345
  return explicit;
130344
- const codexHome = asTrimmedString(env4.CODEX_HOME);
130345
- if (codexHome)
130346
- return join29(codexHome, "auth.json");
130347
- return join29(homedir11(), ".codex", "auth.json");
130346
+ return join29(getClaudeConfigHomeDir(), "codex-auth.json");
130348
130347
  }
130349
130348
  function parseChatgptAccountId(token) {
130350
130349
  if (!token)
@@ -130397,6 +130396,24 @@ function getPreferredCodexOauthAccount(accounts) {
130397
130396
  return rightAddedAt - leftAddedAt;
130398
130397
  })[0];
130399
130398
  }
130399
+ function getCodexRefreshCandidates(options) {
130400
+ const candidates = [];
130401
+ const seen = new Set;
130402
+ const pushCandidate = (refreshToken, source, account) => {
130403
+ const trimmed = asTrimmedString(refreshToken);
130404
+ if (!trimmed || seen.has(trimmed))
130405
+ return;
130406
+ seen.add(trimmed);
130407
+ candidates.push({
130408
+ refreshToken: trimmed,
130409
+ source,
130410
+ account
130411
+ });
130412
+ };
130413
+ pushCandidate(options.preferredAccount?.refreshToken, "accounts", options.preferredAccount);
130414
+ pushCandidate(options.authJsonRefreshToken, "auth.json");
130415
+ return candidates;
130416
+ }
130400
130417
  function getJwtExpiryTimeMs(token) {
130401
130418
  if (!token)
130402
130419
  return;
@@ -130550,12 +130567,15 @@ async function resolveCodexApiCredentialsForRequest(env4 = process.env) {
130550
130567
  };
130551
130568
  }
130552
130569
  const preferredAccount = getPreferredCodexOauthAccount(loadAccounts().accounts);
130553
- const refreshToken = authJsonRefreshToken ?? asTrimmedString(preferredAccount?.refreshToken);
130554
- if (refreshToken) {
130555
- const refreshed2 = await refreshCodexAccessToken(refreshToken);
130570
+ const refreshCandidates = getCodexRefreshCandidates({
130571
+ authJsonRefreshToken,
130572
+ preferredAccount
130573
+ });
130574
+ for (const candidate of refreshCandidates) {
130575
+ const refreshed2 = await refreshCodexAccessToken(candidate.refreshToken);
130556
130576
  if (refreshed2?.accessToken) {
130557
130577
  const refreshedAccountId = envAccountId ?? parseChatgptAccountId(refreshed2.accessToken) ?? authJsonAccountId;
130558
- const rotatedRefreshToken = refreshed2.refreshToken ?? refreshToken;
130578
+ const rotatedRefreshToken = refreshed2.refreshToken ?? candidate.refreshToken;
130559
130579
  persistCodexAuthJson({
130560
130580
  authPath,
130561
130581
  existing: authJson,
@@ -130563,8 +130583,8 @@ async function resolveCodexApiCredentialsForRequest(env4 = process.env) {
130563
130583
  accountId: refreshedAccountId,
130564
130584
  refreshToken: rotatedRefreshToken
130565
130585
  });
130566
- if (preferredAccount?.id && rotatedRefreshToken !== preferredAccount.refreshToken) {
130567
- updateAccount(preferredAccount.id, {
130586
+ if (candidate.account?.id && rotatedRefreshToken !== candidate.account.refreshToken) {
130587
+ updateAccount(candidate.account.id, {
130568
130588
  refreshToken: rotatedRefreshToken
130569
130589
  });
130570
130590
  }
@@ -130573,8 +130593,8 @@ async function resolveCodexApiCredentialsForRequest(env4 = process.env) {
130573
130593
  accountId: refreshedAccountId,
130574
130594
  authPath,
130575
130595
  refreshToken: rotatedRefreshToken,
130576
- accountRecordId: preferredAccount?.id,
130577
- source: authJsonRefreshToken ? "auth.json" : "accounts"
130596
+ accountRecordId: candidate.account?.id,
130597
+ source: candidate.source
130578
130598
  };
130579
130599
  }
130580
130600
  }
@@ -130591,7 +130611,7 @@ async function resolveCodexApiCredentialsForRequest(env4 = process.env) {
130591
130611
  apiKey: "",
130592
130612
  accountId: authJsonAccountId ?? envAccountId,
130593
130613
  authPath,
130594
- refreshToken,
130614
+ refreshToken: refreshCandidates[0]?.refreshToken ?? authJsonRefreshToken,
130595
130615
  accountRecordId: preferredAccount?.id,
130596
130616
  source: "none"
130597
130617
  };
@@ -130600,6 +130620,7 @@ var DEFAULT_OPENAI_BASE_URL = "https://api.openai.com/v1", DEFAULT_CODEX_BASE_UR
130600
130620
  var init_providerConfig = __esm(() => {
130601
130621
  init_accountManager();
130602
130622
  init_antigravityOAuth();
130623
+ init_envUtils();
130603
130624
  init_providerMetadata();
130604
130625
  ANTIGRAVITY_FALLBACK_BASE_URLS = [
130605
130626
  "https://daily-cloudcode-pa.googleapis.com",
@@ -130637,9 +130658,35 @@ var init_providerConfig = __esm(() => {
130637
130658
 
130638
130659
  // src/utils/updateCheck.ts
130639
130660
  import { existsSync as existsSync8, mkdirSync as mkdirSync6, readFileSync as readFileSync10, writeFileSync as writeFileSync5 } from "node:fs";
130661
+ import { createRequire as createRequire2 } from "node:module";
130640
130662
  import { join as join30 } from "node:path";
130663
+ function normalizeVersion(version2) {
130664
+ return version2.replace(/[^0-9.]/g, "").split(".").filter(Boolean).map((part) => Number(part) || 0);
130665
+ }
130666
+ function compareVersions(a2, b) {
130667
+ const av = normalizeVersion(a2);
130668
+ const bv = normalizeVersion(b);
130669
+ const len = Math.max(av.length, bv.length, 3);
130670
+ for (let i2 = 0;i2 < len; i2++) {
130671
+ const ai = av[i2] ?? 0;
130672
+ const bi = bv[i2] ?? 0;
130673
+ if (ai > bi)
130674
+ return 1;
130675
+ if (ai < bi)
130676
+ return -1;
130677
+ }
130678
+ return 0;
130679
+ }
130641
130680
  function getCurrentVersion() {
130642
- return "0.9.1".replace(/[^0-9.]/g, "") || "0.0.0";
130681
+ const displayVersion = (typeof MACRO !== "undefined" ? "0.9.21" : undefined) ?? (() => {
130682
+ try {
130683
+ const pkg = require2("../../package.json");
130684
+ return pkg.version;
130685
+ } catch {
130686
+ return;
130687
+ }
130688
+ })() ?? "0.0.0";
130689
+ return displayVersion.replace(/[^0-9.]/g, "") || "0.0.0";
130643
130690
  }
130644
130691
  function cachePath() {
130645
130692
  return join30(getClaudeConfigHomeDir(), "update-check.json");
@@ -130662,45 +130709,55 @@ function writeUpdateCache(cache2) {
130662
130709
  writeFileSync5(cachePath(), JSON.stringify(cache2));
130663
130710
  } catch {}
130664
130711
  }
130712
+ function isUpdateCacheFresh(cache2, now = Date.now()) {
130713
+ return Boolean(cache2 && now - cache2.checkedAt < CHECK_INTERVAL_MS);
130714
+ }
130715
+ async function fetchLatestVersion(timeoutMs) {
130716
+ try {
130717
+ const res = await fetch(`https://registry.npmjs.org/${PKG_NAME}/latest`, {
130718
+ signal: AbortSignal.timeout(timeoutMs),
130719
+ headers: { Accept: "application/json" }
130720
+ });
130721
+ if (!res.ok)
130722
+ return null;
130723
+ const data = await res.json();
130724
+ return typeof data.version === "string" ? data.version : null;
130725
+ } catch {
130726
+ return null;
130727
+ }
130728
+ }
130665
130729
  function getAvailableUpdate(cache2) {
130666
130730
  if (!cache2)
130667
130731
  return null;
130668
- const cur = getCurrentVersion().split(".").map(Number);
130669
- const lat = cache2.latestVersion.split(".").map(Number);
130670
- for (let i2 = 0;i2 < 3; i2++) {
130671
- const c5 = cur[i2] ?? 0;
130672
- const l = lat[i2] ?? 0;
130673
- if (l > c5)
130674
- return cache2.latestVersion;
130675
- if (c5 > l)
130676
- return null;
130677
- }
130678
- return null;
130732
+ return compareVersions(cache2.latestVersion, getCurrentVersion()) > 0 ? cache2.latestVersion : null;
130679
130733
  }
130680
- function checkForUpdateInBackground() {
130734
+ async function refreshUpdateCache(options) {
130681
130735
  const cache2 = readUpdateCache();
130682
- const now = Date.now();
130683
- if (cache2 && now - cache2.checkedAt < CHECK_INTERVAL_MS)
130684
- return;
130685
- (async () => {
130686
- try {
130687
- const res = await fetch(`https://registry.npmjs.org/${PKG_NAME}/latest`, {
130688
- signal: AbortSignal.timeout(5000),
130689
- headers: { Accept: "application/json" }
130690
- });
130691
- if (!res.ok)
130692
- return;
130693
- const data = await res.json();
130694
- if (typeof data.version === "string") {
130695
- writeUpdateCache({ latestVersion: data.version, checkedAt: Date.now() });
130696
- }
130697
- } catch {}
130698
- })();
130736
+ const currentVersion = getCurrentVersion();
130737
+ const canReuseFreshCache = isUpdateCacheFresh(cache2) && (!cache2 || compareVersions(cache2.latestVersion, currentVersion) >= 0);
130738
+ if (!options?.force && canReuseFreshCache) {
130739
+ return cache2;
130740
+ }
130741
+ const latestVersion = await fetchLatestVersion(options?.timeoutMs ?? 5000);
130742
+ if (!latestVersion) {
130743
+ return cache2;
130744
+ }
130745
+ const nextCache = {
130746
+ latestVersion,
130747
+ checkedAt: Date.now()
130748
+ };
130749
+ writeUpdateCache(nextCache);
130750
+ return nextCache;
130751
+ }
130752
+ async function getAvailableUpdateWithRefresh(options) {
130753
+ const cache2 = await refreshUpdateCache(options);
130754
+ return getAvailableUpdate(cache2);
130699
130755
  }
130700
- var PKG_NAME = "snowcode", CHECK_INTERVAL_MS;
130756
+ var PKG_NAME = "snowcode", CHECK_INTERVAL_MS, require2;
130701
130757
  var init_updateCheck = __esm(() => {
130702
130758
  init_envUtils();
130703
130759
  CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000;
130760
+ require2 = createRequire2(import.meta.url);
130704
130761
  });
130705
130762
 
130706
130763
  // src/components/StartupScreen.ts
@@ -130801,7 +130858,7 @@ function boxRow(content, width, rawLen) {
130801
130858
  const pad = Math.max(0, width - 2 - rawLen);
130802
130859
  return `${rgb(...BORDER)}│${RESET}${content}${" ".repeat(pad)}${rgb(...BORDER)}│${RESET}`;
130803
130860
  }
130804
- function printStartupScreen() {
130861
+ async function printStartupScreen() {
130805
130862
  if (process.env.CI || !process.stdout.isTTY)
130806
130863
  return;
130807
130864
  const p = detectProvider();
@@ -130836,9 +130893,8 @@ function printStartupScreen() {
130836
130893
  const sLen = ` ● ${sL} Ready — type /help to begin`.length;
130837
130894
  out.push(boxRow(sRow, W2, sLen));
130838
130895
  out.push(`${rgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET}`);
130839
- const _ver = "0.9.1";
130840
- checkForUpdateInBackground();
130841
- const _update = getAvailableUpdate(readUpdateCache());
130896
+ const _ver = "0.9.21";
130897
+ const _update = await getAvailableUpdateWithRefresh({ timeoutMs: 1200 });
130842
130898
  out.push(` ${DIM}${rgb(...DIMCOL)}snowcode v${_ver}${RESET}`);
130843
130899
  if (_update) {
130844
130900
  out.push(` ${rgb(...ACCENT)}★ Update available v${_update} → /update${RESET}`);
@@ -171910,7 +171966,7 @@ var init_frontmatterParser = __esm(() => {
171910
171966
 
171911
171967
  // src/utils/ripgrep.ts
171912
171968
  import { execFile as execFile3, spawn as spawn2 } from "child_process";
171913
- import { homedir as homedir12 } from "os";
171969
+ import { homedir as homedir11 } from "os";
171914
171970
  import * as path11 from "path";
171915
171971
  import { fileURLToPath as fileURLToPath3 } from "url";
171916
171972
  function ripgrepCommand() {
@@ -172181,7 +172237,7 @@ var init_ripgrep = __esm(() => {
172181
172237
  }
172182
172238
  };
172183
172239
  countFilesRoundedRg = memoize_default(async (dirPath, abortSignal, ignorePatterns = []) => {
172184
- if (path11.resolve(dirPath) === path11.resolve(homedir12())) {
172240
+ if (path11.resolve(dirPath) === path11.resolve(homedir11())) {
172185
172241
  return;
172186
172242
  }
172187
172243
  try {
@@ -172275,7 +172331,7 @@ var init_pluginOnlyPolicy = __esm(() => {
172275
172331
  // src/utils/markdownConfigLoader.ts
172276
172332
  import { statSync as statSync4 } from "fs";
172277
172333
  import { lstat as lstat3, readdir as readdir7, readFile as readFile7, realpath as realpath5, stat as stat13 } from "fs/promises";
172278
- import { homedir as homedir13 } from "os";
172334
+ import { homedir as homedir12 } from "os";
172279
172335
  import { dirname as dirname17, join as join34, resolve as resolve13, sep as sep6 } from "path";
172280
172336
  function extractDescriptionFromMarkdown(content, defaultDescription = "Custom item") {
172281
172337
  const lines = content.split(`
@@ -172358,7 +172414,7 @@ function resolveStopBoundary(cwd2) {
172358
172414
  return cwdGitRoot;
172359
172415
  }
172360
172416
  function getProjectDirsUpToHome(subdir, cwd2) {
172361
- const home = resolve13(homedir13()).normalize("NFC");
172417
+ const home = resolve13(homedir12()).normalize("NFC");
172362
172418
  const gitRoot = resolveStopBoundary(cwd2);
172363
172419
  let current = resolve13(cwd2);
172364
172420
  const dirs = [];
@@ -174919,7 +174975,7 @@ var init_readOnlyCommandValidation = __esm(() => {
174919
174975
  });
174920
174976
 
174921
174977
  // src/utils/permissions/pathValidation.ts
174922
- import { homedir as homedir14 } from "os";
174978
+ import { homedir as homedir13 } from "os";
174923
174979
  import { dirname as dirname18, isAbsolute as isAbsolute6, resolve as resolve15 } from "path";
174924
174980
  function formatDirectoryList(directories) {
174925
174981
  const dirCount = directories.length;
@@ -174942,7 +174998,7 @@ function getGlobBaseDirectory(path12) {
174942
174998
  }
174943
174999
  function expandTilde(path12) {
174944
175000
  if (path12 === "~" || path12.startsWith("~/") || process.platform === "win32" && path12.startsWith("~\\")) {
174945
- return homedir14() + path12.slice(1);
175001
+ return homedir13() + path12.slice(1);
174946
175002
  }
174947
175003
  return path12;
174948
175004
  }
@@ -175059,7 +175115,7 @@ function isDangerousRemovalPath(resolvedPath) {
175059
175115
  if (WINDOWS_DRIVE_ROOT_REGEX.test(normalizedPath)) {
175060
175116
  return true;
175061
175117
  }
175062
- const normalizedHome = homedir14().replace(/[\\/]+/g, "/");
175118
+ const normalizedHome = homedir13().replace(/[\\/]+/g, "/");
175063
175119
  if (normalizedPath === normalizedHome) {
175064
175120
  return true;
175065
175121
  }
@@ -175759,7 +175815,7 @@ __export(exports_esm, {
175759
175815
  AsyncDecompress: () => AsyncDecompress,
175760
175816
  AsyncCompress: () => AsyncGzip
175761
175817
  });
175762
- import { createRequire as createRequire2 } from "module";
175818
+ import { createRequire as createRequire3 } from "module";
175763
175819
  function StrmOpt(opts, cb) {
175764
175820
  if (typeof opts == "function")
175765
175821
  cb = opts, opts = {};
@@ -176196,7 +176252,7 @@ function unzipSync(data, opts) {
176196
176252
  }
176197
176253
  return files;
176198
176254
  }
176199
- var require2, Worker, workerAdd = ";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global", wk, u8, u16, i32, fleb, fdeb, clim, freb = function(eb, start) {
176255
+ var require3, Worker, workerAdd = ";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global", wk, u8, u16, i32, fleb, fdeb, clim, freb = function(eb, start) {
176200
176256
  var b = new u16(31);
176201
176257
  for (var i2 = 0;i2 < 31; ++i2) {
176202
176258
  b[i2] = start += 1 << eb[i2 - 1];
@@ -177014,9 +177070,9 @@ var require2, Worker, workerAdd = ";var __w=require('worker_threads');__w.parent
177014
177070
  wbytes(o2, b + 16, e);
177015
177071
  }, ZipPassThrough, ZipDeflate, AsyncZipDeflate, Zip, UnzipPassThrough, UnzipInflate, AsyncUnzipInflate, Unzip, mt;
177016
177072
  var init_esm4 = __esm(() => {
177017
- require2 = createRequire2("/");
177073
+ require3 = createRequire3("/");
177018
177074
  try {
177019
- Worker = require2("worker_threads").Worker;
177075
+ Worker = require3("worker_threads").Worker;
177020
177076
  } catch (e) {}
177021
177077
  wk = Worker ? function(c6, _, msg, transfer, cb) {
177022
177078
  var done = false;
@@ -178006,11 +178062,11 @@ var init_zip = __esm(() => {
178006
178062
  });
178007
178063
 
178008
178064
  // src/utils/systemDirectories.ts
178009
- import { homedir as homedir15 } from "os";
178065
+ import { homedir as homedir14 } from "os";
178010
178066
  import { join as join38 } from "path";
178011
178067
  function getSystemDirectories(options) {
178012
178068
  const platform2 = options?.platform ?? getPlatform();
178013
- const homeDir = options?.homedir ?? homedir15();
178069
+ const homeDir = options?.homedir ?? homedir14();
178014
178070
  const env4 = options?.env ?? process.env;
178015
178071
  const defaults2 = {
178016
178072
  HOME: homeDir,
@@ -236952,7 +237008,7 @@ var init_sedValidation = __esm(() => {
236952
237008
  });
236953
237009
 
236954
237010
  // src/tools/BashTool/pathValidation.ts
236955
- import { homedir as homedir16 } from "os";
237011
+ import { homedir as homedir15 } from "os";
236956
237012
  import { isAbsolute as isAbsolute10, resolve as resolve16 } from "path";
236957
237013
  function checkDangerousRemovalPaths(command, args, cwd2) {
236958
237014
  const extractor = PATH_EXTRACTORS[command];
@@ -237401,7 +237457,7 @@ var init_pathValidation2 = __esm(() => {
237401
237457
  init_bashPermissions();
237402
237458
  init_sedValidation();
237403
237459
  PATH_EXTRACTORS = {
237404
- cd: (args) => args.length === 0 ? [homedir16()] : [args.join(" ")],
237460
+ cd: (args) => args.length === 0 ? [homedir15()] : [args.join(" ")],
237405
237461
  ls: (args) => {
237406
237462
  const paths2 = filterOutFlags(args);
237407
237463
  return paths2.length > 0 ? paths2 : ["."];
@@ -259330,11 +259386,11 @@ var init_oauthPort = __esm(() => {
259330
259386
  // src/utils/claudeInChrome/common.ts
259331
259387
  import { readdirSync as readdirSync3 } from "fs";
259332
259388
  import { stat as stat17 } from "fs/promises";
259333
- import { homedir as homedir17, platform as platform2, tmpdir as tmpdir2, userInfo as userInfo3 } from "os";
259389
+ import { homedir as homedir16, platform as platform2, tmpdir as tmpdir2, userInfo as userInfo3 } from "os";
259334
259390
  import { join as join48 } from "path";
259335
259391
  function getAllBrowserDataPaths() {
259336
259392
  const platform3 = getPlatform();
259337
- const home = homedir17();
259393
+ const home = homedir16();
259338
259394
  const paths2 = [];
259339
259395
  for (const browserId of BROWSER_DETECTION_ORDER) {
259340
259396
  const config2 = CHROMIUM_BROWSERS[browserId];
@@ -259369,7 +259425,7 @@ function getAllBrowserDataPaths() {
259369
259425
  }
259370
259426
  function getAllNativeMessagingHostsDirs() {
259371
259427
  const platform3 = getPlatform();
259372
- const home = homedir17();
259428
+ const home = homedir16();
259373
259429
  const paths2 = [];
259374
259430
  for (const browserId of BROWSER_DETECTION_ORDER) {
259375
259431
  const config2 = CHROMIUM_BROWSERS[browserId];
@@ -259440,7 +259496,7 @@ async function detectAvailableBrowser() {
259440
259496
  break;
259441
259497
  }
259442
259498
  case "windows": {
259443
- const home = homedir17();
259499
+ const home = homedir16();
259444
259500
  if (config2.windows.dataPath.length > 0) {
259445
259501
  const appDataBase = config2.windows.useRoaming ? join48(home, "AppData", "Roaming") : join48(home, "AppData", "Local");
259446
259502
  const dataPath = join48(appDataBase, ...config2.windows.dataPath);
@@ -264344,10 +264400,10 @@ var init_capitalize = __esm(() => {
264344
264400
  });
264345
264401
 
264346
264402
  // src/utils/jetbrains.ts
264347
- import { homedir as homedir18, platform as platform3 } from "os";
264403
+ import { homedir as homedir17, platform as platform3 } from "os";
264348
264404
  import { join as join55 } from "path";
264349
264405
  function buildCommonPluginDirectoryPaths(ideName) {
264350
- const homeDir = homedir18();
264406
+ const homeDir = homedir17();
264351
264407
  const directories = [];
264352
264408
  const idePatterns = ideNameToDirMap[ideName.toLowerCase()];
264353
264409
  if (!idePatterns) {
@@ -283059,7 +283115,7 @@ var init_shellConfig = __esm(() => {
283059
283115
  // src/utils/autoUpdater.ts
283060
283116
  import { constants as fsConstants2 } from "fs";
283061
283117
  import { access as access2, writeFile as writeFile10 } from "fs/promises";
283062
- import { homedir as homedir20 } from "os";
283118
+ import { homedir as homedir19 } from "os";
283063
283119
  import { join as join63 } from "path";
283064
283120
  async function assertMinVersion() {
283065
283121
  if (false) {}
@@ -283196,10 +283252,10 @@ async function getInstallationPrefix() {
283196
283252
  let prefixResult = null;
283197
283253
  if (isBun) {
283198
283254
  prefixResult = await execFileNoThrowWithCwd("bun", ["pm", "bin", "-g"], {
283199
- cwd: homedir20()
283255
+ cwd: homedir19()
283200
283256
  });
283201
283257
  } else {
283202
- prefixResult = await execFileNoThrowWithCwd("npm", ["-g", "config", "get", "prefix"], { cwd: homedir20() });
283258
+ prefixResult = await execFileNoThrowWithCwd("npm", ["-g", "config", "get", "prefix"], { cwd: homedir19() });
283203
283259
  }
283204
283260
  if (prefixResult.code !== 0) {
283205
283261
  logError2(new Error(`Failed to check ${isBun ? "bun" : "npm"} permissions`));
@@ -283227,7 +283283,7 @@ async function checkGlobalInstallPermissions() {
283227
283283
  }
283228
283284
  async function getLatestVersion(channel) {
283229
283285
  const npmTag = channel === "stable" ? "stable" : "latest";
283230
- const result = await execFileNoThrowWithCwd("npm", ["view", `${"snowcode"}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir20() });
283286
+ const result = await execFileNoThrowWithCwd("npm", ["view", `${"snowcode"}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir19() });
283231
283287
  if (result.code !== 0) {
283232
283288
  logForDebugging2(`npm view failed with code ${result.code}`);
283233
283289
  if (result.stderr) {
@@ -283243,7 +283299,7 @@ async function getLatestVersion(channel) {
283243
283299
  return result.stdout.trim();
283244
283300
  }
283245
283301
  async function getNpmDistTags() {
283246
- const result = await execFileNoThrowWithCwd("npm", ["view", "snowcode", "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir20() });
283302
+ const result = await execFileNoThrowWithCwd("npm", ["view", "snowcode", "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir19() });
283247
283303
  if (result.code !== 0) {
283248
283304
  logForDebugging2(`npm view dist-tags failed with code ${result.code}`);
283249
283305
  return { latest: null, stable: null };
@@ -283313,7 +283369,7 @@ To fix this issue:
283313
283369
  }
283314
283370
  const packageSpec = specificVersion ? `${"snowcode"}@${specificVersion}` : "snowcode";
283315
283371
  const packageManager = env2.isRunningWithBun() ? "bun" : "npm";
283316
- const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir20() });
283372
+ const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir19() });
283317
283373
  if (installResult.code !== 0) {
283318
283374
  const error42 = new AutoUpdaterError(`Failed to install new version of claude: ${installResult.stdout} ${installResult.stderr}`);
283319
283375
  logError2(error42);
@@ -283550,7 +283606,7 @@ var init_packageManagers = __esm(() => {
283550
283606
 
283551
283607
  // src/utils/doctorDiagnostic.ts
283552
283608
  import { readFile as readFile13, realpath as realpath6 } from "fs/promises";
283553
- import { homedir as homedir21 } from "os";
283609
+ import { homedir as homedir20 } from "os";
283554
283610
  import { delimiter as delimiter2, join as join64, posix as posix3, win32 } from "path";
283555
283611
  function getNormalizedPaths() {
283556
283612
  let invokedPath = process.argv[1] || "";
@@ -283614,8 +283670,8 @@ async function getInstallationPath() {
283614
283670
  }
283615
283671
  } catch {}
283616
283672
  try {
283617
- await getFsImplementation().stat(join64(homedir21(), ".local/bin/claude"));
283618
- return join64(homedir21(), ".local/bin/claude");
283673
+ await getFsImplementation().stat(join64(homedir20(), ".local/bin/claude"));
283674
+ return join64(homedir20(), ".local/bin/claude");
283619
283675
  } catch {}
283620
283676
  return "native";
283621
283677
  }
@@ -283638,7 +283694,7 @@ function getInvokedBinary() {
283638
283694
  async function detectMultipleInstallations() {
283639
283695
  const fs3 = getFsImplementation();
283640
283696
  const installations = [];
283641
- const localPath = join64(homedir21(), ".claude", "local");
283697
+ const localPath = join64(homedir20(), ".claude", "local");
283642
283698
  if (await localInstallationExists()) {
283643
283699
  installations.push({ type: "npm-local", path: localPath });
283644
283700
  }
@@ -283685,14 +283741,14 @@ async function detectMultipleInstallations() {
283685
283741
  }
283686
283742
  }
283687
283743
  }
283688
- const nativeBinPath = join64(homedir21(), ".local", "bin", "claude");
283744
+ const nativeBinPath = join64(homedir20(), ".local", "bin", "claude");
283689
283745
  try {
283690
283746
  await fs3.stat(nativeBinPath);
283691
283747
  installations.push({ type: "native", path: nativeBinPath });
283692
283748
  } catch {}
283693
283749
  const config2 = getGlobalConfig();
283694
283750
  if (config2.installMethod === "native") {
283695
- const nativeDataPath = join64(homedir21(), ".local", "share", "claude");
283751
+ const nativeDataPath = join64(homedir20(), ".local", "share", "claude");
283696
283752
  try {
283697
283753
  await fs3.stat(nativeDataPath);
283698
283754
  if (!installations.some((i3) => i3.type === "native")) {
@@ -283732,7 +283788,7 @@ async function detectConfigurationIssues(type) {
283732
283788
  if (type === "native") {
283733
283789
  const path12 = process.env.PATH || "";
283734
283790
  const pathDirectories = path12.split(delimiter2);
283735
- const homeDir = homedir21();
283791
+ const homeDir = homedir20();
283736
283792
  const localBinPath = join64(homeDir, ".local", "bin");
283737
283793
  let normalizedLocalBinPath = localBinPath;
283738
283794
  if (getPlatform() === "windows") {
@@ -283759,7 +283815,7 @@ async function detectConfigurationIssues(type) {
283759
283815
  const shellType = getShellType();
283760
283816
  const configPaths = getShellConfigPaths();
283761
283817
  const configFile = configPaths[shellType];
283762
- const displayPath = configFile ? configFile.replace(homedir21(), "~") : "your shell config file";
283818
+ const displayPath = configFile ? configFile.replace(homedir20(), "~") : "your shell config file";
283763
283819
  warnings.push({
283764
283820
  issue: "Native installation exists but ~/.local/bin is not in your PATH",
283765
283821
  fix: `Run: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ${displayPath} then open a new terminal or run: source ${displayPath}`
@@ -284498,7 +284554,7 @@ import {
284498
284554
  unlink as unlink7,
284499
284555
  writeFile as writeFile12
284500
284556
  } from "fs/promises";
284501
- import { homedir as homedir22 } from "os";
284557
+ import { homedir as homedir21 } from "os";
284502
284558
  import { basename as basename14, delimiter as delimiter3, dirname as dirname26, join as join68, resolve as resolve19 } from "path";
284503
284559
  function getPlatform2() {
284504
284560
  const os4 = env2.platform;
@@ -285026,7 +285082,7 @@ async function checkInstall(force = false) {
285026
285082
  const shellType = getShellType();
285027
285083
  const configPaths = getShellConfigPaths();
285028
285084
  const configFile = configPaths[shellType];
285029
- const displayPath = configFile ? configFile.replace(homedir22(), "~") : "your shell config file";
285085
+ const displayPath = configFile ? configFile.replace(homedir21(), "~") : "your shell config file";
285030
285086
  messages.push({
285031
285087
  message: `Native installation exists but ~/.local/bin is not in your PATH. Run:
285032
285088
 
@@ -285527,7 +285583,7 @@ async function cleanupNpmInstallations() {
285527
285583
  errors4.push(macroPackageResult.error);
285528
285584
  }
285529
285585
  }
285530
- const localInstallDir = join68(homedir22(), ".claude", "local");
285586
+ const localInstallDir = join68(homedir21(), ".claude", "local");
285531
285587
  try {
285532
285588
  await rm3(localInstallDir, { recursive: true });
285533
285589
  removed++;
@@ -291836,7 +291892,7 @@ var init_InProcessBackend = __esm(() => {
291836
291892
  });
291837
291893
 
291838
291894
  // src/utils/swarm/backends/it2Setup.ts
291839
- import { homedir as homedir23 } from "os";
291895
+ import { homedir as homedir22 } from "os";
291840
291896
  async function detectPythonPackageManager() {
291841
291897
  const uvResult = await execFileNoThrow("which", ["uv"]);
291842
291898
  if (uvResult.code === 0) {
@@ -291871,18 +291927,18 @@ async function installIt2(packageManager) {
291871
291927
  switch (packageManager) {
291872
291928
  case "uvx":
291873
291929
  result = await execFileNoThrowWithCwd("uv", ["tool", "install", "it2"], {
291874
- cwd: homedir23()
291930
+ cwd: homedir22()
291875
291931
  });
291876
291932
  break;
291877
291933
  case "pipx":
291878
291934
  result = await execFileNoThrowWithCwd("pipx", ["install", "it2"], {
291879
- cwd: homedir23()
291935
+ cwd: homedir22()
291880
291936
  });
291881
291937
  break;
291882
291938
  case "pip":
291883
- result = await execFileNoThrowWithCwd("pip", ["install", "--user", "it2"], { cwd: homedir23() });
291939
+ result = await execFileNoThrowWithCwd("pip", ["install", "--user", "it2"], { cwd: homedir22() });
291884
291940
  if (result.code !== 0) {
291885
- result = await execFileNoThrowWithCwd("pip3", ["install", "--user", "it2"], { cwd: homedir23() });
291941
+ result = await execFileNoThrowWithCwd("pip3", ["install", "--user", "it2"], { cwd: homedir22() });
291886
291942
  }
291887
291943
  break;
291888
291944
  }
@@ -294876,14 +294932,6 @@ function ConsoleOAuthFlow({
294876
294932
  context: "Confirmation",
294877
294933
  isActive: oauthStatus.state === "success" && mode !== "setup-token"
294878
294934
  });
294879
- useKeybinding("confirm:yes", () => {
294880
- setOAuthStatus({
294881
- state: "idle"
294882
- });
294883
- }, {
294884
- context: "Confirmation",
294885
- isActive: oauthStatus.state === "platform_setup"
294886
- });
294887
294935
  useKeybinding("confirm:yes", () => {
294888
294936
  if (oauthStatus.state === "error" && oauthStatus.toRetry) {
294889
294937
  setPastedCode("");
@@ -295081,7 +295129,7 @@ function ConsoleOAuthFlow({
295081
295129
  children: [
295082
295130
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295083
295131
  color: "success",
295084
- children: "Long-lived authentication token created successfully!"
295132
+ children: "Long-lived authentication token created successfully!"
295085
295133
  }, undefined, false, undefined, this),
295086
295134
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
295087
295135
  flexDirection: "column",
@@ -295214,21 +295262,7 @@ function OAuthStatusMessage(t0) {
295214
295262
  }
295215
295263
  let t6;
295216
295264
  if ($2[5] === Symbol.for("react.memo_cache_sentinel")) {
295217
- t6 = [t4, t5, {
295218
- label: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295219
- children: [
295220
- "3rd-party platform ·",
295221
- " ",
295222
- /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295223
- dimColor: true,
295224
- children: "OpenAI, Gemini, Bedrock, Ollama, and more"
295225
- }, undefined, false, undefined, this),
295226
- `
295227
- `
295228
- ]
295229
- }, undefined, true, undefined, this),
295230
- value: "platform"
295231
- }];
295265
+ t6 = [t4, t5];
295232
295266
  $2[5] = t6;
295233
295267
  } else {
295234
295268
  t6 = $2[5];
@@ -295239,22 +295273,15 @@ function OAuthStatusMessage(t0) {
295239
295273
  children: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(Select, {
295240
295274
  options: t6,
295241
295275
  onChange: (value_0) => {
295242
- if (value_0 === "platform") {
295243
- logEvent("tengu_oauth_platform_selected", {});
295244
- setOAuthStatus({
295245
- state: "platform_setup"
295246
- });
295276
+ setOAuthStatus({
295277
+ state: "ready_to_start"
295278
+ });
295279
+ if (value_0 === "claudeai") {
295280
+ logEvent("tengu_oauth_claudeai_selected", {});
295281
+ setLoginWithClaudeAi(true);
295247
295282
  } else {
295248
- setOAuthStatus({
295249
- state: "ready_to_start"
295250
- });
295251
- if (value_0 === "claudeai") {
295252
- logEvent("tengu_oauth_claudeai_selected", {});
295253
- setLoginWithClaudeAi(true);
295254
- } else {
295255
- logEvent("tengu_oauth_console_selected", {});
295256
- setLoginWithClaudeAi(false);
295257
- }
295283
+ logEvent("tengu_oauth_console_selected", {});
295284
+ setLoginWithClaudeAi(false);
295258
295285
  }
295259
295286
  }
295260
295287
  }, undefined, false, undefined, this)
@@ -295285,156 +295312,6 @@ function OAuthStatusMessage(t0) {
295285
295312
  }
295286
295313
  return t8;
295287
295314
  }
295288
- case "platform_setup": {
295289
- let t1;
295290
- if ($2[12] === Symbol.for("react.memo_cache_sentinel")) {
295291
- t1 = /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295292
- bold: true,
295293
- children: "Using 3rd-party platforms"
295294
- }, undefined, false, undefined, this);
295295
- $2[12] = t1;
295296
- } else {
295297
- t1 = $2[12];
295298
- }
295299
- let t2;
295300
- let t3;
295301
- if ($2[13] === Symbol.for("react.memo_cache_sentinel")) {
295302
- t2 = /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295303
- children: "SnowCode supports OpenAI-compatible providers (GPT-4o, DeepSeek, Ollama, Groq), Google Gemini, Amazon Bedrock, Microsoft Foundry, and Vertex AI. Set the required environment variables, then restart SnowCode."
295304
- }, undefined, false, undefined, this);
295305
- t3 = /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295306
- children: "If you are part of an enterprise organization, contact your administrator for setup instructions."
295307
- }, undefined, false, undefined, this);
295308
- $2[13] = t2;
295309
- $2[14] = t3;
295310
- } else {
295311
- t2 = $2[13];
295312
- t3 = $2[14];
295313
- }
295314
- let t4;
295315
- if ($2[15] === Symbol.for("react.memo_cache_sentinel")) {
295316
- t4 = /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295317
- bold: true,
295318
- children: "Documentation:"
295319
- }, undefined, false, undefined, this);
295320
- $2[15] = t4;
295321
- } else {
295322
- t4 = $2[15];
295323
- }
295324
- let t5;
295325
- if ($2[16] === Symbol.for("react.memo_cache_sentinel")) {
295326
- t5 = /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295327
- children: [
295328
- "· Amazon Bedrock:",
295329
- " ",
295330
- /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(Link, {
295331
- url: "https://code.claude.com/docs/en/amazon-bedrock",
295332
- children: "https://code.claude.com/docs/en/amazon-bedrock"
295333
- }, undefined, false, undefined, this)
295334
- ]
295335
- }, undefined, true, undefined, this);
295336
- $2[16] = t5;
295337
- } else {
295338
- t5 = $2[16];
295339
- }
295340
- let t6;
295341
- if ($2[17] === Symbol.for("react.memo_cache_sentinel")) {
295342
- t6 = /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295343
- children: [
295344
- "· Microsoft Foundry:",
295345
- " ",
295346
- /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(Link, {
295347
- url: "https://code.claude.com/docs/en/microsoft-foundry",
295348
- children: "https://code.claude.com/docs/en/microsoft-foundry"
295349
- }, undefined, false, undefined, this)
295350
- ]
295351
- }, undefined, true, undefined, this);
295352
- $2[17] = t6;
295353
- } else {
295354
- t6 = $2[17];
295355
- }
295356
- let t7;
295357
- if ($2[18] === Symbol.for("react.memo_cache_sentinel")) {
295358
- t7 = /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
295359
- flexDirection: "column",
295360
- marginTop: 1,
295361
- children: [
295362
- t4,
295363
- /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295364
- children: [
295365
- "· OpenAI / any OpenAI-compatible provider (GPT-4o, DeepSeek, Ollama, Groq):",
295366
- `
295367
- `,
295368
- " ",
295369
- "CLAUDE_CODE_USE_OPENAI=1 OPENAI_API_KEY=sk-... OPENAI_MODEL=gpt-4o"
295370
- ]
295371
- }, undefined, true, undefined, this),
295372
- /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295373
- children: [
295374
- "· Google Gemini (free key at https://aistudio.google.com/apikey):",
295375
- `
295376
- `,
295377
- " ",
295378
- "CLAUDE_CODE_USE_GEMINI=1 GEMINI_API_KEY=your-key"
295379
- ]
295380
- }, undefined, true, undefined, this),
295381
- t5,
295382
- t6,
295383
- /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295384
- children: [
295385
- "· Vertex AI:",
295386
- " ",
295387
- /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(Link, {
295388
- url: "https://code.claude.com/docs/en/google-vertex-ai",
295389
- children: "https://code.claude.com/docs/en/google-vertex-ai"
295390
- }, undefined, false, undefined, this)
295391
- ]
295392
- }, undefined, true, undefined, this)
295393
- ]
295394
- }, undefined, true, undefined, this);
295395
- $2[18] = t7;
295396
- } else {
295397
- t7 = $2[18];
295398
- }
295399
- let t8;
295400
- if ($2[19] === Symbol.for("react.memo_cache_sentinel")) {
295401
- t8 = /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
295402
- flexDirection: "column",
295403
- gap: 1,
295404
- marginTop: 1,
295405
- children: [
295406
- t1,
295407
- /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
295408
- flexDirection: "column",
295409
- gap: 1,
295410
- children: [
295411
- t2,
295412
- t3,
295413
- t7,
295414
- /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
295415
- marginTop: 1,
295416
- children: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295417
- dimColor: true,
295418
- children: [
295419
- "Press ",
295420
- /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295421
- bold: true,
295422
- children: "Enter"
295423
- }, undefined, false, undefined, this),
295424
- " to go back to login options."
295425
- ]
295426
- }, undefined, true, undefined, this)
295427
- }, undefined, false, undefined, this)
295428
- ]
295429
- }, undefined, true, undefined, this)
295430
- ]
295431
- }, undefined, true, undefined, this);
295432
- $2[19] = t8;
295433
- } else {
295434
- t8 = $2[19];
295435
- }
295436
- return t8;
295437
- }
295438
295315
  case "waiting_for_login": {
295439
295316
  let t1;
295440
295317
  if ($2[20] !== forcedMethodMessage) {
@@ -295455,7 +295332,7 @@ function OAuthStatusMessage(t0) {
295455
295332
  children: [
295456
295333
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(Spinner, {}, undefined, false, undefined, this),
295457
295334
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295458
- children: "Opening browser to sign in"
295335
+ children: "Opening browser to sign in..."
295459
295336
  }, undefined, false, undefined, this)
295460
295337
  ]
295461
295338
  }, undefined, true, undefined, this);
@@ -295524,7 +295401,7 @@ function OAuthStatusMessage(t0) {
295524
295401
  children: [
295525
295402
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(Spinner, {}, undefined, false, undefined, this),
295526
295403
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295527
- children: "Creating API key for Claude Code"
295404
+ children: "Creating API key for Claude Code..."
295528
295405
  }, undefined, false, undefined, this)
295529
295406
  ]
295530
295407
  }, undefined, true, undefined, this)
@@ -295543,7 +295420,7 @@ function OAuthStatusMessage(t0) {
295543
295420
  gap: 1,
295544
295421
  children: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295545
295422
  color: "permission",
295546
- children: "Retrying"
295423
+ children: "Retrying..."
295547
295424
  }, undefined, false, undefined, this)
295548
295425
  }, undefined, false, undefined, this);
295549
295426
  $2[38] = t1;
@@ -295575,7 +295452,7 @@ function OAuthStatusMessage(t0) {
295575
295452
  bold: true,
295576
295453
  children: "Enter"
295577
295454
  }, undefined, false, undefined, this),
295578
- " to continue"
295455
+ " to continue..."
295579
295456
  ]
295580
295457
  }, undefined, true, undefined, this)
295581
295458
  ]
@@ -323099,7 +322976,7 @@ var init_modeValidation = __esm(() => {
323099
322976
  });
323100
322977
 
323101
322978
  // src/tools/PowerShellTool/pathValidation.ts
323102
- import { homedir as homedir25 } from "os";
322979
+ import { homedir as homedir24 } from "os";
323103
322980
  import { isAbsolute as isAbsolute16, resolve as resolve25 } from "path";
323104
322981
  function matchesParam(paramLower, paramList) {
323105
322982
  for (const p of paramList) {
@@ -323122,7 +322999,7 @@ function formatDirectoryList2(directories) {
323122
322999
  }
323123
323000
  function expandTilde2(filePath) {
323124
323001
  if (filePath === "~" || filePath.startsWith("~/") || filePath.startsWith("~\\")) {
323125
- return homedir25() + filePath.slice(1);
323002
+ return homedir24() + filePath.slice(1);
323126
323003
  }
323127
323004
  return filePath;
323128
323005
  }
@@ -371074,7 +370951,7 @@ function getAnthropicEnvMetadata() {
371074
370951
  function getBuildAgeMinutes() {
371075
370952
  if (false)
371076
370953
  ;
371077
- const buildTime = new Date("2026-04-05T03:08:12.888Z").getTime();
370954
+ const buildTime = new Date("2026-04-05T03:49:47.637Z").getTime();
371078
370955
  if (isNaN(buildTime))
371079
370956
  return;
371080
370957
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -386961,7 +386838,7 @@ var init_messages3 = __esm(() => {
386961
386838
 
386962
386839
  // src/services/api/errors.ts
386963
386840
  function startsWithApiErrorPrefix(text) {
386964
- return text.startsWith(API_ERROR_MESSAGE_PREFIX) || text.startsWith(`Please run /login · ${API_ERROR_MESSAGE_PREFIX}`);
386841
+ return text.startsWith(API_ERROR_MESSAGE_PREFIX) || text.startsWith(`Please run /auth - ${API_ERROR_MESSAGE_PREFIX}`) || text.startsWith(`Please run /login - ${API_ERROR_MESSAGE_PREFIX}`);
386965
386842
  }
386966
386843
  function isPromptTooLongMessage(msg) {
386967
386844
  if (!msg.isApiErrorMessage) {
@@ -387205,7 +387082,7 @@ function getAssistantMessageFromError(error42, model, options2) {
387205
387082
  if (error42.message.includes("Extra usage is required for long context")) {
387206
387083
  const hint = getIsNonInteractiveSession() ? "enable extra usage at claude.ai/settings/usage, or use --model to switch to standard context" : "run /extra-usage to enable, or /model to switch to standard context";
387207
387084
  return createAssistantAPIErrorMessage({
387208
- content: `${API_ERROR_MESSAGE_PREFIX}: Extra usage is required for 1M context · ${hint}`,
387085
+ content: `${API_ERROR_MESSAGE_PREFIX}: Extra usage is required for 1M context - ${hint}`,
387209
387086
  error: "rate_limit"
387210
387087
  });
387211
387088
  }
@@ -387213,7 +387090,7 @@ function getAssistantMessageFromError(error42, model, options2) {
387213
387090
  const innerMessage = stripped.match(/"message"\s*:\s*"([^"]*)"/)?.[1];
387214
387091
  const detail = innerMessage || stripped;
387215
387092
  return createAssistantAPIErrorMessage({
387216
- content: `${API_ERROR_MESSAGE_PREFIX}: Request rejected (429) · ${detail || "this may be a temporary capacity issue check status.anthropic.com"}`,
387093
+ content: `${API_ERROR_MESSAGE_PREFIX}: Request rejected (429) - ${detail || "this may be a temporary capacity issue - check status.anthropic.com"}`,
387217
387094
  error: "rate_limit"
387218
387095
  });
387219
387096
  }
@@ -387308,7 +387185,7 @@ Run /share and post the JSON file to ${MACRO.FEEDBACK_CHANNEL}.`;
387308
387185
  }
387309
387186
  if (isClaudeAISubscriber() && error42 instanceof import_sdk11.APIError && error42.status === 400 && error42.message.toLowerCase().includes("invalid model name") && (isNonCustomOpusModel(model) || model === "opus")) {
387310
387187
  return createAssistantAPIErrorMessage({
387311
- content: "Claude Opus is not available with the Claude Pro plan. If you have updated your subscription plan recently, run /logout and /login for the plan to take effect.",
387188
+ content: "Claude Opus is not available with the Claude Pro plan. If you have updated your subscription plan recently, run /logout and /auth for the plan to take effect.",
387312
387189
  error: "invalid_request"
387313
387190
  });
387314
387191
  }
@@ -387372,7 +387249,7 @@ Run /share and post the JSON file to ${MACRO.FEEDBACK_CHANNEL}.`;
387372
387249
  }
387373
387250
  return createAssistantAPIErrorMessage({
387374
387251
  error: "authentication_failed",
387375
- content: getIsNonInteractiveSession() ? `Failed to authenticate. ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}` : `Please run /login · ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}`
387252
+ content: getIsNonInteractiveSession() ? `Failed to authenticate. ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}` : `Please run /auth - ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}`
387376
387253
  });
387377
387254
  }
387378
387255
  if (isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) && error42 instanceof Error && error42.message.toLowerCase().includes("model id")) {
@@ -387531,7 +387408,7 @@ function getErrorMessageIfRefusal(stopReason, model) {
387531
387408
  error: "invalid_request"
387532
387409
  });
387533
387410
  }
387534
- var import_sdk11, API_ERROR_MESSAGE_PREFIX = "API Error", PROMPT_TOO_LONG_ERROR_MESSAGE = "Prompt is too long", CREDIT_BALANCE_TOO_LOW_ERROR_MESSAGE = "Credit balance is too low", INVALID_API_KEY_ERROR_MESSAGE = "Not logged in · Please run /login", INVALID_API_KEY_ERROR_MESSAGE_EXTERNAL = "Invalid API key · Fix external API key", ORG_DISABLED_ERROR_MESSAGE_ENV_KEY_WITH_OAUTH = "Your ANTHROPIC_API_KEY belongs to a disabled organization · Unset the environment variable to use your subscription instead", ORG_DISABLED_ERROR_MESSAGE_ENV_KEY = "Your ANTHROPIC_API_KEY belongs to a disabled organization · Update or unset the environment variable", TOKEN_REVOKED_ERROR_MESSAGE = "OAuth token revoked · Please run /login", CCR_AUTH_ERROR_MESSAGE = "Authentication error · This may be a temporary network issue, please try again", REPEATED_529_ERROR_MESSAGE = "Repeated 529 Overloaded errors", CUSTOM_OFF_SWITCH_MESSAGE = "Opus is experiencing high load, please use /model to switch to Sonnet", API_TIMEOUT_ERROR_MESSAGE = "Request timed out", OAUTH_ORG_NOT_ALLOWED_ERROR_MESSAGE = "Your account does not have access to Claude Code. Please run /login.";
387411
+ var import_sdk11, API_ERROR_MESSAGE_PREFIX = "API Error", PROMPT_TOO_LONG_ERROR_MESSAGE = "Prompt is too long", CREDIT_BALANCE_TOO_LOW_ERROR_MESSAGE = "Credit balance is too low", INVALID_API_KEY_ERROR_MESSAGE = "Not logged in - Please run /auth", INVALID_API_KEY_ERROR_MESSAGE_EXTERNAL = "Invalid API key · Fix external API key", ORG_DISABLED_ERROR_MESSAGE_ENV_KEY_WITH_OAUTH = "Your ANTHROPIC_API_KEY belongs to a disabled organization · Unset the environment variable to use your subscription instead", ORG_DISABLED_ERROR_MESSAGE_ENV_KEY = "Your ANTHROPIC_API_KEY belongs to a disabled organization · Update or unset the environment variable", TOKEN_REVOKED_ERROR_MESSAGE = "OAuth token revoked - Please run /auth", CCR_AUTH_ERROR_MESSAGE = "Authentication error · This may be a temporary network issue, please try again", REPEATED_529_ERROR_MESSAGE = "Repeated 529 Overloaded errors", CUSTOM_OFF_SWITCH_MESSAGE = "Opus is experiencing high load, please use /model to switch to Sonnet", API_TIMEOUT_ERROR_MESSAGE = "Request timed out", OAUTH_ORG_NOT_ALLOWED_ERROR_MESSAGE = "Your account does not have access to Claude Code. Please run /auth.";
387535
387412
  var init_errors6 = __esm(() => {
387536
387413
  init_betas();
387537
387414
  init_auth2();
@@ -390130,7 +390007,7 @@ var init_projectOnboardingState = __esm(() => {
390130
390007
 
390131
390008
  // src/utils/appleTerminalBackup.ts
390132
390009
  import { stat as stat35 } from "fs/promises";
390133
- import { homedir as homedir26 } from "os";
390010
+ import { homedir as homedir25 } from "os";
390134
390011
  import { join as join103 } from "path";
390135
390012
  function markTerminalSetupInProgress(backupPath) {
390136
390013
  saveGlobalConfig((current) => ({
@@ -390153,7 +390030,7 @@ function getTerminalRecoveryInfo() {
390153
390030
  };
390154
390031
  }
390155
390032
  function getTerminalPlistPath() {
390156
- return join103(homedir26(), "Library", "Preferences", "com.apple.Terminal.plist");
390033
+ return join103(homedir25(), "Library", "Preferences", "com.apple.Terminal.plist");
390157
390034
  }
390158
390035
  async function backupTerminalPreferences() {
390159
390036
  const terminalPlistPath = getTerminalPlistPath();
@@ -390224,11 +390101,11 @@ var init_appleTerminalBackup = __esm(() => {
390224
390101
  });
390225
390102
 
390226
390103
  // src/utils/completionCache.ts
390227
- import { homedir as homedir27 } from "os";
390104
+ import { homedir as homedir26 } from "os";
390228
390105
  import { dirname as dirname44, join as join104 } from "path";
390229
390106
  function detectShell() {
390230
390107
  const shell = process.env.SHELL || "";
390231
- const home = homedir27();
390108
+ const home = homedir26();
390232
390109
  const claudeDir = join104(home, ".claude");
390233
390110
  if (shell.endsWith("/zsh") || shell.endsWith("/zsh.exe")) {
390234
390111
  const cacheFile = join104(claudeDir, "completion.zsh");
@@ -390304,7 +390181,7 @@ __export(exports_terminalSetup, {
390304
390181
  });
390305
390182
  import { randomBytes as randomBytes14 } from "crypto";
390306
390183
  import { copyFile as copyFile8, mkdir as mkdir25, readFile as readFile33, writeFile as writeFile27 } from "fs/promises";
390307
- import { homedir as homedir28, platform as platform4 } from "os";
390184
+ import { homedir as homedir27, platform as platform4 } from "os";
390308
390185
  import { dirname as dirname45, join as join105 } from "path";
390309
390186
  import { pathToFileURL as pathToFileURL7 } from "url";
390310
390187
  function isVSCodeRemoteSSH() {
@@ -390440,7 +390317,7 @@ async function installBindingsForVSCodeTerminal(editor = "VSCode", theme) {
390440
390317
  ]`)}${EOL5}`;
390441
390318
  }
390442
390319
  const editorDir = editor === "VSCode" ? "Code" : editor;
390443
- const userDirPath = join105(homedir28(), platform4() === "win32" ? join105("AppData", "Roaming", editorDir, "User") : platform4() === "darwin" ? join105("Library", "Application Support", editorDir, "User") : join105(".config", editorDir, "User"));
390320
+ const userDirPath = join105(homedir27(), platform4() === "win32" ? join105("AppData", "Roaming", editorDir, "User") : platform4() === "darwin" ? join105("Library", "Application Support", editorDir, "User") : join105(".config", editorDir, "User"));
390444
390321
  const keybindingsPath = join105(userDirPath, "keybindings.json");
390445
390322
  try {
390446
390323
  await mkdir25(userDirPath, {
@@ -390584,7 +390461,7 @@ chars = "\\u001B\\r"`;
390584
390461
  if (xdgConfigHome) {
390585
390462
  configPaths.push(join105(xdgConfigHome, "alacritty", "alacritty.toml"));
390586
390463
  } else {
390587
- configPaths.push(join105(homedir28(), ".config", "alacritty", "alacritty.toml"));
390464
+ configPaths.push(join105(homedir27(), ".config", "alacritty", "alacritty.toml"));
390588
390465
  }
390589
390466
  if (platform4() === "win32") {
390590
390467
  const appData = process.env.APPDATA;
@@ -390650,7 +390527,7 @@ chars = "\\u001B\\r"`;
390650
390527
  }
390651
390528
  }
390652
390529
  async function installBindingsForZed(theme) {
390653
- const zedDir = join105(homedir28(), ".config", "zed");
390530
+ const zedDir = join105(homedir27(), ".config", "zed");
390654
390531
  const keymapPath = join105(zedDir, "keymap.json");
390655
390532
  try {
390656
390533
  await mkdir25(zedDir, {
@@ -408702,10 +408579,10 @@ var init_MemoryFileSelector = __esm(() => {
408702
408579
  });
408703
408580
 
408704
408581
  // src/components/memory/MemoryUpdateNotification.tsx
408705
- import { homedir as homedir29 } from "os";
408582
+ import { homedir as homedir28 } from "os";
408706
408583
  import { relative as relative23 } from "path";
408707
408584
  function getRelativeMemoryPath(path18) {
408708
- const homeDir = homedir29();
408585
+ const homeDir = homedir28();
408709
408586
  const cwd2 = getCwd();
408710
408587
  const relativeToHome = path18.startsWith(homeDir) ? "~" + path18.slice(homeDir.length) : null;
408711
408588
  const relativeToCwd = path18.startsWith(cwd2) ? "./" + relative23(cwd2, path18) : null;
@@ -411338,8 +411215,8 @@ __export(exports_auth3, {
411338
411215
  });
411339
411216
  import { createServer as createServer5 } from "node:http";
411340
411217
  import { createHash as createHash21, randomBytes as randomBytes15 } from "node:crypto";
411341
- import { appendFileSync as appendFileSync5, existsSync as existsSync10, mkdirSync as mkdirSync10 } from "node:fs";
411342
- import { join as join115 } from "node:path";
411218
+ import { appendFileSync as appendFileSync5, existsSync as existsSync10, mkdirSync as mkdirSync10, writeFileSync as writeFileSync8 } from "node:fs";
411219
+ import { dirname as dirname49, join as join115 } from "node:path";
411343
411220
  function appendAuthLog(service, message) {
411344
411221
  try {
411345
411222
  const dir = getClaudeConfigHomeDir();
@@ -411453,6 +411330,28 @@ function emailFromTokens(tokens) {
411453
411330
  return p.email;
411454
411331
  return "unknown";
411455
411332
  }
411333
+ function persistCodexOauthSession(tokens) {
411334
+ try {
411335
+ const authPath = resolveCodexAuthPath();
411336
+ const accountId = parseChatgptAccountId(tokens.access_token) ?? parseChatgptAccountId(tokens.id_token);
411337
+ mkdirSync10(dirname49(authPath), { recursive: true });
411338
+ writeFileSync8(authPath, JSON.stringify({
411339
+ access_token: tokens.access_token,
411340
+ ...tokens.refresh_token ? { refresh_token: tokens.refresh_token } : {},
411341
+ ...tokens.id_token ? { id_token: tokens.id_token } : {},
411342
+ ...accountId ? { account_id: accountId } : {},
411343
+ tokens: {
411344
+ access_token: tokens.access_token,
411345
+ ...tokens.refresh_token ? { refresh_token: tokens.refresh_token } : {},
411346
+ ...tokens.id_token ? { id_token: tokens.id_token } : {},
411347
+ ...accountId ? { account_id: accountId } : {}
411348
+ }
411349
+ }, null, 2), "utf8");
411350
+ appendAuthLog("codex_oauth", `codex auth.json synced path=${authPath}${accountId ? ` accountId=${accountId}` : ""}`);
411351
+ } catch (error42) {
411352
+ appendAuthLog("codex_oauth", `codex auth.json sync failed ${String(error42)}`);
411353
+ }
411354
+ }
411456
411355
  async function fetchGoogleEmail(accessToken, idToken) {
411457
411356
  if (idToken) {
411458
411357
  const p = decodeJwtPayload2(idToken);
@@ -412313,6 +412212,7 @@ function AuthCommand({
412313
412212
  code_verifier: verifier
412314
412213
  }, "codex_oauth");
412315
412214
  const email3 = emailFromTokens(tokens);
412215
+ persistCodexOauthSession(tokens);
412316
412216
  addAccount({ type: "codex_oauth", label: `Codex: ${email3}`, email: email3, refreshToken: tokens.refresh_token, enabled: true });
412317
412217
  process.env.OPENAI_API_KEY = "chatgpt-oauth";
412318
412218
  appendAuthLog("codex_oauth", `account saved email=${email3}`);
@@ -412363,6 +412263,7 @@ var init_auth8 = __esm(() => {
412363
412263
  init_messages3();
412364
412264
  init_accountManager();
412365
412265
  init_auth2();
412266
+ init_providerConfig();
412366
412267
  import_react120 = __toESM(require_react(), 1);
412367
412268
  jsx_dev_runtime209 = __toESM(require_jsx_dev_runtime(), 1);
412368
412269
  AG_SCOPES = [
@@ -412401,7 +412302,8 @@ var init_auth8 = __esm(() => {
412401
412302
  var auth_default = () => ({
412402
412303
  type: "local-jsx",
412403
412304
  name: "auth",
412404
- description: "Sign in to a provider — claude.ai, OpenAI, Gemini, Z.AI",
412305
+ aliases: ["login"],
412306
+ description: "Sign in to a provider - Claude, Codex, Gemini, Z.AI",
412405
412307
  isEnabled: () => true,
412406
412308
  load: () => Promise.resolve().then(() => (init_auth8(), exports_auth3))
412407
412309
  });
@@ -412413,29 +412315,33 @@ __export(exports_update, {
412413
412315
  });
412414
412316
  import { execSync } from "node:child_process";
412415
412317
  var call25 = async () => {
412416
- checkForUpdateInBackground();
412417
- const cache4 = readUpdateCache();
412318
+ const cache4 = await refreshUpdateCache({ force: true, timeoutMs: 5000 });
412418
412319
  const latest = getAvailableUpdate(cache4);
412419
412320
  const current = getCurrentVersion();
412321
+ if (!cache4) {
412322
+ return {
412323
+ type: "text",
412324
+ value: "Failed to check for updates. Try again in a moment."
412325
+ };
412326
+ }
412420
412327
  if (!latest) {
412421
- const checked = cache4 ? ` (checked ${new Date(cache4.checkedAt).toLocaleString()})` : " (not yet checked — try again in a moment)";
412422
412328
  return {
412423
412329
  type: "text",
412424
- value: `snowcode v${current} is up to date${checked}`
412330
+ value: `snowcode v${current} is up to date (checked ${new Date(cache4.checkedAt).toLocaleString()})`
412425
412331
  };
412426
412332
  }
412427
412333
  try {
412428
412334
  execSync("npm install -g snowcode@latest", { stdio: "inherit" });
412429
412335
  return {
412430
412336
  type: "text",
412431
- value: `✓ Updated snowcode v${current} v${latest}
412337
+ value: `Updated snowcode v${current} -> v${latest}
412432
412338
  Restart to use the new version.`
412433
412339
  };
412434
412340
  } catch {
412435
412341
  return {
412436
412342
  type: "text",
412437
412343
  value: [
412438
- `Update available: v${current} v${latest}`,
412344
+ `Update available: v${current} -> v${latest}`,
412439
412345
  "",
412440
412346
  "Install with one of:",
412441
412347
  " npm install -g snowcode@latest",
@@ -420273,7 +420179,7 @@ var init_pluginStartupCheck = __esm(() => {
420273
420179
  });
420274
420180
 
420275
420181
  // src/utils/plugins/parseMarketplaceInput.ts
420276
- import { homedir as homedir30 } from "os";
420182
+ import { homedir as homedir29 } from "os";
420277
420183
  import { resolve as resolve36 } from "path";
420278
420184
  async function parseMarketplaceInput(input) {
420279
420185
  const trimmed = input.trim();
@@ -420309,7 +420215,7 @@ async function parseMarketplaceInput(input) {
420309
420215
  const isWindows2 = process.platform === "win32";
420310
420216
  const isWindowsPath = isWindows2 && (trimmed.startsWith(".\\") || trimmed.startsWith("..\\") || /^[a-zA-Z]:[/\\]/.test(trimmed));
420311
420217
  if (trimmed.startsWith("./") || trimmed.startsWith("../") || trimmed.startsWith("/") || trimmed.startsWith("~") || isWindowsPath) {
420312
- const resolvedPath = resolve36(trimmed.startsWith("~") ? trimmed.replace(/^~/, homedir30()) : trimmed);
420218
+ const resolvedPath = resolve36(trimmed.startsWith("~") ? trimmed.replace(/^~/, homedir29()) : trimmed);
420313
420219
  let stats;
420314
420220
  try {
420315
420221
  stats = await fs4.stat(resolvedPath);
@@ -423309,7 +423215,7 @@ var init_DiscoverPlugins = __esm(() => {
423309
423215
  });
423310
423216
 
423311
423217
  // src/services/plugins/pluginOperations.ts
423312
- import { dirname as dirname49, join as join118 } from "path";
423218
+ import { dirname as dirname50, join as join118 } from "path";
423313
423219
  function assertInstallableScope(scope) {
423314
423220
  if (!VALID_INSTALLABLE_SCOPES.includes(scope)) {
423315
423221
  throw new Error(`Invalid scope "${scope}". Must be one of: ${VALID_INSTALLABLE_SCOPES.join(", ")}`);
@@ -423786,7 +423692,7 @@ async function performPluginUpdate({
423786
423692
  }
423787
423693
  throw e;
423788
423694
  }
423789
- const marketplaceDir = marketplaceStats.isDirectory() ? marketplaceInstallLocation : dirname49(marketplaceInstallLocation);
423695
+ const marketplaceDir = marketplaceStats.isDirectory() ? marketplaceInstallLocation : dirname50(marketplaceInstallLocation);
423790
423696
  sourcePath = join118(marketplaceDir, entry.source);
423791
423697
  try {
423792
423698
  await fs4.stat(sourcePath);
@@ -435122,7 +435028,7 @@ ${args ? "Additional user input: " + args : ""}
435122
435028
 
435123
435029
  // src/utils/releaseNotes.ts
435124
435030
  import { mkdir as mkdir31, readFile as readFile40, writeFile as writeFile35 } from "fs/promises";
435125
- import { dirname as dirname51, join as join122 } from "path";
435031
+ import { dirname as dirname52, join as join122 } from "path";
435126
435032
  function getChangelogCachePath() {
435127
435033
  return join122(getClaudeConfigHomeDir(), "cache", "changelog.md");
435128
435034
  }
@@ -435133,7 +435039,7 @@ async function migrateChangelogFromConfig() {
435133
435039
  }
435134
435040
  const cachePath2 = getChangelogCachePath();
435135
435041
  try {
435136
- await mkdir31(dirname51(cachePath2), { recursive: true });
435042
+ await mkdir31(dirname52(cachePath2), { recursive: true });
435137
435043
  await writeFile35(cachePath2, config3.cachedChangelog, {
435138
435044
  encoding: "utf-8",
435139
435045
  flag: "wx"
@@ -435155,7 +435061,7 @@ async function fetchAndStoreChangelog() {
435155
435061
  return;
435156
435062
  }
435157
435063
  const cachePath2 = getChangelogCachePath();
435158
- await mkdir31(dirname51(cachePath2), { recursive: true });
435064
+ await mkdir31(dirname52(cachePath2), { recursive: true });
435159
435065
  await writeFile35(cachePath2, changelogContent, { encoding: "utf-8" });
435160
435066
  changelogMemoryCache = changelogContent;
435161
435067
  const changelogLastFetched = Date.now();
@@ -449249,7 +449155,7 @@ var init_terminalSetup2 = __esm(() => {
449249
449155
 
449250
449156
  // src/utils/antigravityLocalSessions.ts
449251
449157
  import { execFileSync as execFileSync3 } from "node:child_process";
449252
- import { existsSync as existsSync11, mkdirSync as mkdirSync11, readFileSync as readFileSync15, writeFileSync as writeFileSync8 } from "node:fs";
449158
+ import { existsSync as existsSync11, mkdirSync as mkdirSync11, readFileSync as readFileSync15, writeFileSync as writeFileSync9 } from "node:fs";
449253
449159
  import { join as join123 } from "node:path";
449254
449160
  import { platform as platform5 } from "node:os";
449255
449161
  function getSnapshotPath() {
@@ -449269,7 +449175,7 @@ function saveSnapshotFile(data) {
449269
449175
  const dir = getClaudeConfigHomeDir();
449270
449176
  if (!existsSync11(dir))
449271
449177
  mkdirSync11(dir, { recursive: true });
449272
- writeFileSync8(getSnapshotPath(), JSON.stringify(data, null, 2), "utf8");
449178
+ writeFileSync9(getSnapshotPath(), JSON.stringify(data, null, 2), "utf8");
449273
449179
  }
449274
449180
  function extractRefreshToken(oauthTokenValue) {
449275
449181
  const raw = oauthTokenValue?.trim();
@@ -449371,11 +449277,11 @@ var init_antigravityLocalSessions = __esm(() => {
449371
449277
 
449372
449278
  // src/utils/antigravityLocalUsage.ts
449373
449279
  import { execFileSync as execFileSync4 } from "node:child_process";
449374
- import { existsSync as existsSync12, mkdirSync as mkdirSync12, readdirSync as readdirSync4, readFileSync as readFileSync16, writeFileSync as writeFileSync9 } from "node:fs";
449280
+ import { existsSync as existsSync12, mkdirSync as mkdirSync12, readdirSync as readdirSync4, readFileSync as readFileSync16, writeFileSync as writeFileSync10 } from "node:fs";
449375
449281
  import { join as join124 } from "node:path";
449376
- import { homedir as homedir31, platform as platform6 } from "node:os";
449282
+ import { homedir as homedir30, platform as platform6 } from "node:os";
449377
449283
  function getConfigDir() {
449378
- return join124(homedir31(), ".snowcode");
449284
+ return join124(homedir30(), ".snowcode");
449379
449285
  }
449380
449286
  function getSnapshotPath2() {
449381
449287
  return join124(getConfigDir(), "antigravity-local-usage.json");
@@ -449394,7 +449300,7 @@ function saveSnapshots(data) {
449394
449300
  const dir = getConfigDir();
449395
449301
  if (!existsSync12(dir))
449396
449302
  mkdirSync12(dir, { recursive: true });
449397
- writeFileSync9(getSnapshotPath2(), JSON.stringify(data, null, 2), "utf8");
449303
+ writeFileSync10(getSnapshotPath2(), JSON.stringify(data, null, 2), "utf8");
449398
449304
  }
449399
449305
  function saveSnapshot(snapshot2) {
449400
449306
  const data = loadSnapshots();
@@ -450540,7 +450446,7 @@ var init_usage3 = __esm(() => {
450540
450446
  });
450541
450447
 
450542
450448
  // src/utils/fallbackConfig.ts
450543
- import { existsSync as existsSync13, readFileSync as readFileSync17, writeFileSync as writeFileSync10 } from "node:fs";
450449
+ import { existsSync as existsSync13, readFileSync as readFileSync17, writeFileSync as writeFileSync11 } from "node:fs";
450544
450450
  import { join as join125 } from "node:path";
450545
450451
  function getPath3() {
450546
450452
  return join125(getClaudeConfigHomeDir(), "fallbacks.json");
@@ -450556,7 +450462,7 @@ function loadFallbackConfig() {
450556
450462
  }
450557
450463
  }
450558
450464
  function saveFallbackConfig(config3) {
450559
- writeFileSync10(getPath3(), JSON.stringify(config3, null, 2), "utf-8");
450465
+ writeFileSync11(getPath3(), JSON.stringify(config3, null, 2), "utf-8");
450560
450466
  }
450561
450467
  function getFallbackOrder() {
450562
450468
  return loadFallbackConfig().order;
@@ -464230,7 +464136,7 @@ var init_rewind = __esm(() => {
464230
464136
  });
464231
464137
 
464232
464138
  // src/utils/heapDumpService.ts
464233
- import { createWriteStream as createWriteStream3, writeFileSync as writeFileSync11 } from "fs";
464139
+ import { createWriteStream as createWriteStream3, writeFileSync as writeFileSync12 } from "fs";
464234
464140
  import { readdir as readdir25, readFile as readFile43, writeFile as writeFile37 } from "fs/promises";
464235
464141
  import { join as join129 } from "path";
464236
464142
  import { pipeline as pipeline2 } from "stream/promises";
@@ -464369,7 +464275,7 @@ async function performHeapDump(trigger = "manual", dumpNumber = 0) {
464369
464275
  }
464370
464276
  async function writeHeapSnapshot(filepath) {
464371
464277
  if (typeof Bun !== "undefined") {
464372
- writeFileSync11(filepath, Bun.generateHeapSnapshot("v8", "arraybuffer"), {
464278
+ writeFileSync12(filepath, Bun.generateHeapSnapshot("v8", "arraybuffer"), {
464373
464279
  mode: 384
464374
464280
  });
464375
464281
  Bun.gc(true);
@@ -464908,7 +464814,7 @@ var init_bridge_kick = __esm(() => {
464908
464814
  var call59 = async () => {
464909
464815
  return {
464910
464816
  type: "text",
464911
- value: `${"99.0.0"} (built ${"2026-04-05T03:08:12.888Z"})`
464817
+ value: `${"99.0.0"} (built ${"2026-04-05T03:49:47.637Z"})`
464912
464818
  };
464913
464819
  }, version2, version_default;
464914
464820
  var init_version = __esm(() => {
@@ -466237,7 +466143,7 @@ var init_setupPortable = __esm(() => {
466237
466143
 
466238
466144
  // src/utils/claudeInChrome/setup.ts
466239
466145
  import { chmod as chmod10, mkdir as mkdir34, readFile as readFile44, writeFile as writeFile38 } from "fs/promises";
466240
- import { homedir as homedir32 } from "os";
466146
+ import { homedir as homedir31 } from "os";
466241
466147
  import { join as join131 } from "path";
466242
466148
  import { fileURLToPath as fileURLToPath6 } from "url";
466243
466149
  function shouldEnableClaudeInChrome(chromeFlag) {
@@ -466317,7 +466223,7 @@ function setupClaudeInChrome() {
466317
466223
  function getNativeMessagingHostsDirs() {
466318
466224
  const platform7 = getPlatform();
466319
466225
  if (platform7 === "windows") {
466320
- const home = homedir32();
466226
+ const home = homedir31();
466321
466227
  const appData = process.env.APPDATA || join131(home, "AppData", "Local");
466322
466228
  return [join131(appData, "Claude Code", "ChromeNativeHost")];
466323
466229
  }
@@ -467004,7 +466910,7 @@ var init_advisor2 = __esm(() => {
467004
466910
  // src/skills/bundledSkills.ts
467005
466911
  import { constants as fsConstants5 } from "fs";
467006
466912
  import { mkdir as mkdir35, open as open13 } from "fs/promises";
467007
- import { dirname as dirname52, isAbsolute as isAbsolute24, join as join132, normalize as normalize13, sep as pathSep2 } from "path";
466913
+ import { dirname as dirname53, isAbsolute as isAbsolute24, join as join132, normalize as normalize13, sep as pathSep2 } from "path";
467008
466914
  function registerBundledSkill(definition) {
467009
466915
  const { files: files2 } = definition;
467010
466916
  let skillRoot;
@@ -467068,7 +466974,7 @@ async function writeSkillFiles(dir, files2) {
467068
466974
  const byParent = new Map;
467069
466975
  for (const [relPath, content] of Object.entries(files2)) {
467070
466976
  const target = resolveSkillFilePath(dir, relPath);
467071
- const parent2 = dirname52(target);
466977
+ const parent2 = dirname53(target);
467072
466978
  const entry = [target, content];
467073
466979
  const group = byParent.get(parent2);
467074
466980
  if (group)
@@ -475039,7 +474945,7 @@ import {
475039
474945
  unlink as unlink21,
475040
474946
  writeFile as writeFile41
475041
474947
  } from "fs/promises";
475042
- import { basename as basename40, dirname as dirname54, join as join139 } from "path";
474948
+ import { basename as basename40, dirname as dirname55, join as join139 } from "path";
475043
474949
  function isTranscriptMessage(entry) {
475044
474950
  return entry.type === "user" || entry.type === "assistant" || entry.type === "attachment" || entry.type === "system";
475045
474951
  }
@@ -475084,7 +474990,7 @@ function getAgentMetadataPath(agentId) {
475084
474990
  }
475085
474991
  async function writeAgentMetadata(agentId, metadata) {
475086
474992
  const path21 = getAgentMetadataPath(agentId);
475087
- await mkdir38(dirname54(path21), { recursive: true });
474993
+ await mkdir38(dirname55(path21), { recursive: true });
475088
474994
  await writeFile41(path21, JSON.stringify(metadata));
475089
474995
  }
475090
474996
  async function readAgentMetadata(agentId) {
@@ -475107,7 +475013,7 @@ function getRemoteAgentMetadataPath(taskId) {
475107
475013
  }
475108
475014
  async function writeRemoteAgentMetadata(taskId, metadata) {
475109
475015
  const path21 = getRemoteAgentMetadataPath(taskId);
475110
- await mkdir38(dirname54(path21), { recursive: true });
475016
+ await mkdir38(dirname55(path21), { recursive: true });
475111
475017
  await writeFile41(path21, JSON.stringify(metadata));
475112
475018
  }
475113
475019
  async function readRemoteAgentMetadata(taskId) {
@@ -475296,7 +475202,7 @@ class Project {
475296
475202
  try {
475297
475203
  await fsAppendFile(filePath, data, { mode: 384 });
475298
475204
  } catch {
475299
- await mkdir38(dirname54(filePath), { recursive: true, mode: 448 });
475205
+ await mkdir38(dirname55(filePath), { recursive: true, mode: 448 });
475300
475206
  await fsAppendFile(filePath, data, { mode: 384 });
475301
475207
  }
475302
475208
  }
@@ -475895,7 +475801,7 @@ async function hydrateFromCCRv2InternalEvents(sessionId) {
475895
475801
  }
475896
475802
  for (const [agentId, entries] of byAgent) {
475897
475803
  const agentFile = getAgentTranscriptPath(asAgentId(agentId));
475898
- await mkdir38(dirname54(agentFile), { recursive: true, mode: 448 });
475804
+ await mkdir38(dirname55(agentFile), { recursive: true, mode: 448 });
475899
475805
  const agentContent = entries.map((p) => jsonStringify(p) + `
475900
475806
  `).join("");
475901
475807
  await writeFile41(agentFile, agentContent, {
@@ -476432,7 +476338,7 @@ function appendEntryToFile(fullPath, entry) {
476432
476338
  try {
476433
476339
  fs5.appendFileSync(fullPath, line, { mode: 384 });
476434
476340
  } catch {
476435
- fs5.mkdirSync(dirname54(fullPath), { mode: 448 });
476341
+ fs5.mkdirSync(dirname55(fullPath), { mode: 448 });
476436
476342
  fs5.appendFileSync(fullPath, line, { mode: 384 });
476437
476343
  }
476438
476344
  }
@@ -478196,7 +478102,7 @@ var init_agentMemory = __esm(() => {
478196
478102
 
478197
478103
  // src/utils/permissions/filesystem.ts
478198
478104
  import { randomBytes as randomBytes19 } from "crypto";
478199
- import { homedir as homedir33, tmpdir as tmpdir10 } from "os";
478105
+ import { homedir as homedir32, tmpdir as tmpdir10 } from "os";
478200
478106
  import { join as join141, normalize as normalize15, posix as posix8, sep as sep32 } from "path";
478201
478107
  function normalizeCaseForComparison(path21) {
478202
478108
  return path21.toLowerCase();
@@ -478210,7 +478116,7 @@ function getClaudeSkillScope(filePath) {
478210
478116
  prefix: "/.claude/skills/"
478211
478117
  },
478212
478118
  {
478213
- dir: expandPath(join141(homedir33(), ".claude", "skills")),
478119
+ dir: expandPath(join141(homedir32(), ".claude", "skills")),
478214
478120
  prefix: "~/.claude/skills/"
478215
478121
  }
478216
478122
  ];
@@ -478524,7 +478430,7 @@ function patternWithRoot(pattern, source) {
478524
478430
  } else if (pattern.startsWith(`~${DIR_SEP}`)) {
478525
478431
  return {
478526
478432
  relativePattern: pattern.slice(1),
478527
- root: homedir33().normalize("NFC")
478433
+ root: homedir32().normalize("NFC")
478528
478434
  };
478529
478435
  } else if (pattern.startsWith(DIR_SEP)) {
478530
478436
  return {
@@ -483360,7 +483266,7 @@ import {
483360
483266
  symlink as symlink5,
483361
483267
  utimes as utimes2
483362
483268
  } from "fs/promises";
483363
- import { basename as basename42, dirname as dirname55, join as join143 } from "path";
483269
+ import { basename as basename42, dirname as dirname56, join as join143 } from "path";
483364
483270
  function validateWorktreeSlug(slug) {
483365
483271
  if (slug.length > MAX_WORKTREE_SLUG_LENGTH) {
483366
483272
  throw new Error(`Invalid worktree name: must be ${MAX_WORKTREE_SLUG_LENGTH} characters or fewer (got ${slug.length})`);
@@ -483556,7 +483462,7 @@ async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
483556
483462
  const srcPath = join143(repoRoot, relativePath2);
483557
483463
  const destPath = join143(worktreePath, relativePath2);
483558
483464
  try {
483559
- await mkdir40(dirname55(destPath), { recursive: true });
483465
+ await mkdir40(dirname56(destPath), { recursive: true });
483560
483466
  await copyFile10(srcPath, destPath);
483561
483467
  copied.push(relativePath2);
483562
483468
  } catch (e) {
@@ -483573,7 +483479,7 @@ async function performPostCreationSetup(repoRoot, worktreePath) {
483573
483479
  const sourceSettingsLocal = join143(repoRoot, localSettingsRelativePath);
483574
483480
  try {
483575
483481
  const destSettingsLocal = join143(worktreePath, localSettingsRelativePath);
483576
- await mkdirRecursive(dirname55(destSettingsLocal));
483482
+ await mkdirRecursive(dirname56(destSettingsLocal));
483577
483483
  await copyFile10(sourceSettingsLocal, destSettingsLocal);
483578
483484
  logForDebugging2(`Copied settings.local.json to worktree: ${destSettingsLocal}`);
483579
483485
  } catch (e) {
@@ -487866,7 +487772,7 @@ import {
487866
487772
  unlink as unlink23
487867
487773
  } from "fs/promises";
487868
487774
  import { createServer as createServer6 } from "net";
487869
- import { homedir as homedir34, platform as platform7 } from "os";
487775
+ import { homedir as homedir33, platform as platform7 } from "os";
487870
487776
  import { join as join144 } from "path";
487871
487777
  function log(message, ...args) {
487872
487778
  if (LOG_FILE) {
@@ -488205,7 +488111,7 @@ var init_chromeNativeHost = __esm(() => {
488205
488111
  init_slowOperations();
488206
488112
  init_common2();
488207
488113
  MAX_MESSAGE_SIZE = 1024 * 1024;
488208
- LOG_FILE = process.env.USER_TYPE === "ant" ? join144(homedir34(), ".claude", "debug", "chrome-native-host.txt") : undefined;
488114
+ LOG_FILE = process.env.USER_TYPE === "ant" ? join144(homedir33(), ".claude", "debug", "chrome-native-host.txt") : undefined;
488209
488115
  messageSchema = lazySchema(() => exports_external2.object({
488210
488116
  type: exports_external2.string()
488211
488117
  }).passthrough());
@@ -490501,7 +490407,7 @@ __export(exports_upstreamproxy, {
490501
490407
  SESSION_TOKEN_PATH: () => SESSION_TOKEN_PATH
490502
490408
  });
490503
490409
  import { mkdir as mkdir42, readFile as readFile48, unlink as unlink24, writeFile as writeFile42 } from "fs/promises";
490504
- import { homedir as homedir35 } from "os";
490410
+ import { homedir as homedir34 } from "os";
490505
490411
  import { join as join145 } from "path";
490506
490412
  async function initUpstreamProxy(opts) {
490507
490413
  if (!isEnvTruthy(process.env.CLAUDE_CODE_REMOTE)) {
@@ -490523,7 +490429,7 @@ async function initUpstreamProxy(opts) {
490523
490429
  }
490524
490430
  setNonDumpable();
490525
490431
  const baseUrl = opts?.ccrBaseUrl ?? process.env.ANTHROPIC_BASE_URL ?? "https://api.anthropic.com";
490526
- const caBundlePath = opts?.caBundlePath ?? join145(homedir35(), ".ccr", "ca-bundle.crt");
490432
+ const caBundlePath = opts?.caBundlePath ?? join145(homedir34(), ".ccr", "ca-bundle.crt");
490527
490433
  const caOk = await downloadCaBundle(baseUrl, opts?.systemCaPath ?? SYSTEM_CA_BUNDLE, caBundlePath);
490528
490434
  if (!caOk)
490529
490435
  return state2;
@@ -498521,7 +498427,7 @@ var init_ShowInIDEPrompt = __esm(() => {
498521
498427
  });
498522
498428
 
498523
498429
  // src/components/permissions/FilePermissionDialog/permissionOptions.tsx
498524
- import { homedir as homedir36 } from "os";
498430
+ import { homedir as homedir35 } from "os";
498525
498431
  import { basename as basename46, join as join146, sep as sep33 } from "path";
498526
498432
  function isInClaudeFolder(filePath) {
498527
498433
  const absolutePath = expandPath(filePath);
@@ -498532,7 +498438,7 @@ function isInClaudeFolder(filePath) {
498532
498438
  }
498533
498439
  function isInGlobalClaudeFolder(filePath) {
498534
498440
  const absolutePath = expandPath(filePath);
498535
- const globalClaudeFolderPath = join146(homedir36(), ".claude");
498441
+ const globalClaudeFolderPath = join146(homedir35(), ".claude");
498536
498442
  const normalizedAbsolutePath = normalizeCaseForComparison(absolutePath);
498537
498443
  const normalizedGlobalClaudeFolderPath = normalizeCaseForComparison(globalClaudeFolderPath);
498538
498444
  return normalizedAbsolutePath.startsWith(normalizedGlobalClaudeFolderPath + sep33.toLowerCase()) || normalizedAbsolutePath.startsWith(normalizedGlobalClaudeFolderPath + "/");
@@ -507688,6 +507594,9 @@ var init_SandboxPromptFooterHint = __esm(() => {
507688
507594
  });
507689
507595
 
507690
507596
  // src/components/PromptInput/Notifications.tsx
507597
+ function hasAnyConfiguredThirdPartyAuth() {
507598
+ return resolveCodexApiCredentials().source !== "none" || Boolean(process.env.CODEX_API_KEY) || Boolean(process.env.OPENAI_API_KEY) || Boolean(process.env.GEMINI_API_KEY) || Boolean(process.env.GOOGLE_API_KEY) || Boolean(process.env.VERTEX_API_KEY) || Boolean(process.env.ZAI_API_KEY);
507599
+ }
507691
507600
  function Notifications(t0) {
507692
507601
  const $2 = import_react_compiler_runtime307.c(34);
507693
507602
  const {
@@ -507731,6 +507640,7 @@ function Notifications(t0) {
507731
507640
  status: ideStatus
507732
507641
  } = useIdeConnectionStatus(mcpClients);
507733
507642
  const notifications = useAppState(_temp179);
507643
+ const authVersion = useAppState((s) => s.authVersion);
507734
507644
  const {
507735
507645
  addNotification,
507736
507646
  removeNotification
@@ -507772,6 +507682,7 @@ function Notifications(t0) {
507772
507682
  }
507773
507683
  const subscriptionType = t7;
507774
507684
  const isTeamOrEnterprise = subscriptionType === "team" || subscriptionType === "enterprise";
507685
+ const hasAnyLoggedInProvider = import_react232.useMemo(() => getSubscriptionType() !== null || getEnabledAccounts().length > 0 || hasAnyConfiguredThirdPartyAuth(), [authVersion]);
507775
507686
  let t8;
507776
507687
  if ($2[9] === Symbol.for("react.memo_cache_sentinel")) {
507777
507688
  t8 = getExternalEditor();
@@ -507911,6 +507822,8 @@ function NotificationContent({
507911
507822
  }, 1000, setApiKeyHelperSlow);
507912
507823
  return () => clearInterval(interval);
507913
507824
  }, []);
507825
+ const authVersion_0 = useAppState((s_2) => s_2.authVersion);
507826
+ const hasAnyLoggedInProvider = import_react232.useMemo(() => getSubscriptionType() !== null || getEnabledAccounts().length > 0 || hasAnyConfiguredThirdPartyAuth(), [authVersion_0]);
507914
507827
  const voiceState = "idle";
507915
507828
  const voiceEnabled = false;
507916
507829
  const voiceError = null;
@@ -507959,11 +507872,11 @@ function NotificationContent({
507959
507872
  }, undefined, true, undefined, this)
507960
507873
  ]
507961
507874
  }, undefined, true, undefined, this),
507962
- (apiKeyStatus === "invalid" || apiKeyStatus === "missing") && /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
507875
+ (apiKeyStatus === "invalid" || apiKeyStatus === "missing") && (isEnvTruthy(process.env.CLAUDE_CODE_REMOTE) || !hasAnyLoggedInProvider) && /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
507963
507876
  children: /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
507964
507877
  color: "error",
507965
507878
  wrap: "truncate",
507966
- children: isEnvTruthy(process.env.CLAUDE_CODE_REMOTE) ? "Authentication error · Try again" : "Not logged in · Run /login"
507879
+ children: isEnvTruthy(process.env.CLAUDE_CODE_REMOTE) ? "Authentication error - Try again" : "Not logged in - Run /auth"
507967
507880
  }, undefined, false, undefined, this)
507968
507881
  }, undefined, false, undefined, this),
507969
507882
  debug && /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
@@ -508013,6 +507926,8 @@ var init_Notifications = __esm(() => {
508013
507926
  init_ink2();
508014
507927
  init_claudeAiLimitsHook();
508015
507928
  init_autoCompact();
507929
+ init_providerConfig();
507930
+ init_accountManager();
508016
507931
  init_auth2();
508017
507932
  init_editor();
508018
507933
  init_envUtils();
@@ -521144,7 +521059,7 @@ var init_cacache = __esm(() => {
521144
521059
 
521145
521060
  // src/utils/cleanup.ts
521146
521061
  import * as fs5 from "fs/promises";
521147
- import { homedir as homedir37 } from "os";
521062
+ import { homedir as homedir36 } from "os";
521148
521063
  import { join as join147 } from "path";
521149
521064
  function getCutoffDate() {
521150
521065
  const settings = getSettings_DEPRECATED() || {};
@@ -521445,7 +521360,7 @@ async function cleanupNpmCacheForAnthropicPackages() {
521445
521360
  return;
521446
521361
  }
521447
521362
  logForDebugging2("npm cache cleanup: starting");
521448
- const npmCachePath = join147(homedir37(), ".npm", "_cacache");
521363
+ const npmCachePath = join147(homedir36(), ".npm", "_cacache");
521449
521364
  const NPM_CACHE_RETENTION_COUNT = 5;
521450
521365
  const startTime = Date.now();
521451
521366
  try {
@@ -524731,7 +524646,7 @@ __export(exports_asciicast, {
524731
524646
  _resetRecordingStateForTesting: () => _resetRecordingStateForTesting
524732
524647
  });
524733
524648
  import { appendFile as appendFile7, rename as rename10 } from "fs/promises";
524734
- import { basename as basename55, dirname as dirname56, join as join149 } from "path";
524649
+ import { basename as basename55, dirname as dirname57, join as join149 } from "path";
524735
524650
  function getRecordFilePath() {
524736
524651
  if (recordingState.filePath !== null) {
524737
524652
  return recordingState.filePath;
@@ -524813,7 +524728,7 @@ function installAsciicastRecorder() {
524813
524728
  }
524814
524729
  });
524815
524730
  try {
524816
- getFsImplementation().mkdirSync(dirname56(filePath));
524731
+ getFsImplementation().mkdirSync(dirname57(filePath));
524817
524732
  } catch {}
524818
524733
  getFsImplementation().appendFileSync(filePath, header + `
524819
524734
  `, { mode: 384 });
@@ -524882,7 +524797,7 @@ var init_asciicast = __esm(() => {
524882
524797
  });
524883
524798
 
524884
524799
  // src/utils/sessionRestore.ts
524885
- import { dirname as dirname57 } from "path";
524800
+ import { dirname as dirname58 } from "path";
524886
524801
  function extractTodosFromTranscript(messages) {
524887
524802
  for (let i3 = messages.length - 1;i3 >= 0; i3--) {
524888
524803
  const msg = messages[i3];
@@ -525007,7 +524922,7 @@ async function processResumedConversation(result, opts, context8) {
525007
524922
  if (!opts.forkSession) {
525008
524923
  const sid = opts.sessionIdOverride ?? result.sessionId;
525009
524924
  if (sid) {
525010
- switchSession(asSessionId(sid), opts.transcriptPath ? dirname57(opts.transcriptPath) : null);
524925
+ switchSession(asSessionId(sid), opts.transcriptPath ? dirname58(opts.transcriptPath) : null);
525011
524926
  await renameRecordingForSession();
525012
524927
  await resetSessionFilePointer();
525013
524928
  restoreCostStateForSession(sid);
@@ -533702,7 +533617,7 @@ var exports_REPL = {};
533702
533617
  __export(exports_REPL, {
533703
533618
  REPL: () => REPL
533704
533619
  });
533705
- import { dirname as dirname58, join as join152 } from "path";
533620
+ import { dirname as dirname59, join as join152 } from "path";
533706
533621
  import { tmpdir as tmpdir11 } from "os";
533707
533622
  import { writeFile as writeFile44 } from "fs/promises";
533708
533623
  import { randomUUID as randomUUID47 } from "crypto";
@@ -534638,7 +534553,7 @@ function REPL({
534638
534553
  const targetSessionCosts = getStoredSessionCosts(sessionId);
534639
534554
  saveCurrentSessionCosts();
534640
534555
  resetCostState();
534641
- switchSession(asSessionId(sessionId), log2.fullPath ? dirname58(log2.fullPath) : null);
534556
+ switchSession(asSessionId(sessionId), log2.fullPath ? dirname59(log2.fullPath) : null);
534642
534557
  const {
534643
534558
  renameRecordingForSession: renameRecordingForSession2
534644
534559
  } = await Promise.resolve().then(() => (init_asciicast(), exports_asciicast));
@@ -538361,7 +538276,7 @@ function WelcomeV2() {
538361
538276
  dimColor: true,
538362
538277
  children: [
538363
538278
  "v",
538364
- "0.9.1",
538279
+ "0.9.21",
538365
538280
  " "
538366
538281
  ]
538367
538282
  }, undefined, true, undefined, this)
@@ -538561,7 +538476,7 @@ function WelcomeV2() {
538561
538476
  dimColor: true,
538562
538477
  children: [
538563
538478
  "v",
538564
- "0.9.1",
538479
+ "0.9.21",
538565
538480
  " "
538566
538481
  ]
538567
538482
  }, undefined, true, undefined, this)
@@ -538787,7 +538702,7 @@ function AppleTerminalWelcomeV2(t0) {
538787
538702
  dimColor: true,
538788
538703
  children: [
538789
538704
  "v",
538790
- "0.9.1",
538705
+ "0.9.21",
538791
538706
  " "
538792
538707
  ]
538793
538708
  }, undefined, true, undefined, this);
@@ -539041,7 +538956,7 @@ function AppleTerminalWelcomeV2(t0) {
539041
538956
  dimColor: true,
539042
538957
  children: [
539043
538958
  "v",
539044
- "0.9.1",
538959
+ "0.9.21",
539045
538960
  " "
539046
538961
  ]
539047
538962
  }, undefined, true, undefined, this);
@@ -539893,7 +539808,7 @@ var exports_TrustDialog = {};
539893
539808
  __export(exports_TrustDialog, {
539894
539809
  TrustDialog: () => TrustDialog
539895
539810
  });
539896
- import { homedir as homedir38 } from "os";
539811
+ import { homedir as homedir37 } from "os";
539897
539812
  function TrustDialog(t0) {
539898
539813
  const $2 = import_react_compiler_runtime365.c(33);
539899
539814
  const {
@@ -540004,7 +539919,7 @@ function TrustDialog(t0) {
540004
539919
  let t13;
540005
539920
  if ($2[13] !== hasAnyBashExecution) {
540006
539921
  t12 = () => {
540007
- const isHomeDir = homedir38() === getCwd();
539922
+ const isHomeDir = homedir37() === getCwd();
540008
539923
  logEvent("tengu_trust_dialog_shown", {
540009
539924
  isHomeDir,
540010
539925
  hasMcpServers,
@@ -540033,7 +539948,7 @@ function TrustDialog(t0) {
540033
539948
  gracefulShutdownSync(1);
540034
539949
  return;
540035
539950
  }
540036
- const isHomeDir_0 = homedir38() === getCwd();
539951
+ const isHomeDir_0 = homedir37() === getCwd();
540037
539952
  logEvent("tengu_trust_dialog_accept", {
540038
539953
  isHomeDir: isHomeDir_0,
540039
539954
  hasMcpServers,
@@ -541717,7 +541632,7 @@ var exports_ResumeConversation = {};
541717
541632
  __export(exports_ResumeConversation, {
541718
541633
  ResumeConversation: () => ResumeConversation
541719
541634
  });
541720
- import { dirname as dirname59 } from "path";
541635
+ import { dirname as dirname60 } from "path";
541721
541636
  function parsePrIdentifier(value) {
541722
541637
  const directNumber = parseInt(value, 10);
541723
541638
  if (!isNaN(directNumber) && directNumber > 0) {
@@ -541851,7 +541766,7 @@ function ResumeConversation({
541851
541766
  }
541852
541767
  if (false) {}
541853
541768
  if (result_3.sessionId && !forkSession) {
541854
- switchSession(asSessionId(result_3.sessionId), log_0.fullPath ? dirname59(log_0.fullPath) : null);
541769
+ switchSession(asSessionId(result_3.sessionId), log_0.fullPath ? dirname60(log_0.fullPath) : null);
541855
541770
  await renameRecordingForSession();
541856
541771
  await resetSessionFilePointer();
541857
541772
  restoreCostStateForSession(result_3.sessionId);
@@ -545015,7 +544930,7 @@ var init_createDirectConnectSession = __esm(() => {
545015
544930
  });
545016
544931
 
545017
544932
  // src/utils/errorLogSink.ts
545018
- import { dirname as dirname60, join as join153 } from "path";
544933
+ import { dirname as dirname61, join as join153 } from "path";
545019
544934
  function getErrorsPath() {
545020
544935
  return join153(CACHE_PATHS.errors(), DATE + ".jsonl");
545021
544936
  }
@@ -545036,7 +544951,7 @@ function createJsonlWriter(options2) {
545036
544951
  function getLogWriter(path23) {
545037
544952
  let writer = logWriters.get(path23);
545038
544953
  if (!writer) {
545039
- const dir = dirname60(path23);
544954
+ const dir = dirname61(path23);
545040
544955
  writer = createJsonlWriter({
545041
544956
  writeFn: (content) => {
545042
544957
  try {
@@ -545362,7 +545277,7 @@ var init_sessionMemory = __esm(() => {
545362
545277
 
545363
545278
  // src/utils/iTermBackup.ts
545364
545279
  import { copyFile as copyFile11, stat as stat48 } from "fs/promises";
545365
- import { homedir as homedir39 } from "os";
545280
+ import { homedir as homedir38 } from "os";
545366
545281
  import { join as join154 } from "path";
545367
545282
  function markITerm2SetupComplete() {
545368
545283
  saveGlobalConfig((current) => ({
@@ -545378,7 +545293,7 @@ function getIterm2RecoveryInfo() {
545378
545293
  };
545379
545294
  }
545380
545295
  function getITerm2PlistPath() {
545381
- return join154(homedir39(), "Library", "Preferences", "com.googlecode.iterm2.plist");
545296
+ return join154(homedir38(), "Library", "Preferences", "com.googlecode.iterm2.plist");
545382
545297
  }
545383
545298
  async function checkAndRestoreITerm2Backup() {
545384
545299
  const { inProgress, backupPath } = getIterm2RecoveryInfo();
@@ -549429,14 +549344,14 @@ __export(exports_bridgePointer, {
549429
549344
  BRIDGE_POINTER_TTL_MS: () => BRIDGE_POINTER_TTL_MS
549430
549345
  });
549431
549346
  import { mkdir as mkdir44, readFile as readFile51, stat as stat49, unlink as unlink25, writeFile as writeFile47 } from "fs/promises";
549432
- import { dirname as dirname61, join as join157 } from "path";
549347
+ import { dirname as dirname62, join as join157 } from "path";
549433
549348
  function getBridgePointerPath(dir) {
549434
549349
  return join157(getProjectsDir(), sanitizePath2(dir), "bridge-pointer.json");
549435
549350
  }
549436
549351
  async function writeBridgePointer(dir, pointer) {
549437
549352
  const path23 = getBridgePointerPath(dir);
549438
549353
  try {
549439
- await mkdir44(dirname61(path23), { recursive: true });
549354
+ await mkdir44(dirname62(path23), { recursive: true });
549440
549355
  await writeFile47(path23, jsonStringify(pointer), "utf8");
549441
549356
  logForDebugging2(`[bridge:pointer] wrote ${path23}`);
549442
549357
  } catch (err3) {
@@ -551440,7 +551355,7 @@ __export(exports_print, {
551440
551355
  canBatchWith: () => canBatchWith
551441
551356
  });
551442
551357
  import { readFile as readFile52, stat as stat50 } from "fs/promises";
551443
- import { dirname as dirname62 } from "path";
551358
+ import { dirname as dirname63 } from "path";
551444
551359
  import { cwd as cwd2 } from "process";
551445
551360
  import { randomUUID as randomUUID53 } from "crypto";
551446
551361
  function trackReceivedMessageUuid(uuid3) {
@@ -553875,7 +553790,7 @@ async function loadInitialMessages(setAppState, options2) {
553875
553790
  if (false) {}
553876
553791
  if (!options2.forkSession) {
553877
553792
  if (result.sessionId) {
553878
- switchSession(asSessionId(result.sessionId), result.fullPath ? dirname62(result.fullPath) : null);
553793
+ switchSession(asSessionId(result.sessionId), result.fullPath ? dirname63(result.fullPath) : null);
553879
553794
  if (persistSession) {
553880
553795
  await resetSessionFilePointer();
553881
553796
  }
@@ -553973,7 +553888,7 @@ async function loadInitialMessages(setAppState, options2) {
553973
553888
  }
553974
553889
  if (false) {}
553975
553890
  if (!options2.forkSession && result.sessionId) {
553976
- switchSession(asSessionId(result.sessionId), result.fullPath ? dirname62(result.fullPath) : null);
553891
+ switchSession(asSessionId(result.sessionId), result.fullPath ? dirname63(result.fullPath) : null);
553977
553892
  if (persistSession) {
553978
553893
  await resetSessionFilePointer();
553979
553894
  }
@@ -555370,7 +555285,7 @@ __export(exports_claudeDesktop, {
555370
555285
  getClaudeDesktopConfigPath: () => getClaudeDesktopConfigPath
555371
555286
  });
555372
555287
  import { readdir as readdir31, readFile as readFile53, stat as stat51 } from "fs/promises";
555373
- import { homedir as homedir40 } from "os";
555288
+ import { homedir as homedir39 } from "os";
555374
555289
  import { join as join158 } from "path";
555375
555290
  async function getClaudeDesktopConfigPath() {
555376
555291
  const platform8 = getPlatform();
@@ -555378,7 +555293,7 @@ async function getClaudeDesktopConfigPath() {
555378
555293
  throw new Error(`Unsupported platform: ${platform8} - Claude Desktop integration only works on macOS and WSL.`);
555379
555294
  }
555380
555295
  if (platform8 === "macos") {
555381
- return join158(homedir40(), "Library", "Application Support", "Claude", "claude_desktop_config.json");
555296
+ return join158(homedir39(), "Library", "Application Support", "Claude", "claude_desktop_config.json");
555382
555297
  }
555383
555298
  const windowsHome = process.env.USERPROFILE ? process.env.USERPROFILE.replace(/\\/g, "/") : null;
555384
555299
  if (windowsHome) {
@@ -555793,7 +555708,7 @@ __export(exports_plugins, {
555793
555708
  VALID_UPDATE_SCOPES: () => VALID_UPDATE_SCOPES,
555794
555709
  VALID_INSTALLABLE_SCOPES: () => VALID_INSTALLABLE_SCOPES
555795
555710
  });
555796
- import { basename as basename57, dirname as dirname63 } from "path";
555711
+ import { basename as basename57, dirname as dirname64 } from "path";
555797
555712
  function handleMarketplaceError(error42, action2) {
555798
555713
  logError2(error42);
555799
555714
  cliError(`${figures_default.cross} Failed to ${action2}: ${errorMessage(error42)}`);
@@ -555826,9 +555741,9 @@ async function pluginValidateHandler(manifestPath, options2) {
555826
555741
  printValidationResult(result);
555827
555742
  let contentResults = [];
555828
555743
  if (result.fileType === "plugin") {
555829
- const manifestDir = dirname63(result.filePath);
555744
+ const manifestDir = dirname64(result.filePath);
555830
555745
  if (basename57(manifestDir) === ".claude-plugin") {
555831
- contentResults = await validatePluginContents(dirname63(manifestDir));
555746
+ contentResults = await validatePluginContents(dirname64(manifestDir));
555832
555747
  for (const r of contentResults) {
555833
555748
  console.log(`Validating ${r.fileType}: ${r.filePath}
555834
555749
  `);
@@ -556305,11 +556220,11 @@ var exports_install = {};
556305
556220
  __export(exports_install, {
556306
556221
  install: () => install
556307
556222
  });
556308
- import { homedir as homedir41 } from "node:os";
556223
+ import { homedir as homedir40 } from "node:os";
556309
556224
  import { join as join159 } from "node:path";
556310
556225
  function getInstallationPath2() {
556311
556226
  const isWindows2 = env2.platform === "win32";
556312
- const homeDir = homedir41();
556227
+ const homeDir = homedir40();
556313
556228
  if (isWindows2) {
556314
556229
  const windowsPath = join159(homeDir, ".local", "bin", "claude.exe");
556315
556230
  return windowsPath.replace(/\//g, "\\");
@@ -559162,7 +559077,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
559162
559077
  pendingHookMessages
559163
559078
  }, renderAndRun);
559164
559079
  }
559165
- }).version("0.9.1 (Snowcode)", "-v, --version", "Output the version number");
559080
+ }).version("0.9.21 (Snowcode)", "-v, --version", "Output the version number");
559166
559081
  program.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
559167
559082
  program.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
559168
559083
  if (canUserConfigureAdvisor()) {
@@ -559723,12 +559638,12 @@ function validateProviderEnvOrExit() {
559723
559638
  async function main2() {
559724
559639
  const args = process.argv.slice(2);
559725
559640
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
559726
- console.log(`${"0.9.1"} (Snowcode)`);
559641
+ console.log(`${"0.9.21"} (Snowcode)`);
559727
559642
  return;
559728
559643
  }
559729
559644
  validateProviderEnvOrExit();
559730
559645
  const { printStartupScreen: printStartupScreen2 } = await Promise.resolve().then(() => (init_StartupScreen(), exports_StartupScreen));
559731
- printStartupScreen2();
559646
+ await printStartupScreen2();
559732
559647
  const {
559733
559648
  profileCheckpoint: profileCheckpoint2
559734
559649
  } = await Promise.resolve().then(() => (init_startupProfiler(), exports_startupProfiler));
@@ -559812,4 +559727,4 @@ async function main2() {
559812
559727
  }
559813
559728
  main2();
559814
559729
 
559815
- //# debugId=2D17C89FE5FFF28264756E2164756E21
559730
+ //# debugId=E43E7FACDA558B6964756E2164756E21