@ainative/cody-cli 0.7.13 → 0.7.15

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,9 +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")) {
172700
- return "AINative API";
172760
+ if (isAINativeBaseUrl()) {
172761
+ const { getGlobalConfig: getGlobalConfig2 } = (init_config2(), __toCommonJS(exports_config));
172762
+ const sub = getGlobalConfig2().ainativeSubscriptionCache;
172763
+ if (sub?.planName)
172764
+ return `AINative ${sub.planName}`;
172765
+ return getGlobalConfig2().ainativePlanCache || "AINative Free";
172701
172766
  }
172702
172767
  const subscriptionType = getSubscriptionType();
172703
172768
  switch (subscriptionType) {
@@ -172779,18 +172844,13 @@ function getAccountInformation() {
172779
172844
  const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
172780
172845
  const isAINative = baseUrl.includes("ainative.studio");
172781
172846
  if (isAINative) {
172847
+ const { getGlobalConfig: getGlobalConfig2 } = (init_config2(), __toCommonJS(exports_config));
172848
+ const config2 = getGlobalConfig2();
172849
+ const cachedUser = config2.ainativeUserCache;
172782
172850
  const accountInfo2 = {};
172783
- accountInfo2.subscription = getSubscriptionName();
172784
- accountInfo2.email = process.env.AINATIVE_USERNAME || process.env.USER_EMAIL || undefined;
172785
- accountInfo2.organization = "AINative Studio";
172786
- const oauthEmail = getOauthAccountInfo()?.emailAddress;
172787
- if (oauthEmail) {
172788
- accountInfo2.email = oauthEmail;
172789
- }
172790
- const orgName = getOauthAccountInfo()?.organizationName;
172791
- if (orgName) {
172792
- accountInfo2.organization = orgName;
172793
- }
172851
+ accountInfo2.subscription = config2.ainativePlanCache || getSubscriptionName();
172852
+ accountInfo2.email = cachedUser?.email || getOauthAccountInfo()?.emailAddress || process.env.AINATIVE_USERNAME || process.env.USER_EMAIL || undefined;
172853
+ accountInfo2.organization = cachedUser?.organization || getOauthAccountInfo()?.organizationName || undefined;
172794
172854
  return accountInfo2;
172795
172855
  }
172796
172856
  const apiProvider = getAPIProvider();
@@ -172993,7 +173053,7 @@ var init_auth2 = __esm(() => {
172993
173053
 
172994
173054
  // src/utils/userAgent.ts
172995
173055
  function getCodyUserAgent() {
172996
- return `cody-cli/${"0.7.13"}`;
173056
+ return `cody-cli/${"0.7.15"}`;
172997
173057
  }
172998
173058
 
172999
173059
  // src/utils/workloadContext.ts
@@ -173015,7 +173075,7 @@ function getUserAgent() {
173015
173075
  const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
173016
173076
  const workload = getWorkload();
173017
173077
  const workloadSuffix = workload ? `, workload/${workload}` : "";
173018
- return `claude-cli/${"0.7.13"} (${"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})`;
173019
173079
  }
173020
173080
  function getMCPUserAgent() {
173021
173081
  const parts = [];
@@ -173029,7 +173089,7 @@ function getMCPUserAgent() {
173029
173089
  parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
173030
173090
  }
173031
173091
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
173032
- return `claude-code/${"0.7.13"}${suffix}`;
173092
+ return `claude-code/${"0.7.15"}${suffix}`;
173033
173093
  }
173034
173094
  function getWebFetchUserAgent() {
173035
173095
  return `Claude-User (${getCodyUserAgent()}; +https://support.anthropic.com/)`;
@@ -173167,7 +173227,7 @@ var init_user = __esm(() => {
173167
173227
  deviceId,
173168
173228
  sessionId: getSessionId(),
173169
173229
  email: getEmail(),
173170
- appVersion: "0.7.13",
173230
+ appVersion: "0.7.15",
173171
173231
  platform: getHostPlatformForAnalytics(),
173172
173232
  organizationUuid,
173173
173233
  accountUuid,
@@ -180859,7 +180919,7 @@ var init_metadata = __esm(() => {
180859
180919
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
180860
180920
  WHITESPACE_REGEX = /\s+/;
180861
180921
  getVersionBase = memoize_default(() => {
180862
- const match = "0.7.13".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
180922
+ const match = "0.7.15".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
180863
180923
  return match ? match[0] : undefined;
180864
180924
  });
180865
180925
  buildEnvContext = memoize_default(async () => {
@@ -180899,9 +180959,9 @@ var init_metadata = __esm(() => {
180899
180959
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
180900
180960
  isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
180901
180961
  isClaudeAiAuth: isClaudeAISubscriber(),
180902
- version: "0.7.13",
180962
+ version: "0.7.15",
180903
180963
  versionBase: getVersionBase(),
180904
- buildTime: "1775373393",
180964
+ buildTime: "1775419910",
180905
180965
  deploymentEnvironment: env4.detectDeploymentEnvironment(),
180906
180966
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
180907
180967
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -181519,7 +181579,7 @@ function initialize1PEventLogging() {
181519
181579
  const platform3 = getPlatform();
181520
181580
  const attributes = {
181521
181581
  [import_semantic_conventions.ATTR_SERVICE_NAME]: "cody-cli",
181522
- [import_semantic_conventions.ATTR_SERVICE_VERSION]: "0.7.13"
181582
+ [import_semantic_conventions.ATTR_SERVICE_VERSION]: "0.7.15"
181523
181583
  };
181524
181584
  if (platform3 === "wsl") {
181525
181585
  const wslVersion = getWslVersion();
@@ -181546,7 +181606,7 @@ function initialize1PEventLogging() {
181546
181606
  })
181547
181607
  ]
181548
181608
  });
181549
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.ainative.cody_cli.events", "0.7.13");
181609
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.ainative.cody_cli.events", "0.7.15");
181550
181610
  }
181551
181611
  async function reinitialize1PEventLoggingIfConfigChanged() {
181552
181612
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -183371,7 +183431,7 @@ function getAttributionHeader(fingerprint) {
183371
183431
  if (!isAttributionHeaderEnabled()) {
183372
183432
  return "";
183373
183433
  }
183374
- const version6 = `${"0.7.13"}.${fingerprint}`;
183434
+ const version6 = `${"0.7.15"}.${fingerprint}`;
183375
183435
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
183376
183436
  const cch = "";
183377
183437
  const workload = getWorkload();
@@ -240600,7 +240660,7 @@ async function* withRetry(getClient2, operation, options) {
240600
240660
  });
240601
240661
  throw new CannotRetryError(error43, retryContext);
240602
240662
  }
240603
- 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))) {
240604
240664
  consecutive529Errors++;
240605
240665
  if (consecutive529Errors >= MAX_529_RETRIES) {
240606
240666
  if (options.fallbackModel) {
@@ -240808,7 +240868,7 @@ function shouldRetry(error43) {
240808
240868
  return true;
240809
240869
  }
240810
240870
  const shouldRetryHeader = error43.headers?.get("x-should-retry");
240811
- if (shouldRetryHeader === "true" && (!isClaudeAISubscriber() || isEnterpriseSubscriber())) {
240871
+ if (shouldRetryHeader === "true" && (!isActiveSubscriber() || isEnterpriseSubscriber())) {
240812
240872
  return true;
240813
240873
  }
240814
240874
  if (shouldRetryHeader === "false") {
@@ -240827,7 +240887,7 @@ function shouldRetry(error43) {
240827
240887
  if (error43.status === 409)
240828
240888
  return true;
240829
240889
  if (error43.status === 429) {
240830
- return !isClaudeAISubscriber() || isEnterpriseSubscriber();
240890
+ return !isActiveSubscriber() || isEnterpriseSubscriber();
240831
240891
  }
240832
240892
  if (error43.status === 401) {
240833
240893
  clearApiKeyHelperCache();
@@ -247450,7 +247510,7 @@ function getTelemetryAttributes() {
247450
247510
  attributes["session.id"] = sessionId;
247451
247511
  }
247452
247512
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
247453
- attributes["app.version"] = "0.7.13";
247513
+ attributes["app.version"] = "0.7.15";
247454
247514
  }
247455
247515
  const oauthAccount = getOauthAccountInfo();
247456
247516
  if (oauthAccount) {
@@ -250170,7 +250230,7 @@ async function checkQuotaStatus() {
250170
250230
  if (isEssentialTrafficOnly()) {
250171
250231
  return;
250172
250232
  }
250173
- if (!shouldProcessRateLimits(isClaudeAISubscriber())) {
250233
+ if (!shouldProcessRateLimits(isActiveSubscriber())) {
250174
250234
  return;
250175
250235
  }
250176
250236
  if (getIsNonInteractiveSession()) {
@@ -250283,7 +250343,7 @@ function cacheExtraUsageDisabledReason(headers) {
250283
250343
  }
250284
250344
  }
250285
250345
  function extractQuotaStatusFromHeaders(headers) {
250286
- const isSubscriber = isClaudeAISubscriber();
250346
+ const isSubscriber = isActiveSubscriber();
250287
250347
  if (!shouldProcessRateLimits(isSubscriber)) {
250288
250348
  rawUtilization = {};
250289
250349
  if (currentLimits.status !== "allowed" || currentLimits.resetsAt) {
@@ -250305,7 +250365,7 @@ function extractQuotaStatusFromHeaders(headers) {
250305
250365
  }
250306
250366
  }
250307
250367
  function extractQuotaStatusFromError(error43) {
250308
- if (!shouldProcessRateLimits(isClaudeAISubscriber()) || error43.status !== 429) {
250368
+ if (!shouldProcessRateLimits(isActiveSubscriber()) || error43.status !== 429) {
250309
250369
  return;
250310
250370
  }
250311
250371
  try {
@@ -278627,7 +278687,7 @@ function getInstallationEnv() {
278627
278687
  return;
278628
278688
  }
278629
278689
  function getClaudeCodeVersion() {
278630
- return "0.7.13";
278690
+ return "0.7.15";
278631
278691
  }
278632
278692
  async function getInstalledVSCodeExtensionVersion(command) {
278633
278693
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -284161,7 +284221,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
284161
284221
  const client4 = new Client({
284162
284222
  name: "claude-code",
284163
284223
  title: "Claude Code",
284164
- version: "0.7.13",
284224
+ version: "0.7.15",
284165
284225
  description: "Anthropic's agentic coding tool",
284166
284226
  websiteUrl: PRODUCT_URL
284167
284227
  }, {
@@ -284515,7 +284575,7 @@ var init_client8 = __esm(() => {
284515
284575
  const client4 = new Client({
284516
284576
  name: "claude-code",
284517
284577
  title: "Claude Code",
284518
- version: "0.7.13",
284578
+ version: "0.7.15",
284519
284579
  description: "Anthropic's agentic coding tool",
284520
284580
  websiteUrl: PRODUCT_URL
284521
284581
  }, {
@@ -288223,7 +288283,7 @@ function checkOpus1mAccess() {
288223
288283
  if (is1mContextDisabled()) {
288224
288284
  return false;
288225
288285
  }
288226
- if (isClaudeAISubscriber()) {
288286
+ if (isActiveSubscriber()) {
288227
288287
  return isExtraUsageEnabled();
288228
288288
  }
288229
288289
  return true;
@@ -288232,7 +288292,7 @@ function checkSonnet1mAccess() {
288232
288292
  if (is1mContextDisabled()) {
288233
288293
  return false;
288234
288294
  }
288235
- if (isClaudeAISubscriber()) {
288295
+ if (isActiveSubscriber()) {
288236
288296
  return isExtraUsageEnabled();
288237
288297
  }
288238
288298
  return true;
@@ -298589,7 +298649,7 @@ class BigQueryMetricsExporter {
298589
298649
  if (attrs["wsl.version"]) {
298590
298650
  resourceAttributes["wsl.version"] = attrs["wsl.version"];
298591
298651
  }
298592
- if (isClaudeAISubscriber()) {
298652
+ if (isActiveSubscriber()) {
298593
298653
  resourceAttributes["user.customer_type"] = "claude_ai";
298594
298654
  const subscriptionType = getSubscriptionType();
298595
298655
  if (subscriptionType) {
@@ -332608,7 +332668,7 @@ function getBigQueryExportingReader() {
332608
332668
  }
332609
332669
  function isBigQueryMetricsEnabled() {
332610
332670
  const subscriptionType = getSubscriptionType();
332611
- const isC4EOrTeamUser = isClaudeAISubscriber() && (subscriptionType === "enterprise" || subscriptionType === "team");
332671
+ const isC4EOrTeamUser = isActiveSubscriber() && (subscriptionType === "enterprise" || subscriptionType === "team");
332612
332672
  return is1PApiCustomer() || isC4EOrTeamUser;
332613
332673
  }
332614
332674
  async function initializeBetaTracing(resource) {
@@ -332647,7 +332707,7 @@ async function initializeBetaTracing(resource) {
332647
332707
  });
332648
332708
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
332649
332709
  setLoggerProvider(loggerProvider);
332650
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.13");
332710
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.15");
332651
332711
  setEventLogger(eventLogger);
332652
332712
  process.on("beforeExit", async () => {
332653
332713
  await loggerProvider?.forceFlush();
@@ -332687,7 +332747,7 @@ async function initializeTelemetry() {
332687
332747
  const platform5 = getPlatform();
332688
332748
  const baseAttributes = {
332689
332749
  [import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
332690
- [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "0.7.13"
332750
+ [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "0.7.15"
332691
332751
  };
332692
332752
  if (platform5 === "wsl") {
332693
332753
  const wslVersion = getWslVersion();
@@ -332732,7 +332792,7 @@ async function initializeTelemetry() {
332732
332792
  } catch {}
332733
332793
  };
332734
332794
  registerCleanup(shutdownTelemetry2);
332735
- return meterProvider2.getMeter("com.anthropic.claude_code", "0.7.13");
332795
+ return meterProvider2.getMeter("com.anthropic.claude_code", "0.7.15");
332736
332796
  }
332737
332797
  const meterProvider = new import_sdk_metrics2.MeterProvider({
332738
332798
  resource,
@@ -332752,7 +332812,7 @@ async function initializeTelemetry() {
332752
332812
  });
332753
332813
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
332754
332814
  setLoggerProvider(loggerProvider);
332755
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.13");
332815
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.15");
332756
332816
  setEventLogger(eventLogger);
332757
332817
  logForDebugging("[3P telemetry] Event logger set successfully");
332758
332818
  process.on("beforeExit", async () => {
@@ -332814,7 +332874,7 @@ Current timeout: ${timeoutMs}ms
332814
332874
  }
332815
332875
  };
332816
332876
  registerCleanup(shutdownTelemetry);
332817
- return meterProvider.getMeter("com.anthropic.claude_code", "0.7.13");
332877
+ return meterProvider.getMeter("com.anthropic.claude_code", "0.7.15");
332818
332878
  }
332819
332879
  async function flushTelemetry() {
332820
332880
  const meterProvider = getMeterProvider();
@@ -333503,9 +333563,9 @@ async function assertMinVersion() {
333503
333563
  }
333504
333564
  try {
333505
333565
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
333506
- if (versionConfig.minVersion && lt("0.7.13", versionConfig.minVersion)) {
333566
+ if (versionConfig.minVersion && lt("0.7.15", versionConfig.minVersion)) {
333507
333567
  console.error(`
333508
- It looks like your version of Cody CLI (${"0.7.13"}) needs an update.
333568
+ It looks like your version of Cody CLI (${"0.7.15"}) needs an update.
333509
333569
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
333510
333570
 
333511
333571
  To update, please run:
@@ -333742,7 +333802,7 @@ async function installGlobalPackage(specificVersion) {
333742
333802
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
333743
333803
  logEvent("tengu_auto_updater_lock_contention", {
333744
333804
  pid: process.pid,
333745
- currentVersion: "0.7.13"
333805
+ currentVersion: "0.7.15"
333746
333806
  });
333747
333807
  return "in_progress";
333748
333808
  }
@@ -333751,7 +333811,7 @@ async function installGlobalPackage(specificVersion) {
333751
333811
  if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
333752
333812
  logError2(new Error("Windows NPM detected in WSL environment"));
333753
333813
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
333754
- currentVersion: "0.7.13"
333814
+ currentVersion: "0.7.15"
333755
333815
  });
333756
333816
  console.error(`
333757
333817
  Error: Windows NPM detected in WSL
@@ -334286,7 +334346,7 @@ function detectLinuxGlobPatternWarnings() {
334286
334346
  }
334287
334347
  async function getDoctorDiagnostic() {
334288
334348
  const installationType = await getCurrentInstallationType();
334289
- const version6 = typeof MACRO !== "undefined" ? "0.7.13" : "unknown";
334349
+ const version6 = typeof MACRO !== "undefined" ? "0.7.15" : "unknown";
334290
334350
  const installationPath = await getInstallationPath();
334291
334351
  const invokedBinary = getInvokedBinary();
334292
334352
  const multipleInstallations = await detectMultipleInstallations();
@@ -335121,8 +335181,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
335121
335181
  const maxVersion = await getMaxVersion();
335122
335182
  if (maxVersion && gt(version6, maxVersion)) {
335123
335183
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version6} to ${maxVersion}`);
335124
- if (gte("0.7.13", maxVersion)) {
335125
- logForDebugging(`Native installer: current version ${"0.7.13"} is already at or above maxVersion ${maxVersion}, skipping update`);
335184
+ if (gte("0.7.15", maxVersion)) {
335185
+ logForDebugging(`Native installer: current version ${"0.7.15"} is already at or above maxVersion ${maxVersion}, skipping update`);
335126
335186
  logEvent("tengu_native_update_skipped_max_version", {
335127
335187
  latency_ms: Date.now() - startTime,
335128
335188
  max_version: maxVersion,
@@ -335133,7 +335193,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
335133
335193
  version6 = maxVersion;
335134
335194
  }
335135
335195
  }
335136
- if (!forceReinstall && version6 === "0.7.13" && await versionIsAvailable(version6) && await isPossibleClaudeBinary(executablePath)) {
335196
+ if (!forceReinstall && version6 === "0.7.15" && await versionIsAvailable(version6) && await isPossibleClaudeBinary(executablePath)) {
335137
335197
  logForDebugging(`Found ${version6} at ${executablePath}, skipping install`);
335138
335198
  logEvent("tengu_native_update_complete", {
335139
335199
  latency_ms: Date.now() - startTime,
@@ -336280,7 +336340,7 @@ function buildAPIProviderProperties() {
336280
336340
  }
336281
336341
  function getModelDisplayLabel(mainLoopModel) {
336282
336342
  let modelLabel = modelDisplayString(mainLoopModel);
336283
- if (mainLoopModel === null && isClaudeAISubscriber()) {
336343
+ if (mainLoopModel === null && isActiveSubscriber()) {
336284
336344
  const description = getClaudeAiUserDefaultModelDescription();
336285
336345
  modelLabel = `${source_default.bold("Default")} ${description}`;
336286
336346
  }
@@ -336320,6 +336380,8 @@ __export(exports_auth2, {
336320
336380
  });
336321
336381
  async function installOAuthTokens(tokens) {
336322
336382
  await performLogout({ clearOnboarding: false });
336383
+ const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
336384
+ const isAINative = baseUrl.includes("ainative.studio");
336323
336385
  const profile = tokens.profile ?? await getOauthProfileFromOauthToken(tokens.accessToken);
336324
336386
  if (profile) {
336325
336387
  storeOAuthAccountInfo({
@@ -336338,6 +336400,14 @@ async function installOAuthTokens(tokens) {
336338
336400
  emailAddress: tokens.tokenAccount.emailAddress,
336339
336401
  organizationUuid: tokens.tokenAccount.organizationUuid
336340
336402
  });
336403
+ } else if (isAINative) {
336404
+ const email3 = process.env.AINATIVE_USERNAME || process.env.USER_EMAIL || "user@ainative.studio";
336405
+ storeOAuthAccountInfo({
336406
+ accountUuid: tokens.accessToken.substring(0, 36),
336407
+ emailAddress: email3,
336408
+ organizationUuid: undefined
336409
+ });
336410
+ logForDebugging(`[AINative] Stored fallback account info for ${email3}`);
336341
336411
  }
336342
336412
  const storageResult = saveOAuthTokensIfNeeded(tokens);
336343
336413
  clearOAuthTokenCache();
@@ -336347,7 +336417,39 @@ async function installOAuthTokens(tokens) {
336347
336417
  });
336348
336418
  }
336349
336419
  await fetchAndStoreUserRoles(tokens.accessToken).catch((err2) => logForDebugging(String(err2), { level: "error" }));
336350
- if (shouldUseClaudeAIAuth(tokens.scopes)) {
336420
+ if (isAINative) {
336421
+ logForDebugging("[AINative] OAuth login — skipping API key creation, using env API key");
336422
+ saveGlobalConfig((current) => ({
336423
+ ...current,
336424
+ ainativeSubscriptionCache: {
336425
+ planId: "free",
336426
+ planName: "Free",
336427
+ status: "active",
336428
+ isActive: true,
336429
+ price: 0,
336430
+ fetchedAt: Date.now()
336431
+ },
336432
+ ainativePlanCache: "AINative Free"
336433
+ }));
336434
+ const envApiKey = process.env.ANTHROPIC_API_KEY;
336435
+ if (envApiKey) {
336436
+ const normalized = envApiKey.slice(-20);
336437
+ saveGlobalConfig((current) => {
336438
+ const approved = current.customApiKeyResponses?.approved ?? [];
336439
+ const rejected = (current.customApiKeyResponses?.rejected ?? []).filter((k2) => k2 !== normalized);
336440
+ if (approved.includes(normalized))
336441
+ return current;
336442
+ return {
336443
+ ...current,
336444
+ customApiKeyResponses: {
336445
+ ...current.customApiKeyResponses,
336446
+ approved: [...approved, normalized],
336447
+ rejected
336448
+ }
336449
+ };
336450
+ });
336451
+ }
336452
+ } else if (shouldUseClaudeAIAuth(tokens.scopes)) {
336351
336453
  await fetchAndStoreClaudeCodeFirstTokenDate().catch((err2) => logForDebugging(String(err2), { level: "error" }));
336352
336454
  } else {
336353
336455
  const apiKey = await createAndStoreApiKey(tokens.accessToken);
@@ -345475,7 +345577,7 @@ var init_overageCreditGrant = __esm(() => {
345475
345577
 
345476
345578
  // src/services/api/usage.ts
345477
345579
  async function fetchUtilization() {
345478
- if (!isClaudeAISubscriber() || !hasProfileScope()) {
345580
+ if (!isActiveSubscriber() || !hasProfileScope()) {
345479
345581
  return {};
345480
345582
  }
345481
345583
  const tokens = getClaudeAIOAuthTokens();
@@ -345747,7 +345849,7 @@ function RateLimitMessage(t0) {
345747
345849
  const isMax20x = rateLimitTier === "default_claude_max_20x";
345748
345850
  let t3;
345749
345851
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
345750
- t3 = shouldProcessMockLimits() || isClaudeAISubscriber();
345852
+ t3 = shouldProcessMockLimits() || isActiveSubscriber();
345751
345853
  $3[2] = t3;
345752
345854
  } else {
345753
345855
  t3 = $3[2];
@@ -356807,7 +356909,7 @@ var init_environments = __esm(() => {
356807
356909
 
356808
356910
  // src/utils/background/remote/preconditions.ts
356809
356911
  async function checkNeedsClaudeAiLogin() {
356810
- if (!isClaudeAISubscriber()) {
356912
+ if (!isActiveSubscriber()) {
356811
356913
  return false;
356812
356914
  }
356813
356915
  return checkAndRefreshOAuthTokenIfNeeded();
@@ -357233,11 +357335,11 @@ function TeleportError(t0) {
357233
357335
  children: [
357234
357336
  /* @__PURE__ */ jsx_dev_runtime117.jsxDEV(ThemedText, {
357235
357337
  dimColor: true,
357236
- children: "Teleport requires a Claude.ai account."
357338
+ children: "Teleport requires an AINative account."
357237
357339
  }, undefined, false, undefined, this),
357238
357340
  /* @__PURE__ */ jsx_dev_runtime117.jsxDEV(ThemedText, {
357239
357341
  dimColor: true,
357240
- children: "Your Claude Pro/Max subscription will be used by Claude Code."
357342
+ children: "Your subscription will be used by Cody CLI."
357241
357343
  }, undefined, false, undefined, this)
357242
357344
  ]
357243
357345
  }, undefined, true, undefined, this);
@@ -404498,7 +404600,7 @@ var CONFIG_TOOL_NAME = "Config";
404498
404600
  // src/utils/model/modelOptions.ts
404499
404601
  function getDefaultOptionForUser(fastMode = false) {
404500
404602
  if (false) {}
404501
- if (isClaudeAISubscriber()) {
404603
+ if (isActiveSubscriber()) {
404502
404604
  return {
404503
404605
  value: null,
404504
404606
  label: "Default (recommended)",
@@ -404625,7 +404727,7 @@ function getMaxOpusOption(fastMode = false) {
404625
404727
  }
404626
404728
  function getMaxSonnet46_1MOption() {
404627
404729
  const is3P = getAPIProvider() !== "firstParty";
404628
- const billingInfo = isClaudeAISubscriber() ? " · Billed as extra usage" : "";
404730
+ const billingInfo = isActiveSubscriber() ? " · Billed as extra usage" : "";
404629
404731
  return {
404630
404732
  value: "sonnet[1m]",
404631
404733
  label: "Sonnet (1M context)",
@@ -404633,7 +404735,7 @@ function getMaxSonnet46_1MOption() {
404633
404735
  };
404634
404736
  }
404635
404737
  function getMaxOpus46_1MOption(fastMode = false) {
404636
- const billingInfo = isClaudeAISubscriber() ? " · Billed as extra usage" : "";
404738
+ const billingInfo = isActiveSubscriber() ? " · Billed as extra usage" : "";
404637
404739
  return {
404638
404740
  value: "opus[1m]",
404639
404741
  label: "Opus (1M context)",
@@ -404658,7 +404760,7 @@ function getOpusPlanOption() {
404658
404760
  }
404659
404761
  function getModelOptionsBase(fastMode = false) {
404660
404762
  if (false) {}
404661
- if (isClaudeAISubscriber()) {
404763
+ if (isActiveSubscriber()) {
404662
404764
  if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
404663
404765
  const premiumOptions = [getDefaultOptionForUser(fastMode)];
404664
404766
  if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
@@ -418723,7 +418825,7 @@ function getAnthropicEnvMetadata() {
418723
418825
  function getBuildAgeMinutes() {
418724
418826
  if (false)
418725
418827
  ;
418726
- const buildTime = new Date("1775373393").getTime();
418828
+ const buildTime = new Date("1775419910").getTime();
418727
418829
  if (isNaN(buildTime))
418728
418830
  return;
418729
418831
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -434720,7 +434822,7 @@ function getAssistantMessageFromError(error43, model, options) {
434720
434822
  error: "rate_limit"
434721
434823
  });
434722
434824
  }
434723
- if (error43 instanceof APIError && error43.status === 429 && shouldProcessRateLimits(isClaudeAISubscriber())) {
434825
+ if (error43 instanceof APIError && error43.status === 429 && shouldProcessRateLimits(isActiveSubscriber())) {
434724
434826
  const rateLimitType = error43.headers?.get?.("anthropic-ratelimit-unified-representative-claim");
434725
434827
  const overageStatus = error43.headers?.get?.("anthropic-ratelimit-unified-overage-status");
434726
434828
  if (rateLimitType || overageStatus) {
@@ -434854,9 +434956,9 @@ function getAssistantMessageFromError(error43, model, options) {
434854
434956
  errorDetails: error43.message
434855
434957
  });
434856
434958
  }
434857
- if (isClaudeAISubscriber() && error43 instanceof APIError && error43.status === 400 && error43.message.toLowerCase().includes("invalid model name") && (isNonCustomOpusModel(model) || model === "opus")) {
434959
+ if (isActiveSubscriber() && error43 instanceof APIError && error43.status === 400 && error43.message.toLowerCase().includes("invalid model name") && (isNonCustomOpusModel(model) || model === "opus")) {
434858
434960
  return createAssistantAPIErrorMessage({
434859
- 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.",
434961
+ 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.",
434860
434962
  error: "invalid_request"
434861
434963
  });
434862
434964
  }
@@ -434869,7 +434971,7 @@ function getAssistantMessageFromError(error43, model, options) {
434869
434971
  }
434870
434972
  if (error43 instanceof APIError && error43.status === 400 && error43.message.toLowerCase().includes("organization has been disabled")) {
434871
434973
  const { source } = getAnthropicApiKeyWithSource();
434872
- if (source === "ANTHROPIC_API_KEY" && process.env.ANTHROPIC_API_KEY && !isClaudeAISubscriber()) {
434974
+ if (source === "ANTHROPIC_API_KEY" && process.env.ANTHROPIC_API_KEY && !isActiveSubscriber()) {
434873
434975
  const hasStoredOAuth = getClaudeAIOAuthTokens()?.accessToken != null;
434874
434976
  return createAssistantAPIErrorMessage({
434875
434977
  error: "invalid_request",
@@ -442236,7 +442338,7 @@ function Feedback({
442236
442338
  platform: env4.platform,
442237
442339
  gitRepo: envInfo.isGit,
442238
442340
  terminal: env4.terminal,
442239
- version: "0.7.13",
442341
+ version: "0.7.15",
442240
442342
  transcript: normalizeMessagesForAPI(messages),
442241
442343
  errors: sanitizedErrors,
442242
442344
  lastApiRequest: getLastAPIRequest(),
@@ -442428,7 +442530,7 @@ function Feedback({
442428
442530
  ", ",
442429
442531
  env4.terminal,
442430
442532
  ", v",
442431
- "0.7.13"
442533
+ "0.7.15"
442432
442534
  ]
442433
442535
  }, undefined, true, undefined, this)
442434
442536
  ]
@@ -442534,7 +442636,7 @@ ${sanitizedDescription}
442534
442636
  ` + `**Environment Info**
442535
442637
  ` + `- Platform: ${env4.platform}
442536
442638
  ` + `- Terminal: ${env4.terminal}
442537
- ` + `- Version: ${"0.7.13"}
442639
+ ` + `- Version: ${"0.7.15"}
442538
442640
  ` + `- Feedback ID: ${feedbackId}
442539
442641
  ` + `
442540
442642
  **Errors**
@@ -445634,7 +445736,7 @@ function buildPrimarySection() {
445634
445736
  }, undefined, false, undefined, this);
445635
445737
  return [{
445636
445738
  label: "Version",
445637
- value: "0.7.13"
445739
+ value: "0.7.15"
445638
445740
  }, {
445639
445741
  label: "Session name",
445640
445742
  value: nameValue
@@ -447014,7 +447116,7 @@ var init_ModelPicker = __esm(() => {
447014
447116
 
447015
447117
  // src/utils/extraUsage.ts
447016
447118
  function isBilledAsExtraUsage(model, isFastMode, isOpus1mMerged) {
447017
- if (!isClaudeAISubscriber())
447119
+ if (!isActiveSubscriber())
447018
447120
  return false;
447019
447121
  if (isFastMode)
447020
447122
  return true;
@@ -449385,7 +449487,7 @@ function Config({
449385
449487
  }
449386
449488
  }, undefined, false, undefined, this)
449387
449489
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime178.jsxDEV(ChannelDowngradeDialog, {
449388
- currentVersion: "0.7.13",
449490
+ currentVersion: "0.7.15",
449389
449491
  onChoice: (choice) => {
449390
449492
  setShowSubmenu(null);
449391
449493
  setTabsHidden(false);
@@ -449397,7 +449499,7 @@ function Config({
449397
449499
  autoUpdatesChannel: "stable"
449398
449500
  };
449399
449501
  if (choice === "stay") {
449400
- newSettings.minimumVersion = "0.7.13";
449502
+ newSettings.minimumVersion = "0.7.15";
449401
449503
  }
449402
449504
  updateSettingsForSource("userSettings", newSettings);
449403
449505
  setSettingsData((prev_27) => ({
@@ -452010,10 +452112,10 @@ __export(exports_cost, {
452010
452112
  call: () => call17
452011
452113
  });
452012
452114
  var call17 = async () => {
452013
- if (isClaudeAISubscriber()) {
452115
+ if (isActiveSubscriber()) {
452014
452116
  let value;
452015
452117
  if (currentLimits.isUsingOverage) {
452016
- 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";
452118
+ 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";
452017
452119
  } else {
452018
452120
  value = "You are currently using your subscription to power your Claude Code usage";
452019
452121
  }
@@ -452038,7 +452140,7 @@ var init_cost2 = __esm(() => {
452038
452140
  description: "Show the total cost and duration of the current session",
452039
452141
  get isHidden() {
452040
452142
  if (false) {}
452041
- return isClaudeAISubscriber();
452143
+ return isActiveSubscriber();
452042
452144
  },
452043
452145
  supportsNonInteractive: true,
452044
452146
  load: () => Promise.resolve().then(() => (init_cost(), exports_cost))
@@ -457398,7 +457500,7 @@ function HelpV2(t0) {
457398
457500
  let t6;
457399
457501
  if ($3[31] !== tabs) {
457400
457502
  t6 = /* @__PURE__ */ jsx_dev_runtime205.jsxDEV(Tabs, {
457401
- title: `Cody CLI v${"0.7.13"}`,
457503
+ title: `Cody CLI v${"0.7.15"}`,
457402
457504
  color: "professionalBlue",
457403
457505
  defaultTab: "general",
457404
457506
  children: tabs
@@ -459354,7 +459456,7 @@ function ApiKeyStep(t0) {
459354
459456
  children: /* @__PURE__ */ jsx_dev_runtime210.jsxDEV(ThemedText, {
459355
459457
  children: [
459356
459458
  selectedOption === "oauth" ? color("success", theme)("> ") : " ",
459357
- "Create a long-lived token with your Claude subscription"
459459
+ "Create a long-lived token with your AINative subscription"
459358
459460
  ]
459359
459461
  }, undefined, true, undefined, this)
459360
459462
  }, undefined, false, undefined, this);
@@ -481588,7 +481690,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
481588
481690
  return [];
481589
481691
  }
481590
481692
  }
481591
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.13") {
481693
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.15") {
481592
481694
  if (false) {}
481593
481695
  const cachedChangelog = await getStoredChangelog();
481594
481696
  if (lastSeenVersion !== currentVersion || !cachedChangelog) {
@@ -481601,7 +481703,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.13")
481601
481703
  releaseNotes
481602
481704
  };
481603
481705
  }
481604
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "0.7.13") {
481706
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "0.7.15") {
481605
481707
  if (false) {}
481606
481708
  const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion);
481607
481709
  return {
@@ -482757,11 +482859,11 @@ function getRecentActivitySync() {
482757
482859
  return cachedActivity;
482758
482860
  }
482759
482861
  function getLogoDisplayData() {
482760
- const version6 = process.env.DEMO_VERSION ?? "0.7.13";
482862
+ const version6 = process.env.DEMO_VERSION ?? "0.7.15";
482761
482863
  const serverUrl = getDirectConnectServerUrl();
482762
482864
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
482763
482865
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
482764
- const billingType = isAINativeProvider() ? getGlobalConfig().ainativePlanCache || "AINative Pro" : isClaudeAISubscriber() ? getSubscriptionName() : "API Usage Billing";
482866
+ const billingType = isAINativeProvider() ? getGlobalConfig().ainativePlanCache || "AINative Pro" : isActiveSubscriber() ? getSubscriptionName() : "API Usage Billing";
482765
482867
  const agentName = getInitialSettings().agent;
482766
482868
  return {
482767
482869
  version: version6,
@@ -483368,7 +483470,7 @@ async function fetchReferralRedemptions(campaign = "claude_code_guest_pass") {
483368
483470
  return response.data;
483369
483471
  }
483370
483472
  function shouldCheckForPasses() {
483371
- return !!(getOauthAccountInfo()?.organizationUuid && isClaudeAISubscriber() && getSubscriptionType() === "max");
483473
+ return !!(getOauthAccountInfo()?.organizationUuid && isActiveSubscriber() && getSubscriptionType() === "max");
483372
483474
  }
483373
483475
  function checkCachedPassesEligibility() {
483374
483476
  if (!shouldCheckForPasses()) {
@@ -484272,7 +484374,7 @@ function LogoV2() {
484272
484374
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
484273
484375
  t2 = () => {
484274
484376
  const currentConfig = getGlobalConfig();
484275
- if (currentConfig.lastReleaseNotesSeen === "0.7.13") {
484377
+ if (currentConfig.lastReleaseNotesSeen === "0.7.15") {
484276
484378
  return;
484277
484379
  }
484278
484380
  saveGlobalConfig(_temp329);
@@ -484948,12 +485050,12 @@ function LogoV2() {
484948
485050
  return t41;
484949
485051
  }
484950
485052
  function _temp329(current) {
484951
- if (current.lastReleaseNotesSeen === "0.7.13") {
485053
+ if (current.lastReleaseNotesSeen === "0.7.15") {
484952
485054
  return current;
484953
485055
  }
484954
485056
  return {
484955
485057
  ...current,
484956
- lastReleaseNotesSeen: "0.7.13"
485058
+ lastReleaseNotesSeen: "0.7.15"
484957
485059
  };
484958
485060
  }
484959
485061
  function _temp245(s_0) {
@@ -485579,7 +485681,7 @@ var init_statusNoticeDefinitions = __esm(() => {
485579
485681
  type: "warning",
485580
485682
  isActive: () => {
485581
485683
  const authTokenInfo = getAuthTokenSource();
485582
- return isClaudeAISubscriber() && (authTokenInfo.source === "ANTHROPIC_AUTH_TOKEN" || authTokenInfo.source === "apiKeyHelper");
485684
+ return isActiveSubscriber() && (authTokenInfo.source === "ANTHROPIC_AUTH_TOKEN" || authTokenInfo.source === "apiKeyHelper");
485583
485685
  },
485584
485686
  render: () => {
485585
485687
  const authTokenInfo = getAuthTokenSource();
@@ -491174,7 +491276,7 @@ var init_ultrareviewEnabled = __esm(() => {
491174
491276
 
491175
491277
  // src/services/api/ultrareviewQuota.ts
491176
491278
  async function fetchUltrareviewQuota() {
491177
- if (!isClaudeAISubscriber())
491279
+ if (!isActiveSubscriber())
491178
491280
  return null;
491179
491281
  try {
491180
491282
  const { accessToken, orgUUID } = await prepareApiRequest();
@@ -511291,7 +511393,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
511291
511393
  smapsRollup,
511292
511394
  platform: process.platform,
511293
511395
  nodeVersion: process.version,
511294
- ccVersion: "0.7.13"
511396
+ ccVersion: "0.7.15"
511295
511397
  };
511296
511398
  }
511297
511399
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -511819,7 +511921,7 @@ var init_bridge_kick = __esm(() => {
511819
511921
  var call56 = async () => {
511820
511922
  return {
511821
511923
  type: "text",
511822
- value: `${"0.7.13"} (built ${"1775373393"})`
511924
+ value: `${"0.7.15"} (built ${"1775419910"})`
511823
511925
  };
511824
511926
  }, version6, version_default;
511825
511927
  var init_version = __esm(() => {
@@ -513379,7 +513481,7 @@ function ClaudeInChromeMenu(t0) {
513379
513481
  onDone,
513380
513482
  isExtensionInstalled: installed,
513381
513483
  configEnabled,
513382
- isClaudeAISubscriber: isClaudeAISubscriber2,
513484
+ isActiveSubscriber: isActiveSubscriber2,
513383
513485
  isWSL
513384
513486
  } = t0;
513385
513487
  const mcpClients = useAppState(_temp159);
@@ -513554,7 +513656,7 @@ function ClaudeInChromeMenu(t0) {
513554
513656
  } else {
513555
513657
  options = $3[8];
513556
513658
  }
513557
- const isDisabled = isWSL || !isClaudeAISubscriber2;
513659
+ const isDisabled = isWSL || !isActiveSubscriber2;
513558
513660
  let t5;
513559
513661
  if ($3[18] !== onDone) {
513560
513662
  t5 = () => onDone();
@@ -513584,12 +513686,12 @@ function ClaudeInChromeMenu(t0) {
513584
513686
  t7 = $3[22];
513585
513687
  }
513586
513688
  let t8;
513587
- if ($3[23] !== isClaudeAISubscriber2) {
513588
- t8 = !isClaudeAISubscriber2 && /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ThemedText, {
513689
+ if ($3[23] !== isActiveSubscriber2) {
513690
+ t8 = !isActiveSubscriber2 && /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ThemedText, {
513589
513691
  color: "error",
513590
- children: "Claude in Chrome requires a claude.ai subscription."
513692
+ children: "Claude in Chrome requires an active subscription."
513591
513693
  }, undefined, false, undefined, this);
513592
- $3[23] = isClaudeAISubscriber2;
513694
+ $3[23] = isActiveSubscriber2;
513593
513695
  $3[24] = t8;
513594
513696
  } else {
513595
513697
  t8 = $3[24];
@@ -513741,13 +513843,13 @@ function _temp159(s) {
513741
513843
  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) {
513742
513844
  const isExtensionInstalled = await isChromeExtensionInstalled();
513743
513845
  const config4 = getGlobalConfig();
513744
- const isSubscriber = isClaudeAISubscriber();
513846
+ const isSubscriber = isActiveSubscriber();
513745
513847
  const isWSL = env4.isWslEnvironment();
513746
513848
  return /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ClaudeInChromeMenu, {
513747
513849
  onDone,
513748
513850
  isExtensionInstalled,
513749
513851
  configEnabled: config4.claudeInChromeDefaultEnabled,
513750
- isClaudeAISubscriber: isSubscriber,
513852
+ isActiveSubscriber: isSubscriber,
513751
513853
  isWSL
513752
513854
  }, undefined, false, undefined, this);
513753
513855
  };
@@ -515851,9 +515953,9 @@ var init_remote_env2 = __esm(() => {
515851
515953
  type: "local-jsx",
515852
515954
  name: "remote-env",
515853
515955
  description: "Configure the default remote environment for teleport sessions",
515854
- isEnabled: () => isClaudeAISubscriber() && isPolicyAllowed("allow_remote_sessions"),
515956
+ isEnabled: () => isActiveSubscriber() && isPolicyAllowed("allow_remote_sessions"),
515855
515957
  get isHidden() {
515856
- return !isClaudeAISubscriber() || !isPolicyAllowed("allow_remote_sessions");
515958
+ return !isActiveSubscriber() || !isPolicyAllowed("allow_remote_sessions");
515857
515959
  },
515858
515960
  load: () => Promise.resolve().then(() => (init_remote_env(), exports_remote_env))
515859
515961
  };
@@ -515866,7 +515968,7 @@ __export(exports_upgrade, {
515866
515968
  });
515867
515969
  async function call67(onDone, context4) {
515868
515970
  try {
515869
- if (isClaudeAISubscriber()) {
515971
+ if (isActiveSubscriber()) {
515870
515972
  const tokens = getClaudeAIOAuthTokens();
515871
515973
  let isMax20x = false;
515872
515974
  if (tokens?.subscriptionType && tokens?.rateLimitTier) {
@@ -516151,7 +516253,7 @@ var init_rate_limit_options2 = __esm(() => {
516151
516253
  name: "rate-limit-options",
516152
516254
  description: "Show options when rate limit is reached",
516153
516255
  isEnabled: () => {
516154
- if (!isClaudeAISubscriber()) {
516256
+ if (!isActiveSubscriber()) {
516155
516257
  return false;
516156
516258
  }
516157
516259
  return true;
@@ -520766,7 +520868,7 @@ function generateHtmlReport(data, insights) {
520766
520868
  </html>`;
520767
520869
  }
520768
520870
  function buildExportData(data, insights, facets, remoteStats) {
520769
- const version7 = typeof MACRO !== "undefined" ? "0.7.13" : "unknown";
520871
+ const version7 = typeof MACRO !== "undefined" ? "0.7.15" : "unknown";
520770
520872
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
520771
520873
  const facets_summary = {
520772
520874
  total: facets.size,
@@ -521382,11 +521484,11 @@ function meetsAvailabilityRequirement(cmd) {
521382
521484
  for (const a2 of cmd.availability) {
521383
521485
  switch (a2) {
521384
521486
  case "claude-ai":
521385
- if (isClaudeAISubscriber())
521487
+ if (isActiveSubscriber())
521386
521488
  return true;
521387
521489
  break;
521388
521490
  case "console":
521389
- if (!isClaudeAISubscriber() && !isUsing3PServices() && isFirstPartyAnthropicBaseUrl())
521491
+ if (!isActiveSubscriber() && !isUsing3PServices() && isFirstPartyAnthropicBaseUrl())
521390
521492
  return true;
521391
521493
  break;
521392
521494
  default: {
@@ -524712,7 +524814,7 @@ var init_sessionStorage = __esm(() => {
524712
524814
  init_settings2();
524713
524815
  init_slowOperations();
524714
524816
  init_uuid();
524715
- VERSION5 = typeof MACRO !== "undefined" ? "0.7.13" : "unknown";
524817
+ VERSION5 = typeof MACRO !== "undefined" ? "0.7.15" : "unknown";
524716
524818
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
524717
524819
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
524718
524820
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -525917,7 +526019,7 @@ var init_filesystem = __esm(() => {
525917
526019
  });
525918
526020
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
525919
526021
  const nonce = randomBytes19(16).toString("hex");
525920
- return join132(getClaudeTempDir(), "bundled-skills", "0.7.13", nonce);
526022
+ return join132(getClaudeTempDir(), "bundled-skills", "0.7.15", nonce);
525921
526023
  });
525922
526024
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
525923
526025
  });
@@ -531889,7 +531991,7 @@ function computeFingerprint(messageText, version7) {
531889
531991
  }
531890
531992
  function computeFingerprintFromMessages(messages) {
531891
531993
  const firstMessageText = extractFirstMessageText(messages);
531892
- return computeFingerprint(firstMessageText, "0.7.13");
531994
+ return computeFingerprint(firstMessageText, "0.7.15");
531893
531995
  }
531894
531996
  var FINGERPRINT_SALT = "59cf53e54c78";
531895
531997
  var init_fingerprint = () => {};
@@ -532061,7 +532163,7 @@ function should1hCacheTTL(querySource) {
532061
532163
  }
532062
532164
  let userEligible = getPromptCache1hEligible();
532063
532165
  if (userEligible === null) {
532064
- userEligible = isClaudeAISubscriber() && !currentLimits.isUsingOverage;
532166
+ userEligible = isActiveSubscriber() && !currentLimits.isUsingOverage;
532065
532167
  setPromptCache1hEligible(userEligible);
532066
532168
  }
532067
532169
  if (!userEligible)
@@ -532456,7 +532558,7 @@ async function* queryModel(messages, systemPrompt, thinkingConfig, tools, signal
532456
532558
  logForDebugging(`AINative Claude bypass failed, falling back to SDK: ${e}`, { level: "warn" });
532457
532559
  }
532458
532560
  }
532459
- if (!isClaudeAISubscriber() && isNonCustomOpusModel(options.model) && (await getDynamicConfig_BLOCKS_ON_INIT("tengu-off-switch", {
532561
+ if (!isActiveSubscriber() && isNonCustomOpusModel(options.model) && (await getDynamicConfig_BLOCKS_ON_INIT("tengu-off-switch", {
532460
532562
  activated: false
532461
532563
  })).activated) {
532462
532564
  logEvent("tengu_off_switch_query", {});
@@ -533803,7 +533905,7 @@ async function sideQuery(opts) {
533803
533905
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
533804
533906
  }
533805
533907
  const messageText = extractFirstUserMessageText(messages);
533806
- const fingerprint = computeFingerprint(messageText, "0.7.13");
533908
+ const fingerprint = computeFingerprint(messageText, "0.7.15");
533807
533909
  const attributionHeader = getAttributionHeader(fingerprint);
533808
533910
  const systemBlocks = [
533809
533911
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -538327,7 +538429,7 @@ function buildSystemInitMessage(inputs) {
538327
538429
  slash_commands: inputs.commands.filter((c6) => c6.userInvocable !== false).map((c6) => c6.name),
538328
538430
  apiKeySource: getAnthropicApiKeyWithSource().source,
538329
538431
  betas: getSdkBetas(),
538330
- claude_code_version: "0.7.13",
538432
+ claude_code_version: "0.7.15",
538331
538433
  output_style: outputStyle2,
538332
538434
  agents: inputs.agents.map((agent) => agent.agentType),
538333
538435
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -552879,7 +552981,7 @@ var init_useVoiceEnabled = __esm(() => {
552879
552981
  function getSemverPart(version7) {
552880
552982
  return `${import_semver13.major(version7, { loose: true })}.${import_semver13.minor(version7, { loose: true })}.${import_semver13.patch(version7, { loose: true })}`;
552881
552983
  }
552882
- function useUpdateNotification(updatedVersion, initialVersion = "0.7.13") {
552984
+ function useUpdateNotification(updatedVersion, initialVersion = "0.7.15") {
552883
552985
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react227.useState(() => getSemverPart(initialVersion));
552884
552986
  if (!updatedVersion) {
552885
552987
  return null;
@@ -552919,7 +553021,7 @@ function AutoUpdater({
552919
553021
  return;
552920
553022
  }
552921
553023
  if (false) {}
552922
- const currentVersion = "0.7.13";
553024
+ const currentVersion = "0.7.15";
552923
553025
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
552924
553026
  let latestVersion = await getLatestVersion(channel);
552925
553027
  const isDisabled = isAutoUpdaterDisabled();
@@ -553132,12 +553234,12 @@ function NativeAutoUpdater({
553132
553234
  logEvent("tengu_native_auto_updater_start", {});
553133
553235
  try {
553134
553236
  const maxVersion = await getMaxVersion();
553135
- if (maxVersion && gt("0.7.13", maxVersion)) {
553237
+ if (maxVersion && gt("0.7.15", maxVersion)) {
553136
553238
  const msg = await getMaxVersionMessage();
553137
553239
  setMaxVersionIssue(msg ?? "affects your version");
553138
553240
  }
553139
553241
  const result = await installLatest(channel);
553140
- const currentVersion = "0.7.13";
553242
+ const currentVersion = "0.7.15";
553141
553243
  const latencyMs = Date.now() - startTime;
553142
553244
  if (result.lockFailed) {
553143
553245
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -553274,17 +553376,17 @@ function PackageManagerAutoUpdater(t0) {
553274
553376
  const maxVersion = await getMaxVersion();
553275
553377
  if (maxVersion && latest && gt(latest, maxVersion)) {
553276
553378
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
553277
- if (gte("0.7.13", maxVersion)) {
553278
- logForDebugging(`PackageManagerAutoUpdater: current version ${"0.7.13"} is already at or above maxVersion ${maxVersion}, skipping update`);
553379
+ if (gte("0.7.15", maxVersion)) {
553380
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"0.7.15"} is already at or above maxVersion ${maxVersion}, skipping update`);
553279
553381
  setUpdateAvailable(false);
553280
553382
  return;
553281
553383
  }
553282
553384
  latest = maxVersion;
553283
553385
  }
553284
- const hasUpdate = latest && !gte("0.7.13", latest) && !shouldSkipVersion(latest);
553386
+ const hasUpdate = latest && !gte("0.7.15", latest) && !shouldSkipVersion(latest);
553285
553387
  setUpdateAvailable(!!hasUpdate);
553286
553388
  if (hasUpdate) {
553287
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.7.13"} -> ${latest}`);
553389
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.7.15"} -> ${latest}`);
553288
553390
  }
553289
553391
  };
553290
553392
  $3[0] = t1;
@@ -553318,7 +553420,7 @@ function PackageManagerAutoUpdater(t0) {
553318
553420
  wrap: "truncate",
553319
553421
  children: [
553320
553422
  "currentVersion: ",
553321
- "0.7.13"
553423
+ "0.7.15"
553322
553424
  ]
553323
553425
  }, undefined, true, undefined, this);
553324
553426
  $3[3] = verbose;
@@ -561428,7 +561530,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
561428
561530
  project_dir: getOriginalCwd(),
561429
561531
  added_dirs: addedDirs
561430
561532
  },
561431
- version: "0.7.13",
561533
+ version: "0.7.15",
561432
561534
  output_style: {
561433
561535
  name: outputStyleName
561434
561536
  },
@@ -568124,9 +568226,13 @@ var init_useDeferredHookMessages = __esm(() => {
568124
568226
  // src/hooks/useApiKeyVerification.ts
568125
568227
  function useApiKeyVerification() {
568126
568228
  const [status2, setStatus] = import_react271.useState(() => {
568127
- if (!isAnthropicAuthEnabled() || isClaudeAISubscriber()) {
568229
+ if (!isAnthropicAuthEnabled() || isActiveSubscriber()) {
568128
568230
  return "valid";
568129
568231
  }
568232
+ const { hasToken } = getAuthTokenSource();
568233
+ if (hasToken) {
568234
+ return "loading";
568235
+ }
568130
568236
  const { key, source } = getAnthropicApiKeyWithSource({
568131
568237
  skipRetrievingKeyFromApiKeyHelper: true
568132
568238
  });
@@ -568137,7 +568243,13 @@ function useApiKeyVerification() {
568137
568243
  });
568138
568244
  const [error43, setError] = import_react271.useState(null);
568139
568245
  const verify = import_react271.useCallback(async () => {
568140
- if (!isAnthropicAuthEnabled() || isClaudeAISubscriber()) {
568246
+ if (!isAnthropicAuthEnabled() || isActiveSubscriber()) {
568247
+ setStatus("valid");
568248
+ return;
568249
+ }
568250
+ const { hasToken } = getAuthTokenSource();
568251
+ const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
568252
+ if (hasToken && baseUrl.includes("ainative.studio")) {
568141
568253
  setStatus("valid");
568142
568254
  return;
568143
568255
  }
@@ -568149,6 +568261,10 @@ function useApiKeyVerification() {
568149
568261
  setError(new Error("API key helper did not return a valid key"));
568150
568262
  return;
568151
568263
  }
568264
+ if (hasToken) {
568265
+ setStatus("valid");
568266
+ return;
568267
+ }
568152
568268
  const newStatus = "missing";
568153
568269
  setStatus(newStatus);
568154
568270
  return;
@@ -572802,7 +572918,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
572802
572918
  } catch {}
572803
572919
  const data = {
572804
572920
  trigger,
572805
- version: "0.7.13",
572921
+ version: "0.7.15",
572806
572922
  platform: process.platform,
572807
572923
  transcript,
572808
572924
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -574045,12 +574161,12 @@ async function _temp203() {
574045
574161
  if (!shouldEnableClaudeInChrome(chromeFlag)) {
574046
574162
  return null;
574047
574163
  }
574048
- if (!isClaudeAISubscriber()) {
574164
+ if (!isActiveSubscriber()) {
574049
574165
  return {
574050
574166
  key: "chrome-requires-subscription",
574051
574167
  jsx: /* @__PURE__ */ jsx_dev_runtime448.jsxDEV(ThemedText, {
574052
574168
  color: "error",
574053
- children: "Claude in Chrome requires a claude.ai subscription"
574169
+ children: "Claude in Chrome requires an active subscription"
574054
574170
  }, undefined, false, undefined, this),
574055
574171
  priority: "immediate",
574056
574172
  timeoutMs: 5000
@@ -578887,9 +579003,9 @@ async function _temp295() {
578887
579003
  jsx: /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
578888
579004
  color: "suggestion",
578889
579005
  children: [
578890
- "Use your existing Claude ",
579006
+ "Use your existing ",
578891
579007
  subscriptionType,
578892
- " plan with Claude Code",
579008
+ " plan with Cody CLI",
578893
579009
  /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
578894
579010
  color: "text",
578895
579011
  dimColor: true,
@@ -578910,7 +579026,7 @@ function _temp296(current) {
578910
579026
  };
578911
579027
  }
578912
579028
  async function getExistingClaudeSubscription() {
578913
- if (isClaudeAISubscriber()) {
579029
+ if (isActiveSubscriber()) {
578914
579030
  return null;
578915
579031
  }
578916
579032
  const profile = await getOauthProfileFromApiKey();
@@ -583743,8 +583859,9 @@ async function fetchBootstrapData() {
583743
583859
  const clientData = response.client_data ?? null;
583744
583860
  const additionalModelOptions = response.additional_model_options ?? [];
583745
583861
  const plan2 = response.plan ?? null;
583862
+ const userInfo4 = response.user ?? null;
583746
583863
  const config4 = getGlobalConfig();
583747
- if (isEqual_default(config4.clientDataCache, clientData) && isEqual_default(config4.additionalModelOptionsCache, additionalModelOptions) && isEqual_default(config4.ainativePlanCache, plan2)) {
583864
+ if (isEqual_default(config4.clientDataCache, clientData) && isEqual_default(config4.additionalModelOptionsCache, additionalModelOptions) && isEqual_default(config4.ainativePlanCache, plan2) && isEqual_default(config4.ainativeUserCache, userInfo4)) {
583748
583865
  logForDebugging("[Bootstrap] Cache unchanged, skipping write");
583749
583866
  return;
583750
583867
  }
@@ -583753,12 +583870,73 @@ async function fetchBootstrapData() {
583753
583870
  ...current,
583754
583871
  clientDataCache: clientData,
583755
583872
  additionalModelOptionsCache: additionalModelOptions,
583756
- ainativePlanCache: plan2
583873
+ ainativePlanCache: plan2,
583874
+ ainativeUserCache: userInfo4
583757
583875
  }));
583758
583876
  } catch (error43) {
583759
583877
  logError2(error43);
583760
583878
  }
583761
583879
  }
583880
+ async function fetchAINativeSubscription() {
583881
+ const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
583882
+ if (!baseUrl.includes("ainative.studio"))
583883
+ return;
583884
+ const apiKey = process.env.ANTHROPIC_API_KEY || getAnthropicApiKey();
583885
+ if (!apiKey) {
583886
+ logForDebugging("[AINative] No API key, skipping subscription fetch");
583887
+ return;
583888
+ }
583889
+ try {
583890
+ logForDebugging("[AINative] Fetching subscription");
583891
+ const response = await axios_default.get(`${baseUrl}/api/v1/public/subscription`, {
583892
+ headers: {
583893
+ "x-api-key": apiKey,
583894
+ "Content-Type": "application/json"
583895
+ },
583896
+ timeout: 5000
583897
+ });
583898
+ const sub = response.data?.data?.subscription;
583899
+ if (!sub) {
583900
+ logForDebugging("[AINative] No subscription found, caching free tier");
583901
+ saveGlobalConfig((current) => ({
583902
+ ...current,
583903
+ ainativeSubscriptionCache: {
583904
+ planId: "free",
583905
+ planName: "Free",
583906
+ status: "active",
583907
+ isActive: true,
583908
+ price: 0,
583909
+ fetchedAt: Date.now()
583910
+ }
583911
+ }));
583912
+ return;
583913
+ }
583914
+ const cached3 = {
583915
+ planId: sub.plan?.id ?? "free",
583916
+ planName: sub.plan?.name ?? "Free",
583917
+ status: sub.status ?? "active",
583918
+ isActive: sub.plan?.is_active ?? true,
583919
+ price: sub.plan?.price ?? 0,
583920
+ fetchedAt: Date.now()
583921
+ };
583922
+ const config4 = getGlobalConfig();
583923
+ if (isEqual_default(config4.ainativeSubscriptionCache, { ...cached3, fetchedAt: config4.ainativeSubscriptionCache?.fetchedAt })) {
583924
+ saveGlobalConfig((current) => ({
583925
+ ...current,
583926
+ ainativeSubscriptionCache: cached3
583927
+ }));
583928
+ return;
583929
+ }
583930
+ logForDebugging(`[AINative] Subscription: ${cached3.planName} (${cached3.status})`);
583931
+ saveGlobalConfig((current) => ({
583932
+ ...current,
583933
+ ainativeSubscriptionCache: cached3,
583934
+ ainativePlanCache: `AINative ${cached3.planName}`
583935
+ }));
583936
+ } catch (error43) {
583937
+ logForDebugging(`[AINative] Subscription fetch failed: ${axios_default.isAxiosError(error43) ? error43.response?.status ?? error43.code : "unknown"}`);
583938
+ }
583939
+ }
583762
583940
  var bootstrapResponseSchema;
583763
583941
  var init_bootstrap = __esm(() => {
583764
583942
  init_axios2();
@@ -583774,6 +583952,14 @@ var init_bootstrap = __esm(() => {
583774
583952
  bootstrapResponseSchema = lazySchema(() => exports_external2.object({
583775
583953
  client_data: exports_external2.record(exports_external2.unknown()).nullish(),
583776
583954
  plan: exports_external2.string().nullish(),
583955
+ user_plan: exports_external2.string().nullish(),
583956
+ user: exports_external2.object({
583957
+ id: exports_external2.string(),
583958
+ email: exports_external2.string(),
583959
+ name: exports_external2.string().nullish(),
583960
+ organization: exports_external2.string().nullish(),
583961
+ organization_id: exports_external2.string().nullish()
583962
+ }).nullish(),
583777
583963
  additional_model_options: exports_external2.array(exports_external2.object({
583778
583964
  model: exports_external2.string(),
583779
583965
  name: exports_external2.string(),
@@ -584769,7 +584955,7 @@ function WelcomeV2() {
584769
584955
  dimColor: true,
584770
584956
  children: [
584771
584957
  "v",
584772
- "0.7.13",
584958
+ "0.7.15",
584773
584959
  " "
584774
584960
  ]
584775
584961
  }, undefined, true, undefined, this)
@@ -584969,7 +585155,7 @@ function WelcomeV2() {
584969
585155
  dimColor: true,
584970
585156
  children: [
584971
585157
  "v",
584972
- "0.7.13",
585158
+ "0.7.15",
584973
585159
  " "
584974
585160
  ]
584975
585161
  }, undefined, true, undefined, this)
@@ -585195,7 +585381,7 @@ function AppleTerminalWelcomeV2(t0) {
585195
585381
  dimColor: true,
585196
585382
  children: [
585197
585383
  "v",
585198
- "0.7.13",
585384
+ "0.7.15",
585199
585385
  " "
585200
585386
  ]
585201
585387
  }, undefined, true, undefined, this);
@@ -585449,7 +585635,7 @@ function AppleTerminalWelcomeV2(t0) {
585449
585635
  dimColor: true,
585450
585636
  children: [
585451
585637
  "v",
585452
- "0.7.13",
585638
+ "0.7.15",
585453
585639
  " "
585454
585640
  ]
585455
585641
  }, undefined, true, undefined, this);
@@ -586953,7 +587139,7 @@ function completeOnboarding() {
586953
587139
  saveGlobalConfig((current) => ({
586954
587140
  ...current,
586955
587141
  hasCompletedOnboarding: true,
586956
- lastOnboardingVersion: "0.7.13"
587142
+ lastOnboardingVersion: "0.7.15"
586957
587143
  }));
586958
587144
  }
586959
587145
  function showDialog(root2, renderer) {
@@ -591431,7 +591617,7 @@ function appendToLog(path28, message) {
591431
591617
  cwd: getFsImplementation().cwd(),
591432
591618
  userType: "external",
591433
591619
  sessionId: getSessionId(),
591434
- version: "0.7.13"
591620
+ version: "0.7.15"
591435
591621
  };
591436
591622
  getLogWriter(path28).write(messageWithTimestamp);
591437
591623
  }
@@ -595390,8 +595576,8 @@ async function getEnvLessBridgeConfig() {
595390
595576
  }
595391
595577
  async function checkEnvLessBridgeMinVersion() {
595392
595578
  const cfg = await getEnvLessBridgeConfig();
595393
- if (cfg.min_version && lt("0.7.13", cfg.min_version)) {
595394
- return `Your version of Cody CLI (${"0.7.13"}) is too old for Remote Control.
595579
+ if (cfg.min_version && lt("0.7.15", cfg.min_version)) {
595580
+ return `Your version of Cody CLI (${"0.7.15"}) is too old for Remote Control.
595395
595581
  Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
595396
595582
  }
595397
595583
  return null;
@@ -595865,7 +596051,7 @@ async function initBridgeCore(params) {
595865
596051
  const rawApi = createBridgeApiClient({
595866
596052
  baseUrl,
595867
596053
  getAccessToken,
595868
- runnerVersion: "0.7.13",
596054
+ runnerVersion: "0.7.15",
595869
596055
  onDebug: logForDebugging,
595870
596056
  onAuth401,
595871
596057
  getTrustedDeviceToken
@@ -601502,7 +601688,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
601502
601688
  setCwd(cwd3);
601503
601689
  const server = new Server({
601504
601690
  name: "claude/tengu",
601505
- version: "0.7.13"
601691
+ version: "0.7.15"
601506
601692
  }, {
601507
601693
  capabilities: {
601508
601694
  tools: {}
@@ -602962,7 +603148,7 @@ async function setupTokenHandler(root2) {
602962
603148
  resolve42();
602963
603149
  },
602964
603150
  mode: "setup-token",
602965
- startingMessage: "This will guide you through long-lived (1-year) auth token setup for your Claude account. Claude subscription required."
603151
+ startingMessage: "This will guide you through long-lived (1-year) auth token setup for your AINative account. Active subscription required."
602966
603152
  }, undefined, false, undefined, this)
602967
603153
  ]
602968
603154
  }, undefined, true, undefined, this)
@@ -603113,7 +603299,7 @@ __export(exports_update, {
603113
603299
  });
603114
603300
  async function update() {
603115
603301
  logEvent("tengu_update_check", {});
603116
- writeToStdout(`Current version: ${"0.7.13"}
603302
+ writeToStdout(`Current version: ${"0.7.15"}
603117
603303
  `);
603118
603304
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
603119
603305
  writeToStdout(`Checking for updates to ${channel} version...
@@ -603188,8 +603374,8 @@ async function update() {
603188
603374
  writeToStdout(`Cody CLI is managed by Homebrew.
603189
603375
  `);
603190
603376
  const latest = await getLatestVersion(channel);
603191
- if (latest && !gte("0.7.13", latest)) {
603192
- writeToStdout(`Update available: ${"0.7.13"} → ${latest}
603377
+ if (latest && !gte("0.7.15", latest)) {
603378
+ writeToStdout(`Update available: ${"0.7.15"} → ${latest}
603193
603379
  `);
603194
603380
  writeToStdout(`
603195
603381
  `);
@@ -603205,8 +603391,8 @@ async function update() {
603205
603391
  writeToStdout(`Cody CLI is managed by winget.
603206
603392
  `);
603207
603393
  const latest = await getLatestVersion(channel);
603208
- if (latest && !gte("0.7.13", latest)) {
603209
- writeToStdout(`Update available: ${"0.7.13"} → ${latest}
603394
+ if (latest && !gte("0.7.15", latest)) {
603395
+ writeToStdout(`Update available: ${"0.7.15"} → ${latest}
603210
603396
  `);
603211
603397
  writeToStdout(`
603212
603398
  `);
@@ -603222,8 +603408,8 @@ async function update() {
603222
603408
  writeToStdout(`Cody CLI is managed by apk.
603223
603409
  `);
603224
603410
  const latest = await getLatestVersion(channel);
603225
- if (latest && !gte("0.7.13", latest)) {
603226
- writeToStdout(`Update available: ${"0.7.13"} → ${latest}
603411
+ if (latest && !gte("0.7.15", latest)) {
603412
+ writeToStdout(`Update available: ${"0.7.15"} → ${latest}
603227
603413
  `);
603228
603414
  writeToStdout(`
603229
603415
  `);
@@ -603288,11 +603474,11 @@ async function update() {
603288
603474
  `);
603289
603475
  await gracefulShutdown(1);
603290
603476
  }
603291
- if (result.latestVersion === "0.7.13") {
603292
- writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.13"})`) + `
603477
+ if (result.latestVersion === "0.7.15") {
603478
+ writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.15"})`) + `
603293
603479
  `);
603294
603480
  } else {
603295
- writeToStdout(source_default.green(`Successfully updated from ${"0.7.13"} to version ${result.latestVersion}`) + `
603481
+ writeToStdout(source_default.green(`Successfully updated from ${"0.7.15"} to version ${result.latestVersion}`) + `
603296
603482
  `);
603297
603483
  await regenerateCompletionCache();
603298
603484
  }
@@ -603352,12 +603538,12 @@ async function update() {
603352
603538
  `);
603353
603539
  await gracefulShutdown(1);
603354
603540
  }
603355
- if (latestVersion === "0.7.13") {
603356
- writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.13"})`) + `
603541
+ if (latestVersion === "0.7.15") {
603542
+ writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.15"})`) + `
603357
603543
  `);
603358
603544
  await gracefulShutdown(0);
603359
603545
  }
603360
- writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.13"})
603546
+ writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.15"})
603361
603547
  `);
603362
603548
  writeToStdout(`Installing update...
603363
603549
  `);
@@ -603402,7 +603588,7 @@ async function update() {
603402
603588
  logForDebugging(`update: Installation status: ${status2}`);
603403
603589
  switch (status2) {
603404
603590
  case "success":
603405
- writeToStdout(source_default.green(`Successfully updated from ${"0.7.13"} to version ${latestVersion}`) + `
603591
+ writeToStdout(source_default.green(`Successfully updated from ${"0.7.15"} to version ${latestVersion}`) + `
603406
603592
  `);
603407
603593
  await regenerateCompletionCache();
603408
603594
  break;
@@ -604163,7 +604349,7 @@ ${formattedErrors}
604163
604349
  }
604164
604350
  const chromeOpts = options;
604165
604351
  setChromeFlagOverride(chromeOpts.chrome);
604166
- const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && isClaudeAISubscriber();
604352
+ const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && isActiveSubscriber();
604167
604353
  const autoEnableClaudeInChrome = !enableClaudeInChrome && shouldAutoEnableClaudeInChrome();
604168
604354
  if (enableClaudeInChrome) {
604169
604355
  const platform7 = getPlatform();
@@ -604546,6 +604732,7 @@ ${customInstructions}` : customInstructions;
604546
604732
  logForDebugging(`Starting background startup prefetches${lastPrefetchedInfo}`);
604547
604733
  checkQuotaStatus().catch((error43) => logError2(error43));
604548
604734
  fetchBootstrapData();
604735
+ fetchAINativeSubscription();
604549
604736
  prefetchPassesEligibility();
604550
604737
  if (!getFeatureValue_CACHED_MAY_BE_STALE("tengu_miraculo_the_bard", false)) {
604551
604738
  prefetchFastModeStatus();
@@ -604646,7 +604833,7 @@ ${customInstructions}` : customInstructions;
604646
604833
  }
604647
604834
  }
604648
604835
  logForDiagnosticsNoPII("info", "started", {
604649
- version: "0.7.13",
604836
+ version: "0.7.15",
604650
604837
  is_native_binary: isInBundledMode()
604651
604838
  });
604652
604839
  registerCleanup(async () => {
@@ -605414,7 +605601,7 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
605414
605601
  } else {
605415
605602
  const pendingHookMessages = hooksPromise && hookMessages.length === 0 ? hooksPromise : undefined;
605416
605603
  profileCheckpoint("action_after_hooks");
605417
- console.log(getWelcomeMessage("0.7.13"));
605604
+ console.log(getWelcomeMessage("0.7.15"));
605418
605605
  maybeActivateProactive(options);
605419
605606
  maybeActivateBrief(options);
605420
605607
  if (false) {}
@@ -605431,10 +605618,10 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
605431
605618
  pendingHookMessages
605432
605619
  }, renderAndRun);
605433
605620
  }
605434
- }).version("0.7.13 (Cody CLI)", "-v, --version", "Output the version number");
605621
+ }).version("0.7.15 (Cody CLI)", "-v, --version", "Output the version number");
605435
605622
  program2.configureOutput({
605436
605623
  writeOut: (str2) => {
605437
- if (str2.includes("0.7.13")) {
605624
+ if (str2.includes("0.7.15")) {
605438
605625
  process.stdout.write(getCodyLogo() + `
605439
605626
  ` + str2);
605440
605627
  } else {
@@ -605630,7 +605817,7 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
605630
605817
  } = await Promise.resolve().then(() => (init_plugins(), exports_plugins));
605631
605818
  await pluginUpdateHandler2(plugin2, options);
605632
605819
  });
605633
- program2.command("setup-token").description("Set up a long-lived authentication token (requires Claude subscription)").action(async () => {
605820
+ program2.command("setup-token").description("Set up a long-lived authentication token (requires active subscription)").action(async () => {
605634
605821
  const [{
605635
605822
  setupTokenHandler: setupTokenHandler2
605636
605823
  }, {
@@ -605979,7 +606166,7 @@ async function main2() {
605979
606166
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
605980
606167
  const { getCodyLogo: getCodyLogo2 } = await Promise.resolve().then(() => (init_branding(), exports_branding));
605981
606168
  console.log(getCodyLogo2() + `
605982
- 0.7.13 (Cody CLI)`);
606169
+ 0.7.15 (Cody CLI)`);
605983
606170
  return;
605984
606171
  }
605985
606172
  const {