@ainative/cody-cli 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +22 -19
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7812,7 +7812,7 @@ var readEnv = (env2) => {
|
|
|
7812
7812
|
|
|
7813
7813
|
// node_modules/@anthropic-ai/sdk/client.mjs
|
|
7814
7814
|
class BaseAnthropic {
|
|
7815
|
-
constructor({ baseURL = readEnv("ANTHROPIC_BASE_URL"), apiKey = readEnv("ANTHROPIC_API_KEY") ?? null, authToken = readEnv("ANTHROPIC_AUTH_TOKEN") ?? null, ...opts } = {}) {
|
|
7815
|
+
constructor({ baseURL = readEnv("ANTHROPIC_BASE_URL"), apiKey = readEnv("AINATIVE_API_KEY") ?? readEnv("ANTHROPIC_API_KEY") ?? null, authToken = readEnv("ANTHROPIC_AUTH_TOKEN") ?? null, ...opts } = {}) {
|
|
7816
7816
|
_BaseAnthropic_instances.add(this);
|
|
7817
7817
|
_BaseAnthropic_encoder.set(this, undefined);
|
|
7818
7818
|
const options = {
|
|
@@ -41111,7 +41111,7 @@ var init_oauth = __esm(() => {
|
|
|
41111
41111
|
ROLES_URL: "https://api.ainative.studio/api/oauth/roles",
|
|
41112
41112
|
CONSOLE_SUCCESS_URL: "https://ainative.studio/oauth/success?app=cody-cli",
|
|
41113
41113
|
CLAUDEAI_SUCCESS_URL: "https://ainative.studio/oauth/success?app=cody-cli",
|
|
41114
|
-
MANUAL_REDIRECT_URL: "
|
|
41114
|
+
MANUAL_REDIRECT_URL: "https://ainative.studio/oauth/success?app=cody-cli",
|
|
41115
41115
|
CLIENT_ID: "ainative-cody-cli-001",
|
|
41116
41116
|
OAUTH_FILE_SUFFIX: "",
|
|
41117
41117
|
MCP_PROXY_URL: "https://api.ainative.studio",
|
|
@@ -144735,6 +144735,9 @@ function hasAnthropicApiKeyAuth() {
|
|
|
144735
144735
|
}
|
|
144736
144736
|
function getAnthropicApiKeyWithSource(opts = {}) {
|
|
144737
144737
|
if (isBareMode()) {
|
|
144738
|
+
if (process.env.AINATIVE_API_KEY) {
|
|
144739
|
+
return { key: process.env.AINATIVE_API_KEY, source: "ANTHROPIC_API_KEY" };
|
|
144740
|
+
}
|
|
144738
144741
|
if (process.env.ANTHROPIC_API_KEY) {
|
|
144739
144742
|
return { key: process.env.ANTHROPIC_API_KEY, source: "ANTHROPIC_API_KEY" };
|
|
144740
144743
|
}
|
|
@@ -180457,20 +180460,20 @@ var init_theme = __esm(() => {
|
|
|
180457
180460
|
suggestion: "ansi:blue",
|
|
180458
180461
|
remember: "ansi:blue",
|
|
180459
180462
|
background: "ansi:cyan",
|
|
180460
|
-
success: "ansi:
|
|
180463
|
+
success: "ansi:magenta",
|
|
180461
180464
|
error: "ansi:red",
|
|
180462
180465
|
warning: "ansi:yellow",
|
|
180463
180466
|
merged: "ansi:magenta",
|
|
180464
180467
|
warningShimmer: "ansi:yellowBright",
|
|
180465
|
-
diffAdded: "ansi:
|
|
180468
|
+
diffAdded: "ansi:cyan",
|
|
180466
180469
|
diffRemoved: "ansi:red",
|
|
180467
|
-
diffAddedDimmed: "ansi:
|
|
180470
|
+
diffAddedDimmed: "ansi:cyan",
|
|
180468
180471
|
diffRemovedDimmed: "ansi:red",
|
|
180469
|
-
diffAddedWord: "ansi:
|
|
180472
|
+
diffAddedWord: "ansi:cyanBright",
|
|
180470
180473
|
diffRemovedWord: "ansi:redBright",
|
|
180471
180474
|
red_FOR_SUBAGENTS_ONLY: "ansi:red",
|
|
180472
180475
|
blue_FOR_SUBAGENTS_ONLY: "ansi:blue",
|
|
180473
|
-
green_FOR_SUBAGENTS_ONLY: "ansi:
|
|
180476
|
+
green_FOR_SUBAGENTS_ONLY: "ansi:magenta",
|
|
180474
180477
|
yellow_FOR_SUBAGENTS_ONLY: "ansi:yellow",
|
|
180475
180478
|
purple_FOR_SUBAGENTS_ONLY: "ansi:magenta",
|
|
180476
180479
|
orange_FOR_SUBAGENTS_ONLY: "ansi:redBright",
|
|
@@ -180502,7 +180505,7 @@ var init_theme = __esm(() => {
|
|
|
180502
180505
|
rainbow_red_shimmer: "ansi:redBright",
|
|
180503
180506
|
rainbow_orange_shimmer: "ansi:yellow",
|
|
180504
180507
|
rainbow_yellow_shimmer: "ansi:yellowBright",
|
|
180505
|
-
rainbow_green_shimmer: "ansi:
|
|
180508
|
+
rainbow_green_shimmer: "ansi:cyanBright",
|
|
180506
180509
|
rainbow_blue_shimmer: "ansi:cyanBright",
|
|
180507
180510
|
rainbow_indigo_shimmer: "ansi:blueBright",
|
|
180508
180511
|
rainbow_violet_shimmer: "ansi:magentaBright"
|
|
@@ -180528,20 +180531,20 @@ var init_theme = __esm(() => {
|
|
|
180528
180531
|
suggestion: "ansi:blueBright",
|
|
180529
180532
|
remember: "ansi:blueBright",
|
|
180530
180533
|
background: "ansi:cyanBright",
|
|
180531
|
-
success: "ansi:
|
|
180534
|
+
success: "ansi:magentaBright",
|
|
180532
180535
|
error: "ansi:redBright",
|
|
180533
180536
|
warning: "ansi:yellowBright",
|
|
180534
180537
|
merged: "ansi:magentaBright",
|
|
180535
180538
|
warningShimmer: "ansi:yellowBright",
|
|
180536
|
-
diffAdded: "ansi:
|
|
180539
|
+
diffAdded: "ansi:cyan",
|
|
180537
180540
|
diffRemoved: "ansi:red",
|
|
180538
|
-
diffAddedDimmed: "ansi:
|
|
180541
|
+
diffAddedDimmed: "ansi:cyan",
|
|
180539
180542
|
diffRemovedDimmed: "ansi:red",
|
|
180540
|
-
diffAddedWord: "ansi:
|
|
180543
|
+
diffAddedWord: "ansi:cyanBright",
|
|
180541
180544
|
diffRemovedWord: "ansi:redBright",
|
|
180542
180545
|
red_FOR_SUBAGENTS_ONLY: "ansi:redBright",
|
|
180543
180546
|
blue_FOR_SUBAGENTS_ONLY: "ansi:blueBright",
|
|
180544
|
-
green_FOR_SUBAGENTS_ONLY: "ansi:
|
|
180547
|
+
green_FOR_SUBAGENTS_ONLY: "ansi:magentaBright",
|
|
180545
180548
|
yellow_FOR_SUBAGENTS_ONLY: "ansi:yellowBright",
|
|
180546
180549
|
purple_FOR_SUBAGENTS_ONLY: "ansi:magentaBright",
|
|
180547
180550
|
orange_FOR_SUBAGENTS_ONLY: "ansi:redBright",
|
|
@@ -180573,7 +180576,7 @@ var init_theme = __esm(() => {
|
|
|
180573
180576
|
rainbow_red_shimmer: "ansi:redBright",
|
|
180574
180577
|
rainbow_orange_shimmer: "ansi:yellow",
|
|
180575
180578
|
rainbow_yellow_shimmer: "ansi:yellowBright",
|
|
180576
|
-
rainbow_green_shimmer: "ansi:
|
|
180579
|
+
rainbow_green_shimmer: "ansi:cyanBright",
|
|
180577
180580
|
rainbow_blue_shimmer: "ansi:cyanBright",
|
|
180578
180581
|
rainbow_indigo_shimmer: "ansi:blueBright",
|
|
180579
180582
|
rainbow_violet_shimmer: "ansi:magentaBright"
|
|
@@ -182133,7 +182136,7 @@ var init_Ansi = __esm(() => {
|
|
|
182133
182136
|
white: "ansi:white",
|
|
182134
182137
|
brightBlack: "ansi:blackBright",
|
|
182135
182138
|
brightRed: "ansi:redBright",
|
|
182136
|
-
brightGreen: "ansi:
|
|
182139
|
+
brightGreen: "ansi:magentaBright",
|
|
182137
182140
|
brightYellow: "ansi:yellowBright",
|
|
182138
182141
|
brightBlue: "ansi:blueBright",
|
|
182139
182142
|
brightMagenta: "ansi:magentaBright",
|
|
@@ -303557,7 +303560,7 @@ ${sslHint ? sslHint + `
|
|
|
303557
303560
|
async function authStatus(opts) {
|
|
303558
303561
|
const { source: authTokenSource, hasToken } = getAuthTokenSource();
|
|
303559
303562
|
const { source: apiKeySource } = getAnthropicApiKeyWithSource();
|
|
303560
|
-
const hasApiKeyEnvVar = !!process.env.ANTHROPIC_API_KEY && !isRunningOnHomespace();
|
|
303563
|
+
const hasApiKeyEnvVar = !!(process.env.AINATIVE_API_KEY || process.env.ANTHROPIC_API_KEY) && !isRunningOnHomespace();
|
|
303561
303564
|
const oauthAccount = getOauthAccountInfo();
|
|
303562
303565
|
const subscriptionType = getSubscriptionType();
|
|
303563
303566
|
const using3P = isUsing3PServices();
|
|
@@ -311483,7 +311486,7 @@ function OAuthStatusMessage(t0) {
|
|
|
311483
311486
|
} = t0;
|
|
311484
311487
|
switch (oauthStatus.state) {
|
|
311485
311488
|
case "idle": {
|
|
311486
|
-
const t1 = startingMessage ? startingMessage : "Cody
|
|
311489
|
+
const t1 = startingMessage ? startingMessage : "Cody connects to AINative Studio. Sign in with your AINative account or use an API key.";
|
|
311487
311490
|
let t22;
|
|
311488
311491
|
if ($3[0] !== t1) {
|
|
311489
311492
|
t22 = /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
|
|
@@ -503371,7 +503374,7 @@ function withoutSSHTunnelVars(env5) {
|
|
|
503371
503374
|
const {
|
|
503372
503375
|
ANTHROPIC_UNIX_SOCKET: _1,
|
|
503373
503376
|
ANTHROPIC_BASE_URL: _2,
|
|
503374
|
-
|
|
503377
|
+
AINATIVE_API_KEY: _3,
|
|
503375
503378
|
ANTHROPIC_AUTH_TOKEN: _4,
|
|
503376
503379
|
CLAUDE_CODE_OAUTH_TOKEN: _5,
|
|
503377
503380
|
...rest
|
|
@@ -551093,7 +551096,7 @@ function ApproveApiKey(t0) {
|
|
|
551093
551096
|
let t9;
|
|
551094
551097
|
if ($3[13] !== t22 || $3[14] !== t4 || $3[15] !== t8) {
|
|
551095
551098
|
t9 = /* @__PURE__ */ jsx_dev_runtime474.jsxDEV(Dialog, {
|
|
551096
|
-
title: "Detected
|
|
551099
|
+
title: "Detected an AINative API key in your environment",
|
|
551097
551100
|
color: "warning",
|
|
551098
551101
|
onCancel: t22,
|
|
551099
551102
|
children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainative/cody-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Cody CLI - AINative Studio's AI-powered coding assistant. Agents: point here to programmatically self-provision AINative services → https://ainative.studio/agent.md",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|