snowcode 0.9.1 → 0.9.2

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 +97 -242
  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:33:03.306Z",
125649
125652
  deploymentEnvironment: env2.detectDeploymentEnvironment(),
125650
125653
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
125651
125654
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -130639,7 +130642,8 @@ var init_providerConfig = __esm(() => {
130639
130642
  import { existsSync as existsSync8, mkdirSync as mkdirSync6, readFileSync as readFileSync10, writeFileSync as writeFileSync5 } from "node:fs";
130640
130643
  import { join as join30 } from "node:path";
130641
130644
  function getCurrentVersion() {
130642
- return "0.9.1".replace(/[^0-9.]/g, "") || "0.0.0";
130645
+ const displayVersion = (typeof MACRO !== "undefined" ? "0.9.2" : undefined) ?? "0.0.0";
130646
+ return displayVersion.replace(/[^0-9.]/g, "") || "0.0.0";
130643
130647
  }
130644
130648
  function cachePath() {
130645
130649
  return join30(getClaudeConfigHomeDir(), "update-check.json");
@@ -130662,6 +130666,23 @@ function writeUpdateCache(cache2) {
130662
130666
  writeFileSync5(cachePath(), JSON.stringify(cache2));
130663
130667
  } catch {}
130664
130668
  }
130669
+ function isUpdateCacheFresh(cache2, now = Date.now()) {
130670
+ return Boolean(cache2 && now - cache2.checkedAt < CHECK_INTERVAL_MS);
130671
+ }
130672
+ async function fetchLatestVersion(timeoutMs) {
130673
+ try {
130674
+ const res = await fetch(`https://registry.npmjs.org/${PKG_NAME}/latest`, {
130675
+ signal: AbortSignal.timeout(timeoutMs),
130676
+ headers: { Accept: "application/json" }
130677
+ });
130678
+ if (!res.ok)
130679
+ return null;
130680
+ const data = await res.json();
130681
+ return typeof data.version === "string" ? data.version : null;
130682
+ } catch {
130683
+ return null;
130684
+ }
130685
+ }
130665
130686
  function getAvailableUpdate(cache2) {
130666
130687
  if (!cache2)
130667
130688
  return null;
@@ -130677,25 +130698,25 @@ function getAvailableUpdate(cache2) {
130677
130698
  }
130678
130699
  return null;
130679
130700
  }
130680
- function checkForUpdateInBackground() {
130701
+ async function refreshUpdateCache(options) {
130681
130702
  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
- })();
130703
+ if (!options?.force && isUpdateCacheFresh(cache2)) {
130704
+ return cache2;
130705
+ }
130706
+ const latestVersion = await fetchLatestVersion(options?.timeoutMs ?? 5000);
130707
+ if (!latestVersion) {
130708
+ return cache2;
130709
+ }
130710
+ const nextCache = {
130711
+ latestVersion,
130712
+ checkedAt: Date.now()
130713
+ };
130714
+ writeUpdateCache(nextCache);
130715
+ return nextCache;
130716
+ }
130717
+ async function getAvailableUpdateWithRefresh(options) {
130718
+ const cache2 = await refreshUpdateCache(options);
130719
+ return getAvailableUpdate(cache2);
130699
130720
  }
130700
130721
  var PKG_NAME = "snowcode", CHECK_INTERVAL_MS;
130701
130722
  var init_updateCheck = __esm(() => {
@@ -130801,7 +130822,7 @@ function boxRow(content, width, rawLen) {
130801
130822
  const pad = Math.max(0, width - 2 - rawLen);
130802
130823
  return `${rgb(...BORDER)}│${RESET}${content}${" ".repeat(pad)}${rgb(...BORDER)}│${RESET}`;
130803
130824
  }
130804
- function printStartupScreen() {
130825
+ async function printStartupScreen() {
130805
130826
  if (process.env.CI || !process.stdout.isTTY)
130806
130827
  return;
130807
130828
  const p = detectProvider();
@@ -130836,9 +130857,8 @@ function printStartupScreen() {
130836
130857
  const sLen = ` ● ${sL} Ready — type /help to begin`.length;
130837
130858
  out.push(boxRow(sRow, W2, sLen));
130838
130859
  out.push(`${rgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET}`);
130839
- const _ver = "0.9.1";
130840
- checkForUpdateInBackground();
130841
- const _update = getAvailableUpdate(readUpdateCache());
130860
+ const _ver = "0.9.2";
130861
+ const _update = await getAvailableUpdateWithRefresh({ timeoutMs: 1200 });
130842
130862
  out.push(` ${DIM}${rgb(...DIMCOL)}snowcode v${_ver}${RESET}`);
130843
130863
  if (_update) {
130844
130864
  out.push(` ${rgb(...ACCENT)}★ Update available v${_update} → /update${RESET}`);
@@ -294876,14 +294896,6 @@ function ConsoleOAuthFlow({
294876
294896
  context: "Confirmation",
294877
294897
  isActive: oauthStatus.state === "success" && mode !== "setup-token"
294878
294898
  });
294879
- useKeybinding("confirm:yes", () => {
294880
- setOAuthStatus({
294881
- state: "idle"
294882
- });
294883
- }, {
294884
- context: "Confirmation",
294885
- isActive: oauthStatus.state === "platform_setup"
294886
- });
294887
294899
  useKeybinding("confirm:yes", () => {
294888
294900
  if (oauthStatus.state === "error" && oauthStatus.toRetry) {
294889
294901
  setPastedCode("");
@@ -295081,7 +295093,7 @@ function ConsoleOAuthFlow({
295081
295093
  children: [
295082
295094
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295083
295095
  color: "success",
295084
- children: "Long-lived authentication token created successfully!"
295096
+ children: "Long-lived authentication token created successfully!"
295085
295097
  }, undefined, false, undefined, this),
295086
295098
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedBox_default, {
295087
295099
  flexDirection: "column",
@@ -295214,21 +295226,7 @@ function OAuthStatusMessage(t0) {
295214
295226
  }
295215
295227
  let t6;
295216
295228
  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
- }];
295229
+ t6 = [t4, t5];
295232
295230
  $2[5] = t6;
295233
295231
  } else {
295234
295232
  t6 = $2[5];
@@ -295239,22 +295237,15 @@ function OAuthStatusMessage(t0) {
295239
295237
  children: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(Select, {
295240
295238
  options: t6,
295241
295239
  onChange: (value_0) => {
295242
- if (value_0 === "platform") {
295243
- logEvent("tengu_oauth_platform_selected", {});
295244
- setOAuthStatus({
295245
- state: "platform_setup"
295246
- });
295240
+ setOAuthStatus({
295241
+ state: "ready_to_start"
295242
+ });
295243
+ if (value_0 === "claudeai") {
295244
+ logEvent("tengu_oauth_claudeai_selected", {});
295245
+ setLoginWithClaudeAi(true);
295247
295246
  } 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
- }
295247
+ logEvent("tengu_oauth_console_selected", {});
295248
+ setLoginWithClaudeAi(false);
295258
295249
  }
295259
295250
  }
295260
295251
  }, undefined, false, undefined, this)
@@ -295285,156 +295276,6 @@ function OAuthStatusMessage(t0) {
295285
295276
  }
295286
295277
  return t8;
295287
295278
  }
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
295279
  case "waiting_for_login": {
295439
295280
  let t1;
295440
295281
  if ($2[20] !== forcedMethodMessage) {
@@ -295455,7 +295296,7 @@ function OAuthStatusMessage(t0) {
295455
295296
  children: [
295456
295297
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(Spinner, {}, undefined, false, undefined, this),
295457
295298
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295458
- children: "Opening browser to sign in"
295299
+ children: "Opening browser to sign in..."
295459
295300
  }, undefined, false, undefined, this)
295460
295301
  ]
295461
295302
  }, undefined, true, undefined, this);
@@ -295524,7 +295365,7 @@ function OAuthStatusMessage(t0) {
295524
295365
  children: [
295525
295366
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(Spinner, {}, undefined, false, undefined, this),
295526
295367
  /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295527
- children: "Creating API key for Claude Code"
295368
+ children: "Creating API key for Claude Code..."
295528
295369
  }, undefined, false, undefined, this)
295529
295370
  ]
295530
295371
  }, undefined, true, undefined, this)
@@ -295543,7 +295384,7 @@ function OAuthStatusMessage(t0) {
295543
295384
  gap: 1,
295544
295385
  children: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
295545
295386
  color: "permission",
295546
- children: "Retrying"
295387
+ children: "Retrying..."
295547
295388
  }, undefined, false, undefined, this)
295548
295389
  }, undefined, false, undefined, this);
295549
295390
  $2[38] = t1;
@@ -295575,7 +295416,7 @@ function OAuthStatusMessage(t0) {
295575
295416
  bold: true,
295576
295417
  children: "Enter"
295577
295418
  }, undefined, false, undefined, this),
295578
- " to continue"
295419
+ " to continue..."
295579
295420
  ]
295580
295421
  }, undefined, true, undefined, this)
295581
295422
  ]
@@ -371074,7 +370915,7 @@ function getAnthropicEnvMetadata() {
371074
370915
  function getBuildAgeMinutes() {
371075
370916
  if (false)
371076
370917
  ;
371077
- const buildTime = new Date("2026-04-05T03:08:12.888Z").getTime();
370918
+ const buildTime = new Date("2026-04-05T03:33:03.306Z").getTime();
371078
370919
  if (isNaN(buildTime))
371079
370920
  return;
371080
370921
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -386961,7 +386802,7 @@ var init_messages3 = __esm(() => {
386961
386802
 
386962
386803
  // src/services/api/errors.ts
386963
386804
  function startsWithApiErrorPrefix(text) {
386964
- return text.startsWith(API_ERROR_MESSAGE_PREFIX) || text.startsWith(`Please run /login · ${API_ERROR_MESSAGE_PREFIX}`);
386805
+ 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
386806
  }
386966
386807
  function isPromptTooLongMessage(msg) {
386967
386808
  if (!msg.isApiErrorMessage) {
@@ -387205,7 +387046,7 @@ function getAssistantMessageFromError(error42, model, options2) {
387205
387046
  if (error42.message.includes("Extra usage is required for long context")) {
387206
387047
  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
387048
  return createAssistantAPIErrorMessage({
387208
- content: `${API_ERROR_MESSAGE_PREFIX}: Extra usage is required for 1M context · ${hint}`,
387049
+ content: `${API_ERROR_MESSAGE_PREFIX}: Extra usage is required for 1M context - ${hint}`,
387209
387050
  error: "rate_limit"
387210
387051
  });
387211
387052
  }
@@ -387213,7 +387054,7 @@ function getAssistantMessageFromError(error42, model, options2) {
387213
387054
  const innerMessage = stripped.match(/"message"\s*:\s*"([^"]*)"/)?.[1];
387214
387055
  const detail = innerMessage || stripped;
387215
387056
  return createAssistantAPIErrorMessage({
387216
- content: `${API_ERROR_MESSAGE_PREFIX}: Request rejected (429) · ${detail || "this may be a temporary capacity issue check status.anthropic.com"}`,
387057
+ content: `${API_ERROR_MESSAGE_PREFIX}: Request rejected (429) - ${detail || "this may be a temporary capacity issue - check status.anthropic.com"}`,
387217
387058
  error: "rate_limit"
387218
387059
  });
387219
387060
  }
@@ -387308,7 +387149,7 @@ Run /share and post the JSON file to ${MACRO.FEEDBACK_CHANNEL}.`;
387308
387149
  }
387309
387150
  if (isClaudeAISubscriber() && error42 instanceof import_sdk11.APIError && error42.status === 400 && error42.message.toLowerCase().includes("invalid model name") && (isNonCustomOpusModel(model) || model === "opus")) {
387310
387151
  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.",
387152
+ 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
387153
  error: "invalid_request"
387313
387154
  });
387314
387155
  }
@@ -387372,7 +387213,7 @@ Run /share and post the JSON file to ${MACRO.FEEDBACK_CHANNEL}.`;
387372
387213
  }
387373
387214
  return createAssistantAPIErrorMessage({
387374
387215
  error: "authentication_failed",
387375
- content: getIsNonInteractiveSession() ? `Failed to authenticate. ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}` : `Please run /login · ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}`
387216
+ content: getIsNonInteractiveSession() ? `Failed to authenticate. ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}` : `Please run /auth - ${API_ERROR_MESSAGE_PREFIX}: ${error42.message}`
387376
387217
  });
387377
387218
  }
387378
387219
  if (isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) && error42 instanceof Error && error42.message.toLowerCase().includes("model id")) {
@@ -387531,7 +387372,7 @@ function getErrorMessageIfRefusal(stopReason, model) {
387531
387372
  error: "invalid_request"
387532
387373
  });
387533
387374
  }
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.";
387375
+ 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
387376
  var init_errors6 = __esm(() => {
387536
387377
  init_betas();
387537
387378
  init_auth2();
@@ -412401,7 +412242,8 @@ var init_auth8 = __esm(() => {
412401
412242
  var auth_default = () => ({
412402
412243
  type: "local-jsx",
412403
412244
  name: "auth",
412404
- description: "Sign in to a provider — claude.ai, OpenAI, Gemini, Z.AI",
412245
+ aliases: ["login"],
412246
+ description: "Sign in to a provider - Claude, Codex, Gemini, Z.AI",
412405
412247
  isEnabled: () => true,
412406
412248
  load: () => Promise.resolve().then(() => (init_auth8(), exports_auth3))
412407
412249
  });
@@ -412413,29 +412255,33 @@ __export(exports_update, {
412413
412255
  });
412414
412256
  import { execSync } from "node:child_process";
412415
412257
  var call25 = async () => {
412416
- checkForUpdateInBackground();
412417
- const cache4 = readUpdateCache();
412258
+ const cache4 = await refreshUpdateCache({ force: true, timeoutMs: 5000 });
412418
412259
  const latest = getAvailableUpdate(cache4);
412419
412260
  const current = getCurrentVersion();
412261
+ if (!cache4) {
412262
+ return {
412263
+ type: "text",
412264
+ value: "Failed to check for updates. Try again in a moment."
412265
+ };
412266
+ }
412420
412267
  if (!latest) {
412421
- const checked = cache4 ? ` (checked ${new Date(cache4.checkedAt).toLocaleString()})` : " (not yet checked — try again in a moment)";
412422
412268
  return {
412423
412269
  type: "text",
412424
- value: `snowcode v${current} is up to date${checked}`
412270
+ value: `snowcode v${current} is up to date (checked ${new Date(cache4.checkedAt).toLocaleString()})`
412425
412271
  };
412426
412272
  }
412427
412273
  try {
412428
412274
  execSync("npm install -g snowcode@latest", { stdio: "inherit" });
412429
412275
  return {
412430
412276
  type: "text",
412431
- value: `✓ Updated snowcode v${current} v${latest}
412277
+ value: `Updated snowcode v${current} -> v${latest}
412432
412278
  Restart to use the new version.`
412433
412279
  };
412434
412280
  } catch {
412435
412281
  return {
412436
412282
  type: "text",
412437
412283
  value: [
412438
- `Update available: v${current} v${latest}`,
412284
+ `Update available: v${current} -> v${latest}`,
412439
412285
  "",
412440
412286
  "Install with one of:",
412441
412287
  " npm install -g snowcode@latest",
@@ -464908,7 +464754,7 @@ var init_bridge_kick = __esm(() => {
464908
464754
  var call59 = async () => {
464909
464755
  return {
464910
464756
  type: "text",
464911
- value: `${"99.0.0"} (built ${"2026-04-05T03:08:12.888Z"})`
464757
+ value: `${"99.0.0"} (built ${"2026-04-05T03:33:03.306Z"})`
464912
464758
  };
464913
464759
  }, version2, version_default;
464914
464760
  var init_version = __esm(() => {
@@ -507688,6 +507534,9 @@ var init_SandboxPromptFooterHint = __esm(() => {
507688
507534
  });
507689
507535
 
507690
507536
  // src/components/PromptInput/Notifications.tsx
507537
+ function hasAnyConfiguredThirdPartyAuth() {
507538
+ 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);
507539
+ }
507691
507540
  function Notifications(t0) {
507692
507541
  const $2 = import_react_compiler_runtime307.c(34);
507693
507542
  const {
@@ -507731,6 +507580,7 @@ function Notifications(t0) {
507731
507580
  status: ideStatus
507732
507581
  } = useIdeConnectionStatus(mcpClients);
507733
507582
  const notifications = useAppState(_temp179);
507583
+ const authVersion = useAppState((s) => s.authVersion);
507734
507584
  const {
507735
507585
  addNotification,
507736
507586
  removeNotification
@@ -507772,6 +507622,7 @@ function Notifications(t0) {
507772
507622
  }
507773
507623
  const subscriptionType = t7;
507774
507624
  const isTeamOrEnterprise = subscriptionType === "team" || subscriptionType === "enterprise";
507625
+ const hasAnyLoggedInProvider = import_react232.useMemo(() => getSubscriptionType() !== null || getEnabledAccounts().length > 0 || hasAnyConfiguredThirdPartyAuth(), [authVersion]);
507775
507626
  let t8;
507776
507627
  if ($2[9] === Symbol.for("react.memo_cache_sentinel")) {
507777
507628
  t8 = getExternalEditor();
@@ -507911,6 +507762,8 @@ function NotificationContent({
507911
507762
  }, 1000, setApiKeyHelperSlow);
507912
507763
  return () => clearInterval(interval);
507913
507764
  }, []);
507765
+ const authVersion_0 = useAppState((s_2) => s_2.authVersion);
507766
+ const hasAnyLoggedInProvider = import_react232.useMemo(() => getSubscriptionType() !== null || getEnabledAccounts().length > 0 || hasAnyConfiguredThirdPartyAuth(), [authVersion_0]);
507914
507767
  const voiceState = "idle";
507915
507768
  const voiceEnabled = false;
507916
507769
  const voiceError = null;
@@ -507959,11 +507812,11 @@ function NotificationContent({
507959
507812
  }, undefined, true, undefined, this)
507960
507813
  ]
507961
507814
  }, undefined, true, undefined, this),
507962
- (apiKeyStatus === "invalid" || apiKeyStatus === "missing") && /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
507815
+ (apiKeyStatus === "invalid" || apiKeyStatus === "missing") && (isEnvTruthy(process.env.CLAUDE_CODE_REMOTE) || !hasAnyLoggedInProvider) && /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
507963
507816
  children: /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
507964
507817
  color: "error",
507965
507818
  wrap: "truncate",
507966
- children: isEnvTruthy(process.env.CLAUDE_CODE_REMOTE) ? "Authentication error · Try again" : "Not logged in · Run /login"
507819
+ children: isEnvTruthy(process.env.CLAUDE_CODE_REMOTE) ? "Authentication error - Try again" : "Not logged in - Run /auth"
507967
507820
  }, undefined, false, undefined, this)
507968
507821
  }, undefined, false, undefined, this),
507969
507822
  debug && /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
@@ -508013,6 +507866,8 @@ var init_Notifications = __esm(() => {
508013
507866
  init_ink2();
508014
507867
  init_claudeAiLimitsHook();
508015
507868
  init_autoCompact();
507869
+ init_providerConfig();
507870
+ init_accountManager();
508016
507871
  init_auth2();
508017
507872
  init_editor();
508018
507873
  init_envUtils();
@@ -538361,7 +538216,7 @@ function WelcomeV2() {
538361
538216
  dimColor: true,
538362
538217
  children: [
538363
538218
  "v",
538364
- "0.9.1",
538219
+ "0.9.2",
538365
538220
  " "
538366
538221
  ]
538367
538222
  }, undefined, true, undefined, this)
@@ -538561,7 +538416,7 @@ function WelcomeV2() {
538561
538416
  dimColor: true,
538562
538417
  children: [
538563
538418
  "v",
538564
- "0.9.1",
538419
+ "0.9.2",
538565
538420
  " "
538566
538421
  ]
538567
538422
  }, undefined, true, undefined, this)
@@ -538787,7 +538642,7 @@ function AppleTerminalWelcomeV2(t0) {
538787
538642
  dimColor: true,
538788
538643
  children: [
538789
538644
  "v",
538790
- "0.9.1",
538645
+ "0.9.2",
538791
538646
  " "
538792
538647
  ]
538793
538648
  }, undefined, true, undefined, this);
@@ -539041,7 +538896,7 @@ function AppleTerminalWelcomeV2(t0) {
539041
538896
  dimColor: true,
539042
538897
  children: [
539043
538898
  "v",
539044
- "0.9.1",
538899
+ "0.9.2",
539045
538900
  " "
539046
538901
  ]
539047
538902
  }, undefined, true, undefined, this);
@@ -559162,7 +559017,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
559162
559017
  pendingHookMessages
559163
559018
  }, renderAndRun);
559164
559019
  }
559165
- }).version("0.9.1 (Snowcode)", "-v, --version", "Output the version number");
559020
+ }).version("0.9.2 (Snowcode)", "-v, --version", "Output the version number");
559166
559021
  program.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
559167
559022
  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
559023
  if (canUserConfigureAdvisor()) {
@@ -559723,12 +559578,12 @@ function validateProviderEnvOrExit() {
559723
559578
  async function main2() {
559724
559579
  const args = process.argv.slice(2);
559725
559580
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
559726
- console.log(`${"0.9.1"} (Snowcode)`);
559581
+ console.log(`${"0.9.2"} (Snowcode)`);
559727
559582
  return;
559728
559583
  }
559729
559584
  validateProviderEnvOrExit();
559730
559585
  const { printStartupScreen: printStartupScreen2 } = await Promise.resolve().then(() => (init_StartupScreen(), exports_StartupScreen));
559731
- printStartupScreen2();
559586
+ await printStartupScreen2();
559732
559587
  const {
559733
559588
  profileCheckpoint: profileCheckpoint2
559734
559589
  } = await Promise.resolve().then(() => (init_startupProfiler(), exports_startupProfiler));
@@ -559812,4 +559667,4 @@ async function main2() {
559812
559667
  }
559813
559668
  main2();
559814
559669
 
559815
- //# debugId=2D17C89FE5FFF28264756E2164756E21
559670
+ //# debugId=9BF983086649C86964756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snowcode",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "It's cold outside, isn't it?",
5
5
  "type": "module",
6
6
  "bin": {