@atlasharness/atlascode 0.1.72 → 0.1.74

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.
Files changed (2) hide show
  1. package/dist/cli.js +163 -306
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -56350,7 +56350,7 @@ function parsePDFPageRange(pages) {
56350
56350
  return { firstPage: first, lastPage: last };
56351
56351
  }
56352
56352
  function isPDFSupported() {
56353
- return !getMainLoopModelName().toLowerCase().includes("claude-3-haiku");
56353
+ return true;
56354
56354
  }
56355
56355
  function isPDFExtension(ext) {
56356
56356
  const normalized = ext.startsWith(".") ? ext.slice(1) : ext;
@@ -56358,7 +56358,6 @@ function isPDFExtension(ext) {
56358
56358
  }
56359
56359
  var DOCUMENT_EXTENSIONS;
56360
56360
  var init_pdfUtils = __esm(() => {
56361
- init_modelRef();
56362
56361
  DOCUMENT_EXTENSIONS = new Set(["pdf"]);
56363
56362
  });
56364
56363
 
@@ -133040,7 +133039,7 @@ function parsePDFPageRange2(pages) {
133040
133039
  return { firstPage: first, lastPage: last };
133041
133040
  }
133042
133041
  function isPDFSupported2() {
133043
- return !getMainLoopModel().toLowerCase().includes("claude-3-haiku");
133042
+ return true;
133044
133043
  }
133045
133044
  function isPDFExtension2(ext) {
133046
133045
  const normalized = ext.startsWith(".") ? ext.slice(1) : ext;
@@ -133048,7 +133047,6 @@ function isPDFExtension2(ext) {
133048
133047
  }
133049
133048
  var DOCUMENT_EXTENSIONS2;
133050
133049
  var init_pdfUtils2 = __esm(() => {
133051
- init_model();
133052
133050
  DOCUMENT_EXTENSIONS2 = new Set(["pdf"]);
133053
133051
  });
133054
133052
 
@@ -166837,7 +166835,7 @@ var init_addDirPluginSettings = __esm(() => {
166837
166835
  });
166838
166836
 
166839
166837
  // src/tui/entrypoints/sdk/coreSchemas.ts
166840
- var ModelUsageSchema, OutputFormatTypeSchema, BaseOutputFormatSchema, JsonSchemaOutputFormatSchema, OutputFormatSchema, ApiKeySourceSchema, ConfigScopeSchema2, SdkBetaSchema, ThinkingAdaptiveSchema, ThinkingEnabledSchema, ThinkingDisabledSchema, ThinkingConfigSchema, McpStdioServerConfigSchema2, McpSSEServerConfigSchema2, McpHttpServerConfigSchema, McpSdkServerConfigSchema, McpServerConfigForProcessTransportSchema, McpClaudeAIProxyServerConfigSchema, McpServerStatusConfigSchema, McpServerStatusSchema, McpSetServersResultSchema, PermissionUpdateDestinationSchema, PermissionBehaviorSchema, PreToolUsePermissionDecisionSchema, PermissionRuleValueSchema, PermissionUpdateSchema, PermissionDecisionClassificationSchema, PermissionResultSchema, PermissionModeSchema2, HOOK_EVENTS2, HookEventSchema, BaseHookInputSchema, PreToolUseHookInputSchema, PermissionRequestHookInputSchema, PostToolUseHookInputSchema, PostToolUseFailureHookInputSchema, PermissionDeniedHookInputSchema, NotificationHookInputSchema, UserPromptSubmitHookInputSchema, SessionStartHookInputSchema, PreModelSwitchHookInputSchema, PostModelSwitchHookInputSchema, 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;
166838
+ var ModelUsageSchema, OutputFormatTypeSchema, BaseOutputFormatSchema, JsonSchemaOutputFormatSchema, OutputFormatSchema, ApiKeySourceSchema, ConfigScopeSchema2, SdkBetaSchema, ThinkingAdaptiveSchema, ThinkingEnabledSchema, ThinkingDisabledSchema, ThinkingConfigSchema, McpStdioServerConfigSchema2, McpSSEServerConfigSchema2, McpHttpServerConfigSchema, McpSdkServerConfigSchema, McpServerConfigForProcessTransportSchema, McpServerStatusConfigSchema, McpServerStatusSchema, McpSetServersResultSchema, PermissionUpdateDestinationSchema, PermissionBehaviorSchema, PreToolUsePermissionDecisionSchema, PermissionRuleValueSchema, PermissionUpdateSchema, PermissionDecisionClassificationSchema, PermissionResultSchema, PermissionModeSchema2, HOOK_EVENTS2, HookEventSchema, BaseHookInputSchema, PreToolUseHookInputSchema, PermissionRequestHookInputSchema, PostToolUseHookInputSchema, PostToolUseFailureHookInputSchema, PermissionDeniedHookInputSchema, NotificationHookInputSchema, UserPromptSubmitHookInputSchema, SessionStartHookInputSchema, PreModelSwitchHookInputSchema, PostModelSwitchHookInputSchema, 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;
166841
166839
  var init_coreSchemas = __esm(() => {
166842
166840
  init_v4();
166843
166841
  ModelUsageSchema = lazySchema2(() => object({
@@ -166902,15 +166900,7 @@ var init_coreSchemas = __esm(() => {
166902
166900
  McpHttpServerConfigSchema(),
166903
166901
  McpSdkServerConfigSchema()
166904
166902
  ]));
166905
- McpClaudeAIProxyServerConfigSchema = lazySchema2(() => object({
166906
- type: literal("claudeai-proxy"),
166907
- url: string2(),
166908
- id: string2()
166909
- }));
166910
- McpServerStatusConfigSchema = lazySchema2(() => union([
166911
- McpServerConfigForProcessTransportSchema(),
166912
- McpClaudeAIProxyServerConfigSchema()
166913
- ]));
166903
+ McpServerStatusConfigSchema = lazySchema2(() => McpServerConfigForProcessTransportSchema());
166914
166904
  McpServerStatusSchema = lazySchema2(() => object({
166915
166905
  name: string2().describe("Server name as configured"),
166916
166906
  status: _enum(["connected", "failed", "needs-auth", "pending", "disabled"]).describe("Current connection status"),
@@ -167967,7 +167957,7 @@ var init_hooks3 = __esm(() => {
167967
167957
  });
167968
167958
 
167969
167959
  // src/tui/services/mcp/types.ts
167970
- var ConfigScopeSchema3, TransportSchema2, McpStdioServerConfigSchema3, McpXaaConfigSchema2, McpOAuthConfigSchema2, McpSSEServerConfigSchema3, McpSSEIDEServerConfigSchema, McpWebSocketIDEServerConfigSchema, McpHTTPServerConfigSchema2, McpWebSocketServerConfigSchema2, McpSdkServerConfigSchema2, McpClaudeAIProxyServerConfigSchema2, McpServerConfigSchema2, McpJsonConfigSchema2;
167960
+ var ConfigScopeSchema3, TransportSchema2, McpStdioServerConfigSchema3, McpXaaConfigSchema2, McpOAuthConfigSchema2, McpSSEServerConfigSchema3, McpSSEIDEServerConfigSchema, McpWebSocketIDEServerConfigSchema, McpHTTPServerConfigSchema2, McpWebSocketServerConfigSchema2, McpSdkServerConfigSchema2, McpServerConfigSchema2, McpJsonConfigSchema2;
167971
167961
  var init_types9 = __esm(() => {
167972
167962
  init_v4();
167973
167963
  ConfigScopeSchema3 = lazySchema2(() => _enum([
@@ -167993,6 +167983,9 @@ var init_types9 = __esm(() => {
167993
167983
  authServerMetadataUrl: string2().url().startsWith("https://", {
167994
167984
  message: "authServerMetadataUrl must use https://"
167995
167985
  }).optional(),
167986
+ clientMetadataUrl: string2().url().startsWith("https://", {
167987
+ message: "clientMetadataUrl must use https://"
167988
+ }).optional(),
167996
167989
  xaa: McpXaaConfigSchema2().optional()
167997
167990
  }));
167998
167991
  McpSSEServerConfigSchema3 = lazySchema2(() => object({
@@ -168032,11 +168025,6 @@ var init_types9 = __esm(() => {
168032
168025
  type: literal("sdk"),
168033
168026
  name: string2()
168034
168027
  }));
168035
- McpClaudeAIProxyServerConfigSchema2 = lazySchema2(() => object({
168036
- type: literal("claudeai-proxy"),
168037
- url: string2(),
168038
- id: string2()
168039
- }));
168040
168028
  McpServerConfigSchema2 = lazySchema2(() => union([
168041
168029
  McpStdioServerConfigSchema3(),
168042
168030
  McpSSEServerConfigSchema3(),
@@ -168044,8 +168032,7 @@ var init_types9 = __esm(() => {
168044
168032
  McpWebSocketIDEServerConfigSchema(),
168045
168033
  McpHTTPServerConfigSchema2(),
168046
168034
  McpWebSocketServerConfigSchema2(),
168047
- McpSdkServerConfigSchema2(),
168048
- McpClaudeAIProxyServerConfigSchema2()
168035
+ McpSdkServerConfigSchema2()
168049
168036
  ]));
168050
168037
  McpJsonConfigSchema2 = lazySchema2(() => object({
168051
168038
  mcpServers: record(string2(), McpServerConfigSchema2())
@@ -180136,7 +180123,7 @@ var init_plugin = __esm(() => {
180136
180123
  });
180137
180124
 
180138
180125
  // src/tui/constants/betas.ts
180139
- var ATLAS_20250219_BETA_HEADER = "claude-code-20250219", INTERLEAVED_THINKING_BETA_HEADER = "interleaved-thinking-2025-05-14", CONTEXT_MANAGEMENT_BETA_HEADER = "context-management-2025-06-27", STRUCTURED_OUTPUTS_BETA_HEADER = "structured-outputs-2025-12-15", WEB_SEARCH_BETA_HEADER = "web-search-2025-03-05", PROMPT_CACHING_SCOPE_BETA_HEADER = "prompt-caching-scope-2026-01-05", REDACT_THINKING_BETA_HEADER = "redact-thinking-2026-02-12", SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER2, AFK_MODE_BETA_HEADER2;
180126
+ var ATLAS_20250219_BETA_HEADER = "atlas-code-20250219", INTERLEAVED_THINKING_BETA_HEADER = "interleaved-thinking-2025-05-14", CONTEXT_MANAGEMENT_BETA_HEADER = "context-management-2025-06-27", STRUCTURED_OUTPUTS_BETA_HEADER = "structured-outputs-2025-12-15", WEB_SEARCH_BETA_HEADER = "web-search-2025-03-05", PROMPT_CACHING_SCOPE_BETA_HEADER = "prompt-caching-scope-2026-01-05", REDACT_THINKING_BETA_HEADER = "redact-thinking-2026-02-12", SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER2, AFK_MODE_BETA_HEADER2;
180140
180127
  var init_betas = __esm(() => {
180141
180128
  init_shared();
180142
180129
  SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER2 = feature("CONNECTOR_TEXT") ? "summarize-connector-text-2026-03-13" : "";
@@ -180166,17 +180153,14 @@ function filterAllowedSdkBetas(sdkBetas) {
180166
180153
  }
180167
180154
  return allowed.length > 0 ? allowed : undefined;
180168
180155
  }
180169
- function modelSupportsISP(model) {
180170
- const canonical = getCanonicalName(model);
180171
- return !canonical.includes("claude-3-");
180156
+ function modelSupportsISP(_model) {
180157
+ return true;
180172
180158
  }
180173
- function modelSupportsContextManagement(model) {
180174
- const canonical = getCanonicalName(model);
180175
- return !canonical.includes("claude-3-");
180159
+ function modelSupportsContextManagement(_model) {
180160
+ return true;
180176
180161
  }
180177
- function modelSupportsStructuredOutputs(model) {
180178
- const canonical = getCanonicalName(model);
180179
- return canonical.includes("claude-sonnet-4-6") || canonical.includes("claude-sonnet-4-5") || canonical.includes("claude-opus-4-1") || canonical.includes("claude-opus-4-5") || canonical.includes("claude-opus-4-6") || canonical.includes("claude-haiku-4-5");
180162
+ function modelSupportsStructuredOutputs(_model) {
180163
+ return false;
180180
180164
  }
180181
180165
  function modelSupportsAutoMode(model) {
180182
180166
  if (feature("TRANSCRIPT_CLASSIFIER")) {
@@ -187937,20 +187921,6 @@ var init_p_map = __esm(() => {
187937
187921
  pMapSkip = Symbol("skip");
187938
187922
  });
187939
187923
 
187940
- // src/tui/constants/oauth.ts
187941
- function getOauthConfig() {
187942
- return PROD_OAUTH_CONFIG;
187943
- }
187944
- var PROD_OAUTH_CONFIG, MCP_CLIENT_METADATA_URL = "https://claude.ai/oauth/claude-code-client-metadata";
187945
- var init_oauth = __esm(() => {
187946
- PROD_OAUTH_CONFIG = {
187947
- BASE_API_URL: "https://api.anthropic.com",
187948
- CLAUDE_AI_ORIGIN: "https://claude.ai",
187949
- MCP_PROXY_URL: "https://mcp-proxy.anthropic.com",
187950
- MCP_PROXY_PATH: "/v1/mcp/{server_id}"
187951
- };
187952
- });
187953
-
187954
187924
  // src/tui/keybindings/defaultBindings.ts
187955
187925
  var IMAGE_PASTE_KEY, SUPPORTS_TERMINAL_VT_MODE, MODE_CYCLE_KEY, DEFAULT_BINDINGS;
187956
187926
  var init_defaultBindings = __esm(() => {
@@ -193440,7 +193410,6 @@ function resolvePluginMcpEnvironment(config, plugin, userConfig, errors, pluginN
193440
193410
  case "sse-ide":
193441
193411
  case "ws-ide":
193442
193412
  case "sdk":
193443
- case "claudeai-proxy":
193444
193413
  resolved = config;
193445
193414
  break;
193446
193415
  }
@@ -193838,9 +193807,6 @@ function expandEnvVars(config) {
193838
193807
  case "sdk":
193839
193808
  expanded = config;
193840
193809
  break;
193841
- case "claudeai-proxy":
193842
- expanded = config;
193843
- break;
193844
193810
  }
193845
193811
  return {
193846
193812
  expanded,
@@ -195912,12 +195878,34 @@ class ClaudeAuthProvider {
195912
195878
  return metadata;
195913
195879
  }
195914
195880
  get clientMetadataUrl() {
195881
+ const describe = (raw) => {
195882
+ try {
195883
+ const u = new URL(raw);
195884
+ return `${u.protocol}//${u.host}${u.pathname}`;
195885
+ } catch {
195886
+ return `<invalid url, ${raw.length} chars>`;
195887
+ }
195888
+ };
195915
195889
  const override = process.env.MCP_OAUTH_CLIENT_METADATA_URL;
195916
195890
  if (override) {
195917
- logMCPDebug(this.serverName, `Using CIMD URL from env: ${override}`);
195918
- return override;
195891
+ let valid = false;
195892
+ try {
195893
+ valid = new URL(override).protocol === "https:";
195894
+ } catch {
195895
+ valid = false;
195896
+ }
195897
+ if (valid) {
195898
+ logMCPDebug(this.serverName, `Using CIMD URL from env: ${describe(override)}`);
195899
+ return override;
195900
+ }
195901
+ logMCPDebug(this.serverName, `Ignoring invalid MCP_OAUTH_CLIENT_METADATA_URL env value: ${describe(override)}`);
195902
+ }
195903
+ const perServer = this.serverConfig.oauth?.clientMetadataUrl;
195904
+ if (perServer) {
195905
+ logMCPDebug(this.serverName, `Using CIMD URL from server config: ${describe(perServer)}`);
195906
+ return perServer;
195919
195907
  }
195920
- return MCP_CLIENT_METADATA_URL;
195908
+ return;
195921
195909
  }
195922
195910
  setMetadata(metadata) {
195923
195911
  this._metadata = metadata;
@@ -196533,7 +196521,6 @@ var init_auth3 = __esm(() => {
196533
196521
  init_errors5();
196534
196522
  init_auth();
196535
196523
  init_axios2();
196536
- init_oauth();
196537
196524
  init_browser();
196538
196525
  init_envUtils2();
196539
196526
  init_errors4();
@@ -196602,14 +196589,6 @@ function createMcpAuthTool(serverName, config) {
196602
196589
  return { behavior: "allow", updatedInput: input };
196603
196590
  },
196604
196591
  async call(_input, context) {
196605
- if (config.type === "claudeai-proxy") {
196606
- return {
196607
- data: {
196608
- status: "unsupported",
196609
- message: `This is a claude.ai MCP connector. Ask the user to run /mcp and select "${serverName}" to authenticate.`
196610
- }
196611
- };
196612
- }
196613
196592
  if (config.type !== "sse" && config.type !== "http") {
196614
196593
  return {
196615
196594
  data: {
@@ -197317,26 +197296,51 @@ function createChildAbortController2(parent, maxListeners) {
197317
197296
  var DEFAULT_MAX_LISTENERS2 = 50;
197318
197297
  var init_abortController2 = () => {};
197319
197298
 
197320
- // src/tui/services/oauth/getOauthProfile.ts
197321
- async function getOauthProfileFromOauthToken(accessToken) {
197322
- const endpoint = `${getOauthConfig().BASE_API_URL}/api/oauth/profile`;
197323
- try {
197324
- const response = await axios_default.get(endpoint, {
197325
- headers: {
197326
- Authorization: `Bearer ${accessToken}`,
197327
- "Content-Type": "application/json"
197328
- },
197329
- timeout: 1e4
197330
- });
197331
- return response.data;
197332
- } catch (error) {
197333
- logError3(error);
197299
+ // src/tui/utils/codeIndexing.ts
197300
+ function detectCodeIndexingFromMcpServerName(serverName) {
197301
+ for (const { pattern, tool } of MCP_SERVER_PATTERNS) {
197302
+ if (pattern.test(serverName)) {
197303
+ return tool;
197304
+ }
197334
197305
  }
197306
+ return;
197335
197307
  }
197336
- var init_getOauthProfile = __esm(() => {
197337
- init_axios2();
197338
- init_oauth();
197339
- init_log5();
197308
+ var MCP_SERVER_PATTERNS;
197309
+ var init_codeIndexing = __esm(() => {
197310
+ MCP_SERVER_PATTERNS = [
197311
+ { pattern: /^sourcegraph$/i, tool: "sourcegraph" },
197312
+ { pattern: /^cody$/i, tool: "cody" },
197313
+ { pattern: /^openctx$/i, tool: "openctx" },
197314
+ { pattern: /^aider$/i, tool: "aider" },
197315
+ { pattern: /^continue$/i, tool: "continue" },
197316
+ { pattern: /^github[-_]?copilot$/i, tool: "github-copilot" },
197317
+ { pattern: /^copilot$/i, tool: "github-copilot" },
197318
+ { pattern: /^cursor$/i, tool: "cursor" },
197319
+ { pattern: /^tabby$/i, tool: "tabby" },
197320
+ { pattern: /^codeium$/i, tool: "codeium" },
197321
+ { pattern: /^tabnine$/i, tool: "tabnine" },
197322
+ { pattern: /^augment[-_]?code$/i, tool: "augment" },
197323
+ { pattern: /^augment$/i, tool: "augment" },
197324
+ { pattern: /^windsurf$/i, tool: "windsurf" },
197325
+ { pattern: /^aide$/i, tool: "aide" },
197326
+ { pattern: /^codestory$/i, tool: "aide" },
197327
+ { pattern: /^pieces$/i, tool: "pieces" },
197328
+ { pattern: /^qodo$/i, tool: "qodo" },
197329
+ { pattern: /^amazon[-_]?q$/i, tool: "amazon-q" },
197330
+ { pattern: /^gemini[-_]?code[-_]?assist$/i, tool: "gemini" },
197331
+ { pattern: /^gemini$/i, tool: "gemini" },
197332
+ { pattern: /^hound$/i, tool: "hound" },
197333
+ { pattern: /^seagoat$/i, tool: "seagoat" },
197334
+ { pattern: /^bloop$/i, tool: "bloop" },
197335
+ { pattern: /^gitloop$/i, tool: "gitloop" },
197336
+ { pattern: /^claude[-_]?context$/i, tool: "claude-context" },
197337
+ { pattern: /^code[-_]?index[-_]?mcp$/i, tool: "code-index-mcp" },
197338
+ { pattern: /^code[-_]?index$/i, tool: "code-index-mcp" },
197339
+ { pattern: /^local[-_]?code[-_]?search$/i, tool: "local-code-search" },
197340
+ { pattern: /^codebase$/i, tool: "autodev-codebase" },
197341
+ { pattern: /^autodev[-_]?codebase$/i, tool: "autodev-codebase" },
197342
+ { pattern: /^code[-_]?context$/i, tool: "claude-context" }
197343
+ ];
197340
197344
  });
197341
197345
 
197342
197346
  // src/tui/utils/authFileDescriptor.ts
@@ -197734,43 +197738,7 @@ async function validateForceLoginOrg() {
197734
197738
  if (!tokens) {
197735
197739
  return { valid: true };
197736
197740
  }
197737
- const { source } = getAuthTokenSource();
197738
- const isEnvVarToken = source === "OPENAI_AUTH_TOKEN";
197739
- const profile = await getOauthProfileFromOauthToken(tokens.accessToken);
197740
- if (!profile) {
197741
- return {
197742
- valid: false,
197743
- message: `Unable to verify organization for the current authentication token.
197744
- ` + `This machine requires organization ${requiredOrgUuid} but the profile could not be fetched.
197745
- ` + `This may be a network error, or the token may lack the user:profile scope required for
197746
- ` + `verification (tokens from 'claude setup-token' do not include this scope).
197747
- ` + `Try again, or obtain a full-scope token via 'claude auth login'.`
197748
- };
197749
- }
197750
- const tokenOrgUuid = profile.organization.uuid;
197751
- if (tokenOrgUuid === requiredOrgUuid) {
197752
- return { valid: true };
197753
- }
197754
- if (isEnvVarToken) {
197755
- const envVarName = "OPENAI_AUTH_TOKEN";
197756
- return {
197757
- valid: false,
197758
- message: `The ${envVarName} environment variable provides a token for a
197759
- ` + `different organization than required by this machine's managed settings.
197760
-
197761
- ` + `Required organization: ${requiredOrgUuid}
197762
- ` + `Token organization: ${tokenOrgUuid}
197763
-
197764
- ` + `Remove the environment variable or obtain a token for the correct organization.`
197765
- };
197766
- }
197767
- return {
197768
- valid: false,
197769
- message: `Your authentication token belongs to organization ${tokenOrgUuid},
197770
- ` + `but this machine requires organization ${requiredOrgUuid}.
197771
-
197772
- ` + `Please log in with the correct organization: claude auth login`
197773
- };
197741
+ return { valid: true };
197774
197742
  }
197775
197743
  var DEFAULT_API_KEY_HELPER_TTL, _apiKeyHelperCache = null, _apiKeyHelperInflight = null, _apiKeyHelperEpoch = 0, getApiKeyFromConfigOrMacOSKeychain, getOAuthTokens, DEFAULT_OTEL_HEADERS_DEBOUNCE_MS;
197776
197744
  var init_auth4 = __esm(() => {
@@ -197778,7 +197746,6 @@ var init_auth4 = __esm(() => {
197778
197746
  init_execa();
197779
197747
  init_memoize();
197780
197748
  init_bootstrapState();
197781
- init_getOauthProfile();
197782
197749
  init_authFileDescriptor();
197783
197750
  init_config6();
197784
197751
  init_debug();
@@ -197828,53 +197795,6 @@ var init_auth4 = __esm(() => {
197828
197795
  DEFAULT_OTEL_HEADERS_DEBOUNCE_MS = 29 * 60 * 1000;
197829
197796
  });
197830
197797
 
197831
- // src/tui/utils/codeIndexing.ts
197832
- function detectCodeIndexingFromMcpServerName(serverName) {
197833
- for (const { pattern, tool } of MCP_SERVER_PATTERNS) {
197834
- if (pattern.test(serverName)) {
197835
- return tool;
197836
- }
197837
- }
197838
- return;
197839
- }
197840
- var MCP_SERVER_PATTERNS;
197841
- var init_codeIndexing = __esm(() => {
197842
- MCP_SERVER_PATTERNS = [
197843
- { pattern: /^sourcegraph$/i, tool: "sourcegraph" },
197844
- { pattern: /^cody$/i, tool: "cody" },
197845
- { pattern: /^openctx$/i, tool: "openctx" },
197846
- { pattern: /^aider$/i, tool: "aider" },
197847
- { pattern: /^continue$/i, tool: "continue" },
197848
- { pattern: /^github[-_]?copilot$/i, tool: "github-copilot" },
197849
- { pattern: /^copilot$/i, tool: "github-copilot" },
197850
- { pattern: /^cursor$/i, tool: "cursor" },
197851
- { pattern: /^tabby$/i, tool: "tabby" },
197852
- { pattern: /^codeium$/i, tool: "codeium" },
197853
- { pattern: /^tabnine$/i, tool: "tabnine" },
197854
- { pattern: /^augment[-_]?code$/i, tool: "augment" },
197855
- { pattern: /^augment$/i, tool: "augment" },
197856
- { pattern: /^windsurf$/i, tool: "windsurf" },
197857
- { pattern: /^aide$/i, tool: "aide" },
197858
- { pattern: /^codestory$/i, tool: "aide" },
197859
- { pattern: /^pieces$/i, tool: "pieces" },
197860
- { pattern: /^qodo$/i, tool: "qodo" },
197861
- { pattern: /^amazon[-_]?q$/i, tool: "amazon-q" },
197862
- { pattern: /^gemini[-_]?code[-_]?assist$/i, tool: "gemini" },
197863
- { pattern: /^gemini$/i, tool: "gemini" },
197864
- { pattern: /^hound$/i, tool: "hound" },
197865
- { pattern: /^seagoat$/i, tool: "seagoat" },
197866
- { pattern: /^bloop$/i, tool: "bloop" },
197867
- { pattern: /^gitloop$/i, tool: "gitloop" },
197868
- { pattern: /^claude[-_]?context$/i, tool: "claude-context" },
197869
- { pattern: /^code[-_]?index[-_]?mcp$/i, tool: "code-index-mcp" },
197870
- { pattern: /^code[-_]?index$/i, tool: "code-index-mcp" },
197871
- { pattern: /^local[-_]?code[-_]?search$/i, tool: "local-code-search" },
197872
- { pattern: /^codebase$/i, tool: "autodev-codebase" },
197873
- { pattern: /^autodev[-_]?codebase$/i, tool: "autodev-codebase" },
197874
- { pattern: /^code[-_]?context$/i, tool: "claude-context" }
197875
- ];
197876
- });
197877
-
197878
197798
  // src/tui/utils/workloadContext.ts
197879
197799
  import { AsyncLocalStorage as AsyncLocalStorage4 } from "async_hooks";
197880
197800
  function getWorkload() {
@@ -209334,43 +209254,12 @@ function clearMcpAuthCache() {
209334
209254
  function handleRemoteAuthFailure(name, serverRef, transportType) {
209335
209255
  const label = {
209336
209256
  sse: "SSE",
209337
- http: "HTTP",
209338
- "claudeai-proxy": "claude.ai proxy"
209257
+ http: "HTTP"
209339
209258
  };
209340
209259
  logMCPDebug(name, `Authentication required for ${label[transportType]} server`);
209341
209260
  setMcpAuthCacheEntry(name);
209342
209261
  return { name, type: "needs-auth", config: serverRef };
209343
209262
  }
209344
- function createClaudeAiProxyFetch(innerFetch) {
209345
- return async (url, init) => {
209346
- const doRequest = async () => {
209347
- const currentTokens = getOAuthTokens();
209348
- if (!currentTokens) {
209349
- throw new Error("No claude.ai OAuth token available");
209350
- }
209351
- const headers = new Headers(init?.headers);
209352
- headers.set("Authorization", `Bearer ${currentTokens.accessToken}`);
209353
- const response = await innerFetch(url, { ...init, headers });
209354
- return { response, sentToken: currentTokens.accessToken };
209355
- };
209356
- const { response, sentToken } = await doRequest();
209357
- if (response.status !== 401) {
209358
- return response;
209359
- }
209360
- const tokenChanged = false;
209361
- if (!tokenChanged) {
209362
- const now = getOAuthTokens()?.accessToken;
209363
- if (!now || now === sentToken) {
209364
- return response;
209365
- }
209366
- }
209367
- try {
209368
- return (await doRequest()).response;
209369
- } catch {
209370
- return response;
209371
- }
209372
- };
209373
- }
209374
209263
  async function createNodeWsClient(url, options) {
209375
209264
  const wsModule = await Promise.resolve().then(() => (init_wrapper2(), {}));
209376
209265
  const WS = wrapper_default;
@@ -209560,7 +209449,7 @@ async function getMcpToolsCommandsAndResources(onConnectionAttempt, mcpConfigs)
209560
209449
  });
209561
209450
  return;
209562
209451
  }
209563
- if ((config.type === "claudeai-proxy" || config.type === "http" || config.type === "sse") && (await isMcpAuthCached(name) || (config.type === "http" || config.type === "sse") && hasMcpDiscoveryButNoToken(name, config))) {
209452
+ if ((config.type === "http" || config.type === "sse") && (await isMcpAuthCached(name) || hasMcpDiscoveryButNoToken(name, config))) {
209564
209453
  logMCPDebug(name, `Skipping connection (cached needs-auth)`);
209565
209454
  onConnectionAttempt({
209566
209455
  client: { name, type: "needs-auth", config },
@@ -210042,7 +209931,7 @@ async function callMCPTool({
210042
209931
  throw new McpAuthError(name, `MCP server "${name}" requires re-authorization (token expired)`);
210043
209932
  }
210044
209933
  const isSessionExpired = isMcpSessionExpiredError(e);
210045
- const isConnectionClosedOnHttp = "code" in e && e.code === -32000 && e.message.includes("Connection closed") && (config.type === "http" || config.type === "claudeai-proxy");
209934
+ const isConnectionClosedOnHttp = "code" in e && e.code === -32000 && e.message.includes("Connection closed") && config.type === "http";
210046
209935
  if (isSessionExpired || isConnectionClosedOnHttp) {
210047
209936
  logMCPDebug(name, `MCP session expired during tool call (${isSessionExpired ? "404/-32001" : "connection closed"}), clearing connection cache for re-initialization`);
210048
209937
  await clearServerCache(name, config);
@@ -210078,14 +209967,12 @@ var init_client4 = __esm(() => {
210078
209967
  init_zipObject();
210079
209968
  init_p_map();
210080
209969
  init_bootstrap();
210081
- init_oauth();
210082
209970
  init_Tool();
210083
209971
  init_ListMcpResourcesTool();
210084
209972
  init_MCPTool();
210085
209973
  init_McpAuthTool();
210086
209974
  init_ReadMcpResourceTool();
210087
209975
  init_abortController2();
210088
- init_auth4();
210089
209976
  init_cleanupRegistry3();
210090
209977
  init_codeIndexing();
210091
209978
  init_debug();
@@ -210306,29 +210193,6 @@ var init_client4 = __esm(() => {
210306
210193
  logMCPDebug(name, `HTTP transport created successfully`);
210307
210194
  } else if (serverRef.type === "sdk") {
210308
210195
  throw new Error("SDK servers should be handled in print.ts");
210309
- } else if (serverRef.type === "claudeai-proxy") {
210310
- logMCPDebug(name, `Initializing claude.ai proxy transport for server ${serverRef.id}`);
210311
- const tokens = getOAuthTokens();
210312
- if (!tokens) {
210313
- throw new Error("No claude.ai OAuth token found");
210314
- }
210315
- const oauthConfig = getOauthConfig();
210316
- const proxyUrl = `${oauthConfig.MCP_PROXY_URL}${oauthConfig.MCP_PROXY_PATH.replace("{server_id}", serverRef.id)}`;
210317
- logMCPDebug(name, `Using claude.ai proxy at ${proxyUrl}`);
210318
- const fetchWithAuth = createClaudeAiProxyFetch(globalThis.fetch);
210319
- const proxyOptions = getProxyFetchOptions();
210320
- const transportOptions = {
210321
- fetch: wrapFetchWithTimeout(fetchWithAuth),
210322
- requestInit: {
210323
- ...proxyOptions,
210324
- headers: {
210325
- "User-Agent": getMCPUserAgent(),
210326
- "X-Mcp-Client-Session-Id": getSessionId()
210327
- }
210328
- }
210329
- };
210330
- transport = new StreamableHTTPClientTransport(new URL(proxyUrl), transportOptions);
210331
- logMCPDebug(name, `claude.ai proxy transport created successfully`);
210332
210196
  } else if (feature("CHICAGO_MCP") && (serverRef.type === "stdio" || !serverRef.type) && isComputerUseMCPServer2(name)) {
210333
210197
  await Promise.resolve().then(() => init_mcpServer());
210334
210198
  await Promise.resolve();
@@ -210450,13 +210314,6 @@ var init_client4 = __esm(() => {
210450
210314
  if (error instanceof UnauthorizedError) {
210451
210315
  return handleRemoteAuthFailure(name, serverRef, "http");
210452
210316
  }
210453
- } else if (serverRef.type === "claudeai-proxy" && error instanceof Error) {
210454
- logMCPDebug(name, `claude.ai proxy connection failed after ${elapsed}ms: ${error.message}`);
210455
- logMCPError(name, error);
210456
- const errorCode = error.code;
210457
- if (errorCode === 401) {
210458
- return handleRemoteAuthFailure(name, serverRef, "claudeai-proxy");
210459
- }
210460
210317
  } else if (serverRef.type === "sse-ide" || serverRef.type === "ws-ide") {}
210461
210318
  if (inProcessServer) {
210462
210319
  inProcessServer.close().catch(() => {});
@@ -210538,7 +210395,7 @@ var init_client4 = __esm(() => {
210538
210395
  logMCPDebug(name, `Connection error: ${error.message}`);
210539
210396
  }
210540
210397
  }
210541
- if ((transportType === "http" || transportType === "claudeai-proxy") && isMcpSessionExpiredError(error)) {
210398
+ if (transportType === "http" && isMcpSessionExpiredError(error)) {
210542
210399
  logMCPDebug(name, `MCP session expired (server returned 404 with session-not-found), triggering reconnection`);
210543
210400
  closeTransportAndRejectPending("session expired");
210544
210401
  if (originalOnerror) {
@@ -210546,7 +210403,7 @@ var init_client4 = __esm(() => {
210546
210403
  }
210547
210404
  return;
210548
210405
  }
210549
- if (transportType === "sse" || transportType === "http" || transportType === "claudeai-proxy") {
210406
+ if (transportType === "sse" || transportType === "http") {
210550
210407
  if (error.message.includes("Maximum reconnection attempts")) {
210551
210408
  closeTransportAndRejectPending("SSE reconnection exhausted");
210552
210409
  if (originalOnerror) {
@@ -347371,6 +347228,18 @@ var init_fileSuggestions = __esm(() => {
347371
347228
  cachedTrackedDirs = [];
347372
347229
  });
347373
347230
 
347231
+ // src/tui/constants/oauth.ts
347232
+ function getOauthConfig() {
347233
+ return PROD_OAUTH_CONFIG;
347234
+ }
347235
+ var PROD_OAUTH_CONFIG;
347236
+ var init_oauth = __esm(() => {
347237
+ PROD_OAUTH_CONFIG = {
347238
+ BASE_API_URL: undefined,
347239
+ CLAUDE_AI_ORIGIN: undefined
347240
+ };
347241
+ });
347242
+
347374
347243
  // src/tui/services/api/sessionIngress.ts
347375
347244
  function getOrCreateSequentialAppend(sessionId) {
347376
347245
  let sequentialAppend = sequentialAppendBySession.get(sessionId);
@@ -369060,11 +368929,11 @@ function _temp419(a_0, b_0) {
369060
368929
  function _temp323(a, b) {
369061
368930
  return a.name.localeCompare(b.name);
369062
368931
  }
369063
- function _temp231(s_0) {
369064
- return s_0.client.config.type === "claudeai-proxy";
368932
+ function _temp231(_s_0) {
368933
+ return false;
369065
368934
  }
369066
- function _temp85(s) {
369067
- return s.client.config.type !== "claudeai-proxy";
368935
+ function _temp85(_s) {
368936
+ return true;
369068
368937
  }
369069
368938
  var import_compiler_runtime154, import_react109, jsx_dev_runtime189, SCOPE_ORDER;
369070
368939
  var init_MCPListPanel = __esm(() => {
@@ -370212,8 +370081,6 @@ function MCPRemoteServerMenu({
370212
370081
  }
370213
370082
  }, [server.client.type, server.name, toggleMcpServer, onCancel, onComplete]);
370214
370083
  const handleAuthenticate = import_react113.default.useCallback(async () => {
370215
- if (server.config.type === "claudeai-proxy")
370216
- return;
370217
370084
  setIsAuthenticating(true);
370218
370085
  setError(null);
370219
370086
  const controller = new AbortController;
@@ -370253,8 +370120,6 @@ function MCPRemoteServerMenu({
370253
370120
  }
370254
370121
  }, [server.isAuthenticated, server.config, server.name, onComplete, reconnectMcpServer, isEffectivelyAuthenticated]);
370255
370122
  const handleClearAuth = async () => {
370256
- if (server.config.type === "claudeai-proxy")
370257
- return;
370258
370123
  if (server.config) {
370259
370124
  await revokeServerTokens(server.name, server.config);
370260
370125
  await clearServerCache(server.name, {
@@ -370424,23 +370289,21 @@ function MCPRemoteServerMenu({
370424
370289
  value: "tools"
370425
370290
  });
370426
370291
  }
370427
- if (server.config.type !== "claudeai-proxy") {
370428
- if (isEffectivelyAuthenticated) {
370429
- menuOptions.push({
370430
- label: "Re-authenticate",
370431
- value: "reauth"
370432
- });
370433
- menuOptions.push({
370434
- label: "Clear authentication",
370435
- value: "clear-auth"
370436
- });
370437
- }
370438
- if (!isEffectivelyAuthenticated) {
370439
- menuOptions.push({
370440
- label: "Authenticate",
370441
- value: "auth"
370442
- });
370443
- }
370292
+ if (isEffectivelyAuthenticated) {
370293
+ menuOptions.push({
370294
+ label: "Re-authenticate",
370295
+ value: "reauth"
370296
+ });
370297
+ menuOptions.push({
370298
+ label: "Clear authentication",
370299
+ value: "clear-auth"
370300
+ });
370301
+ }
370302
+ if (!isEffectivelyAuthenticated) {
370303
+ menuOptions.push({
370304
+ label: "Authenticate",
370305
+ value: "auth"
370306
+ });
370444
370307
  }
370445
370308
  if (server.client.type !== "disabled") {
370446
370309
  if (server.client.type !== "needs-auth") {
@@ -370521,7 +370384,7 @@ function MCPRemoteServerMenu({
370521
370384
  }, undefined, true, undefined, this)
370522
370385
  ]
370523
370386
  }, undefined, true, undefined, this),
370524
- server.transport !== "claudeai-proxy" && /* @__PURE__ */ jsx_dev_runtime193.jsxDEV(ThemedBox_default, {
370387
+ /* @__PURE__ */ jsx_dev_runtime193.jsxDEV(ThemedBox_default, {
370525
370388
  children: [
370526
370389
  /* @__PURE__ */ jsx_dev_runtime193.jsxDEV(ThemedText, {
370527
370390
  bold: true,
@@ -371532,7 +371395,6 @@ function MCPSettings(t0) {
371532
371395
  const scope = client_0.config.scope;
371533
371396
  const isSSE = client_0.config.type === "sse";
371534
371397
  const isHTTP = client_0.config.type === "http";
371535
- const isClaudeAIProxy = client_0.config.type === "claudeai-proxy";
371536
371398
  let isAuthenticated = undefined;
371537
371399
  if (isSSE || isHTTP) {
371538
371400
  const authProvider = new ClaudeAuthProvider(client_0.name, client_0.config);
@@ -371546,36 +371408,27 @@ function MCPSettings(t0) {
371546
371408
  client: client_0,
371547
371409
  scope
371548
371410
  };
371549
- if (isClaudeAIProxy) {
371411
+ if (isSSE) {
371550
371412
  return {
371551
371413
  ...baseInfo,
371552
- transport: "claudeai-proxy",
371553
- isAuthenticated: false,
371414
+ transport: "sse",
371415
+ isAuthenticated,
371554
371416
  config: client_0.config
371555
371417
  };
371556
371418
  } else {
371557
- if (isSSE) {
371419
+ if (isHTTP) {
371558
371420
  return {
371559
371421
  ...baseInfo,
371560
- transport: "sse",
371422
+ transport: "http",
371561
371423
  isAuthenticated,
371562
371424
  config: client_0.config
371563
371425
  };
371564
371426
  } else {
371565
- if (isHTTP) {
371566
- return {
371567
- ...baseInfo,
371568
- transport: "http",
371569
- isAuthenticated,
371570
- config: client_0.config
371571
- };
371572
- } else {
371573
- return {
371574
- ...baseInfo,
371575
- transport: "stdio",
371576
- config: client_0.config
371577
- };
371578
- }
371427
+ return {
371428
+ ...baseInfo,
371429
+ transport: "stdio",
371430
+ config: client_0.config
371431
+ };
371579
371432
  }
371580
371433
  }
371581
371434
  }));
@@ -371672,7 +371525,7 @@ function MCPSettings(t0) {
371672
371525
  t9 = $[25];
371673
371526
  }
371674
371527
  const serverTools_0 = t9;
371675
- const defaultTab = viewState.server.transport === "claudeai-proxy" ? "Atlas Web" : "Atlas";
371528
+ const defaultTab = "Atlas";
371676
371529
  if (viewState.server.transport === "stdio") {
371677
371530
  let t10;
371678
371531
  if ($[26] !== viewState.server) {
@@ -408937,23 +408790,6 @@ function ManagePlugins({
408937
408790
  onComplete: handleMcpComplete,
408938
408791
  borderless: true
408939
408792
  }, undefined, false, undefined, this);
408940
- } else if (configType === "claudeai-proxy") {
408941
- const server_2 = {
408942
- name: client_3.name,
408943
- client: client_3,
408944
- scope: scope_5,
408945
- transport: "claudeai-proxy",
408946
- isAuthenticated: undefined,
408947
- config: client_3.config
408948
- };
408949
- return /* @__PURE__ */ jsx_dev_runtime291.jsxDEV(MCPRemoteServerMenu, {
408950
- server: server_2,
408951
- serverToolsCount,
408952
- onViewTools: handleMcpViewTools,
408953
- onCancel: handleMcpCancel,
408954
- onComplete: handleMcpComplete,
408955
- borderless: true
408956
- }, undefined, false, undefined, this);
408957
408793
  }
408958
408794
  setViewState("plugin-list");
408959
408795
  return null;
@@ -408994,7 +408830,7 @@ function ManagePlugins({
408994
408830
  name: client_4.name,
408995
408831
  client: client_4,
408996
408832
  scope: scope_6,
408997
- transport: "claudeai-proxy",
408833
+ transport: "http",
408998
408834
  isAuthenticated: undefined,
408999
408835
  config: client_4.config
409000
408836
  };
@@ -409053,7 +408889,7 @@ function ManagePlugins({
409053
408889
  name: client_5.name,
409054
408890
  client: client_5,
409055
408891
  scope: scope_7,
409056
- transport: "claudeai-proxy",
408892
+ transport: "http",
409057
408893
  isAuthenticated: undefined,
409058
408894
  config: client_5.config
409059
408895
  };
@@ -434693,6 +434529,8 @@ function preconnectAtlasApi() {
434693
434529
  return;
434694
434530
  }
434695
434531
  const baseUrl = process.env.OPENAI_BASE_URL || getOauthConfig().BASE_API_URL;
434532
+ if (!baseUrl)
434533
+ return;
434696
434534
  fetch(baseUrl, {
434697
434535
  method: "HEAD",
434698
434536
  signal: AbortSignal.timeout(1e4)
@@ -434866,8 +434704,19 @@ function withoutCcdSpawnEnvKeys(env) {
434866
434704
  }
434867
434705
  return out;
434868
434706
  }
434707
+ function withoutMcpOauthCimdVars(env) {
434708
+ if (!env)
434709
+ return {};
434710
+ const out = {};
434711
+ for (const [key, value] of Object.entries(env)) {
434712
+ if (key.toUpperCase() !== "MCP_OAUTH_CLIENT_METADATA_URL") {
434713
+ out[key] = value;
434714
+ }
434715
+ }
434716
+ return out;
434717
+ }
434869
434718
  function filterSettingsEnv(env) {
434870
- return withoutCcdSpawnEnvKeys(withoutHostManagedProviderVars(withoutSSHTunnelVars(env)));
434719
+ return withoutCcdSpawnEnvKeys(withoutMcpOauthCimdVars(withoutHostManagedProviderVars(withoutSSHTunnelVars(env))));
434871
434720
  }
434872
434721
  function applySafeConfigEnvironmentVariables2() {
434873
434722
  if (ccdSpawnEnvKeys === undefined) {
@@ -473591,13 +473440,13 @@ function _temp436(client_2) {
473591
473440
  return false;
473592
473441
  }
473593
473442
  function _temp350(client_1) {
473594
- return client_1.type === "needs-auth" && client_1.config.type !== "claudeai-proxy";
473443
+ return client_1.type === "needs-auth";
473595
473444
  }
473596
473445
  function _temp279(client_0) {
473597
473446
  return false;
473598
473447
  }
473599
473448
  function _temp181(client) {
473600
- return client.type === "failed" && client.config.type !== "sse-ide" && client.config.type !== "ws-ide" && client.config.type !== "claudeai-proxy";
473449
+ return client.type === "failed" && client.config.type !== "sse-ide" && client.config.type !== "ws-ide";
473601
473450
  }
473602
473451
  var import_compiler_runtime307, import_react264, jsx_dev_runtime418, EMPTY_MCP_CLIENTS;
473603
473452
  var init_useMcpConnectivityStatus = __esm(() => {
@@ -482555,6 +482404,12 @@ var init_useTimeout = __esm(() => {
482555
482404
  async function checkEndpoints() {
482556
482405
  try {
482557
482406
  const baseUrl = process.env.ATLAS_API_BASE_URL || process.env.OPENAI_BASE_URL || getOauthConfig().BASE_API_URL;
482407
+ if (!baseUrl) {
482408
+ return {
482409
+ success: false,
482410
+ error: "No API base URL configured. Set ATLAS_API_BASE_URL or OPENAI_BASE_URL to your gateway endpoint (see docs/reference/network-config.md)."
482411
+ };
482412
+ }
482558
482413
  const endpoints = [baseUrl];
482559
482414
  const checkEndpoint = async (url) => {
482560
482415
  try {
@@ -490467,8 +490322,6 @@ async function mcpListHandler2() {
490467
490322
  console.log(`${name}: ${server.url} (SSE) - ${status}`);
490468
490323
  } else if (server.type === "http") {
490469
490324
  console.log(`${name}: ${server.url} (HTTP) - ${status}`);
490470
- } else if (server.type === "claudeai-proxy") {
490471
- console.log(`${name}: ${server.url} - ${status}`);
490472
490325
  } else if (!server.type || server.type === "stdio") {
490473
490326
  const stdioServer = server;
490474
490327
  const args = Array.isArray(stdioServer.args) ? stdioServer.args : [];
@@ -490496,7 +490349,7 @@ async function mcpGetHandler2(name) {
490496
490349
  console.log(` ${key}: ${value}`);
490497
490350
  }
490498
490351
  }
490499
- if (server.oauth?.clientId || server.oauth?.callbackPort) {
490352
+ if (server.oauth?.clientId || server.oauth?.callbackPort || server.oauth?.clientMetadataUrl) {
490500
490353
  const parts = [];
490501
490354
  if (server.oauth.clientId) {
490502
490355
  parts.push("client_id configured");
@@ -490506,6 +490359,8 @@ async function mcpGetHandler2(name) {
490506
490359
  }
490507
490360
  if (server.oauth.callbackPort)
490508
490361
  parts.push(`callback_port ${server.oauth.callbackPort}`);
490362
+ if (server.oauth.clientMetadataUrl)
490363
+ parts.push(`client_metadata_url ${server.oauth.clientMetadataUrl}`);
490509
490364
  console.log(` OAuth: ${parts.join(", ")}`);
490510
490365
  }
490511
490366
  } else if (server.type === "http") {
@@ -490517,7 +490372,7 @@ async function mcpGetHandler2(name) {
490517
490372
  console.log(` ${key}: ${value}`);
490518
490373
  }
490519
490374
  }
490520
- if (server.oauth?.clientId || server.oauth?.callbackPort) {
490375
+ if (server.oauth?.clientId || server.oauth?.callbackPort || server.oauth?.clientMetadataUrl) {
490521
490376
  const parts = [];
490522
490377
  if (server.oauth.clientId) {
490523
490378
  parts.push("client_id configured");
@@ -490527,6 +490382,8 @@ async function mcpGetHandler2(name) {
490527
490382
  }
490528
490383
  if (server.oauth.callbackPort)
490529
490384
  parts.push(`callback_port ${server.oauth.callbackPort}`);
490385
+ if (server.oauth.clientMetadataUrl)
490386
+ parts.push(`client_metadata_url ${server.oauth.clientMetadataUrl}`);
490530
490387
  console.log(` OAuth: ${parts.join(", ")}`);
490531
490388
  }
490532
490389
  } else if (server.type === "stdio") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlasharness/atlascode",
3
- "version": "0.1.72",
3
+ "version": "0.1.74",
4
4
  "description": "AtlasCode \u2014 Coding Agent for the domestic computing ecosystem (Ascend NPU + domestic LLM backends)",
5
5
  "bin": {
6
6
  "atlas": "dist/cli.js",