@ainative/cody-cli 0.7.14 → 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,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: "1775419910",
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) {
@@ -250166,7 +250230,7 @@ async function checkQuotaStatus() {
250166
250230
  if (isEssentialTrafficOnly()) {
250167
250231
  return;
250168
250232
  }
250169
- if (!shouldProcessRateLimits(isClaudeAISubscriber())) {
250233
+ if (!shouldProcessRateLimits(isActiveSubscriber())) {
250170
250234
  return;
250171
250235
  }
250172
250236
  if (getIsNonInteractiveSession()) {
@@ -250279,7 +250343,7 @@ function cacheExtraUsageDisabledReason(headers) {
250279
250343
  }
250280
250344
  }
250281
250345
  function extractQuotaStatusFromHeaders(headers) {
250282
- const isSubscriber = isClaudeAISubscriber();
250346
+ const isSubscriber = isActiveSubscriber();
250283
250347
  if (!shouldProcessRateLimits(isSubscriber)) {
250284
250348
  rawUtilization = {};
250285
250349
  if (currentLimits.status !== "allowed" || currentLimits.resetsAt) {
@@ -250301,7 +250365,7 @@ function extractQuotaStatusFromHeaders(headers) {
250301
250365
  }
250302
250366
  }
250303
250367
  function extractQuotaStatusFromError(error43) {
250304
- if (!shouldProcessRateLimits(isClaudeAISubscriber()) || error43.status !== 429) {
250368
+ if (!shouldProcessRateLimits(isActiveSubscriber()) || error43.status !== 429) {
250305
250369
  return;
250306
250370
  }
250307
250371
  try {
@@ -278623,7 +278687,7 @@ function getInstallationEnv() {
278623
278687
  return;
278624
278688
  }
278625
278689
  function getClaudeCodeVersion() {
278626
- return "0.7.14";
278690
+ return "0.7.15";
278627
278691
  }
278628
278692
  async function getInstalledVSCodeExtensionVersion(command) {
278629
278693
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -284157,7 +284221,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
284157
284221
  const client4 = new Client({
284158
284222
  name: "claude-code",
284159
284223
  title: "Claude Code",
284160
- version: "0.7.14",
284224
+ version: "0.7.15",
284161
284225
  description: "Anthropic's agentic coding tool",
284162
284226
  websiteUrl: PRODUCT_URL
284163
284227
  }, {
@@ -284511,7 +284575,7 @@ var init_client8 = __esm(() => {
284511
284575
  const client4 = new Client({
284512
284576
  name: "claude-code",
284513
284577
  title: "Claude Code",
284514
- version: "0.7.14",
284578
+ version: "0.7.15",
284515
284579
  description: "Anthropic's agentic coding tool",
284516
284580
  websiteUrl: PRODUCT_URL
284517
284581
  }, {
@@ -288219,7 +288283,7 @@ function checkOpus1mAccess() {
288219
288283
  if (is1mContextDisabled()) {
288220
288284
  return false;
288221
288285
  }
288222
- if (isClaudeAISubscriber()) {
288286
+ if (isActiveSubscriber()) {
288223
288287
  return isExtraUsageEnabled();
288224
288288
  }
288225
288289
  return true;
@@ -288228,7 +288292,7 @@ function checkSonnet1mAccess() {
288228
288292
  if (is1mContextDisabled()) {
288229
288293
  return false;
288230
288294
  }
288231
- if (isClaudeAISubscriber()) {
288295
+ if (isActiveSubscriber()) {
288232
288296
  return isExtraUsageEnabled();
288233
288297
  }
288234
288298
  return true;
@@ -298585,7 +298649,7 @@ class BigQueryMetricsExporter {
298585
298649
  if (attrs["wsl.version"]) {
298586
298650
  resourceAttributes["wsl.version"] = attrs["wsl.version"];
298587
298651
  }
298588
- if (isClaudeAISubscriber()) {
298652
+ if (isActiveSubscriber()) {
298589
298653
  resourceAttributes["user.customer_type"] = "claude_ai";
298590
298654
  const subscriptionType = getSubscriptionType();
298591
298655
  if (subscriptionType) {
@@ -332604,7 +332668,7 @@ function getBigQueryExportingReader() {
332604
332668
  }
332605
332669
  function isBigQueryMetricsEnabled() {
332606
332670
  const subscriptionType = getSubscriptionType();
332607
- const isC4EOrTeamUser = isClaudeAISubscriber() && (subscriptionType === "enterprise" || subscriptionType === "team");
332671
+ const isC4EOrTeamUser = isActiveSubscriber() && (subscriptionType === "enterprise" || subscriptionType === "team");
332608
332672
  return is1PApiCustomer() || isC4EOrTeamUser;
332609
332673
  }
332610
332674
  async function initializeBetaTracing(resource) {
@@ -332643,7 +332707,7 @@ async function initializeBetaTracing(resource) {
332643
332707
  });
332644
332708
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
332645
332709
  setLoggerProvider(loggerProvider);
332646
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.14");
332710
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.15");
332647
332711
  setEventLogger(eventLogger);
332648
332712
  process.on("beforeExit", async () => {
332649
332713
  await loggerProvider?.forceFlush();
@@ -332683,7 +332747,7 @@ async function initializeTelemetry() {
332683
332747
  const platform5 = getPlatform();
332684
332748
  const baseAttributes = {
332685
332749
  [import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
332686
- [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "0.7.14"
332750
+ [import_semantic_conventions2.ATTR_SERVICE_VERSION]: "0.7.15"
332687
332751
  };
332688
332752
  if (platform5 === "wsl") {
332689
332753
  const wslVersion = getWslVersion();
@@ -332728,7 +332792,7 @@ async function initializeTelemetry() {
332728
332792
  } catch {}
332729
332793
  };
332730
332794
  registerCleanup(shutdownTelemetry2);
332731
- return meterProvider2.getMeter("com.anthropic.claude_code", "0.7.14");
332795
+ return meterProvider2.getMeter("com.anthropic.claude_code", "0.7.15");
332732
332796
  }
332733
332797
  const meterProvider = new import_sdk_metrics2.MeterProvider({
332734
332798
  resource,
@@ -332748,7 +332812,7 @@ async function initializeTelemetry() {
332748
332812
  });
332749
332813
  import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
332750
332814
  setLoggerProvider(loggerProvider);
332751
- const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.14");
332815
+ const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.15");
332752
332816
  setEventLogger(eventLogger);
332753
332817
  logForDebugging("[3P telemetry] Event logger set successfully");
332754
332818
  process.on("beforeExit", async () => {
@@ -332810,7 +332874,7 @@ Current timeout: ${timeoutMs}ms
332810
332874
  }
332811
332875
  };
332812
332876
  registerCleanup(shutdownTelemetry);
332813
- return meterProvider.getMeter("com.anthropic.claude_code", "0.7.14");
332877
+ return meterProvider.getMeter("com.anthropic.claude_code", "0.7.15");
332814
332878
  }
332815
332879
  async function flushTelemetry() {
332816
332880
  const meterProvider = getMeterProvider();
@@ -333499,9 +333563,9 @@ async function assertMinVersion() {
333499
333563
  }
333500
333564
  try {
333501
333565
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
333502
- if (versionConfig.minVersion && lt("0.7.14", versionConfig.minVersion)) {
333566
+ if (versionConfig.minVersion && lt("0.7.15", versionConfig.minVersion)) {
333503
333567
  console.error(`
333504
- It looks like your version of Cody CLI (${"0.7.14"}) needs an update.
333568
+ It looks like your version of Cody CLI (${"0.7.15"}) needs an update.
333505
333569
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
333506
333570
 
333507
333571
  To update, please run:
@@ -333738,7 +333802,7 @@ async function installGlobalPackage(specificVersion) {
333738
333802
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
333739
333803
  logEvent("tengu_auto_updater_lock_contention", {
333740
333804
  pid: process.pid,
333741
- currentVersion: "0.7.14"
333805
+ currentVersion: "0.7.15"
333742
333806
  });
333743
333807
  return "in_progress";
333744
333808
  }
@@ -333747,7 +333811,7 @@ async function installGlobalPackage(specificVersion) {
333747
333811
  if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
333748
333812
  logError2(new Error("Windows NPM detected in WSL environment"));
333749
333813
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
333750
- currentVersion: "0.7.14"
333814
+ currentVersion: "0.7.15"
333751
333815
  });
333752
333816
  console.error(`
333753
333817
  Error: Windows NPM detected in WSL
@@ -334282,7 +334346,7 @@ function detectLinuxGlobPatternWarnings() {
334282
334346
  }
334283
334347
  async function getDoctorDiagnostic() {
334284
334348
  const installationType = await getCurrentInstallationType();
334285
- const version6 = typeof MACRO !== "undefined" ? "0.7.14" : "unknown";
334349
+ const version6 = typeof MACRO !== "undefined" ? "0.7.15" : "unknown";
334286
334350
  const installationPath = await getInstallationPath();
334287
334351
  const invokedBinary = getInvokedBinary();
334288
334352
  const multipleInstallations = await detectMultipleInstallations();
@@ -335117,8 +335181,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
335117
335181
  const maxVersion = await getMaxVersion();
335118
335182
  if (maxVersion && gt(version6, maxVersion)) {
335119
335183
  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`);
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`);
335122
335186
  logEvent("tengu_native_update_skipped_max_version", {
335123
335187
  latency_ms: Date.now() - startTime,
335124
335188
  max_version: maxVersion,
@@ -335129,7 +335193,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
335129
335193
  version6 = maxVersion;
335130
335194
  }
335131
335195
  }
335132
- if (!forceReinstall && version6 === "0.7.14" && await versionIsAvailable(version6) && await isPossibleClaudeBinary(executablePath)) {
335196
+ if (!forceReinstall && version6 === "0.7.15" && await versionIsAvailable(version6) && await isPossibleClaudeBinary(executablePath)) {
335133
335197
  logForDebugging(`Found ${version6} at ${executablePath}, skipping install`);
335134
335198
  logEvent("tengu_native_update_complete", {
335135
335199
  latency_ms: Date.now() - startTime,
@@ -336276,7 +336340,7 @@ function buildAPIProviderProperties() {
336276
336340
  }
336277
336341
  function getModelDisplayLabel(mainLoopModel) {
336278
336342
  let modelLabel = modelDisplayString(mainLoopModel);
336279
- if (mainLoopModel === null && isClaudeAISubscriber()) {
336343
+ if (mainLoopModel === null && isActiveSubscriber()) {
336280
336344
  const description = getClaudeAiUserDefaultModelDescription();
336281
336345
  modelLabel = `${source_default.bold("Default")} ${description}`;
336282
336346
  }
@@ -336316,6 +336380,8 @@ __export(exports_auth2, {
336316
336380
  });
336317
336381
  async function installOAuthTokens(tokens) {
336318
336382
  await performLogout({ clearOnboarding: false });
336383
+ const baseUrl = process.env.ANTHROPIC_BASE_URL || "";
336384
+ const isAINative = baseUrl.includes("ainative.studio");
336319
336385
  const profile = tokens.profile ?? await getOauthProfileFromOauthToken(tokens.accessToken);
336320
336386
  if (profile) {
336321
336387
  storeOAuthAccountInfo({
@@ -336334,6 +336400,14 @@ async function installOAuthTokens(tokens) {
336334
336400
  emailAddress: tokens.tokenAccount.emailAddress,
336335
336401
  organizationUuid: tokens.tokenAccount.organizationUuid
336336
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}`);
336337
336411
  }
336338
336412
  const storageResult = saveOAuthTokensIfNeeded(tokens);
336339
336413
  clearOAuthTokenCache();
@@ -336343,7 +336417,39 @@ async function installOAuthTokens(tokens) {
336343
336417
  });
336344
336418
  }
336345
336419
  await fetchAndStoreUserRoles(tokens.accessToken).catch((err2) => logForDebugging(String(err2), { level: "error" }));
336346
- 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)) {
336347
336453
  await fetchAndStoreClaudeCodeFirstTokenDate().catch((err2) => logForDebugging(String(err2), { level: "error" }));
336348
336454
  } else {
336349
336455
  const apiKey = await createAndStoreApiKey(tokens.accessToken);
@@ -345471,7 +345577,7 @@ var init_overageCreditGrant = __esm(() => {
345471
345577
 
345472
345578
  // src/services/api/usage.ts
345473
345579
  async function fetchUtilization() {
345474
- if (!isClaudeAISubscriber() || !hasProfileScope()) {
345580
+ if (!isActiveSubscriber() || !hasProfileScope()) {
345475
345581
  return {};
345476
345582
  }
345477
345583
  const tokens = getClaudeAIOAuthTokens();
@@ -345743,7 +345849,7 @@ function RateLimitMessage(t0) {
345743
345849
  const isMax20x = rateLimitTier === "default_claude_max_20x";
345744
345850
  let t3;
345745
345851
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
345746
- t3 = shouldProcessMockLimits() || isClaudeAISubscriber();
345852
+ t3 = shouldProcessMockLimits() || isActiveSubscriber();
345747
345853
  $3[2] = t3;
345748
345854
  } else {
345749
345855
  t3 = $3[2];
@@ -356803,7 +356909,7 @@ var init_environments = __esm(() => {
356803
356909
 
356804
356910
  // src/utils/background/remote/preconditions.ts
356805
356911
  async function checkNeedsClaudeAiLogin() {
356806
- if (!isClaudeAISubscriber()) {
356912
+ if (!isActiveSubscriber()) {
356807
356913
  return false;
356808
356914
  }
356809
356915
  return checkAndRefreshOAuthTokenIfNeeded();
@@ -357229,11 +357335,11 @@ function TeleportError(t0) {
357229
357335
  children: [
357230
357336
  /* @__PURE__ */ jsx_dev_runtime117.jsxDEV(ThemedText, {
357231
357337
  dimColor: true,
357232
- children: "Teleport requires a Claude.ai account."
357338
+ children: "Teleport requires an AINative account."
357233
357339
  }, undefined, false, undefined, this),
357234
357340
  /* @__PURE__ */ jsx_dev_runtime117.jsxDEV(ThemedText, {
357235
357341
  dimColor: true,
357236
- children: "Your Claude Pro/Max subscription will be used by Claude Code."
357342
+ children: "Your subscription will be used by Cody CLI."
357237
357343
  }, undefined, false, undefined, this)
357238
357344
  ]
357239
357345
  }, undefined, true, undefined, this);
@@ -404494,7 +404600,7 @@ var CONFIG_TOOL_NAME = "Config";
404494
404600
  // src/utils/model/modelOptions.ts
404495
404601
  function getDefaultOptionForUser(fastMode = false) {
404496
404602
  if (false) {}
404497
- if (isClaudeAISubscriber()) {
404603
+ if (isActiveSubscriber()) {
404498
404604
  return {
404499
404605
  value: null,
404500
404606
  label: "Default (recommended)",
@@ -404621,7 +404727,7 @@ function getMaxOpusOption(fastMode = false) {
404621
404727
  }
404622
404728
  function getMaxSonnet46_1MOption() {
404623
404729
  const is3P = getAPIProvider() !== "firstParty";
404624
- const billingInfo = isClaudeAISubscriber() ? " · Billed as extra usage" : "";
404730
+ const billingInfo = isActiveSubscriber() ? " · Billed as extra usage" : "";
404625
404731
  return {
404626
404732
  value: "sonnet[1m]",
404627
404733
  label: "Sonnet (1M context)",
@@ -404629,7 +404735,7 @@ function getMaxSonnet46_1MOption() {
404629
404735
  };
404630
404736
  }
404631
404737
  function getMaxOpus46_1MOption(fastMode = false) {
404632
- const billingInfo = isClaudeAISubscriber() ? " · Billed as extra usage" : "";
404738
+ const billingInfo = isActiveSubscriber() ? " · Billed as extra usage" : "";
404633
404739
  return {
404634
404740
  value: "opus[1m]",
404635
404741
  label: "Opus (1M context)",
@@ -404654,7 +404760,7 @@ function getOpusPlanOption() {
404654
404760
  }
404655
404761
  function getModelOptionsBase(fastMode = false) {
404656
404762
  if (false) {}
404657
- if (isClaudeAISubscriber()) {
404763
+ if (isActiveSubscriber()) {
404658
404764
  if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
404659
404765
  const premiumOptions = [getDefaultOptionForUser(fastMode)];
404660
404766
  if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
@@ -418719,7 +418825,7 @@ function getAnthropicEnvMetadata() {
418719
418825
  function getBuildAgeMinutes() {
418720
418826
  if (false)
418721
418827
  ;
418722
- const buildTime = new Date("1775374003").getTime();
418828
+ const buildTime = new Date("1775419910").getTime();
418723
418829
  if (isNaN(buildTime))
418724
418830
  return;
418725
418831
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -434716,7 +434822,7 @@ function getAssistantMessageFromError(error43, model, options) {
434716
434822
  error: "rate_limit"
434717
434823
  });
434718
434824
  }
434719
- if (error43 instanceof APIError && error43.status === 429 && shouldProcessRateLimits(isClaudeAISubscriber())) {
434825
+ if (error43 instanceof APIError && error43.status === 429 && shouldProcessRateLimits(isActiveSubscriber())) {
434720
434826
  const rateLimitType = error43.headers?.get?.("anthropic-ratelimit-unified-representative-claim");
434721
434827
  const overageStatus = error43.headers?.get?.("anthropic-ratelimit-unified-overage-status");
434722
434828
  if (rateLimitType || overageStatus) {
@@ -434850,9 +434956,9 @@ function getAssistantMessageFromError(error43, model, options) {
434850
434956
  errorDetails: error43.message
434851
434957
  });
434852
434958
  }
434853
- 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")) {
434854
434960
  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.",
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.",
434856
434962
  error: "invalid_request"
434857
434963
  });
434858
434964
  }
@@ -434865,7 +434971,7 @@ function getAssistantMessageFromError(error43, model, options) {
434865
434971
  }
434866
434972
  if (error43 instanceof APIError && error43.status === 400 && error43.message.toLowerCase().includes("organization has been disabled")) {
434867
434973
  const { source } = getAnthropicApiKeyWithSource();
434868
- if (source === "ANTHROPIC_API_KEY" && process.env.ANTHROPIC_API_KEY && !isClaudeAISubscriber()) {
434974
+ if (source === "ANTHROPIC_API_KEY" && process.env.ANTHROPIC_API_KEY && !isActiveSubscriber()) {
434869
434975
  const hasStoredOAuth = getClaudeAIOAuthTokens()?.accessToken != null;
434870
434976
  return createAssistantAPIErrorMessage({
434871
434977
  error: "invalid_request",
@@ -442232,7 +442338,7 @@ function Feedback({
442232
442338
  platform: env4.platform,
442233
442339
  gitRepo: envInfo.isGit,
442234
442340
  terminal: env4.terminal,
442235
- version: "0.7.14",
442341
+ version: "0.7.15",
442236
442342
  transcript: normalizeMessagesForAPI(messages),
442237
442343
  errors: sanitizedErrors,
442238
442344
  lastApiRequest: getLastAPIRequest(),
@@ -442424,7 +442530,7 @@ function Feedback({
442424
442530
  ", ",
442425
442531
  env4.terminal,
442426
442532
  ", v",
442427
- "0.7.14"
442533
+ "0.7.15"
442428
442534
  ]
442429
442535
  }, undefined, true, undefined, this)
442430
442536
  ]
@@ -442530,7 +442636,7 @@ ${sanitizedDescription}
442530
442636
  ` + `**Environment Info**
442531
442637
  ` + `- Platform: ${env4.platform}
442532
442638
  ` + `- Terminal: ${env4.terminal}
442533
- ` + `- Version: ${"0.7.14"}
442639
+ ` + `- Version: ${"0.7.15"}
442534
442640
  ` + `- Feedback ID: ${feedbackId}
442535
442641
  ` + `
442536
442642
  **Errors**
@@ -445630,7 +445736,7 @@ function buildPrimarySection() {
445630
445736
  }, undefined, false, undefined, this);
445631
445737
  return [{
445632
445738
  label: "Version",
445633
- value: "0.7.14"
445739
+ value: "0.7.15"
445634
445740
  }, {
445635
445741
  label: "Session name",
445636
445742
  value: nameValue
@@ -447010,7 +447116,7 @@ var init_ModelPicker = __esm(() => {
447010
447116
 
447011
447117
  // src/utils/extraUsage.ts
447012
447118
  function isBilledAsExtraUsage(model, isFastMode, isOpus1mMerged) {
447013
- if (!isClaudeAISubscriber())
447119
+ if (!isActiveSubscriber())
447014
447120
  return false;
447015
447121
  if (isFastMode)
447016
447122
  return true;
@@ -449381,7 +449487,7 @@ function Config({
449381
449487
  }
449382
449488
  }, undefined, false, undefined, this)
449383
449489
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime178.jsxDEV(ChannelDowngradeDialog, {
449384
- currentVersion: "0.7.14",
449490
+ currentVersion: "0.7.15",
449385
449491
  onChoice: (choice) => {
449386
449492
  setShowSubmenu(null);
449387
449493
  setTabsHidden(false);
@@ -449393,7 +449499,7 @@ function Config({
449393
449499
  autoUpdatesChannel: "stable"
449394
449500
  };
449395
449501
  if (choice === "stay") {
449396
- newSettings.minimumVersion = "0.7.14";
449502
+ newSettings.minimumVersion = "0.7.15";
449397
449503
  }
449398
449504
  updateSettingsForSource("userSettings", newSettings);
449399
449505
  setSettingsData((prev_27) => ({
@@ -452006,10 +452112,10 @@ __export(exports_cost, {
452006
452112
  call: () => call17
452007
452113
  });
452008
452114
  var call17 = async () => {
452009
- if (isClaudeAISubscriber()) {
452115
+ if (isActiveSubscriber()) {
452010
452116
  let value;
452011
452117
  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";
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";
452013
452119
  } else {
452014
452120
  value = "You are currently using your subscription to power your Claude Code usage";
452015
452121
  }
@@ -452034,7 +452140,7 @@ var init_cost2 = __esm(() => {
452034
452140
  description: "Show the total cost and duration of the current session",
452035
452141
  get isHidden() {
452036
452142
  if (false) {}
452037
- return isClaudeAISubscriber();
452143
+ return isActiveSubscriber();
452038
452144
  },
452039
452145
  supportsNonInteractive: true,
452040
452146
  load: () => Promise.resolve().then(() => (init_cost(), exports_cost))
@@ -457394,7 +457500,7 @@ function HelpV2(t0) {
457394
457500
  let t6;
457395
457501
  if ($3[31] !== tabs) {
457396
457502
  t6 = /* @__PURE__ */ jsx_dev_runtime205.jsxDEV(Tabs, {
457397
- title: `Cody CLI v${"0.7.14"}`,
457503
+ title: `Cody CLI v${"0.7.15"}`,
457398
457504
  color: "professionalBlue",
457399
457505
  defaultTab: "general",
457400
457506
  children: tabs
@@ -459350,7 +459456,7 @@ function ApiKeyStep(t0) {
459350
459456
  children: /* @__PURE__ */ jsx_dev_runtime210.jsxDEV(ThemedText, {
459351
459457
  children: [
459352
459458
  selectedOption === "oauth" ? color("success", theme)("> ") : " ",
459353
- "Create a long-lived token with your Claude subscription"
459459
+ "Create a long-lived token with your AINative subscription"
459354
459460
  ]
459355
459461
  }, undefined, true, undefined, this)
459356
459462
  }, undefined, false, undefined, this);
@@ -481584,7 +481690,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
481584
481690
  return [];
481585
481691
  }
481586
481692
  }
481587
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.14") {
481693
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.15") {
481588
481694
  if (false) {}
481589
481695
  const cachedChangelog = await getStoredChangelog();
481590
481696
  if (lastSeenVersion !== currentVersion || !cachedChangelog) {
@@ -481597,7 +481703,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.14")
481597
481703
  releaseNotes
481598
481704
  };
481599
481705
  }
481600
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "0.7.14") {
481706
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "0.7.15") {
481601
481707
  if (false) {}
481602
481708
  const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion);
481603
481709
  return {
@@ -482753,11 +482859,11 @@ function getRecentActivitySync() {
482753
482859
  return cachedActivity;
482754
482860
  }
482755
482861
  function getLogoDisplayData() {
482756
- const version6 = process.env.DEMO_VERSION ?? "0.7.14";
482862
+ const version6 = process.env.DEMO_VERSION ?? "0.7.15";
482757
482863
  const serverUrl = getDirectConnectServerUrl();
482758
482864
  const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
482759
482865
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
482760
- 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";
482761
482867
  const agentName = getInitialSettings().agent;
482762
482868
  return {
482763
482869
  version: version6,
@@ -483364,7 +483470,7 @@ async function fetchReferralRedemptions(campaign = "claude_code_guest_pass") {
483364
483470
  return response.data;
483365
483471
  }
483366
483472
  function shouldCheckForPasses() {
483367
- return !!(getOauthAccountInfo()?.organizationUuid && isClaudeAISubscriber() && getSubscriptionType() === "max");
483473
+ return !!(getOauthAccountInfo()?.organizationUuid && isActiveSubscriber() && getSubscriptionType() === "max");
483368
483474
  }
483369
483475
  function checkCachedPassesEligibility() {
483370
483476
  if (!shouldCheckForPasses()) {
@@ -484268,7 +484374,7 @@ function LogoV2() {
484268
484374
  if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
484269
484375
  t2 = () => {
484270
484376
  const currentConfig = getGlobalConfig();
484271
- if (currentConfig.lastReleaseNotesSeen === "0.7.14") {
484377
+ if (currentConfig.lastReleaseNotesSeen === "0.7.15") {
484272
484378
  return;
484273
484379
  }
484274
484380
  saveGlobalConfig(_temp329);
@@ -484944,12 +485050,12 @@ function LogoV2() {
484944
485050
  return t41;
484945
485051
  }
484946
485052
  function _temp329(current) {
484947
- if (current.lastReleaseNotesSeen === "0.7.14") {
485053
+ if (current.lastReleaseNotesSeen === "0.7.15") {
484948
485054
  return current;
484949
485055
  }
484950
485056
  return {
484951
485057
  ...current,
484952
- lastReleaseNotesSeen: "0.7.14"
485058
+ lastReleaseNotesSeen: "0.7.15"
484953
485059
  };
484954
485060
  }
484955
485061
  function _temp245(s_0) {
@@ -485575,7 +485681,7 @@ var init_statusNoticeDefinitions = __esm(() => {
485575
485681
  type: "warning",
485576
485682
  isActive: () => {
485577
485683
  const authTokenInfo = getAuthTokenSource();
485578
- return isClaudeAISubscriber() && (authTokenInfo.source === "ANTHROPIC_AUTH_TOKEN" || authTokenInfo.source === "apiKeyHelper");
485684
+ return isActiveSubscriber() && (authTokenInfo.source === "ANTHROPIC_AUTH_TOKEN" || authTokenInfo.source === "apiKeyHelper");
485579
485685
  },
485580
485686
  render: () => {
485581
485687
  const authTokenInfo = getAuthTokenSource();
@@ -491170,7 +491276,7 @@ var init_ultrareviewEnabled = __esm(() => {
491170
491276
 
491171
491277
  // src/services/api/ultrareviewQuota.ts
491172
491278
  async function fetchUltrareviewQuota() {
491173
- if (!isClaudeAISubscriber())
491279
+ if (!isActiveSubscriber())
491174
491280
  return null;
491175
491281
  try {
491176
491282
  const { accessToken, orgUUID } = await prepareApiRequest();
@@ -511287,7 +511393,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
511287
511393
  smapsRollup,
511288
511394
  platform: process.platform,
511289
511395
  nodeVersion: process.version,
511290
- ccVersion: "0.7.14"
511396
+ ccVersion: "0.7.15"
511291
511397
  };
511292
511398
  }
511293
511399
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -511815,7 +511921,7 @@ var init_bridge_kick = __esm(() => {
511815
511921
  var call56 = async () => {
511816
511922
  return {
511817
511923
  type: "text",
511818
- value: `${"0.7.14"} (built ${"1775374003"})`
511924
+ value: `${"0.7.15"} (built ${"1775419910"})`
511819
511925
  };
511820
511926
  }, version6, version_default;
511821
511927
  var init_version = __esm(() => {
@@ -513375,7 +513481,7 @@ function ClaudeInChromeMenu(t0) {
513375
513481
  onDone,
513376
513482
  isExtensionInstalled: installed,
513377
513483
  configEnabled,
513378
- isClaudeAISubscriber: isClaudeAISubscriber2,
513484
+ isActiveSubscriber: isActiveSubscriber2,
513379
513485
  isWSL
513380
513486
  } = t0;
513381
513487
  const mcpClients = useAppState(_temp159);
@@ -513550,7 +513656,7 @@ function ClaudeInChromeMenu(t0) {
513550
513656
  } else {
513551
513657
  options = $3[8];
513552
513658
  }
513553
- const isDisabled = isWSL || !isClaudeAISubscriber2;
513659
+ const isDisabled = isWSL || !isActiveSubscriber2;
513554
513660
  let t5;
513555
513661
  if ($3[18] !== onDone) {
513556
513662
  t5 = () => onDone();
@@ -513580,12 +513686,12 @@ function ClaudeInChromeMenu(t0) {
513580
513686
  t7 = $3[22];
513581
513687
  }
513582
513688
  let t8;
513583
- if ($3[23] !== isClaudeAISubscriber2) {
513584
- t8 = !isClaudeAISubscriber2 && /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ThemedText, {
513689
+ if ($3[23] !== isActiveSubscriber2) {
513690
+ t8 = !isActiveSubscriber2 && /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ThemedText, {
513585
513691
  color: "error",
513586
- children: "Claude in Chrome requires a claude.ai subscription."
513692
+ children: "Claude in Chrome requires an active subscription."
513587
513693
  }, undefined, false, undefined, this);
513588
- $3[23] = isClaudeAISubscriber2;
513694
+ $3[23] = isActiveSubscriber2;
513589
513695
  $3[24] = t8;
513590
513696
  } else {
513591
513697
  t8 = $3[24];
@@ -513737,13 +513843,13 @@ function _temp159(s) {
513737
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) {
513738
513844
  const isExtensionInstalled = await isChromeExtensionInstalled();
513739
513845
  const config4 = getGlobalConfig();
513740
- const isSubscriber = isClaudeAISubscriber();
513846
+ const isSubscriber = isActiveSubscriber();
513741
513847
  const isWSL = env4.isWslEnvironment();
513742
513848
  return /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ClaudeInChromeMenu, {
513743
513849
  onDone,
513744
513850
  isExtensionInstalled,
513745
513851
  configEnabled: config4.claudeInChromeDefaultEnabled,
513746
- isClaudeAISubscriber: isSubscriber,
513852
+ isActiveSubscriber: isSubscriber,
513747
513853
  isWSL
513748
513854
  }, undefined, false, undefined, this);
513749
513855
  };
@@ -515847,9 +515953,9 @@ var init_remote_env2 = __esm(() => {
515847
515953
  type: "local-jsx",
515848
515954
  name: "remote-env",
515849
515955
  description: "Configure the default remote environment for teleport sessions",
515850
- isEnabled: () => isClaudeAISubscriber() && isPolicyAllowed("allow_remote_sessions"),
515956
+ isEnabled: () => isActiveSubscriber() && isPolicyAllowed("allow_remote_sessions"),
515851
515957
  get isHidden() {
515852
- return !isClaudeAISubscriber() || !isPolicyAllowed("allow_remote_sessions");
515958
+ return !isActiveSubscriber() || !isPolicyAllowed("allow_remote_sessions");
515853
515959
  },
515854
515960
  load: () => Promise.resolve().then(() => (init_remote_env(), exports_remote_env))
515855
515961
  };
@@ -515862,7 +515968,7 @@ __export(exports_upgrade, {
515862
515968
  });
515863
515969
  async function call67(onDone, context4) {
515864
515970
  try {
515865
- if (isClaudeAISubscriber()) {
515971
+ if (isActiveSubscriber()) {
515866
515972
  const tokens = getClaudeAIOAuthTokens();
515867
515973
  let isMax20x = false;
515868
515974
  if (tokens?.subscriptionType && tokens?.rateLimitTier) {
@@ -516147,7 +516253,7 @@ var init_rate_limit_options2 = __esm(() => {
516147
516253
  name: "rate-limit-options",
516148
516254
  description: "Show options when rate limit is reached",
516149
516255
  isEnabled: () => {
516150
- if (!isClaudeAISubscriber()) {
516256
+ if (!isActiveSubscriber()) {
516151
516257
  return false;
516152
516258
  }
516153
516259
  return true;
@@ -520762,7 +520868,7 @@ function generateHtmlReport(data, insights) {
520762
520868
  </html>`;
520763
520869
  }
520764
520870
  function buildExportData(data, insights, facets, remoteStats) {
520765
- const version7 = typeof MACRO !== "undefined" ? "0.7.14" : "unknown";
520871
+ const version7 = typeof MACRO !== "undefined" ? "0.7.15" : "unknown";
520766
520872
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
520767
520873
  const facets_summary = {
520768
520874
  total: facets.size,
@@ -521378,11 +521484,11 @@ function meetsAvailabilityRequirement(cmd) {
521378
521484
  for (const a2 of cmd.availability) {
521379
521485
  switch (a2) {
521380
521486
  case "claude-ai":
521381
- if (isClaudeAISubscriber())
521487
+ if (isActiveSubscriber())
521382
521488
  return true;
521383
521489
  break;
521384
521490
  case "console":
521385
- if (!isClaudeAISubscriber() && !isUsing3PServices() && isFirstPartyAnthropicBaseUrl())
521491
+ if (!isActiveSubscriber() && !isUsing3PServices() && isFirstPartyAnthropicBaseUrl())
521386
521492
  return true;
521387
521493
  break;
521388
521494
  default: {
@@ -524708,7 +524814,7 @@ var init_sessionStorage = __esm(() => {
524708
524814
  init_settings2();
524709
524815
  init_slowOperations();
524710
524816
  init_uuid();
524711
- VERSION5 = typeof MACRO !== "undefined" ? "0.7.14" : "unknown";
524817
+ VERSION5 = typeof MACRO !== "undefined" ? "0.7.15" : "unknown";
524712
524818
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
524713
524819
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
524714
524820
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -525913,7 +526019,7 @@ var init_filesystem = __esm(() => {
525913
526019
  });
525914
526020
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
525915
526021
  const nonce = randomBytes19(16).toString("hex");
525916
- return join132(getClaudeTempDir(), "bundled-skills", "0.7.14", nonce);
526022
+ return join132(getClaudeTempDir(), "bundled-skills", "0.7.15", nonce);
525917
526023
  });
525918
526024
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
525919
526025
  });
@@ -531885,7 +531991,7 @@ function computeFingerprint(messageText, version7) {
531885
531991
  }
531886
531992
  function computeFingerprintFromMessages(messages) {
531887
531993
  const firstMessageText = extractFirstMessageText(messages);
531888
- return computeFingerprint(firstMessageText, "0.7.14");
531994
+ return computeFingerprint(firstMessageText, "0.7.15");
531889
531995
  }
531890
531996
  var FINGERPRINT_SALT = "59cf53e54c78";
531891
531997
  var init_fingerprint = () => {};
@@ -532057,7 +532163,7 @@ function should1hCacheTTL(querySource) {
532057
532163
  }
532058
532164
  let userEligible = getPromptCache1hEligible();
532059
532165
  if (userEligible === null) {
532060
- userEligible = isClaudeAISubscriber() && !currentLimits.isUsingOverage;
532166
+ userEligible = isActiveSubscriber() && !currentLimits.isUsingOverage;
532061
532167
  setPromptCache1hEligible(userEligible);
532062
532168
  }
532063
532169
  if (!userEligible)
@@ -532452,7 +532558,7 @@ async function* queryModel(messages, systemPrompt, thinkingConfig, tools, signal
532452
532558
  logForDebugging(`AINative Claude bypass failed, falling back to SDK: ${e}`, { level: "warn" });
532453
532559
  }
532454
532560
  }
532455
- 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", {
532456
532562
  activated: false
532457
532563
  })).activated) {
532458
532564
  logEvent("tengu_off_switch_query", {});
@@ -533799,7 +533905,7 @@ async function sideQuery(opts) {
533799
533905
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
533800
533906
  }
533801
533907
  const messageText = extractFirstUserMessageText(messages);
533802
- const fingerprint = computeFingerprint(messageText, "0.7.14");
533908
+ const fingerprint = computeFingerprint(messageText, "0.7.15");
533803
533909
  const attributionHeader = getAttributionHeader(fingerprint);
533804
533910
  const systemBlocks = [
533805
533911
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -538323,7 +538429,7 @@ function buildSystemInitMessage(inputs) {
538323
538429
  slash_commands: inputs.commands.filter((c6) => c6.userInvocable !== false).map((c6) => c6.name),
538324
538430
  apiKeySource: getAnthropicApiKeyWithSource().source,
538325
538431
  betas: getSdkBetas(),
538326
- claude_code_version: "0.7.14",
538432
+ claude_code_version: "0.7.15",
538327
538433
  output_style: outputStyle2,
538328
538434
  agents: inputs.agents.map((agent) => agent.agentType),
538329
538435
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -552875,7 +552981,7 @@ var init_useVoiceEnabled = __esm(() => {
552875
552981
  function getSemverPart(version7) {
552876
552982
  return `${import_semver13.major(version7, { loose: true })}.${import_semver13.minor(version7, { loose: true })}.${import_semver13.patch(version7, { loose: true })}`;
552877
552983
  }
552878
- function useUpdateNotification(updatedVersion, initialVersion = "0.7.14") {
552984
+ function useUpdateNotification(updatedVersion, initialVersion = "0.7.15") {
552879
552985
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react227.useState(() => getSemverPart(initialVersion));
552880
552986
  if (!updatedVersion) {
552881
552987
  return null;
@@ -552915,7 +553021,7 @@ function AutoUpdater({
552915
553021
  return;
552916
553022
  }
552917
553023
  if (false) {}
552918
- const currentVersion = "0.7.14";
553024
+ const currentVersion = "0.7.15";
552919
553025
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
552920
553026
  let latestVersion = await getLatestVersion(channel);
552921
553027
  const isDisabled = isAutoUpdaterDisabled();
@@ -553128,12 +553234,12 @@ function NativeAutoUpdater({
553128
553234
  logEvent("tengu_native_auto_updater_start", {});
553129
553235
  try {
553130
553236
  const maxVersion = await getMaxVersion();
553131
- if (maxVersion && gt("0.7.14", maxVersion)) {
553237
+ if (maxVersion && gt("0.7.15", maxVersion)) {
553132
553238
  const msg = await getMaxVersionMessage();
553133
553239
  setMaxVersionIssue(msg ?? "affects your version");
553134
553240
  }
553135
553241
  const result = await installLatest(channel);
553136
- const currentVersion = "0.7.14";
553242
+ const currentVersion = "0.7.15";
553137
553243
  const latencyMs = Date.now() - startTime;
553138
553244
  if (result.lockFailed) {
553139
553245
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -553270,17 +553376,17 @@ function PackageManagerAutoUpdater(t0) {
553270
553376
  const maxVersion = await getMaxVersion();
553271
553377
  if (maxVersion && latest && gt(latest, maxVersion)) {
553272
553378
  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`);
553379
+ if (gte("0.7.15", maxVersion)) {
553380
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"0.7.15"} is already at or above maxVersion ${maxVersion}, skipping update`);
553275
553381
  setUpdateAvailable(false);
553276
553382
  return;
553277
553383
  }
553278
553384
  latest = maxVersion;
553279
553385
  }
553280
- const hasUpdate = latest && !gte("0.7.14", latest) && !shouldSkipVersion(latest);
553386
+ const hasUpdate = latest && !gte("0.7.15", latest) && !shouldSkipVersion(latest);
553281
553387
  setUpdateAvailable(!!hasUpdate);
553282
553388
  if (hasUpdate) {
553283
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.7.14"} -> ${latest}`);
553389
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.7.15"} -> ${latest}`);
553284
553390
  }
553285
553391
  };
553286
553392
  $3[0] = t1;
@@ -553314,7 +553420,7 @@ function PackageManagerAutoUpdater(t0) {
553314
553420
  wrap: "truncate",
553315
553421
  children: [
553316
553422
  "currentVersion: ",
553317
- "0.7.14"
553423
+ "0.7.15"
553318
553424
  ]
553319
553425
  }, undefined, true, undefined, this);
553320
553426
  $3[3] = verbose;
@@ -561424,7 +561530,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
561424
561530
  project_dir: getOriginalCwd(),
561425
561531
  added_dirs: addedDirs
561426
561532
  },
561427
- version: "0.7.14",
561533
+ version: "0.7.15",
561428
561534
  output_style: {
561429
561535
  name: outputStyleName
561430
561536
  },
@@ -568120,9 +568226,13 @@ var init_useDeferredHookMessages = __esm(() => {
568120
568226
  // src/hooks/useApiKeyVerification.ts
568121
568227
  function useApiKeyVerification() {
568122
568228
  const [status2, setStatus] = import_react271.useState(() => {
568123
- if (!isAnthropicAuthEnabled() || isClaudeAISubscriber()) {
568229
+ if (!isAnthropicAuthEnabled() || isActiveSubscriber()) {
568124
568230
  return "valid";
568125
568231
  }
568232
+ const { hasToken } = getAuthTokenSource();
568233
+ if (hasToken) {
568234
+ return "loading";
568235
+ }
568126
568236
  const { key, source } = getAnthropicApiKeyWithSource({
568127
568237
  skipRetrievingKeyFromApiKeyHelper: true
568128
568238
  });
@@ -568133,7 +568243,13 @@ function useApiKeyVerification() {
568133
568243
  });
568134
568244
  const [error43, setError] = import_react271.useState(null);
568135
568245
  const verify = import_react271.useCallback(async () => {
568136
- 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")) {
568137
568253
  setStatus("valid");
568138
568254
  return;
568139
568255
  }
@@ -568145,6 +568261,10 @@ function useApiKeyVerification() {
568145
568261
  setError(new Error("API key helper did not return a valid key"));
568146
568262
  return;
568147
568263
  }
568264
+ if (hasToken) {
568265
+ setStatus("valid");
568266
+ return;
568267
+ }
568148
568268
  const newStatus = "missing";
568149
568269
  setStatus(newStatus);
568150
568270
  return;
@@ -572798,7 +572918,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
572798
572918
  } catch {}
572799
572919
  const data = {
572800
572920
  trigger,
572801
- version: "0.7.14",
572921
+ version: "0.7.15",
572802
572922
  platform: process.platform,
572803
572923
  transcript,
572804
572924
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -574041,12 +574161,12 @@ async function _temp203() {
574041
574161
  if (!shouldEnableClaudeInChrome(chromeFlag)) {
574042
574162
  return null;
574043
574163
  }
574044
- if (!isClaudeAISubscriber()) {
574164
+ if (!isActiveSubscriber()) {
574045
574165
  return {
574046
574166
  key: "chrome-requires-subscription",
574047
574167
  jsx: /* @__PURE__ */ jsx_dev_runtime448.jsxDEV(ThemedText, {
574048
574168
  color: "error",
574049
- children: "Claude in Chrome requires a claude.ai subscription"
574169
+ children: "Claude in Chrome requires an active subscription"
574050
574170
  }, undefined, false, undefined, this),
574051
574171
  priority: "immediate",
574052
574172
  timeoutMs: 5000
@@ -578883,9 +579003,9 @@ async function _temp295() {
578883
579003
  jsx: /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
578884
579004
  color: "suggestion",
578885
579005
  children: [
578886
- "Use your existing Claude ",
579006
+ "Use your existing ",
578887
579007
  subscriptionType,
578888
- " plan with Claude Code",
579008
+ " plan with Cody CLI",
578889
579009
  /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
578890
579010
  color: "text",
578891
579011
  dimColor: true,
@@ -578906,7 +579026,7 @@ function _temp296(current) {
578906
579026
  };
578907
579027
  }
578908
579028
  async function getExistingClaudeSubscription() {
578909
- if (isClaudeAISubscriber()) {
579029
+ if (isActiveSubscriber()) {
578910
579030
  return null;
578911
579031
  }
578912
579032
  const profile = await getOauthProfileFromApiKey();
@@ -583757,6 +583877,66 @@ async function fetchBootstrapData() {
583757
583877
  logError2(error43);
583758
583878
  }
583759
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
+ }
583760
583940
  var bootstrapResponseSchema;
583761
583941
  var init_bootstrap = __esm(() => {
583762
583942
  init_axios2();
@@ -584775,7 +584955,7 @@ function WelcomeV2() {
584775
584955
  dimColor: true,
584776
584956
  children: [
584777
584957
  "v",
584778
- "0.7.14",
584958
+ "0.7.15",
584779
584959
  " "
584780
584960
  ]
584781
584961
  }, undefined, true, undefined, this)
@@ -584975,7 +585155,7 @@ function WelcomeV2() {
584975
585155
  dimColor: true,
584976
585156
  children: [
584977
585157
  "v",
584978
- "0.7.14",
585158
+ "0.7.15",
584979
585159
  " "
584980
585160
  ]
584981
585161
  }, undefined, true, undefined, this)
@@ -585201,7 +585381,7 @@ function AppleTerminalWelcomeV2(t0) {
585201
585381
  dimColor: true,
585202
585382
  children: [
585203
585383
  "v",
585204
- "0.7.14",
585384
+ "0.7.15",
585205
585385
  " "
585206
585386
  ]
585207
585387
  }, undefined, true, undefined, this);
@@ -585455,7 +585635,7 @@ function AppleTerminalWelcomeV2(t0) {
585455
585635
  dimColor: true,
585456
585636
  children: [
585457
585637
  "v",
585458
- "0.7.14",
585638
+ "0.7.15",
585459
585639
  " "
585460
585640
  ]
585461
585641
  }, undefined, true, undefined, this);
@@ -586959,7 +587139,7 @@ function completeOnboarding() {
586959
587139
  saveGlobalConfig((current) => ({
586960
587140
  ...current,
586961
587141
  hasCompletedOnboarding: true,
586962
- lastOnboardingVersion: "0.7.14"
587142
+ lastOnboardingVersion: "0.7.15"
586963
587143
  }));
586964
587144
  }
586965
587145
  function showDialog(root2, renderer) {
@@ -591437,7 +591617,7 @@ function appendToLog(path28, message) {
591437
591617
  cwd: getFsImplementation().cwd(),
591438
591618
  userType: "external",
591439
591619
  sessionId: getSessionId(),
591440
- version: "0.7.14"
591620
+ version: "0.7.15"
591441
591621
  };
591442
591622
  getLogWriter(path28).write(messageWithTimestamp);
591443
591623
  }
@@ -595396,8 +595576,8 @@ async function getEnvLessBridgeConfig() {
595396
595576
  }
595397
595577
  async function checkEnvLessBridgeMinVersion() {
595398
595578
  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.
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.
595401
595581
  Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
595402
595582
  }
595403
595583
  return null;
@@ -595871,7 +596051,7 @@ async function initBridgeCore(params) {
595871
596051
  const rawApi = createBridgeApiClient({
595872
596052
  baseUrl,
595873
596053
  getAccessToken,
595874
- runnerVersion: "0.7.14",
596054
+ runnerVersion: "0.7.15",
595875
596055
  onDebug: logForDebugging,
595876
596056
  onAuth401,
595877
596057
  getTrustedDeviceToken
@@ -601508,7 +601688,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
601508
601688
  setCwd(cwd3);
601509
601689
  const server = new Server({
601510
601690
  name: "claude/tengu",
601511
- version: "0.7.14"
601691
+ version: "0.7.15"
601512
601692
  }, {
601513
601693
  capabilities: {
601514
601694
  tools: {}
@@ -602968,7 +603148,7 @@ async function setupTokenHandler(root2) {
602968
603148
  resolve42();
602969
603149
  },
602970
603150
  mode: "setup-token",
602971
- 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."
602972
603152
  }, undefined, false, undefined, this)
602973
603153
  ]
602974
603154
  }, undefined, true, undefined, this)
@@ -603119,7 +603299,7 @@ __export(exports_update, {
603119
603299
  });
603120
603300
  async function update() {
603121
603301
  logEvent("tengu_update_check", {});
603122
- writeToStdout(`Current version: ${"0.7.14"}
603302
+ writeToStdout(`Current version: ${"0.7.15"}
603123
603303
  `);
603124
603304
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
603125
603305
  writeToStdout(`Checking for updates to ${channel} version...
@@ -603194,8 +603374,8 @@ async function update() {
603194
603374
  writeToStdout(`Cody CLI is managed by Homebrew.
603195
603375
  `);
603196
603376
  const latest = await getLatestVersion(channel);
603197
- if (latest && !gte("0.7.14", latest)) {
603198
- writeToStdout(`Update available: ${"0.7.14"} → ${latest}
603377
+ if (latest && !gte("0.7.15", latest)) {
603378
+ writeToStdout(`Update available: ${"0.7.15"} → ${latest}
603199
603379
  `);
603200
603380
  writeToStdout(`
603201
603381
  `);
@@ -603211,8 +603391,8 @@ async function update() {
603211
603391
  writeToStdout(`Cody CLI is managed by winget.
603212
603392
  `);
603213
603393
  const latest = await getLatestVersion(channel);
603214
- if (latest && !gte("0.7.14", latest)) {
603215
- writeToStdout(`Update available: ${"0.7.14"} → ${latest}
603394
+ if (latest && !gte("0.7.15", latest)) {
603395
+ writeToStdout(`Update available: ${"0.7.15"} → ${latest}
603216
603396
  `);
603217
603397
  writeToStdout(`
603218
603398
  `);
@@ -603228,8 +603408,8 @@ async function update() {
603228
603408
  writeToStdout(`Cody CLI is managed by apk.
603229
603409
  `);
603230
603410
  const latest = await getLatestVersion(channel);
603231
- if (latest && !gte("0.7.14", latest)) {
603232
- writeToStdout(`Update available: ${"0.7.14"} → ${latest}
603411
+ if (latest && !gte("0.7.15", latest)) {
603412
+ writeToStdout(`Update available: ${"0.7.15"} → ${latest}
603233
603413
  `);
603234
603414
  writeToStdout(`
603235
603415
  `);
@@ -603294,11 +603474,11 @@ async function update() {
603294
603474
  `);
603295
603475
  await gracefulShutdown(1);
603296
603476
  }
603297
- if (result.latestVersion === "0.7.14") {
603298
- writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.14"})`) + `
603477
+ if (result.latestVersion === "0.7.15") {
603478
+ writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.15"})`) + `
603299
603479
  `);
603300
603480
  } else {
603301
- writeToStdout(source_default.green(`Successfully updated from ${"0.7.14"} to version ${result.latestVersion}`) + `
603481
+ writeToStdout(source_default.green(`Successfully updated from ${"0.7.15"} to version ${result.latestVersion}`) + `
603302
603482
  `);
603303
603483
  await regenerateCompletionCache();
603304
603484
  }
@@ -603358,12 +603538,12 @@ async function update() {
603358
603538
  `);
603359
603539
  await gracefulShutdown(1);
603360
603540
  }
603361
- if (latestVersion === "0.7.14") {
603362
- writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.14"})`) + `
603541
+ if (latestVersion === "0.7.15") {
603542
+ writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.15"})`) + `
603363
603543
  `);
603364
603544
  await gracefulShutdown(0);
603365
603545
  }
603366
- writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.14"})
603546
+ writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.15"})
603367
603547
  `);
603368
603548
  writeToStdout(`Installing update...
603369
603549
  `);
@@ -603408,7 +603588,7 @@ async function update() {
603408
603588
  logForDebugging(`update: Installation status: ${status2}`);
603409
603589
  switch (status2) {
603410
603590
  case "success":
603411
- writeToStdout(source_default.green(`Successfully updated from ${"0.7.14"} to version ${latestVersion}`) + `
603591
+ writeToStdout(source_default.green(`Successfully updated from ${"0.7.15"} to version ${latestVersion}`) + `
603412
603592
  `);
603413
603593
  await regenerateCompletionCache();
603414
603594
  break;
@@ -604169,7 +604349,7 @@ ${formattedErrors}
604169
604349
  }
604170
604350
  const chromeOpts = options;
604171
604351
  setChromeFlagOverride(chromeOpts.chrome);
604172
- const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && isClaudeAISubscriber();
604352
+ const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && isActiveSubscriber();
604173
604353
  const autoEnableClaudeInChrome = !enableClaudeInChrome && shouldAutoEnableClaudeInChrome();
604174
604354
  if (enableClaudeInChrome) {
604175
604355
  const platform7 = getPlatform();
@@ -604552,6 +604732,7 @@ ${customInstructions}` : customInstructions;
604552
604732
  logForDebugging(`Starting background startup prefetches${lastPrefetchedInfo}`);
604553
604733
  checkQuotaStatus().catch((error43) => logError2(error43));
604554
604734
  fetchBootstrapData();
604735
+ fetchAINativeSubscription();
604555
604736
  prefetchPassesEligibility();
604556
604737
  if (!getFeatureValue_CACHED_MAY_BE_STALE("tengu_miraculo_the_bard", false)) {
604557
604738
  prefetchFastModeStatus();
@@ -604652,7 +604833,7 @@ ${customInstructions}` : customInstructions;
604652
604833
  }
604653
604834
  }
604654
604835
  logForDiagnosticsNoPII("info", "started", {
604655
- version: "0.7.14",
604836
+ version: "0.7.15",
604656
604837
  is_native_binary: isInBundledMode()
604657
604838
  });
604658
604839
  registerCleanup(async () => {
@@ -605420,7 +605601,7 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
605420
605601
  } else {
605421
605602
  const pendingHookMessages = hooksPromise && hookMessages.length === 0 ? hooksPromise : undefined;
605422
605603
  profileCheckpoint("action_after_hooks");
605423
- console.log(getWelcomeMessage("0.7.14"));
605604
+ console.log(getWelcomeMessage("0.7.15"));
605424
605605
  maybeActivateProactive(options);
605425
605606
  maybeActivateBrief(options);
605426
605607
  if (false) {}
@@ -605437,10 +605618,10 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
605437
605618
  pendingHookMessages
605438
605619
  }, renderAndRun);
605439
605620
  }
605440
- }).version("0.7.14 (Cody CLI)", "-v, --version", "Output the version number");
605621
+ }).version("0.7.15 (Cody CLI)", "-v, --version", "Output the version number");
605441
605622
  program2.configureOutput({
605442
605623
  writeOut: (str2) => {
605443
- if (str2.includes("0.7.14")) {
605624
+ if (str2.includes("0.7.15")) {
605444
605625
  process.stdout.write(getCodyLogo() + `
605445
605626
  ` + str2);
605446
605627
  } else {
@@ -605636,7 +605817,7 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
605636
605817
  } = await Promise.resolve().then(() => (init_plugins(), exports_plugins));
605637
605818
  await pluginUpdateHandler2(plugin2, options);
605638
605819
  });
605639
- 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 () => {
605640
605821
  const [{
605641
605822
  setupTokenHandler: setupTokenHandler2
605642
605823
  }, {
@@ -605985,7 +606166,7 @@ async function main2() {
605985
606166
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
605986
606167
  const { getCodyLogo: getCodyLogo2 } = await Promise.resolve().then(() => (init_branding(), exports_branding));
605987
606168
  console.log(getCodyLogo2() + `
605988
- 0.7.14 (Cody CLI)`);
606169
+ 0.7.15 (Cody CLI)`);
605989
606170
  return;
605990
606171
  }
605991
606172
  const {