Integrations
External services, APIs, analytics, auth, and service glue.
168
Matched files
8
Top dirs
61,021
Lines in slice
925
Exports found
Heuristic
Classification style
Beginner explanation
This architecture page groups files that seem to solve the same type of problem. It is a good way to understand the repo as a system rather than as a list of folders.
Beginner mental model
Read the first few high-importance files here, then follow their related-file links.
Expert explanation
This slice is assembled with path heuristics, which makes it strong for navigation and code reading but not a replacement for runtime tracing. Use it to discover likely boundaries, then validate by reading imports, exports, and orchestrator files.
Related files
| File | Lines | Importance | Exports |
|---|---|---|---|
| services/api/claude.ts | 3420 | high | getExtraBodyParams, getPromptCachingEnabled, getCacheControl, configureTaskBudgetParams |
| services/mcp/client.ts | 3349 | high | McpAuthError, McpToolCallError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, isMcpSessionExpiredError, clearMcpAuthCache |
| services/mcp/auth.ts | 2466 | high | normalizeOAuthErrorBody, AuthenticationCancelledError, getServerKey, hasMcpDiscoveryButNoToken |
| services/tools/toolExecution.ts | 1746 | high | HOOK_TIMING_DISPLAY_THRESHOLD_MS, classifyToolError, MessageUpdateLazy, McpServerType |
| services/compact/compact.ts | 1706 | high | POST_COMPACT_MAX_FILES_TO_RESTORE, POST_COMPACT_TOKEN_BUDGET, POST_COMPACT_MAX_TOKENS_PER_FILE, POST_COMPACT_MAX_TOKENS_PER_SKILL |
| services/mcp/config.ts | 1579 | high | getEnterpriseMcpFilePath, unwrapCcrProxyUrl, getMcpServerSignature, dedupPluginMcpServers |
| services/teamMemorySync/index.ts | 1257 | high | SyncState, createSyncState, hashContent, batchDeltaByBytes |
| services/api/errors.ts | 1208 | high | API_ERROR_MESSAGE_PREFIX, startsWithApiErrorPrefix, PROMPT_TOO_LONG_ERROR_MESSAGE, isPromptTooLongMessage |
| services/analytics/growthbook.ts | 1156 | high | GrowthBookUserAttributes, onGrowthBookRefresh, hasGrowthBookEnvOverride, getAllGrowthBookFeatures |
| services/mcp/useManageMCPConnections.ts | 1142 | high | useManageMCPConnections |
| services/plugins/pluginOperations.ts | 1089 | high | VALID_INSTALLABLE_SCOPES, InstallableScope, VALID_UPDATE_SCOPES, assertInstallableScope |
| services/PromptSuggestion/speculation.ts | 992 | high | ActiveSpeculationState, prepareMessagesForInjection, isSpeculationEnabled, startSpeculation |
| services/analytics/metadata.ts | 974 | high | AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, sanitizeToolNameForAnalytics, isToolDetailsLoggingEnabled, isAnalyticsToolDetailsLoggingEnabled |
| services/mockRateLimits.ts | 883 | high | MockHeaderKey, MockScenario, setMockHeader, addExceededLimit |
| services/api/withRetry.ts | 823 | high | BASE_DELAY_MS, RetryContext, CannotRetryError, FallbackTriggeredError |
| services/analytics/firstPartyEventLoggingExporter.ts | 807 | high | FirstPartyEventLoggingExporter |
| services/api/logging.ts | 789 | high | GlobalCacheStrategy, logAPIQuery, logAPIError, logAPISuccessAndDuration |
| services/api/filesApi.ts | 749 | high | File, FilesApiConfig, DownloadResult, downloadFile |
| services/api/promptCacheBreakDetection.ts | 728 | high | CACHE_TTL_1HOUR_MS, PromptStateSnapshot, recordPromptState, checkResponseForCacheBreak |
| utils/api.ts | 719 | high | CacheScope, SystemPromptBlock, toolToAPISchema, logAPIPrefix |
| services/tips/tipRegistry.ts | 687 | high | getRelevantTips |
| services/policyLimits/index.ts | 664 | high | _resetPolicyLimitsForTesting, initializePolicyLimitsLoadingPromise, isPolicyLimitsEligible, waitForPolicyLimitsToLoad |
| services/tools/toolHooks.ts | 651 | high | PostToolUseHooksResult, resolveHookPermissionDecision |
| services/remoteManagedSettings/index.ts | 639 | high | initializeRemoteManagedSettingsLoadingPromise, computeChecksumFromSettings, isEligibleForRemoteManagedSettings, waitForRemoteManagedSettingsToLoad |
| components/ConsoleOAuthFlow.tsx | 631 | high | ConsoleOAuthFlow |
| services/compact/sessionMemoryCompact.ts | 631 | high | SessionMemoryCompactConfig, DEFAULT_SM_COMPACT_CONFIG, setSessionMemoryCompactConfig, getSessionMemoryCompactConfig |
| services/extractMemories/extractMemories.ts | 616 | high | createAutoMemCanUseTool, initExtractMemories, executeExtractMemories, drainPendingExtraction |
| commands/install-github-app/install-github-app.tsx | 587 | high | call |
| services/settingsSync/index.ts | 582 | high | uploadUserSettingsInBackground, _resetDownloadPromiseForTesting, downloadUserSettings, redownloadUserSettings |
| services/mcp/utils.ts | 576 | high | filterToolsByServer, commandBelongsToServer, filterCommandsByServer, filterMcpPromptsByServer |
| services/oauth/client.ts | 567 | high | shouldUseClaudeAIAuth, parseScopes, buildAuthUrl, exchangeCodeForTokens |
| services/voiceStreamSTT.ts | 545 | high | FINALIZE_TIMEOUTS_MS, VoiceStreamCallbacks, FinalizeSource, VoiceStreamConnection |
| bridge/bridgeApi.ts | 540 | high | validateBridgeId, BridgeFatalError, createBridgeApiClient, isExpiredErrorType |
| services/compact/microCompact.ts | 531 | high | TIME_BASED_MC_CLEARED_MESSAGE, consumePendingCacheEdits, getPinnedCacheEdits, pinCacheEdits |
| services/tools/StreamingToolExecutor.ts | 531 | high | StreamingToolExecutor |
| services/voice.ts | 526 | high | _resetArecordProbeForTesting, _resetAlsaCardsForTesting, checkVoiceDependencies, RecordingAvailability |
| services/PromptSuggestion/promptSuggestion.ts | 524 | high | PromptVariant, getPromptVariant, shouldEnablePromptSuggestion, abortPromptSuggestion |
| services/claudeAiLimits.ts | 516 | high | getRateLimitDisplayName, OverageDisabledReason, ClaudeAILimits, currentLimits |
| services/api/sessionIngress.ts | 515 | high | appendSessionLog, getSessionLogs, getSessionLogsViaOAuth, getTeleportEvents |
| services/lsp/LSPServerInstance.ts | 512 | high | LSPServerInstance, createLSPServerInstance |
| services/mcp/xaa.ts | 512 | high | XaaTokenExchangeError, ProtectedResourceMetadata, discoverProtectedResource, AuthorizationServerMetadata |
| services/SessionMemory/sessionMemory.ts | 496 | high | resetLastMemoryMessageUuid, shouldExtractMemory, initSessionMemory, ManualExtractionResult |
| services/tokenEstimation.ts | 496 | high | countTokensWithAPI, countMessagesTokensWithAPI, roughTokenCountEstimation, bytesPerTokenForFileType |
| services/mcp/xaaIdpLogin.ts | 488 | high | isXaaEnabled, XaaIdpSettings, getXaaIdpSettings, IdpLoginOptions |
| utils/teleport/api.ts | 467 | high | CCR_BYOC_BETA, isTransientNetworkError, axiosGetWithRetry, SessionStatus |
| services/analytics/firstPartyEventLogger.ts | 450 | high | EventSamplingConfig, getEventSamplingConfig, shouldSampleEvent, shutdown1PEventLogging |
| services/lsp/LSPClient.ts | 448 | high | LSPClient, createLSPClient |
| services/lsp/LSPServerManager.ts | 421 | high | LSPServerManager, createLSPServerManager |
| services/vcr.ts | 407 | high | withVCR, withTokenCountVCR |
| services/diagnosticTracking.ts | 398 | high | Diagnostic, DiagnosticFile, DiagnosticTrackingService, diagnosticTracker |
| services/api/client.ts | 390 | high | getAnthropicClient, CLIENT_REQUEST_ID_HEADER |
| services/teamMemorySync/watcher.ts | 388 | high | isPermanentFailure, startTeamMemoryWatcher, notifyTeamMemoryWrite, stopTeamMemoryWatcher |
| services/lsp/LSPDiagnosticRegistry.ts | 387 | high | PendingLSPDiagnostic, registerPendingLSPDiagnostic, checkForLSPDiagnostics, clearAllLSPDiagnostics |
| services/compact/prompt.ts | 375 | high | getPartialCompactPrompt, getCompactPrompt, formatCompactSummary, getCompactUserSummaryMessage |
| services/api/grove.ts | 358 | high | AccountSettings, GroveConfig, ApiResult, getGroveSettings |
| services/compact/autoCompact.ts | 352 | high | getEffectiveContextWindowSize, AutoCompactTrackingState, AUTOCOMPACT_BUFFER_TOKENS, WARNING_THRESHOLD_BUFFER_TOKENS |
| services/plugins/pluginCliCommands.ts | 345 | high | installPlugin, uninstallPlugin, enablePlugin, disablePlugin |
| services/rateLimitMessages.ts | 345 | high | RATE_LIMIT_ERROR_PREFIXES, isRateLimitErrorMessage, RateLimitMessage, getRateLimitMessage |
| services/lsp/passiveFeedback.ts | 329 | high | formatDiagnosticsForAttachment, HandlerRegistrationResult, registerLSPNotificationHandlers |
| commands/install-github-app/setupGitHubActions.ts | 326 | high | setupGitHubActions |
| services/SessionMemory/prompts.ts | 325 | high | DEFAULT_SESSION_MEMORY_TEMPLATE, loadSessionMemoryTemplate, loadSessionMemoryPrompt, isSessionMemoryEmpty |
| services/autoDream/autoDream.ts | 325 | high | initAutoDream, executeAutoDream |
| services/teamMemorySync/secretScanner.ts | 325 | high | SecretMatch, scanForSecrets, getSecretLabel, redactSecrets |
| services/mcp/channelNotification.ts | 317 | high | ChannelMessageNotificationSchema, CHANNEL_PERMISSION_METHOD, ChannelPermissionNotificationSchema, CHANNEL_PERMISSION_REQUEST_METHOD |
| services/mcp/elicitationHandler.ts | 314 | high | ElicitationWaitingState, ElicitationRequestEvent, registerElicitationHandler, runElicitationHooks |
| services/analytics/datadog.ts | 308 | high | initializeDatadog, shutdownDatadog, trackDatadogEvent |
| utils/heapDumpService.ts | 304 | high | HeapDumpResult, MemoryDiagnostics, captureMemoryDiagnostics, performHeapDump |
| services/lsp/manager.ts | 290 | high | _resetLspManagerForTesting, getLspServerManager, getInitializationStatus, isLspConnected |
| services/api/referral.ts | 282 | high | fetchReferralEligibility, fetchReferralRedemptions, checkCachedPassesEligibility, formatCreditAmount |
| commands/install-github-app/OAuthFlowStep.tsx | 276 | high | OAuthFlowStep |
| services/api/errorUtils.ts | 261 | high | ConnectionErrorDetails, extractConnectionErrorDetails, getSSLErrorHint, sanitizeAPIError |
| services/mcp/types.ts | 259 | high | ConfigScopeSchema, ConfigScope, TransportSchema, Transport |
| services/mcp/channelPermissions.ts | 241 | high | isChannelPermissionRelayEnabled, ChannelPermissionResponse, ChannelPermissionCallbacks, PERMISSION_REPLY_RE |
| constants/oauth.ts | 235 | high | fileSuffixForOauthConfig, CLAUDE_AI_INFERENCE_SCOPE, CLAUDE_AI_PROFILE_SCOPE, OAUTH_BETA_HEADER |
| commands/install-github-app/ApiKeyStep.tsx | 231 | high | ApiKeyStep |
| services/api/dumpPrompts.ts | 227 | high | getLastApiRequests, clearApiRequestCache, clearDumpState, clearAllDumpState |
| commands/install-github-app/ChooseRepoStep.tsx | 211 | high | ChooseRepoStep |
| utils/suggestions/slackChannelSuggestions.ts | 210 | high | subscribeKnownChannels, hasSlackMcpServer, getKnownChannelsVersion, findSlackChannelPositions |
| services/SessionMemory/sessionMemoryUtils.ts | 208 | high | SessionMemoryConfig, DEFAULT_SESSION_MEMORY_CONFIG, getLastSummarizedMessageId, setLastSummarizedMessageId |
| commands/install-github-app/CheckExistingSecretStep.tsx | 190 | high | CheckExistingSecretStep |
| services/tools/toolOrchestration.ts | 189 | high | MessageUpdate |
| commands/remote-setup/api.ts | 183 | high | RedactedGithubToken, ImportTokenResult, ImportTokenError, importGithubToken |
| services/AgentSummary/agentSummary.ts | 180 | high | startAgentSummarization |
| services/analytics/index.ts | 174 | high | AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, AnalyticsMetadata_I_VERIFIED_THIS_IS_PII_TAGGED, stripProtoFields, AnalyticsSink |
| bridge/codeSessionApi.ts | 169 | high | createCodeSession, RemoteCredentials, fetchRemoteCredentials |
| services/mcp/claudeai.ts | 165 | high | fetchClaudeAIMcpConfigsIfEligible, clearClaudeAIMcpConfigsCache, markClaudeAiMcpConnected, hasClaudeAiMcpEverConnected |
| utils/githubRepoPathMapping.ts | 163 | high | updateGithubRepoPathMapping, getKnownPathsForRepo, filterExistingPaths, validateRepoAtPath |
| services/teamMemorySync/types.ts | 157 | high | TeamMemoryContentSchema, TeamMemoryDataSchema, TeamMemoryTooManyEntriesSchema, TeamMemoryData |
| services/extractMemories/prompts.ts | 155 | high | buildExtractAutoOnlyPrompt, buildExtractCombinedPrompt |
| services/compact/apiMicrocompact.ts | 154 | high | ContextEditStrategy, ContextManagementConfig, getAPIContextManagement |
| constants/github-app.ts | 145 | high | PR_TITLE, GITHUB_ACTION_SETUP_DOCS_URL, WORKFLOW_CONTENT, PR_BODY |
| services/rateLimitMocking.ts | 145 | high | processRateLimitHeaders, shouldProcessRateLimits, checkMockRateLimitError, isMockRateLimitError |
| services/api/bootstrap.ts | 142 | high | fetchBootstrapData |
| components/messages/SystemAPIErrorMessage.tsx | 141 | high | SystemAPIErrorMessage |
| services/autoDream/consolidationLock.ts | 141 | high | readLastConsolidatedAt, tryAcquireConsolidationLock, rollbackConsolidationLock, listSessionsTouchedSince |
| services/mcp/headersHelper.ts | 139 | high | getMcpHeadersFromHelper, getMcpServerHeaders |
| services/api/overageCreditGrant.ts | 138 | high | OverageCreditGrantInfo, getCachedOverageCreditGrant, invalidateOverageCreditGrantCache, refreshOverageCreditGrantCache |
| services/mcp/SdkControlTransport.ts | 137 | high | SendMcpMessageCallback, SdkControlClientTransport, SdkControlServerTransport |
| components/ApproveApiKey.tsx | 123 | high | ApproveApiKey |
| services/api/adminRequests.ts | 120 | high | AdminRequestType, AdminRequestStatus, AdminRequestSeatUpgradeDetails, AdminRequestCreateParams |
| services/analytics/sink.ts | 115 | high | initializeAnalyticsGates, initializeAnalyticsSink |
| services/mcp/vscodeSdkMcp.ts | 113 | high | LogEventNotificationSchema, notifyVscodeFileUpdated, setupVscodeSdkMcp |
| services/remoteManagedSettings/syncCache.ts | 113 | high | resetSyncCache, isRemoteManagedSettingsEligible |
| services/toolUseSummary/toolUseSummaryGenerator.ts | 113 | high | GenerateToolUseSummaryParams, generateToolUseSummary |
| services/mcp/mcpStringUtils.ts | 107 | high | mcpInfoFromString, getMcpPrefix, buildMcpToolName, getToolNameForPermissionCheck |
| commands/install-github-app/ExistingWorkflowStep.tsx | 103 | high | ExistingWorkflowStep |
| services/remoteManagedSettings/syncCacheState.ts | 97 | high | setSessionCache, resetSyncCache, setEligibility, getSettingsPath |
| commands/install-github-app/SuccessStep.tsx | 96 | high | SuccessStep |
| constants/apiLimits.ts | 95 | high | API_IMAGE_MAX_BASE64_SIZE, IMAGE_TARGET_RAW_SIZE, IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT |
| commands/install-github-app/InstallAppStep.tsx | 94 | high | InstallAppStep |
| commands/install-github-app/ErrorStep.tsx | 85 | high | ErrorStep |
| hooks/useApiKeyVerification.ts | 85 | high | VerificationStatus, ApiKeyVerificationResult, useApiKeyVerification |
| services/mcp/oauthPort.ts | 79 | high | buildRedirectUri, findAvailablePort |
| services/compact/postCompactCleanup.ts | 78 | high | runPostCompactCleanup |
| services/mcp/channelAllowlist.ts | 77 | high | ChannelAllowlistEntry, getChannelAllowlist, isChannelsEnabled, isChannelAllowlisted |
| services/awaySummary.ts | 75 | high | generateAwaySummary |
| services/remoteManagedSettings/securityCheck.tsx | 74 | high | SecurityCheckResult, checkManagedSettingsSecurity, handleSecurityCheckResult |
| commands/install-github-app/WarningsStep.tsx | 73 | high | WarningsStep |
| services/mcp/MCPConnectionManager.tsx | 73 | high | useMcpReconnect, useMcpToggleEnabled, MCPConnectionManager |
| services/mcp/officialRegistry.ts | 73 | high | prefetchOfficialMcpUrls, isOfficialMcpUrl, resetOfficialMcpUrlsForTesting |
| utils/fileOperationAnalytics.ts | 72 | high | logFileOperation |
| services/settingsSync/types.ts | 68 | high | UserSyncContentSchema, UserSyncDataSchema, UserSyncData, SettingsSyncFetchResult |
| commands/install-github-app/CreatingStep.tsx | 65 | high | CreatingStep |
| services/compact/grouping.ts | 64 | high | groupMessagesByApiRound |
| services/mcp/InProcessTransport.ts | 64 | high | createLinkedTransportPair |
| services/oauth/getOauthProfile.ts | 54 | high | getOauthProfileFromApiKey, getOauthProfileFromOauthToken |
| services/teamMemorySync/teamMemSecretGuard.ts | 45 | high | checkTeamMemSecrets |
| services/compact/timeBasedMCConfig.ts | 44 | high | TimeBasedMCConfig, getTimeBasedMCConfig |
| services/mcpServerApproval.tsx | 41 | high | handleMcpjsonServerApprovals |
| services/api/ultrareviewQuota.ts | 39 | high | UltrareviewQuotaResponse, fetchUltrareviewQuota |
| services/mcp/envExpansion.ts | 39 | high | expandEnvVarsInString |
| services/remoteManagedSettings/types.ts | 32 | high | RemoteManagedSettingsResponseSchema, RemoteManagedSettingsResponse, RemoteManagedSettingsFetchResult |
| commands/install-slack-app/install-slack-app.ts | 31 | high | call |
| services/analytics/sinkKillswitch.ts | 26 | high | SinkName, isSinkKilled |
| services/mcp/normalization.ts | 24 | high | normalizeNameForMCP |
| services/compact/compactWarningState.ts | 19 | high | compactWarningStore, suppressCompactWarning, clearCompactWarningSuppression |
| services/tips/tipHistory.ts | 18 | high | recordTipShown, getSessionsSinceLastShown |
| services/compact/compactWarningHook.ts | 17 | high | useCompactWarningSuppression |
| commands/install-github-app/CheckGitHubStep.tsx | 15 | high | CheckGitHubStep |
| commands/install-github-app/index.ts | 14 | high | — |
| commands/install-slack-app/index.ts | 13 | high | — |
| commands/oauth-refresh/index.js | 2 | high | — |
| services/MagicDocs/magicDocs.ts | 255 | medium | clearTrackedMagicDocs, detectMagicDocHeader, registerMagicDoc, initMagicDocs |
| services/oauth/auth-code-listener.ts | 212 | medium | AuthCodeListener |
| services/oauth/index.ts | 199 | medium | OAuthService |
| skills/bundled/claudeApi.ts | 197 | medium | registerClaudeApiSkill |
| services/plugins/PluginInstallationManager.ts | 185 | medium | performBackgroundPluginInstallations |
| services/preventSleep.ts | 166 | medium | startPreventSleep, stopPreventSleep, forceStopPreventSleep |
| services/api/metricsOptOut.ts | 160 | medium | checkMetricsEnabled, _clearMetricsEnabledCacheForTesting |
| services/notifier.ts | 157 | medium | NotificationOptions, sendNotification |
| utils/hooks/apiQueryHookHelper.ts | 142 | medium | ApiQueryHookContext, ApiQueryHookConfig, ApiQueryResult, createApiQueryHook |
| services/MagicDocs/prompts.ts | 128 | medium | buildMagicDocsUpdatePrompt |
| services/voiceKeyterms.ts | 107 | medium | splitIdentifier, getVoiceKeyterms |
| services/internalLogging.ts | 91 | medium | getContainerId, logPermissionContextForAnts |
| services/lsp/config.ts | 80 | medium | getAllLspServers |
| skills/bundled/claudeApiContent.ts | 76 | medium | SKILL_MODEL_VARS, SKILL_PROMPT, SKILL_FILES |
| utils/apiPreconnect.ts | 72 | medium | preconnectAnthropicApi |
| services/autoDream/consolidationPrompt.ts | 66 | medium | buildConsolidationPrompt |
| services/api/usage.ts | 64 | medium | RateLimit, ExtraUsage, Utilization, fetchUtilization |
| services/api/firstTokenDate.ts | 61 | medium | fetchAndStoreClaudeCodeFirstTokenDate |
| services/tips/tipScheduler.ts | 59 | medium | selectTipWithLongestTimeSinceShown, getTipToShowOnSpinner, recordShownTip |
| services/analytics/config.ts | 39 | medium | isAnalyticsDisabled, isFeedbackSurveyDisabled |
| utils/github/ghAuthStatus.ts | 30 | medium | GhAuthStatus, getGhAuthStatus |
| services/policyLimits/types.ts | 28 | medium | PolicyLimitsResponseSchema, PolicyLimitsResponse, PolicyLimitsFetchResult |
| services/claudeAiLimitsHook.ts | 24 | medium | useClaudeAiLimits |
| services/oauth/crypto.ts | 24 | medium | generateCodeVerifier, generateCodeChallenge, generateState |
| services/api/emptyUsage.ts | 23 | medium | EMPTY_USAGE |
| services/autoDream/config.ts | 22 | medium | isAutoDreamEnabled |