Architecture

Remote and bridge

Remote execution, bridge transport, cross-process messaging, and session handoff.

68
Matched files
12
Top dirs
22,330
Lines in slice
270
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
bridge/bridgeMain.ts3000highBackoffConfig, runBridgeLoop, isConnectionError, isServerError
bridge/replBridge.ts2407highReplBridgeHandle, BridgeState, BridgeCoreParams, BridgeCoreHandle
bridge/remoteBridgeCore.ts1009highEnvLessBridgeParams, initEnvLessBridgeCore, fetchRemoteCredentials, createCodeSession
components/tasks/RemoteSessionDetailDialog.tsx904highformatToolUseSummary, RemoteSessionDetailDialog
tasks/RemoteAgentTask/RemoteAgentTask.tsx856highRemoteAgentTaskState, RemoteTaskType, AutofixPrRemoteTaskMetadata, RemoteTaskMetadata
hooks/useReplBridge.tsx723highBRIDGE_FAILURE_DISMISS_MS, useReplBridge
components/mcp/MCPRemoteServerMenu.tsx649highMCPRemoteServerMenu
services/remoteManagedSettings/index.ts639highinitializeRemoteManagedSettingsLoadingPromise, computeChecksumFromSettings, isEligibleForRemoteManagedSettings, waitForRemoteManagedSettingsToLoad
hooks/useRemoteSession.ts606highuseRemoteSession
bridge/initReplBridge.ts570highInitBridgeOptions, initReplBridge
bridge/sessionRunner.ts551highsafeFilenameId, PermissionRequest, createSessionSpawner, extractActivities
bridge/bridgeApi.ts540highvalidateBridgeId, BridgeFatalError, createBridgeApiClient, isExpiredErrorType
bridge/bridgeUI.ts531highcreateBridgeLogger
commands/bridge/bridge.tsx509highcall
bridge/bridgeMessaging.ts462highisSDKMessage, isSDKControlResponse, isSDKControlRequest, isEligibleBridgeMessage
skills/bundled/scheduleRemoteAgents.ts448highregisterScheduleRemoteAgentsSkill
remote/SessionsWebSocket.ts405highSessionsWebSocketCallbacks, SessionsWebSocket
components/BridgeDialog.tsx401highBridgeDialog
bridge/createSession.ts385highcreateBridgeSession, getBridgeSession, archiveBridgeSession, updateBridgeSessionTitle
bridge/replBridgeTransport.ts371highReplBridgeTransport, createV1ReplTransport, createV2ReplTransport
remote/RemoteSessionManager.ts344highRemotePermissionResponse, RemoteSessionConfig, RemoteSessionCallbacks, RemoteSessionManager
components/RemoteEnvironmentDialog.tsx340highRemoteEnvironmentDialog
commands/review/reviewRemote.ts317highconfirmOverage, OverageGate, checkOverageGate, launchRemoteReview
remote/sdkMessageAdapter.ts303highConvertedMessage, convertSDKMessage, isSessionEndMessage, isSuccessResult
bridge/types.ts263highDEFAULT_SESSION_TIMEOUT_MS, BRIDGE_LOGIN_INSTRUCTION, BRIDGE_LOGIN_ERROR, REMOTE_CONTROL_DISCONNECTED_MSG
components/tasks/RemoteSessionProgress.tsx243highformatReviewStageCounts, RemoteSessionProgress
utils/background/remote/preconditions.ts236highcheckNeedsClaudeAiLogin, checkIsGitClean, checkHasRemoteEnvironment, checkIsInGitRepo
bridge/bridgePointer.ts211highBRIDGE_POINTER_TTL_MS, BridgePointer, getBridgePointerPath, writeBridgePointer
bridge/bridgeEnabled.ts203highisBridgeEnabled, isBridgeEnabledBlocking, getBridgeDisabledReason, isEnvLessBridgeEnabled
commands/bridge-kick.ts201high
commands/remote-setup/remote-setup.tsx187highcall
commands/remote-setup/api.ts183highRedactedGithubToken, ImportTokenResult, ImportTokenError, importGithubToken
bridge/inboundAttachments.ts176highInboundAttachment, extractInboundAttachments, resolveInboundAttachments, prependPathRefs
bridge/codeSessionApi.ts169highcreateCodeSession, RemoteCredentials, fetchRemoteCredentials
bridge/envLessBridgeConfig.ts166highEnvLessBridgeConfig, DEFAULT_ENV_LESS_BRIDGE_CONFIG, getEnvLessBridgeConfig, checkEnvLessBridgeMinVersion
bridge/bridgeStatusUtil.ts164highStatusState, TOOL_DISPLAY_EXPIRY_MS, SHIMMER_INTERVAL_MS, timestamp
tools/RemoteTriggerTool/RemoteTriggerTool.ts162highInput, Output, RemoteTriggerTool
bridge/debugUtils.ts142highredactSecrets, debugTruncate, debugBody, describeAxiosError
bridge/bridgeDebug.ts136highBridgeDebugHandle, registerBridgeDebugHandle, clearBridgeDebugHandle, getBridgeDebugHandle
bridge/workSecret.ts128highdecodeWorkSecret, buildSdkUrl, sameSessionId, buildCCRv2SdkUrl
services/remoteManagedSettings/syncCache.ts113highresetSyncCache, isRemoteManagedSettingsEligible
utils/background/remote/remoteSession.ts99highBackgroundRemoteSession, BackgroundRemoteSessionPrecondition, checkBackgroundRemoteSessionEligibility
services/remoteManagedSettings/syncCacheState.ts97highsetSessionCache, resetSyncCache, setEligibility, getSettingsPath
remote/remotePermissionBridge.ts79highcreateSyntheticAssistantMessage, createToolStub
components/RemoteCallout.tsx76highRemoteCallout, shouldShowRemoteCallout
services/remoteManagedSettings/securityCheck.tsx74highSecurityCheckResult, checkManagedSettingsSecurity, handleSecurityCheckResult
bridge/sessionIdCompat.ts58highsetCseShimGate, toCompatSessionId, toInfraSessionId
utils/swarm/leaderPermissionBridge.ts55highSetToolUseConfirmQueueFn, SetToolPermissionContextFn, registerLeaderToolUseConfirmQueue, getLeaderToolUseConfirmQueue
bridge/bridgePermissionCallbacks.ts44highisBridgePermissionResponse
services/remoteManagedSettings/types.ts32highRemoteManagedSettingsResponseSchema, RemoteManagedSettingsResponse, RemoteManagedSettingsFetchResult
commands/bridge/index.ts27high
commands/remote-setup/index.ts21high
tools/RemoteTriggerTool/UI.tsx17highrenderToolUseMessage, renderToolResultMessage
commands/remote-env/index.ts16high
tools/RemoteTriggerTool/prompt.ts16highREMOTE_TRIGGER_TOOL_NAME, DESCRIPTION, PROMPT
commands/remote-env/remote-env.tsx7highcall
bridge/jwtUtils.ts257mediumdecodeJwtPayload, decodeJwtExpiry, createTokenRefreshScheduler
cli/remoteIO.ts256mediumRemoteIO
bridge/trustedDevice.ts211mediumgetTrustedDeviceToken, clearTrustedDeviceTokenCache, clearTrustedDeviceToken, enrollTrustedDevice
bridge/pollConfig.ts111mediumgetPollIntervalConfig
bridge/pollConfigDefaults.ts83mediumPollIntervalConfig, DEFAULT_POLL_CONFIG
bridge/inboundMessages.ts81mediumextractInboundMessageFields, normalizeImageBlocks
bridge/flushGate.ts72mediumFlushGate
bridge/capacityWake.ts57mediumCapacitySignal, CapacityWake, createCapacityWake
bridge/bridgeConfig.ts49mediumgetBridgeTokenOverride, getBridgeBaseUrlOverride, getBridgeAccessToken, getBridgeBaseUrl
bridge/replBridgeHandle.ts37mediumsetReplBridgeHandle, getReplBridgeHandle, getSelfBridgeCompatId
migrations/migrateReplBridgeEnabledToRemoteControlAtStartup.ts23mediummigrateReplBridgeEnabledToRemoteControlAtStartup
hooks/useMailboxBridge.ts22mediumuseMailboxBridge