Architecture

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

FileLinesImportanceExports
services/api/claude.ts3420highgetExtraBodyParams, getPromptCachingEnabled, getCacheControl, configureTaskBudgetParams
services/mcp/client.ts3349highMcpAuthError, McpToolCallError_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, isMcpSessionExpiredError, clearMcpAuthCache
services/mcp/auth.ts2466highnormalizeOAuthErrorBody, AuthenticationCancelledError, getServerKey, hasMcpDiscoveryButNoToken
services/tools/toolExecution.ts1746highHOOK_TIMING_DISPLAY_THRESHOLD_MS, classifyToolError, MessageUpdateLazy, McpServerType
services/compact/compact.ts1706highPOST_COMPACT_MAX_FILES_TO_RESTORE, POST_COMPACT_TOKEN_BUDGET, POST_COMPACT_MAX_TOKENS_PER_FILE, POST_COMPACT_MAX_TOKENS_PER_SKILL
services/mcp/config.ts1579highgetEnterpriseMcpFilePath, unwrapCcrProxyUrl, getMcpServerSignature, dedupPluginMcpServers
services/teamMemorySync/index.ts1257highSyncState, createSyncState, hashContent, batchDeltaByBytes
services/api/errors.ts1208highAPI_ERROR_MESSAGE_PREFIX, startsWithApiErrorPrefix, PROMPT_TOO_LONG_ERROR_MESSAGE, isPromptTooLongMessage
services/analytics/growthbook.ts1156highGrowthBookUserAttributes, onGrowthBookRefresh, hasGrowthBookEnvOverride, getAllGrowthBookFeatures
services/mcp/useManageMCPConnections.ts1142highuseManageMCPConnections
services/plugins/pluginOperations.ts1089highVALID_INSTALLABLE_SCOPES, InstallableScope, VALID_UPDATE_SCOPES, assertInstallableScope
services/PromptSuggestion/speculation.ts992highActiveSpeculationState, prepareMessagesForInjection, isSpeculationEnabled, startSpeculation
services/analytics/metadata.ts974highAnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, sanitizeToolNameForAnalytics, isToolDetailsLoggingEnabled, isAnalyticsToolDetailsLoggingEnabled
services/mockRateLimits.ts883highMockHeaderKey, MockScenario, setMockHeader, addExceededLimit
services/api/withRetry.ts823highBASE_DELAY_MS, RetryContext, CannotRetryError, FallbackTriggeredError
services/analytics/firstPartyEventLoggingExporter.ts807highFirstPartyEventLoggingExporter
services/api/logging.ts789highGlobalCacheStrategy, logAPIQuery, logAPIError, logAPISuccessAndDuration
services/api/filesApi.ts749highFile, FilesApiConfig, DownloadResult, downloadFile
services/api/promptCacheBreakDetection.ts728highCACHE_TTL_1HOUR_MS, PromptStateSnapshot, recordPromptState, checkResponseForCacheBreak
utils/api.ts719highCacheScope, SystemPromptBlock, toolToAPISchema, logAPIPrefix
services/tips/tipRegistry.ts687highgetRelevantTips
services/policyLimits/index.ts664high_resetPolicyLimitsForTesting, initializePolicyLimitsLoadingPromise, isPolicyLimitsEligible, waitForPolicyLimitsToLoad
services/tools/toolHooks.ts651highPostToolUseHooksResult, resolveHookPermissionDecision
services/remoteManagedSettings/index.ts639highinitializeRemoteManagedSettingsLoadingPromise, computeChecksumFromSettings, isEligibleForRemoteManagedSettings, waitForRemoteManagedSettingsToLoad
components/ConsoleOAuthFlow.tsx631highConsoleOAuthFlow
services/compact/sessionMemoryCompact.ts631highSessionMemoryCompactConfig, DEFAULT_SM_COMPACT_CONFIG, setSessionMemoryCompactConfig, getSessionMemoryCompactConfig
services/extractMemories/extractMemories.ts616highcreateAutoMemCanUseTool, initExtractMemories, executeExtractMemories, drainPendingExtraction
commands/install-github-app/install-github-app.tsx587highcall
services/settingsSync/index.ts582highuploadUserSettingsInBackground, _resetDownloadPromiseForTesting, downloadUserSettings, redownloadUserSettings
services/mcp/utils.ts576highfilterToolsByServer, commandBelongsToServer, filterCommandsByServer, filterMcpPromptsByServer
services/oauth/client.ts567highshouldUseClaudeAIAuth, parseScopes, buildAuthUrl, exchangeCodeForTokens
services/voiceStreamSTT.ts545highFINALIZE_TIMEOUTS_MS, VoiceStreamCallbacks, FinalizeSource, VoiceStreamConnection
bridge/bridgeApi.ts540highvalidateBridgeId, BridgeFatalError, createBridgeApiClient, isExpiredErrorType
services/compact/microCompact.ts531highTIME_BASED_MC_CLEARED_MESSAGE, consumePendingCacheEdits, getPinnedCacheEdits, pinCacheEdits
services/tools/StreamingToolExecutor.ts531highStreamingToolExecutor
services/voice.ts526high_resetArecordProbeForTesting, _resetAlsaCardsForTesting, checkVoiceDependencies, RecordingAvailability
services/PromptSuggestion/promptSuggestion.ts524highPromptVariant, getPromptVariant, shouldEnablePromptSuggestion, abortPromptSuggestion
services/claudeAiLimits.ts516highgetRateLimitDisplayName, OverageDisabledReason, ClaudeAILimits, currentLimits
services/api/sessionIngress.ts515highappendSessionLog, getSessionLogs, getSessionLogsViaOAuth, getTeleportEvents
services/lsp/LSPServerInstance.ts512highLSPServerInstance, createLSPServerInstance
services/mcp/xaa.ts512highXaaTokenExchangeError, ProtectedResourceMetadata, discoverProtectedResource, AuthorizationServerMetadata
services/SessionMemory/sessionMemory.ts496highresetLastMemoryMessageUuid, shouldExtractMemory, initSessionMemory, ManualExtractionResult
services/tokenEstimation.ts496highcountTokensWithAPI, countMessagesTokensWithAPI, roughTokenCountEstimation, bytesPerTokenForFileType
services/mcp/xaaIdpLogin.ts488highisXaaEnabled, XaaIdpSettings, getXaaIdpSettings, IdpLoginOptions
utils/teleport/api.ts467highCCR_BYOC_BETA, isTransientNetworkError, axiosGetWithRetry, SessionStatus
services/analytics/firstPartyEventLogger.ts450highEventSamplingConfig, getEventSamplingConfig, shouldSampleEvent, shutdown1PEventLogging
services/lsp/LSPClient.ts448highLSPClient, createLSPClient
services/lsp/LSPServerManager.ts421highLSPServerManager, createLSPServerManager
services/vcr.ts407highwithVCR, withTokenCountVCR
services/diagnosticTracking.ts398highDiagnostic, DiagnosticFile, DiagnosticTrackingService, diagnosticTracker
services/api/client.ts390highgetAnthropicClient, CLIENT_REQUEST_ID_HEADER
services/teamMemorySync/watcher.ts388highisPermanentFailure, startTeamMemoryWatcher, notifyTeamMemoryWrite, stopTeamMemoryWatcher
services/lsp/LSPDiagnosticRegistry.ts387highPendingLSPDiagnostic, registerPendingLSPDiagnostic, checkForLSPDiagnostics, clearAllLSPDiagnostics
services/compact/prompt.ts375highgetPartialCompactPrompt, getCompactPrompt, formatCompactSummary, getCompactUserSummaryMessage
services/api/grove.ts358highAccountSettings, GroveConfig, ApiResult, getGroveSettings
services/compact/autoCompact.ts352highgetEffectiveContextWindowSize, AutoCompactTrackingState, AUTOCOMPACT_BUFFER_TOKENS, WARNING_THRESHOLD_BUFFER_TOKENS
services/plugins/pluginCliCommands.ts345highinstallPlugin, uninstallPlugin, enablePlugin, disablePlugin
services/rateLimitMessages.ts345highRATE_LIMIT_ERROR_PREFIXES, isRateLimitErrorMessage, RateLimitMessage, getRateLimitMessage
services/lsp/passiveFeedback.ts329highformatDiagnosticsForAttachment, HandlerRegistrationResult, registerLSPNotificationHandlers
commands/install-github-app/setupGitHubActions.ts326highsetupGitHubActions
services/SessionMemory/prompts.ts325highDEFAULT_SESSION_MEMORY_TEMPLATE, loadSessionMemoryTemplate, loadSessionMemoryPrompt, isSessionMemoryEmpty
services/autoDream/autoDream.ts325highinitAutoDream, executeAutoDream
services/teamMemorySync/secretScanner.ts325highSecretMatch, scanForSecrets, getSecretLabel, redactSecrets
services/mcp/channelNotification.ts317highChannelMessageNotificationSchema, CHANNEL_PERMISSION_METHOD, ChannelPermissionNotificationSchema, CHANNEL_PERMISSION_REQUEST_METHOD
services/mcp/elicitationHandler.ts314highElicitationWaitingState, ElicitationRequestEvent, registerElicitationHandler, runElicitationHooks
services/analytics/datadog.ts308highinitializeDatadog, shutdownDatadog, trackDatadogEvent
utils/heapDumpService.ts304highHeapDumpResult, MemoryDiagnostics, captureMemoryDiagnostics, performHeapDump
services/lsp/manager.ts290high_resetLspManagerForTesting, getLspServerManager, getInitializationStatus, isLspConnected
services/api/referral.ts282highfetchReferralEligibility, fetchReferralRedemptions, checkCachedPassesEligibility, formatCreditAmount
commands/install-github-app/OAuthFlowStep.tsx276highOAuthFlowStep
services/api/errorUtils.ts261highConnectionErrorDetails, extractConnectionErrorDetails, getSSLErrorHint, sanitizeAPIError
services/mcp/types.ts259highConfigScopeSchema, ConfigScope, TransportSchema, Transport
services/mcp/channelPermissions.ts241highisChannelPermissionRelayEnabled, ChannelPermissionResponse, ChannelPermissionCallbacks, PERMISSION_REPLY_RE
constants/oauth.ts235highfileSuffixForOauthConfig, CLAUDE_AI_INFERENCE_SCOPE, CLAUDE_AI_PROFILE_SCOPE, OAUTH_BETA_HEADER
commands/install-github-app/ApiKeyStep.tsx231highApiKeyStep
services/api/dumpPrompts.ts227highgetLastApiRequests, clearApiRequestCache, clearDumpState, clearAllDumpState
commands/install-github-app/ChooseRepoStep.tsx211highChooseRepoStep
utils/suggestions/slackChannelSuggestions.ts210highsubscribeKnownChannels, hasSlackMcpServer, getKnownChannelsVersion, findSlackChannelPositions
services/SessionMemory/sessionMemoryUtils.ts208highSessionMemoryConfig, DEFAULT_SESSION_MEMORY_CONFIG, getLastSummarizedMessageId, setLastSummarizedMessageId
commands/install-github-app/CheckExistingSecretStep.tsx190highCheckExistingSecretStep
services/tools/toolOrchestration.ts189highMessageUpdate
commands/remote-setup/api.ts183highRedactedGithubToken, ImportTokenResult, ImportTokenError, importGithubToken
services/AgentSummary/agentSummary.ts180highstartAgentSummarization
services/analytics/index.ts174highAnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, AnalyticsMetadata_I_VERIFIED_THIS_IS_PII_TAGGED, stripProtoFields, AnalyticsSink
bridge/codeSessionApi.ts169highcreateCodeSession, RemoteCredentials, fetchRemoteCredentials
services/mcp/claudeai.ts165highfetchClaudeAIMcpConfigsIfEligible, clearClaudeAIMcpConfigsCache, markClaudeAiMcpConnected, hasClaudeAiMcpEverConnected
utils/githubRepoPathMapping.ts163highupdateGithubRepoPathMapping, getKnownPathsForRepo, filterExistingPaths, validateRepoAtPath
services/teamMemorySync/types.ts157highTeamMemoryContentSchema, TeamMemoryDataSchema, TeamMemoryTooManyEntriesSchema, TeamMemoryData
services/extractMemories/prompts.ts155highbuildExtractAutoOnlyPrompt, buildExtractCombinedPrompt
services/compact/apiMicrocompact.ts154highContextEditStrategy, ContextManagementConfig, getAPIContextManagement
constants/github-app.ts145highPR_TITLE, GITHUB_ACTION_SETUP_DOCS_URL, WORKFLOW_CONTENT, PR_BODY
services/rateLimitMocking.ts145highprocessRateLimitHeaders, shouldProcessRateLimits, checkMockRateLimitError, isMockRateLimitError
services/api/bootstrap.ts142highfetchBootstrapData
components/messages/SystemAPIErrorMessage.tsx141highSystemAPIErrorMessage
services/autoDream/consolidationLock.ts141highreadLastConsolidatedAt, tryAcquireConsolidationLock, rollbackConsolidationLock, listSessionsTouchedSince
services/mcp/headersHelper.ts139highgetMcpHeadersFromHelper, getMcpServerHeaders
services/api/overageCreditGrant.ts138highOverageCreditGrantInfo, getCachedOverageCreditGrant, invalidateOverageCreditGrantCache, refreshOverageCreditGrantCache
services/mcp/SdkControlTransport.ts137highSendMcpMessageCallback, SdkControlClientTransport, SdkControlServerTransport
components/ApproveApiKey.tsx123highApproveApiKey
services/api/adminRequests.ts120highAdminRequestType, AdminRequestStatus, AdminRequestSeatUpgradeDetails, AdminRequestCreateParams
services/analytics/sink.ts115highinitializeAnalyticsGates, initializeAnalyticsSink
services/mcp/vscodeSdkMcp.ts113highLogEventNotificationSchema, notifyVscodeFileUpdated, setupVscodeSdkMcp
services/remoteManagedSettings/syncCache.ts113highresetSyncCache, isRemoteManagedSettingsEligible
services/toolUseSummary/toolUseSummaryGenerator.ts113highGenerateToolUseSummaryParams, generateToolUseSummary
services/mcp/mcpStringUtils.ts107highmcpInfoFromString, getMcpPrefix, buildMcpToolName, getToolNameForPermissionCheck
commands/install-github-app/ExistingWorkflowStep.tsx103highExistingWorkflowStep
services/remoteManagedSettings/syncCacheState.ts97highsetSessionCache, resetSyncCache, setEligibility, getSettingsPath
commands/install-github-app/SuccessStep.tsx96highSuccessStep
constants/apiLimits.ts95highAPI_IMAGE_MAX_BASE64_SIZE, IMAGE_TARGET_RAW_SIZE, IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT
commands/install-github-app/InstallAppStep.tsx94highInstallAppStep
commands/install-github-app/ErrorStep.tsx85highErrorStep
hooks/useApiKeyVerification.ts85highVerificationStatus, ApiKeyVerificationResult, useApiKeyVerification
services/mcp/oauthPort.ts79highbuildRedirectUri, findAvailablePort
services/compact/postCompactCleanup.ts78highrunPostCompactCleanup
services/mcp/channelAllowlist.ts77highChannelAllowlistEntry, getChannelAllowlist, isChannelsEnabled, isChannelAllowlisted
services/awaySummary.ts75highgenerateAwaySummary
services/remoteManagedSettings/securityCheck.tsx74highSecurityCheckResult, checkManagedSettingsSecurity, handleSecurityCheckResult
commands/install-github-app/WarningsStep.tsx73highWarningsStep
services/mcp/MCPConnectionManager.tsx73highuseMcpReconnect, useMcpToggleEnabled, MCPConnectionManager
services/mcp/officialRegistry.ts73highprefetchOfficialMcpUrls, isOfficialMcpUrl, resetOfficialMcpUrlsForTesting
utils/fileOperationAnalytics.ts72highlogFileOperation
services/settingsSync/types.ts68highUserSyncContentSchema, UserSyncDataSchema, UserSyncData, SettingsSyncFetchResult
commands/install-github-app/CreatingStep.tsx65highCreatingStep
services/compact/grouping.ts64highgroupMessagesByApiRound
services/mcp/InProcessTransport.ts64highcreateLinkedTransportPair
services/oauth/getOauthProfile.ts54highgetOauthProfileFromApiKey, getOauthProfileFromOauthToken
services/teamMemorySync/teamMemSecretGuard.ts45highcheckTeamMemSecrets
services/compact/timeBasedMCConfig.ts44highTimeBasedMCConfig, getTimeBasedMCConfig
services/mcpServerApproval.tsx41highhandleMcpjsonServerApprovals
services/api/ultrareviewQuota.ts39highUltrareviewQuotaResponse, fetchUltrareviewQuota
services/mcp/envExpansion.ts39highexpandEnvVarsInString
services/remoteManagedSettings/types.ts32highRemoteManagedSettingsResponseSchema, RemoteManagedSettingsResponse, RemoteManagedSettingsFetchResult
commands/install-slack-app/install-slack-app.ts31highcall
services/analytics/sinkKillswitch.ts26highSinkName, isSinkKilled
services/mcp/normalization.ts24highnormalizeNameForMCP
services/compact/compactWarningState.ts19highcompactWarningStore, suppressCompactWarning, clearCompactWarningSuppression
services/tips/tipHistory.ts18highrecordTipShown, getSessionsSinceLastShown
services/compact/compactWarningHook.ts17highuseCompactWarningSuppression
commands/install-github-app/CheckGitHubStep.tsx15highCheckGitHubStep
commands/install-github-app/index.ts14high
commands/install-slack-app/index.ts13high
commands/oauth-refresh/index.js2high
services/MagicDocs/magicDocs.ts255mediumclearTrackedMagicDocs, detectMagicDocHeader, registerMagicDoc, initMagicDocs
services/oauth/auth-code-listener.ts212mediumAuthCodeListener
services/oauth/index.ts199mediumOAuthService
skills/bundled/claudeApi.ts197mediumregisterClaudeApiSkill
services/plugins/PluginInstallationManager.ts185mediumperformBackgroundPluginInstallations
services/preventSleep.ts166mediumstartPreventSleep, stopPreventSleep, forceStopPreventSleep
services/api/metricsOptOut.ts160mediumcheckMetricsEnabled, _clearMetricsEnabledCacheForTesting
services/notifier.ts157mediumNotificationOptions, sendNotification
utils/hooks/apiQueryHookHelper.ts142mediumApiQueryHookContext, ApiQueryHookConfig, ApiQueryResult, createApiQueryHook
services/MagicDocs/prompts.ts128mediumbuildMagicDocsUpdatePrompt
services/voiceKeyterms.ts107mediumsplitIdentifier, getVoiceKeyterms
services/internalLogging.ts91mediumgetContainerId, logPermissionContextForAnts
services/lsp/config.ts80mediumgetAllLspServers
skills/bundled/claudeApiContent.ts76mediumSKILL_MODEL_VARS, SKILL_PROMPT, SKILL_FILES
utils/apiPreconnect.ts72mediumpreconnectAnthropicApi
services/autoDream/consolidationPrompt.ts66mediumbuildConsolidationPrompt
services/api/usage.ts64mediumRateLimit, ExtraUsage, Utilization, fetchUtilization
services/api/firstTokenDate.ts61mediumfetchAndStoreClaudeCodeFirstTokenDate
services/tips/tipScheduler.ts59mediumselectTipWithLongestTimeSinceShown, getTipToShowOnSpinner, recordShownTip
services/analytics/config.ts39mediumisAnalyticsDisabled, isFeedbackSurveyDisabled
utils/github/ghAuthStatus.ts30mediumGhAuthStatus, getGhAuthStatus
services/policyLimits/types.ts28mediumPolicyLimitsResponseSchema, PolicyLimitsResponse, PolicyLimitsFetchResult
services/claudeAiLimitsHook.ts24mediumuseClaudeAiLimits
services/oauth/crypto.ts24mediumgenerateCodeVerifier, generateCodeChallenge, generateState
services/api/emptyUsage.ts23mediumEMPTY_USAGE
services/autoDream/config.ts22mediumisAutoDreamEnabled