claudish 7.33.0 → 7.34.0

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/index.js +318 -187
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -651,7 +651,7 @@ var init_onepassword_config = __esm(() => {
651
651
  });
652
652
 
653
653
  // src/version.ts
654
- var VERSION = "7.33.0";
654
+ var VERSION = "7.34.0";
655
655
 
656
656
  // src/logger.ts
657
657
  var exports_logger = {};
@@ -27783,7 +27783,7 @@ var init_provider_definitions = __esm(() => {
27783
27783
  apiKeyEnvVar: "",
27784
27784
  apiKeyDescription: "Antigravity (shared OAuth token)",
27785
27785
  apiKeyUrl: "https://antigravity.google/",
27786
- oauthLoginSlug: "gemini",
27786
+ oauthLoginSlug: "antigravity",
27787
27787
  shortcuts: ["ag", "antigravity", "go"],
27788
27788
  shortestPrefix: "ag",
27789
27789
  legacyPrefixes: [
@@ -28373,31 +28373,25 @@ function locateAgyBinary() {
28373
28373
  const fallback = join8(homedir8(), ".local", "bin", "agy");
28374
28374
  return existsSync6(fallback) ? fallback : null;
28375
28375
  }
28376
- function defaultExtractCreds() {
28376
+ function defaultDeleteStore() {
28377
+ if (process.platform !== "darwin")
28378
+ return;
28379
+ try {
28380
+ execFileSync("security", ["delete-generic-password", "-s", KC_SERVICE, "-a", KC_ACCOUNT], {
28381
+ stdio: ["ignore", "ignore", "ignore"]
28382
+ });
28383
+ } catch {}
28384
+ }
28385
+ function defaultRunAgyRefresh() {
28377
28386
  const agy = locateAgyBinary();
28378
- if (!agy) {
28379
- logStderr("[Antigravity] Could not locate the `agy` binary \u2014 self-refresh is unavailable.");
28380
- return [];
28381
- }
28382
- let dump;
28387
+ if (!agy)
28388
+ return;
28383
28389
  try {
28384
- dump = execFileSync("strings", [agy], {
28385
- encoding: "utf8",
28386
- maxBuffer: 128 * 1024 * 1024
28390
+ execFileSync(agy, ["models"], {
28391
+ stdio: ["ignore", "ignore", "ignore"],
28392
+ timeout: AGY_REFRESH_TIMEOUT_MS
28387
28393
  });
28388
- } catch {
28389
- logStderr("[Antigravity] `strings` failed on the agy binary \u2014 self-refresh is unavailable.");
28390
- return [];
28391
- }
28392
- const clientIds = Array.from(new Set(dump.match(/[0-9]{6,}-[a-z0-9]+\.apps\.googleusercontent\.com/g) ?? []));
28393
- const secrets = Array.from(new Set(dump.match(/GOCSPX-[A-Za-z0-9_-]{20,}/g) ?? []));
28394
- const combos = [];
28395
- for (const clientId of clientIds) {
28396
- for (const clientSecret of secrets) {
28397
- combos.push({ clientId, clientSecret });
28398
- }
28399
- }
28400
- return combos;
28394
+ } catch {}
28401
28395
  }
28402
28396
  function parseRecord(raw) {
28403
28397
  if (!raw)
@@ -28417,9 +28411,6 @@ function parseRecord(raw) {
28417
28411
  return null;
28418
28412
  }
28419
28413
  }
28420
- function encodeRecord(rec) {
28421
- return PREFIX + Buffer.from(JSON.stringify(rec), "utf8").toString("base64");
28422
- }
28423
28414
  function readSharedAntigravityToken(deps = defaultDeps) {
28424
28415
  const rec = parseRecord(deps.readStore());
28425
28416
  return rec ? rec.token : null;
@@ -28437,14 +28428,9 @@ function hasSharedAntigravityToken(deps = defaultDeps) {
28437
28428
  cachedHasToken = { at: now, value };
28438
28429
  return value;
28439
28430
  }
28440
- function writeSharedAntigravityToken(tok, deps = defaultDeps) {
28441
- const existing = parseRecord(deps.readStore());
28442
- const base = existing ?? { token: tok };
28443
- const merged = {
28444
- ...base,
28445
- token: { ...base.token, ...tok }
28446
- };
28447
- deps.writeStore(encodeRecord(merged));
28431
+ function deleteSharedAntigravityToken(deps = defaultDeps) {
28432
+ (deps.deleteStore ?? defaultDeleteStore)();
28433
+ _resetAntigravityTokenState();
28448
28434
  }
28449
28435
  function needsRefresh(tok, now) {
28450
28436
  const expMs = Date.parse(tok.expiry);
@@ -28452,57 +28438,25 @@ function needsRefresh(tok, now) {
28452
28438
  return true;
28453
28439
  return now >= expMs - EXPIRY_SKEW_MS;
28454
28440
  }
28455
- async function refreshToken(tok, deps) {
28456
- const combos = cachedCred ? [cachedCred] : deps.extractCreds();
28457
- if (combos.length === 0) {
28458
- throw new Error("[Antigravity] Access token expired and no OAuth client credentials could be extracted " + "from the `agy` binary to refresh it. Re-run the Antigravity CLI to refresh your session, " + "or use g@<model> with GEMINI_API_KEY.");
28459
- }
28460
- let lastStatus = 0;
28461
- let lastBody = "";
28462
- for (const cred of combos) {
28463
- const res = await deps.fetch(REFRESH_ENDPOINT, {
28464
- method: "POST",
28465
- headers: { "Content-Type": "application/x-www-form-urlencoded" },
28466
- body: new URLSearchParams({
28467
- client_id: cred.clientId,
28468
- client_secret: cred.clientSecret,
28469
- refresh_token: tok.refresh_token,
28470
- grant_type: "refresh_token"
28471
- })
28472
- });
28473
- if (res.ok) {
28474
- cachedCred = cred;
28475
- const j = await res.json();
28476
- const expiry = new Date(deps.now() + j.expires_in * 1000).toISOString();
28477
- return {
28478
- access_token: j.access_token,
28479
- token_type: tok.token_type || "Bearer",
28480
- refresh_token: j.refresh_token || tok.refresh_token,
28481
- expiry
28482
- };
28483
- }
28484
- lastStatus = res.status;
28485
- lastBody = await res.text().catch(() => "");
28486
- }
28487
- throw new Error(`[Antigravity] Token refresh failed for all ${combos.length} client-cred combo(s) ` + `(last HTTP ${lastStatus}${lastBody ? `: ${lastBody.slice(0, 200)}` : ""}). ` + "Re-run the Antigravity CLI to refresh your session, or use g@<model> with GEMINI_API_KEY.");
28488
- }
28489
28441
  async function resolveValidToken(deps) {
28490
28442
  if (process.platform !== "darwin") {
28491
28443
  throw new Error("[Antigravity] The shared Antigravity token store is macOS-only for now. " + "Use g@<model> with GEMINI_API_KEY on this platform.");
28492
28444
  }
28493
28445
  const rec = parseRecord(deps.readStore());
28494
28446
  if (!rec) {
28495
- throw new Error("[Antigravity] No Antigravity session found. Install Antigravity and sign in " + "(the `agy` CLI), or use g@<model> with GEMINI_API_KEY " + "(get one at https://aistudio.google.com/app/apikey).");
28447
+ throw new Error("[Antigravity] No Antigravity session found. Sign in with `claudish login antigravity`, " + "or use g@<model> with GEMINI_API_KEY " + "(get one at https://aistudio.google.com/app/apikey).");
28448
+ }
28449
+ if (!needsRefresh(rec.token, deps.now())) {
28450
+ return rec.token.access_token;
28496
28451
  }
28497
- const tok = rec.token;
28498
- if (!needsRefresh(tok, deps.now())) {
28499
- return tok.access_token;
28452
+ log("[Antigravity] Access token expired/near-expiry \u2014 asking the Antigravity CLI to refresh.");
28453
+ deps.runAgyRefresh();
28454
+ const refreshedRec = parseRecord(deps.readStore());
28455
+ if (refreshedRec && !needsRefresh(refreshedRec.token, deps.now())) {
28456
+ log("[Antigravity] Shared token refreshed by the Antigravity CLI.");
28457
+ return refreshedRec.token.access_token;
28500
28458
  }
28501
- log("[Antigravity] Access token expired/near-expiry \u2014 refreshing.");
28502
- const refreshed = await refreshToken(tok, deps);
28503
- writeSharedAntigravityToken(refreshed, deps);
28504
- log("[Antigravity] Token refreshed and written back to the shared store.");
28505
- return refreshed.access_token;
28459
+ throw new Error("[Antigravity] Antigravity session expired and couldn't be refreshed. " + "Run `claudish login antigravity` (installs/authenticates the Antigravity CLI).");
28506
28460
  }
28507
28461
  function getValidAntigravityAccessToken(deps = defaultDeps) {
28508
28462
  if (inFlight)
@@ -28512,14 +28466,18 @@ function getValidAntigravityAccessToken(deps = defaultDeps) {
28512
28466
  });
28513
28467
  return inFlight;
28514
28468
  }
28515
- var KC_SERVICE = "gemini", KC_ACCOUNT = "antigravity", PREFIX = "go-keyring-base64:", REFRESH_ENDPOINT = "https://oauth2.googleapis.com/token", EXPIRY_SKEW_MS = 120000, defaultDeps, cachedHasToken = null, HAS_TOKEN_TTL_MS = 5000, cachedCred = null, inFlight = null;
28469
+ function _resetAntigravityTokenState() {
28470
+ inFlight = null;
28471
+ cachedHasToken = null;
28472
+ }
28473
+ var KC_SERVICE = "gemini", KC_ACCOUNT = "antigravity", PREFIX = "go-keyring-base64:", EXPIRY_SKEW_MS = 120000, AGY_REFRESH_TIMEOUT_MS = 40000, defaultDeps, cachedHasToken = null, HAS_TOKEN_TTL_MS = 5000, inFlight = null;
28516
28474
  var init_antigravity_token = __esm(() => {
28517
28475
  init_logger();
28518
28476
  defaultDeps = {
28519
28477
  readStore: defaultReadStore,
28520
28478
  writeStore: defaultWriteStore,
28521
- extractCreds: defaultExtractCreds,
28522
- fetch: (input, init) => fetch(input, init),
28479
+ deleteStore: defaultDeleteStore,
28480
+ runAgyRefresh: defaultRunAgyRefresh,
28523
28481
  now: () => Date.now()
28524
28482
  };
28525
28483
  });
@@ -31574,6 +31532,7 @@ var init_routing_hints = __esm(() => {
31574
31532
  kimi: { loginFlag: "login kimi", apiKeyEnvVar: "MOONSHOT_API_KEY" },
31575
31533
  google: { loginFlag: "login gemini", apiKeyEnvVar: "GEMINI_API_KEY" },
31576
31534
  "gemini-codeassist": { loginFlag: "login gemini", apiKeyEnvVar: "GEMINI_API_KEY" },
31535
+ antigravity: { loginFlag: "login antigravity" },
31577
31536
  openai: { apiKeyEnvVar: "OPENAI_API_KEY" },
31578
31537
  "openai-codex": { loginFlag: "login codex", apiKeyEnvVar: "OPENAI_CODEX_API_KEY" },
31579
31538
  minimax: { apiKeyEnvVar: "MINIMAX_API_KEY" },
@@ -61842,6 +61801,163 @@ var init_dist16 = __esm(() => {
61842
61801
  init_dist15();
61843
61802
  });
61844
61803
 
61804
+ // src/auth/antigravity-oauth.ts
61805
+ import { spawnSync as spawnSync3 } from "child_process";
61806
+ import { existsSync as existsSync22, unlinkSync as unlinkSync7 } from "fs";
61807
+ import { homedir as homedir26 } from "os";
61808
+ import { join as join28 } from "path";
61809
+ async function defaultSuggestModel() {
61810
+ try {
61811
+ const tok = readSharedAntigravityToken();
61812
+ if (!tok)
61813
+ return "<model>";
61814
+ const { projectId } = await setupAntigravityUser(tok.access_token);
61815
+ const { servedIds, defaultId } = await getServedAntigravityModels(tok.access_token, projectId);
61816
+ return defaultId || servedIds[0] || "<model>";
61817
+ } catch {
61818
+ return "<model>";
61819
+ }
61820
+ }
61821
+ function printManualInstall() {
61822
+ console.log("\nInstall the Antigravity CLI, then retry `claudish login antigravity`:");
61823
+ console.log(` ${INSTALL_CMD}`);
61824
+ console.log(` Docs: ${INSTALL_DOCS}`);
61825
+ }
61826
+ async function defaultConfirmInstall() {
61827
+ const { confirm } = await Promise.resolve().then(() => (init_dist16(), exports_dist));
61828
+ return confirm({
61829
+ message: `Install the Antigravity CLI now? (runs: ${INSTALL_CMD})`,
61830
+ default: true
61831
+ });
61832
+ }
61833
+ function defaultRunInstall() {
61834
+ const res = spawnSync3("bash", ["-c", INSTALL_CMD], { stdio: "inherit" });
61835
+ return !res.error && res.status === 0;
61836
+ }
61837
+ function defaultRunAgyAuth(agyPath, interactive) {
61838
+ if (interactive) {
61839
+ spawnSync3(agyPath, [], { stdio: "inherit" });
61840
+ } else {
61841
+ spawnSync3(agyPath, ["-p", "hello", "--print-timeout", "3m"], { stdio: "inherit" });
61842
+ }
61843
+ }
61844
+ async function pollForToken(deps) {
61845
+ const deadline = deps.now() + deps.timing.graceMs;
61846
+ for (;; ) {
61847
+ const tok = deps.readToken();
61848
+ if (tok)
61849
+ return tok;
61850
+ if (deps.now() >= deadline)
61851
+ return null;
61852
+ const remaining = deadline - deps.now();
61853
+ await deps.sleep(Math.min(deps.timing.intervalMs, Math.max(0, remaining)));
61854
+ }
61855
+ }
61856
+
61857
+ class AntigravityOAuth {
61858
+ static instance = null;
61859
+ static getInstance() {
61860
+ if (!AntigravityOAuth.instance) {
61861
+ AntigravityOAuth.instance = new AntigravityOAuth;
61862
+ }
61863
+ return AntigravityOAuth.instance;
61864
+ }
61865
+ constructor() {}
61866
+ async login(depsOverride = {}) {
61867
+ const deps = { ...defaultLoginDeps, ...depsOverride };
61868
+ log("[AntigravityOAuth] Starting agy-delegated login");
61869
+ if (deps.hasToken()) {
61870
+ console.log(`\u2705 Already authenticated with Antigravity. Use: claudish --model ag@${await (deps.suggestModel ?? defaultSuggestModel)()}`);
61871
+ return deps.exit(0);
61872
+ }
61873
+ let agyPath = deps.locateAgy();
61874
+ if (!agyPath) {
61875
+ console.log("\nThe Antigravity CLI (`agy`) is required to sign in to Antigravity.");
61876
+ console.log(`claudish delegates Antigravity sign-in to agy \u2014 agy holds the current OAuth secret
61877
+ ` + "and writes the session to the shared keychain store that claudish reads.");
61878
+ if (!deps.isInteractive()) {
61879
+ printManualInstall();
61880
+ return deps.exit(0);
61881
+ }
61882
+ const proceed = await deps.confirmInstall();
61883
+ if (!proceed) {
61884
+ printManualInstall();
61885
+ return deps.exit(0);
61886
+ }
61887
+ console.log(`
61888
+ Installing the Antigravity CLI\u2026
61889
+ `);
61890
+ if (!deps.runInstall()) {
61891
+ console.log(`
61892
+ \u274C Antigravity CLI installation failed.`);
61893
+ printManualInstall();
61894
+ return deps.exit(0);
61895
+ }
61896
+ agyPath = deps.locateAgy();
61897
+ if (!agyPath) {
61898
+ console.log(`
61899
+ \u274C Antigravity CLI still not found after install.`);
61900
+ printManualInstall();
61901
+ return deps.exit(0);
61902
+ }
61903
+ }
61904
+ console.log(`
61905
+ Launching the Antigravity CLI to sign in \u2014 complete the sign-in in your browser.
61906
+ ` + `claudish will detect the session automatically.
61907
+ `);
61908
+ deps.runAgyAuth(agyPath, false);
61909
+ let token = await pollForToken(deps);
61910
+ if (!token) {
61911
+ console.log(`
61912
+ No session detected yet. Starting the Antigravity CLI interactively \u2014
61913
+ ` + "sign in, then exit agy (its `/quit` command or Ctrl-C) to return here.\n");
61914
+ deps.runAgyAuth(agyPath, true);
61915
+ token = await pollForToken(deps);
61916
+ }
61917
+ if (token) {
61918
+ deps.onAuthenticated();
61919
+ console.log(`
61920
+ \u2705 Authenticated with Antigravity. Use: claudish --model ag@${await (deps.suggestModel ?? defaultSuggestModel)()}`);
61921
+ return deps.exit(0);
61922
+ }
61923
+ console.log("\nNo Antigravity session detected. Run `agy` and sign in, then retry `claudish login antigravity`.");
61924
+ return deps.exit(0);
61925
+ }
61926
+ async logout(deps) {
61927
+ deleteSharedAntigravityToken(deps);
61928
+ try {
61929
+ const tokenFile = join28(homedir26(), ".gemini", "antigravity-cli", "antigravity-oauth-token");
61930
+ if (existsSync22(tokenFile))
61931
+ unlinkSync7(tokenFile);
61932
+ } catch {}
61933
+ log("[AntigravityOAuth] Antigravity session cleared (keychain + agy token file)");
61934
+ }
61935
+ }
61936
+ var INSTALL_CMD = "curl -fsSL https://antigravity.google/cli/install.sh | bash", INSTALL_DOCS = "https://antigravity.google/docs/cli/install", defaultLoginDeps;
61937
+ var init_antigravity_oauth = __esm(() => {
61938
+ init_logger();
61939
+ init_antigravity_token();
61940
+ init_gemini_oauth();
61941
+ defaultLoginDeps = {
61942
+ locateAgy: locateAgyBinary,
61943
+ hasToken: () => readSharedAntigravityToken() != null,
61944
+ readToken: () => {
61945
+ _resetAntigravityTokenState();
61946
+ return readSharedAntigravityToken();
61947
+ },
61948
+ suggestModel: defaultSuggestModel,
61949
+ confirmInstall: defaultConfirmInstall,
61950
+ runInstall: defaultRunInstall,
61951
+ runAgyAuth: defaultRunAgyAuth,
61952
+ onAuthenticated: () => _resetAntigravityTokenState(),
61953
+ isInteractive: () => Boolean(process.stdin.isTTY),
61954
+ now: () => Date.now(),
61955
+ sleep: (ms) => new Promise((r) => setTimeout(r, ms)),
61956
+ exit: (code) => process.exit(code),
61957
+ timing: { graceMs: 1e4, intervalMs: 500 }
61958
+ };
61959
+ });
61960
+
61845
61961
  // src/auth/auth-commands.ts
61846
61962
  var exports_auth_commands = {};
61847
61963
  __export(exports_auth_commands, {
@@ -61849,7 +61965,7 @@ __export(exports_auth_commands, {
61849
61965
  loginCommand: () => loginCommand
61850
61966
  });
61851
61967
  function getAuthStatus(provider) {
61852
- const hasCredentials = provider.registryKeys.some((k) => hasOAuthCredentials(k));
61968
+ const hasCredentials = provider.registryKeys.some((k) => hasOAuthCredentials(k)) || provider.name === "antigravity" && hasSharedAntigravityToken();
61853
61969
  return hasCredentials ? "logged in" : "not logged in";
61854
61970
  }
61855
61971
  async function selectProvider(action) {
@@ -61906,11 +62022,20 @@ async function logoutCommand(providerArg) {
61906
62022
  var AUTH_PROVIDERS;
61907
62023
  var init_auth_commands = __esm(() => {
61908
62024
  init_dist16();
62025
+ init_antigravity_oauth();
62026
+ init_antigravity_token();
61909
62027
  init_codex_oauth();
61910
62028
  init_gemini_oauth();
61911
62029
  init_kimi_oauth();
61912
62030
  init_oauth_registry();
61913
62031
  AUTH_PROVIDERS = [
62032
+ {
62033
+ name: "antigravity",
62034
+ displayName: "Antigravity",
62035
+ prefix: "ag@, antigravity@",
62036
+ getInstance: () => AntigravityOAuth.getInstance(),
62037
+ registryKeys: ["antigravity"]
62038
+ },
61914
62039
  {
61915
62040
  name: "gemini",
61916
62041
  displayName: "Gemini Code Assist",
@@ -62059,11 +62184,11 @@ async function geminiQuotaHandler() {
62059
62184
  }
62060
62185
  }
62061
62186
  async function codexQuotaHandler() {
62062
- const { readFileSync: readFileSync21, existsSync: existsSync22 } = await import("fs");
62063
- const { join: join28 } = await import("path");
62064
- const { homedir: homedir26 } = await import("os");
62065
- const credPath = join28(homedir26(), ".claudish", "codex-oauth.json");
62066
- if (!existsSync22(credPath)) {
62187
+ const { readFileSync: readFileSync21, existsSync: existsSync23 } = await import("fs");
62188
+ const { join: join29 } = await import("path");
62189
+ const { homedir: homedir27 } = await import("os");
62190
+ const credPath = join29(homedir27(), ".claudish", "codex-oauth.json");
62191
+ if (!existsSync23(credPath)) {
62067
62192
  console.error(`${RED}No Codex credentials found.${R} Run: ${B}claudish login codex${R}`);
62068
62193
  process.exit(1);
62069
62194
  }
@@ -62119,8 +62244,8 @@ async function codexQuotaHandler() {
62119
62244
  }
62120
62245
  let modelSlugs = [];
62121
62246
  try {
62122
- const modelsPath = join28(homedir26(), ".codex", "models_cache.json");
62123
- if (existsSync22(modelsPath)) {
62247
+ const modelsPath = join29(homedir27(), ".codex", "models_cache.json");
62248
+ if (existsSync23(modelsPath)) {
62124
62249
  const cache2 = JSON.parse(readFileSync21(modelsPath, "utf-8"));
62125
62250
  modelSlugs = (cache2.models || []).map((m) => m.slug || m.id).filter(Boolean);
62126
62251
  }
@@ -63407,7 +63532,7 @@ function annotateOAuthHint(result, provider, isOAuth) {
63407
63532
  return result;
63408
63533
  if (result.state === "live")
63409
63534
  return result;
63410
- const loginCommand2 = provider === "gemini-codeassist" ? "claudish login gemini" : provider === "vertex" ? "gcloud auth application-default login" : undefined;
63535
+ const loginCommand2 = provider === "gemini-codeassist" ? "claudish login gemini" : provider === "antigravity" ? "claudish login antigravity" : provider === "vertex" ? "gcloud auth application-default login" : undefined;
63411
63536
  if (!loginCommand2)
63412
63537
  return result;
63413
63538
  if (result.httpStatus === 403)
@@ -66009,22 +66134,22 @@ __export(exports_cli, {
66009
66134
  });
66010
66135
  import {
66011
66136
  copyFileSync as copyFileSync2,
66012
- existsSync as existsSync22,
66137
+ existsSync as existsSync23,
66013
66138
  mkdirSync as mkdirSync13,
66014
66139
  readFileSync as readFileSync21,
66015
66140
  readdirSync as readdirSync5,
66016
- unlinkSync as unlinkSync7,
66141
+ unlinkSync as unlinkSync8,
66017
66142
  writeFileSync as writeFileSync15
66018
66143
  } from "fs";
66019
- import { homedir as homedir26 } from "os";
66020
- import { dirname as dirname9, join as join28 } from "path";
66144
+ import { homedir as homedir27 } from "os";
66145
+ import { dirname as dirname9, join as join29 } from "path";
66021
66146
  import { fileURLToPath as fileURLToPath2 } from "url";
66022
66147
  function getVersion3() {
66023
66148
  return VERSION;
66024
66149
  }
66025
66150
  function clearAllModelCaches() {
66026
- const cacheDir = join28(homedir26(), ".claudish");
66027
- if (!existsSync22(cacheDir))
66151
+ const cacheDir = join29(homedir27(), ".claudish");
66152
+ if (!existsSync23(cacheDir))
66028
66153
  return;
66029
66154
  const cachePatterns = ["pricing-cache.json", "recommended-models-cache.json"];
66030
66155
  let cleared = 0;
@@ -66032,7 +66157,7 @@ function clearAllModelCaches() {
66032
66157
  const files = readdirSync5(cacheDir);
66033
66158
  for (const file2 of files) {
66034
66159
  if (cachePatterns.includes(file2)) {
66035
- unlinkSync7(join28(cacheDir, file2));
66160
+ unlinkSync8(join29(cacheDir, file2));
66036
66161
  cleared++;
66037
66162
  }
66038
66163
  }
@@ -66442,8 +66567,8 @@ Usage: claudish --models --provider <slug>`);
66442
66567
  });
66443
66568
  config3.resolvedDefaultProvider = resolved;
66444
66569
  if (resolved.legacyAutoPromoted && !config3.quiet) {
66445
- const markerFile = join28(homedir26(), ".claudish", ".legacy-litellm-hint-shown");
66446
- if (!existsSync22(markerFile)) {
66570
+ const markerFile = join29(homedir27(), ".claudish", ".legacy-litellm-hint-shown");
66571
+ if (!existsSync23(markerFile)) {
66447
66572
  const hint = buildLegacyHint(resolved);
66448
66573
  if (hint) {
66449
66574
  console.error(hint);
@@ -67517,7 +67642,7 @@ ${h("MORE INFO")}
67517
67642
  }
67518
67643
  function printAIAgentGuide() {
67519
67644
  try {
67520
- const guidePath = join28(__dirname3, "../AI_AGENT_GUIDE.md");
67645
+ const guidePath = join29(__dirname3, "../AI_AGENT_GUIDE.md");
67521
67646
  const guideContent = readFileSync21(guidePath, "utf-8");
67522
67647
  console.log(guideContent);
67523
67648
  } catch (error46) {
@@ -67534,19 +67659,19 @@ async function initializeClaudishSkill() {
67534
67659
  console.log(`\uD83D\uDD27 Initializing Claudish skill in current project...
67535
67660
  `);
67536
67661
  const cwd = process.cwd();
67537
- const claudeDir = join28(cwd, ".claude");
67538
- const skillsDir = join28(claudeDir, "skills");
67539
- const claudishSkillDir = join28(skillsDir, "claudish-usage");
67540
- const skillFile = join28(claudishSkillDir, "SKILL.md");
67541
- if (existsSync22(skillFile)) {
67662
+ const claudeDir = join29(cwd, ".claude");
67663
+ const skillsDir = join29(claudeDir, "skills");
67664
+ const claudishSkillDir = join29(skillsDir, "claudish-usage");
67665
+ const skillFile = join29(claudishSkillDir, "SKILL.md");
67666
+ if (existsSync23(skillFile)) {
67542
67667
  console.log("\u2705 Claudish skill already installed at:");
67543
67668
  console.log(` ${skillFile}
67544
67669
  `);
67545
67670
  console.log("\uD83D\uDCA1 To reinstall, delete the file and run 'claudish --init' again.");
67546
67671
  return;
67547
67672
  }
67548
- const sourceSkillPath = join28(__dirname3, "../skills/claudish-usage/SKILL.md");
67549
- if (!existsSync22(sourceSkillPath)) {
67673
+ const sourceSkillPath = join29(__dirname3, "../skills/claudish-usage/SKILL.md");
67674
+ if (!existsSync23(sourceSkillPath)) {
67550
67675
  console.error("\u274C Error: Claudish skill file not found in installation.");
67551
67676
  console.error(` Expected at: ${sourceSkillPath}`);
67552
67677
  console.error(`
@@ -67555,15 +67680,15 @@ async function initializeClaudishSkill() {
67555
67680
  process.exit(1);
67556
67681
  }
67557
67682
  try {
67558
- if (!existsSync22(claudeDir)) {
67683
+ if (!existsSync23(claudeDir)) {
67559
67684
  mkdirSync13(claudeDir, { recursive: true });
67560
67685
  console.log("\uD83D\uDCC1 Created .claude/ directory");
67561
67686
  }
67562
- if (!existsSync22(skillsDir)) {
67687
+ if (!existsSync23(skillsDir)) {
67563
67688
  mkdirSync13(skillsDir, { recursive: true });
67564
67689
  console.log("\uD83D\uDCC1 Created .claude/skills/ directory");
67565
67690
  }
67566
- if (!existsSync22(claudishSkillDir)) {
67691
+ if (!existsSync23(claudishSkillDir)) {
67567
67692
  mkdirSync13(claudishSkillDir, { recursive: true });
67568
67693
  console.log("\uD83D\uDCC1 Created .claude/skills/claudish-usage/ directory");
67569
67694
  }
@@ -67648,30 +67773,30 @@ __export(exports_update_checker, {
67648
67773
  clearCache: () => clearCache,
67649
67774
  checkForUpdates: () => checkForUpdates
67650
67775
  });
67651
- import { existsSync as existsSync23, mkdirSync as mkdirSync14, readFileSync as readFileSync22, unlinkSync as unlinkSync8, writeFileSync as writeFileSync16 } from "fs";
67652
- import { homedir as homedir27, platform as platform2, tmpdir } from "os";
67653
- import { join as join29 } from "path";
67776
+ import { existsSync as existsSync24, mkdirSync as mkdirSync14, readFileSync as readFileSync22, unlinkSync as unlinkSync9, writeFileSync as writeFileSync16 } from "fs";
67777
+ import { homedir as homedir28, platform as platform2, tmpdir } from "os";
67778
+ import { join as join30 } from "path";
67654
67779
  function getCacheFilePath() {
67655
67780
  let cacheDir;
67656
67781
  if (isWindows) {
67657
- const localAppData = process.env.LOCALAPPDATA || join29(homedir27(), "AppData", "Local");
67658
- cacheDir = join29(localAppData, "claudish");
67782
+ const localAppData = process.env.LOCALAPPDATA || join30(homedir28(), "AppData", "Local");
67783
+ cacheDir = join30(localAppData, "claudish");
67659
67784
  } else {
67660
- cacheDir = join29(homedir27(), ".cache", "claudish");
67785
+ cacheDir = join30(homedir28(), ".cache", "claudish");
67661
67786
  }
67662
67787
  try {
67663
- if (!existsSync23(cacheDir)) {
67788
+ if (!existsSync24(cacheDir)) {
67664
67789
  mkdirSync14(cacheDir, { recursive: true });
67665
67790
  }
67666
- return join29(cacheDir, "update-check.json");
67791
+ return join30(cacheDir, "update-check.json");
67667
67792
  } catch {
67668
- return join29(tmpdir(), "claudish-update-check.json");
67793
+ return join30(tmpdir(), "claudish-update-check.json");
67669
67794
  }
67670
67795
  }
67671
67796
  function readCache() {
67672
67797
  try {
67673
67798
  const cachePath = getCacheFilePath();
67674
- if (!existsSync23(cachePath)) {
67799
+ if (!existsSync24(cachePath)) {
67675
67800
  return null;
67676
67801
  }
67677
67802
  const data = JSON.parse(readFileSync22(cachePath, "utf-8"));
@@ -67697,8 +67822,8 @@ function isCacheValid(cache2) {
67697
67822
  function clearCache() {
67698
67823
  try {
67699
67824
  const cachePath = getCacheFilePath();
67700
- if (existsSync23(cachePath)) {
67701
- unlinkSync8(cachePath);
67825
+ if (existsSync24(cachePath)) {
67826
+ unlinkSync9(cachePath);
67702
67827
  }
67703
67828
  } catch {}
67704
67829
  }
@@ -68582,11 +68707,11 @@ var init_local_liveness = __esm(() => {
68582
68707
  });
68583
68708
 
68584
68709
  // src/providers/probe-catalog.ts
68585
- import { existsSync as existsSync24, mkdirSync as mkdirSync15, readFileSync as readFileSync23, writeFileSync as writeFileSync17 } from "fs";
68586
- import { homedir as homedir28 } from "os";
68587
- import { dirname as dirname10, join as join30 } from "path";
68710
+ import { existsSync as existsSync25, mkdirSync as mkdirSync15, readFileSync as readFileSync23, writeFileSync as writeFileSync17 } from "fs";
68711
+ import { homedir as homedir29 } from "os";
68712
+ import { dirname as dirname10, join as join31 } from "path";
68588
68713
  function readProbeModelsCache(path2 = PROBE_MODELS_CACHE_PATH) {
68589
- if (!existsSync24(path2))
68714
+ if (!existsSync25(path2))
68590
68715
  return null;
68591
68716
  let raw2;
68592
68717
  try {
@@ -68719,7 +68844,7 @@ function isValidResponse(raw2) {
68719
68844
  var PROBE_MODELS_URL = "https://us-central1-claudish-6da10.cloudfunctions.net/probeModels", CACHE_TTL_MS4, FETCH_TIMEOUT_MS3 = 15000, PROBE_MODELS_CACHE_PATH, _inFlight = null;
68720
68845
  var init_probe_catalog = __esm(() => {
68721
68846
  CACHE_TTL_MS4 = 60 * 60 * 1000;
68722
- PROBE_MODELS_CACHE_PATH = join30(homedir28(), ".claudish", "probe-models.json");
68847
+ PROBE_MODELS_CACHE_PATH = join31(homedir29(), ".claudish", "probe-models.json");
68723
68848
  });
68724
68849
 
68725
68850
  // src/tui/constants.ts
@@ -74917,13 +75042,15 @@ var exports_tui = {};
74917
75042
  __export(exports_tui, {
74918
75043
  startConfigTui: () => startConfigTui
74919
75044
  });
74920
- import { spawnSync as spawnSync3 } from "child_process";
75045
+ import { spawnSync as spawnSync4 } from "child_process";
74921
75046
  import { createCliRenderer as createCliRenderer2 } from "@opentui/core";
74922
75047
  import { createRoot as createRoot2 } from "@opentui/react";
74923
75048
  import { jsxDEV as jsxDEV17 } from "@opentui/react/jsx-dev-runtime";
74924
75049
  async function startConfigTui() {
74925
75050
  setStderrQuiet(true);
74926
- const loginRequest = { slug: null };
75051
+ const loginRequest = {
75052
+ slug: null
75053
+ };
74927
75054
  const requestLogin = (slug) => {
74928
75055
  loginRequest.slug = slug;
74929
75056
  };
@@ -74943,7 +75070,7 @@ async function startConfigTui() {
74943
75070
  console.log(`
74944
75071
  Launching: claudish login ${slug}
74945
75072
  `);
74946
- const result = spawnSync3(process.argv[0], [process.argv[1], "login", slug], {
75073
+ const result = spawnSync4(process.argv[0], [process.argv[1], "login", slug], {
74947
75074
  stdio: "inherit"
74948
75075
  });
74949
75076
  if (result.error) {
@@ -74955,7 +75082,10 @@ Launching: claudish login ${slug}
74955
75082
  \u274C Login exited with status ${result.status}
74956
75083
  `);
74957
75084
  } else {
74958
- if (slug === "gemini") {
75085
+ if (slug === "antigravity") {
75086
+ _resetAntigravityTokenState();
75087
+ invalidateProbeProxyHandlers("antigravity");
75088
+ } else if (slug === "gemini") {
74959
75089
  reloadGeminiCredentials();
74960
75090
  invalidateProbeProxyHandlers("google");
74961
75091
  invalidateProbeProxyHandlers("gemini-codeassist");
@@ -74976,6 +75106,7 @@ Returning to config\u2026
74976
75106
  }
74977
75107
  var isDirectRun = false;
74978
75108
  var init_tui = __esm(() => {
75109
+ init_antigravity_token();
74979
75110
  init_codex_oauth();
74980
75111
  init_gemini_oauth();
74981
75112
  init_kimi_oauth();
@@ -75064,17 +75195,17 @@ __export(exports_claude_runner, {
75064
75195
  import { spawn as spawn4 } from "child_process";
75065
75196
  import {
75066
75197
  closeSync as closeSync5,
75067
- existsSync as existsSync25,
75198
+ existsSync as existsSync26,
75068
75199
  mkdirSync as mkdirSync16,
75069
75200
  openSync as openSync5,
75070
75201
  readFileSync as readFileSync24,
75071
75202
  readdirSync as readdirSync6,
75072
75203
  statSync as statSync5,
75073
- unlinkSync as unlinkSync9,
75204
+ unlinkSync as unlinkSync10,
75074
75205
  writeFileSync as writeFileSync18
75075
75206
  } from "fs";
75076
- import { homedir as homedir29, tmpdir as tmpdir2 } from "os";
75077
- import { dirname as dirname11, join as join31 } from "path";
75207
+ import { homedir as homedir30, tmpdir as tmpdir2 } from "os";
75208
+ import { dirname as dirname11, join as join32 } from "path";
75078
75209
  import { isatty } from "tty";
75079
75210
  function releaseTerminalIsolation() {
75080
75211
  if (!restoreTerminal)
@@ -75109,7 +75240,7 @@ function isProxyAuthMode(config3) {
75109
75240
  }
75110
75241
  function managedSettingsPath() {
75111
75242
  if (isWindows2()) {
75112
- return join31(process.env.PROGRAMDATA || "C:\\ProgramData", "ClaudeCode", "managed-settings.json");
75243
+ return join32(process.env.PROGRAMDATA || "C:\\ProgramData", "ClaudeCode", "managed-settings.json");
75113
75244
  }
75114
75245
  if (process.platform === "darwin") {
75115
75246
  return "/Library/Application Support/ClaudeCode/managed-settings.json";
@@ -75130,9 +75261,9 @@ function isWindows2() {
75130
75261
  }
75131
75262
  function createStatusLineScript(tokenFilePath) {
75132
75263
  const homeDir = process.env.HOME || process.env.USERPROFILE || tmpdir2();
75133
- const claudishDir = join31(homeDir, ".claudish");
75264
+ const claudishDir = join32(homeDir, ".claudish");
75134
75265
  const timestamp = Date.now();
75135
- const scriptPath = join31(claudishDir, `status-${timestamp}.js`);
75266
+ const scriptPath = join32(claudishDir, `status-${timestamp}.js`);
75136
75267
  const escapedTokenPath = tokenFilePath.replace(/\\/g, "\\\\");
75137
75268
  const script = `
75138
75269
  const fs = require('fs');
@@ -75287,11 +75418,11 @@ function cleanupStaleTokenFiles(dir, now = Date.now(), maxAgeMs = STALE_TOKEN_FI
75287
75418
  if (!name.startsWith("tokens-") || !name.endsWith(".json"))
75288
75419
  continue;
75289
75420
  scanned++;
75290
- const full = join31(dir, name);
75421
+ const full = join32(dir, name);
75291
75422
  try {
75292
75423
  if (statSync5(full).mtimeMs >= cutoff)
75293
75424
  continue;
75294
- unlinkSync9(full);
75425
+ unlinkSync10(full);
75295
75426
  removed++;
75296
75427
  } catch {}
75297
75428
  }
@@ -75316,13 +75447,13 @@ function parseSettingsArgSafe(value) {
75316
75447
  }
75317
75448
  function userSettingsFileCandidates(cwd) {
75318
75449
  return [
75319
- join31(homedir29(), ".claude", "settings.json"),
75320
- join31(cwd, ".claude", "settings.json"),
75321
- join31(cwd, ".claude", "settings.local.json")
75450
+ join32(homedir30(), ".claude", "settings.json"),
75451
+ join32(cwd, ".claude", "settings.json"),
75452
+ join32(cwd, ".claude", "settings.local.json")
75322
75453
  ];
75323
75454
  }
75324
75455
  function discoverUserStatusLineCommand(claudeArgs = [], cwd = process.cwd()) {
75325
- const sources = userSettingsFileCandidates(cwd).filter((file2) => existsSync25(file2));
75456
+ const sources = userSettingsFileCandidates(cwd).filter((file2) => existsSync26(file2));
75326
75457
  const idx = claudeArgs.indexOf("--settings");
75327
75458
  const settingsArg = idx === -1 ? undefined : claudeArgs[idx + 1];
75328
75459
  if (settingsArg)
@@ -75359,13 +75490,13 @@ function buildChainedStatusCommand(userCommand, claudishBody, claudishSegment) {
75359
75490
  }
75360
75491
  function createTempSettingsFile(_modelDisplay, port, proxyAuthMode, userStatusLineCommand) {
75361
75492
  const homeDir = process.env.HOME || process.env.USERPROFILE || tmpdir2();
75362
- const claudishDir = join31(homeDir, ".claudish");
75493
+ const claudishDir = join32(homeDir, ".claudish");
75363
75494
  try {
75364
75495
  mkdirSync16(claudishDir, { recursive: true });
75365
75496
  } catch {}
75366
75497
  const timestamp = Date.now();
75367
- const tempPath = join31(claudishDir, `settings-${timestamp}.json`);
75368
- const tokenFilePath = join31(claudishDir, `tokens-${port}.json`);
75498
+ const tempPath = join32(claudishDir, `settings-${timestamp}.json`);
75499
+ const tokenFilePath = join32(claudishDir, `tokens-${port}.json`);
75369
75500
  cleanupStaleTokenFiles(claudishDir);
75370
75501
  initializeTokenFile(tokenFilePath);
75371
75502
  let statusCommand;
@@ -75632,8 +75763,8 @@ async function runClaudeWithProxy(config3, proxyUrl, onCleanup) {
75632
75763
  console.error("Install it from: https://claude.com/claude-code");
75633
75764
  console.error(`
75634
75765
  Or set CLAUDE_PATH to your custom installation:`);
75635
- const home = homedir29();
75636
- const localPath = isWindows2() ? join31(home, ".claude", "local", "claude.exe") : join31(home, ".claude", "local", "claude");
75766
+ const home = homedir30();
75767
+ const localPath = isWindows2() ? join32(home, ".claude", "local", "claude.exe") : join32(home, ".claude", "local", "claude");
75637
75768
  console.error(` export CLAUDE_PATH=${localPath}`);
75638
75769
  process.exit(1);
75639
75770
  }
@@ -75684,7 +75815,7 @@ Or set CLAUDE_PATH to your custom installation:`);
75684
75815
  });
75685
75816
  releaseTerminalIsolation();
75686
75817
  try {
75687
- unlinkSync9(tempSettingsPath);
75818
+ unlinkSync10(tempSettingsPath);
75688
75819
  } catch {}
75689
75820
  return exitCode;
75690
75821
  }
@@ -75704,7 +75835,7 @@ function setupSignalHandlers(proc, tempSettingsPath, quiet, onCleanup) {
75704
75835
  } catch {}
75705
75836
  }
75706
75837
  try {
75707
- unlinkSync9(tempSettingsPath);
75838
+ unlinkSync10(tempSettingsPath);
75708
75839
  } catch {}
75709
75840
  process.exit(0);
75710
75841
  });
@@ -75713,23 +75844,23 @@ function setupSignalHandlers(proc, tempSettingsPath, quiet, onCleanup) {
75713
75844
  async function findClaudeBinary() {
75714
75845
  const isWindows3 = process.platform === "win32";
75715
75846
  if (process.env.CLAUDE_PATH) {
75716
- if (existsSync25(process.env.CLAUDE_PATH)) {
75847
+ if (existsSync26(process.env.CLAUDE_PATH)) {
75717
75848
  return process.env.CLAUDE_PATH;
75718
75849
  }
75719
75850
  }
75720
- const home = homedir29();
75721
- const localPath = isWindows3 ? join31(home, ".claude", "local", "claude.exe") : join31(home, ".claude", "local", "claude");
75722
- if (existsSync25(localPath)) {
75851
+ const home = homedir30();
75852
+ const localPath = isWindows3 ? join32(home, ".claude", "local", "claude.exe") : join32(home, ".claude", "local", "claude");
75853
+ if (existsSync26(localPath)) {
75723
75854
  return localPath;
75724
75855
  }
75725
75856
  if (isWindows3) {
75726
75857
  const windowsPaths = [
75727
- join31(home, "AppData", "Roaming", "npm", "claude.cmd"),
75728
- join31(home, ".npm-global", "claude.cmd"),
75729
- join31(home, "node_modules", ".bin", "claude.cmd")
75858
+ join32(home, "AppData", "Roaming", "npm", "claude.cmd"),
75859
+ join32(home, ".npm-global", "claude.cmd"),
75860
+ join32(home, "node_modules", ".bin", "claude.cmd")
75730
75861
  ];
75731
75862
  for (const path2 of windowsPaths) {
75732
- if (existsSync25(path2)) {
75863
+ if (existsSync26(path2)) {
75733
75864
  return path2;
75734
75865
  }
75735
75866
  }
@@ -75737,14 +75868,14 @@ async function findClaudeBinary() {
75737
75868
  const commonPaths = [
75738
75869
  "/usr/local/bin/claude",
75739
75870
  "/opt/homebrew/bin/claude",
75740
- join31(home, ".npm-global/bin/claude"),
75741
- join31(home, ".local/bin/claude"),
75742
- join31(home, "node_modules/.bin/claude"),
75871
+ join32(home, ".npm-global/bin/claude"),
75872
+ join32(home, ".local/bin/claude"),
75873
+ join32(home, "node_modules/.bin/claude"),
75743
75874
  "/data/data/com.termux/files/usr/bin/claude",
75744
- join31(home, "../usr/bin/claude")
75875
+ join32(home, "../usr/bin/claude")
75745
75876
  ];
75746
75877
  for (const path2 of commonPaths) {
75747
- if (existsSync25(path2)) {
75878
+ if (existsSync26(path2)) {
75748
75879
  return path2;
75749
75880
  }
75750
75881
  }
@@ -75804,18 +75935,18 @@ __export(exports_diag_output, {
75804
75935
  NullDiagOutput: () => NullDiagOutput,
75805
75936
  LogFileDiagOutput: () => LogFileDiagOutput
75806
75937
  });
75807
- import { createWriteStream as createWriteStream3, mkdirSync as mkdirSync17, unlinkSync as unlinkSync10, writeFileSync as writeFileSync19 } from "fs";
75808
- import { homedir as homedir30 } from "os";
75809
- import { join as join32 } from "path";
75938
+ import { createWriteStream as createWriteStream3, mkdirSync as mkdirSync17, unlinkSync as unlinkSync11, writeFileSync as writeFileSync19 } from "fs";
75939
+ import { homedir as homedir31 } from "os";
75940
+ import { join as join33 } from "path";
75810
75941
  function getClaudishDir() {
75811
- const dir = join32(homedir30(), ".claudish");
75942
+ const dir = join33(homedir31(), ".claudish");
75812
75943
  try {
75813
75944
  mkdirSync17(dir, { recursive: true });
75814
75945
  } catch {}
75815
75946
  return dir;
75816
75947
  }
75817
75948
  function getDiagLogPath() {
75818
- return join32(getClaudishDir(), `diag-${process.pid}.log`);
75949
+ return join33(getClaudishDir(), `diag-${process.pid}.log`);
75819
75950
  }
75820
75951
 
75821
75952
  class LogFileDiagOutput {
@@ -75843,7 +75974,7 @@ class LogFileDiagOutput {
75843
75974
  this.stream.end();
75844
75975
  } catch {}
75845
75976
  try {
75846
- unlinkSync10(this.logPath);
75977
+ unlinkSync11(this.logPath);
75847
75978
  } catch {}
75848
75979
  }
75849
75980
  getLogPath() {
@@ -76026,9 +76157,9 @@ __export(exports_team_grid, {
76026
76157
  });
76027
76158
  import { spawn as spawn5 } from "child_process";
76028
76159
  import { execSync as execSync2 } from "child_process";
76029
- import { existsSync as existsSync26, readFileSync as readFileSync25, writeFileSync as writeFileSync20 } from "fs";
76160
+ import { existsSync as existsSync27, readFileSync as readFileSync25, writeFileSync as writeFileSync20 } from "fs";
76030
76161
  import { connect as netConnect } from "net";
76031
- import { dirname as dirname12, join as join33 } from "path";
76162
+ import { dirname as dirname12, join as join34 } from "path";
76032
76163
  import { setTimeout as wait } from "timers/promises";
76033
76164
  import { fileURLToPath as fileURLToPath3 } from "url";
76034
76165
  function resolveRouteInfo(modelId) {
@@ -76122,18 +76253,18 @@ function buildPaneHeader(model, prompt, bg) {
76122
76253
  function findMagmuxBinary() {
76123
76254
  const thisFile = fileURLToPath3(import.meta.url);
76124
76255
  const thisDir = dirname12(thisFile);
76125
- const pkgRoot = join33(thisDir, "..");
76256
+ const pkgRoot = join34(thisDir, "..");
76126
76257
  const platform3 = process.platform;
76127
76258
  const arch = process.arch;
76128
- const bundledMagmux = join33(pkgRoot, "native", `magmux-${platform3}-${arch}`);
76129
- if (existsSync26(bundledMagmux))
76259
+ const bundledMagmux = join34(pkgRoot, "native", `magmux-${platform3}-${arch}`);
76260
+ if (existsSync27(bundledMagmux))
76130
76261
  return bundledMagmux;
76131
76262
  try {
76132
76263
  const pkgName = `@claudish/magmux-${platform3}-${arch}`;
76133
76264
  let searchDir = pkgRoot;
76134
76265
  for (let i = 0;i < 5; i++) {
76135
- const candidate = join33(searchDir, "node_modules", pkgName, "bin", "magmux");
76136
- if (existsSync26(candidate))
76266
+ const candidate = join34(searchDir, "node_modules", pkgName, "bin", "magmux");
76267
+ if (existsSync27(candidate))
76137
76268
  return candidate;
76138
76269
  const parent = dirname12(searchDir);
76139
76270
  if (parent === searchDir)
@@ -76152,7 +76283,7 @@ function findMagmuxBinary() {
76152
76283
  async function subscribeToMagmux(sockPath, onEvent) {
76153
76284
  let client = null;
76154
76285
  for (let attempt = 0;attempt < 40; attempt++) {
76155
- if (existsSync26(sockPath)) {
76286
+ if (existsSync27(sockPath)) {
76156
76287
  try {
76157
76288
  client = await new Promise((resolve4, reject) => {
76158
76289
  const s = netConnect(sockPath);
@@ -76239,9 +76370,9 @@ async function runWithGrid(sessionPath, models, input, opts) {
76239
76370
  const keep = opts?.keep ?? false;
76240
76371
  const manifest = setupSession(sessionPath, models, input);
76241
76372
  const startedAt = new Date().toISOString();
76242
- const gridfilePath = join33(sessionPath, "gridfile.txt");
76243
- const prompt = readFileSync25(join33(sessionPath, "input.md"), "utf-8").replace(/'/g, "'\\''").replace(/\n/g, " ");
76244
- const rawPrompt = readFileSync25(join33(sessionPath, "input.md"), "utf-8");
76373
+ const gridfilePath = join34(sessionPath, "gridfile.txt");
76374
+ const prompt = readFileSync25(join34(sessionPath, "input.md"), "utf-8").replace(/'/g, "'\\''").replace(/\n/g, " ");
76375
+ const rawPrompt = readFileSync25(join34(sessionPath, "input.md"), "utf-8");
76245
76376
  const usedBannerColors = new Set;
76246
76377
  const gridLines = Object.entries(manifest.models).map(([anonId]) => {
76247
76378
  const model = manifest.models[anonId].model;
@@ -76272,7 +76403,7 @@ async function runWithGrid(sessionPath, models, input, opts) {
76272
76403
  });
76273
76404
  const [{ results: results2 }] = await Promise.all([subscription, procExit]);
76274
76405
  const status = buildTeamStatus(manifest, startedAt, results2?.panes ?? null);
76275
- const statusPath = join33(sessionPath, "status.json");
76406
+ const statusPath = join34(sessionPath, "status.json");
76276
76407
  writeFileSync20(statusPath, JSON.stringify(status, null, 2), "utf-8");
76277
76408
  return status;
76278
76409
  }
@@ -76296,8 +76427,8 @@ var init_team_grid = __esm(() => {
76296
76427
  init_op_source();
76297
76428
  init_startup_trace();
76298
76429
  var import_dotenv3 = __toESM(require_main(), 1);
76299
- import { existsSync as existsSync27, readFileSync as readFileSync26 } from "fs";
76300
- import { join as join34, resolve as resolve4 } from "path";
76430
+ import { existsSync as existsSync28, readFileSync as readFileSync26 } from "fs";
76431
+ import { join as join35, resolve as resolve4 } from "path";
76301
76432
  import_dotenv3.config({ quiet: true });
76302
76433
  function classifyStartupKind() {
76303
76434
  const argv = process.argv.slice(2);
@@ -76396,7 +76527,7 @@ async function applyConfigOverride() {
76396
76527
  const { planConfigOverride: planConfigOverride2, setConfigFileOverride: setConfigFileOverride2 } = await Promise.resolve().then(() => exports_config_override);
76397
76528
  const plan = planConfigOverride2(process.argv.slice(2), process.env, {
76398
76529
  resolve: resolve4,
76399
- exists: existsSync27
76530
+ exists: existsSync28
76400
76531
  });
76401
76532
  if (plan.kind === "none")
76402
76533
  return;
@@ -76551,7 +76682,7 @@ async function runCli() {
76551
76682
  process.exit(1);
76552
76683
  }
76553
76684
  const mode = cliConfig.teamMode ?? "default";
76554
- const sessionPath = join34(process.cwd(), `.claudish-team-${Date.now()}`);
76685
+ const sessionPath = join35(process.cwd(), `.claudish-team-${Date.now()}`);
76555
76686
  if (mode === "json") {
76556
76687
  const { setupSession: setupSession2, runModels: runModels2 } = await Promise.resolve().then(() => (init_team_orchestrator(), exports_team_orchestrator));
76557
76688
  setupSession2(sessionPath, cliConfig.team, prompt);
@@ -76561,7 +76692,7 @@ async function runCli() {
76561
76692
  });
76562
76693
  const result = { ...status2, responses: {} };
76563
76694
  for (const anonId of Object.keys(status2.models)) {
76564
- const responsePath = join34(sessionPath, `response-${anonId}.md`);
76695
+ const responsePath = join35(sessionPath, `response-${anonId}.md`);
76565
76696
  try {
76566
76697
  const raw2 = readFileSync26(responsePath, "utf-8").trim();
76567
76698
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudish",
3
- "version": "7.33.0",
3
+ "version": "7.34.0",
4
4
  "description": "Run Claude Code with any model - OpenRouter, Ollama, LM Studio & local models",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -60,10 +60,10 @@
60
60
  "ai"
61
61
  ],
62
62
  "optionalDependencies": {
63
- "@claudish/magmux-darwin-arm64": "7.33.0",
64
- "@claudish/magmux-darwin-x64": "7.33.0",
65
- "@claudish/magmux-linux-arm64": "7.33.0",
66
- "@claudish/magmux-linux-x64": "7.33.0"
63
+ "@claudish/magmux-darwin-arm64": "7.34.0",
64
+ "@claudish/magmux-darwin-x64": "7.34.0",
65
+ "@claudish/magmux-linux-arm64": "7.34.0",
66
+ "@claudish/magmux-linux-x64": "7.34.0"
67
67
  },
68
68
  "author": "Jack Rudenko <i@madappgang.com>",
69
69
  "license": "MIT",