@ainative/cody-cli 0.7.34 → 0.7.36
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 +333 -327
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -55467,7 +55467,7 @@ var init_PermissionMode = __esm(() => {
|
|
|
55467
55467
|
});
|
|
55468
55468
|
|
|
55469
55469
|
// src/entrypoints/sdk/coreSchemas.ts
|
|
55470
|
-
var ModelUsageSchema, OutputFormatTypeSchema, BaseOutputFormatSchema, JsonSchemaOutputFormatSchema, OutputFormatSchema, ApiKeySourceSchema, ConfigScopeSchema, SdkBetaSchema, ThinkingAdaptiveSchema, ThinkingEnabledSchema, ThinkingDisabledSchema, ThinkingConfigSchema, McpStdioServerConfigSchema, McpSSEServerConfigSchema, McpHttpServerConfigSchema, McpSdkServerConfigSchema, McpServerConfigForProcessTransportSchema,
|
|
55470
|
+
var ModelUsageSchema, OutputFormatTypeSchema, BaseOutputFormatSchema, JsonSchemaOutputFormatSchema, OutputFormatSchema, ApiKeySourceSchema, ConfigScopeSchema, SdkBetaSchema, ThinkingAdaptiveSchema, ThinkingEnabledSchema, ThinkingDisabledSchema, ThinkingConfigSchema, McpStdioServerConfigSchema, McpSSEServerConfigSchema, McpHttpServerConfigSchema, McpSdkServerConfigSchema, McpServerConfigForProcessTransportSchema, McpAINativeProxyServerConfigSchema, McpServerStatusConfigSchema, McpServerStatusSchema, McpSetServersResultSchema, PermissionUpdateDestinationSchema, PermissionBehaviorSchema, PermissionRuleValueSchema, PermissionUpdateSchema, PermissionDecisionClassificationSchema, PermissionResultSchema, PermissionModeSchema, HOOK_EVENTS, HookEventSchema, BaseHookInputSchema, PreToolUseHookInputSchema, PermissionRequestHookInputSchema, PostToolUseHookInputSchema, PostToolUseFailureHookInputSchema, PermissionDeniedHookInputSchema, NotificationHookInputSchema, UserPromptSubmitHookInputSchema, SessionStartHookInputSchema, SetupHookInputSchema, StopHookInputSchema, StopFailureHookInputSchema, SubagentStartHookInputSchema, SubagentStopHookInputSchema, PreCompactHookInputSchema, PostCompactHookInputSchema, TeammateIdleHookInputSchema, TaskCreatedHookInputSchema, TaskCompletedHookInputSchema, ElicitationHookInputSchema, ElicitationResultHookInputSchema, CONFIG_CHANGE_SOURCES, ConfigChangeHookInputSchema, INSTRUCTIONS_LOAD_REASONS, INSTRUCTIONS_MEMORY_TYPES, InstructionsLoadedHookInputSchema, WorktreeCreateHookInputSchema, WorktreeRemoveHookInputSchema, CwdChangedHookInputSchema, FileChangedHookInputSchema, EXIT_REASONS, ExitReasonSchema, SessionEndHookInputSchema, HookInputSchema, AsyncHookJSONOutputSchema, PreToolUseHookSpecificOutputSchema, UserPromptSubmitHookSpecificOutputSchema, SessionStartHookSpecificOutputSchema, SetupHookSpecificOutputSchema, SubagentStartHookSpecificOutputSchema, PostToolUseHookSpecificOutputSchema, PostToolUseFailureHookSpecificOutputSchema, PermissionDeniedHookSpecificOutputSchema, NotificationHookSpecificOutputSchema, PermissionRequestHookSpecificOutputSchema, CwdChangedHookSpecificOutputSchema, FileChangedHookSpecificOutputSchema, SyncHookJSONOutputSchema, ElicitationHookSpecificOutputSchema, ElicitationResultHookSpecificOutputSchema, WorktreeCreateHookSpecificOutputSchema, HookJSONOutputSchema, PromptRequestOptionSchema, PromptRequestSchema, PromptResponseSchema, SlashCommandSchema, AgentInfoSchema, ModelInfoSchema, AccountInfoSchema, AgentMcpServerSpecSchema, AgentDefinitionSchema, SettingSourceSchema, SdkPluginConfigSchema, RewindFilesResultSchema, APIUserMessagePlaceholder, APIAssistantMessagePlaceholder, RawMessageStreamEventPlaceholder, UUIDPlaceholder, NonNullableUsagePlaceholder, SDKAssistantMessageErrorSchema, SDKStatusSchema, SDKUserMessageContentSchema, SDKUserMessageSchema, SDKUserMessageReplaySchema, SDKRateLimitInfoSchema, SDKAssistantMessageSchema, SDKRateLimitEventSchema, SDKStreamlinedTextMessageSchema, SDKStreamlinedToolUseSummaryMessageSchema, SDKPermissionDenialSchema, SDKResultSuccessSchema, SDKResultErrorSchema, SDKResultMessageSchema, SDKSystemMessageSchema, SDKPartialAssistantMessageSchema, SDKCompactBoundaryMessageSchema, SDKStatusMessageSchema, SDKPostTurnSummaryMessageSchema, SDKAPIRetryMessageSchema, SDKLocalCommandOutputMessageSchema, SDKHookStartedMessageSchema, SDKHookProgressMessageSchema, SDKHookResponseMessageSchema, SDKToolProgressMessageSchema, SDKAuthStatusMessageSchema, SDKFilesPersistedEventSchema, SDKTaskNotificationMessageSchema, SDKTaskStartedMessageSchema, SDKSessionStateChangedMessageSchema, SDKTaskProgressMessageSchema, SDKToolUseSummaryMessageSchema, SDKElicitationCompleteMessageSchema, SDKPromptSuggestionMessageSchema, SDKSessionInfoSchema, SDKMessageSchema, FastModeStateSchema;
|
|
55471
55471
|
var init_coreSchemas = __esm(() => {
|
|
55472
55472
|
init_v4();
|
|
55473
55473
|
ModelUsageSchema = lazySchema(() => exports_external.object({
|
|
@@ -55533,14 +55533,14 @@ var init_coreSchemas = __esm(() => {
|
|
|
55533
55533
|
McpHttpServerConfigSchema(),
|
|
55534
55534
|
McpSdkServerConfigSchema()
|
|
55535
55535
|
]));
|
|
55536
|
-
|
|
55537
|
-
type: exports_external.literal("
|
|
55536
|
+
McpAINativeProxyServerConfigSchema = lazySchema(() => exports_external.object({
|
|
55537
|
+
type: exports_external.literal("ainative-proxy"),
|
|
55538
55538
|
url: exports_external.string(),
|
|
55539
55539
|
id: exports_external.string()
|
|
55540
55540
|
}));
|
|
55541
55541
|
McpServerStatusConfigSchema = lazySchema(() => exports_external.union([
|
|
55542
55542
|
McpServerConfigForProcessTransportSchema(),
|
|
55543
|
-
|
|
55543
|
+
McpAINativeProxyServerConfigSchema()
|
|
55544
55544
|
]));
|
|
55545
55545
|
McpServerStatusSchema = lazySchema(() => exports_external.object({
|
|
55546
55546
|
name: exports_external.string().describe("Server name as configured"),
|
|
@@ -56585,7 +56585,7 @@ var init_hooks = __esm(() => {
|
|
|
56585
56585
|
});
|
|
56586
56586
|
|
|
56587
56587
|
// src/services/mcp/types.ts
|
|
56588
|
-
var ConfigScopeSchema2, TransportSchema, McpStdioServerConfigSchema2, McpXaaConfigSchema, McpOAuthConfigSchema, McpSSEServerConfigSchema2, McpSSEIDEServerConfigSchema, McpWebSocketIDEServerConfigSchema, McpHTTPServerConfigSchema, McpWebSocketServerConfigSchema, McpSdkServerConfigSchema2,
|
|
56588
|
+
var ConfigScopeSchema2, TransportSchema, McpStdioServerConfigSchema2, McpXaaConfigSchema, McpOAuthConfigSchema, McpSSEServerConfigSchema2, McpSSEIDEServerConfigSchema, McpWebSocketIDEServerConfigSchema, McpHTTPServerConfigSchema, McpWebSocketServerConfigSchema, McpSdkServerConfigSchema2, McpAINativeProxyServerConfigSchema2, McpServerConfigSchema, McpJsonConfigSchema;
|
|
56589
56589
|
var init_types2 = __esm(() => {
|
|
56590
56590
|
init_v4();
|
|
56591
56591
|
ConfigScopeSchema2 = lazySchema(() => exports_external.enum([
|
|
@@ -56594,6 +56594,7 @@ var init_types2 = __esm(() => {
|
|
|
56594
56594
|
"project",
|
|
56595
56595
|
"dynamic",
|
|
56596
56596
|
"enterprise",
|
|
56597
|
+
"ainative",
|
|
56597
56598
|
"claudeai",
|
|
56598
56599
|
"managed"
|
|
56599
56600
|
]));
|
|
@@ -56650,8 +56651,8 @@ var init_types2 = __esm(() => {
|
|
|
56650
56651
|
type: exports_external.literal("sdk"),
|
|
56651
56652
|
name: exports_external.string()
|
|
56652
56653
|
}));
|
|
56653
|
-
|
|
56654
|
-
type: exports_external.literal("
|
|
56654
|
+
McpAINativeProxyServerConfigSchema2 = lazySchema(() => exports_external.object({
|
|
56655
|
+
type: exports_external.literal("ainative-proxy"),
|
|
56655
56656
|
url: exports_external.string(),
|
|
56656
56657
|
id: exports_external.string()
|
|
56657
56658
|
}));
|
|
@@ -56663,7 +56664,7 @@ var init_types2 = __esm(() => {
|
|
|
56663
56664
|
McpHTTPServerConfigSchema(),
|
|
56664
56665
|
McpWebSocketServerConfigSchema(),
|
|
56665
56666
|
McpSdkServerConfigSchema2(),
|
|
56666
|
-
|
|
56667
|
+
McpAINativeProxyServerConfigSchema2()
|
|
56667
56668
|
]));
|
|
56668
56669
|
McpJsonConfigSchema = lazySchema(() => exports_external.object({
|
|
56669
56670
|
mcpServers: exports_external.record(exports_external.string(), McpServerConfigSchema())
|
|
@@ -173129,7 +173130,7 @@ var init_auth2 = __esm(() => {
|
|
|
173129
173130
|
|
|
173130
173131
|
// src/utils/userAgent.ts
|
|
173131
173132
|
function getCodyUserAgent() {
|
|
173132
|
-
return `cody-cli/${"0.7.
|
|
173133
|
+
return `cody-cli/${"0.7.36"}`;
|
|
173133
173134
|
}
|
|
173134
173135
|
|
|
173135
173136
|
// src/utils/workloadContext.ts
|
|
@@ -173151,7 +173152,7 @@ function getUserAgent() {
|
|
|
173151
173152
|
const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
|
|
173152
173153
|
const workload = getWorkload();
|
|
173153
173154
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
173154
|
-
return `claude-cli/${"0.7.
|
|
173155
|
+
return `claude-cli/${"0.7.36"} (${"external"}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
173155
173156
|
}
|
|
173156
173157
|
function getMCPUserAgent() {
|
|
173157
173158
|
const parts = [];
|
|
@@ -173165,7 +173166,7 @@ function getMCPUserAgent() {
|
|
|
173165
173166
|
parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
|
|
173166
173167
|
}
|
|
173167
173168
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
173168
|
-
return `cody-cli/${"0.7.
|
|
173169
|
+
return `cody-cli/${"0.7.36"}${suffix}`;
|
|
173169
173170
|
}
|
|
173170
173171
|
function getWebFetchUserAgent() {
|
|
173171
173172
|
return `Cody-User (${getCodyUserAgent()}; +https://ainative.studio)`;
|
|
@@ -173303,7 +173304,7 @@ var init_user = __esm(() => {
|
|
|
173303
173304
|
deviceId,
|
|
173304
173305
|
sessionId: getSessionId(),
|
|
173305
173306
|
email: getEmail(),
|
|
173306
|
-
appVersion: "0.7.
|
|
173307
|
+
appVersion: "0.7.36",
|
|
173307
173308
|
platform: getHostPlatformForAnalytics(),
|
|
173308
173309
|
organizationUuid,
|
|
173309
173310
|
accountUuid,
|
|
@@ -180577,7 +180578,7 @@ function isAnalyticsToolDetailsLoggingEnabled(mcpServerType, mcpServerBaseUrl) {
|
|
|
180577
180578
|
if (process.env.CLAUDE_CODE_ENTRYPOINT === "local-agent") {
|
|
180578
180579
|
return true;
|
|
180579
180580
|
}
|
|
180580
|
-
if (mcpServerType === "
|
|
180581
|
+
if (mcpServerType === "ainative-proxy") {
|
|
180581
180582
|
return true;
|
|
180582
180583
|
}
|
|
180583
180584
|
if (mcpServerBaseUrl && isOfficialMcpUrl(mcpServerBaseUrl)) {
|
|
@@ -180995,7 +180996,7 @@ var init_metadata = __esm(() => {
|
|
|
180995
180996
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
180996
180997
|
WHITESPACE_REGEX = /\s+/;
|
|
180997
180998
|
getVersionBase = memoize_default(() => {
|
|
180998
|
-
const match = "0.7.
|
|
180999
|
+
const match = "0.7.36".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
180999
181000
|
return match ? match[0] : undefined;
|
|
181000
181001
|
});
|
|
181001
181002
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -181035,9 +181036,9 @@ var init_metadata = __esm(() => {
|
|
|
181035
181036
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
181036
181037
|
isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
|
|
181037
181038
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
181038
|
-
version: "0.7.
|
|
181039
|
+
version: "0.7.36",
|
|
181039
181040
|
versionBase: getVersionBase(),
|
|
181040
|
-
buildTime: "
|
|
181041
|
+
buildTime: "1777670728",
|
|
181041
181042
|
deploymentEnvironment: env4.detectDeploymentEnvironment(),
|
|
181042
181043
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
181043
181044
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -181655,7 +181656,7 @@ function initialize1PEventLogging() {
|
|
|
181655
181656
|
const platform3 = getPlatform();
|
|
181656
181657
|
const attributes = {
|
|
181657
181658
|
[import_semantic_conventions.ATTR_SERVICE_NAME]: "cody-cli",
|
|
181658
|
-
[import_semantic_conventions.ATTR_SERVICE_VERSION]: "0.7.
|
|
181659
|
+
[import_semantic_conventions.ATTR_SERVICE_VERSION]: "0.7.36"
|
|
181659
181660
|
};
|
|
181660
181661
|
if (platform3 === "wsl") {
|
|
181661
181662
|
const wslVersion = getWslVersion();
|
|
@@ -181682,7 +181683,7 @@ function initialize1PEventLogging() {
|
|
|
181682
181683
|
})
|
|
181683
181684
|
]
|
|
181684
181685
|
});
|
|
181685
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.ainative.cody_cli.events", "0.7.
|
|
181686
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.ainative.cody_cli.events", "0.7.36");
|
|
181686
181687
|
}
|
|
181687
181688
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
181688
181689
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -183375,7 +183376,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
183375
183376
|
if (!isAttributionHeaderEnabled()) {
|
|
183376
183377
|
return "";
|
|
183377
183378
|
}
|
|
183378
|
-
const version6 = `${"0.7.
|
|
183379
|
+
const version6 = `${"0.7.36"}.${fingerprint}`;
|
|
183379
183380
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
183380
183381
|
const cch = "";
|
|
183381
183382
|
const workload = getWorkload();
|
|
@@ -219324,6 +219325,25 @@ function ripgrepCommand() {
|
|
|
219324
219325
|
argv0: config2.argv0
|
|
219325
219326
|
};
|
|
219326
219327
|
}
|
|
219328
|
+
function getRipgrepMissingWarning() {
|
|
219329
|
+
const config2 = getRipgrepConfig();
|
|
219330
|
+
if (config2.mode === "embedded")
|
|
219331
|
+
return null;
|
|
219332
|
+
if (config2.mode === "system")
|
|
219333
|
+
return null;
|
|
219334
|
+
const { existsSync: existsSync3 } = __require("fs");
|
|
219335
|
+
if (existsSync3(config2.command))
|
|
219336
|
+
return null;
|
|
219337
|
+
let installHint;
|
|
219338
|
+
if (process.platform === "darwin") {
|
|
219339
|
+
installHint = "brew install ripgrep";
|
|
219340
|
+
} else if (process.platform === "linux") {
|
|
219341
|
+
installHint = "apt install ripgrep | dnf install ripgrep";
|
|
219342
|
+
} else {
|
|
219343
|
+
installHint = "https://github.com/BurntSushi/ripgrep#installation";
|
|
219344
|
+
}
|
|
219345
|
+
return `ripgrep (rg) not found — Glob/Grep tools will not work. Install: ${installHint}`;
|
|
219346
|
+
}
|
|
219327
219347
|
function isEagainError(stderr) {
|
|
219328
219348
|
return stderr.includes("os error 11") || stderr.includes("Resource temporarily unavailable");
|
|
219329
219349
|
}
|
|
@@ -233941,10 +233961,14 @@ var init_planAgent = __esm(() => {
|
|
|
233941
233961
|
// src/tools/AgentTool/built-in/statuslineSetup.ts
|
|
233942
233962
|
var STATUSLINE_SYSTEM_PROMPT = `You are a status line setup agent for Cody CLI. Your job is to create or update the statusLine command in the user's Cody CLI settings.
|
|
233943
233963
|
|
|
233964
|
+
Cody CLI stores all configuration in ~/.cody/ (not ~/.claude/).
|
|
233965
|
+
- User settings file: ~/.cody/settings.json
|
|
233966
|
+
- Status line script: ~/.cody/statusline-command.sh
|
|
233967
|
+
|
|
233944
233968
|
When asked to convert the user's shell PS1 configuration, follow these steps:
|
|
233945
233969
|
1. Read the user's shell configuration files in this order of preference:
|
|
233946
233970
|
- ~/.zshrc
|
|
233947
|
-
- ~/.bashrc
|
|
233971
|
+
- ~/.bashrc
|
|
233948
233972
|
- ~/.bash_profile
|
|
233949
233973
|
- ~/.profile
|
|
233950
233974
|
|
|
@@ -233952,7 +233976,7 @@ When asked to convert the user's shell PS1 configuration, follow these steps:
|
|
|
233952
233976
|
|
|
233953
233977
|
3. Convert PS1 escape sequences to shell commands:
|
|
233954
233978
|
- \\u → $(whoami)
|
|
233955
|
-
- \\h → $(hostname -s)
|
|
233979
|
+
- \\h → $(hostname -s)
|
|
233956
233980
|
- \\H → $(hostname)
|
|
233957
233981
|
- \\w → $(pwd)
|
|
233958
233982
|
- \\W → $(basename "$(pwd)")
|
|
@@ -233978,15 +234002,15 @@ How to use the statusLine command:
|
|
|
233978
234002
|
"transcript_path": "string", // Path to the conversation transcript
|
|
233979
234003
|
"cwd": "string", // Current working directory
|
|
233980
234004
|
"model": {
|
|
233981
|
-
"id": "string", // Model ID (e.g., "
|
|
233982
|
-
"display_name": "string" // Display name (e.g., "
|
|
234005
|
+
"id": "string", // Model ID (e.g., "qwen-coder-32b")
|
|
234006
|
+
"display_name": "string" // Display name (e.g., "Qwen Coder 32B")
|
|
233983
234007
|
},
|
|
233984
234008
|
"workspace": {
|
|
233985
234009
|
"current_dir": "string", // Current working directory path
|
|
233986
234010
|
"project_dir": "string", // Project root directory path
|
|
233987
234011
|
"added_dirs": ["string"] // Directories added via /add-dir
|
|
233988
234012
|
},
|
|
233989
|
-
"version": "string", // Cody CLI app version (e.g., "
|
|
234013
|
+
"version": "string", // Cody CLI app version (e.g., "0.7.34")
|
|
233990
234014
|
"output_style": {
|
|
233991
234015
|
"name": "string", // Output style name (e.g., "default", "Explanatory", "Learning")
|
|
233992
234016
|
},
|
|
@@ -234003,7 +234027,7 @@ How to use the statusLine command:
|
|
|
234003
234027
|
"used_percentage": number | null, // Pre-calculated: % of context used (0-100), null if no messages yet
|
|
234004
234028
|
"remaining_percentage": number | null // Pre-calculated: % of context remaining (0-100), null if no messages yet
|
|
234005
234029
|
},
|
|
234006
|
-
"rate_limits": { // Optional:
|
|
234030
|
+
"rate_limits": { // Optional: AINative subscription usage limits. Only present for subscribers after first API response.
|
|
234007
234031
|
"five_hour": { // Optional: 5-hour session limit (may be absent)
|
|
234008
234032
|
"used_percentage": number, // Percentage of limit used (0-100)
|
|
234009
234033
|
"resets_at": number // Unix epoch seconds when this window resets
|
|
@@ -234016,7 +234040,7 @@ How to use the statusLine command:
|
|
|
234016
234040
|
"vim": { // Optional, only present when vim mode is enabled
|
|
234017
234041
|
"mode": "INSERT" | "NORMAL" // Current vim editor mode
|
|
234018
234042
|
},
|
|
234019
|
-
"agent": { // Optional, only present when
|
|
234043
|
+
"agent": { // Optional, only present when Cody is started with --agent flag
|
|
234020
234044
|
"name": "string", // Agent name (e.g., "code-architect", "test-runner")
|
|
234021
234045
|
"type": "string" // Optional: Agent type identifier
|
|
234022
234046
|
},
|
|
@@ -234024,11 +234048,11 @@ How to use the statusLine command:
|
|
|
234024
234048
|
"name": "string", // Worktree name/slug (e.g., "my-feature")
|
|
234025
234049
|
"path": "string", // Full path to the worktree directory
|
|
234026
234050
|
"branch": "string", // Optional: Git branch name for the worktree
|
|
234027
|
-
"original_cwd": "string", // The directory
|
|
234051
|
+
"original_cwd": "string", // The directory Cody was in before entering the worktree
|
|
234028
234052
|
"original_branch": "string" // Optional: Branch that was checked out before entering the worktree
|
|
234029
234053
|
}
|
|
234030
234054
|
}
|
|
234031
|
-
|
|
234055
|
+
|
|
234032
234056
|
You can use this JSON data in your command like:
|
|
234033
234057
|
- $(cat | jq -r '.model.display_name')
|
|
234034
234058
|
- $(cat | jq -r '.workspace.current_dir')
|
|
@@ -234043,29 +234067,28 @@ How to use the statusLine command:
|
|
|
234043
234067
|
Or to display context used percentage:
|
|
234044
234068
|
- input=$(cat); used=$(echo "$input" | jq -r '.context_window.used_percentage // empty'); [ -n "$used" ] && echo "Context: $used% used"
|
|
234045
234069
|
|
|
234046
|
-
To display subscription rate limit usage (5-hour session limit):
|
|
234070
|
+
To display AINative subscription rate limit usage (5-hour session limit):
|
|
234047
234071
|
- input=$(cat); pct=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // empty'); [ -n "$pct" ] && printf "5h: %.0f%%" "$pct"
|
|
234048
234072
|
|
|
234049
234073
|
To display both 5-hour and 7-day limits when available:
|
|
234050
234074
|
- input=$(cat); five=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // empty'); week=$(echo "$input" | jq -r '.rate_limits.seven_day.used_percentage // empty'); out=""; [ -n "$five" ] && out="5h:$(printf '%.0f' "$five")%"; [ -n "$week" ] && out="$out 7d:$(printf '%.0f' "$week")%"; echo "$out"
|
|
234051
234075
|
|
|
234052
|
-
2. For longer commands,
|
|
234053
|
-
- ~/.cody/statusline-command.sh and reference that file in the settings.
|
|
234076
|
+
2. For longer commands, save the script to ~/.cody/statusline-command.sh and reference it in settings.
|
|
234054
234077
|
|
|
234055
234078
|
3. Update the user's ~/.cody/settings.json with:
|
|
234056
234079
|
{
|
|
234057
234080
|
"statusLine": {
|
|
234058
|
-
"type": "command",
|
|
234059
|
-
"command": "
|
|
234081
|
+
"type": "command",
|
|
234082
|
+
"command": "bash ~/.cody/statusline-command.sh"
|
|
234060
234083
|
}
|
|
234061
234084
|
}
|
|
234062
234085
|
|
|
234063
234086
|
4. If ~/.cody/settings.json is a symlink, update the target file instead.
|
|
234064
234087
|
|
|
234065
234088
|
Guidelines:
|
|
234066
|
-
- Preserve existing settings when updating
|
|
234067
|
-
- Return a summary of what was configured, including the
|
|
234068
|
-
- If the script includes git commands, they should skip optional locks
|
|
234089
|
+
- Preserve existing settings when updating ~/.cody/settings.json
|
|
234090
|
+
- Return a summary of what was configured, including the script file path if used
|
|
234091
|
+
- If the script includes git commands, they should skip optional locks (use -c core.useBuiltinFSMonitor=false)
|
|
234069
234092
|
- IMPORTANT: At the end of your response, inform the parent agent that this "statusline-setup" agent must be used for further status line changes.
|
|
234070
234093
|
Also ensure that the user is informed that they can ask Cody to continue to make changes to the status line.
|
|
234071
234094
|
`, STATUSLINE_SETUP_AGENT;
|
|
@@ -247498,7 +247521,7 @@ function getTelemetryAttributes() {
|
|
|
247498
247521
|
attributes["session.id"] = sessionId;
|
|
247499
247522
|
}
|
|
247500
247523
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
247501
|
-
attributes["app.version"] = "0.7.
|
|
247524
|
+
attributes["app.version"] = "0.7.36";
|
|
247502
247525
|
}
|
|
247503
247526
|
const oauthAccount = getOauthAccountInfo();
|
|
247504
247527
|
if (oauthAccount) {
|
|
@@ -272924,7 +272947,7 @@ function resolvePluginMcpEnvironment(config3, plugin, userConfig, errors4, plugi
|
|
|
272924
272947
|
case "sse-ide":
|
|
272925
272948
|
case "ws-ide":
|
|
272926
272949
|
case "sdk":
|
|
272927
|
-
case "
|
|
272950
|
+
case "ainative-proxy":
|
|
272928
272951
|
resolved = config3;
|
|
272929
272952
|
break;
|
|
272930
272953
|
}
|
|
@@ -272979,24 +273002,24 @@ var init_mcpPluginIntegration = __esm(() => {
|
|
|
272979
273002
|
init_pluginOptionsStorage();
|
|
272980
273003
|
});
|
|
272981
273004
|
|
|
272982
|
-
// src/services/mcp/
|
|
272983
|
-
function
|
|
272984
|
-
|
|
273005
|
+
// src/services/mcp/ainative.ts
|
|
273006
|
+
function clearAINativeMcpConfigsCache() {
|
|
273007
|
+
fetchAINativeMcpConfigsIfEligible.cache.clear?.();
|
|
272985
273008
|
clearMcpAuthCache();
|
|
272986
273009
|
}
|
|
272987
|
-
function
|
|
273010
|
+
function markAINativeMcpConnected(name3) {
|
|
272988
273011
|
saveGlobalConfig((current) => {
|
|
272989
|
-
const seen = current.
|
|
273012
|
+
const seen = current.ainativeMcpEverConnected ?? [];
|
|
272990
273013
|
if (seen.includes(name3))
|
|
272991
273014
|
return current;
|
|
272992
|
-
return { ...current,
|
|
273015
|
+
return { ...current, ainativeMcpEverConnected: [...seen, name3] };
|
|
272993
273016
|
});
|
|
272994
273017
|
}
|
|
272995
|
-
function
|
|
272996
|
-
return (getGlobalConfig().
|
|
273018
|
+
function hasAINativeMcpEverConnected(name3) {
|
|
273019
|
+
return (getGlobalConfig().ainativeMcpEverConnected ?? []).includes(name3);
|
|
272997
273020
|
}
|
|
272998
|
-
var FETCH_TIMEOUT_MS = 5000,
|
|
272999
|
-
var
|
|
273021
|
+
var FETCH_TIMEOUT_MS = 5000, fetchAINativeMcpConfigsIfEligible;
|
|
273022
|
+
var init_ainative = __esm(() => {
|
|
273000
273023
|
init_axios2();
|
|
273001
273024
|
init_memoize();
|
|
273002
273025
|
init_oauth();
|
|
@@ -273006,46 +273029,44 @@ var init_claudeai = __esm(() => {
|
|
|
273006
273029
|
init_debug();
|
|
273007
273030
|
init_envUtils();
|
|
273008
273031
|
init_client8();
|
|
273009
|
-
|
|
273032
|
+
fetchAINativeMcpConfigsIfEligible = memoize_default(async () => {
|
|
273010
273033
|
try {
|
|
273011
|
-
if (isEnvDefinedFalsy(process.env.
|
|
273012
|
-
logForDebugging("[
|
|
273013
|
-
logEvent("
|
|
273034
|
+
if (isEnvDefinedFalsy(process.env.ENABLE_AINATIVE_MCP_SERVERS)) {
|
|
273035
|
+
logForDebugging("[ainative-mcp] Disabled via env var");
|
|
273036
|
+
logEvent("tengu_ainative_mcp_eligibility", {
|
|
273014
273037
|
state: "disabled_env_var"
|
|
273015
273038
|
});
|
|
273016
273039
|
return {};
|
|
273017
273040
|
}
|
|
273018
273041
|
const tokens = getClaudeAIOAuthTokens();
|
|
273019
273042
|
if (!tokens?.accessToken) {
|
|
273020
|
-
logForDebugging("[
|
|
273021
|
-
logEvent("
|
|
273043
|
+
logForDebugging("[ainative-mcp] No access token");
|
|
273044
|
+
logEvent("tengu_ainative_mcp_eligibility", {
|
|
273022
273045
|
state: "no_oauth_token"
|
|
273023
273046
|
});
|
|
273024
273047
|
return {};
|
|
273025
273048
|
}
|
|
273026
273049
|
if (!tokens.scopes?.includes("user:mcp_servers")) {
|
|
273027
|
-
logForDebugging(`[
|
|
273028
|
-
logEvent("
|
|
273050
|
+
logForDebugging(`[ainative-mcp] Missing user:mcp_servers scope (scopes=${tokens.scopes?.join(",") || "none"})`);
|
|
273051
|
+
logEvent("tengu_ainative_mcp_eligibility", {
|
|
273029
273052
|
state: "missing_scope"
|
|
273030
273053
|
});
|
|
273031
273054
|
return {};
|
|
273032
273055
|
}
|
|
273033
273056
|
const baseUrl = getOauthConfig().BASE_API_URL;
|
|
273034
|
-
const url3 = `${baseUrl}/
|
|
273035
|
-
logForDebugging(`[
|
|
273057
|
+
const url3 = `${baseUrl}/api/oauth/account/mcp_servers`;
|
|
273058
|
+
logForDebugging(`[ainative-mcp] Fetching from ${url3}`);
|
|
273036
273059
|
const response = await axios_default.get(url3, {
|
|
273037
273060
|
headers: {
|
|
273038
273061
|
Authorization: `Bearer ${tokens.accessToken}`,
|
|
273039
|
-
"Content-Type": "application/json"
|
|
273040
|
-
"anthropic-beta": MCP_SERVERS_BETA_HEADER,
|
|
273041
|
-
"anthropic-version": "2023-06-01"
|
|
273062
|
+
"Content-Type": "application/json"
|
|
273042
273063
|
},
|
|
273043
273064
|
timeout: FETCH_TIMEOUT_MS
|
|
273044
273065
|
});
|
|
273045
273066
|
const configs = {};
|
|
273046
273067
|
const usedNormalizedNames = new Set;
|
|
273047
273068
|
for (const server of response.data.data) {
|
|
273048
|
-
const baseName = `
|
|
273069
|
+
const baseName = `ainative ${server.display_name}`;
|
|
273049
273070
|
let finalName = baseName;
|
|
273050
273071
|
let finalNormalized = normalizeNameForMCP(finalName);
|
|
273051
273072
|
let count3 = 1;
|
|
@@ -273056,19 +273077,19 @@ var init_claudeai = __esm(() => {
|
|
|
273056
273077
|
}
|
|
273057
273078
|
usedNormalizedNames.add(finalNormalized);
|
|
273058
273079
|
configs[finalName] = {
|
|
273059
|
-
type: "
|
|
273080
|
+
type: "ainative-proxy",
|
|
273060
273081
|
url: server.url,
|
|
273061
273082
|
id: server.id,
|
|
273062
|
-
scope: "
|
|
273083
|
+
scope: "ainative"
|
|
273063
273084
|
};
|
|
273064
273085
|
}
|
|
273065
|
-
logForDebugging(`[
|
|
273066
|
-
logEvent("
|
|
273086
|
+
logForDebugging(`[ainative-mcp] Fetched ${Object.keys(configs).length} servers`);
|
|
273087
|
+
logEvent("tengu_ainative_mcp_eligibility", {
|
|
273067
273088
|
state: "eligible"
|
|
273068
273089
|
});
|
|
273069
273090
|
return configs;
|
|
273070
273091
|
} catch {
|
|
273071
|
-
logForDebugging(`[
|
|
273092
|
+
logForDebugging(`[ainative-mcp] Fetch failed`);
|
|
273072
273093
|
return {};
|
|
273073
273094
|
}
|
|
273074
273095
|
});
|
|
@@ -273196,7 +273217,7 @@ function dedupPluginMcpServers(pluginServers, manualServers) {
|
|
|
273196
273217
|
}
|
|
273197
273218
|
return { servers, suppressed };
|
|
273198
273219
|
}
|
|
273199
|
-
function
|
|
273220
|
+
function dedupAINativeMcpServers(claudeAiServers, manualServers) {
|
|
273200
273221
|
const manualSigs = new Map;
|
|
273201
273222
|
for (const [name3, config3] of Object.entries(manualServers)) {
|
|
273202
273223
|
if (isMcpServerDisabled(name3))
|
|
@@ -273382,7 +273403,7 @@ function expandEnvVars(config3) {
|
|
|
273382
273403
|
case "sdk":
|
|
273383
273404
|
expanded = config3;
|
|
273384
273405
|
break;
|
|
273385
|
-
case "
|
|
273406
|
+
case "ainative-proxy":
|
|
273386
273407
|
expanded = config3;
|
|
273387
273408
|
break;
|
|
273388
273409
|
}
|
|
@@ -273440,8 +273461,9 @@ async function addMcpConfig(name3, config3, scope) {
|
|
|
273440
273461
|
throw new Error("Cannot add MCP server to scope: dynamic");
|
|
273441
273462
|
case "enterprise":
|
|
273442
273463
|
throw new Error("Cannot add MCP server to scope: enterprise");
|
|
273464
|
+
case "ainative":
|
|
273443
273465
|
case "claudeai":
|
|
273444
|
-
throw new Error("Cannot add MCP server to scope:
|
|
273466
|
+
throw new Error("Cannot add MCP server to scope: ainative");
|
|
273445
273467
|
}
|
|
273446
273468
|
switch (scope) {
|
|
273447
273469
|
case "project": {
|
|
@@ -273783,11 +273805,11 @@ async function getAllMcpConfigs() {
|
|
|
273783
273805
|
if (doesEnterpriseMcpConfigExist()) {
|
|
273784
273806
|
return getClaudeCodeMcpConfigs();
|
|
273785
273807
|
}
|
|
273786
|
-
const
|
|
273787
|
-
const { servers: claudeCodeServers, errors: errors4 } = await getClaudeCodeMcpConfigs({},
|
|
273788
|
-
const { allowed:
|
|
273789
|
-
const { servers:
|
|
273790
|
-
const servers = Object.assign({},
|
|
273808
|
+
const ainativePromise = fetchAINativeMcpConfigsIfEligible();
|
|
273809
|
+
const { servers: claudeCodeServers, errors: errors4 } = await getClaudeCodeMcpConfigs({}, ainativePromise);
|
|
273810
|
+
const { allowed: ainativeMcpServers } = filterMcpServersByPolicy(await ainativePromise);
|
|
273811
|
+
const { servers: dedupedAINative } = dedupAINativeMcpServers(ainativeMcpServers, claudeCodeServers);
|
|
273812
|
+
const servers = Object.assign({}, dedupedAINative, claudeCodeServers);
|
|
273791
273813
|
return { servers, errors: errors4 };
|
|
273792
273814
|
}
|
|
273793
273815
|
function parseMcpConfig(params) {
|
|
@@ -273985,7 +274007,7 @@ var init_config3 = __esm(() => {
|
|
|
273985
274007
|
init_types3();
|
|
273986
274008
|
init_slowOperations();
|
|
273987
274009
|
init_analytics();
|
|
273988
|
-
|
|
274010
|
+
init_ainative();
|
|
273989
274011
|
init_types2();
|
|
273990
274012
|
init_utils5();
|
|
273991
274013
|
CCR_PROXY_PATH_MARKERS = [
|
|
@@ -274089,6 +274111,7 @@ function describeMcpConfigFilePath(scope) {
|
|
|
274089
274111
|
return "Dynamically configured";
|
|
274090
274112
|
case "enterprise":
|
|
274091
274113
|
return getEnterpriseMcpFilePath();
|
|
274114
|
+
case "ainative":
|
|
274092
274115
|
case "claudeai":
|
|
274093
274116
|
return "ainative.studio";
|
|
274094
274117
|
default:
|
|
@@ -274107,6 +274130,7 @@ function getScopeLabel(scope) {
|
|
|
274107
274130
|
return "Dynamic config (from command line)";
|
|
274108
274131
|
case "enterprise":
|
|
274109
274132
|
return "Enterprise config (managed by your organization)";
|
|
274133
|
+
case "ainative":
|
|
274110
274134
|
case "claudeai":
|
|
274111
274135
|
return "ainative.studio config";
|
|
274112
274136
|
default:
|
|
@@ -274171,8 +274195,8 @@ function getMcpServerScopeFromToolName(toolName) {
|
|
|
274171
274195
|
return null;
|
|
274172
274196
|
}
|
|
274173
274197
|
const serverConfig = getMcpConfigByName(mcpInfo.serverName);
|
|
274174
|
-
if (!serverConfig && mcpInfo.serverName.startsWith("
|
|
274175
|
-
return "
|
|
274198
|
+
if (!serverConfig && mcpInfo.serverName.startsWith("ainative_")) {
|
|
274199
|
+
return "ainative";
|
|
274176
274200
|
}
|
|
274177
274201
|
return serverConfig?.scope ?? null;
|
|
274178
274202
|
}
|
|
@@ -276222,7 +276246,7 @@ function createMcpAuthTool(serverName, config3) {
|
|
|
276222
276246
|
return { behavior: "allow", updatedInput: input };
|
|
276223
276247
|
},
|
|
276224
276248
|
async call(_input, context3) {
|
|
276225
|
-
if (config3.type === "
|
|
276249
|
+
if (config3.type === "ainative-proxy") {
|
|
276226
276250
|
return {
|
|
276227
276251
|
data: {
|
|
276228
276252
|
status: "unsupported",
|
|
@@ -278653,11 +278677,16 @@ async function installIDEExtension(ideType) {
|
|
|
278653
278677
|
if (isVSCodeIde(ideType)) {
|
|
278654
278678
|
const command = await getVSCodeIDECommand(ideType);
|
|
278655
278679
|
if (command) {
|
|
278680
|
+
const probe = await execFileNoThrow(command, ["--version"]);
|
|
278681
|
+
if (probe.code !== 0 || probe.error?.includes("ENOENT")) {
|
|
278682
|
+
const displayName = supportedIdeConfigs[ideType]?.displayName ?? ideType;
|
|
278683
|
+
throw new Error(`${displayName} CLI ("${command}") not found on PATH. ` + `Open ${displayName} and run the "Install '${command}' command in PATH" action, then try again.`);
|
|
278684
|
+
}
|
|
278656
278685
|
if (false) {}
|
|
278657
278686
|
let version6 = await getInstalledVSCodeExtensionVersion(command);
|
|
278658
278687
|
if (!version6 || lt(version6, getClaudeCodeVersion())) {
|
|
278659
278688
|
await sleep2(500);
|
|
278660
|
-
const result = await execFileNoThrowWithCwd(command, ["--force", "--install-extension",
|
|
278689
|
+
const result = await execFileNoThrowWithCwd(command, ["--force", "--install-extension", EXTENSION_ID], {
|
|
278661
278690
|
env: getInstallationEnv()
|
|
278662
278691
|
});
|
|
278663
278692
|
if (result.code !== 0) {
|
|
@@ -278680,7 +278709,7 @@ function getInstallationEnv() {
|
|
|
278680
278709
|
return;
|
|
278681
278710
|
}
|
|
278682
278711
|
function getClaudeCodeVersion() {
|
|
278683
|
-
return "0.7.
|
|
278712
|
+
return "0.7.36";
|
|
278684
278713
|
}
|
|
278685
278714
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
278686
278715
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -278690,7 +278719,7 @@ async function getInstalledVSCodeExtensionVersion(command) {
|
|
|
278690
278719
|
`) || [];
|
|
278691
278720
|
for (const line of lines) {
|
|
278692
278721
|
const [extensionId, version6] = line.split("@");
|
|
278693
|
-
if (extensionId ===
|
|
278722
|
+
if (extensionId === EXTENSION_ID && version6) {
|
|
278694
278723
|
return version6;
|
|
278695
278724
|
}
|
|
278696
278725
|
}
|
|
@@ -278907,7 +278936,7 @@ async function initializeIdeIntegration(onIdeDetected, ideToInstallExtension, on
|
|
|
278907
278936
|
}
|
|
278908
278937
|
}
|
|
278909
278938
|
}
|
|
278910
|
-
var ideOnboardingDialog = () => (init_IdeOnboardingDialog(), __toCommonJS(exports_IdeOnboardingDialog)), supportedIdeConfigs, isSupportedVSCodeTerminal, isSupportedJetBrainsTerminal, isSupportedTerminal, getWindowsUserProfile, currentIDESearch = null, EXTENSION_ID = "
|
|
278939
|
+
var ideOnboardingDialog = () => (init_IdeOnboardingDialog(), __toCommonJS(exports_IdeOnboardingDialog)), supportedIdeConfigs, isSupportedVSCodeTerminal, isSupportedJetBrainsTerminal, isSupportedTerminal, getWindowsUserProfile, currentIDESearch = null, EXTENSION_ID = "ainative.cody", cachedRunningIDEs = null, EDITOR_DISPLAY_NAMES, detectHostIP;
|
|
278911
278940
|
var init_ide = __esm(() => {
|
|
278912
278941
|
init_execa();
|
|
278913
278942
|
init_capitalize();
|
|
@@ -283427,7 +283456,7 @@ function handleRemoteAuthFailure(name3, serverRef, transportType) {
|
|
|
283427
283456
|
const label = {
|
|
283428
283457
|
sse: "SSE",
|
|
283429
283458
|
http: "HTTP",
|
|
283430
|
-
"
|
|
283459
|
+
"ainative-proxy": "AINative proxy"
|
|
283431
283460
|
};
|
|
283432
283461
|
logMCPDebug(name3, `Authentication required for ${label[transportType]} server`);
|
|
283433
283462
|
setMcpAuthCacheEntry(name3);
|
|
@@ -283583,8 +283612,8 @@ async function reconnectMcpServerImpl(name3, config3) {
|
|
|
283583
283612
|
commands: []
|
|
283584
283613
|
};
|
|
283585
283614
|
}
|
|
283586
|
-
if (config3.type === "
|
|
283587
|
-
|
|
283615
|
+
if (config3.type === "ainative-proxy") {
|
|
283616
|
+
markAINativeMcpConnected(name3);
|
|
283588
283617
|
}
|
|
283589
283618
|
const supportsResources = !!client4.capabilities?.resources;
|
|
283590
283619
|
const [tools, mcpCommands, mcpSkills, resources] = await Promise.all([
|
|
@@ -283664,7 +283693,7 @@ async function getMcpToolsCommandsAndResources(onConnectionAttempt, mcpConfigs)
|
|
|
283664
283693
|
});
|
|
283665
283694
|
return;
|
|
283666
283695
|
}
|
|
283667
|
-
if ((config3.type === "
|
|
283696
|
+
if ((config3.type === "ainative-proxy" || config3.type === "http" || config3.type === "sse") && (await isMcpAuthCached(name3) || (config3.type === "http" || config3.type === "sse") && hasMcpDiscoveryButNoToken(name3, config3))) {
|
|
283668
283697
|
logMCPDebug(name3, `Skipping connection (cached needs-auth)`);
|
|
283669
283698
|
onConnectionAttempt({
|
|
283670
283699
|
client: { name: name3, type: "needs-auth", config: config3 },
|
|
@@ -283682,8 +283711,8 @@ async function getMcpToolsCommandsAndResources(onConnectionAttempt, mcpConfigs)
|
|
|
283682
283711
|
});
|
|
283683
283712
|
return;
|
|
283684
283713
|
}
|
|
283685
|
-
if (config3.type === "
|
|
283686
|
-
|
|
283714
|
+
if (config3.type === "ainative-proxy") {
|
|
283715
|
+
markAINativeMcpConnected(name3);
|
|
283687
283716
|
}
|
|
283688
283717
|
const supportsResources = !!client4.capabilities?.resources;
|
|
283689
283718
|
const [tools, mcpCommands, mcpSkills, resources] = await Promise.all([
|
|
@@ -284182,7 +284211,7 @@ async function callMCPTool({
|
|
|
284182
284211
|
throw new McpAuthError(name3, `MCP server "${name3}" requires re-authorization (token expired)`);
|
|
284183
284212
|
}
|
|
284184
284213
|
const isSessionExpired = isMcpSessionExpiredError(e);
|
|
284185
|
-
const isConnectionClosedOnHttp = "code" in e && e.code === -32000 && e.message.includes("Connection closed") && (config3.type === "http" || config3.type === "
|
|
284214
|
+
const isConnectionClosedOnHttp = "code" in e && e.code === -32000 && e.message.includes("Connection closed") && (config3.type === "http" || config3.type === "ainative-proxy");
|
|
284186
284215
|
if (isSessionExpired || isConnectionClosedOnHttp) {
|
|
284187
284216
|
logMCPDebug(name3, `MCP session expired during tool call (${isSessionExpired ? "404/-32001" : "connection closed"}), clearing connection cache for re-initialization`);
|
|
284188
284217
|
logEvent("tengu_mcp_session_expired", {});
|
|
@@ -284214,7 +284243,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
284214
284243
|
const client4 = new Client({
|
|
284215
284244
|
name: "claude-code",
|
|
284216
284245
|
title: "Cody CLI",
|
|
284217
|
-
version: "0.7.
|
|
284246
|
+
version: "0.7.36",
|
|
284218
284247
|
description: "Anthropic's agentic coding tool",
|
|
284219
284248
|
websiteUrl: PRODUCT_URL
|
|
284220
284249
|
}, {
|
|
@@ -284308,7 +284337,7 @@ var init_client8 = __esm(() => {
|
|
|
284308
284337
|
init_classifyForCollapse();
|
|
284309
284338
|
init_macOsKeychainHelpers();
|
|
284310
284339
|
init_auth6();
|
|
284311
|
-
|
|
284340
|
+
init_ainative();
|
|
284312
284341
|
init_config3();
|
|
284313
284342
|
init_headersHelper();
|
|
284314
284343
|
init_common2();
|
|
@@ -284502,7 +284531,7 @@ var init_client8 = __esm(() => {
|
|
|
284502
284531
|
logMCPDebug(name3, `HTTP transport created successfully`);
|
|
284503
284532
|
} else if (serverRef.type === "sdk") {
|
|
284504
284533
|
throw new Error("SDK servers should be handled in print.ts");
|
|
284505
|
-
} else if (serverRef.type === "
|
|
284534
|
+
} else if (serverRef.type === "ainative-proxy") {
|
|
284506
284535
|
logMCPDebug(name3, `Initializing claude.ai proxy transport for server ${serverRef.id}`);
|
|
284507
284536
|
const tokens = getClaudeAIOAuthTokens();
|
|
284508
284537
|
if (!tokens) {
|
|
@@ -284568,7 +284597,7 @@ var init_client8 = __esm(() => {
|
|
|
284568
284597
|
const client4 = new Client({
|
|
284569
284598
|
name: "claude-code",
|
|
284570
284599
|
title: "Cody CLI",
|
|
284571
|
-
version: "0.7.
|
|
284600
|
+
version: "0.7.36",
|
|
284572
284601
|
description: "Anthropic's agentic coding tool",
|
|
284573
284602
|
websiteUrl: PRODUCT_URL
|
|
284574
284603
|
}, {
|
|
@@ -284648,12 +284677,12 @@ var init_client8 = __esm(() => {
|
|
|
284648
284677
|
if (error43 instanceof UnauthorizedError) {
|
|
284649
284678
|
return handleRemoteAuthFailure(name3, serverRef, "http");
|
|
284650
284679
|
}
|
|
284651
|
-
} else if (serverRef.type === "
|
|
284680
|
+
} else if (serverRef.type === "ainative-proxy" && error43 instanceof Error) {
|
|
284652
284681
|
logMCPDebug(name3, `claude.ai proxy connection failed after ${elapsed}ms: ${error43.message}`);
|
|
284653
284682
|
logMCPError(name3, error43);
|
|
284654
284683
|
const errorCode = error43.code;
|
|
284655
284684
|
if (errorCode === 401) {
|
|
284656
|
-
return handleRemoteAuthFailure(name3, serverRef, "
|
|
284685
|
+
return handleRemoteAuthFailure(name3, serverRef, "ainative-proxy");
|
|
284657
284686
|
}
|
|
284658
284687
|
} else if (serverRef.type === "sse-ide" || serverRef.type === "ws-ide") {
|
|
284659
284688
|
logEvent("tengu_mcp_ide_server_connection_failed", {
|
|
@@ -284744,7 +284773,7 @@ var init_client8 = __esm(() => {
|
|
|
284744
284773
|
logMCPDebug(name3, `Connection error: ${error43.message}`);
|
|
284745
284774
|
}
|
|
284746
284775
|
}
|
|
284747
|
-
if ((transportType === "http" || transportType === "
|
|
284776
|
+
if ((transportType === "http" || transportType === "ainative-proxy") && isMcpSessionExpiredError(error43)) {
|
|
284748
284777
|
logMCPDebug(name3, `MCP session expired (server returned 404 with session-not-found), triggering reconnection`);
|
|
284749
284778
|
closeTransportAndRejectPending("session expired");
|
|
284750
284779
|
if (originalOnerror) {
|
|
@@ -284752,7 +284781,7 @@ var init_client8 = __esm(() => {
|
|
|
284752
284781
|
}
|
|
284753
284782
|
return;
|
|
284754
284783
|
}
|
|
284755
|
-
if (transportType === "sse" || transportType === "http" || transportType === "
|
|
284784
|
+
if (transportType === "sse" || transportType === "http" || transportType === "ainative-proxy") {
|
|
284756
284785
|
if (error43.message.includes("Maximum reconnection attempts")) {
|
|
284757
284786
|
closeTransportAndRejectPending("SSE reconnection exhausted");
|
|
284758
284787
|
if (originalOnerror) {
|
|
@@ -332700,7 +332729,7 @@ async function initializeBetaTracing(resource) {
|
|
|
332700
332729
|
});
|
|
332701
332730
|
import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
332702
332731
|
setLoggerProvider(loggerProvider);
|
|
332703
|
-
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.
|
|
332732
|
+
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.36");
|
|
332704
332733
|
setEventLogger(eventLogger);
|
|
332705
332734
|
process.on("beforeExit", async () => {
|
|
332706
332735
|
await loggerProvider?.forceFlush();
|
|
@@ -332740,7 +332769,7 @@ async function initializeTelemetry() {
|
|
|
332740
332769
|
const platform5 = getPlatform();
|
|
332741
332770
|
const baseAttributes = {
|
|
332742
332771
|
[import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
|
|
332743
|
-
[import_semantic_conventions2.ATTR_SERVICE_VERSION]: "0.7.
|
|
332772
|
+
[import_semantic_conventions2.ATTR_SERVICE_VERSION]: "0.7.36"
|
|
332744
332773
|
};
|
|
332745
332774
|
if (platform5 === "wsl") {
|
|
332746
332775
|
const wslVersion = getWslVersion();
|
|
@@ -332785,7 +332814,7 @@ async function initializeTelemetry() {
|
|
|
332785
332814
|
} catch {}
|
|
332786
332815
|
};
|
|
332787
332816
|
registerCleanup(shutdownTelemetry2);
|
|
332788
|
-
return meterProvider2.getMeter("com.anthropic.claude_code", "0.7.
|
|
332817
|
+
return meterProvider2.getMeter("com.anthropic.claude_code", "0.7.36");
|
|
332789
332818
|
}
|
|
332790
332819
|
const meterProvider = new import_sdk_metrics2.MeterProvider({
|
|
332791
332820
|
resource,
|
|
@@ -332805,7 +332834,7 @@ async function initializeTelemetry() {
|
|
|
332805
332834
|
});
|
|
332806
332835
|
import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
332807
332836
|
setLoggerProvider(loggerProvider);
|
|
332808
|
-
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.
|
|
332837
|
+
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.36");
|
|
332809
332838
|
setEventLogger(eventLogger);
|
|
332810
332839
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
332811
332840
|
process.on("beforeExit", async () => {
|
|
@@ -332867,7 +332896,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
332867
332896
|
}
|
|
332868
332897
|
};
|
|
332869
332898
|
registerCleanup(shutdownTelemetry);
|
|
332870
|
-
return meterProvider.getMeter("com.anthropic.claude_code", "0.7.
|
|
332899
|
+
return meterProvider.getMeter("com.anthropic.claude_code", "0.7.36");
|
|
332871
332900
|
}
|
|
332872
332901
|
async function flushTelemetry() {
|
|
332873
332902
|
const meterProvider = getMeterProvider();
|
|
@@ -333556,9 +333585,9 @@ async function assertMinVersion() {
|
|
|
333556
333585
|
}
|
|
333557
333586
|
try {
|
|
333558
333587
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
333559
|
-
if (versionConfig.minVersion && lt("0.7.
|
|
333588
|
+
if (versionConfig.minVersion && lt("0.7.36", versionConfig.minVersion)) {
|
|
333560
333589
|
console.error(`
|
|
333561
|
-
It looks like your version of Cody CLI (${"0.7.
|
|
333590
|
+
It looks like your version of Cody CLI (${"0.7.36"}) needs an update.
|
|
333562
333591
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
333563
333592
|
|
|
333564
333593
|
To update, please run:
|
|
@@ -333795,7 +333824,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
333795
333824
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
333796
333825
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
333797
333826
|
pid: process.pid,
|
|
333798
|
-
currentVersion: "0.7.
|
|
333827
|
+
currentVersion: "0.7.36"
|
|
333799
333828
|
});
|
|
333800
333829
|
return "in_progress";
|
|
333801
333830
|
}
|
|
@@ -333804,7 +333833,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
333804
333833
|
if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
|
|
333805
333834
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
333806
333835
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
333807
|
-
currentVersion: "0.7.
|
|
333836
|
+
currentVersion: "0.7.36"
|
|
333808
333837
|
});
|
|
333809
333838
|
console.error(`
|
|
333810
333839
|
Error: Windows NPM detected in WSL
|
|
@@ -334339,7 +334368,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
334339
334368
|
}
|
|
334340
334369
|
async function getDoctorDiagnostic() {
|
|
334341
334370
|
const installationType = await getCurrentInstallationType();
|
|
334342
|
-
const version6 = typeof MACRO !== "undefined" ? "0.7.
|
|
334371
|
+
const version6 = typeof MACRO !== "undefined" ? "0.7.36" : "unknown";
|
|
334343
334372
|
const installationPath = await getInstallationPath();
|
|
334344
334373
|
const invokedBinary = getInvokedBinary();
|
|
334345
334374
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -335174,8 +335203,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
335174
335203
|
const maxVersion = await getMaxVersion();
|
|
335175
335204
|
if (maxVersion && gt(version6, maxVersion)) {
|
|
335176
335205
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version6} to ${maxVersion}`);
|
|
335177
|
-
if (gte("0.7.
|
|
335178
|
-
logForDebugging(`Native installer: current version ${"0.7.
|
|
335206
|
+
if (gte("0.7.36", maxVersion)) {
|
|
335207
|
+
logForDebugging(`Native installer: current version ${"0.7.36"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
335179
335208
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
335180
335209
|
latency_ms: Date.now() - startTime,
|
|
335181
335210
|
max_version: maxVersion,
|
|
@@ -335186,7 +335215,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
335186
335215
|
version6 = maxVersion;
|
|
335187
335216
|
}
|
|
335188
335217
|
}
|
|
335189
|
-
if (!forceReinstall && version6 === "0.7.
|
|
335218
|
+
if (!forceReinstall && version6 === "0.7.36" && await versionIsAvailable(version6) && await isPossibleClaudeBinary(executablePath)) {
|
|
335190
335219
|
logForDebugging(`Found ${version6} at ${executablePath}, skipping install`);
|
|
335191
335220
|
logEvent("tengu_native_update_complete", {
|
|
335192
335221
|
latency_ms: Date.now() - startTime,
|
|
@@ -419007,7 +419036,7 @@ function getAnthropicEnvMetadata() {
|
|
|
419007
419036
|
function getBuildAgeMinutes() {
|
|
419008
419037
|
if (false)
|
|
419009
419038
|
;
|
|
419010
|
-
const buildTime = new Date("
|
|
419039
|
+
const buildTime = new Date("1777670728").getTime();
|
|
419011
419040
|
if (isNaN(buildTime))
|
|
419012
419041
|
return;
|
|
419013
419042
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -442520,7 +442549,7 @@ function Feedback({
|
|
|
442520
442549
|
platform: env4.platform,
|
|
442521
442550
|
gitRepo: envInfo.isGit,
|
|
442522
442551
|
terminal: env4.terminal,
|
|
442523
|
-
version: "0.7.
|
|
442552
|
+
version: "0.7.36",
|
|
442524
442553
|
transcript: normalizeMessagesForAPI(messages),
|
|
442525
442554
|
errors: sanitizedErrors,
|
|
442526
442555
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -442712,7 +442741,7 @@ function Feedback({
|
|
|
442712
442741
|
", ",
|
|
442713
442742
|
env4.terminal,
|
|
442714
442743
|
", v",
|
|
442715
|
-
"0.7.
|
|
442744
|
+
"0.7.36"
|
|
442716
442745
|
]
|
|
442717
442746
|
}, undefined, true, undefined, this)
|
|
442718
442747
|
]
|
|
@@ -442818,7 +442847,7 @@ ${sanitizedDescription}
|
|
|
442818
442847
|
` + `**Environment Info**
|
|
442819
442848
|
` + `- Platform: ${env4.platform}
|
|
442820
442849
|
` + `- Terminal: ${env4.terminal}
|
|
442821
|
-
` + `- Version: ${"0.7.
|
|
442850
|
+
` + `- Version: ${"0.7.36"}
|
|
442822
442851
|
` + `- Feedback ID: ${feedbackId}
|
|
442823
442852
|
` + `
|
|
442824
442853
|
**Errors**
|
|
@@ -445918,7 +445947,7 @@ function buildPrimarySection() {
|
|
|
445918
445947
|
}, undefined, false, undefined, this);
|
|
445919
445948
|
return [{
|
|
445920
445949
|
label: "Version",
|
|
445921
|
-
value: "0.7.
|
|
445950
|
+
value: "0.7.36"
|
|
445922
445951
|
}, {
|
|
445923
445952
|
label: "Session name",
|
|
445924
445953
|
value: nameValue
|
|
@@ -449669,7 +449698,7 @@ function Config({
|
|
|
449669
449698
|
}
|
|
449670
449699
|
}, undefined, false, undefined, this)
|
|
449671
449700
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime178.jsxDEV(ChannelDowngradeDialog, {
|
|
449672
|
-
currentVersion: "0.7.
|
|
449701
|
+
currentVersion: "0.7.36",
|
|
449673
449702
|
onChoice: (choice) => {
|
|
449674
449703
|
setShowSubmenu(null);
|
|
449675
449704
|
setTabsHidden(false);
|
|
@@ -449681,7 +449710,7 @@ function Config({
|
|
|
449681
449710
|
autoUpdatesChannel: "stable"
|
|
449682
449711
|
};
|
|
449683
449712
|
if (choice === "stay") {
|
|
449684
|
-
newSettings.minimumVersion = "0.7.
|
|
449713
|
+
newSettings.minimumVersion = "0.7.36";
|
|
449685
449714
|
}
|
|
449686
449715
|
updateSettingsForSource("userSettings", newSettings);
|
|
449687
449716
|
setSettingsData((prev_27) => ({
|
|
@@ -457723,7 +457752,7 @@ function HelpV2(t0) {
|
|
|
457723
457752
|
let t6;
|
|
457724
457753
|
if ($3[31] !== tabs) {
|
|
457725
457754
|
t6 = /* @__PURE__ */ jsx_dev_runtime205.jsxDEV(Tabs, {
|
|
457726
|
-
title: `Cody CLI v${"0.7.
|
|
457755
|
+
title: `Cody CLI v${"0.7.36"}`,
|
|
457727
457756
|
color: "professionalBlue",
|
|
457728
457757
|
defaultTab: "general",
|
|
457729
457758
|
children: tabs
|
|
@@ -463475,10 +463504,10 @@ function _temp324(a2, b3) {
|
|
|
463475
463504
|
return a2.name.localeCompare(b3.name);
|
|
463476
463505
|
}
|
|
463477
463506
|
function _temp235(s_0) {
|
|
463478
|
-
return s_0.client.config.type === "
|
|
463507
|
+
return s_0.client.config.type === "ainative-proxy";
|
|
463479
463508
|
}
|
|
463480
463509
|
function _temp97(s) {
|
|
463481
|
-
return s.client.config.type !== "
|
|
463510
|
+
return s.client.config.type !== "ainative-proxy";
|
|
463482
463511
|
}
|
|
463483
463512
|
var import_compiler_runtime178, import_react124, jsx_dev_runtime223, SCOPE_ORDER;
|
|
463484
463513
|
var init_MCPListPanel = __esm(() => {
|
|
@@ -464090,14 +464119,14 @@ function useManageMCPConnections(dynamicMcpConfig, isStrictMcpConfig = false) {
|
|
|
464090
464119
|
import_react125.useEffect(() => {
|
|
464091
464120
|
let cancelled = false;
|
|
464092
464121
|
async function loadAndConnectMcpConfigs() {
|
|
464093
|
-
let
|
|
464122
|
+
let ainativePromise;
|
|
464094
464123
|
if (isStrictMcpConfig || doesEnterpriseMcpConfigExist() || process.env.CODY_CLI === "1") {
|
|
464095
|
-
|
|
464124
|
+
ainativePromise = Promise.resolve({});
|
|
464096
464125
|
} else {
|
|
464097
|
-
|
|
464098
|
-
|
|
464126
|
+
clearAINativeMcpConfigsCache();
|
|
464127
|
+
ainativePromise = fetchAINativeMcpConfigsIfEligible();
|
|
464099
464128
|
}
|
|
464100
|
-
const { servers: claudeCodeConfigs, errors: mcpErrors } = isStrictMcpConfig ? { servers: {}, errors: [] } : await getClaudeCodeMcpConfigs(dynamicMcpConfig,
|
|
464129
|
+
const { servers: claudeCodeConfigs, errors: mcpErrors } = isStrictMcpConfig ? { servers: {}, errors: [] } : await getClaudeCodeMcpConfigs(dynamicMcpConfig, ainativePromise);
|
|
464101
464130
|
if (cancelled)
|
|
464102
464131
|
return;
|
|
464103
464132
|
addErrorsToAppState(setAppState, mcpErrors);
|
|
@@ -464106,19 +464135,19 @@ function useManageMCPConnections(dynamicMcpConfig, isStrictMcpConfig = false) {
|
|
|
464106
464135
|
getMcpToolsCommandsAndResources(onConnectionAttempt, enabledConfigs).catch((error43) => {
|
|
464107
464136
|
logMCPError("useManageMcpConnections", `Failed to get MCP resources: ${errorMessage(error43)}`);
|
|
464108
464137
|
});
|
|
464109
|
-
let
|
|
464138
|
+
let ainativeConfigs = {};
|
|
464110
464139
|
if (!isStrictMcpConfig) {
|
|
464111
|
-
|
|
464140
|
+
ainativeConfigs = filterMcpServersByPolicy(await ainativePromise).allowed;
|
|
464112
464141
|
if (cancelled)
|
|
464113
464142
|
return;
|
|
464114
|
-
if (Object.keys(
|
|
464115
|
-
const { servers:
|
|
464116
|
-
|
|
464143
|
+
if (Object.keys(ainativeConfigs).length > 0) {
|
|
464144
|
+
const { servers: dedupedAINative } = dedupAINativeMcpServers(ainativeConfigs, configs);
|
|
464145
|
+
ainativeConfigs = dedupedAINative;
|
|
464117
464146
|
}
|
|
464118
|
-
if (Object.keys(
|
|
464147
|
+
if (Object.keys(ainativeConfigs).length > 0) {
|
|
464119
464148
|
setAppState((prevState) => {
|
|
464120
464149
|
const existingServerNames = new Set(prevState.mcp.clients.map((c6) => c6.name));
|
|
464121
|
-
const newClients = Object.entries(
|
|
464150
|
+
const newClients = Object.entries(ainativeConfigs).filter(([name3]) => !existingServerNames.has(name3)).map(([name3, config4]) => ({
|
|
464122
464151
|
name: name3,
|
|
464123
464152
|
type: isMcpServerDisabled(name3) ? "disabled" : "pending",
|
|
464124
464153
|
config: config4
|
|
@@ -464133,20 +464162,20 @@ function useManageMCPConnections(dynamicMcpConfig, isStrictMcpConfig = false) {
|
|
|
464133
464162
|
}
|
|
464134
464163
|
};
|
|
464135
464164
|
});
|
|
464136
|
-
const enabledClaudeaiConfigs = Object.fromEntries(Object.entries(
|
|
464165
|
+
const enabledClaudeaiConfigs = Object.fromEntries(Object.entries(ainativeConfigs).filter(([name3]) => !isMcpServerDisabled(name3)));
|
|
464137
464166
|
getMcpToolsCommandsAndResources(onConnectionAttempt, enabledClaudeaiConfigs).catch((error43) => {
|
|
464138
464167
|
logMCPError("useManageMcpConnections", `Failed to get claude.ai MCP resources: ${errorMessage(error43)}`);
|
|
464139
464168
|
});
|
|
464140
464169
|
}
|
|
464141
464170
|
}
|
|
464142
|
-
const allConfigs = { ...configs, ...
|
|
464171
|
+
const allConfigs = { ...configs, ...ainativeConfigs };
|
|
464143
464172
|
const counts = {
|
|
464144
464173
|
enterprise: 0,
|
|
464145
464174
|
global: 0,
|
|
464146
464175
|
project: 0,
|
|
464147
464176
|
user: 0,
|
|
464148
464177
|
plugin: 0,
|
|
464149
|
-
|
|
464178
|
+
ainative: 0
|
|
464150
464179
|
};
|
|
464151
464180
|
const stdioCommands = [];
|
|
464152
464181
|
for (const [name3, serverConfig] of Object.entries(allConfigs)) {
|
|
@@ -464160,8 +464189,8 @@ function useManageMCPConnections(dynamicMcpConfig, isStrictMcpConfig = false) {
|
|
|
464160
464189
|
counts.user++;
|
|
464161
464190
|
else if (serverConfig.scope === "dynamic")
|
|
464162
464191
|
counts.plugin++;
|
|
464163
|
-
else if (serverConfig.scope === "
|
|
464164
|
-
counts.
|
|
464192
|
+
else if (serverConfig.scope === "ainative")
|
|
464193
|
+
counts.ainative++;
|
|
464165
464194
|
if (false) {}
|
|
464166
464195
|
}
|
|
464167
464196
|
logEvent("tengu_mcp_servers", {
|
|
@@ -464273,7 +464302,7 @@ var init_useManageMCPConnections = __esm(() => {
|
|
|
464273
464302
|
init_messageQueueManager();
|
|
464274
464303
|
init_channelNotification();
|
|
464275
464304
|
init_channelPermissions();
|
|
464276
|
-
|
|
464305
|
+
init_ainative();
|
|
464277
464306
|
init_elicitationHandler();
|
|
464278
464307
|
init_mcpStringUtils();
|
|
464279
464308
|
init_utils5();
|
|
@@ -464683,10 +464712,10 @@ function MCPRemoteServerMenu({
|
|
|
464683
464712
|
const [isReconnecting, setIsReconnecting] = import_react128.useState(false);
|
|
464684
464713
|
const authAbortControllerRef = import_react128.useRef(null);
|
|
464685
464714
|
const [isClaudeAIAuthenticating, setIsClaudeAIAuthenticating] = import_react128.useState(false);
|
|
464686
|
-
const [
|
|
464715
|
+
const [ainativeAuthUrl, setClaudeAIAuthUrl] = import_react128.useState(null);
|
|
464687
464716
|
const [isClaudeAIClearingAuth, setIsClaudeAIClearingAuth] = import_react128.useState(false);
|
|
464688
|
-
const [
|
|
464689
|
-
const [
|
|
464717
|
+
const [ainativeClearAuthUrl, setClaudeAIClearAuthUrl] = import_react128.useState(null);
|
|
464718
|
+
const [ainativeClearAuthBrowserOpened, setClaudeAIClearAuthBrowserOpened] = import_react128.useState(false);
|
|
464690
464719
|
const [urlCopied, setUrlCopied] = import_react128.useState(false);
|
|
464691
464720
|
const copyTimeoutRef = import_react128.useRef(undefined);
|
|
464692
464721
|
const unmountedRef = import_react128.useRef(false);
|
|
@@ -464709,7 +464738,7 @@ function MCPRemoteServerMenu({
|
|
|
464709
464738
|
try {
|
|
464710
464739
|
const result = await reconnectMcpServer(server.name);
|
|
464711
464740
|
const success2 = result.client.type === "connected";
|
|
464712
|
-
logEvent("
|
|
464741
|
+
logEvent("tengu_ainative_mcp_auth_completed", {
|
|
464713
464742
|
success: success2
|
|
464714
464743
|
});
|
|
464715
464744
|
if (success2) {
|
|
@@ -464720,7 +464749,7 @@ function MCPRemoteServerMenu({
|
|
|
464720
464749
|
onComplete?.("Authentication successful, but server reconnection failed. You may need to manually restart Cody CLI for the changes to take effect.");
|
|
464721
464750
|
}
|
|
464722
464751
|
} catch (err2) {
|
|
464723
|
-
logEvent("
|
|
464752
|
+
logEvent("tengu_ainative_mcp_auth_completed", {
|
|
464724
464753
|
success: false
|
|
464725
464754
|
});
|
|
464726
464755
|
onComplete?.(handleReconnectError(err2, server.name));
|
|
@@ -464752,7 +464781,7 @@ function MCPRemoteServerMenu({
|
|
|
464752
464781
|
}
|
|
464753
464782
|
};
|
|
464754
464783
|
});
|
|
464755
|
-
logEvent("
|
|
464784
|
+
logEvent("tengu_ainative_mcp_clear_auth_completed", {});
|
|
464756
464785
|
onComplete?.(`Disconnected from ${server.name}.`);
|
|
464757
464786
|
setIsClaudeAIClearingAuth(false);
|
|
464758
464787
|
setClaudeAIClearAuthUrl(null);
|
|
@@ -464787,7 +464816,7 @@ function MCPRemoteServerMenu({
|
|
|
464787
464816
|
handleClaudeAIAuthComplete();
|
|
464788
464817
|
}
|
|
464789
464818
|
if (key.return && isClaudeAIClearingAuth) {
|
|
464790
|
-
if (
|
|
464819
|
+
if (ainativeClearAuthBrowserOpened) {
|
|
464791
464820
|
handleClaudeAIClearAuthComplete();
|
|
464792
464821
|
} else {
|
|
464793
464822
|
const connectorsUrl = `${getOauthConfig().CLAUDE_AI_ORIGIN}/settings/connectors`;
|
|
@@ -464797,7 +464826,7 @@ function MCPRemoteServerMenu({
|
|
|
464797
464826
|
}
|
|
464798
464827
|
}
|
|
464799
464828
|
if (input === "c" && !urlCopied) {
|
|
464800
|
-
const urlToCopy = authorizationUrl ||
|
|
464829
|
+
const urlToCopy = authorizationUrl || ainativeAuthUrl || ainativeClearAuthUrl;
|
|
464801
464830
|
if (urlToCopy) {
|
|
464802
464831
|
setClipboard(urlToCopy).then((raw) => {
|
|
464803
464832
|
if (unmountedRef.current)
|
|
@@ -464817,32 +464846,32 @@ function MCPRemoteServerMenu({
|
|
|
464817
464846
|
const serverCommandsCount = filterMcpPromptsByServer(mcp.commands, server.name).length;
|
|
464818
464847
|
const toggleMcpServer = useMcpToggleEnabled();
|
|
464819
464848
|
const handleClaudeAIAuth = import_react128.default.useCallback(async () => {
|
|
464820
|
-
const
|
|
464849
|
+
const ainativeBaseUrl = getOauthConfig().CLAUDE_AI_ORIGIN;
|
|
464821
464850
|
const accountInfo = getOauthAccountInfo();
|
|
464822
464851
|
const orgUuid = accountInfo?.organizationUuid;
|
|
464823
464852
|
let authUrl;
|
|
464824
|
-
if (orgUuid && server.config.type === "
|
|
464853
|
+
if (orgUuid && server.config.type === "ainative-proxy" && server.config.id) {
|
|
464825
464854
|
const serverId = server.config.id.startsWith("mcprs") ? "mcpsrv" + server.config.id.slice(5) : server.config.id;
|
|
464826
464855
|
const productSurface = encodeURIComponent(process.env.CLAUDE_CODE_ENTRYPOINT || "cli");
|
|
464827
|
-
authUrl = `${
|
|
464856
|
+
authUrl = `${ainativeBaseUrl}/api/organizations/${orgUuid}/mcp/start-auth/${serverId}?product_surface=${productSurface}`;
|
|
464828
464857
|
} else {
|
|
464829
|
-
authUrl = `${
|
|
464858
|
+
authUrl = `${ainativeBaseUrl}/settings/connectors`;
|
|
464830
464859
|
}
|
|
464831
464860
|
setClaudeAIAuthUrl(authUrl);
|
|
464832
464861
|
setIsClaudeAIAuthenticating(true);
|
|
464833
|
-
logEvent("
|
|
464862
|
+
logEvent("tengu_ainative_mcp_auth_started", {});
|
|
464834
464863
|
await openBrowser(authUrl);
|
|
464835
464864
|
}, [server.config]);
|
|
464836
464865
|
const handleClaudeAIClearAuth = import_react128.default.useCallback(() => {
|
|
464837
464866
|
setIsClaudeAIClearingAuth(true);
|
|
464838
|
-
logEvent("
|
|
464867
|
+
logEvent("tengu_ainative_mcp_clear_auth_started", {});
|
|
464839
464868
|
}, []);
|
|
464840
464869
|
const handleToggleEnabled = import_react128.default.useCallback(async () => {
|
|
464841
464870
|
const wasEnabled = server.client.type !== "disabled";
|
|
464842
464871
|
try {
|
|
464843
464872
|
await toggleMcpServer(server.name);
|
|
464844
|
-
if (server.config.type === "
|
|
464845
|
-
logEvent("
|
|
464873
|
+
if (server.config.type === "ainative-proxy") {
|
|
464874
|
+
logEvent("tengu_ainative_mcp_toggle", {
|
|
464846
464875
|
new_state: wasEnabled ? "disabled" : "enabled"
|
|
464847
464876
|
});
|
|
464848
464877
|
}
|
|
@@ -464853,7 +464882,7 @@ function MCPRemoteServerMenu({
|
|
|
464853
464882
|
}
|
|
464854
464883
|
}, [server.client.type, server.config.type, server.name, toggleMcpServer, onCancel, onComplete]);
|
|
464855
464884
|
const handleAuthenticate = import_react128.default.useCallback(async () => {
|
|
464856
|
-
if (server.config.type === "
|
|
464885
|
+
if (server.config.type === "ainative-proxy")
|
|
464857
464886
|
return;
|
|
464858
464887
|
setIsAuthenticating(true);
|
|
464859
464888
|
setError(null);
|
|
@@ -464897,7 +464926,7 @@ function MCPRemoteServerMenu({
|
|
|
464897
464926
|
}
|
|
464898
464927
|
}, [server.isAuthenticated, server.config, server.name, onComplete, reconnectMcpServer, isEffectivelyAuthenticated]);
|
|
464899
464928
|
const handleClearAuth = async () => {
|
|
464900
|
-
if (server.config.type === "
|
|
464929
|
+
if (server.config.type === "ainative-proxy")
|
|
464901
464930
|
return;
|
|
464902
464931
|
if (server.config) {
|
|
464903
464932
|
await revokeServerTokens(server.name, server.config);
|
|
@@ -464929,7 +464958,7 @@ function MCPRemoteServerMenu({
|
|
|
464929
464958
|
}
|
|
464930
464959
|
};
|
|
464931
464960
|
if (isAuthenticating) {
|
|
464932
|
-
const authCopy = server.config.type !== "
|
|
464961
|
+
const authCopy = server.config.type !== "ainative-proxy" && server.config.oauth?.xaa ? " Authenticating via your identity provider" : " A browser window will open for authentication";
|
|
464933
464962
|
return /* @__PURE__ */ jsx_dev_runtime227.jsxDEV(ThemedBox_default, {
|
|
464934
464963
|
flexDirection: "column",
|
|
464935
464964
|
gap: 1,
|
|
@@ -465046,7 +465075,7 @@ function MCPRemoteServerMenu({
|
|
|
465046
465075
|
}, undefined, false, undefined, this)
|
|
465047
465076
|
]
|
|
465048
465077
|
}, undefined, true, undefined, this),
|
|
465049
|
-
|
|
465078
|
+
ainativeAuthUrl && /* @__PURE__ */ jsx_dev_runtime227.jsxDEV(ThemedBox_default, {
|
|
465050
465079
|
flexDirection: "column",
|
|
465051
465080
|
children: [
|
|
465052
465081
|
/* @__PURE__ */ jsx_dev_runtime227.jsxDEV(ThemedBox_default, {
|
|
@@ -465072,7 +465101,7 @@ function MCPRemoteServerMenu({
|
|
|
465072
465101
|
]
|
|
465073
465102
|
}, undefined, true, undefined, this),
|
|
465074
465103
|
/* @__PURE__ */ jsx_dev_runtime227.jsxDEV(Link, {
|
|
465075
|
-
url:
|
|
465104
|
+
url: ainativeAuthUrl
|
|
465076
465105
|
}, undefined, false, undefined, this)
|
|
465077
465106
|
]
|
|
465078
465107
|
}, undefined, true, undefined, this),
|
|
@@ -465119,12 +465148,12 @@ function MCPRemoteServerMenu({
|
|
|
465119
465148
|
server.name
|
|
465120
465149
|
]
|
|
465121
465150
|
}, undefined, true, undefined, this),
|
|
465122
|
-
|
|
465151
|
+
ainativeClearAuthBrowserOpened ? /* @__PURE__ */ jsx_dev_runtime227.jsxDEV(jsx_dev_runtime227.Fragment, {
|
|
465123
465152
|
children: [
|
|
465124
465153
|
/* @__PURE__ */ jsx_dev_runtime227.jsxDEV(ThemedText, {
|
|
465125
465154
|
children: 'Find the MCP server in the browser and click "Disconnect".'
|
|
465126
465155
|
}, undefined, false, undefined, this),
|
|
465127
|
-
|
|
465156
|
+
ainativeClearAuthUrl && /* @__PURE__ */ jsx_dev_runtime227.jsxDEV(ThemedBox_default, {
|
|
465128
465157
|
flexDirection: "column",
|
|
465129
465158
|
children: [
|
|
465130
465159
|
/* @__PURE__ */ jsx_dev_runtime227.jsxDEV(ThemedBox_default, {
|
|
@@ -465150,7 +465179,7 @@ function MCPRemoteServerMenu({
|
|
|
465150
465179
|
]
|
|
465151
465180
|
}, undefined, true, undefined, this),
|
|
465152
465181
|
/* @__PURE__ */ jsx_dev_runtime227.jsxDEV(Link, {
|
|
465153
|
-
url:
|
|
465182
|
+
url: ainativeClearAuthUrl
|
|
465154
465183
|
}, undefined, false, undefined, this)
|
|
465155
465184
|
]
|
|
465156
465185
|
}, undefined, true, undefined, this),
|
|
@@ -465264,16 +465293,16 @@ function MCPRemoteServerMenu({
|
|
|
465264
465293
|
value: "tools"
|
|
465265
465294
|
});
|
|
465266
465295
|
}
|
|
465267
|
-
if (server.config.type === "
|
|
465296
|
+
if (server.config.type === "ainative-proxy") {
|
|
465268
465297
|
if (server.client.type === "connected") {
|
|
465269
465298
|
menuOptions.push({
|
|
465270
465299
|
label: "Clear authentication",
|
|
465271
|
-
value: "
|
|
465300
|
+
value: "ainative-clear-auth"
|
|
465272
465301
|
});
|
|
465273
465302
|
} else if (server.client.type !== "disabled") {
|
|
465274
465303
|
menuOptions.push({
|
|
465275
465304
|
label: "Authenticate",
|
|
465276
|
-
value: "
|
|
465305
|
+
value: "ainative-auth"
|
|
465277
465306
|
});
|
|
465278
465307
|
}
|
|
465279
465308
|
} else {
|
|
@@ -465373,7 +465402,7 @@ function MCPRemoteServerMenu({
|
|
|
465373
465402
|
}, undefined, true, undefined, this)
|
|
465374
465403
|
]
|
|
465375
465404
|
}, undefined, true, undefined, this),
|
|
465376
|
-
server.transport !== "
|
|
465405
|
+
server.transport !== "ainative-proxy" && /* @__PURE__ */ jsx_dev_runtime227.jsxDEV(ThemedBox_default, {
|
|
465377
465406
|
children: [
|
|
465378
465407
|
/* @__PURE__ */ jsx_dev_runtime227.jsxDEV(ThemedText, {
|
|
465379
465408
|
bold: true,
|
|
@@ -465464,18 +465493,18 @@ function MCPRemoteServerMenu({
|
|
|
465464
465493
|
case "clear-auth":
|
|
465465
465494
|
await handleClearAuth();
|
|
465466
465495
|
break;
|
|
465467
|
-
case "
|
|
465496
|
+
case "ainative-auth":
|
|
465468
465497
|
await handleClaudeAIAuth();
|
|
465469
465498
|
break;
|
|
465470
|
-
case "
|
|
465499
|
+
case "ainative-clear-auth":
|
|
465471
465500
|
handleClaudeAIClearAuth();
|
|
465472
465501
|
break;
|
|
465473
465502
|
case "reconnectMcpServer":
|
|
465474
465503
|
setIsReconnecting(true);
|
|
465475
465504
|
try {
|
|
465476
465505
|
const result_1 = await reconnectMcpServer(server.name);
|
|
465477
|
-
if (server.config.type === "
|
|
465478
|
-
logEvent("
|
|
465506
|
+
if (server.config.type === "ainative-proxy") {
|
|
465507
|
+
logEvent("tengu_ainative_mcp_reconnect", {
|
|
465479
465508
|
success: result_1.client.type === "connected"
|
|
465480
465509
|
});
|
|
465481
465510
|
}
|
|
@@ -465484,8 +465513,8 @@ function MCPRemoteServerMenu({
|
|
|
465484
465513
|
} = handleReconnectResult(result_1, server.name);
|
|
465485
465514
|
onComplete?.(message_0);
|
|
465486
465515
|
} catch (err_2) {
|
|
465487
|
-
if (server.config.type === "
|
|
465488
|
-
logEvent("
|
|
465516
|
+
if (server.config.type === "ainative-proxy") {
|
|
465517
|
+
logEvent("tengu_ainative_mcp_reconnect", {
|
|
465489
465518
|
success: false
|
|
465490
465519
|
});
|
|
465491
465520
|
}
|
|
@@ -466404,7 +466433,7 @@ function MCPSettings(t0) {
|
|
|
466404
466433
|
const scope = client_0.config.scope;
|
|
466405
466434
|
const isSSE = client_0.config.type === "sse";
|
|
466406
466435
|
const isHTTP = client_0.config.type === "http";
|
|
466407
|
-
const isClaudeAIProxy = client_0.config.type === "
|
|
466436
|
+
const isClaudeAIProxy = client_0.config.type === "ainative-proxy";
|
|
466408
466437
|
let isAuthenticated = undefined;
|
|
466409
466438
|
if (isSSE || isHTTP) {
|
|
466410
466439
|
const authProvider = new ClaudeAuthProvider(client_0.name, client_0.config);
|
|
@@ -466421,7 +466450,7 @@ function MCPSettings(t0) {
|
|
|
466421
466450
|
if (isClaudeAIProxy) {
|
|
466422
466451
|
return {
|
|
466423
466452
|
...baseInfo,
|
|
466424
|
-
transport: "
|
|
466453
|
+
transport: "ainative-proxy",
|
|
466425
466454
|
isAuthenticated: false,
|
|
466426
466455
|
config: client_0.config
|
|
466427
466456
|
};
|
|
@@ -466544,7 +466573,7 @@ function MCPSettings(t0) {
|
|
|
466544
466573
|
t9 = $3[25];
|
|
466545
466574
|
}
|
|
466546
466575
|
const serverTools_0 = t9;
|
|
466547
|
-
const defaultTab = viewState.server.transport === "
|
|
466576
|
+
const defaultTab = viewState.server.transport === "ainative-proxy" ? "AINative" : "Cody CLI";
|
|
466548
466577
|
if (viewState.server.transport === "stdio") {
|
|
466549
466578
|
let t10;
|
|
466550
466579
|
if ($3[26] !== viewState.server) {
|
|
@@ -474628,12 +474657,12 @@ function ManagePlugins({
|
|
|
474628
474657
|
onComplete: handleMcpComplete,
|
|
474629
474658
|
borderless: true
|
|
474630
474659
|
}, undefined, false, undefined, this);
|
|
474631
|
-
} else if (configType === "
|
|
474660
|
+
} else if (configType === "ainative-proxy") {
|
|
474632
474661
|
const server_2 = {
|
|
474633
474662
|
name: client_3.name,
|
|
474634
474663
|
client: client_3,
|
|
474635
474664
|
scope: scope_5,
|
|
474636
|
-
transport: "
|
|
474665
|
+
transport: "ainative-proxy",
|
|
474637
474666
|
isAuthenticated: undefined,
|
|
474638
474667
|
config: client_3.config
|
|
474639
474668
|
};
|
|
@@ -474685,7 +474714,7 @@ function ManagePlugins({
|
|
|
474685
474714
|
name: client_4.name,
|
|
474686
474715
|
client: client_4,
|
|
474687
474716
|
scope: scope_6,
|
|
474688
|
-
transport: "
|
|
474717
|
+
transport: "ainative-proxy",
|
|
474689
474718
|
isAuthenticated: undefined,
|
|
474690
474719
|
config: client_4.config
|
|
474691
474720
|
};
|
|
@@ -474744,7 +474773,7 @@ function ManagePlugins({
|
|
|
474744
474773
|
name: client_5.name,
|
|
474745
474774
|
client: client_5,
|
|
474746
474775
|
scope: scope_7,
|
|
474747
|
-
transport: "
|
|
474776
|
+
transport: "ainative-proxy",
|
|
474748
474777
|
isAuthenticated: undefined,
|
|
474749
474778
|
config: client_5.config
|
|
474750
474779
|
};
|
|
@@ -481913,7 +481942,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
481913
481942
|
return [];
|
|
481914
481943
|
}
|
|
481915
481944
|
}
|
|
481916
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.
|
|
481945
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.36") {
|
|
481917
481946
|
if (false) {}
|
|
481918
481947
|
const cachedChangelog = await getStoredChangelog();
|
|
481919
481948
|
if (lastSeenVersion !== currentVersion || !cachedChangelog) {
|
|
@@ -481926,7 +481955,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.15")
|
|
|
481926
481955
|
releaseNotes
|
|
481927
481956
|
};
|
|
481928
481957
|
}
|
|
481929
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "0.7.
|
|
481958
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "0.7.36") {
|
|
481930
481959
|
if (false) {}
|
|
481931
481960
|
const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion);
|
|
481932
481961
|
return {
|
|
@@ -483082,7 +483111,7 @@ function getRecentActivitySync() {
|
|
|
483082
483111
|
return cachedActivity;
|
|
483083
483112
|
}
|
|
483084
483113
|
function getLogoDisplayData() {
|
|
483085
|
-
const version6 = process.env.DEMO_VERSION ?? "0.7.
|
|
483114
|
+
const version6 = process.env.DEMO_VERSION ?? "0.7.36";
|
|
483086
483115
|
const serverUrl = getDirectConnectServerUrl();
|
|
483087
483116
|
const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
|
|
483088
483117
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -484502,7 +484531,7 @@ function LogoV2() {
|
|
|
484502
484531
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
484503
484532
|
t2 = () => {
|
|
484504
484533
|
const currentConfig = getGlobalConfig();
|
|
484505
|
-
if (currentConfig.lastReleaseNotesSeen === "0.7.
|
|
484534
|
+
if (currentConfig.lastReleaseNotesSeen === "0.7.36") {
|
|
484506
484535
|
return;
|
|
484507
484536
|
}
|
|
484508
484537
|
saveGlobalConfig(_temp329);
|
|
@@ -485178,12 +485207,12 @@ function LogoV2() {
|
|
|
485178
485207
|
return t41;
|
|
485179
485208
|
}
|
|
485180
485209
|
function _temp329(current) {
|
|
485181
|
-
if (current.lastReleaseNotesSeen === "0.7.
|
|
485210
|
+
if (current.lastReleaseNotesSeen === "0.7.36") {
|
|
485182
485211
|
return current;
|
|
485183
485212
|
}
|
|
485184
485213
|
return {
|
|
485185
485214
|
...current,
|
|
485186
|
-
lastReleaseNotesSeen: "0.7.
|
|
485215
|
+
lastReleaseNotesSeen: "0.7.36"
|
|
485187
485216
|
};
|
|
485188
485217
|
}
|
|
485189
485218
|
function _temp245(s_0) {
|
|
@@ -485808,6 +485837,8 @@ var init_statusNoticeDefinitions = __esm(() => {
|
|
|
485808
485837
|
id: "claude-ai-external-token",
|
|
485809
485838
|
type: "warning",
|
|
485810
485839
|
isActive: () => {
|
|
485840
|
+
if ((process.env.ANTHROPIC_BASE_URL || "").includes("ainative.studio"))
|
|
485841
|
+
return false;
|
|
485811
485842
|
const authTokenInfo = getAuthTokenSource();
|
|
485812
485843
|
return isActiveSubscriber() && (authTokenInfo.source === "ANTHROPIC_AUTH_TOKEN" || authTokenInfo.source === "apiKeyHelper");
|
|
485813
485844
|
},
|
|
@@ -485839,6 +485870,8 @@ var init_statusNoticeDefinitions = __esm(() => {
|
|
|
485839
485870
|
id: "api-key-conflict",
|
|
485840
485871
|
type: "warning",
|
|
485841
485872
|
isActive: () => {
|
|
485873
|
+
if ((process.env.ANTHROPIC_BASE_URL || "").includes("ainative.studio"))
|
|
485874
|
+
return false;
|
|
485842
485875
|
const {
|
|
485843
485876
|
source: apiKeySource
|
|
485844
485877
|
} = getAnthropicApiKeyWithSource({
|
|
@@ -485878,6 +485911,8 @@ var init_statusNoticeDefinitions = __esm(() => {
|
|
|
485878
485911
|
id: "both-auth-methods",
|
|
485879
485912
|
type: "warning",
|
|
485880
485913
|
isActive: () => {
|
|
485914
|
+
if ((process.env.ANTHROPIC_BASE_URL || "").includes("ainative.studio"))
|
|
485915
|
+
return false;
|
|
485881
485916
|
const {
|
|
485882
485917
|
source: apiKeySource
|
|
485883
485918
|
} = getAnthropicApiKeyWithSource({
|
|
@@ -508880,62 +508915,8 @@ var init_DescriptionStep = __esm(() => {
|
|
|
508880
508915
|
});
|
|
508881
508916
|
|
|
508882
508917
|
// src/components/agents/generateAgent.ts
|
|
508883
|
-
async function generateAgentViaChatCompletions(userPrompt, systemPromptText, existingIdentifiers) {
|
|
508884
|
-
const baseUrl = process.env.ANTHROPIC_BASE_URL || "https://api.ainative.studio";
|
|
508885
|
-
const apiKey = process.env.AINATIVE_API_KEY || process.env.ANTHROPIC_API_KEY || "";
|
|
508886
|
-
const existingList = existingIdentifiers.length > 0 ? `
|
|
508887
|
-
|
|
508888
|
-
IMPORTANT: The following identifiers already exist and must NOT be used: ${existingIdentifiers.join(", ")}` : "";
|
|
508889
|
-
const resp = await fetch(`${baseUrl}/api/v1/chat/completions`, {
|
|
508890
|
-
method: "POST",
|
|
508891
|
-
headers: {
|
|
508892
|
-
"Content-Type": "application/json",
|
|
508893
|
-
"x-api-key": apiKey
|
|
508894
|
-
},
|
|
508895
|
-
body: JSON.stringify({
|
|
508896
|
-
model: "claude-sonnet-4-5",
|
|
508897
|
-
max_tokens: 4096,
|
|
508898
|
-
messages: [
|
|
508899
|
-
{ role: "system", content: systemPromptText },
|
|
508900
|
-
{
|
|
508901
|
-
role: "user",
|
|
508902
|
-
content: `Create an agent configuration based on this request: "${userPrompt}".${existingList}
|
|
508903
|
-
Return ONLY the JSON object, no other text.`
|
|
508904
|
-
}
|
|
508905
|
-
]
|
|
508906
|
-
})
|
|
508907
|
-
});
|
|
508908
|
-
if (!resp.ok) {
|
|
508909
|
-
throw new Error(`Chat completions error: ${resp.status}`);
|
|
508910
|
-
}
|
|
508911
|
-
const data = await resp.json();
|
|
508912
|
-
const content = data.choices?.[0]?.message?.content;
|
|
508913
|
-
const text2 = Array.isArray(content) ? content.join("") : String(content ?? "");
|
|
508914
|
-
let parsed;
|
|
508915
|
-
try {
|
|
508916
|
-
parsed = jsonParse(text2.trim());
|
|
508917
|
-
} catch {
|
|
508918
|
-
const jsonMatch = text2.match(/\{[\s\S]*\}/);
|
|
508919
|
-
if (!jsonMatch)
|
|
508920
|
-
throw new Error("No JSON object found in response");
|
|
508921
|
-
parsed = jsonParse(jsonMatch[0]);
|
|
508922
|
-
}
|
|
508923
|
-
if (!parsed.identifier || !parsed.whenToUse || !parsed.systemPrompt) {
|
|
508924
|
-
throw new Error("Invalid agent configuration generated");
|
|
508925
|
-
}
|
|
508926
|
-
return parsed;
|
|
508927
|
-
}
|
|
508928
508918
|
async function generateAgent(userPrompt, model, existingIdentifiers, abortSignal) {
|
|
508929
508919
|
const systemPromptText = isAutoMemoryEnabled() ? AGENT_CREATION_SYSTEM_PROMPT + AGENT_MEMORY_INSTRUCTIONS : AGENT_CREATION_SYSTEM_PROMPT;
|
|
508930
|
-
if (isAINativeProvider()) {
|
|
508931
|
-
try {
|
|
508932
|
-
const result = await generateAgentViaChatCompletions(userPrompt, systemPromptText, existingIdentifiers);
|
|
508933
|
-
logEvent("tengu_agent_definition_generated", {
|
|
508934
|
-
agent_identifier: result.identifier
|
|
508935
|
-
});
|
|
508936
|
-
return result;
|
|
508937
|
-
} catch {}
|
|
508938
|
-
}
|
|
508939
508920
|
const existingList = existingIdentifiers.length > 0 ? `
|
|
508940
508921
|
|
|
508941
508922
|
IMPORTANT: The following identifiers already exist and must NOT be used: ${existingIdentifiers.join(", ")}` : "";
|
|
@@ -508975,7 +508956,11 @@ IMPORTANT: The following identifiers already exist and must NOT be used: ${exist
|
|
|
508975
508956
|
parsed = jsonParse(jsonMatch[0]);
|
|
508976
508957
|
}
|
|
508977
508958
|
if (!parsed.identifier || !parsed.whenToUse || !parsed.systemPrompt) {
|
|
508978
|
-
throw new Error(
|
|
508959
|
+
throw new Error(`Invalid agent configuration generated. Missing fields: ${[
|
|
508960
|
+
!parsed.identifier && "identifier",
|
|
508961
|
+
!parsed.whenToUse && "whenToUse",
|
|
508962
|
+
!parsed.systemPrompt && "systemPrompt"
|
|
508963
|
+
].filter(Boolean).join(", ")}. Response: ${responseText.slice(0, 500)}`);
|
|
508979
508964
|
}
|
|
508980
508965
|
logEvent("tengu_agent_definition_generated", {
|
|
508981
508966
|
agent_identifier: parsed.identifier
|
|
@@ -509014,7 +508999,6 @@ var init_generateAgent = __esm(() => {
|
|
|
509014
508999
|
init_constants3();
|
|
509015
509000
|
init_api3();
|
|
509016
509001
|
init_messages3();
|
|
509017
|
-
init_model();
|
|
509018
509002
|
init_paths();
|
|
509019
509003
|
init_analytics();
|
|
509020
509004
|
init_slowOperations();
|
|
@@ -511521,7 +511505,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
511521
511505
|
smapsRollup,
|
|
511522
511506
|
platform: process.platform,
|
|
511523
511507
|
nodeVersion: process.version,
|
|
511524
|
-
ccVersion: "0.7.
|
|
511508
|
+
ccVersion: "0.7.36"
|
|
511525
511509
|
};
|
|
511526
511510
|
}
|
|
511527
511511
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -512049,7 +512033,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
512049
512033
|
var call56 = async () => {
|
|
512050
512034
|
return {
|
|
512051
512035
|
type: "text",
|
|
512052
|
-
value: `${"0.7.
|
|
512036
|
+
value: `${"0.7.36"} (built ${"1777670728"})`
|
|
512053
512037
|
};
|
|
512054
512038
|
}, version6, version_default;
|
|
512055
512039
|
var init_version = __esm(() => {
|
|
@@ -516403,7 +516387,7 @@ var init_statusline = __esm(() => {
|
|
|
516403
516387
|
aliases: [],
|
|
516404
516388
|
name: "statusline",
|
|
516405
516389
|
progressMessage: "setting up statusLine",
|
|
516406
|
-
allowedTools: [AGENT_TOOL_NAME, "Read(~/**)", "Edit(~/.
|
|
516390
|
+
allowedTools: [AGENT_TOOL_NAME, "Read(~/**)", "Edit(~/.cody/settings.json)", "Edit(~/.cody/statusline-command.sh)", "Write(~/.cody/statusline-command.sh)"],
|
|
516407
516391
|
source: "builtin",
|
|
516408
516392
|
disableNonInteractive: true,
|
|
516409
516393
|
async getPromptForCommand(args) {
|
|
@@ -520996,7 +520980,7 @@ function generateHtmlReport(data, insights) {
|
|
|
520996
520980
|
</html>`;
|
|
520997
520981
|
}
|
|
520998
520982
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
520999
|
-
const version7 = typeof MACRO !== "undefined" ? "0.7.
|
|
520983
|
+
const version7 = typeof MACRO !== "undefined" ? "0.7.36" : "unknown";
|
|
521000
520984
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
521001
520985
|
const facets_summary = {
|
|
521002
520986
|
total: facets.size,
|
|
@@ -524942,7 +524926,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
524942
524926
|
init_settings2();
|
|
524943
524927
|
init_slowOperations();
|
|
524944
524928
|
init_uuid();
|
|
524945
|
-
VERSION5 = typeof MACRO !== "undefined" ? "0.7.
|
|
524929
|
+
VERSION5 = typeof MACRO !== "undefined" ? "0.7.36" : "unknown";
|
|
524946
524930
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
524947
524931
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
524948
524932
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -526147,7 +526131,7 @@ var init_filesystem = __esm(() => {
|
|
|
526147
526131
|
});
|
|
526148
526132
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
526149
526133
|
const nonce = randomBytes19(16).toString("hex");
|
|
526150
|
-
return join132(getClaudeTempDir(), "bundled-skills", "0.7.
|
|
526134
|
+
return join132(getClaudeTempDir(), "bundled-skills", "0.7.36", nonce);
|
|
526151
526135
|
});
|
|
526152
526136
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
526153
526137
|
});
|
|
@@ -532119,7 +532103,7 @@ function computeFingerprint(messageText, version7) {
|
|
|
532119
532103
|
}
|
|
532120
532104
|
function computeFingerprintFromMessages(messages) {
|
|
532121
532105
|
const firstMessageText = extractFirstMessageText(messages);
|
|
532122
|
-
return computeFingerprint(firstMessageText, "0.7.
|
|
532106
|
+
return computeFingerprint(firstMessageText, "0.7.36");
|
|
532123
532107
|
}
|
|
532124
532108
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
532125
532109
|
var init_fingerprint = () => {};
|
|
@@ -532615,7 +532599,20 @@ function stripExcessMediaItems(messages, limit) {
|
|
|
532615
532599
|
}
|
|
532616
532600
|
async function* ainativeBypass(messages, systemPrompt, model, toolSchemas, signal) {
|
|
532617
532601
|
const baseUrl = getBaseURLForModel(model);
|
|
532618
|
-
|
|
532602
|
+
let authHeaders;
|
|
532603
|
+
let apiKey = null;
|
|
532604
|
+
try {
|
|
532605
|
+
apiKey = getApiKeyForModel(model);
|
|
532606
|
+
} catch {}
|
|
532607
|
+
if (apiKey) {
|
|
532608
|
+
authHeaders = { "x-api-key": apiKey };
|
|
532609
|
+
} else {
|
|
532610
|
+
const oauthToken = getClaudeAIOAuthTokens()?.accessToken;
|
|
532611
|
+
if (!oauthToken) {
|
|
532612
|
+
throw new Error("No API key or OAuth token found. Log in with `cody login`.");
|
|
532613
|
+
}
|
|
532614
|
+
authHeaders = { Authorization: `Bearer ${oauthToken}` };
|
|
532615
|
+
}
|
|
532619
532616
|
const chatMessages = [];
|
|
532620
532617
|
const sysText = systemPrompt.join(`
|
|
532621
532618
|
`);
|
|
@@ -532708,7 +532705,7 @@ async function* ainativeBypass(messages, systemPrompt, model, toolSchemas, signa
|
|
|
532708
532705
|
method: "POST",
|
|
532709
532706
|
headers: {
|
|
532710
532707
|
"Content-Type": "application/json",
|
|
532711
|
-
|
|
532708
|
+
...authHeaders,
|
|
532712
532709
|
"anthropic-version": "2023-06-01"
|
|
532713
532710
|
},
|
|
532714
532711
|
body: JSON.stringify(anthropicBody),
|
|
@@ -534168,7 +534165,7 @@ async function sideQuery(opts) {
|
|
|
534168
534165
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
534169
534166
|
}
|
|
534170
534167
|
const messageText = extractFirstUserMessageText(messages);
|
|
534171
|
-
const fingerprint = computeFingerprint(messageText, "0.7.
|
|
534168
|
+
const fingerprint = computeFingerprint(messageText, "0.7.36");
|
|
534172
534169
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
534173
534170
|
const systemBlocks = [
|
|
534174
534171
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -538750,7 +538747,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
538750
538747
|
slash_commands: inputs.commands.filter((c6) => c6.userInvocable !== false).map((c6) => c6.name),
|
|
538751
538748
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
538752
538749
|
betas: getSdkBetas(),
|
|
538753
|
-
claude_code_version: "0.7.
|
|
538750
|
+
claude_code_version: "0.7.36",
|
|
538754
538751
|
output_style: outputStyle2,
|
|
538755
538752
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
538756
538753
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -553302,7 +553299,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
553302
553299
|
function getSemverPart(version7) {
|
|
553303
553300
|
return `${import_semver13.major(version7, { loose: true })}.${import_semver13.minor(version7, { loose: true })}.${import_semver13.patch(version7, { loose: true })}`;
|
|
553304
553301
|
}
|
|
553305
|
-
function useUpdateNotification(updatedVersion, initialVersion = "0.7.
|
|
553302
|
+
function useUpdateNotification(updatedVersion, initialVersion = "0.7.36") {
|
|
553306
553303
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react226.useState(() => getSemverPart(initialVersion));
|
|
553307
553304
|
if (!updatedVersion) {
|
|
553308
553305
|
return null;
|
|
@@ -553342,7 +553339,7 @@ function AutoUpdater({
|
|
|
553342
553339
|
return;
|
|
553343
553340
|
}
|
|
553344
553341
|
if (false) {}
|
|
553345
|
-
const currentVersion = "0.7.
|
|
553342
|
+
const currentVersion = "0.7.36";
|
|
553346
553343
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
553347
553344
|
let latestVersion = await getLatestVersion(channel);
|
|
553348
553345
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -553555,12 +553552,12 @@ function NativeAutoUpdater({
|
|
|
553555
553552
|
logEvent("tengu_native_auto_updater_start", {});
|
|
553556
553553
|
try {
|
|
553557
553554
|
const maxVersion = await getMaxVersion();
|
|
553558
|
-
if (maxVersion && gt("0.7.
|
|
553555
|
+
if (maxVersion && gt("0.7.36", maxVersion)) {
|
|
553559
553556
|
const msg = await getMaxVersionMessage();
|
|
553560
553557
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
553561
553558
|
}
|
|
553562
553559
|
const result = await installLatest(channel);
|
|
553563
|
-
const currentVersion = "0.7.
|
|
553560
|
+
const currentVersion = "0.7.36";
|
|
553564
553561
|
const latencyMs = Date.now() - startTime;
|
|
553565
553562
|
if (result.lockFailed) {
|
|
553566
553563
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -553697,17 +553694,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
553697
553694
|
const maxVersion = await getMaxVersion();
|
|
553698
553695
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
553699
553696
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
553700
|
-
if (gte("0.7.
|
|
553701
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"0.7.
|
|
553697
|
+
if (gte("0.7.36", maxVersion)) {
|
|
553698
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"0.7.36"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
553702
553699
|
setUpdateAvailable(false);
|
|
553703
553700
|
return;
|
|
553704
553701
|
}
|
|
553705
553702
|
latest = maxVersion;
|
|
553706
553703
|
}
|
|
553707
|
-
const hasUpdate = latest && !gte("0.7.
|
|
553704
|
+
const hasUpdate = latest && !gte("0.7.36", latest) && !shouldSkipVersion(latest);
|
|
553708
553705
|
setUpdateAvailable(!!hasUpdate);
|
|
553709
553706
|
if (hasUpdate) {
|
|
553710
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.7.
|
|
553707
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.7.36"} -> ${latest}`);
|
|
553711
553708
|
}
|
|
553712
553709
|
};
|
|
553713
553710
|
$3[0] = t1;
|
|
@@ -553741,7 +553738,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
553741
553738
|
wrap: "truncate",
|
|
553742
553739
|
children: [
|
|
553743
553740
|
"currentVersion: ",
|
|
553744
|
-
"0.7.
|
|
553741
|
+
"0.7.36"
|
|
553745
553742
|
]
|
|
553746
553743
|
}, undefined, true, undefined, this);
|
|
553747
553744
|
$3[3] = verbose;
|
|
@@ -561851,7 +561848,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
561851
561848
|
project_dir: getOriginalCwd(),
|
|
561852
561849
|
added_dirs: addedDirs
|
|
561853
561850
|
},
|
|
561854
|
-
version: "0.7.
|
|
561851
|
+
version: "0.7.36",
|
|
561855
561852
|
output_style: {
|
|
561856
561853
|
name: outputStyleName
|
|
561857
561854
|
},
|
|
@@ -573239,7 +573236,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
573239
573236
|
} catch {}
|
|
573240
573237
|
const data = {
|
|
573241
573238
|
trigger,
|
|
573242
|
-
version: "0.7.
|
|
573239
|
+
version: "0.7.36",
|
|
573243
573240
|
platform: process.platform,
|
|
573244
573241
|
transcript,
|
|
573245
573242
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -577001,7 +576998,7 @@ function useMcpConnectivityStatus(t0) {
|
|
|
577001
576998
|
}
|
|
577002
576999
|
if (failedClaudeAiClients.length > 0) {
|
|
577003
577000
|
addNotification({
|
|
577004
|
-
key: "mcp-
|
|
577001
|
+
key: "mcp-ainative-failed",
|
|
577005
577002
|
jsx: /* @__PURE__ */ jsx_dev_runtime452.jsxDEV(jsx_dev_runtime452.Fragment, {
|
|
577006
577003
|
children: [
|
|
577007
577004
|
/* @__PURE__ */ jsx_dev_runtime452.jsxDEV(ThemedText, {
|
|
@@ -577051,7 +577048,7 @@ function useMcpConnectivityStatus(t0) {
|
|
|
577051
577048
|
}
|
|
577052
577049
|
if (needsAuthClaudeAiServers.length > 0) {
|
|
577053
577050
|
addNotification({
|
|
577054
|
-
key: "mcp-
|
|
577051
|
+
key: "mcp-ainative-needs-auth",
|
|
577055
577052
|
jsx: /* @__PURE__ */ jsx_dev_runtime452.jsxDEV(jsx_dev_runtime452.Fragment, {
|
|
577056
577053
|
children: [
|
|
577057
577054
|
/* @__PURE__ */ jsx_dev_runtime452.jsxDEV(ThemedText, {
|
|
@@ -577087,23 +577084,23 @@ function useMcpConnectivityStatus(t0) {
|
|
|
577087
577084
|
import_react301.useEffect(t2, t3);
|
|
577088
577085
|
}
|
|
577089
577086
|
function _temp442(client_2) {
|
|
577090
|
-
return client_2.type === "needs-auth" && client_2.config.type === "
|
|
577087
|
+
return client_2.type === "needs-auth" && client_2.config.type === "ainative-proxy" && hasAINativeMcpEverConnected(client_2.name);
|
|
577091
577088
|
}
|
|
577092
577089
|
function _temp355(client_1) {
|
|
577093
|
-
return client_1.type === "needs-auth" && client_1.config.type !== "
|
|
577090
|
+
return client_1.type === "needs-auth" && client_1.config.type !== "ainative-proxy";
|
|
577094
577091
|
}
|
|
577095
577092
|
function _temp287(client_0) {
|
|
577096
|
-
return client_0.type === "failed" && client_0.config.type === "
|
|
577093
|
+
return client_0.type === "failed" && client_0.config.type === "ainative-proxy" && hasAINativeMcpEverConnected(client_0.name);
|
|
577097
577094
|
}
|
|
577098
577095
|
function _temp208(client4) {
|
|
577099
|
-
return client4.type === "failed" && client4.config.type !== "sse-ide" && client4.config.type !== "ws-ide" && client4.config.type !== "
|
|
577096
|
+
return client4.type === "failed" && client4.config.type !== "sse-ide" && client4.config.type !== "ws-ide" && client4.config.type !== "ainative-proxy";
|
|
577100
577097
|
}
|
|
577101
577098
|
var import_compiler_runtime351, import_react301, jsx_dev_runtime452, EMPTY_MCP_CLIENTS;
|
|
577102
577099
|
var init_useMcpConnectivityStatus = __esm(() => {
|
|
577103
577100
|
init_notifications();
|
|
577104
577101
|
init_state();
|
|
577105
577102
|
init_ink2();
|
|
577106
|
-
|
|
577103
|
+
init_ainative();
|
|
577107
577104
|
import_compiler_runtime351 = __toESM(require_compiler_runtime(), 1);
|
|
577108
577105
|
import_react301 = __toESM(require_react(), 1);
|
|
577109
577106
|
jsx_dev_runtime452 = __toESM(require_jsx_dev_runtime(), 1);
|
|
@@ -585256,7 +585253,7 @@ function WelcomeV2() {
|
|
|
585256
585253
|
dimColor: true,
|
|
585257
585254
|
children: [
|
|
585258
585255
|
"v",
|
|
585259
|
-
"0.7.
|
|
585256
|
+
"0.7.36",
|
|
585260
585257
|
" "
|
|
585261
585258
|
]
|
|
585262
585259
|
}, undefined, true, undefined, this)
|
|
@@ -586557,7 +586554,7 @@ function completeOnboarding() {
|
|
|
586557
586554
|
saveGlobalConfig((current) => ({
|
|
586558
586555
|
...current,
|
|
586559
586556
|
hasCompletedOnboarding: true,
|
|
586560
|
-
lastOnboardingVersion: "0.7.
|
|
586557
|
+
lastOnboardingVersion: "0.7.36"
|
|
586561
586558
|
}));
|
|
586562
586559
|
}
|
|
586563
586560
|
function showDialog(root2, renderer) {
|
|
@@ -591035,7 +591032,7 @@ function appendToLog(path28, message) {
|
|
|
591035
591032
|
cwd: getFsImplementation().cwd(),
|
|
591036
591033
|
userType: "external",
|
|
591037
591034
|
sessionId: getSessionId(),
|
|
591038
|
-
version: "0.7.
|
|
591035
|
+
version: "0.7.36"
|
|
591039
591036
|
};
|
|
591040
591037
|
getLogWriter(path28).write(messageWithTimestamp);
|
|
591041
591038
|
}
|
|
@@ -594994,8 +594991,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
594994
594991
|
}
|
|
594995
594992
|
async function checkEnvLessBridgeMinVersion() {
|
|
594996
594993
|
const cfg = await getEnvLessBridgeConfig();
|
|
594997
|
-
if (cfg.min_version && lt("0.7.
|
|
594998
|
-
return `Your version of Cody CLI (${"0.7.
|
|
594994
|
+
if (cfg.min_version && lt("0.7.36", cfg.min_version)) {
|
|
594995
|
+
return `Your version of Cody CLI (${"0.7.36"}) is too old for Remote Control.
|
|
594999
594996
|
Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
|
|
595000
594997
|
}
|
|
595001
594998
|
return null;
|
|
@@ -595469,7 +595466,7 @@ async function initBridgeCore(params) {
|
|
|
595469
595466
|
const rawApi = createBridgeApiClient({
|
|
595470
595467
|
baseUrl,
|
|
595471
595468
|
getAccessToken,
|
|
595472
|
-
runnerVersion: "0.7.
|
|
595469
|
+
runnerVersion: "0.7.36",
|
|
595473
595470
|
onDebug: logForDebugging,
|
|
595474
595471
|
onAuth401,
|
|
595475
595472
|
getTrustedDeviceToken
|
|
@@ -597931,9 +597928,9 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
|
|
|
597931
597928
|
headers: connection.config.headers,
|
|
597932
597929
|
oauth: connection.config.oauth
|
|
597933
597930
|
};
|
|
597934
|
-
} else if (connection.config.type === "
|
|
597931
|
+
} else if (connection.config.type === "ainative-proxy") {
|
|
597935
597932
|
config4 = {
|
|
597936
|
-
type: "
|
|
597933
|
+
type: "ainative-proxy",
|
|
597937
597934
|
url: connection.config.url,
|
|
597938
597935
|
id: connection.config.id
|
|
597939
597936
|
};
|
|
@@ -601106,7 +601103,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
|
|
|
601106
601103
|
setCwd(cwd3);
|
|
601107
601104
|
const server = new Server({
|
|
601108
601105
|
name: "claude/tengu",
|
|
601109
|
-
version: "0.7.
|
|
601106
|
+
version: "0.7.36"
|
|
601110
601107
|
}, {
|
|
601111
601108
|
capabilities: {
|
|
601112
601109
|
tools: {}
|
|
@@ -601472,7 +601469,7 @@ async function mcpListHandler() {
|
|
|
601472
601469
|
console.log(`${name3}: ${server.url} (SSE) - ${status2}`);
|
|
601473
601470
|
} else if (server.type === "http") {
|
|
601474
601471
|
console.log(`${name3}: ${server.url} (HTTP) - ${status2}`);
|
|
601475
|
-
} else if (server.type === "
|
|
601472
|
+
} else if (server.type === "ainative-proxy") {
|
|
601476
601473
|
console.log(`${name3}: ${server.url} - ${status2}`);
|
|
601477
601474
|
} else if (!server.type || server.type === "stdio") {
|
|
601478
601475
|
const args = Array.isArray(server.args) ? server.args : [];
|
|
@@ -602717,7 +602714,7 @@ __export(exports_update, {
|
|
|
602717
602714
|
});
|
|
602718
602715
|
async function update() {
|
|
602719
602716
|
logEvent("tengu_update_check", {});
|
|
602720
|
-
writeToStdout(`Current version: ${"0.7.
|
|
602717
|
+
writeToStdout(`Current version: ${"0.7.36"}
|
|
602721
602718
|
`);
|
|
602722
602719
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
602723
602720
|
writeToStdout(`Checking for updates to ${channel} version...
|
|
@@ -602792,8 +602789,8 @@ async function update() {
|
|
|
602792
602789
|
writeToStdout(`Cody CLI is managed by Homebrew.
|
|
602793
602790
|
`);
|
|
602794
602791
|
const latest = await getLatestVersion(channel);
|
|
602795
|
-
if (latest && !gte("0.7.
|
|
602796
|
-
writeToStdout(`Update available: ${"0.7.
|
|
602792
|
+
if (latest && !gte("0.7.36", latest)) {
|
|
602793
|
+
writeToStdout(`Update available: ${"0.7.36"} → ${latest}
|
|
602797
602794
|
`);
|
|
602798
602795
|
writeToStdout(`
|
|
602799
602796
|
`);
|
|
@@ -602809,8 +602806,8 @@ async function update() {
|
|
|
602809
602806
|
writeToStdout(`Cody CLI is managed by winget.
|
|
602810
602807
|
`);
|
|
602811
602808
|
const latest = await getLatestVersion(channel);
|
|
602812
|
-
if (latest && !gte("0.7.
|
|
602813
|
-
writeToStdout(`Update available: ${"0.7.
|
|
602809
|
+
if (latest && !gte("0.7.36", latest)) {
|
|
602810
|
+
writeToStdout(`Update available: ${"0.7.36"} → ${latest}
|
|
602814
602811
|
`);
|
|
602815
602812
|
writeToStdout(`
|
|
602816
602813
|
`);
|
|
@@ -602826,8 +602823,8 @@ async function update() {
|
|
|
602826
602823
|
writeToStdout(`Cody CLI is managed by apk.
|
|
602827
602824
|
`);
|
|
602828
602825
|
const latest = await getLatestVersion(channel);
|
|
602829
|
-
if (latest && !gte("0.7.
|
|
602830
|
-
writeToStdout(`Update available: ${"0.7.
|
|
602826
|
+
if (latest && !gte("0.7.36", latest)) {
|
|
602827
|
+
writeToStdout(`Update available: ${"0.7.36"} → ${latest}
|
|
602831
602828
|
`);
|
|
602832
602829
|
writeToStdout(`
|
|
602833
602830
|
`);
|
|
@@ -602892,11 +602889,11 @@ async function update() {
|
|
|
602892
602889
|
`);
|
|
602893
602890
|
await gracefulShutdown(1);
|
|
602894
602891
|
}
|
|
602895
|
-
if (result.latestVersion === "0.7.
|
|
602896
|
-
writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.
|
|
602892
|
+
if (result.latestVersion === "0.7.36") {
|
|
602893
|
+
writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.36"})`) + `
|
|
602897
602894
|
`);
|
|
602898
602895
|
} else {
|
|
602899
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.7.
|
|
602896
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.7.36"} to version ${result.latestVersion}`) + `
|
|
602900
602897
|
`);
|
|
602901
602898
|
await regenerateCompletionCache();
|
|
602902
602899
|
}
|
|
@@ -602956,12 +602953,12 @@ async function update() {
|
|
|
602956
602953
|
`);
|
|
602957
602954
|
await gracefulShutdown(1);
|
|
602958
602955
|
}
|
|
602959
|
-
if (latestVersion === "0.7.
|
|
602960
|
-
writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.
|
|
602956
|
+
if (latestVersion === "0.7.36") {
|
|
602957
|
+
writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.36"})`) + `
|
|
602961
602958
|
`);
|
|
602962
602959
|
await gracefulShutdown(0);
|
|
602963
602960
|
}
|
|
602964
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.
|
|
602961
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.36"})
|
|
602965
602962
|
`);
|
|
602966
602963
|
writeToStdout(`Installing update...
|
|
602967
602964
|
`);
|
|
@@ -603006,7 +603003,7 @@ async function update() {
|
|
|
603006
603003
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
603007
603004
|
switch (status2) {
|
|
603008
603005
|
case "success":
|
|
603009
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.7.
|
|
603006
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.7.36"} to version ${latestVersion}`) + `
|
|
603010
603007
|
`);
|
|
603011
603008
|
await regenerateCompletionCache();
|
|
603012
603009
|
break;
|
|
@@ -603852,7 +603849,7 @@ ${hint}` : hint;
|
|
|
603852
603849
|
console.error(warning);
|
|
603853
603850
|
});
|
|
603854
603851
|
assertMinVersion();
|
|
603855
|
-
const
|
|
603852
|
+
const ainativeConfigPromise = isNonInteractiveSession && !strictMcpConfig && !doesEnterpriseMcpConfigExist() && !isBareMode() && process.env.CODY_CLI !== "1" ? fetchAINativeMcpConfigsIfEligible().then((configs) => {
|
|
603856
603853
|
const {
|
|
603857
603854
|
allowed,
|
|
603858
603855
|
blocked
|
|
@@ -604194,19 +604191,19 @@ ${customInstructions}` : customInstructions;
|
|
|
604194
604191
|
tools: [],
|
|
604195
604192
|
commands: []
|
|
604196
604193
|
}) : prefetchAllMcpResources(regularMcpConfigs);
|
|
604197
|
-
const
|
|
604194
|
+
const ainativeMcpPromise = isNonInteractiveSession ? Promise.resolve({
|
|
604198
604195
|
clients: [],
|
|
604199
604196
|
tools: [],
|
|
604200
604197
|
commands: []
|
|
604201
|
-
}) :
|
|
604198
|
+
}) : ainativeConfigPromise.then((configs) => Object.keys(configs).length > 0 ? prefetchAllMcpResources(configs) : {
|
|
604202
604199
|
clients: [],
|
|
604203
604200
|
tools: [],
|
|
604204
604201
|
commands: []
|
|
604205
604202
|
});
|
|
604206
|
-
const mcpPromise = Promise.all([localMcpPromise,
|
|
604207
|
-
clients: [...local.clients, ...
|
|
604208
|
-
tools: uniqBy_default([...local.tools, ...
|
|
604209
|
-
commands: uniqBy_default([...local.commands, ...
|
|
604203
|
+
const mcpPromise = Promise.all([localMcpPromise, ainativeMcpPromise]).then(([local, ainative]) => ({
|
|
604204
|
+
clients: [...local.clients, ...ainative.clients],
|
|
604205
|
+
tools: uniqBy_default([...local.tools, ...ainative.tools], "name"),
|
|
604206
|
+
commands: uniqBy_default([...local.commands, ...ainative.commands], "name")
|
|
604210
604207
|
}));
|
|
604211
604208
|
const hooksPromise = initOnly || init2 || maintenance || isNonInteractiveSession || options.continue || options.resume ? null : processSessionStartHooks("startup", {
|
|
604212
604209
|
agentType: mainThreadAgentDefinition?.agentType,
|
|
@@ -604251,7 +604248,7 @@ ${customInstructions}` : customInstructions;
|
|
|
604251
604248
|
}
|
|
604252
604249
|
}
|
|
604253
604250
|
logForDiagnosticsNoPII("info", "started", {
|
|
604254
|
-
version: "0.7.
|
|
604251
|
+
version: "0.7.36",
|
|
604255
604252
|
is_native_binary: isInBundledMode()
|
|
604256
604253
|
});
|
|
604257
604254
|
registerCleanup(async () => {
|
|
@@ -604398,21 +604395,21 @@ ${customInstructions}` : customInstructions;
|
|
|
604398
604395
|
profileCheckpoint("before_connectMcp");
|
|
604399
604396
|
await connectMcpBatch(regularMcpConfigs, "regular");
|
|
604400
604397
|
profileCheckpoint("after_connectMcp");
|
|
604401
|
-
const
|
|
604402
|
-
const
|
|
604403
|
-
if (Object.keys(
|
|
604404
|
-
const
|
|
604405
|
-
for (const config4 of Object.values(
|
|
604398
|
+
const AINATIVE_MCP_TIMEOUT_MS = 5000;
|
|
604399
|
+
const ainativeConnect = ainativeConfigPromise.then((ainativeConfigs) => {
|
|
604400
|
+
if (Object.keys(ainativeConfigs).length > 0) {
|
|
604401
|
+
const ainativeSigs = new Set;
|
|
604402
|
+
for (const config4 of Object.values(ainativeConfigs)) {
|
|
604406
604403
|
const sig = getMcpServerSignature(config4);
|
|
604407
604404
|
if (sig)
|
|
604408
|
-
|
|
604405
|
+
ainativeSigs.add(sig);
|
|
604409
604406
|
}
|
|
604410
604407
|
const suppressed = new Set;
|
|
604411
604408
|
for (const [name3, config4] of Object.entries(regularMcpConfigs)) {
|
|
604412
604409
|
if (!name3.startsWith("plugin:"))
|
|
604413
604410
|
continue;
|
|
604414
604411
|
const sig = getMcpServerSignature(config4);
|
|
604415
|
-
if (sig &&
|
|
604412
|
+
if (sig && ainativeSigs.has(sig))
|
|
604416
604413
|
suppressed.add(name3);
|
|
604417
604414
|
}
|
|
604418
604415
|
if (suppressed.size > 0) {
|
|
@@ -604451,20 +604448,20 @@ ${customInstructions}` : customInstructions;
|
|
|
604451
604448
|
}
|
|
604452
604449
|
const nonPluginConfigs = pickBy_default(regularMcpConfigs, (_2, n3) => !n3.startsWith("plugin:"));
|
|
604453
604450
|
const {
|
|
604454
|
-
servers:
|
|
604455
|
-
} =
|
|
604456
|
-
return connectMcpBatch(
|
|
604451
|
+
servers: dedupedAINative
|
|
604452
|
+
} = dedupAINativeMcpServers(ainativeConfigs, nonPluginConfigs);
|
|
604453
|
+
return connectMcpBatch(dedupedAINative, "ainative");
|
|
604457
604454
|
});
|
|
604458
|
-
let
|
|
604459
|
-
const
|
|
604460
|
-
|
|
604455
|
+
let ainativeTimer;
|
|
604456
|
+
const ainativeTimedOut = await Promise.race([ainativeConnect.then(() => false), new Promise((resolve43) => {
|
|
604457
|
+
ainativeTimer = setTimeout((r) => r(true), AINATIVE_MCP_TIMEOUT_MS, resolve43);
|
|
604461
604458
|
})]);
|
|
604462
|
-
if (
|
|
604463
|
-
clearTimeout(
|
|
604464
|
-
if (
|
|
604465
|
-
logForDebugging(`[MCP] claude.ai connectors not ready after ${
|
|
604459
|
+
if (ainativeTimer)
|
|
604460
|
+
clearTimeout(ainativeTimer);
|
|
604461
|
+
if (ainativeTimedOut) {
|
|
604462
|
+
logForDebugging(`[MCP] claude.ai connectors not ready after ${AINATIVE_MCP_TIMEOUT_MS}ms — proceeding; background connection continues`);
|
|
604466
604463
|
}
|
|
604467
|
-
profileCheckpoint("
|
|
604464
|
+
profileCheckpoint("after_connectMcp_ainative");
|
|
604468
604465
|
if (!isBareMode()) {
|
|
604469
604466
|
startDeferredPrefetches();
|
|
604470
604467
|
Promise.resolve().then(() => (init_backgroundHousekeeping(), exports_backgroundHousekeeping)).then((m2) => m2.startBackgroundHousekeeping());
|
|
@@ -604545,6 +604542,15 @@ ${customInstructions}` : customInstructions;
|
|
|
604545
604542
|
priority: "high"
|
|
604546
604543
|
});
|
|
604547
604544
|
}
|
|
604545
|
+
const ripgrepWarning = getRipgrepMissingWarning();
|
|
604546
|
+
if (ripgrepWarning) {
|
|
604547
|
+
initialNotifications.push({
|
|
604548
|
+
key: "ripgrep-missing-warning",
|
|
604549
|
+
text: ripgrepWarning,
|
|
604550
|
+
color: "warning",
|
|
604551
|
+
priority: "high"
|
|
604552
|
+
});
|
|
604553
|
+
}
|
|
604548
604554
|
const effectiveToolPermissionContext = {
|
|
604549
604555
|
...toolPermissionContext,
|
|
604550
604556
|
mode: isAgentSwarmsEnabled() && getTeammateUtils().isPlanModeRequired() ? "plan" : toolPermissionContext.mode
|
|
@@ -605019,7 +605025,7 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
605019
605025
|
} else {
|
|
605020
605026
|
const pendingHookMessages = hooksPromise && hookMessages.length === 0 ? hooksPromise : undefined;
|
|
605021
605027
|
profileCheckpoint("action_after_hooks");
|
|
605022
|
-
console.log(getWelcomeMessage("0.7.
|
|
605028
|
+
console.log(getWelcomeMessage("0.7.36"));
|
|
605023
605029
|
maybeActivateProactive(options);
|
|
605024
605030
|
maybeActivateBrief(options);
|
|
605025
605031
|
if (false) {}
|
|
@@ -605036,10 +605042,10 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
605036
605042
|
pendingHookMessages
|
|
605037
605043
|
}, renderAndRun);
|
|
605038
605044
|
}
|
|
605039
|
-
}).version("0.7.
|
|
605045
|
+
}).version("0.7.36 (Cody CLI)", "-v, --version", "Output the version number");
|
|
605040
605046
|
program2.configureOutput({
|
|
605041
605047
|
writeOut: (str2) => {
|
|
605042
|
-
if (str2.includes("0.7.
|
|
605048
|
+
if (str2.includes("0.7.36")) {
|
|
605043
605049
|
process.stdout.write(getCodyLogo() + `
|
|
605044
605050
|
` + str2);
|
|
605045
605051
|
} else {
|
|
@@ -605138,7 +605144,7 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
605138
605144
|
if (false) {}
|
|
605139
605145
|
if (false) {}
|
|
605140
605146
|
const auth2 = program2.command("auth").description("Manage authentication").configureHelp(createSortedHelpConfig());
|
|
605141
|
-
auth2.command("login").description("Sign in to your AINative account").option("--email <email>", "Pre-populate email address on the login page").option("--sso", "Force SSO login flow").option("--console", "Use AINative Console (API usage billing)").option("--
|
|
605147
|
+
auth2.command("login").description("Sign in to your AINative account").option("--email <email>", "Pre-populate email address on the login page").option("--sso", "Force SSO login flow").option("--console", "Use AINative Console (API usage billing)").option("--ainative", "Use AINative subscription (default)").action(async ({
|
|
605142
605148
|
email: email3,
|
|
605143
605149
|
sso,
|
|
605144
605150
|
console: useConsole,
|
|
@@ -605489,7 +605495,7 @@ var init_main3 = __esm(() => {
|
|
|
605489
605495
|
init_addCommand();
|
|
605490
605496
|
init_xaaIdpCommand();
|
|
605491
605497
|
init_internalLogging();
|
|
605492
|
-
|
|
605498
|
+
init_ainative();
|
|
605493
605499
|
init_client8();
|
|
605494
605500
|
init_config3();
|
|
605495
605501
|
init_utils5();
|
|
@@ -605596,7 +605602,7 @@ async function main2() {
|
|
|
605596
605602
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
605597
605603
|
const { getCodyLogo: getCodyLogo2 } = await Promise.resolve().then(() => (init_branding(), exports_branding));
|
|
605598
605604
|
console.log(getCodyLogo2() + `
|
|
605599
|
-
0.7.
|
|
605605
|
+
0.7.36 (Cody CLI)`);
|
|
605600
605606
|
return;
|
|
605601
605607
|
}
|
|
605602
605608
|
const {
|