@ainative/cody-cli 0.7.14 → 0.7.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -57727,7 +57727,7 @@ var init_types3 = __esm(() => {
57727
57727
  }).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources."),
57728
57728
  strictKnownMarketplaces: exports_external.array(MarketplaceSourceSchema()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, " + "ONLY these exact sources can be added as marketplaces. The check happens BEFORE " + "downloading, so blocked sources never touch the filesystem. " + "Note: this is a policy gate only — it does NOT register marketplaces. " + "To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),
57729
57729
  blockedMarketplaces: exports_external.array(MarketplaceSourceSchema()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, " + "these exact sources are blocked from being added as marketplaces. The check happens BEFORE " + "downloading, so blocked sources never touch the filesystem."),
57730
- forceLoginMethod: exports_external.enum(["claudeai", "console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),
57730
+ forceLoginMethod: exports_external.enum(["claudeai", "console"]).optional().describe('Force a specific login method: "claudeai" for AINative subscription, "console" for Console billing'),
57731
57731
  forceLoginOrgUUID: exports_external.string().optional().describe("Organization UUID to use for OAuth login"),
57732
57732
  otelHeadersHelper: exports_external.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),
57733
57733
  outputStyle: exports_external.string().optional().describe("Controls the output style for assistant responses"),
@@ -125239,7 +125239,7 @@ function hasConsoleBillingAccess() {
125239
125239
  if (isEnvTruthy(process.env.DISABLE_COST_WARNINGS)) {
125240
125240
  return false;
125241
125241
  }
125242
- const isSubscriber = isClaudeAISubscriber();
125242
+ const isSubscriber = isActiveSubscriber();
125243
125243
  if (isSubscriber)
125244
125244
  return false;
125245
125245
  const authSource = getAuthTokenSource();
@@ -125259,7 +125259,7 @@ function hasClaudeAiBillingAccess() {
125259
125259
  if (mockBillingAccessOverride !== null) {
125260
125260
  return mockBillingAccessOverride;
125261
125261
  }
125262
- if (!isClaudeAISubscriber()) {
125262
+ if (!isActiveSubscriber()) {
125263
125263
  return false;
125264
125264
  }
125265
125265
  const subscriptionType = getSubscriptionType();
@@ -130604,7 +130604,7 @@ function isOpus1mMergeEnabled() {
130604
130604
  if (is1mContextDisabled() || isProSubscriber() || getAPIProvider() !== "firstParty") {
130605
130605
  return false;
130606
130606
  }
130607
- if (isClaudeAISubscriber() && getSubscriptionType() === null) {
130607
+ if (isActiveSubscriber() && getSubscriptionType() === null) {
130608
130608
  return false;
130609
130609
  }
130610
130610
  return true;
@@ -130735,7 +130735,7 @@ function isLegacyModelRemapEnabled() {
130735
130735
  }
130736
130736
  function modelDisplayString(model) {
130737
130737
  if (model === null) {
130738
- if (false) {} else if (isClaudeAISubscriber()) {
130738
+ if (false) {} else if (isActiveSubscriber()) {
130739
130739
  return `Default (${getClaudeAiUserDefaultModelDescription()})`;
130740
130740
  }
130741
130741
  return `Default (${getDefaultMainLoopModel()})`;
@@ -169472,7 +169472,7 @@ async function refreshModelCapabilities() {
169472
169472
  return;
169473
169473
  try {
169474
169474
  const anthropic = await getAnthropicClient({ maxRetries: 1 });
169475
- const betas = isClaudeAISubscriber() ? [OAUTH_BETA_HEADER] : undefined;
169475
+ const betas = isActiveSubscriber() ? [OAUTH_BETA_HEADER] : undefined;
169476
169476
  const parsed = [];
169477
169477
  for await (const entry of anthropic.models.list({ betas })) {
169478
169478
  const result = ModelCapabilitySchema().safeParse(entry);
@@ -171791,6 +171791,9 @@ __export(exports_auth, {
171791
171791
  isAwsCredentialExportFromProjectSettings: () => isAwsCredentialExportFromProjectSettings,
171792
171792
  isAwsAuthRefreshFromProjectSettings: () => isAwsAuthRefreshFromProjectSettings,
171793
171793
  isAnthropicAuthEnabled: () => isAnthropicAuthEnabled,
171794
+ isActiveSubscriber: () => isActiveSubscriber,
171795
+ isActiveEnterpriseSubscriber: () => isActiveEnterpriseSubscriber,
171796
+ isAINativeSubscriber: () => isAINativeSubscriber,
171794
171797
  is1PApiCustomer: () => is1PApiCustomer,
171795
171798
  hasProfileScope: () => hasProfileScope,
171796
171799
  hasOpusAccess: () => hasOpusAccess,
@@ -171812,6 +171815,7 @@ __export(exports_auth, {
171812
171815
  getAnthropicApiKeyWithSource: () => getAnthropicApiKeyWithSource,
171813
171816
  getAnthropicApiKey: () => getAnthropicApiKey,
171814
171817
  getAccountInformation: () => getAccountInformation,
171818
+ getAINativeSubscriptionTier: () => getAINativeSubscriptionTier,
171815
171819
  clearOAuthTokenCache: () => clearOAuthTokenCache,
171816
171820
  clearGcpCredentialsCache: () => clearGcpCredentialsCache,
171817
171821
  clearAwsCredentialsCache: () => clearAwsCredentialsCache,
@@ -171832,6 +171836,10 @@ function isAnthropicAuthEnabled() {
171832
171836
  if (process.env.ANTHROPIC_UNIX_SOCKET) {
171833
171837
  return !!process.env.CLAUDE_CODE_OAUTH_TOKEN;
171834
171838
  }
171839
+ const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
171840
+ if (baseUrl.includes("ainative.studio") || isEnvTruthy(process.env.CLAUDE_CODE_FORCE_OAUTH)) {
171841
+ return true;
171842
+ }
171835
171843
  const is3P = isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) || isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) || isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY);
171836
171844
  const settings = getSettings_DEPRECATED() || {};
171837
171845
  const apiKeyHelper = settings.apiKeyHelper;
@@ -171877,6 +171885,10 @@ function getAuthTokenSource() {
171877
171885
  if (shouldUseClaudeAIAuth(oauthTokens?.scopes) && oauthTokens?.accessToken) {
171878
171886
  return { source: "claude.ai", hasToken: true };
171879
171887
  }
171888
+ const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
171889
+ if (baseUrl.includes("ainative.studio") && oauthTokens?.accessToken) {
171890
+ return { source: "claude.ai", hasToken: true };
171891
+ }
171880
171892
  return { source: "none", hasToken: false };
171881
171893
  }
171882
171894
  function getAnthropicApiKey() {
@@ -172427,7 +172439,9 @@ async function maybeRemoveApiKeyFromMacOSKeychain() {
172427
172439
  }
172428
172440
  }
172429
172441
  function saveOAuthTokensIfNeeded(tokens) {
172430
- if (!shouldUseClaudeAIAuth(tokens.scopes)) {
172442
+ const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
172443
+ const isAINative = baseUrl.includes("ainative.studio");
172444
+ if (!isAINative && !shouldUseClaudeAIAuth(tokens.scopes)) {
172431
172445
  logEvent("tengu_oauth_tokens_not_claude_ai", {});
172432
172446
  return { success: true };
172433
172447
  }
@@ -172626,6 +172640,36 @@ function isClaudeAISubscriber() {
172626
172640
  }
172627
172641
  return shouldUseClaudeAIAuth(getClaudeAIOAuthTokens()?.scopes);
172628
172642
  }
172643
+ function isAINativeBaseUrl() {
172644
+ return (process.env.ANTHROPIC_BASE_URL || "").includes("ainative.studio");
172645
+ }
172646
+ function isAINativeSubscriber() {
172647
+ if (!isAINativeBaseUrl())
172648
+ return false;
172649
+ const { getGlobalConfig: getGlobalConfig2 } = (init_config2(), __toCommonJS(exports_config));
172650
+ const sub = getGlobalConfig2().ainativeSubscriptionCache;
172651
+ if (!sub)
172652
+ return false;
172653
+ if (Date.now() - sub.fetchedAt > 3600000)
172654
+ return false;
172655
+ return sub.status === "active" && sub.isActive;
172656
+ }
172657
+ function getAINativeSubscriptionTier() {
172658
+ if (!isAINativeBaseUrl())
172659
+ return null;
172660
+ const { getGlobalConfig: getGlobalConfig2 } = (init_config2(), __toCommonJS(exports_config));
172661
+ const sub = getGlobalConfig2().ainativeSubscriptionCache;
172662
+ return sub?.planId ?? null;
172663
+ }
172664
+ function isActiveSubscriber() {
172665
+ return isAINativeSubscriber();
172666
+ }
172667
+ function isActiveEnterpriseSubscriber() {
172668
+ const tier = getAINativeSubscriptionTier();
172669
+ if (!tier)
172670
+ return false;
172671
+ return tier === "Enterprise" || tier === "enterprise" || tier === "business";
172672
+ }
172629
172673
  function hasProfileScope() {
172630
172674
  return getClaudeAIOAuthTokens()?.scopes?.includes(CLAUDE_AI_PROFILE_SCOPE) ?? false;
172631
172675
  }
@@ -172657,6 +172701,24 @@ function hasOpusAccess() {
172657
172701
  return subscriptionType === "max" || subscriptionType === "enterprise" || subscriptionType === "team" || subscriptionType === "pro" || subscriptionType === null;
172658
172702
  }
172659
172703
  function getSubscriptionType() {
172704
+ if (isAINativeBaseUrl()) {
172705
+ const tier = getAINativeSubscriptionTier();
172706
+ if (!tier)
172707
+ return null;
172708
+ switch (tier.toLowerCase()) {
172709
+ case "enterprise":
172710
+ return "enterprise";
172711
+ case "business":
172712
+ return "team";
172713
+ case "pro":
172714
+ return "pro";
172715
+ case "starter":
172716
+ case "free":
172717
+ return null;
172718
+ default:
172719
+ return null;
172720
+ }
172721
+ }
172660
172722
  if (shouldUseMockSubscription()) {
172661
172723
  return getMockSubscriptionType();
172662
172724
  }
@@ -172695,10 +172757,12 @@ function getRateLimitTier() {
172695
172757
  return oauthTokens.rateLimitTier ?? null;
172696
172758
  }
172697
172759
  function getSubscriptionName() {
172698
- const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
172699
- if (baseUrl.includes("ainative.studio")) {
172760
+ if (isAINativeBaseUrl()) {
172700
172761
  const { getGlobalConfig: getGlobalConfig2 } = (init_config2(), __toCommonJS(exports_config));
172701
- return getGlobalConfig2().ainativePlanCache || "AINative Pro";
172762
+ const sub = getGlobalConfig2().ainativeSubscriptionCache;
172763
+ if (sub?.planName)
172764
+ return `AINative ${sub.planName}`;
172765
+ return getGlobalConfig2().ainativePlanCache || "AINative Free";
172702
172766
  }
172703
172767
  const subscriptionType = getSubscriptionType();
172704
172768
  switch (subscriptionType) {
@@ -172989,7 +173053,7 @@ var init_auth2 = __esm(() => {
172989
173053
 
172990
173054
  // src/utils/userAgent.ts
172991
173055
  function getCodyUserAgent() {
172992
- return `cody-cli/${"0.7.14"}`;
173056
+ return `cody-cli/${"0.7.15"}`;
172993
173057
  }
172994
173058
 
172995
173059
  // src/utils/workloadContext.ts
@@ -173011,7 +173075,7 @@ function getUserAgent() {
173011
173075
  const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
173012
173076
  const workload = getWorkload();
173013
173077
  const workloadSuffix = workload ? `, workload/${workload}` : "";
173014
- return `claude-cli/${"0.7.14"} (${"external"}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
173078
+ return `claude-cli/${"0.7.15"} (${"external"}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
173015
173079
  }
173016
173080
  function getMCPUserAgent() {
173017
173081
  const parts = [];
@@ -173025,7 +173089,7 @@ function getMCPUserAgent() {
173025
173089
  parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
173026
173090
  }
173027
173091
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
173028
- return `claude-code/${"0.7.14"}${suffix}`;
173092
+ return `claude-code/${"0.7.15"}${suffix}`;
173029
173093
  }
173030
173094
  function getWebFetchUserAgent() {
173031
173095
  return `Claude-User (${getCodyUserAgent()}; +https://support.anthropic.com/)`;
@@ -173163,7 +173227,7 @@ var init_user = __esm(() => {
173163
173227
  deviceId,
173164
173228
  sessionId: getSessionId(),
173165
173229
  email: getEmail(),
173166
- appVersion: "0.7.14",
173230
+ appVersion: "0.7.15",
173167
173231
  platform: getHostPlatformForAnalytics(),
173168
173232
  organizationUuid,
173169
173233
  accountUuid,
@@ -180855,7 +180919,7 @@ var init_metadata = __esm(() => {
180855
180919
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
180856
180920
  WHITESPACE_REGEX = /\s+/;
180857
180921
  getVersionBase = memoize_default(() => {
180858
- const match = "0.7.14".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
180922
+ const match = "0.7.15".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
180859
180923
  return match ? match[0] : undefined;
180860
180924
  });
180861
180925
  buildEnvContext = memoize_default(async () => {
@@ -180895,9 +180959,9 @@ var init_metadata = __esm(() => {
180895
180959
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
180896
180960
  isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
180897
180961
  isClaudeAiAuth: isClaudeAISubscriber(),
180898
- version: "0.7.14",
180962
+ version: "0.7.15",
180899
180963
  versionBase: getVersionBase(),
180900
- buildTime: "1775374003",
180964
+ buildTime: "1775421369",
180901
180965
  deploymentEnvironment: env4.detectDeploymentEnvironment(),
180902
180966
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
180903
180967
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -181515,7 +181579,7 @@ function initialize1PEventLogging() {
181515
181579
  const platform3 = getPlatform();
181516
181580
  const attributes = {
181517
181581
  [import_semantic_conventions.ATTR_SERVICE_NAME]: "cody-cli",
181518
- [import_semantic_conventions.ATTR_SERVICE_VERSION]: "0.7.14"
181582
+ [import_semantic_conventions.ATTR_SERVICE_VERSION]: "0.7.15"
181519
181583
  };
181520
181584
  if (platform3 === "wsl") {
181521
181585
  const wslVersion = getWslVersion();
@@ -181542,7 +181606,7 @@ function initialize1PEventLogging() {
181542
181606
  })
181543
181607
  ]
181544
181608
  });
181545
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.ainative.cody_cli.events", "0.7.14");
181609
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.ainative.cody_cli.events", "0.7.15");
181546
181610
  }
181547
181611
  async function reinitialize1PEventLoggingIfConfigChanged() {
181548
181612
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -183367,7 +183431,7 @@ function getAttributionHeader(fingerprint) {
183367
183431
  if (!isAttributionHeaderEnabled()) {
183368
183432
  return "";
183369
183433
  }
183370
- const version6 = `${"0.7.14"}.${fingerprint}`;
183434
+ const version6 = `${"0.7.15"}.${fingerprint}`;
183371
183435
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
183372
183436
  const cch = "";
183373
183437
  const workload = getWorkload();
@@ -240596,7 +240660,7 @@ async function* withRetry(getClient2, operation, options) {
240596
240660
  });
240597
240661
  throw new CannotRetryError(error43, retryContext);
240598
240662
  }
240599
- if (is529Error(error43) && (process.env.FALLBACK_FOR_ALL_PRIMARY_MODELS || !isClaudeAISubscriber() && isNonCustomOpusModel(options.model))) {
240663
+ if (is529Error(error43) && (process.env.FALLBACK_FOR_ALL_PRIMARY_MODELS || !isActiveSubscriber() && isNonCustomOpusModel(options.model))) {
240600
240664
  consecutive529Errors++;
240601
240665
  if (consecutive529Errors >= MAX_529_RETRIES) {
240602
240666
  if (options.fallbackModel) {
@@ -240804,7 +240868,7 @@ function shouldRetry(error43) {
240804
240868
  return true;
240805
240869
  }
240806
240870
  const shouldRetryHeader = error43.headers?.get("x-should-retry");
240807
- if (shouldRetryHeader === "true" && (!isClaudeAISubscriber() || isEnterpriseSubscriber())) {
240871
+ if (shouldRetryHeader === "true" && (!isActiveSubscriber() || isEnterpriseSubscriber())) {
240808
240872
  return true;
240809
240873
  }
240810
240874
  if (shouldRetryHeader === "false") {
@@ -240823,7 +240887,7 @@ function shouldRetry(error43) {
240823
240887
  if (error43.status === 409)
240824
240888
  return true;
240825
240889
  if (error43.status === 429) {
240826
- return !isClaudeAISubscriber() || isEnterpriseSubscriber();
240890
+ return !isActiveSubscriber() || isEnterpriseSubscriber();
240827
240891
  }
240828
240892
  if (error43.status === 401) {
240829
240893
  clearApiKeyHelperCache();
@@ -247446,7 +247510,7 @@ function getTelemetryAttributes() {
247446
247510
  attributes["session.id"] = sessionId;
247447
247511
  }
247448
247512
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
247449
- attributes["app.version"] = "0.7.14";
247513
+ attributes["app.version"] = "0.7.15";
247450
247514
  }
247451
247515
  const oauthAccount = getOauthAccountInfo();
247452
247516
  if (oauthAccount) {
@@ -247459,7 +247523,12 @@ function getTelemetryAttributes() {
247459
247523
  attributes["user.email"] = email3;
247460
247524
  if (accountUuid && shouldIncludeAttribute("OTEL_METRICS_INCLUDE_ACCOUNT_UUID")) {
247461
247525
  attributes["user.account_uuid"] = accountUuid;
247462
- attributes["user.account_id"] = process.env.CLAUDE_CODE_ACCOUNT_TAGGED_ID || toTaggedId("user", accountUuid);
247526
+ const isValidUuid = /^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$/i.test(accountUuid);
247527
+ if (isValidUuid) {
247528
+ attributes["user.account_id"] = process.env.CLAUDE_CODE_ACCOUNT_TAGGED_ID || toTaggedId("user", accountUuid);
247529
+ } else {
247530
+ attributes["user.account_id"] = process.env.CLAUDE_CODE_ACCOUNT_TAGGED_ID || accountUuid;
247531
+ }
247463
247532
  }
247464
247533
  }
247465
247534
  if (envDynamic.terminal) {
@@ -250166,7 +250235,7 @@ async function checkQuotaStatus() {
250166
250235
  if (isEssentialTrafficOnly()) {
250167
250236
  return;
250168
250237
  }
250169
- if (!shouldProcessRateLimits(isClaudeAISubscriber())) {
250238
+ if (!shouldProcessRateLimits(isActiveSubscriber())) {
250170
250239
  return;
250171
250240
  }
250172
250241
  if (getIsNonInteractiveSession()) {
@@ -250279,7 +250348,7 @@ function cacheExtraUsageDisabledReason(headers) {
250279
250348
  }
250280
250349
  }
250281
250350
  function extractQuotaStatusFromHeaders(headers) {
250282
- const isSubscriber = isClaudeAISubscriber();
250351
+ const isSubscriber = isActiveSubscriber();
250283
250352
  if (!shouldProcessRateLimits(isSubscriber)) {
250284
250353
  rawUtilization = {};
250285
250354
  if (currentLimits.status !== "allowed" || currentLimits.resetsAt) {
@@ -250301,7 +250370,7 @@ function extractQuotaStatusFromHeaders(headers) {
250301
250370
  }
250302
250371
  }
250303
250372
  function extractQuotaStatusFromError(error43) {
250304
- if (!shouldProcessRateLimits(isClaudeAISubscriber()) || error43.status !== 429) {
250373
+ if (!shouldProcessRateLimits(isActiveSubscriber()) || error43.status !== 429) {
250305
250374
  return;
250306
250375
  }
250307
250376
  try {
@@ -278623,7 +278692,7 @@ function getInstallationEnv() {
278623
278692
  return;
278624
278693
  }
278625
278694
  function getClaudeCodeVersion() {
278626
- return "0.7.14";
278695
+ return "0.7.15";
278627
278696
  }
278628
278697
  async function getInstalledVSCodeExtensionVersion(command) {
278629
278698
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -284157,7 +284226,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
284157
284226
  const client4 = new Client({
284158
284227
  name: "claude-code",
284159
284228
  title: "Claude Code",
284160
- version: "0.7.14",
284229
+ version: "0.7.15",
284161
284230
  description: "Anthropic's agentic coding tool",
284162
284231
  websiteUrl: PRODUCT_URL
284163
284232
  }, {
@@ -284511,7 +284580,7 @@ var init_client8 = __esm(() => {
284511
284580
  const client4 = new Client({
284512
284581
  name: "claude-code",
284513
284582
  title: "Claude Code",
284514
- version: "0.7.14",
284583
+ version: "0.7.15",
284515
284584
  description: "Anthropic's agentic coding tool",
284516
284585
  websiteUrl: PRODUCT_URL
284517
284586
  }, {
@@ -288219,7 +288288,7 @@ function checkOpus1mAccess() {
288219
288288
  if (is1mContextDisabled()) {
288220
288289
  return false;
288221
288290
  }
288222
- if (isClaudeAISubscriber()) {
288291
+ if (isActiveSubscriber()) {
288223
288292
  return isExtraUsageEnabled();
288224
288293
  }
288225
288294
  return true;
@@ -288228,7 +288297,7 @@ function checkSonnet1mAccess() {
288228
288297
  if (is1mContextDisabled()) {
288229
288298
  return false;
288230
288299
  }
288231
- if (isClaudeAISubscriber()) {
288300
+ if (isActiveSubscriber()) {
288232
288301
  return isExtraUsageEnabled();
288233
288302
  }
288234
288303
  return true;
@@ -298585,7 +298654,7 @@ class BigQueryMetricsExporter {
298585
298654
  if (attrs["wsl.version"]) {
298586
298655
  resourceAttributes["wsl.version"] = attrs["wsl.version"];
298587
298656
  }
298588
- if (isClaudeAISubscriber()) {
298657
+ if (isActiveSubscriber()) {
298589
298658
  resourceAttributes["user.customer_type"] = "claude_ai";
298590
298659
  const subscriptionType = getSubscriptionType();
298591
298660
  if (subscriptionType) {
@@ -332604,7 +332673,7 @@ function getBigQueryExportingReader() {
332604
332673
  }
332605
332674
  function isBigQueryMetricsEnabled() {
332606
332675
  const subscriptionType = getSubscriptionType();
332607
- const isC4EOrTeamUser = isClaudeAISubscriber() && (subscriptionType === "enterprise" || subscriptionType === "team");
332676
+ const isC4EOrTeamUser = isActiveSubscriber() && (subscriptionType === "enterprise" || subscriptionType === "team");
332608
332677
  return is1PApiCustomer() || isC4EOrTeamUser;
332609
332678
  }
332610
332679
  async function initializeBetaTracing(resource) {
@@ -332643,7 +332712,7 @@ async function initializeBetaTracing(resource) {
332643
332712
  });
332644
332713
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
332645
332714
  setLoggerProvider(loggerProvider);
332646
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.14");
332715
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.15");
332647
332716
  setEventLogger(eventLogger);
332648
332717
  process.on("beforeExit", async () => {
332649
332718
  await loggerProvider?.forceFlush();
@@ -332683,7 +332752,7 @@ async function initializeTelemetry() {
332683
332752
  const platform5 = getPlatform();
332684
332753
  const baseAttributes = {
332685
332754
  [import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
332686
- [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "0.7.14"
332755
+ [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "0.7.15"
332687
332756
  };
332688
332757
  if (platform5 === "wsl") {
332689
332758
  const wslVersion = getWslVersion();
@@ -332728,7 +332797,7 @@ async function initializeTelemetry() {
332728
332797
  } catch {}
332729
332798
  };
332730
332799
  registerCleanup(shutdownTelemetry2);
332731
- return meterProvider2.getMeter("com.anthropic.claude_code", "0.7.14");
332800
+ return meterProvider2.getMeter("com.anthropic.claude_code", "0.7.15");
332732
332801
  }
332733
332802
  const meterProvider = new import_sdk_metrics2.MeterProvider({
332734
332803
  resource,
@@ -332748,7 +332817,7 @@ async function initializeTelemetry() {
332748
332817
  });
332749
332818
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
332750
332819
  setLoggerProvider(loggerProvider);
332751
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.14");
332820
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.15");
332752
332821
  setEventLogger(eventLogger);
332753
332822
  logForDebugging("[3P telemetry] Event logger set successfully");
332754
332823
  process.on("beforeExit", async () => {
@@ -332810,7 +332879,7 @@ Current timeout: ${timeoutMs}ms
332810
332879
  }
332811
332880
  };
332812
332881
  registerCleanup(shutdownTelemetry);
332813
- return meterProvider.getMeter("com.anthropic.claude_code", "0.7.14");
332882
+ return meterProvider.getMeter("com.anthropic.claude_code", "0.7.15");
332814
332883
  }
332815
332884
  async function flushTelemetry() {
332816
332885
  const meterProvider = getMeterProvider();
@@ -333499,9 +333568,9 @@ async function assertMinVersion() {
333499
333568
  }
333500
333569
  try {
333501
333570
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
333502
- if (versionConfig.minVersion && lt("0.7.14", versionConfig.minVersion)) {
333571
+ if (versionConfig.minVersion && lt("0.7.15", versionConfig.minVersion)) {
333503
333572
  console.error(`
333504
- It looks like your version of Cody CLI (${"0.7.14"}) needs an update.
333573
+ It looks like your version of Cody CLI (${"0.7.15"}) needs an update.
333505
333574
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
333506
333575
 
333507
333576
  To update, please run:
@@ -333738,7 +333807,7 @@ async function installGlobalPackage(specificVersion) {
333738
333807
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
333739
333808
  logEvent("tengu_auto_updater_lock_contention", {
333740
333809
  pid: process.pid,
333741
- currentVersion: "0.7.14"
333810
+ currentVersion: "0.7.15"
333742
333811
  });
333743
333812
  return "in_progress";
333744
333813
  }
@@ -333747,7 +333816,7 @@ async function installGlobalPackage(specificVersion) {
333747
333816
  if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
333748
333817
  logError2(new Error("Windows NPM detected in WSL environment"));
333749
333818
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
333750
- currentVersion: "0.7.14"
333819
+ currentVersion: "0.7.15"
333751
333820
  });
333752
333821
  console.error(`
333753
333822
  Error: Windows NPM detected in WSL
@@ -334282,7 +334351,7 @@ function detectLinuxGlobPatternWarnings() {
334282
334351
  }
334283
334352
  async function getDoctorDiagnostic() {
334284
334353
  const installationType = await getCurrentInstallationType();
334285
- const version6 = typeof MACRO !== "undefined" ? "0.7.14" : "unknown";
334354
+ const version6 = typeof MACRO !== "undefined" ? "0.7.15" : "unknown";
334286
334355
  const installationPath = await getInstallationPath();
334287
334356
  const invokedBinary = getInvokedBinary();
334288
334357
  const multipleInstallations = await detectMultipleInstallations();
@@ -335117,8 +335186,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
335117
335186
  const maxVersion = await getMaxVersion();
335118
335187
  if (maxVersion && gt(version6, maxVersion)) {
335119
335188
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version6} to ${maxVersion}`);
335120
- if (gte("0.7.14", maxVersion)) {
335121
- logForDebugging(`Native installer: current version ${"0.7.14"} is already at or above maxVersion ${maxVersion}, skipping update`);
335189
+ if (gte("0.7.15", maxVersion)) {
335190
+ logForDebugging(`Native installer: current version ${"0.7.15"} is already at or above maxVersion ${maxVersion}, skipping update`);
335122
335191
  logEvent("tengu_native_update_skipped_max_version", {
335123
335192
  latency_ms: Date.now() - startTime,
335124
335193
  max_version: maxVersion,
@@ -335129,7 +335198,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
335129
335198
  version6 = maxVersion;
335130
335199
  }
335131
335200
  }
335132
- if (!forceReinstall && version6 === "0.7.14" && await versionIsAvailable(version6) && await isPossibleClaudeBinary(executablePath)) {
335201
+ if (!forceReinstall && version6 === "0.7.15" && await versionIsAvailable(version6) && await isPossibleClaudeBinary(executablePath)) {
335133
335202
  logForDebugging(`Found ${version6} at ${executablePath}, skipping install`);
335134
335203
  logEvent("tengu_native_update_complete", {
335135
335204
  latency_ms: Date.now() - startTime,
@@ -336276,7 +336345,7 @@ function buildAPIProviderProperties() {
336276
336345
  }
336277
336346
  function getModelDisplayLabel(mainLoopModel) {
336278
336347
  let modelLabel = modelDisplayString(mainLoopModel);
336279
- if (mainLoopModel === null && isClaudeAISubscriber()) {
336348
+ if (mainLoopModel === null && isActiveSubscriber()) {
336280
336349
  const description = getClaudeAiUserDefaultModelDescription();
336281
336350
  modelLabel = `${source_default.bold("Default")} ${description}`;
336282
336351
  }
@@ -336316,6 +336385,8 @@ __export(exports_auth2, {
336316
336385
  });
336317
336386
  async function installOAuthTokens(tokens) {
336318
336387
  await performLogout({ clearOnboarding: false });
336388
+ const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
336389
+ const isAINative = baseUrl.includes("ainative.studio");
336319
336390
  const profile = tokens.profile ?? await getOauthProfileFromOauthToken(tokens.accessToken);
336320
336391
  if (profile) {
336321
336392
  storeOAuthAccountInfo({
@@ -336334,6 +336405,14 @@ async function installOAuthTokens(tokens) {
336334
336405
  emailAddress: tokens.tokenAccount.emailAddress,
336335
336406
  organizationUuid: tokens.tokenAccount.organizationUuid
336336
336407
  });
336408
+ } else if (isAINative) {
336409
+ const email3 = process.env.AINATIVE_USERNAME || process.env.USER_EMAIL || "user@ainative.studio";
336410
+ storeOAuthAccountInfo({
336411
+ accountUuid: tokens.accessToken.substring(0, 36),
336412
+ emailAddress: email3,
336413
+ organizationUuid: undefined
336414
+ });
336415
+ logForDebugging(`[AINative] Stored fallback account info for ${email3}`);
336337
336416
  }
336338
336417
  const storageResult = saveOAuthTokensIfNeeded(tokens);
336339
336418
  clearOAuthTokenCache();
@@ -336343,7 +336422,39 @@ async function installOAuthTokens(tokens) {
336343
336422
  });
336344
336423
  }
336345
336424
  await fetchAndStoreUserRoles(tokens.accessToken).catch((err2) => logForDebugging(String(err2), { level: "error" }));
336346
- if (shouldUseClaudeAIAuth(tokens.scopes)) {
336425
+ if (isAINative) {
336426
+ logForDebugging("[AINative] OAuth login — skipping API key creation, using env API key");
336427
+ saveGlobalConfig((current) => ({
336428
+ ...current,
336429
+ ainativeSubscriptionCache: {
336430
+ planId: "free",
336431
+ planName: "Free",
336432
+ status: "active",
336433
+ isActive: true,
336434
+ price: 0,
336435
+ fetchedAt: Date.now()
336436
+ },
336437
+ ainativePlanCache: "AINative Free"
336438
+ }));
336439
+ const envApiKey = process.env.ANTHROPIC_API_KEY;
336440
+ if (envApiKey) {
336441
+ const normalized = envApiKey.slice(-20);
336442
+ saveGlobalConfig((current) => {
336443
+ const approved = current.customApiKeyResponses?.approved ?? [];
336444
+ const rejected = (current.customApiKeyResponses?.rejected ?? []).filter((k2) => k2 !== normalized);
336445
+ if (approved.includes(normalized))
336446
+ return current;
336447
+ return {
336448
+ ...current,
336449
+ customApiKeyResponses: {
336450
+ ...current.customApiKeyResponses,
336451
+ approved: [...approved, normalized],
336452
+ rejected
336453
+ }
336454
+ };
336455
+ });
336456
+ }
336457
+ } else if (shouldUseClaudeAIAuth(tokens.scopes)) {
336347
336458
  await fetchAndStoreClaudeCodeFirstTokenDate().catch((err2) => logForDebugging(String(err2), { level: "error" }));
336348
336459
  } else {
336349
336460
  const apiKey = await createAndStoreApiKey(tokens.accessToken);
@@ -345471,7 +345582,7 @@ var init_overageCreditGrant = __esm(() => {
345471
345582
 
345472
345583
  // src/services/api/usage.ts
345473
345584
  async function fetchUtilization() {
345474
- if (!isClaudeAISubscriber() || !hasProfileScope()) {
345585
+ if (!isActiveSubscriber() || !hasProfileScope()) {
345475
345586
  return {};
345476
345587
  }
345477
345588
  const tokens = getClaudeAIOAuthTokens();
@@ -345743,7 +345854,7 @@ function RateLimitMessage(t0) {
345743
345854
  const isMax20x = rateLimitTier === "default_claude_max_20x";
345744
345855
  let t3;
345745
345856
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
345746
- t3 = shouldProcessMockLimits() || isClaudeAISubscriber();
345857
+ t3 = shouldProcessMockLimits() || isActiveSubscriber();
345747
345858
  $3[2] = t3;
345748
345859
  } else {
345749
345860
  t3 = $3[2];
@@ -356803,7 +356914,7 @@ var init_environments = __esm(() => {
356803
356914
 
356804
356915
  // src/utils/background/remote/preconditions.ts
356805
356916
  async function checkNeedsClaudeAiLogin() {
356806
- if (!isClaudeAISubscriber()) {
356917
+ if (!isActiveSubscriber()) {
356807
356918
  return false;
356808
356919
  }
356809
356920
  return checkAndRefreshOAuthTokenIfNeeded();
@@ -357229,11 +357340,11 @@ function TeleportError(t0) {
357229
357340
  children: [
357230
357341
  /* @__PURE__ */ jsx_dev_runtime117.jsxDEV(ThemedText, {
357231
357342
  dimColor: true,
357232
- children: "Teleport requires a Claude.ai account."
357343
+ children: "Teleport requires an AINative account."
357233
357344
  }, undefined, false, undefined, this),
357234
357345
  /* @__PURE__ */ jsx_dev_runtime117.jsxDEV(ThemedText, {
357235
357346
  dimColor: true,
357236
- children: "Your Claude Pro/Max subscription will be used by Claude Code."
357347
+ children: "Your subscription will be used by Cody CLI."
357237
357348
  }, undefined, false, undefined, this)
357238
357349
  ]
357239
357350
  }, undefined, true, undefined, this);
@@ -404494,7 +404605,7 @@ var CONFIG_TOOL_NAME = "Config";
404494
404605
  // src/utils/model/modelOptions.ts
404495
404606
  function getDefaultOptionForUser(fastMode = false) {
404496
404607
  if (false) {}
404497
- if (isClaudeAISubscriber()) {
404608
+ if (isActiveSubscriber()) {
404498
404609
  return {
404499
404610
  value: null,
404500
404611
  label: "Default (recommended)",
@@ -404621,7 +404732,7 @@ function getMaxOpusOption(fastMode = false) {
404621
404732
  }
404622
404733
  function getMaxSonnet46_1MOption() {
404623
404734
  const is3P = getAPIProvider() !== "firstParty";
404624
- const billingInfo = isClaudeAISubscriber() ? " · Billed as extra usage" : "";
404735
+ const billingInfo = isActiveSubscriber() ? " · Billed as extra usage" : "";
404625
404736
  return {
404626
404737
  value: "sonnet[1m]",
404627
404738
  label: "Sonnet (1M context)",
@@ -404629,7 +404740,7 @@ function getMaxSonnet46_1MOption() {
404629
404740
  };
404630
404741
  }
404631
404742
  function getMaxOpus46_1MOption(fastMode = false) {
404632
- const billingInfo = isClaudeAISubscriber() ? " · Billed as extra usage" : "";
404743
+ const billingInfo = isActiveSubscriber() ? " · Billed as extra usage" : "";
404633
404744
  return {
404634
404745
  value: "opus[1m]",
404635
404746
  label: "Opus (1M context)",
@@ -404654,7 +404765,7 @@ function getOpusPlanOption() {
404654
404765
  }
404655
404766
  function getModelOptionsBase(fastMode = false) {
404656
404767
  if (false) {}
404657
- if (isClaudeAISubscriber()) {
404768
+ if (isActiveSubscriber()) {
404658
404769
  if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
404659
404770
  const premiumOptions = [getDefaultOptionForUser(fastMode)];
404660
404771
  if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
@@ -418719,7 +418830,7 @@ function getAnthropicEnvMetadata() {
418719
418830
  function getBuildAgeMinutes() {
418720
418831
  if (false)
418721
418832
  ;
418722
- const buildTime = new Date("1775374003").getTime();
418833
+ const buildTime = new Date("1775421369").getTime();
418723
418834
  if (isNaN(buildTime))
418724
418835
  return;
418725
418836
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -434716,7 +434827,7 @@ function getAssistantMessageFromError(error43, model, options) {
434716
434827
  error: "rate_limit"
434717
434828
  });
434718
434829
  }
434719
- if (error43 instanceof APIError && error43.status === 429 && shouldProcessRateLimits(isClaudeAISubscriber())) {
434830
+ if (error43 instanceof APIError && error43.status === 429 && shouldProcessRateLimits(isActiveSubscriber())) {
434720
434831
  const rateLimitType = error43.headers?.get?.("anthropic-ratelimit-unified-representative-claim");
434721
434832
  const overageStatus = error43.headers?.get?.("anthropic-ratelimit-unified-overage-status");
434722
434833
  if (rateLimitType || overageStatus) {
@@ -434850,9 +434961,9 @@ function getAssistantMessageFromError(error43, model, options) {
434850
434961
  errorDetails: error43.message
434851
434962
  });
434852
434963
  }
434853
- if (isClaudeAISubscriber() && error43 instanceof APIError && error43.status === 400 && error43.message.toLowerCase().includes("invalid model name") && (isNonCustomOpusModel(model) || model === "opus")) {
434964
+ if (isActiveSubscriber() && error43 instanceof APIError && error43.status === 400 && error43.message.toLowerCase().includes("invalid model name") && (isNonCustomOpusModel(model) || model === "opus")) {
434854
434965
  return createAssistantAPIErrorMessage({
434855
- 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.",
434966
+ content: "This model is not available with your current plan. If you have updated your subscription recently, run /logout and /login for the change to take effect.",
434856
434967
  error: "invalid_request"
434857
434968
  });
434858
434969
  }
@@ -434865,7 +434976,7 @@ function getAssistantMessageFromError(error43, model, options) {
434865
434976
  }
434866
434977
  if (error43 instanceof APIError && error43.status === 400 && error43.message.toLowerCase().includes("organization has been disabled")) {
434867
434978
  const { source } = getAnthropicApiKeyWithSource();
434868
- if (source === "ANTHROPIC_API_KEY" && process.env.ANTHROPIC_API_KEY && !isClaudeAISubscriber()) {
434979
+ if (source === "ANTHROPIC_API_KEY" && process.env.ANTHROPIC_API_KEY && !isActiveSubscriber()) {
434869
434980
  const hasStoredOAuth = getClaudeAIOAuthTokens()?.accessToken != null;
434870
434981
  return createAssistantAPIErrorMessage({
434871
434982
  error: "invalid_request",
@@ -442232,7 +442343,7 @@ function Feedback({
442232
442343
  platform: env4.platform,
442233
442344
  gitRepo: envInfo.isGit,
442234
442345
  terminal: env4.terminal,
442235
- version: "0.7.14",
442346
+ version: "0.7.15",
442236
442347
  transcript: normalizeMessagesForAPI(messages),
442237
442348
  errors: sanitizedErrors,
442238
442349
  lastApiRequest: getLastAPIRequest(),
@@ -442424,7 +442535,7 @@ function Feedback({
442424
442535
  ", ",
442425
442536
  env4.terminal,
442426
442537
  ", v",
442427
- "0.7.14"
442538
+ "0.7.15"
442428
442539
  ]
442429
442540
  }, undefined, true, undefined, this)
442430
442541
  ]
@@ -442530,7 +442641,7 @@ ${sanitizedDescription}
442530
442641
  ` + `**Environment Info**
442531
442642
  ` + `- Platform: ${env4.platform}
442532
442643
  ` + `- Terminal: ${env4.terminal}
442533
- ` + `- Version: ${"0.7.14"}
442644
+ ` + `- Version: ${"0.7.15"}
442534
442645
  ` + `- Feedback ID: ${feedbackId}
442535
442646
  ` + `
442536
442647
  **Errors**
@@ -445630,7 +445741,7 @@ function buildPrimarySection() {
445630
445741
  }, undefined, false, undefined, this);
445631
445742
  return [{
445632
445743
  label: "Version",
445633
- value: "0.7.14"
445744
+ value: "0.7.15"
445634
445745
  }, {
445635
445746
  label: "Session name",
445636
445747
  value: nameValue
@@ -447010,7 +447121,7 @@ var init_ModelPicker = __esm(() => {
447010
447121
 
447011
447122
  // src/utils/extraUsage.ts
447012
447123
  function isBilledAsExtraUsage(model, isFastMode, isOpus1mMerged) {
447013
- if (!isClaudeAISubscriber())
447124
+ if (!isActiveSubscriber())
447014
447125
  return false;
447015
447126
  if (isFastMode)
447016
447127
  return true;
@@ -449381,7 +449492,7 @@ function Config({
449381
449492
  }
449382
449493
  }, undefined, false, undefined, this)
449383
449494
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime178.jsxDEV(ChannelDowngradeDialog, {
449384
- currentVersion: "0.7.14",
449495
+ currentVersion: "0.7.15",
449385
449496
  onChoice: (choice) => {
449386
449497
  setShowSubmenu(null);
449387
449498
  setTabsHidden(false);
@@ -449393,7 +449504,7 @@ function Config({
449393
449504
  autoUpdatesChannel: "stable"
449394
449505
  };
449395
449506
  if (choice === "stay") {
449396
- newSettings.minimumVersion = "0.7.14";
449507
+ newSettings.minimumVersion = "0.7.15";
449397
449508
  }
449398
449509
  updateSettingsForSource("userSettings", newSettings);
449399
449510
  setSettingsData((prev_27) => ({
@@ -452006,10 +452117,10 @@ __export(exports_cost, {
452006
452117
  call: () => call17
452007
452118
  });
452008
452119
  var call17 = async () => {
452009
- if (isClaudeAISubscriber()) {
452120
+ if (isActiveSubscriber()) {
452010
452121
  let value;
452011
452122
  if (currentLimits.isUsingOverage) {
452012
- value = "You are currently using your overages to power your Claude Code usage. We will automatically switch you back to your subscription rate limits when they reset";
452123
+ value = "You are currently using overages to power your Cody CLI usage. We will automatically switch you back to your subscription rate limits when they reset";
452013
452124
  } else {
452014
452125
  value = "You are currently using your subscription to power your Claude Code usage";
452015
452126
  }
@@ -452034,7 +452145,7 @@ var init_cost2 = __esm(() => {
452034
452145
  description: "Show the total cost and duration of the current session",
452035
452146
  get isHidden() {
452036
452147
  if (false) {}
452037
- return isClaudeAISubscriber();
452148
+ return isActiveSubscriber();
452038
452149
  },
452039
452150
  supportsNonInteractive: true,
452040
452151
  load: () => Promise.resolve().then(() => (init_cost(), exports_cost))
@@ -457394,7 +457505,7 @@ function HelpV2(t0) {
457394
457505
  let t6;
457395
457506
  if ($3[31] !== tabs) {
457396
457507
  t6 = /* @__PURE__ */ jsx_dev_runtime205.jsxDEV(Tabs, {
457397
- title: `Cody CLI v${"0.7.14"}`,
457508
+ title: `Cody CLI v${"0.7.15"}`,
457398
457509
  color: "professionalBlue",
457399
457510
  defaultTab: "general",
457400
457511
  children: tabs
@@ -459350,7 +459461,7 @@ function ApiKeyStep(t0) {
459350
459461
  children: /* @__PURE__ */ jsx_dev_runtime210.jsxDEV(ThemedText, {
459351
459462
  children: [
459352
459463
  selectedOption === "oauth" ? color("success", theme)("> ") : " ",
459353
- "Create a long-lived token with your Claude subscription"
459464
+ "Create a long-lived token with your AINative subscription"
459354
459465
  ]
459355
459466
  }, undefined, true, undefined, this)
459356
459467
  }, undefined, false, undefined, this);
@@ -481584,7 +481695,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
481584
481695
  return [];
481585
481696
  }
481586
481697
  }
481587
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.14") {
481698
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.15") {
481588
481699
  if (false) {}
481589
481700
  const cachedChangelog = await getStoredChangelog();
481590
481701
  if (lastSeenVersion !== currentVersion || !cachedChangelog) {
@@ -481597,7 +481708,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.14")
481597
481708
  releaseNotes
481598
481709
  };
481599
481710
  }
481600
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "0.7.14") {
481711
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "0.7.15") {
481601
481712
  if (false) {}
481602
481713
  const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion);
481603
481714
  return {
@@ -482753,11 +482864,11 @@ function getRecentActivitySync() {
482753
482864
  return cachedActivity;
482754
482865
  }
482755
482866
  function getLogoDisplayData() {
482756
- const version6 = process.env.DEMO_VERSION ?? "0.7.14";
482867
+ const version6 = process.env.DEMO_VERSION ?? "0.7.15";
482757
482868
  const serverUrl = getDirectConnectServerUrl();
482758
482869
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
482759
482870
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
482760
- const billingType = isAINativeProvider() ? getGlobalConfig().ainativePlanCache || "AINative Pro" : isClaudeAISubscriber() ? getSubscriptionName() : "API Usage Billing";
482871
+ const billingType = isAINativeProvider() ? getGlobalConfig().ainativePlanCache || "AINative Pro" : isActiveSubscriber() ? getSubscriptionName() : "API Usage Billing";
482761
482872
  const agentName = getInitialSettings().agent;
482762
482873
  return {
482763
482874
  version: version6,
@@ -483364,7 +483475,7 @@ async function fetchReferralRedemptions(campaign = "claude_code_guest_pass") {
483364
483475
  return response.data;
483365
483476
  }
483366
483477
  function shouldCheckForPasses() {
483367
- return !!(getOauthAccountInfo()?.organizationUuid && isClaudeAISubscriber() && getSubscriptionType() === "max");
483478
+ return !!(getOauthAccountInfo()?.organizationUuid && isActiveSubscriber() && getSubscriptionType() === "max");
483368
483479
  }
483369
483480
  function checkCachedPassesEligibility() {
483370
483481
  if (!shouldCheckForPasses()) {
@@ -484268,7 +484379,7 @@ function LogoV2() {
484268
484379
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
484269
484380
  t2 = () => {
484270
484381
  const currentConfig = getGlobalConfig();
484271
- if (currentConfig.lastReleaseNotesSeen === "0.7.14") {
484382
+ if (currentConfig.lastReleaseNotesSeen === "0.7.15") {
484272
484383
  return;
484273
484384
  }
484274
484385
  saveGlobalConfig(_temp329);
@@ -484944,12 +485055,12 @@ function LogoV2() {
484944
485055
  return t41;
484945
485056
  }
484946
485057
  function _temp329(current) {
484947
- if (current.lastReleaseNotesSeen === "0.7.14") {
485058
+ if (current.lastReleaseNotesSeen === "0.7.15") {
484948
485059
  return current;
484949
485060
  }
484950
485061
  return {
484951
485062
  ...current,
484952
- lastReleaseNotesSeen: "0.7.14"
485063
+ lastReleaseNotesSeen: "0.7.15"
484953
485064
  };
484954
485065
  }
484955
485066
  function _temp245(s_0) {
@@ -485575,7 +485686,7 @@ var init_statusNoticeDefinitions = __esm(() => {
485575
485686
  type: "warning",
485576
485687
  isActive: () => {
485577
485688
  const authTokenInfo = getAuthTokenSource();
485578
- return isClaudeAISubscriber() && (authTokenInfo.source === "ANTHROPIC_AUTH_TOKEN" || authTokenInfo.source === "apiKeyHelper");
485689
+ return isActiveSubscriber() && (authTokenInfo.source === "ANTHROPIC_AUTH_TOKEN" || authTokenInfo.source === "apiKeyHelper");
485579
485690
  },
485580
485691
  render: () => {
485581
485692
  const authTokenInfo = getAuthTokenSource();
@@ -491170,7 +491281,7 @@ var init_ultrareviewEnabled = __esm(() => {
491170
491281
 
491171
491282
  // src/services/api/ultrareviewQuota.ts
491172
491283
  async function fetchUltrareviewQuota() {
491173
- if (!isClaudeAISubscriber())
491284
+ if (!isActiveSubscriber())
491174
491285
  return null;
491175
491286
  try {
491176
491287
  const { accessToken, orgUUID } = await prepareApiRequest();
@@ -511287,7 +511398,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
511287
511398
  smapsRollup,
511288
511399
  platform: process.platform,
511289
511400
  nodeVersion: process.version,
511290
- ccVersion: "0.7.14"
511401
+ ccVersion: "0.7.15"
511291
511402
  };
511292
511403
  }
511293
511404
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -511815,7 +511926,7 @@ var init_bridge_kick = __esm(() => {
511815
511926
  var call56 = async () => {
511816
511927
  return {
511817
511928
  type: "text",
511818
- value: `${"0.7.14"} (built ${"1775374003"})`
511929
+ value: `${"0.7.15"} (built ${"1775421369"})`
511819
511930
  };
511820
511931
  }, version6, version_default;
511821
511932
  var init_version = __esm(() => {
@@ -513375,7 +513486,7 @@ function ClaudeInChromeMenu(t0) {
513375
513486
  onDone,
513376
513487
  isExtensionInstalled: installed,
513377
513488
  configEnabled,
513378
- isClaudeAISubscriber: isClaudeAISubscriber2,
513489
+ isActiveSubscriber: isActiveSubscriber2,
513379
513490
  isWSL
513380
513491
  } = t0;
513381
513492
  const mcpClients = useAppState(_temp159);
@@ -513550,7 +513661,7 @@ function ClaudeInChromeMenu(t0) {
513550
513661
  } else {
513551
513662
  options = $3[8];
513552
513663
  }
513553
- const isDisabled = isWSL || !isClaudeAISubscriber2;
513664
+ const isDisabled = isWSL || !isActiveSubscriber2;
513554
513665
  let t5;
513555
513666
  if ($3[18] !== onDone) {
513556
513667
  t5 = () => onDone();
@@ -513580,12 +513691,12 @@ function ClaudeInChromeMenu(t0) {
513580
513691
  t7 = $3[22];
513581
513692
  }
513582
513693
  let t8;
513583
- if ($3[23] !== isClaudeAISubscriber2) {
513584
- t8 = !isClaudeAISubscriber2 && /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ThemedText, {
513694
+ if ($3[23] !== isActiveSubscriber2) {
513695
+ t8 = !isActiveSubscriber2 && /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ThemedText, {
513585
513696
  color: "error",
513586
- children: "Claude in Chrome requires a claude.ai subscription."
513697
+ children: "Claude in Chrome requires an active subscription."
513587
513698
  }, undefined, false, undefined, this);
513588
- $3[23] = isClaudeAISubscriber2;
513699
+ $3[23] = isActiveSubscriber2;
513589
513700
  $3[24] = t8;
513590
513701
  } else {
513591
513702
  t8 = $3[24];
@@ -513737,13 +513848,13 @@ function _temp159(s) {
513737
513848
  var import_compiler_runtime269, import_react187, jsx_dev_runtime344, CHROME_EXTENSION_URL = "https://claude.ai/chrome", CHROME_PERMISSIONS_URL = "https://clau.de/chrome/permissions", CHROME_RECONNECT_URL = "https://clau.de/chrome/reconnect", call58 = async function(onDone) {
513738
513849
  const isExtensionInstalled = await isChromeExtensionInstalled();
513739
513850
  const config4 = getGlobalConfig();
513740
- const isSubscriber = isClaudeAISubscriber();
513851
+ const isSubscriber = isActiveSubscriber();
513741
513852
  const isWSL = env4.isWslEnvironment();
513742
513853
  return /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ClaudeInChromeMenu, {
513743
513854
  onDone,
513744
513855
  isExtensionInstalled,
513745
513856
  configEnabled: config4.claudeInChromeDefaultEnabled,
513746
- isClaudeAISubscriber: isSubscriber,
513857
+ isActiveSubscriber: isSubscriber,
513747
513858
  isWSL
513748
513859
  }, undefined, false, undefined, this);
513749
513860
  };
@@ -515847,9 +515958,9 @@ var init_remote_env2 = __esm(() => {
515847
515958
  type: "local-jsx",
515848
515959
  name: "remote-env",
515849
515960
  description: "Configure the default remote environment for teleport sessions",
515850
- isEnabled: () => isClaudeAISubscriber() && isPolicyAllowed("allow_remote_sessions"),
515961
+ isEnabled: () => isActiveSubscriber() && isPolicyAllowed("allow_remote_sessions"),
515851
515962
  get isHidden() {
515852
- return !isClaudeAISubscriber() || !isPolicyAllowed("allow_remote_sessions");
515963
+ return !isActiveSubscriber() || !isPolicyAllowed("allow_remote_sessions");
515853
515964
  },
515854
515965
  load: () => Promise.resolve().then(() => (init_remote_env(), exports_remote_env))
515855
515966
  };
@@ -515862,7 +515973,7 @@ __export(exports_upgrade, {
515862
515973
  });
515863
515974
  async function call67(onDone, context4) {
515864
515975
  try {
515865
- if (isClaudeAISubscriber()) {
515976
+ if (isActiveSubscriber()) {
515866
515977
  const tokens = getClaudeAIOAuthTokens();
515867
515978
  let isMax20x = false;
515868
515979
  if (tokens?.subscriptionType && tokens?.rateLimitTier) {
@@ -516147,7 +516258,7 @@ var init_rate_limit_options2 = __esm(() => {
516147
516258
  name: "rate-limit-options",
516148
516259
  description: "Show options when rate limit is reached",
516149
516260
  isEnabled: () => {
516150
- if (!isClaudeAISubscriber()) {
516261
+ if (!isActiveSubscriber()) {
516151
516262
  return false;
516152
516263
  }
516153
516264
  return true;
@@ -520762,7 +520873,7 @@ function generateHtmlReport(data, insights) {
520762
520873
  </html>`;
520763
520874
  }
520764
520875
  function buildExportData(data, insights, facets, remoteStats) {
520765
- const version7 = typeof MACRO !== "undefined" ? "0.7.14" : "unknown";
520876
+ const version7 = typeof MACRO !== "undefined" ? "0.7.15" : "unknown";
520766
520877
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
520767
520878
  const facets_summary = {
520768
520879
  total: facets.size,
@@ -521378,11 +521489,11 @@ function meetsAvailabilityRequirement(cmd) {
521378
521489
  for (const a2 of cmd.availability) {
521379
521490
  switch (a2) {
521380
521491
  case "claude-ai":
521381
- if (isClaudeAISubscriber())
521492
+ if (isActiveSubscriber())
521382
521493
  return true;
521383
521494
  break;
521384
521495
  case "console":
521385
- if (!isClaudeAISubscriber() && !isUsing3PServices() && isFirstPartyAnthropicBaseUrl())
521496
+ if (!isActiveSubscriber() && !isUsing3PServices() && isFirstPartyAnthropicBaseUrl())
521386
521497
  return true;
521387
521498
  break;
521388
521499
  default: {
@@ -524708,7 +524819,7 @@ var init_sessionStorage = __esm(() => {
524708
524819
  init_settings2();
524709
524820
  init_slowOperations();
524710
524821
  init_uuid();
524711
- VERSION5 = typeof MACRO !== "undefined" ? "0.7.14" : "unknown";
524822
+ VERSION5 = typeof MACRO !== "undefined" ? "0.7.15" : "unknown";
524712
524823
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
524713
524824
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
524714
524825
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -525913,7 +526024,7 @@ var init_filesystem = __esm(() => {
525913
526024
  });
525914
526025
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
525915
526026
  const nonce = randomBytes19(16).toString("hex");
525916
- return join132(getClaudeTempDir(), "bundled-skills", "0.7.14", nonce);
526027
+ return join132(getClaudeTempDir(), "bundled-skills", "0.7.15", nonce);
525917
526028
  });
525918
526029
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
525919
526030
  });
@@ -531885,7 +531996,7 @@ function computeFingerprint(messageText, version7) {
531885
531996
  }
531886
531997
  function computeFingerprintFromMessages(messages) {
531887
531998
  const firstMessageText = extractFirstMessageText(messages);
531888
- return computeFingerprint(firstMessageText, "0.7.14");
531999
+ return computeFingerprint(firstMessageText, "0.7.15");
531889
532000
  }
531890
532001
  var FINGERPRINT_SALT = "59cf53e54c78";
531891
532002
  var init_fingerprint = () => {};
@@ -532057,7 +532168,7 @@ function should1hCacheTTL(querySource) {
532057
532168
  }
532058
532169
  let userEligible = getPromptCache1hEligible();
532059
532170
  if (userEligible === null) {
532060
- userEligible = isClaudeAISubscriber() && !currentLimits.isUsingOverage;
532171
+ userEligible = isActiveSubscriber() && !currentLimits.isUsingOverage;
532061
532172
  setPromptCache1hEligible(userEligible);
532062
532173
  }
532063
532174
  if (!userEligible)
@@ -532147,7 +532258,7 @@ async function verifyApiKey(apiKey, isNonInteractiveSession) {
532147
532258
  error43 = errorFromRetry.originalError;
532148
532259
  }
532149
532260
  logError2(error43);
532150
- if (error43 instanceof Error && error43.message.includes('{"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}')) {
532261
+ if (error43 instanceof Error && (error43.message.includes('"type":"authentication_error"') || error43.message.includes("Invalid bearer token") || error43.message.includes("invalid x-api-key"))) {
532151
532262
  return false;
532152
532263
  }
532153
532264
  throw error43;
@@ -532452,7 +532563,7 @@ async function* queryModel(messages, systemPrompt, thinkingConfig, tools, signal
532452
532563
  logForDebugging(`AINative Claude bypass failed, falling back to SDK: ${e}`, { level: "warn" });
532453
532564
  }
532454
532565
  }
532455
- if (!isClaudeAISubscriber() && isNonCustomOpusModel(options.model) && (await getDynamicConfig_BLOCKS_ON_INIT("tengu-off-switch", {
532566
+ if (!isActiveSubscriber() && isNonCustomOpusModel(options.model) && (await getDynamicConfig_BLOCKS_ON_INIT("tengu-off-switch", {
532456
532567
  activated: false
532457
532568
  })).activated) {
532458
532569
  logEvent("tengu_off_switch_query", {});
@@ -533799,7 +533910,7 @@ async function sideQuery(opts) {
533799
533910
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
533800
533911
  }
533801
533912
  const messageText = extractFirstUserMessageText(messages);
533802
- const fingerprint = computeFingerprint(messageText, "0.7.14");
533913
+ const fingerprint = computeFingerprint(messageText, "0.7.15");
533803
533914
  const attributionHeader = getAttributionHeader(fingerprint);
533804
533915
  const systemBlocks = [
533805
533916
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -538323,7 +538434,7 @@ function buildSystemInitMessage(inputs) {
538323
538434
  slash_commands: inputs.commands.filter((c6) => c6.userInvocable !== false).map((c6) => c6.name),
538324
538435
  apiKeySource: getAnthropicApiKeyWithSource().source,
538325
538436
  betas: getSdkBetas(),
538326
- claude_code_version: "0.7.14",
538437
+ claude_code_version: "0.7.15",
538327
538438
  output_style: outputStyle2,
538328
538439
  agents: inputs.agents.map((agent) => agent.agentType),
538329
538440
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -552875,7 +552986,7 @@ var init_useVoiceEnabled = __esm(() => {
552875
552986
  function getSemverPart(version7) {
552876
552987
  return `${import_semver13.major(version7, { loose: true })}.${import_semver13.minor(version7, { loose: true })}.${import_semver13.patch(version7, { loose: true })}`;
552877
552988
  }
552878
- function useUpdateNotification(updatedVersion, initialVersion = "0.7.14") {
552989
+ function useUpdateNotification(updatedVersion, initialVersion = "0.7.15") {
552879
552990
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react227.useState(() => getSemverPart(initialVersion));
552880
552991
  if (!updatedVersion) {
552881
552992
  return null;
@@ -552915,7 +553026,7 @@ function AutoUpdater({
552915
553026
  return;
552916
553027
  }
552917
553028
  if (false) {}
552918
- const currentVersion = "0.7.14";
553029
+ const currentVersion = "0.7.15";
552919
553030
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
552920
553031
  let latestVersion = await getLatestVersion(channel);
552921
553032
  const isDisabled = isAutoUpdaterDisabled();
@@ -553128,12 +553239,12 @@ function NativeAutoUpdater({
553128
553239
  logEvent("tengu_native_auto_updater_start", {});
553129
553240
  try {
553130
553241
  const maxVersion = await getMaxVersion();
553131
- if (maxVersion && gt("0.7.14", maxVersion)) {
553242
+ if (maxVersion && gt("0.7.15", maxVersion)) {
553132
553243
  const msg = await getMaxVersionMessage();
553133
553244
  setMaxVersionIssue(msg ?? "affects your version");
553134
553245
  }
553135
553246
  const result = await installLatest(channel);
553136
- const currentVersion = "0.7.14";
553247
+ const currentVersion = "0.7.15";
553137
553248
  const latencyMs = Date.now() - startTime;
553138
553249
  if (result.lockFailed) {
553139
553250
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -553270,17 +553381,17 @@ function PackageManagerAutoUpdater(t0) {
553270
553381
  const maxVersion = await getMaxVersion();
553271
553382
  if (maxVersion && latest && gt(latest, maxVersion)) {
553272
553383
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
553273
- if (gte("0.7.14", maxVersion)) {
553274
- logForDebugging(`PackageManagerAutoUpdater: current version ${"0.7.14"} is already at or above maxVersion ${maxVersion}, skipping update`);
553384
+ if (gte("0.7.15", maxVersion)) {
553385
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"0.7.15"} is already at or above maxVersion ${maxVersion}, skipping update`);
553275
553386
  setUpdateAvailable(false);
553276
553387
  return;
553277
553388
  }
553278
553389
  latest = maxVersion;
553279
553390
  }
553280
- const hasUpdate = latest && !gte("0.7.14", latest) && !shouldSkipVersion(latest);
553391
+ const hasUpdate = latest && !gte("0.7.15", latest) && !shouldSkipVersion(latest);
553281
553392
  setUpdateAvailable(!!hasUpdate);
553282
553393
  if (hasUpdate) {
553283
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.7.14"} -> ${latest}`);
553394
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.7.15"} -> ${latest}`);
553284
553395
  }
553285
553396
  };
553286
553397
  $3[0] = t1;
@@ -553314,7 +553425,7 @@ function PackageManagerAutoUpdater(t0) {
553314
553425
  wrap: "truncate",
553315
553426
  children: [
553316
553427
  "currentVersion: ",
553317
- "0.7.14"
553428
+ "0.7.15"
553318
553429
  ]
553319
553430
  }, undefined, true, undefined, this);
553320
553431
  $3[3] = verbose;
@@ -561424,7 +561535,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
561424
561535
  project_dir: getOriginalCwd(),
561425
561536
  added_dirs: addedDirs
561426
561537
  },
561427
- version: "0.7.14",
561538
+ version: "0.7.15",
561428
561539
  output_style: {
561429
561540
  name: outputStyleName
561430
561541
  },
@@ -568120,9 +568231,13 @@ var init_useDeferredHookMessages = __esm(() => {
568120
568231
  // src/hooks/useApiKeyVerification.ts
568121
568232
  function useApiKeyVerification() {
568122
568233
  const [status2, setStatus] = import_react271.useState(() => {
568123
- if (!isAnthropicAuthEnabled() || isClaudeAISubscriber()) {
568234
+ if (!isAnthropicAuthEnabled() || isActiveSubscriber()) {
568124
568235
  return "valid";
568125
568236
  }
568237
+ const { hasToken } = getAuthTokenSource();
568238
+ if (hasToken) {
568239
+ return "loading";
568240
+ }
568126
568241
  const { key, source } = getAnthropicApiKeyWithSource({
568127
568242
  skipRetrievingKeyFromApiKeyHelper: true
568128
568243
  });
@@ -568133,7 +568248,13 @@ function useApiKeyVerification() {
568133
568248
  });
568134
568249
  const [error43, setError] = import_react271.useState(null);
568135
568250
  const verify = import_react271.useCallback(async () => {
568136
- if (!isAnthropicAuthEnabled() || isClaudeAISubscriber()) {
568251
+ if (!isAnthropicAuthEnabled() || isActiveSubscriber()) {
568252
+ setStatus("valid");
568253
+ return;
568254
+ }
568255
+ const { hasToken } = getAuthTokenSource();
568256
+ const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
568257
+ if (hasToken && baseUrl.includes("ainative.studio")) {
568137
568258
  setStatus("valid");
568138
568259
  return;
568139
568260
  }
@@ -568145,6 +568266,10 @@ function useApiKeyVerification() {
568145
568266
  setError(new Error("API key helper did not return a valid key"));
568146
568267
  return;
568147
568268
  }
568269
+ if (hasToken) {
568270
+ setStatus("valid");
568271
+ return;
568272
+ }
568148
568273
  const newStatus = "missing";
568149
568274
  setStatus(newStatus);
568150
568275
  return;
@@ -572798,7 +572923,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
572798
572923
  } catch {}
572799
572924
  const data = {
572800
572925
  trigger,
572801
- version: "0.7.14",
572926
+ version: "0.7.15",
572802
572927
  platform: process.platform,
572803
572928
  transcript,
572804
572929
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -574041,12 +574166,12 @@ async function _temp203() {
574041
574166
  if (!shouldEnableClaudeInChrome(chromeFlag)) {
574042
574167
  return null;
574043
574168
  }
574044
- if (!isClaudeAISubscriber()) {
574169
+ if (!isActiveSubscriber()) {
574045
574170
  return {
574046
574171
  key: "chrome-requires-subscription",
574047
574172
  jsx: /* @__PURE__ */ jsx_dev_runtime448.jsxDEV(ThemedText, {
574048
574173
  color: "error",
574049
- children: "Claude in Chrome requires a claude.ai subscription"
574174
+ children: "Claude in Chrome requires an active subscription"
574050
574175
  }, undefined, false, undefined, this),
574051
574176
  priority: "immediate",
574052
574177
  timeoutMs: 5000
@@ -578883,9 +579008,9 @@ async function _temp295() {
578883
579008
  jsx: /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
578884
579009
  color: "suggestion",
578885
579010
  children: [
578886
- "Use your existing Claude ",
579011
+ "Use your existing ",
578887
579012
  subscriptionType,
578888
- " plan with Claude Code",
579013
+ " plan with Cody CLI",
578889
579014
  /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
578890
579015
  color: "text",
578891
579016
  dimColor: true,
@@ -578906,7 +579031,7 @@ function _temp296(current) {
578906
579031
  };
578907
579032
  }
578908
579033
  async function getExistingClaudeSubscription() {
578909
- if (isClaudeAISubscriber()) {
579034
+ if (isActiveSubscriber()) {
578910
579035
  return null;
578911
579036
  }
578912
579037
  const profile = await getOauthProfileFromApiKey();
@@ -583757,6 +583882,66 @@ async function fetchBootstrapData() {
583757
583882
  logError2(error43);
583758
583883
  }
583759
583884
  }
583885
+ async function fetchAINativeSubscription() {
583886
+ const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
583887
+ if (!baseUrl.includes("ainative.studio"))
583888
+ return;
583889
+ const apiKey = process.env.ANTHROPIC_API_KEY || getAnthropicApiKey();
583890
+ if (!apiKey) {
583891
+ logForDebugging("[AINative] No API key, skipping subscription fetch");
583892
+ return;
583893
+ }
583894
+ try {
583895
+ logForDebugging("[AINative] Fetching subscription");
583896
+ const response = await axios_default.get(`${baseUrl}/api/v1/public/subscription`, {
583897
+ headers: {
583898
+ "x-api-key": apiKey,
583899
+ "Content-Type": "application/json"
583900
+ },
583901
+ timeout: 5000
583902
+ });
583903
+ const sub = response.data?.data?.subscription;
583904
+ if (!sub) {
583905
+ logForDebugging("[AINative] No subscription found, caching free tier");
583906
+ saveGlobalConfig((current) => ({
583907
+ ...current,
583908
+ ainativeSubscriptionCache: {
583909
+ planId: "free",
583910
+ planName: "Free",
583911
+ status: "active",
583912
+ isActive: true,
583913
+ price: 0,
583914
+ fetchedAt: Date.now()
583915
+ }
583916
+ }));
583917
+ return;
583918
+ }
583919
+ const cached3 = {
583920
+ planId: sub.plan?.id ?? "free",
583921
+ planName: sub.plan?.name ?? "Free",
583922
+ status: sub.status ?? "active",
583923
+ isActive: sub.plan?.is_active ?? true,
583924
+ price: sub.plan?.price ?? 0,
583925
+ fetchedAt: Date.now()
583926
+ };
583927
+ const config4 = getGlobalConfig();
583928
+ if (isEqual_default(config4.ainativeSubscriptionCache, { ...cached3, fetchedAt: config4.ainativeSubscriptionCache?.fetchedAt })) {
583929
+ saveGlobalConfig((current) => ({
583930
+ ...current,
583931
+ ainativeSubscriptionCache: cached3
583932
+ }));
583933
+ return;
583934
+ }
583935
+ logForDebugging(`[AINative] Subscription: ${cached3.planName} (${cached3.status})`);
583936
+ saveGlobalConfig((current) => ({
583937
+ ...current,
583938
+ ainativeSubscriptionCache: cached3,
583939
+ ainativePlanCache: `AINative ${cached3.planName}`
583940
+ }));
583941
+ } catch (error43) {
583942
+ logForDebugging(`[AINative] Subscription fetch failed: ${axios_default.isAxiosError(error43) ? error43.response?.status ?? error43.code : "unknown"}`);
583943
+ }
583944
+ }
583760
583945
  var bootstrapResponseSchema;
583761
583946
  var init_bootstrap = __esm(() => {
583762
583947
  init_axios2();
@@ -584775,7 +584960,7 @@ function WelcomeV2() {
584775
584960
  dimColor: true,
584776
584961
  children: [
584777
584962
  "v",
584778
- "0.7.14",
584963
+ "0.7.15",
584779
584964
  " "
584780
584965
  ]
584781
584966
  }, undefined, true, undefined, this)
@@ -584975,7 +585160,7 @@ function WelcomeV2() {
584975
585160
  dimColor: true,
584976
585161
  children: [
584977
585162
  "v",
584978
- "0.7.14",
585163
+ "0.7.15",
584979
585164
  " "
584980
585165
  ]
584981
585166
  }, undefined, true, undefined, this)
@@ -585201,7 +585386,7 @@ function AppleTerminalWelcomeV2(t0) {
585201
585386
  dimColor: true,
585202
585387
  children: [
585203
585388
  "v",
585204
- "0.7.14",
585389
+ "0.7.15",
585205
585390
  " "
585206
585391
  ]
585207
585392
  }, undefined, true, undefined, this);
@@ -585455,7 +585640,7 @@ function AppleTerminalWelcomeV2(t0) {
585455
585640
  dimColor: true,
585456
585641
  children: [
585457
585642
  "v",
585458
- "0.7.14",
585643
+ "0.7.15",
585459
585644
  " "
585460
585645
  ]
585461
585646
  }, undefined, true, undefined, this);
@@ -586959,7 +587144,7 @@ function completeOnboarding() {
586959
587144
  saveGlobalConfig((current) => ({
586960
587145
  ...current,
586961
587146
  hasCompletedOnboarding: true,
586962
- lastOnboardingVersion: "0.7.14"
587147
+ lastOnboardingVersion: "0.7.15"
586963
587148
  }));
586964
587149
  }
586965
587150
  function showDialog(root2, renderer) {
@@ -591437,7 +591622,7 @@ function appendToLog(path28, message) {
591437
591622
  cwd: getFsImplementation().cwd(),
591438
591623
  userType: "external",
591439
591624
  sessionId: getSessionId(),
591440
- version: "0.7.14"
591625
+ version: "0.7.15"
591441
591626
  };
591442
591627
  getLogWriter(path28).write(messageWithTimestamp);
591443
591628
  }
@@ -595396,8 +595581,8 @@ async function getEnvLessBridgeConfig() {
595396
595581
  }
595397
595582
  async function checkEnvLessBridgeMinVersion() {
595398
595583
  const cfg = await getEnvLessBridgeConfig();
595399
- if (cfg.min_version && lt("0.7.14", cfg.min_version)) {
595400
- return `Your version of Cody CLI (${"0.7.14"}) is too old for Remote Control.
595584
+ if (cfg.min_version && lt("0.7.15", cfg.min_version)) {
595585
+ return `Your version of Cody CLI (${"0.7.15"}) is too old for Remote Control.
595401
595586
  Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
595402
595587
  }
595403
595588
  return null;
@@ -595871,7 +596056,7 @@ async function initBridgeCore(params) {
595871
596056
  const rawApi = createBridgeApiClient({
595872
596057
  baseUrl,
595873
596058
  getAccessToken,
595874
- runnerVersion: "0.7.14",
596059
+ runnerVersion: "0.7.15",
595875
596060
  onDebug: logForDebugging,
595876
596061
  onAuth401,
595877
596062
  getTrustedDeviceToken
@@ -601508,7 +601693,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
601508
601693
  setCwd(cwd3);
601509
601694
  const server = new Server({
601510
601695
  name: "claude/tengu",
601511
- version: "0.7.14"
601696
+ version: "0.7.15"
601512
601697
  }, {
601513
601698
  capabilities: {
601514
601699
  tools: {}
@@ -602968,7 +603153,7 @@ async function setupTokenHandler(root2) {
602968
603153
  resolve42();
602969
603154
  },
602970
603155
  mode: "setup-token",
602971
- startingMessage: "This will guide you through long-lived (1-year) auth token setup for your Claude account. Claude subscription required."
603156
+ startingMessage: "This will guide you through long-lived (1-year) auth token setup for your AINative account. Active subscription required."
602972
603157
  }, undefined, false, undefined, this)
602973
603158
  ]
602974
603159
  }, undefined, true, undefined, this)
@@ -603119,7 +603304,7 @@ __export(exports_update, {
603119
603304
  });
603120
603305
  async function update() {
603121
603306
  logEvent("tengu_update_check", {});
603122
- writeToStdout(`Current version: ${"0.7.14"}
603307
+ writeToStdout(`Current version: ${"0.7.15"}
603123
603308
  `);
603124
603309
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
603125
603310
  writeToStdout(`Checking for updates to ${channel} version...
@@ -603194,8 +603379,8 @@ async function update() {
603194
603379
  writeToStdout(`Cody CLI is managed by Homebrew.
603195
603380
  `);
603196
603381
  const latest = await getLatestVersion(channel);
603197
- if (latest && !gte("0.7.14", latest)) {
603198
- writeToStdout(`Update available: ${"0.7.14"} → ${latest}
603382
+ if (latest && !gte("0.7.15", latest)) {
603383
+ writeToStdout(`Update available: ${"0.7.15"} → ${latest}
603199
603384
  `);
603200
603385
  writeToStdout(`
603201
603386
  `);
@@ -603211,8 +603396,8 @@ async function update() {
603211
603396
  writeToStdout(`Cody CLI is managed by winget.
603212
603397
  `);
603213
603398
  const latest = await getLatestVersion(channel);
603214
- if (latest && !gte("0.7.14", latest)) {
603215
- writeToStdout(`Update available: ${"0.7.14"} → ${latest}
603399
+ if (latest && !gte("0.7.15", latest)) {
603400
+ writeToStdout(`Update available: ${"0.7.15"} → ${latest}
603216
603401
  `);
603217
603402
  writeToStdout(`
603218
603403
  `);
@@ -603228,8 +603413,8 @@ async function update() {
603228
603413
  writeToStdout(`Cody CLI is managed by apk.
603229
603414
  `);
603230
603415
  const latest = await getLatestVersion(channel);
603231
- if (latest && !gte("0.7.14", latest)) {
603232
- writeToStdout(`Update available: ${"0.7.14"} → ${latest}
603416
+ if (latest && !gte("0.7.15", latest)) {
603417
+ writeToStdout(`Update available: ${"0.7.15"} → ${latest}
603233
603418
  `);
603234
603419
  writeToStdout(`
603235
603420
  `);
@@ -603294,11 +603479,11 @@ async function update() {
603294
603479
  `);
603295
603480
  await gracefulShutdown(1);
603296
603481
  }
603297
- if (result.latestVersion === "0.7.14") {
603298
- writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.14"})`) + `
603482
+ if (result.latestVersion === "0.7.15") {
603483
+ writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.15"})`) + `
603299
603484
  `);
603300
603485
  } else {
603301
- writeToStdout(source_default.green(`Successfully updated from ${"0.7.14"} to version ${result.latestVersion}`) + `
603486
+ writeToStdout(source_default.green(`Successfully updated from ${"0.7.15"} to version ${result.latestVersion}`) + `
603302
603487
  `);
603303
603488
  await regenerateCompletionCache();
603304
603489
  }
@@ -603358,12 +603543,12 @@ async function update() {
603358
603543
  `);
603359
603544
  await gracefulShutdown(1);
603360
603545
  }
603361
- if (latestVersion === "0.7.14") {
603362
- writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.14"})`) + `
603546
+ if (latestVersion === "0.7.15") {
603547
+ writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.15"})`) + `
603363
603548
  `);
603364
603549
  await gracefulShutdown(0);
603365
603550
  }
603366
- writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.14"})
603551
+ writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.15"})
603367
603552
  `);
603368
603553
  writeToStdout(`Installing update...
603369
603554
  `);
@@ -603408,7 +603593,7 @@ async function update() {
603408
603593
  logForDebugging(`update: Installation status: ${status2}`);
603409
603594
  switch (status2) {
603410
603595
  case "success":
603411
- writeToStdout(source_default.green(`Successfully updated from ${"0.7.14"} to version ${latestVersion}`) + `
603596
+ writeToStdout(source_default.green(`Successfully updated from ${"0.7.15"} to version ${latestVersion}`) + `
603412
603597
  `);
603413
603598
  await regenerateCompletionCache();
603414
603599
  break;
@@ -604169,7 +604354,7 @@ ${formattedErrors}
604169
604354
  }
604170
604355
  const chromeOpts = options;
604171
604356
  setChromeFlagOverride(chromeOpts.chrome);
604172
- const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && isClaudeAISubscriber();
604357
+ const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && isActiveSubscriber();
604173
604358
  const autoEnableClaudeInChrome = !enableClaudeInChrome && shouldAutoEnableClaudeInChrome();
604174
604359
  if (enableClaudeInChrome) {
604175
604360
  const platform7 = getPlatform();
@@ -604552,6 +604737,7 @@ ${customInstructions}` : customInstructions;
604552
604737
  logForDebugging(`Starting background startup prefetches${lastPrefetchedInfo}`);
604553
604738
  checkQuotaStatus().catch((error43) => logError2(error43));
604554
604739
  fetchBootstrapData();
604740
+ fetchAINativeSubscription();
604555
604741
  prefetchPassesEligibility();
604556
604742
  if (!getFeatureValue_CACHED_MAY_BE_STALE("tengu_miraculo_the_bard", false)) {
604557
604743
  prefetchFastModeStatus();
@@ -604652,7 +604838,7 @@ ${customInstructions}` : customInstructions;
604652
604838
  }
604653
604839
  }
604654
604840
  logForDiagnosticsNoPII("info", "started", {
604655
- version: "0.7.14",
604841
+ version: "0.7.15",
604656
604842
  is_native_binary: isInBundledMode()
604657
604843
  });
604658
604844
  registerCleanup(async () => {
@@ -605420,7 +605606,7 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
605420
605606
  } else {
605421
605607
  const pendingHookMessages = hooksPromise && hookMessages.length === 0 ? hooksPromise : undefined;
605422
605608
  profileCheckpoint("action_after_hooks");
605423
- console.log(getWelcomeMessage("0.7.14"));
605609
+ console.log(getWelcomeMessage("0.7.15"));
605424
605610
  maybeActivateProactive(options);
605425
605611
  maybeActivateBrief(options);
605426
605612
  if (false) {}
@@ -605437,10 +605623,10 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
605437
605623
  pendingHookMessages
605438
605624
  }, renderAndRun);
605439
605625
  }
605440
- }).version("0.7.14 (Cody CLI)", "-v, --version", "Output the version number");
605626
+ }).version("0.7.15 (Cody CLI)", "-v, --version", "Output the version number");
605441
605627
  program2.configureOutput({
605442
605628
  writeOut: (str2) => {
605443
- if (str2.includes("0.7.14")) {
605629
+ if (str2.includes("0.7.15")) {
605444
605630
  process.stdout.write(getCodyLogo() + `
605445
605631
  ` + str2);
605446
605632
  } else {
@@ -605636,7 +605822,7 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
605636
605822
  } = await Promise.resolve().then(() => (init_plugins(), exports_plugins));
605637
605823
  await pluginUpdateHandler2(plugin2, options);
605638
605824
  });
605639
- program2.command("setup-token").description("Set up a long-lived authentication token (requires Claude subscription)").action(async () => {
605825
+ program2.command("setup-token").description("Set up a long-lived authentication token (requires active subscription)").action(async () => {
605640
605826
  const [{
605641
605827
  setupTokenHandler: setupTokenHandler2
605642
605828
  }, {
@@ -605985,7 +606171,7 @@ async function main2() {
605985
606171
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
605986
606172
  const { getCodyLogo: getCodyLogo2 } = await Promise.resolve().then(() => (init_branding(), exports_branding));
605987
606173
  console.log(getCodyLogo2() + `
605988
- 0.7.14 (Cody CLI)`);
606174
+ 0.7.15 (Cody CLI)`);
605989
606175
  return;
605990
606176
  }
605991
606177
  const {