Copy disabled (too large)
Download .txt
Showing preview only (30,917K chars total). Download the full file to get everything.
Repository: ChinaSiro/claude-code-sourcemap
Branch: main
Commit: a8a678cb6244
Files: 1925
Total size: 71.3 MB
Directory structure:
gitextract_kbo2q3kg/
├── README.md
├── claude-code-2.1.88.tgz
├── extract-sources.js
├── package/
│ ├── LICENSE.md
│ ├── README.md
│ ├── cli.js
│ ├── package.json
│ ├── sdk-tools.d.ts
│ └── vendor/
│ ├── audio-capture/
│ │ ├── arm64-darwin/
│ │ │ └── audio-capture.node
│ │ ├── arm64-linux/
│ │ │ └── audio-capture.node
│ │ ├── arm64-win32/
│ │ │ └── audio-capture.node
│ │ ├── x64-darwin/
│ │ │ └── audio-capture.node
│ │ ├── x64-linux/
│ │ │ └── audio-capture.node
│ │ └── x64-win32/
│ │ └── audio-capture.node
│ └── ripgrep/
│ ├── COPYING
│ ├── arm64-darwin/
│ │ └── rg
│ ├── arm64-linux/
│ │ └── rg
│ ├── x64-darwin/
│ │ └── rg
│ └── x64-linux/
│ └── rg
└── restored-src/
├── src/
│ ├── QueryEngine.ts
│ ├── Task.ts
│ ├── Tool.ts
│ ├── assistant/
│ │ └── sessionHistory.ts
│ ├── bootstrap/
│ │ └── state.ts
│ ├── bridge/
│ │ ├── bridgeApi.ts
│ │ ├── bridgeConfig.ts
│ │ ├── bridgeDebug.ts
│ │ ├── bridgeEnabled.ts
│ │ ├── bridgeMain.ts
│ │ ├── bridgeMessaging.ts
│ │ ├── bridgePermissionCallbacks.ts
│ │ ├── bridgePointer.ts
│ │ ├── bridgeStatusUtil.ts
│ │ ├── bridgeUI.ts
│ │ ├── capacityWake.ts
│ │ ├── codeSessionApi.ts
│ │ ├── createSession.ts
│ │ ├── debugUtils.ts
│ │ ├── envLessBridgeConfig.ts
│ │ ├── flushGate.ts
│ │ ├── inboundAttachments.ts
│ │ ├── inboundMessages.ts
│ │ ├── initReplBridge.ts
│ │ ├── jwtUtils.ts
│ │ ├── pollConfig.ts
│ │ ├── pollConfigDefaults.ts
│ │ ├── remoteBridgeCore.ts
│ │ ├── replBridge.ts
│ │ ├── replBridgeHandle.ts
│ │ ├── replBridgeTransport.ts
│ │ ├── sessionIdCompat.ts
│ │ ├── sessionRunner.ts
│ │ ├── trustedDevice.ts
│ │ ├── types.ts
│ │ └── workSecret.ts
│ ├── buddy/
│ │ ├── CompanionSprite.tsx
│ │ ├── companion.ts
│ │ ├── prompt.ts
│ │ ├── sprites.ts
│ │ ├── types.ts
│ │ └── useBuddyNotification.tsx
│ ├── cli/
│ │ ├── exit.ts
│ │ ├── handlers/
│ │ │ ├── agents.ts
│ │ │ ├── auth.ts
│ │ │ ├── autoMode.ts
│ │ │ ├── mcp.tsx
│ │ │ ├── plugins.ts
│ │ │ └── util.tsx
│ │ ├── ndjsonSafeStringify.ts
│ │ ├── print.ts
│ │ ├── remoteIO.ts
│ │ ├── structuredIO.ts
│ │ ├── transports/
│ │ │ ├── HybridTransport.ts
│ │ │ ├── SSETransport.ts
│ │ │ ├── SerialBatchEventUploader.ts
│ │ │ ├── WebSocketTransport.ts
│ │ │ ├── WorkerStateUploader.ts
│ │ │ ├── ccrClient.ts
│ │ │ └── transportUtils.ts
│ │ └── update.ts
│ ├── commands/
│ │ ├── add-dir/
│ │ │ ├── add-dir.tsx
│ │ │ ├── index.ts
│ │ │ └── validation.ts
│ │ ├── advisor.ts
│ │ ├── agents/
│ │ │ ├── agents.tsx
│ │ │ └── index.ts
│ │ ├── ant-trace/
│ │ │ └── index.js
│ │ ├── autofix-pr/
│ │ │ └── index.js
│ │ ├── backfill-sessions/
│ │ │ └── index.js
│ │ ├── branch/
│ │ │ ├── branch.ts
│ │ │ └── index.ts
│ │ ├── break-cache/
│ │ │ └── index.js
│ │ ├── bridge/
│ │ │ ├── bridge.tsx
│ │ │ └── index.ts
│ │ ├── bridge-kick.ts
│ │ ├── brief.ts
│ │ ├── btw/
│ │ │ ├── btw.tsx
│ │ │ └── index.ts
│ │ ├── bughunter/
│ │ │ └── index.js
│ │ ├── chrome/
│ │ │ ├── chrome.tsx
│ │ │ └── index.ts
│ │ ├── clear/
│ │ │ ├── caches.ts
│ │ │ ├── clear.ts
│ │ │ ├── conversation.ts
│ │ │ └── index.ts
│ │ ├── color/
│ │ │ ├── color.ts
│ │ │ └── index.ts
│ │ ├── commit-push-pr.ts
│ │ ├── commit.ts
│ │ ├── compact/
│ │ │ ├── compact.ts
│ │ │ └── index.ts
│ │ ├── config/
│ │ │ ├── config.tsx
│ │ │ └── index.ts
│ │ ├── context/
│ │ │ ├── context-noninteractive.ts
│ │ │ ├── context.tsx
│ │ │ └── index.ts
│ │ ├── copy/
│ │ │ ├── copy.tsx
│ │ │ └── index.ts
│ │ ├── cost/
│ │ │ ├── cost.ts
│ │ │ └── index.ts
│ │ ├── createMovedToPluginCommand.ts
│ │ ├── ctx_viz/
│ │ │ └── index.js
│ │ ├── debug-tool-call/
│ │ │ └── index.js
│ │ ├── desktop/
│ │ │ ├── desktop.tsx
│ │ │ └── index.ts
│ │ ├── diff/
│ │ │ ├── diff.tsx
│ │ │ └── index.ts
│ │ ├── doctor/
│ │ │ ├── doctor.tsx
│ │ │ └── index.ts
│ │ ├── effort/
│ │ │ ├── effort.tsx
│ │ │ └── index.ts
│ │ ├── env/
│ │ │ └── index.js
│ │ ├── exit/
│ │ │ ├── exit.tsx
│ │ │ └── index.ts
│ │ ├── export/
│ │ │ ├── export.tsx
│ │ │ └── index.ts
│ │ ├── extra-usage/
│ │ │ ├── extra-usage-core.ts
│ │ │ ├── extra-usage-noninteractive.ts
│ │ │ ├── extra-usage.tsx
│ │ │ └── index.ts
│ │ ├── fast/
│ │ │ ├── fast.tsx
│ │ │ └── index.ts
│ │ ├── feedback/
│ │ │ ├── feedback.tsx
│ │ │ └── index.ts
│ │ ├── files/
│ │ │ ├── files.ts
│ │ │ └── index.ts
│ │ ├── good-claude/
│ │ │ └── index.js
│ │ ├── heapdump/
│ │ │ ├── heapdump.ts
│ │ │ └── index.ts
│ │ ├── help/
│ │ │ ├── help.tsx
│ │ │ └── index.ts
│ │ ├── hooks/
│ │ │ ├── hooks.tsx
│ │ │ └── index.ts
│ │ ├── ide/
│ │ │ ├── ide.tsx
│ │ │ └── index.ts
│ │ ├── init-verifiers.ts
│ │ ├── init.ts
│ │ ├── insights.ts
│ │ ├── install-github-app/
│ │ │ ├── ApiKeyStep.tsx
│ │ │ ├── CheckExistingSecretStep.tsx
│ │ │ ├── CheckGitHubStep.tsx
│ │ │ ├── ChooseRepoStep.tsx
│ │ │ ├── CreatingStep.tsx
│ │ │ ├── ErrorStep.tsx
│ │ │ ├── ExistingWorkflowStep.tsx
│ │ │ ├── InstallAppStep.tsx
│ │ │ ├── OAuthFlowStep.tsx
│ │ │ ├── SuccessStep.tsx
│ │ │ ├── WarningsStep.tsx
│ │ │ ├── index.ts
│ │ │ ├── install-github-app.tsx
│ │ │ └── setupGitHubActions.ts
│ │ ├── install-slack-app/
│ │ │ ├── index.ts
│ │ │ └── install-slack-app.ts
│ │ ├── install.tsx
│ │ ├── issue/
│ │ │ └── index.js
│ │ ├── keybindings/
│ │ │ ├── index.ts
│ │ │ └── keybindings.ts
│ │ ├── login/
│ │ │ ├── index.ts
│ │ │ └── login.tsx
│ │ ├── logout/
│ │ │ ├── index.ts
│ │ │ └── logout.tsx
│ │ ├── mcp/
│ │ │ ├── addCommand.ts
│ │ │ ├── index.ts
│ │ │ ├── mcp.tsx
│ │ │ └── xaaIdpCommand.ts
│ │ ├── memory/
│ │ │ ├── index.ts
│ │ │ └── memory.tsx
│ │ ├── mobile/
│ │ │ ├── index.ts
│ │ │ └── mobile.tsx
│ │ ├── mock-limits/
│ │ │ └── index.js
│ │ ├── model/
│ │ │ ├── index.ts
│ │ │ └── model.tsx
│ │ ├── oauth-refresh/
│ │ │ └── index.js
│ │ ├── onboarding/
│ │ │ └── index.js
│ │ ├── output-style/
│ │ │ ├── index.ts
│ │ │ └── output-style.tsx
│ │ ├── passes/
│ │ │ ├── index.ts
│ │ │ └── passes.tsx
│ │ ├── perf-issue/
│ │ │ └── index.js
│ │ ├── permissions/
│ │ │ ├── index.ts
│ │ │ └── permissions.tsx
│ │ ├── plan/
│ │ │ ├── index.ts
│ │ │ └── plan.tsx
│ │ ├── plugin/
│ │ │ ├── AddMarketplace.tsx
│ │ │ ├── BrowseMarketplace.tsx
│ │ │ ├── DiscoverPlugins.tsx
│ │ │ ├── ManageMarketplaces.tsx
│ │ │ ├── ManagePlugins.tsx
│ │ │ ├── PluginErrors.tsx
│ │ │ ├── PluginOptionsDialog.tsx
│ │ │ ├── PluginOptionsFlow.tsx
│ │ │ ├── PluginSettings.tsx
│ │ │ ├── PluginTrustWarning.tsx
│ │ │ ├── UnifiedInstalledCell.tsx
│ │ │ ├── ValidatePlugin.tsx
│ │ │ ├── index.tsx
│ │ │ ├── parseArgs.ts
│ │ │ ├── plugin.tsx
│ │ │ ├── pluginDetailsHelpers.tsx
│ │ │ └── usePagination.ts
│ │ ├── pr_comments/
│ │ │ └── index.ts
│ │ ├── privacy-settings/
│ │ │ ├── index.ts
│ │ │ └── privacy-settings.tsx
│ │ ├── rate-limit-options/
│ │ │ ├── index.ts
│ │ │ └── rate-limit-options.tsx
│ │ ├── release-notes/
│ │ │ ├── index.ts
│ │ │ └── release-notes.ts
│ │ ├── reload-plugins/
│ │ │ ├── index.ts
│ │ │ └── reload-plugins.ts
│ │ ├── remote-env/
│ │ │ ├── index.ts
│ │ │ └── remote-env.tsx
│ │ ├── remote-setup/
│ │ │ ├── api.ts
│ │ │ ├── index.ts
│ │ │ └── remote-setup.tsx
│ │ ├── rename/
│ │ │ ├── generateSessionName.ts
│ │ │ ├── index.ts
│ │ │ └── rename.ts
│ │ ├── reset-limits/
│ │ │ └── index.js
│ │ ├── resume/
│ │ │ ├── index.ts
│ │ │ └── resume.tsx
│ │ ├── review/
│ │ │ ├── UltrareviewOverageDialog.tsx
│ │ │ ├── reviewRemote.ts
│ │ │ ├── ultrareviewCommand.tsx
│ │ │ └── ultrareviewEnabled.ts
│ │ ├── review.ts
│ │ ├── rewind/
│ │ │ ├── index.ts
│ │ │ └── rewind.ts
│ │ ├── sandbox-toggle/
│ │ │ ├── index.ts
│ │ │ └── sandbox-toggle.tsx
│ │ ├── security-review.ts
│ │ ├── session/
│ │ │ ├── index.ts
│ │ │ └── session.tsx
│ │ ├── share/
│ │ │ └── index.js
│ │ ├── skills/
│ │ │ ├── index.ts
│ │ │ └── skills.tsx
│ │ ├── stats/
│ │ │ ├── index.ts
│ │ │ └── stats.tsx
│ │ ├── status/
│ │ │ ├── index.ts
│ │ │ └── status.tsx
│ │ ├── statusline.tsx
│ │ ├── stickers/
│ │ │ ├── index.ts
│ │ │ └── stickers.ts
│ │ ├── summary/
│ │ │ └── index.js
│ │ ├── tag/
│ │ │ ├── index.ts
│ │ │ └── tag.tsx
│ │ ├── tasks/
│ │ │ ├── index.ts
│ │ │ └── tasks.tsx
│ │ ├── teleport/
│ │ │ └── index.js
│ │ ├── terminalSetup/
│ │ │ ├── index.ts
│ │ │ └── terminalSetup.tsx
│ │ ├── theme/
│ │ │ ├── index.ts
│ │ │ └── theme.tsx
│ │ ├── thinkback/
│ │ │ ├── index.ts
│ │ │ └── thinkback.tsx
│ │ ├── thinkback-play/
│ │ │ ├── index.ts
│ │ │ └── thinkback-play.ts
│ │ ├── ultraplan.tsx
│ │ ├── upgrade/
│ │ │ ├── index.ts
│ │ │ └── upgrade.tsx
│ │ ├── usage/
│ │ │ ├── index.ts
│ │ │ └── usage.tsx
│ │ ├── version.ts
│ │ ├── vim/
│ │ │ ├── index.ts
│ │ │ └── vim.ts
│ │ └── voice/
│ │ ├── index.ts
│ │ └── voice.ts
│ ├── commands.ts
│ ├── components/
│ │ ├── AgentProgressLine.tsx
│ │ ├── App.tsx
│ │ ├── ApproveApiKey.tsx
│ │ ├── AutoModeOptInDialog.tsx
│ │ ├── AutoUpdater.tsx
│ │ ├── AutoUpdaterWrapper.tsx
│ │ ├── AwsAuthStatusBox.tsx
│ │ ├── BaseTextInput.tsx
│ │ ├── BashModeProgress.tsx
│ │ ├── BridgeDialog.tsx
│ │ ├── BypassPermissionsModeDialog.tsx
│ │ ├── ChannelDowngradeDialog.tsx
│ │ ├── ClaudeCodeHint/
│ │ │ └── PluginHintMenu.tsx
│ │ ├── ClaudeInChromeOnboarding.tsx
│ │ ├── ClaudeMdExternalIncludesDialog.tsx
│ │ ├── ClickableImageRef.tsx
│ │ ├── CompactSummary.tsx
│ │ ├── ConfigurableShortcutHint.tsx
│ │ ├── ConsoleOAuthFlow.tsx
│ │ ├── ContextSuggestions.tsx
│ │ ├── ContextVisualization.tsx
│ │ ├── CoordinatorAgentStatus.tsx
│ │ ├── CostThresholdDialog.tsx
│ │ ├── CtrlOToExpand.tsx
│ │ ├── CustomSelect/
│ │ │ ├── SelectMulti.tsx
│ │ │ ├── index.ts
│ │ │ ├── option-map.ts
│ │ │ ├── select-input-option.tsx
│ │ │ ├── select-option.tsx
│ │ │ ├── select.tsx
│ │ │ ├── use-multi-select-state.ts
│ │ │ ├── use-select-input.ts
│ │ │ ├── use-select-navigation.ts
│ │ │ └── use-select-state.ts
│ │ ├── DesktopHandoff.tsx
│ │ ├── DesktopUpsell/
│ │ │ └── DesktopUpsellStartup.tsx
│ │ ├── DevBar.tsx
│ │ ├── DevChannelsDialog.tsx
│ │ ├── DiagnosticsDisplay.tsx
│ │ ├── EffortCallout.tsx
│ │ ├── EffortIndicator.ts
│ │ ├── ExitFlow.tsx
│ │ ├── ExportDialog.tsx
│ │ ├── FallbackToolUseErrorMessage.tsx
│ │ ├── FallbackToolUseRejectedMessage.tsx
│ │ ├── FastIcon.tsx
│ │ ├── Feedback.tsx
│ │ ├── FeedbackSurvey/
│ │ │ ├── FeedbackSurvey.tsx
│ │ │ ├── FeedbackSurveyView.tsx
│ │ │ ├── TranscriptSharePrompt.tsx
│ │ │ ├── submitTranscriptShare.ts
│ │ │ ├── useDebouncedDigitInput.ts
│ │ │ ├── useFeedbackSurvey.tsx
│ │ │ ├── useMemorySurvey.tsx
│ │ │ ├── usePostCompactSurvey.tsx
│ │ │ └── useSurveyState.tsx
│ │ ├── FileEditToolDiff.tsx
│ │ ├── FileEditToolUpdatedMessage.tsx
│ │ ├── FileEditToolUseRejectedMessage.tsx
│ │ ├── FilePathLink.tsx
│ │ ├── FullscreenLayout.tsx
│ │ ├── GlobalSearchDialog.tsx
│ │ ├── HelpV2/
│ │ │ ├── Commands.tsx
│ │ │ ├── General.tsx
│ │ │ └── HelpV2.tsx
│ │ ├── HighlightedCode/
│ │ │ └── Fallback.tsx
│ │ ├── HighlightedCode.tsx
│ │ ├── HistorySearchDialog.tsx
│ │ ├── IdeAutoConnectDialog.tsx
│ │ ├── IdeOnboardingDialog.tsx
│ │ ├── IdeStatusIndicator.tsx
│ │ ├── IdleReturnDialog.tsx
│ │ ├── InterruptedByUser.tsx
│ │ ├── InvalidConfigDialog.tsx
│ │ ├── InvalidSettingsDialog.tsx
│ │ ├── KeybindingWarnings.tsx
│ │ ├── LanguagePicker.tsx
│ │ ├── LogSelector.tsx
│ │ ├── LogoV2/
│ │ │ ├── AnimatedAsterisk.tsx
│ │ │ ├── AnimatedClawd.tsx
│ │ │ ├── ChannelsNotice.tsx
│ │ │ ├── Clawd.tsx
│ │ │ ├── CondensedLogo.tsx
│ │ │ ├── EmergencyTip.tsx
│ │ │ ├── Feed.tsx
│ │ │ ├── FeedColumn.tsx
│ │ │ ├── GuestPassesUpsell.tsx
│ │ │ ├── LogoV2.tsx
│ │ │ ├── Opus1mMergeNotice.tsx
│ │ │ ├── OverageCreditUpsell.tsx
│ │ │ ├── VoiceModeNotice.tsx
│ │ │ ├── WelcomeV2.tsx
│ │ │ └── feedConfigs.tsx
│ │ ├── LspRecommendation/
│ │ │ └── LspRecommendationMenu.tsx
│ │ ├── MCPServerApprovalDialog.tsx
│ │ ├── MCPServerDesktopImportDialog.tsx
│ │ ├── MCPServerDialogCopy.tsx
│ │ ├── MCPServerMultiselectDialog.tsx
│ │ ├── ManagedSettingsSecurityDialog/
│ │ │ ├── ManagedSettingsSecurityDialog.tsx
│ │ │ └── utils.ts
│ │ ├── Markdown.tsx
│ │ ├── MarkdownTable.tsx
│ │ ├── MemoryUsageIndicator.tsx
│ │ ├── Message.tsx
│ │ ├── MessageModel.tsx
│ │ ├── MessageResponse.tsx
│ │ ├── MessageRow.tsx
│ │ ├── MessageSelector.tsx
│ │ ├── MessageTimestamp.tsx
│ │ ├── Messages.tsx
│ │ ├── ModelPicker.tsx
│ │ ├── NativeAutoUpdater.tsx
│ │ ├── NotebookEditToolUseRejectedMessage.tsx
│ │ ├── OffscreenFreeze.tsx
│ │ ├── Onboarding.tsx
│ │ ├── OutputStylePicker.tsx
│ │ ├── PackageManagerAutoUpdater.tsx
│ │ ├── Passes/
│ │ │ └── Passes.tsx
│ │ ├── PrBadge.tsx
│ │ ├── PressEnterToContinue.tsx
│ │ ├── PromptInput/
│ │ │ ├── HistorySearchInput.tsx
│ │ │ ├── IssueFlagBanner.tsx
│ │ │ ├── Notifications.tsx
│ │ │ ├── PromptInput.tsx
│ │ │ ├── PromptInputFooter.tsx
│ │ │ ├── PromptInputFooterLeftSide.tsx
│ │ │ ├── PromptInputFooterSuggestions.tsx
│ │ │ ├── PromptInputHelpMenu.tsx
│ │ │ ├── PromptInputModeIndicator.tsx
│ │ │ ├── PromptInputQueuedCommands.tsx
│ │ │ ├── PromptInputStashNotice.tsx
│ │ │ ├── SandboxPromptFooterHint.tsx
│ │ │ ├── ShimmeredInput.tsx
│ │ │ ├── VoiceIndicator.tsx
│ │ │ ├── inputModes.ts
│ │ │ ├── inputPaste.ts
│ │ │ ├── useMaybeTruncateInput.ts
│ │ │ ├── usePromptInputPlaceholder.ts
│ │ │ ├── useShowFastIconHint.ts
│ │ │ ├── useSwarmBanner.ts
│ │ │ └── utils.ts
│ │ ├── QuickOpenDialog.tsx
│ │ ├── RemoteCallout.tsx
│ │ ├── RemoteEnvironmentDialog.tsx
│ │ ├── ResumeTask.tsx
│ │ ├── SandboxViolationExpandedView.tsx
│ │ ├── ScrollKeybindingHandler.tsx
│ │ ├── SearchBox.tsx
│ │ ├── SentryErrorBoundary.ts
│ │ ├── SessionBackgroundHint.tsx
│ │ ├── SessionPreview.tsx
│ │ ├── Settings/
│ │ │ ├── Config.tsx
│ │ │ ├── Settings.tsx
│ │ │ ├── Status.tsx
│ │ │ └── Usage.tsx
│ │ ├── ShowInIDEPrompt.tsx
│ │ ├── SkillImprovementSurvey.tsx
│ │ ├── Spinner/
│ │ │ ├── FlashingChar.tsx
│ │ │ ├── GlimmerMessage.tsx
│ │ │ ├── ShimmerChar.tsx
│ │ │ ├── SpinnerAnimationRow.tsx
│ │ │ ├── SpinnerGlyph.tsx
│ │ │ ├── TeammateSpinnerLine.tsx
│ │ │ ├── TeammateSpinnerTree.tsx
│ │ │ ├── index.ts
│ │ │ ├── teammateSelectHint.ts
│ │ │ ├── useShimmerAnimation.ts
│ │ │ ├── useStalledAnimation.ts
│ │ │ └── utils.ts
│ │ ├── Spinner.tsx
│ │ ├── Stats.tsx
│ │ ├── StatusLine.tsx
│ │ ├── StatusNotices.tsx
│ │ ├── StructuredDiff/
│ │ │ ├── Fallback.tsx
│ │ │ └── colorDiff.ts
│ │ ├── StructuredDiff.tsx
│ │ ├── StructuredDiffList.tsx
│ │ ├── TagTabs.tsx
│ │ ├── TaskListV2.tsx
│ │ ├── TeammateViewHeader.tsx
│ │ ├── TeleportError.tsx
│ │ ├── TeleportProgress.tsx
│ │ ├── TeleportRepoMismatchDialog.tsx
│ │ ├── TeleportResumeWrapper.tsx
│ │ ├── TeleportStash.tsx
│ │ ├── TextInput.tsx
│ │ ├── ThemePicker.tsx
│ │ ├── ThinkingToggle.tsx
│ │ ├── TokenWarning.tsx
│ │ ├── ToolUseLoader.tsx
│ │ ├── TrustDialog/
│ │ │ ├── TrustDialog.tsx
│ │ │ └── utils.ts
│ │ ├── ValidationErrorsList.tsx
│ │ ├── VimTextInput.tsx
│ │ ├── VirtualMessageList.tsx
│ │ ├── WorkflowMultiselectDialog.tsx
│ │ ├── WorktreeExitDialog.tsx
│ │ ├── agents/
│ │ │ ├── AgentDetail.tsx
│ │ │ ├── AgentEditor.tsx
│ │ │ ├── AgentNavigationFooter.tsx
│ │ │ ├── AgentsList.tsx
│ │ │ ├── AgentsMenu.tsx
│ │ │ ├── ColorPicker.tsx
│ │ │ ├── ModelSelector.tsx
│ │ │ ├── ToolSelector.tsx
│ │ │ ├── agentFileUtils.ts
│ │ │ ├── generateAgent.ts
│ │ │ ├── new-agent-creation/
│ │ │ │ ├── CreateAgentWizard.tsx
│ │ │ │ └── wizard-steps/
│ │ │ │ ├── ColorStep.tsx
│ │ │ │ ├── ConfirmStep.tsx
│ │ │ │ ├── ConfirmStepWrapper.tsx
│ │ │ │ ├── DescriptionStep.tsx
│ │ │ │ ├── GenerateStep.tsx
│ │ │ │ ├── LocationStep.tsx
│ │ │ │ ├── MemoryStep.tsx
│ │ │ │ ├── MethodStep.tsx
│ │ │ │ ├── ModelStep.tsx
│ │ │ │ ├── PromptStep.tsx
│ │ │ │ ├── ToolsStep.tsx
│ │ │ │ └── TypeStep.tsx
│ │ │ ├── types.ts
│ │ │ ├── utils.ts
│ │ │ └── validateAgent.ts
│ │ ├── design-system/
│ │ │ ├── Byline.tsx
│ │ │ ├── Dialog.tsx
│ │ │ ├── Divider.tsx
│ │ │ ├── FuzzyPicker.tsx
│ │ │ ├── KeyboardShortcutHint.tsx
│ │ │ ├── ListItem.tsx
│ │ │ ├── LoadingState.tsx
│ │ │ ├── Pane.tsx
│ │ │ ├── ProgressBar.tsx
│ │ │ ├── Ratchet.tsx
│ │ │ ├── StatusIcon.tsx
│ │ │ ├── Tabs.tsx
│ │ │ ├── ThemeProvider.tsx
│ │ │ ├── ThemedBox.tsx
│ │ │ ├── ThemedText.tsx
│ │ │ └── color.ts
│ │ ├── diff/
│ │ │ ├── DiffDetailView.tsx
│ │ │ ├── DiffDialog.tsx
│ │ │ └── DiffFileList.tsx
│ │ ├── grove/
│ │ │ └── Grove.tsx
│ │ ├── hooks/
│ │ │ ├── HooksConfigMenu.tsx
│ │ │ ├── PromptDialog.tsx
│ │ │ ├── SelectEventMode.tsx
│ │ │ ├── SelectHookMode.tsx
│ │ │ ├── SelectMatcherMode.tsx
│ │ │ └── ViewHookMode.tsx
│ │ ├── mcp/
│ │ │ ├── CapabilitiesSection.tsx
│ │ │ ├── ElicitationDialog.tsx
│ │ │ ├── MCPAgentServerMenu.tsx
│ │ │ ├── MCPListPanel.tsx
│ │ │ ├── MCPReconnect.tsx
│ │ │ ├── MCPRemoteServerMenu.tsx
│ │ │ ├── MCPSettings.tsx
│ │ │ ├── MCPStdioServerMenu.tsx
│ │ │ ├── MCPToolDetailView.tsx
│ │ │ ├── MCPToolListView.tsx
│ │ │ ├── McpParsingWarnings.tsx
│ │ │ ├── index.ts
│ │ │ └── utils/
│ │ │ └── reconnectHelpers.tsx
│ │ ├── memory/
│ │ │ ├── MemoryFileSelector.tsx
│ │ │ └── MemoryUpdateNotification.tsx
│ │ ├── messageActions.tsx
│ │ ├── messages/
│ │ │ ├── AdvisorMessage.tsx
│ │ │ ├── AssistantRedactedThinkingMessage.tsx
│ │ │ ├── AssistantTextMessage.tsx
│ │ │ ├── AssistantThinkingMessage.tsx
│ │ │ ├── AssistantToolUseMessage.tsx
│ │ │ ├── AttachmentMessage.tsx
│ │ │ ├── CollapsedReadSearchContent.tsx
│ │ │ ├── CompactBoundaryMessage.tsx
│ │ │ ├── GroupedToolUseContent.tsx
│ │ │ ├── HighlightedThinkingText.tsx
│ │ │ ├── HookProgressMessage.tsx
│ │ │ ├── PlanApprovalMessage.tsx
│ │ │ ├── RateLimitMessage.tsx
│ │ │ ├── ShutdownMessage.tsx
│ │ │ ├── SystemAPIErrorMessage.tsx
│ │ │ ├── SystemTextMessage.tsx
│ │ │ ├── TaskAssignmentMessage.tsx
│ │ │ ├── UserAgentNotificationMessage.tsx
│ │ │ ├── UserBashInputMessage.tsx
│ │ │ ├── UserBashOutputMessage.tsx
│ │ │ ├── UserChannelMessage.tsx
│ │ │ ├── UserCommandMessage.tsx
│ │ │ ├── UserImageMessage.tsx
│ │ │ ├── UserLocalCommandOutputMessage.tsx
│ │ │ ├── UserMemoryInputMessage.tsx
│ │ │ ├── UserPlanMessage.tsx
│ │ │ ├── UserPromptMessage.tsx
│ │ │ ├── UserResourceUpdateMessage.tsx
│ │ │ ├── UserTeammateMessage.tsx
│ │ │ ├── UserTextMessage.tsx
│ │ │ ├── UserToolResultMessage/
│ │ │ │ ├── RejectedPlanMessage.tsx
│ │ │ │ ├── RejectedToolUseMessage.tsx
│ │ │ │ ├── UserToolCanceledMessage.tsx
│ │ │ │ ├── UserToolErrorMessage.tsx
│ │ │ │ ├── UserToolRejectMessage.tsx
│ │ │ │ ├── UserToolResultMessage.tsx
│ │ │ │ ├── UserToolSuccessMessage.tsx
│ │ │ │ └── utils.tsx
│ │ │ ├── nullRenderingAttachments.ts
│ │ │ ├── teamMemCollapsed.tsx
│ │ │ └── teamMemSaved.ts
│ │ ├── permissions/
│ │ │ ├── AskUserQuestionPermissionRequest/
│ │ │ │ ├── AskUserQuestionPermissionRequest.tsx
│ │ │ │ ├── PreviewBox.tsx
│ │ │ │ ├── PreviewQuestionView.tsx
│ │ │ │ ├── QuestionNavigationBar.tsx
│ │ │ │ ├── QuestionView.tsx
│ │ │ │ ├── SubmitQuestionsView.tsx
│ │ │ │ └── use-multiple-choice-state.ts
│ │ │ ├── BashPermissionRequest/
│ │ │ │ ├── BashPermissionRequest.tsx
│ │ │ │ └── bashToolUseOptions.tsx
│ │ │ ├── ComputerUseApproval/
│ │ │ │ └── ComputerUseApproval.tsx
│ │ │ ├── EnterPlanModePermissionRequest/
│ │ │ │ └── EnterPlanModePermissionRequest.tsx
│ │ │ ├── ExitPlanModePermissionRequest/
│ │ │ │ └── ExitPlanModePermissionRequest.tsx
│ │ │ ├── FallbackPermissionRequest.tsx
│ │ │ ├── FileEditPermissionRequest/
│ │ │ │ └── FileEditPermissionRequest.tsx
│ │ │ ├── FilePermissionDialog/
│ │ │ │ ├── FilePermissionDialog.tsx
│ │ │ │ ├── ideDiffConfig.ts
│ │ │ │ ├── permissionOptions.tsx
│ │ │ │ ├── useFilePermissionDialog.ts
│ │ │ │ └── usePermissionHandler.ts
│ │ │ ├── FileWritePermissionRequest/
│ │ │ │ ├── FileWritePermissionRequest.tsx
│ │ │ │ └── FileWriteToolDiff.tsx
│ │ │ ├── FilesystemPermissionRequest/
│ │ │ │ └── FilesystemPermissionRequest.tsx
│ │ │ ├── NotebookEditPermissionRequest/
│ │ │ │ ├── NotebookEditPermissionRequest.tsx
│ │ │ │ └── NotebookEditToolDiff.tsx
│ │ │ ├── PermissionDecisionDebugInfo.tsx
│ │ │ ├── PermissionDialog.tsx
│ │ │ ├── PermissionExplanation.tsx
│ │ │ ├── PermissionPrompt.tsx
│ │ │ ├── PermissionRequest.tsx
│ │ │ ├── PermissionRequestTitle.tsx
│ │ │ ├── PermissionRuleExplanation.tsx
│ │ │ ├── PowerShellPermissionRequest/
│ │ │ │ ├── PowerShellPermissionRequest.tsx
│ │ │ │ └── powershellToolUseOptions.tsx
│ │ │ ├── SandboxPermissionRequest.tsx
│ │ │ ├── SedEditPermissionRequest/
│ │ │ │ └── SedEditPermissionRequest.tsx
│ │ │ ├── SkillPermissionRequest/
│ │ │ │ └── SkillPermissionRequest.tsx
│ │ │ ├── WebFetchPermissionRequest/
│ │ │ │ └── WebFetchPermissionRequest.tsx
│ │ │ ├── WorkerBadge.tsx
│ │ │ ├── WorkerPendingPermission.tsx
│ │ │ ├── hooks.ts
│ │ │ ├── rules/
│ │ │ │ ├── AddPermissionRules.tsx
│ │ │ │ ├── AddWorkspaceDirectory.tsx
│ │ │ │ ├── PermissionRuleDescription.tsx
│ │ │ │ ├── PermissionRuleInput.tsx
│ │ │ │ ├── PermissionRuleList.tsx
│ │ │ │ ├── RecentDenialsTab.tsx
│ │ │ │ ├── RemoveWorkspaceDirectory.tsx
│ │ │ │ └── WorkspaceTab.tsx
│ │ │ ├── shellPermissionHelpers.tsx
│ │ │ ├── useShellPermissionFeedback.ts
│ │ │ └── utils.ts
│ │ ├── sandbox/
│ │ │ ├── SandboxConfigTab.tsx
│ │ │ ├── SandboxDependenciesTab.tsx
│ │ │ ├── SandboxDoctorSection.tsx
│ │ │ ├── SandboxOverridesTab.tsx
│ │ │ └── SandboxSettings.tsx
│ │ ├── shell/
│ │ │ ├── ExpandShellOutputContext.tsx
│ │ │ ├── OutputLine.tsx
│ │ │ ├── ShellProgressMessage.tsx
│ │ │ └── ShellTimeDisplay.tsx
│ │ ├── skills/
│ │ │ └── SkillsMenu.tsx
│ │ ├── tasks/
│ │ │ ├── AsyncAgentDetailDialog.tsx
│ │ │ ├── BackgroundTask.tsx
│ │ │ ├── BackgroundTaskStatus.tsx
│ │ │ ├── BackgroundTasksDialog.tsx
│ │ │ ├── DreamDetailDialog.tsx
│ │ │ ├── InProcessTeammateDetailDialog.tsx
│ │ │ ├── RemoteSessionDetailDialog.tsx
│ │ │ ├── RemoteSessionProgress.tsx
│ │ │ ├── ShellDetailDialog.tsx
│ │ │ ├── ShellProgress.tsx
│ │ │ ├── renderToolActivity.tsx
│ │ │ └── taskStatusUtils.tsx
│ │ ├── teams/
│ │ │ ├── TeamStatus.tsx
│ │ │ └── TeamsDialog.tsx
│ │ ├── ui/
│ │ │ ├── OrderedList.tsx
│ │ │ ├── OrderedListItem.tsx
│ │ │ └── TreeSelect.tsx
│ │ └── wizard/
│ │ ├── WizardDialogLayout.tsx
│ │ ├── WizardNavigationFooter.tsx
│ │ ├── WizardProvider.tsx
│ │ ├── index.ts
│ │ └── useWizard.ts
│ ├── constants/
│ │ ├── apiLimits.ts
│ │ ├── betas.ts
│ │ ├── common.ts
│ │ ├── cyberRiskInstruction.ts
│ │ ├── errorIds.ts
│ │ ├── figures.ts
│ │ ├── files.ts
│ │ ├── github-app.ts
│ │ ├── keys.ts
│ │ ├── messages.ts
│ │ ├── oauth.ts
│ │ ├── outputStyles.ts
│ │ ├── product.ts
│ │ ├── prompts.ts
│ │ ├── spinnerVerbs.ts
│ │ ├── system.ts
│ │ ├── systemPromptSections.ts
│ │ ├── toolLimits.ts
│ │ ├── tools.ts
│ │ ├── turnCompletionVerbs.ts
│ │ └── xml.ts
│ ├── context/
│ │ ├── QueuedMessageContext.tsx
│ │ ├── fpsMetrics.tsx
│ │ ├── mailbox.tsx
│ │ ├── modalContext.tsx
│ │ ├── notifications.tsx
│ │ ├── overlayContext.tsx
│ │ ├── promptOverlayContext.tsx
│ │ ├── stats.tsx
│ │ └── voice.tsx
│ ├── context.ts
│ ├── coordinator/
│ │ └── coordinatorMode.ts
│ ├── cost-tracker.ts
│ ├── costHook.ts
│ ├── dialogLaunchers.tsx
│ ├── entrypoints/
│ │ ├── agentSdkTypes.ts
│ │ ├── cli.tsx
│ │ ├── init.ts
│ │ ├── mcp.ts
│ │ ├── sandboxTypes.ts
│ │ └── sdk/
│ │ ├── controlSchemas.ts
│ │ ├── coreSchemas.ts
│ │ └── coreTypes.ts
│ ├── history.ts
│ ├── hooks/
│ │ ├── fileSuggestions.ts
│ │ ├── notifs/
│ │ │ ├── useAutoModeUnavailableNotification.ts
│ │ │ ├── useCanSwitchToExistingSubscription.tsx
│ │ │ ├── useDeprecationWarningNotification.tsx
│ │ │ ├── useFastModeNotification.tsx
│ │ │ ├── useIDEStatusIndicator.tsx
│ │ │ ├── useInstallMessages.tsx
│ │ │ ├── useLspInitializationNotification.tsx
│ │ │ ├── useMcpConnectivityStatus.tsx
│ │ │ ├── useModelMigrationNotifications.tsx
│ │ │ ├── useNpmDeprecationNotification.tsx
│ │ │ ├── usePluginAutoupdateNotification.tsx
│ │ │ ├── usePluginInstallationStatus.tsx
│ │ │ ├── useRateLimitWarningNotification.tsx
│ │ │ ├── useSettingsErrors.tsx
│ │ │ ├── useStartupNotification.ts
│ │ │ └── useTeammateShutdownNotification.ts
│ │ ├── renderPlaceholder.ts
│ │ ├── toolPermission/
│ │ │ ├── PermissionContext.ts
│ │ │ ├── handlers/
│ │ │ │ ├── coordinatorHandler.ts
│ │ │ │ ├── interactiveHandler.ts
│ │ │ │ └── swarmWorkerHandler.ts
│ │ │ └── permissionLogging.ts
│ │ ├── unifiedSuggestions.ts
│ │ ├── useAfterFirstRender.ts
│ │ ├── useApiKeyVerification.ts
│ │ ├── useArrowKeyHistory.tsx
│ │ ├── useAssistantHistory.ts
│ │ ├── useAwaySummary.ts
│ │ ├── useBackgroundTaskNavigation.ts
│ │ ├── useBlink.ts
│ │ ├── useCanUseTool.tsx
│ │ ├── useCancelRequest.ts
│ │ ├── useChromeExtensionNotification.tsx
│ │ ├── useClaudeCodeHintRecommendation.tsx
│ │ ├── useClipboardImageHint.ts
│ │ ├── useCommandKeybindings.tsx
│ │ ├── useCommandQueue.ts
│ │ ├── useCopyOnSelect.ts
│ │ ├── useDeferredHookMessages.ts
│ │ ├── useDiffData.ts
│ │ ├── useDiffInIDE.ts
│ │ ├── useDirectConnect.ts
│ │ ├── useDoublePress.ts
│ │ ├── useDynamicConfig.ts
│ │ ├── useElapsedTime.ts
│ │ ├── useExitOnCtrlCD.ts
│ │ ├── useExitOnCtrlCDWithKeybindings.ts
│ │ ├── useFileHistorySnapshotInit.ts
│ │ ├── useGlobalKeybindings.tsx
│ │ ├── useHistorySearch.ts
│ │ ├── useIDEIntegration.tsx
│ │ ├── useIdeAtMentioned.ts
│ │ ├── useIdeConnectionStatus.ts
│ │ ├── useIdeLogging.ts
│ │ ├── useIdeSelection.ts
│ │ ├── useInboxPoller.ts
│ │ ├── useInputBuffer.ts
│ │ ├── useIssueFlagBanner.ts
│ │ ├── useLogMessages.ts
│ │ ├── useLspPluginRecommendation.tsx
│ │ ├── useMailboxBridge.ts
│ │ ├── useMainLoopModel.ts
│ │ ├── useManagePlugins.ts
│ │ ├── useMemoryUsage.ts
│ │ ├── useMergedClients.ts
│ │ ├── useMergedCommands.ts
│ │ ├── useMergedTools.ts
│ │ ├── useMinDisplayTime.ts
│ │ ├── useNotifyAfterTimeout.ts
│ │ ├── useOfficialMarketplaceNotification.tsx
│ │ ├── usePasteHandler.ts
│ │ ├── usePluginRecommendationBase.tsx
│ │ ├── usePrStatus.ts
│ │ ├── usePromptSuggestion.ts
│ │ ├── usePromptsFromClaudeInChrome.tsx
│ │ ├── useQueueProcessor.ts
│ │ ├── useRemoteSession.ts
│ │ ├── useReplBridge.tsx
│ │ ├── useSSHSession.ts
│ │ ├── useScheduledTasks.ts
│ │ ├── useSearchInput.ts
│ │ ├── useSessionBackgrounding.ts
│ │ ├── useSettings.ts
│ │ ├── useSettingsChange.ts
│ │ ├── useSkillImprovementSurvey.ts
│ │ ├── useSkillsChange.ts
│ │ ├── useSwarmInitialization.ts
│ │ ├── useSwarmPermissionPoller.ts
│ │ ├── useTaskListWatcher.ts
│ │ ├── useTasksV2.ts
│ │ ├── useTeammateViewAutoExit.ts
│ │ ├── useTeleportResume.tsx
│ │ ├── useTerminalSize.ts
│ │ ├── useTextInput.ts
│ │ ├── useTimeout.ts
│ │ ├── useTurnDiffs.ts
│ │ ├── useTypeahead.tsx
│ │ ├── useUpdateNotification.ts
│ │ ├── useVimInput.ts
│ │ ├── useVirtualScroll.ts
│ │ ├── useVoice.ts
│ │ ├── useVoiceEnabled.ts
│ │ └── useVoiceIntegration.tsx
│ ├── ink/
│ │ ├── Ansi.tsx
│ │ ├── bidi.ts
│ │ ├── clearTerminal.ts
│ │ ├── colorize.ts
│ │ ├── components/
│ │ │ ├── AlternateScreen.tsx
│ │ │ ├── App.tsx
│ │ │ ├── AppContext.ts
│ │ │ ├── Box.tsx
│ │ │ ├── Button.tsx
│ │ │ ├── ClockContext.tsx
│ │ │ ├── CursorDeclarationContext.ts
│ │ │ ├── ErrorOverview.tsx
│ │ │ ├── Link.tsx
│ │ │ ├── Newline.tsx
│ │ │ ├── NoSelect.tsx
│ │ │ ├── RawAnsi.tsx
│ │ │ ├── ScrollBox.tsx
│ │ │ ├── Spacer.tsx
│ │ │ ├── StdinContext.ts
│ │ │ ├── TerminalFocusContext.tsx
│ │ │ ├── TerminalSizeContext.tsx
│ │ │ └── Text.tsx
│ │ ├── constants.ts
│ │ ├── dom.ts
│ │ ├── events/
│ │ │ ├── click-event.ts
│ │ │ ├── dispatcher.ts
│ │ │ ├── emitter.ts
│ │ │ ├── event-handlers.ts
│ │ │ ├── event.ts
│ │ │ ├── focus-event.ts
│ │ │ ├── input-event.ts
│ │ │ ├── keyboard-event.ts
│ │ │ ├── terminal-event.ts
│ │ │ └── terminal-focus-event.ts
│ │ ├── focus.ts
│ │ ├── frame.ts
│ │ ├── get-max-width.ts
│ │ ├── hit-test.ts
│ │ ├── hooks/
│ │ │ ├── use-animation-frame.ts
│ │ │ ├── use-app.ts
│ │ │ ├── use-declared-cursor.ts
│ │ │ ├── use-input.ts
│ │ │ ├── use-interval.ts
│ │ │ ├── use-search-highlight.ts
│ │ │ ├── use-selection.ts
│ │ │ ├── use-stdin.ts
│ │ │ ├── use-tab-status.ts
│ │ │ ├── use-terminal-focus.ts
│ │ │ ├── use-terminal-title.ts
│ │ │ └── use-terminal-viewport.ts
│ │ ├── ink.tsx
│ │ ├── instances.ts
│ │ ├── layout/
│ │ │ ├── engine.ts
│ │ │ ├── geometry.ts
│ │ │ ├── node.ts
│ │ │ └── yoga.ts
│ │ ├── line-width-cache.ts
│ │ ├── log-update.ts
│ │ ├── measure-element.ts
│ │ ├── measure-text.ts
│ │ ├── node-cache.ts
│ │ ├── optimizer.ts
│ │ ├── output.ts
│ │ ├── parse-keypress.ts
│ │ ├── reconciler.ts
│ │ ├── render-border.ts
│ │ ├── render-node-to-output.ts
│ │ ├── render-to-screen.ts
│ │ ├── renderer.ts
│ │ ├── root.ts
│ │ ├── screen.ts
│ │ ├── searchHighlight.ts
│ │ ├── selection.ts
│ │ ├── squash-text-nodes.ts
│ │ ├── stringWidth.ts
│ │ ├── styles.ts
│ │ ├── supports-hyperlinks.ts
│ │ ├── tabstops.ts
│ │ ├── terminal-focus-state.ts
│ │ ├── terminal-querier.ts
│ │ ├── terminal.ts
│ │ ├── termio/
│ │ │ ├── ansi.ts
│ │ │ ├── csi.ts
│ │ │ ├── dec.ts
│ │ │ ├── esc.ts
│ │ │ ├── osc.ts
│ │ │ ├── parser.ts
│ │ │ ├── sgr.ts
│ │ │ ├── tokenize.ts
│ │ │ └── types.ts
│ │ ├── termio.ts
│ │ ├── useTerminalNotification.ts
│ │ ├── warn.ts
│ │ ├── widest-line.ts
│ │ ├── wrap-text.ts
│ │ └── wrapAnsi.ts
│ ├── ink.ts
│ ├── interactiveHelpers.tsx
│ ├── keybindings/
│ │ ├── KeybindingContext.tsx
│ │ ├── KeybindingProviderSetup.tsx
│ │ ├── defaultBindings.ts
│ │ ├── loadUserBindings.ts
│ │ ├── match.ts
│ │ ├── parser.ts
│ │ ├── reservedShortcuts.ts
│ │ ├── resolver.ts
│ │ ├── schema.ts
│ │ ├── shortcutFormat.ts
│ │ ├── template.ts
│ │ ├── useKeybinding.ts
│ │ ├── useShortcutDisplay.ts
│ │ └── validate.ts
│ ├── main.tsx
│ ├── memdir/
│ │ ├── findRelevantMemories.ts
│ │ ├── memdir.ts
│ │ ├── memoryAge.ts
│ │ ├── memoryScan.ts
│ │ ├── memoryTypes.ts
│ │ ├── paths.ts
│ │ ├── teamMemPaths.ts
│ │ └── teamMemPrompts.ts
│ ├── migrations/
│ │ ├── migrateAutoUpdatesToSettings.ts
│ │ ├── migrateBypassPermissionsAcceptedToSettings.ts
│ │ ├── migrateEnableAllProjectMcpServersToSettings.ts
│ │ ├── migrateFennecToOpus.ts
│ │ ├── migrateLegacyOpusToCurrent.ts
│ │ ├── migrateOpusToOpus1m.ts
│ │ ├── migrateReplBridgeEnabledToRemoteControlAtStartup.ts
│ │ ├── migrateSonnet1mToSonnet45.ts
│ │ ├── migrateSonnet45ToSonnet46.ts
│ │ ├── resetAutoModeOptInForDefaultOffer.ts
│ │ └── resetProToOpusDefault.ts
│ ├── moreright/
│ │ └── useMoreRight.tsx
│ ├── native-ts/
│ │ ├── color-diff/
│ │ │ └── index.ts
│ │ ├── file-index/
│ │ │ └── index.ts
│ │ └── yoga-layout/
│ │ ├── enums.ts
│ │ └── index.ts
│ ├── outputStyles/
│ │ └── loadOutputStylesDir.ts
│ ├── plugins/
│ │ ├── builtinPlugins.ts
│ │ └── bundled/
│ │ └── index.ts
│ ├── projectOnboardingState.ts
│ ├── query/
│ │ ├── config.ts
│ │ ├── deps.ts
│ │ ├── stopHooks.ts
│ │ └── tokenBudget.ts
│ ├── query.ts
│ ├── remote/
│ │ ├── RemoteSessionManager.ts
│ │ ├── SessionsWebSocket.ts
│ │ ├── remotePermissionBridge.ts
│ │ └── sdkMessageAdapter.ts
│ ├── replLauncher.tsx
│ ├── schemas/
│ │ └── hooks.ts
│ ├── screens/
│ │ ├── Doctor.tsx
│ │ ├── REPL.tsx
│ │ └── ResumeConversation.tsx
│ ├── server/
│ │ ├── createDirectConnectSession.ts
│ │ ├── directConnectManager.ts
│ │ └── types.ts
│ ├── services/
│ │ ├── AgentSummary/
│ │ │ └── agentSummary.ts
│ │ ├── MagicDocs/
│ │ │ ├── magicDocs.ts
│ │ │ └── prompts.ts
│ │ ├── PromptSuggestion/
│ │ │ ├── promptSuggestion.ts
│ │ │ └── speculation.ts
│ │ ├── SessionMemory/
│ │ │ ├── prompts.ts
│ │ │ ├── sessionMemory.ts
│ │ │ └── sessionMemoryUtils.ts
│ │ ├── analytics/
│ │ │ ├── config.ts
│ │ │ ├── datadog.ts
│ │ │ ├── firstPartyEventLogger.ts
│ │ │ ├── firstPartyEventLoggingExporter.ts
│ │ │ ├── growthbook.ts
│ │ │ ├── index.ts
│ │ │ ├── metadata.ts
│ │ │ ├── sink.ts
│ │ │ └── sinkKillswitch.ts
│ │ ├── api/
│ │ │ ├── adminRequests.ts
│ │ │ ├── bootstrap.ts
│ │ │ ├── claude.ts
│ │ │ ├── client.ts
│ │ │ ├── dumpPrompts.ts
│ │ │ ├── emptyUsage.ts
│ │ │ ├── errorUtils.ts
│ │ │ ├── errors.ts
│ │ │ ├── filesApi.ts
│ │ │ ├── firstTokenDate.ts
│ │ │ ├── grove.ts
│ │ │ ├── logging.ts
│ │ │ ├── metricsOptOut.ts
│ │ │ ├── overageCreditGrant.ts
│ │ │ ├── promptCacheBreakDetection.ts
│ │ │ ├── referral.ts
│ │ │ ├── sessionIngress.ts
│ │ │ ├── ultrareviewQuota.ts
│ │ │ ├── usage.ts
│ │ │ └── withRetry.ts
│ │ ├── autoDream/
│ │ │ ├── autoDream.ts
│ │ │ ├── config.ts
│ │ │ ├── consolidationLock.ts
│ │ │ └── consolidationPrompt.ts
│ │ ├── awaySummary.ts
│ │ ├── claudeAiLimits.ts
│ │ ├── claudeAiLimitsHook.ts
│ │ ├── compact/
│ │ │ ├── apiMicrocompact.ts
│ │ │ ├── autoCompact.ts
│ │ │ ├── compact.ts
│ │ │ ├── compactWarningHook.ts
│ │ │ ├── compactWarningState.ts
│ │ │ ├── grouping.ts
│ │ │ ├── microCompact.ts
│ │ │ ├── postCompactCleanup.ts
│ │ │ ├── prompt.ts
│ │ │ ├── sessionMemoryCompact.ts
│ │ │ └── timeBasedMCConfig.ts
│ │ ├── diagnosticTracking.ts
│ │ ├── extractMemories/
│ │ │ ├── extractMemories.ts
│ │ │ └── prompts.ts
│ │ ├── internalLogging.ts
│ │ ├── lsp/
│ │ │ ├── LSPClient.ts
│ │ │ ├── LSPDiagnosticRegistry.ts
│ │ │ ├── LSPServerInstance.ts
│ │ │ ├── LSPServerManager.ts
│ │ │ ├── config.ts
│ │ │ ├── manager.ts
│ │ │ └── passiveFeedback.ts
│ │ ├── mcp/
│ │ │ ├── InProcessTransport.ts
│ │ │ ├── MCPConnectionManager.tsx
│ │ │ ├── SdkControlTransport.ts
│ │ │ ├── auth.ts
│ │ │ ├── channelAllowlist.ts
│ │ │ ├── channelNotification.ts
│ │ │ ├── channelPermissions.ts
│ │ │ ├── claudeai.ts
│ │ │ ├── client.ts
│ │ │ ├── config.ts
│ │ │ ├── elicitationHandler.ts
│ │ │ ├── envExpansion.ts
│ │ │ ├── headersHelper.ts
│ │ │ ├── mcpStringUtils.ts
│ │ │ ├── normalization.ts
│ │ │ ├── oauthPort.ts
│ │ │ ├── officialRegistry.ts
│ │ │ ├── types.ts
│ │ │ ├── useManageMCPConnections.ts
│ │ │ ├── utils.ts
│ │ │ ├── vscodeSdkMcp.ts
│ │ │ ├── xaa.ts
│ │ │ └── xaaIdpLogin.ts
│ │ ├── mcpServerApproval.tsx
│ │ ├── mockRateLimits.ts
│ │ ├── notifier.ts
│ │ ├── oauth/
│ │ │ ├── auth-code-listener.ts
│ │ │ ├── client.ts
│ │ │ ├── crypto.ts
│ │ │ ├── getOauthProfile.ts
│ │ │ └── index.ts
│ │ ├── plugins/
│ │ │ ├── PluginInstallationManager.ts
│ │ │ ├── pluginCliCommands.ts
│ │ │ └── pluginOperations.ts
│ │ ├── policyLimits/
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ ├── preventSleep.ts
│ │ ├── rateLimitMessages.ts
│ │ ├── rateLimitMocking.ts
│ │ ├── remoteManagedSettings/
│ │ │ ├── index.ts
│ │ │ ├── securityCheck.tsx
│ │ │ ├── syncCache.ts
│ │ │ ├── syncCacheState.ts
│ │ │ └── types.ts
│ │ ├── settingsSync/
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ ├── teamMemorySync/
│ │ │ ├── index.ts
│ │ │ ├── secretScanner.ts
│ │ │ ├── teamMemSecretGuard.ts
│ │ │ ├── types.ts
│ │ │ └── watcher.ts
│ │ ├── tips/
│ │ │ ├── tipHistory.ts
│ │ │ ├── tipRegistry.ts
│ │ │ └── tipScheduler.ts
│ │ ├── tokenEstimation.ts
│ │ ├── toolUseSummary/
│ │ │ └── toolUseSummaryGenerator.ts
│ │ ├── tools/
│ │ │ ├── StreamingToolExecutor.ts
│ │ │ ├── toolExecution.ts
│ │ │ ├── toolHooks.ts
│ │ │ └── toolOrchestration.ts
│ │ ├── vcr.ts
│ │ ├── voice.ts
│ │ ├── voiceKeyterms.ts
│ │ └── voiceStreamSTT.ts
│ ├── setup.ts
│ ├── skills/
│ │ ├── bundled/
│ │ │ ├── batch.ts
│ │ │ ├── claudeApi.ts
│ │ │ ├── claudeApiContent.ts
│ │ │ ├── claudeInChrome.ts
│ │ │ ├── debug.ts
│ │ │ ├── index.ts
│ │ │ ├── keybindings.ts
│ │ │ ├── loop.ts
│ │ │ ├── loremIpsum.ts
│ │ │ ├── remember.ts
│ │ │ ├── scheduleRemoteAgents.ts
│ │ │ ├── simplify.ts
│ │ │ ├── skillify.ts
│ │ │ ├── stuck.ts
│ │ │ ├── updateConfig.ts
│ │ │ ├── verify.ts
│ │ │ └── verifyContent.ts
│ │ ├── bundledSkills.ts
│ │ ├── loadSkillsDir.ts
│ │ └── mcpSkillBuilders.ts
│ ├── state/
│ │ ├── AppState.tsx
│ │ ├── AppStateStore.ts
│ │ ├── onChangeAppState.ts
│ │ ├── selectors.ts
│ │ ├── store.ts
│ │ └── teammateViewHelpers.ts
│ ├── tasks/
│ │ ├── DreamTask/
│ │ │ └── DreamTask.ts
│ │ ├── InProcessTeammateTask/
│ │ │ ├── InProcessTeammateTask.tsx
│ │ │ └── types.ts
│ │ ├── LocalAgentTask/
│ │ │ └── LocalAgentTask.tsx
│ │ ├── LocalMainSessionTask.ts
│ │ ├── LocalShellTask/
│ │ │ ├── LocalShellTask.tsx
│ │ │ ├── guards.ts
│ │ │ └── killShellTasks.ts
│ │ ├── RemoteAgentTask/
│ │ │ └── RemoteAgentTask.tsx
│ │ ├── pillLabel.ts
│ │ ├── stopTask.ts
│ │ └── types.ts
│ ├── tasks.ts
│ ├── tools/
│ │ ├── AgentTool/
│ │ │ ├── AgentTool.tsx
│ │ │ ├── UI.tsx
│ │ │ ├── agentColorManager.ts
│ │ │ ├── agentDisplay.ts
│ │ │ ├── agentMemory.ts
│ │ │ ├── agentMemorySnapshot.ts
│ │ │ ├── agentToolUtils.ts
│ │ │ ├── built-in/
│ │ │ │ ├── claudeCodeGuideAgent.ts
│ │ │ │ ├── exploreAgent.ts
│ │ │ │ ├── generalPurposeAgent.ts
│ │ │ │ ├── planAgent.ts
│ │ │ │ ├── statuslineSetup.ts
│ │ │ │ └── verificationAgent.ts
│ │ │ ├── builtInAgents.ts
│ │ │ ├── constants.ts
│ │ │ ├── forkSubagent.ts
│ │ │ ├── loadAgentsDir.ts
│ │ │ ├── prompt.ts
│ │ │ ├── resumeAgent.ts
│ │ │ └── runAgent.ts
│ │ ├── AskUserQuestionTool/
│ │ │ ├── AskUserQuestionTool.tsx
│ │ │ └── prompt.ts
│ │ ├── BashTool/
│ │ │ ├── BashTool.tsx
│ │ │ ├── BashToolResultMessage.tsx
│ │ │ ├── UI.tsx
│ │ │ ├── bashCommandHelpers.ts
│ │ │ ├── bashPermissions.ts
│ │ │ ├── bashSecurity.ts
│ │ │ ├── commandSemantics.ts
│ │ │ ├── commentLabel.ts
│ │ │ ├── destructiveCommandWarning.ts
│ │ │ ├── modeValidation.ts
│ │ │ ├── pathValidation.ts
│ │ │ ├── prompt.ts
│ │ │ ├── readOnlyValidation.ts
│ │ │ ├── sedEditParser.ts
│ │ │ ├── sedValidation.ts
│ │ │ ├── shouldUseSandbox.ts
│ │ │ ├── toolName.ts
│ │ │ └── utils.ts
│ │ ├── BriefTool/
│ │ │ ├── BriefTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── attachments.ts
│ │ │ ├── prompt.ts
│ │ │ └── upload.ts
│ │ ├── ConfigTool/
│ │ │ ├── ConfigTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ ├── prompt.ts
│ │ │ └── supportedSettings.ts
│ │ ├── EnterPlanModeTool/
│ │ │ ├── EnterPlanModeTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── EnterWorktreeTool/
│ │ │ ├── EnterWorktreeTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── ExitPlanModeTool/
│ │ │ ├── ExitPlanModeV2Tool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── ExitWorktreeTool/
│ │ │ ├── ExitWorktreeTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── FileEditTool/
│ │ │ ├── FileEditTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ ├── prompt.ts
│ │ │ ├── types.ts
│ │ │ └── utils.ts
│ │ ├── FileReadTool/
│ │ │ ├── FileReadTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── imageProcessor.ts
│ │ │ ├── limits.ts
│ │ │ └── prompt.ts
│ │ ├── FileWriteTool/
│ │ │ ├── FileWriteTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── GlobTool/
│ │ │ ├── GlobTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── GrepTool/
│ │ │ ├── GrepTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── LSPTool/
│ │ │ ├── LSPTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── formatters.ts
│ │ │ ├── prompt.ts
│ │ │ ├── schemas.ts
│ │ │ └── symbolContext.ts
│ │ ├── ListMcpResourcesTool/
│ │ │ ├── ListMcpResourcesTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── MCPTool/
│ │ │ ├── MCPTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── classifyForCollapse.ts
│ │ │ └── prompt.ts
│ │ ├── McpAuthTool/
│ │ │ └── McpAuthTool.ts
│ │ ├── NotebookEditTool/
│ │ │ ├── NotebookEditTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── PowerShellTool/
│ │ │ ├── PowerShellTool.tsx
│ │ │ ├── UI.tsx
│ │ │ ├── clmTypes.ts
│ │ │ ├── commandSemantics.ts
│ │ │ ├── commonParameters.ts
│ │ │ ├── destructiveCommandWarning.ts
│ │ │ ├── gitSafety.ts
│ │ │ ├── modeValidation.ts
│ │ │ ├── pathValidation.ts
│ │ │ ├── powershellPermissions.ts
│ │ │ ├── powershellSecurity.ts
│ │ │ ├── prompt.ts
│ │ │ ├── readOnlyValidation.ts
│ │ │ └── toolName.ts
│ │ ├── REPLTool/
│ │ │ ├── constants.ts
│ │ │ └── primitiveTools.ts
│ │ ├── ReadMcpResourceTool/
│ │ │ ├── ReadMcpResourceTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── RemoteTriggerTool/
│ │ │ ├── RemoteTriggerTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── ScheduleCronTool/
│ │ │ ├── CronCreateTool.ts
│ │ │ ├── CronDeleteTool.ts
│ │ │ ├── CronListTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── SendMessageTool/
│ │ │ ├── SendMessageTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── SkillTool/
│ │ │ ├── SkillTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── SleepTool/
│ │ │ └── prompt.ts
│ │ ├── SyntheticOutputTool/
│ │ │ └── SyntheticOutputTool.ts
│ │ ├── TaskCreateTool/
│ │ │ ├── TaskCreateTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TaskGetTool/
│ │ │ ├── TaskGetTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TaskListTool/
│ │ │ ├── TaskListTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TaskOutputTool/
│ │ │ ├── TaskOutputTool.tsx
│ │ │ └── constants.ts
│ │ ├── TaskStopTool/
│ │ │ ├── TaskStopTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── TaskUpdateTool/
│ │ │ ├── TaskUpdateTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TeamCreateTool/
│ │ │ ├── TeamCreateTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TeamDeleteTool/
│ │ │ ├── TeamDeleteTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TodoWriteTool/
│ │ │ ├── TodoWriteTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── ToolSearchTool/
│ │ │ ├── ToolSearchTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── WebFetchTool/
│ │ │ ├── UI.tsx
│ │ │ ├── WebFetchTool.ts
│ │ │ ├── preapproved.ts
│ │ │ ├── prompt.ts
│ │ │ └── utils.ts
│ │ ├── WebSearchTool/
│ │ │ ├── UI.tsx
│ │ │ ├── WebSearchTool.ts
│ │ │ └── prompt.ts
│ │ ├── shared/
│ │ │ ├── gitOperationTracking.ts
│ │ │ └── spawnMultiAgent.ts
│ │ ├── testing/
│ │ │ └── TestingPermissionTool.tsx
│ │ └── utils.ts
│ ├── tools.ts
│ ├── types/
│ │ ├── command.ts
│ │ ├── generated/
│ │ │ ├── events_mono/
│ │ │ │ ├── claude_code/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── claude_code_internal_event.ts
│ │ │ │ ├── common/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── auth.ts
│ │ │ │ └── growthbook/
│ │ │ │ └── v1/
│ │ │ │ └── growthbook_experiment_event.ts
│ │ │ └── google/
│ │ │ └── protobuf/
│ │ │ └── timestamp.ts
│ │ ├── hooks.ts
│ │ ├── ids.ts
│ │ ├── logs.ts
│ │ ├── permissions.ts
│ │ ├── plugin.ts
│ │ └── textInputTypes.ts
│ ├── upstreamproxy/
│ │ ├── relay.ts
│ │ └── upstreamproxy.ts
│ ├── utils/
│ │ ├── CircularBuffer.ts
│ │ ├── Cursor.ts
│ │ ├── QueryGuard.ts
│ │ ├── Shell.ts
│ │ ├── ShellCommand.ts
│ │ ├── abortController.ts
│ │ ├── activityManager.ts
│ │ ├── advisor.ts
│ │ ├── agentContext.ts
│ │ ├── agentId.ts
│ │ ├── agentSwarmsEnabled.ts
│ │ ├── agenticSessionSearch.ts
│ │ ├── analyzeContext.ts
│ │ ├── ansiToPng.ts
│ │ ├── ansiToSvg.ts
│ │ ├── api.ts
│ │ ├── apiPreconnect.ts
│ │ ├── appleTerminalBackup.ts
│ │ ├── argumentSubstitution.ts
│ │ ├── array.ts
│ │ ├── asciicast.ts
│ │ ├── attachments.ts
│ │ ├── attribution.ts
│ │ ├── auth.ts
│ │ ├── authFileDescriptor.ts
│ │ ├── authPortable.ts
│ │ ├── autoModeDenials.ts
│ │ ├── autoRunIssue.tsx
│ │ ├── autoUpdater.ts
│ │ ├── aws.ts
│ │ ├── awsAuthStatusManager.ts
│ │ ├── background/
│ │ │ └── remote/
│ │ │ ├── preconditions.ts
│ │ │ └── remoteSession.ts
│ │ ├── backgroundHousekeeping.ts
│ │ ├── bash/
│ │ │ ├── ParsedCommand.ts
│ │ │ ├── ShellSnapshot.ts
│ │ │ ├── ast.ts
│ │ │ ├── bashParser.ts
│ │ │ ├── bashPipeCommand.ts
│ │ │ ├── commands.ts
│ │ │ ├── heredoc.ts
│ │ │ ├── parser.ts
│ │ │ ├── prefix.ts
│ │ │ ├── registry.ts
│ │ │ ├── shellCompletion.ts
│ │ │ ├── shellPrefix.ts
│ │ │ ├── shellQuote.ts
│ │ │ ├── shellQuoting.ts
│ │ │ ├── specs/
│ │ │ │ ├── alias.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── nohup.ts
│ │ │ │ ├── pyright.ts
│ │ │ │ ├── sleep.ts
│ │ │ │ ├── srun.ts
│ │ │ │ ├── time.ts
│ │ │ │ └── timeout.ts
│ │ │ └── treeSitterAnalysis.ts
│ │ ├── betas.ts
│ │ ├── billing.ts
│ │ ├── binaryCheck.ts
│ │ ├── browser.ts
│ │ ├── bufferedWriter.ts
│ │ ├── bundledMode.ts
│ │ ├── caCerts.ts
│ │ ├── caCertsConfig.ts
│ │ ├── cachePaths.ts
│ │ ├── classifierApprovals.ts
│ │ ├── classifierApprovalsHook.ts
│ │ ├── claudeCodeHints.ts
│ │ ├── claudeDesktop.ts
│ │ ├── claudeInChrome/
│ │ │ ├── chromeNativeHost.ts
│ │ │ ├── common.ts
│ │ │ ├── mcpServer.ts
│ │ │ ├── prompt.ts
│ │ │ ├── setup.ts
│ │ │ ├── setupPortable.ts
│ │ │ └── toolRendering.tsx
│ │ ├── claudemd.ts
│ │ ├── cleanup.ts
│ │ ├── cleanupRegistry.ts
│ │ ├── cliArgs.ts
│ │ ├── cliHighlight.ts
│ │ ├── codeIndexing.ts
│ │ ├── collapseBackgroundBashNotifications.ts
│ │ ├── collapseHookSummaries.ts
│ │ ├── collapseReadSearch.ts
│ │ ├── collapseTeammateShutdowns.ts
│ │ ├── combinedAbortSignal.ts
│ │ ├── commandLifecycle.ts
│ │ ├── commitAttribution.ts
│ │ ├── completionCache.ts
│ │ ├── computerUse/
│ │ │ ├── appNames.ts
│ │ │ ├── cleanup.ts
│ │ │ ├── common.ts
│ │ │ ├── computerUseLock.ts
│ │ │ ├── drainRunLoop.ts
│ │ │ ├── escHotkey.ts
│ │ │ ├── executor.ts
│ │ │ ├── gates.ts
│ │ │ ├── hostAdapter.ts
│ │ │ ├── inputLoader.ts
│ │ │ ├── mcpServer.ts
│ │ │ ├── setup.ts
│ │ │ ├── swiftLoader.ts
│ │ │ ├── toolRendering.tsx
│ │ │ └── wrapper.tsx
│ │ ├── concurrentSessions.ts
│ │ ├── config.ts
│ │ ├── configConstants.ts
│ │ ├── contentArray.ts
│ │ ├── context.ts
│ │ ├── contextAnalysis.ts
│ │ ├── contextSuggestions.ts
│ │ ├── controlMessageCompat.ts
│ │ ├── conversationRecovery.ts
│ │ ├── cron.ts
│ │ ├── cronJitterConfig.ts
│ │ ├── cronScheduler.ts
│ │ ├── cronTasks.ts
│ │ ├── cronTasksLock.ts
│ │ ├── crossProjectResume.ts
│ │ ├── crypto.ts
│ │ ├── cwd.ts
│ │ ├── debug.ts
│ │ ├── debugFilter.ts
│ │ ├── deepLink/
│ │ │ ├── banner.ts
│ │ │ ├── parseDeepLink.ts
│ │ │ ├── protocolHandler.ts
│ │ │ ├── registerProtocol.ts
│ │ │ ├── terminalLauncher.ts
│ │ │ └── terminalPreference.ts
│ │ ├── desktopDeepLink.ts
│ │ ├── detectRepository.ts
│ │ ├── diagLogs.ts
│ │ ├── diff.ts
│ │ ├── directMemberMessage.ts
│ │ ├── displayTags.ts
│ │ ├── doctorContextWarnings.ts
│ │ ├── doctorDiagnostic.ts
│ │ ├── dxt/
│ │ │ ├── helpers.ts
│ │ │ └── zip.ts
│ │ ├── earlyInput.ts
│ │ ├── editor.ts
│ │ ├── effort.ts
│ │ ├── embeddedTools.ts
│ │ ├── env.ts
│ │ ├── envDynamic.ts
│ │ ├── envUtils.ts
│ │ ├── envValidation.ts
│ │ ├── errorLogSink.ts
│ │ ├── errors.ts
│ │ ├── exampleCommands.ts
│ │ ├── execFileNoThrow.ts
│ │ ├── execFileNoThrowPortable.ts
│ │ ├── execSyncWrapper.ts
│ │ ├── exportRenderer.tsx
│ │ ├── extraUsage.ts
│ │ ├── fastMode.ts
│ │ ├── file.ts
│ │ ├── fileHistory.ts
│ │ ├── fileOperationAnalytics.ts
│ │ ├── filePersistence/
│ │ │ ├── filePersistence.ts
│ │ │ └── outputsScanner.ts
│ │ ├── fileRead.ts
│ │ ├── fileReadCache.ts
│ │ ├── fileStateCache.ts
│ │ ├── findExecutable.ts
│ │ ├── fingerprint.ts
│ │ ├── forkedAgent.ts
│ │ ├── format.ts
│ │ ├── formatBriefTimestamp.ts
│ │ ├── fpsTracker.ts
│ │ ├── frontmatterParser.ts
│ │ ├── fsOperations.ts
│ │ ├── fullscreen.ts
│ │ ├── generatedFiles.ts
│ │ ├── generators.ts
│ │ ├── genericProcessUtils.ts
│ │ ├── getWorktreePaths.ts
│ │ ├── getWorktreePathsPortable.ts
│ │ ├── ghPrStatus.ts
│ │ ├── git/
│ │ │ ├── gitConfigParser.ts
│ │ │ ├── gitFilesystem.ts
│ │ │ └── gitignore.ts
│ │ ├── git.ts
│ │ ├── gitDiff.ts
│ │ ├── gitSettings.ts
│ │ ├── github/
│ │ │ └── ghAuthStatus.ts
│ │ ├── githubRepoPathMapping.ts
│ │ ├── glob.ts
│ │ ├── gracefulShutdown.ts
│ │ ├── groupToolUses.ts
│ │ ├── handlePromptSubmit.ts
│ │ ├── hash.ts
│ │ ├── headlessProfiler.ts
│ │ ├── heapDumpService.ts
│ │ ├── heatmap.ts
│ │ ├── highlightMatch.tsx
│ │ ├── hooks/
│ │ │ ├── AsyncHookRegistry.ts
│ │ │ ├── apiQueryHookHelper.ts
│ │ │ ├── execAgentHook.ts
│ │ │ ├── execHttpHook.ts
│ │ │ ├── execPromptHook.ts
│ │ │ ├── fileChangedWatcher.ts
│ │ │ ├── hookEvents.ts
│ │ │ ├── hookHelpers.ts
│ │ │ ├── hooksConfigManager.ts
│ │ │ ├── hooksConfigSnapshot.ts
│ │ │ ├── hooksSettings.ts
│ │ │ ├── postSamplingHooks.ts
│ │ │ ├── registerFrontmatterHooks.ts
│ │ │ ├── registerSkillHooks.ts
│ │ │ ├── sessionHooks.ts
│ │ │ ├── skillImprovement.ts
│ │ │ └── ssrfGuard.ts
│ │ ├── hooks.ts
│ │ ├── horizontalScroll.ts
│ │ ├── http.ts
│ │ ├── hyperlink.ts
│ │ ├── iTermBackup.ts
│ │ ├── ide.ts
│ │ ├── idePathConversion.ts
│ │ ├── idleTimeout.ts
│ │ ├── imagePaste.ts
│ │ ├── imageResizer.ts
│ │ ├── imageStore.ts
│ │ ├── imageValidation.ts
│ │ ├── immediateCommand.ts
│ │ ├── inProcessTeammateHelpers.ts
│ │ ├── ink.ts
│ │ ├── intl.ts
│ │ ├── jetbrains.ts
│ │ ├── json.ts
│ │ ├── jsonRead.ts
│ │ ├── keyboardShortcuts.ts
│ │ ├── lazySchema.ts
│ │ ├── listSessionsImpl.ts
│ │ ├── localInstaller.ts
│ │ ├── lockfile.ts
│ │ ├── log.ts
│ │ ├── logoV2Utils.ts
│ │ ├── mailbox.ts
│ │ ├── managedEnv.ts
│ │ ├── managedEnvConstants.ts
│ │ ├── markdown.ts
│ │ ├── markdownConfigLoader.ts
│ │ ├── mcp/
│ │ │ ├── dateTimeParser.ts
│ │ │ └── elicitationValidation.ts
│ │ ├── mcpInstructionsDelta.ts
│ │ ├── mcpOutputStorage.ts
│ │ ├── mcpValidation.ts
│ │ ├── mcpWebSocketTransport.ts
│ │ ├── memoize.ts
│ │ ├── memory/
│ │ │ ├── types.ts
│ │ │ └── versions.ts
│ │ ├── memoryFileDetection.ts
│ │ ├── messagePredicates.ts
│ │ ├── messageQueueManager.ts
│ │ ├── messages/
│ │ │ ├── mappers.ts
│ │ │ └── systemInit.ts
│ │ ├── messages.ts
│ │ ├── model/
│ │ │ ├── agent.ts
│ │ │ ├── aliases.ts
│ │ │ ├── antModels.ts
│ │ │ ├── bedrock.ts
│ │ │ ├── check1mAccess.ts
│ │ │ ├── configs.ts
│ │ │ ├── contextWindowUpgradeCheck.ts
│ │ │ ├── deprecation.ts
│ │ │ ├── model.ts
│ │ │ ├── modelAllowlist.ts
│ │ │ ├── modelCapabilities.ts
│ │ │ ├── modelOptions.ts
│ │ │ ├── modelStrings.ts
│ │ │ ├── modelSupportOverrides.ts
│ │ │ ├── providers.ts
│ │ │ └── validateModel.ts
│ │ ├── modelCost.ts
│ │ ├── modifiers.ts
│ │ ├── mtls.ts
│ │ ├── nativeInstaller/
│ │ │ ├── download.ts
│ │ │ ├── index.ts
│ │ │ ├── installer.ts
│ │ │ ├── packageManagers.ts
│ │ │ └── pidLock.ts
│ │ ├── notebook.ts
│ │ ├── objectGroupBy.ts
│ │ ├── pasteStore.ts
│ │ ├── path.ts
│ │ ├── pdf.ts
│ │ ├── pdfUtils.ts
│ │ ├── peerAddress.ts
│ │ ├── permissions/
│ │ │ ├── PermissionMode.ts
│ │ │ ├── PermissionPromptToolResultSchema.ts
│ │ │ ├── PermissionResult.ts
│ │ │ ├── PermissionRule.ts
│ │ │ ├── PermissionUpdate.ts
│ │ │ ├── PermissionUpdateSchema.ts
│ │ │ ├── autoModeState.ts
│ │ │ ├── bashClassifier.ts
│ │ │ ├── bypassPermissionsKillswitch.ts
│ │ │ ├── classifierDecision.ts
│ │ │ ├── classifierShared.ts
│ │ │ ├── dangerousPatterns.ts
│ │ │ ├── denialTracking.ts
│ │ │ ├── filesystem.ts
│ │ │ ├── getNextPermissionMode.ts
│ │ │ ├── pathValidation.ts
│ │ │ ├── permissionExplainer.ts
│ │ │ ├── permissionRuleParser.ts
│ │ │ ├── permissionSetup.ts
│ │ │ ├── permissions.ts
│ │ │ ├── permissionsLoader.ts
│ │ │ ├── shadowedRuleDetection.ts
│ │ │ ├── shellRuleMatching.ts
│ │ │ └── yoloClassifier.ts
│ │ ├── planModeV2.ts
│ │ ├── plans.ts
│ │ ├── platform.ts
│ │ ├── plugins/
│ │ │ ├── addDirPluginSettings.ts
│ │ │ ├── cacheUtils.ts
│ │ │ ├── dependencyResolver.ts
│ │ │ ├── fetchTelemetry.ts
│ │ │ ├── gitAvailability.ts
│ │ │ ├── headlessPluginInstall.ts
│ │ │ ├── hintRecommendation.ts
│ │ │ ├── installCounts.ts
│ │ │ ├── installedPluginsManager.ts
│ │ │ ├── loadPluginAgents.ts
│ │ │ ├── loadPluginCommands.ts
│ │ │ ├── loadPluginHooks.ts
│ │ │ ├── loadPluginOutputStyles.ts
│ │ │ ├── lspPluginIntegration.ts
│ │ │ ├── lspRecommendation.ts
│ │ │ ├── managedPlugins.ts
│ │ │ ├── marketplaceHelpers.ts
│ │ │ ├── marketplaceManager.ts
│ │ │ ├── mcpPluginIntegration.ts
│ │ │ ├── mcpbHandler.ts
│ │ │ ├── officialMarketplace.ts
│ │ │ ├── officialMarketplaceGcs.ts
│ │ │ ├── officialMarketplaceStartupCheck.ts
│ │ │ ├── orphanedPluginFilter.ts
│ │ │ ├── parseMarketplaceInput.ts
│ │ │ ├── performStartupChecks.tsx
│ │ │ ├── pluginAutoupdate.ts
│ │ │ ├── pluginBlocklist.ts
│ │ │ ├── pluginDirectories.ts
│ │ │ ├── pluginFlagging.ts
│ │ │ ├── pluginIdentifier.ts
│ │ │ ├── pluginInstallationHelpers.ts
│ │ │ ├── pluginLoader.ts
│ │ │ ├── pluginOptionsStorage.ts
│ │ │ ├── pluginPolicy.ts
│ │ │ ├── pluginStartupCheck.ts
│ │ │ ├── pluginVersioning.ts
│ │ │ ├── reconciler.ts
│ │ │ ├── refresh.ts
│ │ │ ├── schemas.ts
│ │ │ ├── validatePlugin.ts
│ │ │ ├── walkPluginMarkdown.ts
│ │ │ ├── zipCache.ts
│ │ │ └── zipCacheAdapters.ts
│ │ ├── powershell/
│ │ │ ├── dangerousCmdlets.ts
│ │ │ ├── parser.ts
│ │ │ └── staticPrefix.ts
│ │ ├── preflightChecks.tsx
│ │ ├── privacyLevel.ts
│ │ ├── process.ts
│ │ ├── processUserInput/
│ │ │ ├── processBashCommand.tsx
│ │ │ ├── processSlashCommand.tsx
│ │ │ ├── processTextPrompt.ts
│ │ │ └── processUserInput.ts
│ │ ├── profilerBase.ts
│ │ ├── promptCategory.ts
│ │ ├── promptEditor.ts
│ │ ├── promptShellExecution.ts
│ │ ├── proxy.ts
│ │ ├── queryContext.ts
│ │ ├── queryHelpers.ts
│ │ ├── queryProfiler.ts
│ │ ├── queueProcessor.ts
│ │ ├── readEditContext.ts
│ │ ├── readFileInRange.ts
│ │ ├── releaseNotes.ts
│ │ ├── renderOptions.ts
│ │ ├── ripgrep.ts
│ │ ├── sandbox/
│ │ │ ├── sandbox-adapter.ts
│ │ │ └── sandbox-ui-utils.ts
│ │ ├── sanitization.ts
│ │ ├── screenshotClipboard.ts
│ │ ├── sdkEventQueue.ts
│ │ ├── secureStorage/
│ │ │ ├── fallbackStorage.ts
│ │ │ ├── index.ts
│ │ │ ├── keychainPrefetch.ts
│ │ │ ├── macOsKeychainHelpers.ts
│ │ │ ├── macOsKeychainStorage.ts
│ │ │ └── plainTextStorage.ts
│ │ ├── semanticBoolean.ts
│ │ ├── semanticNumber.ts
│ │ ├── semver.ts
│ │ ├── sequential.ts
│ │ ├── sessionActivity.ts
│ │ ├── sessionEnvVars.ts
│ │ ├── sessionEnvironment.ts
│ │ ├── sessionFileAccessHooks.ts
│ │ ├── sessionIngressAuth.ts
│ │ ├── sessionRestore.ts
│ │ ├── sessionStart.ts
│ │ ├── sessionState.ts
│ │ ├── sessionStorage.ts
│ │ ├── sessionStoragePortable.ts
│ │ ├── sessionTitle.ts
│ │ ├── sessionUrl.ts
│ │ ├── set.ts
│ │ ├── settings/
│ │ │ ├── allErrors.ts
│ │ │ ├── applySettingsChange.ts
│ │ │ ├── changeDetector.ts
│ │ │ ├── constants.ts
│ │ │ ├── internalWrites.ts
│ │ │ ├── managedPath.ts
│ │ │ ├── mdm/
│ │ │ │ ├── constants.ts
│ │ │ │ ├── rawRead.ts
│ │ │ │ └── settings.ts
│ │ │ ├── permissionValidation.ts
│ │ │ ├── pluginOnlyPolicy.ts
│ │ │ ├── schemaOutput.ts
│ │ │ ├── settings.ts
│ │ │ ├── settingsCache.ts
│ │ │ ├── toolValidationConfig.ts
│ │ │ ├── types.ts
│ │ │ ├── validateEditTool.ts
│ │ │ ├── validation.ts
│ │ │ └── validationTips.ts
│ │ ├── shell/
│ │ │ ├── bashProvider.ts
│ │ │ ├── outputLimits.ts
│ │ │ ├── powershellDetection.ts
│ │ │ ├── powershellProvider.ts
│ │ │ ├── prefix.ts
│ │ │ ├── readOnlyCommandValidation.ts
│ │ │ ├── resolveDefaultShell.ts
│ │ │ ├── shellProvider.ts
│ │ │ ├── shellToolUtils.ts
│ │ │ └── specPrefix.ts
│ │ ├── shellConfig.ts
│ │ ├── sideQuery.ts
│ │ ├── sideQuestion.ts
│ │ ├── signal.ts
│ │ ├── sinks.ts
│ │ ├── skills/
│ │ │ └── skillChangeDetector.ts
│ │ ├── slashCommandParsing.ts
│ │ ├── sleep.ts
│ │ ├── sliceAnsi.ts
│ │ ├── slowOperations.ts
│ │ ├── standaloneAgent.ts
│ │ ├── startupProfiler.ts
│ │ ├── staticRender.tsx
│ │ ├── stats.ts
│ │ ├── statsCache.ts
│ │ ├── status.tsx
│ │ ├── statusNoticeDefinitions.tsx
│ │ ├── statusNoticeHelpers.ts
│ │ ├── stream.ts
│ │ ├── streamJsonStdoutGuard.ts
│ │ ├── streamlinedTransform.ts
│ │ ├── stringUtils.ts
│ │ ├── subprocessEnv.ts
│ │ ├── suggestions/
│ │ │ ├── commandSuggestions.ts
│ │ │ ├── directoryCompletion.ts
│ │ │ ├── shellHistoryCompletion.ts
│ │ │ ├── skillUsageTracking.ts
│ │ │ └── slackChannelSuggestions.ts
│ │ ├── swarm/
│ │ │ ├── It2SetupPrompt.tsx
│ │ │ ├── backends/
│ │ │ │ ├── ITermBackend.ts
│ │ │ │ ├── InProcessBackend.ts
│ │ │ │ ├── PaneBackendExecutor.ts
│ │ │ │ ├── TmuxBackend.ts
│ │ │ │ ├── detection.ts
│ │ │ │ ├── it2Setup.ts
│ │ │ │ ├── registry.ts
│ │ │ │ ├── teammateModeSnapshot.ts
│ │ │ │ └── types.ts
│ │ │ ├── constants.ts
│ │ │ ├── inProcessRunner.ts
│ │ │ ├── leaderPermissionBridge.ts
│ │ │ ├── permissionSync.ts
│ │ │ ├── reconnection.ts
│ │ │ ├── spawnInProcess.ts
│ │ │ ├── spawnUtils.ts
│ │ │ ├── teamHelpers.ts
│ │ │ ├── teammateInit.ts
│ │ │ ├── teammateLayoutManager.ts
│ │ │ ├── teammateModel.ts
│ │ │ └── teammatePromptAddendum.ts
│ │ ├── systemDirectories.ts
│ │ ├── systemPrompt.ts
│ │ ├── systemPromptType.ts
│ │ ├── systemTheme.ts
│ │ ├── taggedId.ts
│ │ ├── task/
│ │ │ ├── TaskOutput.ts
│ │ │ ├── diskOutput.ts
│ │ │ ├── framework.ts
│ │ │ ├── outputFormatting.ts
│ │ │ └── sdkProgress.ts
│ │ ├── tasks.ts
│ │ ├── teamDiscovery.ts
│ │ ├── teamMemoryOps.ts
│ │ ├── teammate.ts
│ │ ├── teammateContext.ts
│ │ ├── teammateMailbox.ts
│ │ ├── telemetry/
│ │ │ ├── betaSessionTracing.ts
│ │ │ ├── bigqueryExporter.ts
│ │ │ ├── events.ts
│ │ │ ├── instrumentation.ts
│ │ │ ├── logger.ts
│ │ │ ├── perfettoTracing.ts
│ │ │ ├── pluginTelemetry.ts
│ │ │ ├── sessionTracing.ts
│ │ │ └── skillLoadedEvent.ts
│ │ ├── telemetryAttributes.ts
│ │ ├── teleport/
│ │ │ ├── api.ts
│ │ │ ├── environmentSelection.ts
│ │ │ ├── environments.ts
│ │ │ └── gitBundle.ts
│ │ ├── teleport.tsx
│ │ ├── tempfile.ts
│ │ ├── terminal.ts
│ │ ├── terminalPanel.ts
│ │ ├── textHighlighting.ts
│ │ ├── theme.ts
│ │ ├── thinking.ts
│ │ ├── timeouts.ts
│ │ ├── tmuxSocket.ts
│ │ ├── todo/
│ │ │ └── types.ts
│ │ ├── tokenBudget.ts
│ │ ├── tokens.ts
│ │ ├── toolErrors.ts
│ │ ├── toolPool.ts
│ │ ├── toolResultStorage.ts
│ │ ├── toolSchemaCache.ts
│ │ ├── toolSearch.ts
│ │ ├── transcriptSearch.ts
│ │ ├── treeify.ts
│ │ ├── truncate.ts
│ │ ├── ultraplan/
│ │ │ ├── ccrSession.ts
│ │ │ └── keyword.ts
│ │ ├── unaryLogging.ts
│ │ ├── undercover.ts
│ │ ├── user.ts
│ │ ├── userAgent.ts
│ │ ├── userPromptKeywords.ts
│ │ ├── uuid.ts
│ │ ├── warningHandler.ts
│ │ ├── which.ts
│ │ ├── windowsPaths.ts
│ │ ├── withResolvers.ts
│ │ ├── words.ts
│ │ ├── workloadContext.ts
│ │ ├── worktree.ts
│ │ ├── worktreeModeEnabled.ts
│ │ ├── xdg.ts
│ │ ├── xml.ts
│ │ ├── yaml.ts
│ │ └── zodToJsonSchema.ts
│ ├── vim/
│ │ ├── motions.ts
│ │ ├── operators.ts
│ │ ├── textObjects.ts
│ │ ├── transitions.ts
│ │ └── types.ts
│ └── voice/
│ └── voiceModeEnabled.ts
└── vendor/
├── audio-capture-src/
│ └── index.ts
├── image-processor-src/
│ └── index.ts
├── modifiers-napi-src/
│ └── index.ts
└── url-handler-src/
└── index.ts
================================================
FILE CONTENTS
================================================
================================================
FILE: README.md
================================================
# claude-code-sourcemap
[](https://linux.do)
> [!WARNING]
> This repository is **unofficial** and is reconstructed from the public npm package and source map analysis, **for research purposes only**.
> It does **not** represent the original internal development repository structure.
>
> 本仓库为**非官方**整理版,基于公开 npm 发布包与 source map 分析还原,**仅供研究使用**。
> **不代表**官方原始内部开发仓库结构。
> 一切基于L站"飘然与我同"的情报提供
## 概述
本仓库通过 npm 发布包(`@anthropic-ai/claude-code`)内附带的 source map(`cli.js.map`)还原的 TypeScript 源码,版本为 `2.1.88`。
## 来源
- npm 包:[@anthropic-ai/claude-code](https://www.npmjs.com/package/@anthropic-ai/claude-code)
- 还原版本:`2.1.88`
- 还原文件数:**4756 个**(含 1884 个 `.ts`/`.tsx` 源文件)
- 还原方式:提取 `cli.js.map` 中的 `sourcesContent` 字段
## 目录结构
```
restored-src/src/
├── main.tsx # CLI 入口
├── tools/ # 工具实现(Bash、FileEdit、Grep、MCP 等 30+ 个)
├── commands/ # 命令实现(commit、review、config 等 40+ 个)
├── services/ # API、MCP、分析等服务
├── utils/ # 工具函数(git、model、auth、env 等)
├── context/ # React Context
├── coordinator/ # 多 Agent 协调模式
├── assistant/ # 助手模式(KAIROS)
├── buddy/ # AI 伴侣 UI
├── remote/ # 远程会话
├── plugins/ # 插件系统
├── skills/ # 技能系统
├── voice/ # 语音交互
└── vim/ # Vim 模式
```
## 声明
- 源码版权归 [Anthropic](https://www.anthropic.com) 所有
- 本仓库仅用于技术研究与学习,请勿用于商业用途
- 如有侵权,请联系删除
================================================
FILE: claude-code-2.1.88.tgz
================================================
[File too large to display: 29.8 MB]
================================================
FILE: extract-sources.js
================================================
const { SourceMapConsumer } = require('source-map');
const fs = require('fs');
const path = require('path');
async function extractSources() {
const mapFile = path.join(__dirname, 'package/cli.js.map');
console.log('Reading source map...');
const rawMap = JSON.parse(fs.readFileSync(mapFile, 'utf8'));
console.log(`Sources count: ${rawMap.sources.length}`);
console.log('Sample sources:', rawMap.sources.slice(0, 10));
const outDir = path.join(__dirname, 'restored-src');
let written = 0, skipped = 0;
for (let i = 0; i < rawMap.sources.length; i++) {
const sourcePath = rawMap.sources[i];
const content = rawMap.sourcesContent && rawMap.sourcesContent[i];
if (!content) { skipped++; continue; }
// Sanitize path
let relPath = sourcePath
.replace(/^.*node_modules\//, 'node_modules/')
.replace(/^webpack:\/\/\//, '')
.replace(/^webpack:\/\//, '')
.replace(/^\/?\.\.\//, '')
.replace(/\?.*$/, '');
if (!relPath || relPath === 'webpack/bootstrap') {
relPath = `__webpack__/source_${i}.js`;
}
// Remove leading slashes and dangerous path components
relPath = relPath.replace(/^\/+/, '').replace(/\.\.\//g, '_dotdot_/');
const fullPath = path.join(outDir, relPath);
const dir = path.dirname(fullPath);
fs.mkdirSync(dir, { recursive: true });
fs.writeFileSync(fullPath, content, 'utf8');
written++;
if (written % 500 === 0) console.log(`Written ${written} files...`);
}
console.log(`Done. Written: ${written}, Skipped (no content): ${skipped}`);
}
extractSources().catch(console.error);
================================================
FILE: package/LICENSE.md
================================================
© Anthropic PBC. All rights reserved. Use is subject to the Legal Agreements outlined here: https://code.claude.com/docs/en/legal-and-compliance.
================================================
FILE: package/README.md
================================================
# Claude Code
 [![npm]](https://www.npmjs.com/package/@anthropic-ai/claude-code)
[npm]: https://img.shields.io/npm/v/@anthropic-ai/claude-code.svg?style=flat-square
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows -- all through natural language commands. Use it in your terminal, IDE, or tag @claude on Github.
**Learn more at [Claude Code Homepage](https://claude.com/product/claude-code)** | [Documentation](https://code.claude.com/docs/en/overview)
<img src="https://github.com/anthropics/claude-code/blob/main/demo.gif?raw=1" />
## Get started
1. Install Claude Code:
```sh
npm install -g @anthropic-ai/claude-code
```
2. Navigate to your project directory and run `claude`.
## Reporting Bugs
We welcome your feedback. Use the `/bug` command to report issues directly within Claude Code, or file a [GitHub issue](https://github.com/anthropics/claude-code/issues).
## Connect on Discord
Join the [Claude Developers Discord](https://anthropic.com/discord) to connect with other developers using Claude Code. Get help, share feedback, and discuss your projects with the community.
## Data collection, usage, and retention
When you use Claude Code, we collect feedback, which includes usage data (such as code acceptance or rejections), associated conversation data, and user feedback submitted via the `/bug` command.
### How we use your data
See our [data usage policies](https://code.claude.com/docs/en/data-usage).
### Privacy safeguards
We have implemented several safeguards to protect your data, including limited retention periods for sensitive information and restricted access to user session data.
For full details, please review our [Commercial Terms of Service](https://www.anthropic.com/legal/commercial-terms) and [Privacy Policy](https://www.anthropic.com/legal/privacy).
================================================
FILE: package/cli.js
================================================
[File too large to display: 12.4 MB]
================================================
FILE: package/package.json
================================================
{
"name": "@anthropic-ai/claude-code",
"version": "2.1.88",
"bin": {
"claude": "cli.js"
},
"engines": {
"node": ">=18.0.0"
},
"type": "module",
"author": "Anthropic <support@anthropic.com>",
"license": "SEE LICENSE IN README.md",
"description": "Use Claude, Anthropic's AI assistant, right from your terminal. Claude can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.",
"homepage": "https://github.com/anthropics/claude-code",
"bugs": {
"url": "https://github.com/anthropics/claude-code/issues"
},
"scripts": {
"prepare": "node -e \"if (!process.env.AUTHORIZED) { console.error('ERROR: Direct publishing is not allowed.\\nPlease see the release workflow documentation to publish this package.'); process.exit(1); }\""
},
"dependencies": {},
"optionalDependencies": {
"@img/sharp-darwin-arm64": "^0.34.2",
"@img/sharp-darwin-x64": "^0.34.2",
"@img/sharp-linux-arm": "^0.34.2",
"@img/sharp-linux-arm64": "^0.34.2",
"@img/sharp-linux-x64": "^0.34.2",
"@img/sharp-linuxmusl-arm64": "^0.34.2",
"@img/sharp-linuxmusl-x64": "^0.34.2",
"@img/sharp-win32-arm64": "^0.34.2",
"@img/sharp-win32-x64": "^0.34.2"
}
}
================================================
FILE: package/sdk-tools.d.ts
================================================
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* JSON Schema definitions for Claude CLI tool inputs
*/
export type ToolInputSchemas =
| AgentInput
| BashInput
| TaskOutputInput
| ExitPlanModeInput
| FileEditInput
| FileReadInput
| FileWriteInput
| GlobInput
| GrepInput
| TaskStopInput
| ListMcpResourcesInput
| McpInput
| NotebookEditInput
| ReadMcpResourceInput
| TodoWriteInput
| WebFetchInput
| WebSearchInput
| AskUserQuestionInput
| ConfigInput
| EnterWorktreeInput
| ExitWorktreeInput
| ToolOutputSchemas;
export type ToolOutputSchemas =
| AgentOutput
| BashOutput
| ExitPlanModeOutput
| FileEditOutput
| FileReadOutput
| FileWriteOutput
| GlobOutput
| GrepOutput
| TaskStopOutput
| ListMcpResourcesOutput
| McpOutput
| NotebookEditOutput
| ReadMcpResourceOutput
| TodoWriteOutput
| WebFetchOutput
| WebSearchOutput
| AskUserQuestionOutput
| ConfigOutput
| EnterWorktreeOutput
| ExitWorktreeOutput;
export type AgentOutput =
| {
agentId: string;
agentType?: string;
content: {
type: "text";
text: string;
}[];
totalToolUseCount: number;
totalDurationMs: number;
totalTokens: number;
usage: {
input_tokens: number;
output_tokens: number;
cache_creation_input_tokens: number | null;
cache_read_input_tokens: number | null;
server_tool_use: {
web_search_requests: number;
web_fetch_requests: number;
} | null;
service_tier: ("standard" | "priority" | "batch") | null;
cache_creation: {
ephemeral_1h_input_tokens: number;
ephemeral_5m_input_tokens: number;
} | null;
};
status: "completed";
prompt: string;
}
| {
status: "async_launched";
/**
* The ID of the async agent
*/
agentId: string;
/**
* The description of the task
*/
description: string;
/**
* The prompt for the agent
*/
prompt: string;
/**
* Path to the output file for checking agent progress
*/
outputFile: string;
/**
* Whether the calling agent has Read/Bash tools to check progress
*/
canReadOutputFile?: boolean;
};
export type FileReadOutput =
| {
type: "text";
file: {
/**
* The path to the file that was read
*/
filePath: string;
/**
* The content of the file
*/
content: string;
/**
* Number of lines in the returned content
*/
numLines: number;
/**
* The starting line number
*/
startLine: number;
/**
* Total number of lines in the file
*/
totalLines: number;
};
}
| {
type: "image";
file: {
/**
* Base64-encoded image data
*/
base64: string;
/**
* The MIME type of the image
*/
type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
/**
* Original file size in bytes
*/
originalSize: number;
/**
* Image dimension info for coordinate mapping
*/
dimensions?: {
/**
* Original image width in pixels
*/
originalWidth?: number;
/**
* Original image height in pixels
*/
originalHeight?: number;
/**
* Displayed image width in pixels (after resizing)
*/
displayWidth?: number;
/**
* Displayed image height in pixels (after resizing)
*/
displayHeight?: number;
};
};
}
| {
type: "notebook";
file: {
/**
* The path to the notebook file
*/
filePath: string;
/**
* Array of notebook cells
*/
cells: unknown[];
};
}
| {
type: "pdf";
file: {
/**
* The path to the PDF file
*/
filePath: string;
/**
* Base64-encoded PDF data
*/
base64: string;
/**
* Original file size in bytes
*/
originalSize: number;
};
}
| {
type: "parts";
file: {
/**
* The path to the PDF file
*/
filePath: string;
/**
* Original file size in bytes
*/
originalSize: number;
/**
* Number of pages extracted
*/
count: number;
/**
* Directory containing extracted page images
*/
outputDir: string;
};
}
| {
type: "file_unchanged";
file: {
/**
* The path to the file
*/
filePath: string;
};
};
export type ListMcpResourcesOutput = {
/**
* Resource URI
*/
uri: string;
/**
* Resource name
*/
name: string;
/**
* MIME type of the resource
*/
mimeType?: string;
/**
* Resource description
*/
description?: string;
/**
* Server that provides this resource
*/
server: string;
}[];
/**
* MCP tool execution result
*/
export type McpOutput = string;
export interface AgentInput {
/**
* A short (3-5 word) description of the task
*/
description: string;
/**
* The task for the agent to perform
*/
prompt: string;
/**
* The type of specialized agent to use for this task
*/
subagent_type?: string;
/**
* Optional model override for this agent. Takes precedence over the agent definition's model frontmatter. If omitted, uses the agent definition's model, or inherits from the parent.
*/
model?: "sonnet" | "opus" | "haiku";
/**
* Set to true to run this agent in the background. You will be notified when it completes.
*/
run_in_background?: boolean;
/**
* Name for the spawned agent. Makes it addressable via SendMessage({to: name}) while running.
*/
name?: string;
/**
* Team name for spawning. Uses current team context if omitted.
*/
team_name?: string;
/**
* Permission mode for spawned teammate (e.g., "plan" to require plan approval).
*/
mode?: "acceptEdits" | "bypassPermissions" | "default" | "dontAsk" | "plan";
/**
* Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo.
*/
isolation?: "worktree";
}
export interface BashInput {
/**
* The command to execute
*/
command: string;
/**
* Optional timeout in milliseconds (max 600000)
*/
timeout?: number;
/**
* Clear, concise description of what this command does in active voice. Never use words like "complex" or "risk" in the description - just describe what it does.
*
* For simple commands (git, npm, standard CLI tools), keep it brief (5-10 words):
* - ls → "List files in current directory"
* - git status → "Show working tree status"
* - npm install → "Install package dependencies"
*
* For commands that are harder to parse at a glance (piped commands, obscure flags, etc.), add enough context to clarify what it does:
* - find . -name "*.tmp" -exec rm {} \; → "Find and delete all .tmp files recursively"
* - git reset --hard origin/main → "Discard all local changes and match remote main"
* - curl -s url | jq '.data[]' → "Fetch JSON from URL and extract data array elements"
*/
description?: string;
/**
* Set to true to run this command in the background. Use Read to read the output later.
*/
run_in_background?: boolean;
/**
* Set this to true to dangerously override sandbox mode and run commands without sandboxing.
*/
dangerouslyDisableSandbox?: boolean;
}
export interface TaskOutputInput {
/**
* The task ID to get output from
*/
task_id: string;
/**
* Whether to wait for completion
*/
block: boolean;
/**
* Max wait time in ms
*/
timeout: number;
}
export interface ExitPlanModeInput {
/**
* Prompt-based permissions needed to implement the plan. These describe categories of actions rather than specific commands.
*/
allowedPrompts?: {
/**
* The tool this prompt applies to
*/
tool: "Bash";
/**
* Semantic description of the action, e.g. "run tests", "install dependencies"
*/
prompt: string;
}[];
[k: string]: unknown;
}
export interface FileEditInput {
/**
* The absolute path to the file to modify
*/
file_path: string;
/**
* The text to replace
*/
old_string: string;
/**
* The text to replace it with (must be different from old_string)
*/
new_string: string;
/**
* Replace all occurrences of old_string (default false)
*/
replace_all?: boolean;
}
export interface FileReadInput {
/**
* The absolute path to the file to read
*/
file_path: string;
/**
* The line number to start reading from. Only provide if the file is too large to read at once
*/
offset?: number;
/**
* The number of lines to read. Only provide if the file is too large to read at once.
*/
limit?: number;
/**
* Page range for PDF files (e.g., "1-5", "3", "10-20"). Only applicable to PDF files. Maximum 20 pages per request.
*/
pages?: string;
}
export interface FileWriteInput {
/**
* The absolute path to the file to write (must be absolute, not relative)
*/
file_path: string;
/**
* The content to write to the file
*/
content: string;
}
export interface GlobInput {
/**
* The glob pattern to match files against
*/
pattern: string;
/**
* The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.
*/
path?: string;
}
export interface GrepInput {
/**
* The regular expression pattern to search for in file contents
*/
pattern: string;
/**
* File or directory to search in (rg PATH). Defaults to current working directory.
*/
path?: string;
/**
* Glob pattern to filter files (e.g. "*.js", "*.{ts,tsx}") - maps to rg --glob
*/
glob?: string;
/**
* Output mode: "content" shows matching lines (supports -A/-B/-C context, -n line numbers, head_limit), "files_with_matches" shows file paths (supports head_limit), "count" shows match counts (supports head_limit). Defaults to "files_with_matches".
*/
output_mode?: "content" | "files_with_matches" | "count";
/**
* Number of lines to show before each match (rg -B). Requires output_mode: "content", ignored otherwise.
*/
"-B"?: number;
/**
* Number of lines to show after each match (rg -A). Requires output_mode: "content", ignored otherwise.
*/
"-A"?: number;
/**
* Alias for context.
*/
"-C"?: number;
/**
* Number of lines to show before and after each match (rg -C). Requires output_mode: "content", ignored otherwise.
*/
context?: number;
/**
* Show line numbers in output (rg -n). Requires output_mode: "content", ignored otherwise. Defaults to true.
*/
"-n"?: boolean;
/**
* Case insensitive search (rg -i)
*/
"-i"?: boolean;
/**
* File type to search (rg --type). Common types: js, py, rust, go, java, etc. More efficient than include for standard file types.
*/
type?: string;
/**
* Limit output to first N lines/entries, equivalent to "| head -N". Works across all output modes: content (limits output lines), files_with_matches (limits file paths), count (limits count entries). Defaults to 250 when unspecified. Pass 0 for unlimited (use sparingly — large result sets waste context).
*/
head_limit?: number;
/**
* Skip first N lines/entries before applying head_limit, equivalent to "| tail -n +N | head -N". Works across all output modes. Defaults to 0.
*/
offset?: number;
/**
* Enable multiline mode where . matches newlines and patterns can span lines (rg -U --multiline-dotall). Default: false.
*/
multiline?: boolean;
}
export interface TaskStopInput {
/**
* The ID of the background task to stop
*/
task_id?: string;
/**
* Deprecated: use task_id instead
*/
shell_id?: string;
}
export interface ListMcpResourcesInput {
/**
* Optional server name to filter resources by
*/
server?: string;
}
export interface McpInput {
[k: string]: unknown;
}
export interface NotebookEditInput {
/**
* The absolute path to the Jupyter notebook file to edit (must be absolute, not relative)
*/
notebook_path: string;
/**
* The ID of the cell to edit. When inserting a new cell, the new cell will be inserted after the cell with this ID, or at the beginning if not specified.
*/
cell_id?: string;
/**
* The new source for the cell
*/
new_source: string;
/**
* The type of the cell (code or markdown). If not specified, it defaults to the current cell type. If using edit_mode=insert, this is required.
*/
cell_type?: "code" | "markdown";
/**
* The type of edit to make (replace, insert, delete). Defaults to replace.
*/
edit_mode?: "replace" | "insert" | "delete";
}
export interface ReadMcpResourceInput {
/**
* The MCP server name
*/
server: string;
/**
* The resource URI to read
*/
uri: string;
}
export interface TodoWriteInput {
/**
* The updated todo list
*/
todos: {
content: string;
status: "pending" | "in_progress" | "completed";
activeForm: string;
}[];
}
export interface WebFetchInput {
/**
* The URL to fetch content from
*/
url: string;
/**
* The prompt to run on the fetched content
*/
prompt: string;
}
export interface WebSearchInput {
/**
* The search query to use
*/
query: string;
/**
* Only include search results from these domains
*/
allowed_domains?: string[];
/**
* Never include search results from these domains
*/
blocked_domains?: string[];
}
export interface AskUserQuestionInput {
/**
* Questions to ask the user (1-4 questions)
*
* @minItems 1
* @maxItems 4
*/
questions:
| [
{
/**
* The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"
*/
question: string;
/**
* Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".
*/
header: string;
/**
* The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.
*
* @minItems 2
* @maxItems 4
*/
options:
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
];
/**
* Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.
*/
multiSelect: boolean;
}
]
| [
{
/**
* The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"
*/
question: string;
/**
* Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".
*/
header: string;
/**
* The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.
*
* @minItems 2
* @maxItems 4
*/
options:
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
];
/**
* Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.
*/
multiSelect: boolean;
},
{
/**
* The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"
*/
question: string;
/**
* Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".
*/
header: string;
/**
* The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.
*
* @minItems 2
* @maxItems 4
*/
options:
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
];
/**
* Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.
*/
multiSelect: boolean;
}
]
| [
{
/**
* The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"
*/
question: string;
/**
* Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".
*/
header: string;
/**
* The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.
*
* @minItems 2
* @maxItems 4
*/
options:
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
];
/**
* Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.
*/
multiSelect: boolean;
},
{
/**
* The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"
*/
question: string;
/**
* Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".
*/
header: string;
/**
* The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.
*
* @minItems 2
* @maxItems 4
*/
options:
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
];
/**
* Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.
*/
multiSelect: boolean;
},
{
/**
* The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"
*/
question: string;
/**
* Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".
*/
header: string;
/**
* The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.
*
* @minItems 2
* @maxItems 4
*/
options:
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
];
/**
* Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.
*/
multiSelect: boolean;
}
]
| [
{
/**
* The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"
*/
question: string;
/**
* Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".
*/
header: string;
/**
* The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.
*
* @minItems 2
* @maxItems 4
*/
options:
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
];
/**
* Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.
*/
multiSelect: boolean;
},
{
/**
* The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"
*/
question: string;
/**
* Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".
*/
header: string;
/**
* The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.
*
* @minItems 2
* @maxItems 4
*/
options:
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
];
/**
* Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.
*/
multiSelect: boolean;
},
{
/**
* The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"
*/
question: string;
/**
* Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".
*/
header: string;
/**
* The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.
*
* @minItems 2
* @maxItems 4
*/
options:
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
];
/**
* Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.
*/
multiSelect: boolean;
},
{
/**
* The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"
*/
question: string;
/**
* Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".
*/
header: string;
/**
* The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.
*
* @minItems 2
* @maxItems 4
*/
options:
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
];
/**
* Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.
*/
multiSelect: boolean;
}
];
/**
* User answers collected by the permission component
*/
answers?: {
[k: string]: string;
};
/**
* Optional per-question annotations from the user (e.g., notes on preview selections). Keyed by question text.
*/
annotations?: {
[k: string]: {
/**
* The preview content of the selected option, if the question used previews.
*/
preview?: string;
/**
* Free-text notes the user added to their selection.
*/
notes?: string;
};
};
/**
* Optional metadata for tracking and analytics purposes. Not displayed to user.
*/
metadata?: {
/**
* Optional identifier for the source of this question (e.g., "remember" for /remember command). Used for analytics tracking.
*/
source?: string;
};
}
export interface ConfigInput {
/**
* The setting key (e.g., "theme", "model", "permissions.defaultMode")
*/
setting: string;
/**
* The new value. Omit to get current value.
*/
value?: string | boolean | number;
}
export interface EnterWorktreeInput {
/**
* Optional name for the worktree. Each "/"-separated segment may contain only letters, digits, dots, underscores, and dashes; max 64 chars total. A random name is generated if not provided.
*/
name?: string;
}
export interface ExitWorktreeInput {
/**
* "keep" leaves the worktree and branch on disk; "remove" deletes both.
*/
action: "keep" | "remove";
/**
* Required true when action is "remove" and the worktree has uncommitted files or unmerged commits. The tool will refuse and list them otherwise.
*/
discard_changes?: boolean;
}
export interface BashOutput {
/**
* The standard output of the command
*/
stdout: string;
/**
* The standard error output of the command
*/
stderr: string;
/**
* Path to raw output file for large MCP tool outputs
*/
rawOutputPath?: string;
/**
* Whether the command was interrupted
*/
interrupted: boolean;
/**
* Flag to indicate if stdout contains image data
*/
isImage?: boolean;
/**
* ID of the background task if command is running in background
*/
backgroundTaskId?: string;
/**
* True if the user manually backgrounded the command with Ctrl+B
*/
backgroundedByUser?: boolean;
/**
* True if assistant-mode auto-backgrounded a long-running blocking command
*/
assistantAutoBackgrounded?: boolean;
/**
* Flag to indicate if sandbox mode was overridden
*/
dangerouslyDisableSandbox?: boolean;
/**
* Semantic interpretation for non-error exit codes with special meaning
*/
returnCodeInterpretation?: string;
/**
* Whether the command is expected to produce no output on success
*/
noOutputExpected?: boolean;
/**
* Structured content blocks
*/
structuredContent?: unknown[];
/**
* Path to the persisted full output in tool-results dir (set when output is too large for inline)
*/
persistedOutputPath?: string;
/**
* Total size of the output in bytes (set when output is too large for inline)
*/
persistedOutputSize?: number;
}
export interface ExitPlanModeOutput {
/**
* The plan that was presented to the user
*/
plan: string | null;
isAgent: boolean;
/**
* The file path where the plan was saved
*/
filePath?: string;
/**
* Whether the Agent tool is available in the current context
*/
hasTaskTool?: boolean;
/**
* True when the user edited the plan (CCR web UI or Ctrl+G); determines whether the plan is echoed back in tool_result
*/
planWasEdited?: boolean;
/**
* When true, the teammate has sent a plan approval request to the team leader
*/
awaitingLeaderApproval?: boolean;
/**
* Unique identifier for the plan approval request
*/
requestId?: string;
}
export interface FileEditOutput {
/**
* The file path that was edited
*/
filePath: string;
/**
* The original string that was replaced
*/
oldString: string;
/**
* The new string that replaced it
*/
newString: string;
/**
* The original file contents before editing
*/
originalFile: string;
/**
* Diff patch showing the changes
*/
structuredPatch: {
oldStart: number;
oldLines: number;
newStart: number;
newLines: number;
lines: string[];
}[];
/**
* Whether the user modified the proposed changes
*/
userModified: boolean;
/**
* Whether all occurrences were replaced
*/
replaceAll: boolean;
gitDiff?: {
filename: string;
status: "modified" | "added";
additions: number;
deletions: number;
changes: number;
patch: string;
/**
* GitHub owner/repo when available
*/
repository?: string | null;
};
}
export interface FileWriteOutput {
/**
* Whether a new file was created or an existing file was updated
*/
type: "create" | "update";
/**
* The path to the file that was written
*/
filePath: string;
/**
* The content that was written to the file
*/
content: string;
/**
* Diff patch showing the changes
*/
structuredPatch: {
oldStart: number;
oldLines: number;
newStart: number;
newLines: number;
lines: string[];
}[];
/**
* The original file content before the write (null for new files)
*/
originalFile: string | null;
gitDiff?: {
filename: string;
status: "modified" | "added";
additions: number;
deletions: number;
changes: number;
patch: string;
/**
* GitHub owner/repo when available
*/
repository?: string | null;
};
}
export interface GlobOutput {
/**
* Time taken to execute the search in milliseconds
*/
durationMs: number;
/**
* Total number of files found
*/
numFiles: number;
/**
* Array of file paths that match the pattern
*/
filenames: string[];
/**
* Whether results were truncated (limited to 100 files)
*/
truncated: boolean;
}
export interface GrepOutput {
mode?: "content" | "files_with_matches" | "count";
numFiles: number;
filenames: string[];
content?: string;
numLines?: number;
numMatches?: number;
appliedLimit?: number;
appliedOffset?: number;
}
export interface TaskStopOutput {
/**
* Status message about the operation
*/
message: string;
/**
* The ID of the task that was stopped
*/
task_id: string;
/**
* The type of the task that was stopped
*/
task_type: string;
/**
* The command or description of the stopped task
*/
command?: string;
}
export interface NotebookEditOutput {
/**
* The new source code that was written to the cell
*/
new_source: string;
/**
* The ID of the cell that was edited
*/
cell_id?: string;
/**
* The type of the cell
*/
cell_type: "code" | "markdown";
/**
* The programming language of the notebook
*/
language: string;
/**
* The edit mode that was used
*/
edit_mode: string;
/**
* Error message if the operation failed
*/
error?: string;
/**
* The path to the notebook file
*/
notebook_path: string;
/**
* The original notebook content before modification
*/
original_file: string;
/**
* The updated notebook content after modification
*/
updated_file: string;
}
export interface ReadMcpResourceOutput {
contents: {
/**
* Resource URI
*/
uri: string;
/**
* MIME type of the content
*/
mimeType?: string;
/**
* Text content of the resource
*/
text?: string;
/**
* Path where binary blob content was saved
*/
blobSavedTo?: string;
}[];
}
export interface TodoWriteOutput {
/**
* The todo list before the update
*/
oldTodos: {
content: string;
status: "pending" | "in_progress" | "completed";
activeForm: string;
}[];
/**
* The todo list after the update
*/
newTodos: {
content: string;
status: "pending" | "in_progress" | "completed";
activeForm: string;
}[];
verificationNudgeNeeded?: boolean;
}
export interface WebFetchOutput {
/**
* Size of the fetched content in bytes
*/
bytes: number;
/**
* HTTP response code
*/
code: number;
/**
* HTTP response code text
*/
codeText: string;
/**
* Processed result from applying the prompt to the content
*/
result: string;
/**
* Time taken to fetch and process the content
*/
durationMs: number;
/**
* The URL that was fetched
*/
url: string;
}
export interface WebSearchOutput {
/**
* The search query that was executed
*/
query: string;
/**
* Search results and/or text commentary from the model
*/
results: (
| {
/**
* ID of the tool use
*/
tool_use_id: string;
/**
* Array of search hits
*/
content: {
/**
* The title of the search result
*/
title: string;
/**
* The URL of the search result
*/
url: string;
}[];
}
| string
)[];
/**
* Time taken to complete the search operation
*/
durationSeconds: number;
}
export interface AskUserQuestionOutput {
/**
* The questions that were asked
*/
questions: {
/**
* The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: "Which library should we use for date formatting?" If multiSelect is true, phrase it accordingly, e.g. "Which features do you want to enable?"
*/
question: string;
/**
* Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".
*/
header: string;
/**
* The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.
*
* @minItems 2
* @maxItems 4
*/
options:
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
]
| [
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
},
{
/**
* The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.
*/
label: string;
/**
* Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.
*/
description: string;
/**
* Optional preview content rendered when this option is focused. Use for mockups, code snippets, or visual comparisons that help users compare options. See the tool description for the expected content format.
*/
preview?: string;
}
];
/**
* Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.
*/
multiSelect: boolean;
}[];
/**
* The answers provided by the user (question text -> answer string; multi-select answers are comma-separated)
*/
answers: {
[k: string]: string;
};
/**
* Optional per-question annotations from the user (e.g., notes on preview selections). Keyed by question text.
*/
annotations?: {
[k: string]: {
/**
* The preview content of the selected option, if the question used previews.
*/
preview?: string;
/**
* Free-text notes the user added to their selection.
*/
notes?: string;
};
};
}
export interface ConfigOutput {
success: boolean;
operation?: "get" | "set";
setting?: string;
value?: unknown;
previousValue?: unknown;
newValue?: unknown;
error?: string;
}
export interface EnterWorktreeOutput {
worktreePath: string;
worktreeBranch?: string;
message: string;
}
export interface ExitWorktreeOutput {
action: "keep" | "remove";
originalCwd: string;
worktreePath: string;
worktreeBranch?: string;
tmuxSessionName?: string;
discardedFiles?: number;
discardedCommits?: number;
message: string;
}
================================================
FILE: package/vendor/ripgrep/COPYING
================================================
This project is dual-licensed under the Unlicense and MIT licenses.
You may use this code under the terms of either license.
================================================
FILE: restored-src/src/QueryEngine.ts
================================================
import { feature } from 'bun:bundle'
import type { ContentBlockParam } from '@anthropic-ai/sdk/resources/messages.mjs'
import { randomUUID } from 'crypto'
import last from 'lodash-es/last.js'
import {
getSessionId,
isSessionPersistenceDisabled,
} from 'src/bootstrap/state.js'
import type {
PermissionMode,
SDKCompactBoundaryMessage,
SDKMessage,
SDKPermissionDenial,
SDKStatus,
SDKUserMessageReplay,
} from 'src/entrypoints/agentSdkTypes.js'
import { accumulateUsage, updateUsage } from 'src/services/api/claude.js'
import type { NonNullableUsage } from 'src/services/api/logging.js'
import { EMPTY_USAGE } from 'src/services/api/logging.js'
import stripAnsi from 'strip-ansi'
import type { Command } from './commands.js'
import { getSlashCommandToolSkills } from './commands.js'
import {
LOCAL_COMMAND_STDERR_TAG,
LOCAL_COMMAND_STDOUT_TAG,
} from './constants/xml.js'
import {
getModelUsage,
getTotalAPIDuration,
getTotalCost,
} from './cost-tracker.js'
import type { CanUseToolFn } from './hooks/useCanUseTool.js'
import { loadMemoryPrompt } from './memdir/memdir.js'
import { hasAutoMemPathOverride } from './memdir/paths.js'
import { query } from './query.js'
import { categorizeRetryableAPIError } from './services/api/errors.js'
import type { MCPServerConnection } from './services/mcp/types.js'
import type { AppState } from './state/AppState.js'
import { type Tools, type ToolUseContext, toolMatchesName } from './Tool.js'
import type { AgentDefinition } from './tools/AgentTool/loadAgentsDir.js'
import { SYNTHETIC_OUTPUT_TOOL_NAME } from './tools/SyntheticOutputTool/SyntheticOutputTool.js'
import type { Message } from './types/message.js'
import type { OrphanedPermission } from './types/textInputTypes.js'
import { createAbortController } from './utils/abortController.js'
import type { AttributionState } from './utils/commitAttribution.js'
import { getGlobalConfig } from './utils/config.js'
import { getCwd } from './utils/cwd.js'
import { isBareMode, isEnvTruthy } from './utils/envUtils.js'
import { getFastModeState } from './utils/fastMode.js'
import {
type FileHistoryState,
fileHistoryEnabled,
fileHistoryMakeSnapshot,
} from './utils/fileHistory.js'
import {
cloneFileStateCache,
type FileStateCache,
} from './utils/fileStateCache.js'
import { headlessProfilerCheckpoint } from './utils/headlessProfiler.js'
import { registerStructuredOutputEnforcement } from './utils/hooks/hookHelpers.js'
import { getInMemoryErrors } from './utils/log.js'
import { countToolCalls, SYNTHETIC_MESSAGES } from './utils/messages.js'
import {
getMainLoopModel,
parseUserSpecifiedModel,
} from './utils/model/model.js'
import { loadAllPluginsCacheOnly } from './utils/plugins/pluginLoader.js'
import {
type ProcessUserInputContext,
processUserInput,
} from './utils/processUserInput/processUserInput.js'
import { fetchSystemPromptParts } from './utils/queryContext.js'
import { setCwd } from './utils/Shell.js'
import {
flushSessionStorage,
recordTranscript,
} from './utils/sessionStorage.js'
import { asSystemPrompt } from './utils/systemPromptType.js'
import { resolveThemeSetting } from './utils/systemTheme.js'
import {
shouldEnableThinkingByDefault,
type ThinkingConfig,
} from './utils/thinking.js'
// Lazy: MessageSelector.tsx pulls React/ink; only needed for message filtering at query time
/* eslint-disable @typescript-eslint/no-require-imports */
const messageSelector =
(): typeof import('src/components/MessageSelector.js') =>
require('src/components/MessageSelector.js')
import {
localCommandOutputToSDKAssistantMessage,
toSDKCompactMetadata,
} from './utils/messages/mappers.js'
import {
buildSystemInitMessage,
sdkCompatToolName,
} from './utils/messages/systemInit.js'
import {
getScratchpadDir,
isScratchpadEnabled,
} from './utils/permissions/filesystem.js'
/* eslint-enable @typescript-eslint/no-require-imports */
import {
handleOrphanedPermission,
isResultSuccessful,
normalizeMessage,
} from './utils/queryHelpers.js'
// Dead code elimination: conditional import for coordinator mode
/* eslint-disable @typescript-eslint/no-require-imports */
const getCoordinatorUserContext: (
mcpClients: ReadonlyArray<{ name: string }>,
scratchpadDir?: string,
) => { [k: string]: string } = feature('COORDINATOR_MODE')
? require('./coordinator/coordinatorMode.js').getCoordinatorUserContext
: () => ({})
/* eslint-enable @typescript-eslint/no-require-imports */
// Dead code elimination: conditional import for snip compaction
/* eslint-disable @typescript-eslint/no-require-imports */
const snipModule = feature('HISTORY_SNIP')
? (require('./services/compact/snipCompact.js') as typeof import('./services/compact/snipCompact.js'))
: null
const snipProjection = feature('HISTORY_SNIP')
? (require('./services/compact/snipProjection.js') as typeof import('./services/compact/snipProjection.js'))
: null
/* eslint-enable @typescript-eslint/no-require-imports */
export type QueryEngineConfig = {
cwd: string
tools: Tools
commands: Command[]
mcpClients: MCPServerConnection[]
agents: AgentDefinition[]
canUseTool: CanUseToolFn
getAppState: () => AppState
setAppState: (f: (prev: AppState) => AppState) => void
initialMessages?: Message[]
readFileCache: FileStateCache
customSystemPrompt?: string
appendSystemPrompt?: string
userSpecifiedModel?: string
fallbackModel?: string
thinkingConfig?: ThinkingConfig
maxTurns?: number
maxBudgetUsd?: number
taskBudget?: { total: number }
jsonSchema?: Record<string, unknown>
verbose?: boolean
replayUserMessages?: boolean
/** Handler for URL elicitations triggered by MCP tool -32042 errors. */
handleElicitation?: ToolUseContext['handleElicitation']
includePartialMessages?: boolean
setSDKStatus?: (status: SDKStatus) => void
abortController?: AbortController
orphanedPermission?: OrphanedPermission
/**
* Snip-boundary handler: receives each yielded system message plus the
* current mutableMessages store. Returns undefined if the message is not a
* snip boundary; otherwise returns the replayed snip result. Injected by
* ask() when HISTORY_SNIP is enabled so feature-gated strings stay inside
* the gated module (keeps QueryEngine free of excluded strings and testable
* despite feature() returning false under bun test). SDK-only: the REPL
* keeps full history for UI scrollback and projects on demand via
* projectSnippedView; QueryEngine truncates here to bound memory in long
* headless sessions (no UI to preserve).
*/
snipReplay?: (
yieldedSystemMsg: Message,
store: Message[],
) => { messages: Message[]; executed: boolean } | undefined
}
/**
* QueryEngine owns the query lifecycle and session state for a conversation.
* It extracts the core logic from ask() into a standalone class that can be
* used by both the headless/SDK path and (in a future phase) the REPL.
*
* One QueryEngine per conversation. Each submitMessage() call starts a new
* turn within the same conversation. State (messages, file cache, usage, etc.)
* persists across turns.
*/
export class QueryEngine {
private config: QueryEngineConfig
private mutableMessages: Message[]
private abortController: AbortController
private permissionDenials: SDKPermissionDenial[]
private totalUsage: NonNullableUsage
private hasHandledOrphanedPermission = false
private readFileState: FileStateCache
// Turn-scoped skill discovery tracking (feeds was_discovered on
// tengu_skill_tool_invocation). Must persist across the two
// processUserInputContext rebuilds inside submitMessage, but is cleared
// at the start of each submitMessage to avoid unbounded growth across
// many turns in SDK mode.
private discoveredSkillNames = new Set<string>()
private loadedNestedMemoryPaths = new Set<string>()
constructor(config: QueryEngineConfig) {
this.config = config
this.mutableMessages = config.initialMessages ?? []
this.abortController = config.abortController ?? createAbortController()
this.permissionDenials = []
this.readFileState = config.readFileCache
this.totalUsage = EMPTY_USAGE
}
async *submitMessage(
prompt: string | ContentBlockParam[],
options?: { uuid?: string; isMeta?: boolean },
): AsyncGenerator<SDKMessage, void, unknown> {
const {
cwd,
commands,
tools,
mcpClients,
verbose = false,
thinkingConfig,
maxTurns,
maxBudgetUsd,
taskBudget,
canUseTool,
customSystemPrompt,
appendSystemPrompt,
userSpecifiedModel,
fallbackModel,
jsonSchema,
getAppState,
setAppState,
replayUserMessages = false,
includePartialMessages = false,
agents = [],
setSDKStatus,
orphanedPermission,
} = this.config
this.discoveredSkillNames.clear()
setCwd(cwd)
const persistSession = !isSessionPersistenceDisabled()
const startTime = Date.now()
// Wrap canUseTool to track permission denials
const wrappedCanUseTool: CanUseToolFn = async (
tool,
input,
toolUseContext,
assistantMessage,
toolUseID,
forceDecision,
) => {
const result = await canUseTool(
tool,
input,
toolUseContext,
assistantMessage,
toolUseID,
forceDecision,
)
// Track denials for SDK reporting
if (result.behavior !== 'allow') {
this.permissionDenials.push({
tool_name: sdkCompatToolName(tool.name),
tool_use_id: toolUseID,
tool_input: input,
})
}
return result
}
const initialAppState = getAppState()
const initialMainLoopModel = userSpecifiedModel
? parseUserSpecifiedModel(userSpecifiedModel)
: getMainLoopModel()
const initialThinkingConfig: ThinkingConfig = thinkingConfig
? thinkingConfig
: shouldEnableThinkingByDefault() !== false
? { type: 'adaptive' }
: { type: 'disabled' }
headlessProfilerCheckpoint('before_getSystemPrompt')
// Narrow once so TS tracks the type through the conditionals below.
const customPrompt =
typeof customSystemPrompt === 'string' ? customSystemPrompt : undefined
const {
defaultSystemPrompt,
userContext: baseUserContext,
systemContext,
} = await fetchSystemPromptParts({
tools,
mainLoopModel: initialMainLoopModel,
additionalWorkingDirectories: Array.from(
initialAppState.toolPermissionContext.additionalWorkingDirectories.keys(),
),
mcpClients,
customSystemPrompt: customPrompt,
})
headlessProfilerCheckpoint('after_getSystemPrompt')
const userContext = {
...baseUserContext,
...getCoordinatorUserContext(
mcpClients,
isScratchpadEnabled() ? getScratchpadDir() : undefined,
),
}
// When an SDK caller provides a custom system prompt AND has set
// CLAUDE_COWORK_MEMORY_PATH_OVERRIDE, inject the memory-mechanics prompt.
// The env var is an explicit opt-in signal — the caller has wired up
// a memory directory and needs Claude to know how to use it (which
// Write/Edit tools to call, MEMORY.md filename, loading semantics).
// The caller can layer their own policy text via appendSystemPrompt.
const memoryMechanicsPrompt =
customPrompt !== undefined && hasAutoMemPathOverride()
? await loadMemoryPrompt()
: null
const systemPrompt = asSystemPrompt([
...(customPrompt !== undefined ? [customPrompt] : defaultSystemPrompt),
...(memoryMechanicsPrompt ? [memoryMechanicsPrompt] : []),
...(appendSystemPrompt ? [appendSystemPrompt] : []),
])
// Register function hook for structured output enforcement
const hasStructuredOutputTool = tools.some(t =>
toolMatchesName(t, SYNTHETIC_OUTPUT_TOOL_NAME),
)
if (jsonSchema && hasStructuredOutputTool) {
registerStructuredOutputEnforcement(setAppState, getSessionId())
}
let processUserInputContext: ProcessUserInputContext = {
messages: this.mutableMessages,
// Slash commands that mutate the message array (e.g. /force-snip)
// call setMessages(fn). In interactive mode this writes back to
// AppState; in print mode we write back to mutableMessages so the
// rest of the query loop (push at :389, snapshot at :392) sees
// the result. The second processUserInputContext below (after
// slash-command processing) keeps the no-op — nothing else calls
// setMessages past that point.
setMessages: fn => {
this.mutableMessages = fn(this.mutableMessages)
},
onChangeAPIKey: () => {},
handleElicitation: this.config.handleElicitation,
options: {
commands,
debug: false, // we use stdout, so don't want to clobber it
tools,
verbose,
mainLoopModel: initialMainLoopModel,
thinkingConfig: initialThinkingConfig,
mcpClients,
mcpResources: {},
ideInstallationStatus: null,
isNonInteractiveSession: true,
customSystemPrompt,
appendSystemPrompt,
agentDefinitions: { activeAgents: agents, allAgents: [] },
theme: resolveThemeSetting(getGlobalConfig().theme),
maxBudgetUsd,
},
getAppState,
setAppState,
abortController: this.abortController,
readFileState: this.readFileState,
nestedMemoryAttachmentTriggers: new Set<string>(),
loadedNestedMemoryPaths: this.loadedNestedMemoryPaths,
dynamicSkillDirTriggers: new Set<string>(),
discoveredSkillNames: this.discoveredSkillNames,
setInProgressToolUseIDs: () => {},
setResponseLength: () => {},
updateFileHistoryState: (
updater: (prev: FileHistoryState) => FileHistoryState,
) => {
setAppState(prev => {
const updated = updater(prev.fileHistory)
if (updated === prev.fileHistory) return prev
return { ...prev, fileHistory: updated }
})
},
updateAttributionState: (
updater: (prev: AttributionState) => AttributionState,
) => {
setAppState(prev => {
const updated = updater(prev.attribution)
if (updated === prev.attribution) return prev
return { ...prev, attribution: updated }
})
},
setSDKStatus,
}
// Handle orphaned permission (only once per engine lifetime)
if (orphanedPermission && !this.hasHandledOrphanedPermission) {
this.hasHandledOrphanedPermission = true
for await (const message of handleOrphanedPermission(
orphanedPermission,
tools,
this.mutableMessages,
processUserInputContext,
)) {
yield message
}
}
const {
messages: messagesFromUserInput,
shouldQuery,
allowedTools,
model: modelFromUserInput,
resultText,
} = await processUserInput({
input: prompt,
mode: 'prompt',
setToolJSX: () => {},
context: {
...processUserInputContext,
messages: this.mutableMessages,
},
messages: this.mutableMessages,
uuid: options?.uuid,
isMeta: options?.isMeta,
querySource: 'sdk',
})
// Push new messages, including user input and any attachments
this.mutableMessages.push(...messagesFromUserInput)
// Update params to reflect updates from processing /slash commands
const messages = [...this.mutableMessages]
// Persist the user's message(s) to transcript BEFORE entering the query
// loop. The for-await below only calls recordTranscript when ask() yields
// an assistant/user/compact_boundary message — which doesn't happen until
// the API responds. If the process is killed before that (e.g. user clicks
// Stop in cowork seconds after send), the transcript is left with only
// queue-operation entries; getLastSessionLog filters those out, returns
// null, and --resume fails with "No conversation found". Writing now makes
// the transcript resumable from the point the user message was accepted,
// even if no API response ever arrives.
//
// --bare / SIMPLE: fire-and-forget. Scripted calls don't --resume after
// kill-mid-request. The await is ~4ms on SSD, ~30ms under disk contention
// — the single largest controllable critical-path cost after module eval.
// Transcript is still written (for post-hoc debugging); just not blocking.
if (persistSession && messagesFromUserInput.length > 0) {
const transcriptPromise = recordTranscript(messages)
if (isBareMode()) {
void transcriptPromise
} else {
await transcriptPromise
if (
isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) ||
isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)
) {
await flushSessionStorage()
}
}
}
// Filter messages that should be acknowledged after transcript
const replayableMessages = messagesFromUserInput.filter(
msg =>
(msg.type === 'user' &&
!msg.isMeta && // Skip synthetic caveat messages
!msg.toolUseResult && // Skip tool results (they'll be acked from query)
messageSelector().selectableUserMessagesFilter(msg)) || // Skip non-user-authored messages (task notifications, etc.)
(msg.type === 'system' && msg.subtype === 'compact_boundary'), // Always ack compact boundaries
)
const messagesToAck = replayUserMessages ? replayableMessages : []
// Update the ToolPermissionContext based on user input processing (as necessary)
setAppState(prev => ({
...prev,
toolPermissionContext: {
...prev.toolPermissionContext,
alwaysAllowRules: {
...prev.toolPermissionContext.alwaysAllowRules,
command: allowedTools,
},
},
}))
const mainLoopModel = modelFromUserInput ?? initialMainLoopModel
// Recreate after processing the prompt to pick up updated messages and
// model (from slash commands).
processUserInputContext = {
messages,
setMessages: () => {},
onChangeAPIKey: () => {},
handleElicitation: this.config.handleElicitation,
options: {
commands,
debug: false,
tools,
verbose,
mainLoopModel,
thinkingConfig: initialThinkingConfig,
mcpClients,
mcpResources: {},
ideInstallationStatus: null,
isNonInteractiveSession: true,
customSystemPrompt,
appendSystemPrompt,
theme: resolveThemeSetting(getGlobalConfig().theme),
agentDefinitions: { activeAgents: agents, allAgents: [] },
maxBudgetUsd,
},
getAppState,
setAppState,
abortController: this.abortController,
readFileState: this.readFileState,
nestedMemoryAttachmentTriggers: new Set<string>(),
loadedNestedMemoryPaths: this.loadedNestedMemoryPaths,
dynamicSkillDirTriggers: new Set<string>(),
discoveredSkillNames: this.discoveredSkillNames,
setInProgressToolUseIDs: () => {},
setResponseLength: () => {},
updateFileHistoryState: processUserInputContext.updateFileHistoryState,
updateAttributionState: processUserInputContext.updateAttributionState,
setSDKStatus,
}
headlessProfilerCheckpoint('before_skills_plugins')
// Cache-only: headless/SDK/CCR startup must not block on network for
// ref-tracked plugins. CCR populates the cache via CLAUDE_CODE_SYNC_PLUGIN_INSTALL
// (headlessPluginInstall) or CLAUDE_CODE_PLUGIN_SEED_DIR before this runs;
// SDK callers that need fresh source can call /reload-plugins.
const [skills, { enabled: enabledPlugins }] = await Promise.all([
getSlashCommandToolSkills(getCwd()),
loadAllPluginsCacheOnly(),
])
headlessProfilerCheckpoint('after_skills_plugins')
yield buildSystemInitMessage({
tools,
mcpClients,
model: mainLoopModel,
permissionMode: initialAppState.toolPermissionContext
.mode as PermissionMode, // TODO: avoid the cast
commands,
agents,
skills,
plugins: enabledPlugins,
fastMode: initialAppState.fastMode,
})
// Record when system message is yielded for headless latency tracking
headlessProfilerCheckpoint('system_message_yielded')
if (!shouldQuery) {
// Return the results of local slash commands.
// Use messagesFromUserInput (not replayableMessages) for command output
// because selectableUserMessagesFilter excludes local-command-stdout tags.
for (const msg of messagesFromUserInput) {
if (
msg.type === 'user' &&
typeof msg.message.content === 'string' &&
(msg.message.content.includes(`<${LOCAL_COMMAND_STDOUT_TAG}>`) ||
msg.message.content.includes(`<${LOCAL_COMMAND_STDERR_TAG}>`) ||
msg.isCompactSummary)
) {
yield {
type: 'user',
message: {
...msg.message,
content: stripAnsi(msg.message.content),
},
session_id: getSessionId(),
parent_tool_use_id: null,
uuid: msg.uuid,
timestamp: msg.timestamp,
isReplay: !msg.isCompactSummary,
isSynthetic: msg.isMeta || msg.isVisibleInTranscriptOnly,
} as SDKUserMessageReplay
}
// Local command output — yield as a synthetic assistant message so
// RC renders it as assistant-style text rather than a user bubble.
// Emitted as assistant (not the dedicated SDKLocalCommandOutputMessage
// system subtype) so mobile clients + session-ingress can parse it.
if (
msg.type === 'system' &&
msg.subtype === 'local_command' &&
typeof msg.content === 'string' &&
(msg.content.includes(`<${LOCAL_COMMAND_STDOUT_TAG}>`) ||
msg.content.includes(`<${LOCAL_COMMAND_STDERR_TAG}>`))
) {
yield localCommandOutputToSDKAssistantMessage(msg.content, msg.uuid)
}
if (msg.type === 'system' && msg.subtype === 'compact_boundary') {
yield {
type: 'system',
subtype: 'compact_boundary' as const,
session_id: getSessionId(),
uuid: msg.uuid,
compact_metadata: toSDKCompactMetadata(msg.compactMetadata),
} as SDKCompactBoundaryMessage
}
}
if (persistSession) {
await recordTranscript(messages)
if (
isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) ||
isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)
) {
await flushSessionStorage()
}
}
yield {
type: 'result',
subtype: 'success',
is_error: false,
duration_ms: Date.now() - startTime,
duration_api_ms: getTotalAPIDuration(),
num_turns: messages.length - 1,
result: resultText ?? '',
stop_reason: null,
session_id: getSessionId(),
total_cost_usd: getTotalCost(),
usage: this.totalUsage,
modelUsage: getModelUsage(),
permission_denials: this.permissionDenials,
fast_mode_state: getFastModeState(
mainLoopModel,
initialAppState.fastMode,
),
uuid: randomUUID(),
}
return
}
if (fileHistoryEnabled() && persistSession) {
messagesFromUserInput
.filter(messageSelector().selectableUserMessagesFilter)
.forEach(message => {
void fileHistoryMakeSnapshot(
(updater: (prev: FileHistoryState) => FileHistoryState) => {
setAppState(prev => ({
...prev,
fileHistory: updater(prev.fileHistory),
}))
},
message.uuid,
)
})
}
// Track current message usage (reset on each message_start)
let currentMessageUsage: NonNullableUsage = EMPTY_USAGE
let turnCount = 1
let hasAcknowledgedInitialMessages = false
// Track structured output from StructuredOutput tool calls
let structuredOutputFromTool: unknown
// Track the last stop_reason from assistant messages
let lastStopReason: string | null = null
// Reference-based watermark so error_during_execution's errors[] is
// turn-scoped. A length-based index breaks when the 100-entry ring buffer
// shift()s during the turn — the index slides. If this entry is rotated
// out, lastIndexOf returns -1 and we include everything (safe fallback).
const errorLogWatermark = getInMemoryErrors().at(-1)
// Snapshot count before this query for delta-based retry limiting
const initialStructuredOutputCalls = jsonSchema
? countToolCalls(this.mutableMessages, SYNTHETIC_OUTPUT_TOOL_NAME)
: 0
for await (const message of query({
messages,
systemPrompt,
userContext,
systemContext,
canUseTool: wrappedCanUseTool,
toolUseContext: processUserInputContext,
fallbackModel,
querySource: 'sdk',
maxTurns,
taskBudget,
})) {
// Record assistant, user, and compact boundary messages
if (
message.type === 'assistant' ||
message.type === 'user' ||
(message.type === 'system' && message.subtype === 'compact_boundary')
) {
// Before writing a compact boundary, flush any in-memory-only
// messages up through the preservedSegment tail. Attachments and
// progress are now recorded inline (their switch cases below), but
// this flush still matters for the preservedSegment tail walk.
// If the SDK subprocess restarts before then (claude-desktop kills
// between turns), tailUuid points to a never-written message →
// applyPreservedSegmentRelinks fails its tail→head walk → returns
// without pruning → resume loads full pre-compact history.
if (
persistSession &&
message.type === 'system' &&
message.subtype === 'compact_boundary'
) {
const tailUuid = message.compactMetadata?.preservedSegment?.tailUuid
if (tailUuid) {
const tailIdx = this.mutableMessages.findLastIndex(
m => m.uuid === tailUuid,
)
if (tailIdx !== -1) {
await recordTranscript(this.mutableMessages.slice(0, tailIdx + 1))
}
}
}
messages.push(message)
if (persistSession) {
// Fire-and-forget for assistant messages. claude.ts yields one
// assistant message per content block, then mutates the last
// one's message.usage/stop_reason on message_delta — relying on
// the write queue's 100ms lazy jsonStringify. Awaiting here
// blocks ask()'s generator, so message_delta can't run until
// every block is consumed; the drain timer (started at block 1)
// elapses first. Interactive CC doesn't hit this because
// useLogMessages.ts fire-and-forgets. enqueueWrite is
// order-preserving so fire-and-forget here is safe.
if (message.type === 'assistant') {
void recordTranscript(messages)
} else {
await recordTranscript(messages)
}
}
// Acknowledge initial user messages after first transcript recording
if (!hasAcknowledgedInitialMessages && messagesToAck.length > 0) {
hasAcknowledgedInitialMessages = true
for (const msgToAck of messagesToAck) {
if (msgToAck.type === 'user') {
yield {
type: 'user',
message: msgToAck.message,
session_id: getSessionId(),
parent_tool_use_id: null,
uuid: msgToAck.uuid,
timestamp: msgToAck.timestamp,
isReplay: true,
} as SDKUserMessageReplay
}
}
}
}
if (message.type === 'user') {
turnCount++
}
switch (message.type) {
case 'tombstone':
// Tombstone messages are control signals for removing messages, skip them
break
case 'assistant':
// Capture stop_reason if already set (synthetic messages). For
// streamed responses, this is null at content_block_stop time;
// the real value arrives via message_delta (handled below).
if (message.message.stop_reason != null) {
lastStopReason = message.message.stop_reason
}
this.mutableMessages.push(message)
yield* normalizeMessage(message)
break
case 'progress':
this.mutableMessages.push(message)
// Record inline so the dedup loop in the next ask() call sees it
// as already-recorded. Without this, deferred progress interleaves
// with already-recorded tool_results in mutableMessages, and the
// dedup walk freezes startingParentUuid at the wrong message —
// forking the chain and orphaning the conversation on resume.
if (persistSession) {
messages.push(message)
void recordTranscript(messages)
}
yield* normalizeMessage(message)
break
case 'user':
this.mutableMessages.push(message)
yield* normalizeMessage(message)
break
case 'stream_event':
if (message.event.type === 'message_start') {
// Reset current message usage for new message
currentMessageUsage = EMPTY_USAGE
currentMessageUsage = updateUsage(
currentMessageUsage,
message.event.message.usage,
)
}
if (message.event.type === 'message_delta') {
currentMessageUsage = updateUsage(
currentMessageUsage,
message.event.usage,
)
// Capture stop_reason from message_delta. The assistant message
// is yielded at content_block_stop with stop_reason=null; the
// real value only arrives here (see claude.ts message_delta
// handler). Without this, result.stop_reason is always null.
if (message.event.delta.stop_reason != null) {
lastStopReason = message.event.delta.stop_reason
}
}
if (message.event.type === 'message_stop') {
// Accumulate current message usage into total
this.totalUsage = accumulateUsage(
this.totalUsage,
currentMessageUsage,
)
}
if (includePartialMessages) {
yield {
type: 'stream_event' as const,
event: message.event,
session_id: getSessionId(),
parent_tool_use_id: null,
uuid: randomUUID(),
}
}
break
case 'attachment':
this.mutableMessages.push(message)
// Record inline (same reason as progress above).
if (persistSession) {
messages.push(message)
void recordTranscript(messages)
}
// Extract structured output from StructuredOutput tool calls
if (message.attachment.type === 'structured_output') {
structuredOutputFromTool = message.attachment.data
}
// Handle max turns reached signal from query.ts
else if (message.attachment.type === 'max_turns_reached') {
if (persistSession) {
if (
isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) ||
isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)
) {
await flushSessionStorage()
}
}
yield {
type: 'result',
subtype: 'error_max_turns',
duration_ms: Date.now() - startTime,
duration_api_ms: getTotalAPIDuration(),
is_error: true,
num_turns: message.attachment.turnCount,
stop_reason: lastStopReason,
session_id: getSessionId(),
total_cost_usd: getTotalCost(),
usage: this.totalUsage,
modelUsage: getModelUsage(),
permission_denials: this.permissionDenials,
fast_mode_state: getFastModeState(
mainLoopModel,
initialAppState.fastMode,
),
uuid: randomUUID(),
errors: [
`Reached maximum number of turns (${message.attachment.maxTurns})`,
],
}
return
}
// Yield queued_command attachments as SDK user message replays
else if (
replayUserMessages &&
message.attachment.type === 'queued_command'
) {
yield {
type: 'user',
message: {
role: 'user' as const,
content: message.attachment.prompt,
},
session_id: getSessionId(),
parent_tool_use_id: null,
uuid: message.attachment.source_uuid || message.uuid,
timestamp: message.timestamp,
isReplay: true,
} as SDKUserMessageReplay
}
break
case 'stream_request_start':
// Don't yield stream request start messages
break
case 'system': {
// Snip boundary: replay on our store to remove zombie messages and
// stale markers. The yielded boundary is a signal, not data to push —
// the replay produces its own equivalent boundary. Without this,
// markers persist and re-trigger on every turn, and mutableMessages
// never shrinks (memory leak in long SDK sessions). The subtype
// check lives inside the injected callback so feature-gated strings
// stay out of this file (excluded-strings check).
const snipResult = this.config.snipReplay?.(
message,
this.mutableMessages,
)
if (snipResult !== undefined) {
if (snipResult.executed) {
this.mutableMessages.length = 0
this.mutableMessages.push(...snipResult.messages)
}
break
}
this.mutableMessages.push(message)
// Yield compact boundary messages to SDK
if (
message.subtype === 'compact_boundary' &&
message.compactMetadata
) {
// Release pre-compaction messages for GC. The boundary was just
// pushed so it's the last element. query.ts already uses
// getMessagesAfterCompactBoundary() internally, so only
// post-boundary messages are needed going forward.
const mutableBoundaryIdx = this.mutableMessages.length - 1
if (mutableBoundaryIdx > 0) {
this.mutableMessages.splice(0, mutableBoundaryIdx)
}
const localBoundaryIdx = messages.length - 1
if (localBoundaryIdx > 0) {
messages.splice(0, localBoundaryIdx)
}
yield {
type: 'system',
subtype: 'compact_boundary' as const,
session_id: getSessionId(),
uuid: message.uuid,
compact_metadata: toSDKCompactMetadata(message.compactMetadata),
}
}
if (message.subtype === 'api_error') {
yield {
type: 'system',
subtype: 'api_retry' as const,
attempt: message.retryAttempt,
max_retries: message.maxRetries,
retry_delay_ms: message.retryInMs,
error_status: message.error.status ?? null,
error: categorizeRetryableAPIError(message.error),
session_id: getSessionId(),
uuid: message.uuid,
}
}
// Don't yield other system messages in headless mode
break
}
case 'tool_use_summary':
// Yield tool use summary messages to SDK
yield {
type: 'tool_use_summary' as const,
summary: message.summary,
preceding_tool_use_ids: message.precedingToolUseIds,
session_id: getSessionId(),
uuid: message.uuid,
}
break
}
// Check if USD budget has been exceeded
if (maxBudgetUsd !== undefined && getTotalCost() >= maxBudgetUsd) {
if (persistSession) {
if (
isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) ||
isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)
) {
await flushSessionStorage()
}
}
yield {
type: 'result',
subtype: 'error_max_budget_usd',
duration_ms: Date.now() - startTime,
duration_api_ms: getTotalAPIDuration(),
is_error: true,
num_turns: turnCount,
stop_reason: lastStopReason,
session_id: getSessionId(),
total_cost_usd: getTotalCost(),
usage: this.totalUsage,
modelUsage: getModelUsage(),
permission_denials: this.permissionDenials,
fast_mode_state: getFastModeState(
mainLoopModel,
initialAppState.fastMode,
),
uuid: randomUUID(),
errors: [`Reached maximum budget ($${maxBudgetUsd})`],
}
return
}
// Check if structured output retry limit exceeded (only on user messages)
if (message.type === 'user' && jsonSchema) {
const currentCalls = countToolCalls(
this.mutableMessages,
SYNTHETIC_OUTPUT_TOOL_NAME,
)
const callsThisQuery = currentCalls - initialStructuredOutputCalls
const maxRetries = parseInt(
process.env.MAX_STRUCTURED_OUTPUT_RETRIES || '5',
10,
)
if (callsThisQuery >= maxRetries) {
if (persistSession) {
if (
isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) ||
isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)
) {
await flushSessionStorage()
}
}
yield {
type: 'result',
subtype: 'error_max_structured_output_retries',
duration_ms: Date.now() - startTime,
duration_api_ms: getTotalAPIDuration(),
is_error: true,
num_turns: turnCount,
stop_reason: lastStopReason,
session_id: getSessionId(),
total_cost_usd: getTotalCost(),
usage: this.totalUsage,
modelUsage: getModelUsage(),
permission_denials: this.permissionDenials,
fast_mode_state: getFastModeState(
mainLoopModel,
initialAppState.fastMode,
),
uuid: randomUUID(),
errors: [
`Failed to provide valid structured output after ${maxRetries} attempts`,
],
}
return
}
}
}
// Stop hooks yield progress/attachment messages AFTER the assistant
// response (via yield* handleStopHooks in query.ts). Since #23537 pushes
// those to `messages` inline, last(messages) can be a progress/attachment
// instead of the assistant — which makes textResult extraction below
// return '' and -p mode emit a blank line. Allowlist to assistant|user:
// isResultSuccessful handles both (user with all tool_result blocks is a
// valid successful terminal state).
const result = messages.findLast(
m => m.type === 'assistant' || m.type === 'user',
)
// Capture for the error_during_execution diagnostic — isResultSuccessful
// is a type predicate (message is Message), so inside the false branch
// `result` narrows to never and these accesses don't typecheck.
const edeResultType = result?.type ?? 'undefined'
const edeLastContentType =
result?.type === 'assistant'
? (last(result.message.content)?.type ?? 'none')
: 'n/a'
// Flush buffered transcript writes before yielding result.
// The desktop app kills the CLI process immediately after receiving the
// result message, so any unflushed writes would be lost.
if (persistSession) {
if (
isEnvTruthy(process.env.CLAUDE_CODE_EAGER_FLUSH) ||
isEnvTruthy(process.env.CLAUDE_CODE_IS_COWORK)
) {
await flushSessionStorage()
}
}
if (!isResultSuccessful(result, lastStopReason)) {
yield {
type: 'result',
subtype: 'error_during_execution',
duration_ms: Date.now() - startTime,
duration_api_ms: getTotalAPIDuration(),
is_error: true,
num_turns: turnCount,
stop_reason: lastStopReason,
session_id: getSessionId(),
total_cost_usd: getTotalCost(),
usage: this.totalUsage,
modelUsage: getModelUsage(),
permission_denials: this.permissionDenials,
fast_mode_state: getFastModeState(
mainLoopModel,
initialAppState.fastMode,
),
uuid: randomUUID(),
// Diagnostic prefix: these are what isResultSuccessful() checks — if
// the result type isn't assistant-with-text/thinking or user-with-
// tool_result, and stop_reason isn't end_turn, that's why this fired.
// errors[] is turn-scoped via the watermark; previously it dumped the
// entire process's logError buffer (ripgrep timeouts, ENOENT, etc).
errors: (() => {
const all = getInMemoryErrors()
const start = errorLogWatermark
? all.lastIndexOf(errorLogWatermark) + 1
: 0
return [
`[ede_diagnostic] result_type=${edeResultType} last_content_type=${edeLastContentType} stop_reason=${lastStopReason}`,
...all.slice(start).map(_ => _.error),
]
})(),
}
return
}
// Extract the text result based on message type
let textResult = ''
let isApiError = false
if (result.type === 'assistant') {
const lastContent = last(result.message.content)
if (
lastContent?.type === 'text' &&
!SYNTHETIC_MESSAGES.has(lastContent.text)
) {
textResult = lastContent.text
}
isApiError = Boolean(result.isApiErrorMessage)
}
yield {
type: 'result',
subtype: 'success',
is_error: isApiError,
duration_ms: Date.now() - startTime,
duration_api_ms: getTotalAPIDuration(),
num_turns: turnCount,
result: textResult,
stop_reason: lastStopReason,
session_id: getSessionId(),
total_cost_usd: getTotalCost(),
usage: this.totalUsage,
modelUsage: getModelUsage(),
permission_denials: this.permissionDenials,
structured_output: structuredOutputFromTool,
fast_mode_state: getFastModeState(
mainLoopModel,
initialAppState.fastMode,
),
uuid: randomUUID(),
}
}
interrupt(): void {
this.abortController.abort()
}
getMessages(): readonly Message[] {
return this.mutableMessages
}
getReadFileState(): FileStateCache {
return this.readFileState
}
getSessionId(): string {
return getSessionId()
}
setModel(model: string): void {
this.config.userSpecifiedModel = model
}
}
/**
* Sends a single prompt to the Claude API and returns the response.
* Assumes that claude is being used non-interactively -- will not
* ask the user for permissions or further input.
*
* Convenience wrapper around QueryEngine for one-shot usage.
*/
export async function* ask({
commands,
prompt,
promptUuid,
isMeta,
cwd,
tools,
mcpClients,
verbose = false,
thinkingConfig,
maxTurns,
maxBudgetUsd,
taskBudget,
canUseTool,
mutableMessages = [],
getReadFileCache,
setReadFileCache,
customSystemPrompt,
appendSystemPrompt,
userSpecifiedModel,
fallbackModel,
jsonSchema,
getAppState,
setAppState,
abortController,
replayUserMessages = false,
includePartialMessages = false,
handleElicitation,
agents = [],
setSDKStatus,
orphanedPermission,
}: {
commands: Command[]
prompt: string | Array<ContentBlockParam>
promptUuid?: string
isMeta?: boolean
cwd: string
tools: Tools
verbose?: boolean
mcpClients: MCPServerConnection[]
thinkingConfig?: ThinkingConfig
maxTurns?: number
maxBudgetUsd?: number
taskBudget?: { total: number }
canUseTool: CanUseToolFn
mutableMessages?: Message[]
customSystemPrompt?: string
appendSystemPrompt?: string
userSpecifiedModel?: string
fallbackModel?: string
jsonSchema?: Record<string, unknown>
getAppState: () => AppState
setAppState: (f: (prev: AppState) => AppState) => void
getReadFileCache: () => FileStateCache
setReadFileCache: (cache: FileStateCache) => void
abortController?: AbortController
replayUserMessages?: boolean
includePartialMessages?: boolean
handleElicitation?: ToolUseContext['handleElicitation']
agents?: AgentDefinition[]
setSDKStatus?: (status: SDKStatus) => void
orphanedPermission?: OrphanedPermission
}): AsyncGenerator<SDKMessage, void, unknown> {
const engine = new QueryEngine({
cwd,
tools,
commands,
mcpClients,
agents,
canUseTool,
getAppState,
setAppState,
initialMessages: mutableMessages,
readFileCache: cloneFileStateCache(getReadFileCache()),
customSystemPrompt,
appendSystemPrompt,
userSpecifiedModel,
fallbackModel,
thinkingConfig,
maxTurns,
maxBudgetUsd,
taskBudget,
jsonSchema,
verbose,
handleElicitation,
replayUserMessages,
includePartialMessages,
setSDKStatus,
abortController,
orphanedPermission,
...(feature('HISTORY_SNIP')
? {
snipReplay: (yielded: Message, store: Message[]) => {
if (!snipProjection!.isSnipBoundaryMessage(yielded))
return undefined
return snipModule!.snipCompactIfNeeded(store, { force: true })
},
}
: {}),
})
try {
yield* engine.submitMessage(prompt, {
uuid: promptUuid,
isMeta,
})
} finally {
setReadFileCache(engine.getReadFileState())
}
}
================================================
FILE: restored-src/src/Task.ts
================================================
import { randomBytes } from 'crypto'
import type { AppState } from './state/AppState.js'
import type { AgentId } from './types/ids.js'
import { getTaskOutputPath } from './utils/task/diskOutput.js'
export type TaskType =
| 'local_bash'
| 'local_agent'
| 'remote_agent'
| 'in_process_teammate'
| 'local_workflow'
| 'monitor_mcp'
| 'dream'
export type TaskStatus =
| 'pending'
| 'running'
| 'completed'
| 'failed'
| 'killed'
/**
* True when a task is in a terminal state and will not transition further.
* Used to guard against injecting messages into dead teammates, evicting
* finished tasks from AppState, and orphan-cleanup paths.
*/
export function isTerminalTaskStatus(status: TaskStatus): boolean {
return status === 'completed' || status === 'failed' || status === 'killed'
}
export type TaskHandle = {
taskId: string
cleanup?: () => void
}
export type SetAppState = (f: (prev: AppState) => AppState) => void
export type TaskContext = {
abortController: AbortController
getAppState: () => AppState
setAppState: SetAppState
}
// Base fields shared by all task states
export type TaskStateBase = {
id: string
type: TaskType
status: TaskStatus
description: string
toolUseId?: string
startTime: number
endTime?: number
totalPausedMs?: number
outputFile: string
outputOffset: number
notified: boolean
}
export type LocalShellSpawnInput = {
command: string
description: string
timeout?: number
toolUseId?: string
agentId?: AgentId
/** UI display variant: description-as-label, dialog title, status bar pill. */
kind?: 'bash' | 'monitor'
}
// What getTaskByType dispatches for: kill. spawn/render were never
// called polymorphically (removed in #22546). All six kill implementations
// use only setAppState — getAppState/abortController were dead weight.
export type Task = {
name: string
type: TaskType
kill(taskId: string, setAppState: SetAppState): Promise<void>
}
// Task ID prefixes
const TASK_ID_PREFIXES: Record<string, string> = {
local_bash: 'b', // Keep as 'b' for backward compatibility
local_agent: 'a',
remote_agent: 'r',
in_process_teammate: 't',
local_workflow: 'w',
monitor_mcp: 'm',
dream: 'd',
}
// Get task ID prefix
function getTaskIdPrefix(type: TaskType): string {
return TASK_ID_PREFIXES[type] ?? 'x'
}
// Case-insensitive-safe alphabet (digits + lowercase) for task IDs.
// 36^8 ≈ 2.8 trillion combinations, sufficient to resist brute-force symlink attacks.
const TASK_ID_ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz'
export function generateTaskId(type: TaskType): string {
const prefix = getTaskIdPrefix(type)
const bytes = randomBytes(8)
let id = prefix
for (let i = 0; i < 8; i++) {
id += TASK_ID_ALPHABET[bytes[i]! % TASK_ID_ALPHABET.length]
}
return id
}
export function createTaskStateBase(
id: string,
type: TaskType,
description: string,
toolUseId?: string,
): TaskStateBase {
return {
id,
type,
status: 'pending',
description,
toolUseId,
startTime: Date.now(),
outputFile: getTaskOutputPath(id),
outputOffset: 0,
notified: false,
}
}
================================================
FILE: restored-src/src/Tool.ts
================================================
import type {
ToolResultBlockParam,
ToolUseBlockParam,
} from '@anthropic-ai/sdk/resources/index.mjs'
import type {
ElicitRequestURLParams,
ElicitResult,
} from '@modelcontextprotocol/sdk/types.js'
import type { UUID } from 'crypto'
import type { z } from 'zod/v4'
import type { Command } from './commands.js'
import type { CanUseToolFn } from './hooks/useCanUseTool.js'
import type { ThinkingConfig } from './utils/thinking.js'
export type ToolInputJSONSchema = {
[x: string]: unknown
type: 'object'
properties?: {
[x: string]: unknown
}
}
import type { Notification } from './context/notifications.js'
import type {
MCPServerConnection,
ServerResource,
} from './services/mcp/types.js'
import type {
AgentDefinition,
AgentDefinitionsResult,
} from './tools/AgentTool/loadAgentsDir.js'
import type {
AssistantMessage,
AttachmentMessage,
Message,
ProgressMessage,
SystemLocalCommandMessage,
SystemMessage,
UserMessage,
} from './types/message.js'
// Import permission types from centralized location to break import cycles
// Import PermissionResult from centralized location to break import cycles
import type {
AdditionalWorkingDirectory,
PermissionMode,
PermissionResult,
} from './types/permissions.js'
// Import tool progress types from centralized location to break import cycles
import type {
AgentToolProgress,
BashProgress,
MCPProgress,
REPLToolProgress,
SkillToolProgress,
TaskOutputProgress,
ToolProgressData,
WebSearchProgress,
} from './types/tools.js'
import type { FileStateCache } from './utils/fileStateCache.js'
import type { DenialTrackingState } from './utils/permissions/denialTracking.js'
import type { SystemPrompt } from './utils/systemPromptType.js'
import type { ContentReplacementState } from './utils/toolResultStorage.js'
// Re-export progress types for backwards compatibility
export type {
AgentToolProgress,
BashProgress,
MCPProgress,
REPLToolProgress,
SkillToolProgress,
TaskOutputProgress,
WebSearchProgress,
}
import type { SpinnerMode } from './components/Spinner.js'
import type { QuerySource } from './constants/querySource.js'
import type { SDKStatus } from './entrypoints/agentSdkTypes.js'
import type { AppState } from './state/AppState.js'
import type {
HookProgress,
PromptRequest,
PromptResponse,
} from './types/hooks.js'
import type { AgentId } from './types/ids.js'
import type { DeepImmutable } from './types/utils.js'
import type { AttributionState } from './utils/commitAttribution.js'
import type { FileHistoryState } from './utils/fileHistory.js'
import type { Theme, ThemeName } from './utils/theme.js'
export type QueryChainTracking = {
chainId: string
depth: number
}
export type ValidationResult =
| { result: true }
| {
result: false
message: string
errorCode: number
}
export type SetToolJSXFn = (
args: {
jsx: React.ReactNode | null
shouldHidePromptInput: boolean
shouldContinueAnimation?: true
showSpinner?: boolean
isLocalJSXCommand?: boolean
isImmediate?: boolean
/** Set to true to clear a local JSX command (e.g., from its onDone callback) */
clearLocalJSX?: boolean
} | null,
) => void
// Import tool permission types from centralized location to break import cycles
import type { ToolPermissionRulesBySource } from './types/permissions.js'
// Re-export for backwards compatibility
export type { ToolPermissionRulesBySource }
// Apply DeepImmutable to the imported type
export type ToolPermissionContext = DeepImmutable<{
mode: PermissionMode
additionalWorkingDirectories: Map<string, AdditionalWorkingDirectory>
alwaysAllowRules: ToolPermissionRulesBySource
alwaysDenyRules: ToolPermissionRulesBySource
alwaysAskRules: ToolPermissionRulesBySource
isBypassPermissionsModeAvailable: boolean
isAutoModeAvailable?: boolean
strippedDangerousRules?: ToolPermissionRulesBySource
/** When true, permission prompts are auto-denied (e.g., background agents that can't show UI) */
shouldAvoidPermissionPrompts?: boolean
/** When true, automated checks (classifier, hooks) are awaited before showing the permission dialog (coordinator workers) */
awaitAutomatedChecksBeforeDialog?: boolean
/** Stores the permission mode before model-initiated plan mode entry, so it can be restored on exit */
prePlanMode?: PermissionMode
}>
export const getEmptyToolPermissionContext: () => ToolPermissionContext =
() => ({
mode: 'default',
additionalWorkingDirectories: new Map(),
alwaysAllowRules: {},
alwaysDenyRules: {},
alwaysAskRules: {},
isBypassPermissionsModeAvailable: false,
})
export type CompactProgressEvent =
| {
type: 'hooks_start'
hookType: 'pre_compact' | 'post_compact' | 'session_start'
}
| { type: 'compact_start' }
| { type: 'compact_end' }
export type ToolUseContext = {
options: {
commands: Command[]
debug: boolean
mainLoopModel: string
tools: Tools
verbose: boolean
thinkingConfig: ThinkingConfig
mcpClients: MCPServerConnection[]
mcpResources: Record<string, ServerResource[]>
isNonInteractiveSession: boolean
agentDefinitions: AgentDefinitionsResult
maxBudgetUsd?: number
/** Custom system prompt that replaces the default system prompt */
customSystemPrompt?: string
/** Additional system prompt appended after the main system prompt */
appendSystemPrompt?: string
/** Override querySource for analytics tracking */
querySource?: QuerySource
/** Optional callback to get the latest tools (e.g., after MCP servers connect mid-query) */
refreshTools?: () => Tools
}
abortController: AbortController
readFileState: FileStateCache
getAppState(): AppState
setAppState(f: (prev: AppState) => AppState): void
/**
* Always-shared setAppState for session-scoped infrastructure (background
* tasks, session hooks). Unlike setAppState, which is no-op for async agents
* (see createSubagentContext), this always reaches the root store so agents
* at any nesting depth can register/clean up infrastructure that outlives
* a single turn. Only set by createSubagentContext; main-thread contexts
* fall back to setAppState.
*/
setAppStateForTasks?: (f: (prev: AppState) => AppState) => void
/**
* Optional handler for URL elicitations triggered by tool call errors (-32042).
* In print/SDK mode, this delegates to structuredIO.handleElicitation.
* In REPL mode, this is undefined and the queue-based UI path is used.
*/
handleElicitation?: (
serverName: string,
params: ElicitRequestURLParams,
signal: AbortSignal,
) => Promise<ElicitResult>
setToolJSX?: SetToolJSXFn
addNotification?: (notif: Notification) => void
/** Append a UI-only system message to the REPL message list. Stripped at the
* normalizeMessagesForAPI boundary — the Exclude<> makes that type-enforced. */
appendSystemMessage?: (
msg: Exclude<SystemMessage, SystemLocalCommandMessage>,
) => void
/** Send an OS-level notification (iTerm2, Kitty, Ghostty, bell, etc.) */
sendOSNotification?: (opts: {
message: string
notificationType: string
}) => void
nestedMemoryAttachmentTriggers?: Set<string>
/**
* CLAUDE.md paths already injected as nested_memory attachments this
* session. Dedup for memoryFilesToAttachments — readFileState is an LRU
* that evicts entries in busy sessions, so its .has() check alone can
* re-inject the same CLAUDE.md dozens of times.
*/
loadedNestedMemoryPaths?: Set<string>
dynamicSkillDirTriggers?: Set<string>
/** Skill names surfaced via skill_discovery this session. Telemetry only (feeds was_discovered). */
discoveredSkillNames?: Set<string>
userModified?: boolean
setInProgressToolUseIDs: (f: (prev: Set<string>) => Set<string>) => void
/** Only wired in interactive (REPL) contexts; SDK/QueryEngine don't set this. */
setHasInterruptibleToolInProgress?: (v: boolean) => void
setResponseLength: (f: (prev: number) => number) => void
/** Ant-only: push a new API metrics entry for OTPS tracking.
* Called by subagent streaming when a new API request starts. */
pushApiMetricsEntry?: (ttftMs: number) => void
setStreamMode?: (mode: SpinnerMode) => void
onCompactProgress?: (event: CompactProgressEvent) => void
setSDKStatus?: (status: SDKStatus) => void
openMessageSelector?: () => void
updateFileHistoryState: (
updater: (prev: FileHistoryState) => FileHistoryState,
) => void
updateAttributionState: (
updater: (prev: AttributionState) => AttributionState,
) => void
setConversationId?: (id: UUID) => void
agentId?: AgentId // Only set for subagents; use getSessionId() for session ID. Hooks use this to distinguish subagent calls.
agentType?: string // Subagent type name. For the main thread's --agent type, hooks fall back to getMainThreadAgentType().
/** When true, canUseTool must always be called even when hooks auto-approve.
* Used by speculation for overlay file path rewriting. */
requireCanUseTool?: boolean
messages: Message[]
fileReadingLimits?: {
maxTokens?: number
maxSizeBytes?: number
}
globLimits?: {
maxResults?: number
}
toolDecisions?: Map<
string,
{
source: string
decision: 'accept' | 'reject'
timestamp: number
}
>
queryTracking?: QueryChainTracking
/** Callback factory for requesting interactive prompts from the user.
* Returns a prompt callback bound to the given source name.
* Only available in interactive (REPL) contexts. */
requestPrompt?: (
sourceName: string,
toolInputSummary?: string | null,
) => (request: PromptRequest) => Promise<PromptResponse>
toolUseId?: string
criticalSystemReminder_EXPERIMENTAL?: string
/** When true, preserve toolUseResult on messages even for subagents.
* Used by in-process teammates whose transcripts are viewable by the user. */
preserveToolUseResults?: boolean
/** Local denial tracking state for async subagents whose setAppState is a
* no-op. Without this, the denial counter never accumulates and the
* fallback-to-prompting threshold is never reached. Mutable — the
* permissions code updates it in place. */
localDenialTracking?: DenialTrackingState
/**
* Per-conversation-thread content replacement state for the tool result
* budget. When present, query.ts applies the aggregate tool result budget.
* Main thread: REPL provisions once (never resets — stale UUID keys
* are inert). Subagents: createSubagentContext clones the parent's state
* by default (cache-sharing forks need identical decisions), or
* resumeAgentBackground threads one reconstructed from sidechain records.
*/
contentReplacementState?: ContentReplacementState
/**
* Parent's rendered system prompt bytes, frozen at turn start.
* Used by fork subagents to share the parent's prompt cache — re-calling
* getSystemPrompt() at fork-spawn time can diverge (GrowthBook cold→warm)
* and bust the cache. See forkSubagent.ts.
*/
renderedSystemPrompt?: SystemPrompt
}
// Re-export ToolProgressData from centralized location
export type { ToolProgressData }
export type Progress = ToolProgressData | HookProgress
export type ToolProgress<P extends ToolProgressData> = {
toolUseID: string
data: P
}
export function filterToolProgressMessages(
progressMessagesForMessage: ProgressMessage[],
): ProgressMessage<ToolProgressData>[] {
return progressMessagesForMessage.filter(
(msg): msg is ProgressMessage<ToolProgressData> =>
msg.data?.type !== 'hook_progress',
)
}
export type ToolResult<T> = {
data: T
newMessages?: (
| UserMessage
| AssistantMessage
| AttachmentMessage
| SystemMessage
)[]
// contextModifier is only honored for tools that aren't concurrency safe.
contextModifier?: (context: ToolUseContext) => ToolUseContext
/** MCP protocol metadata (structuredContent, _meta) to pass through to SDK consumers */
mcpMeta?: {
_meta?: Record<string, unknown>
structuredContent?: Record<string, unknown>
}
}
export type ToolCallProgress<P extends ToolProgressData = ToolProgressData> = (
progress: ToolProgress<P>,
) => void
// Type for any schema that outputs an object with string keys
export type AnyObject = z.ZodType<{ [key: string]: unknown }>
/**
* Checks if a tool matches the given name (primary name or alias).
*/
export function toolMatchesName(
tool: { name: string; aliases?: string[] },
name: string,
): boolean {
return tool.name === name || (tool.aliases?.includes(name) ?? false)
}
/**
* Finds a tool by name or alias from a list of tools.
*/
export function findToolByName(tools: Tools, name: string): Tool | undefined {
return tools.find(t => toolMatchesName(t, name))
}
export type Tool<
Input extends AnyObject = AnyObject,
Output = unknown,
P extends ToolProgressData = ToolProgressData,
> = {
/**
* Optional aliases for backwards compatibility when a tool is renamed.
* The tool can be looked up by any of these names in addition to its primary name.
*/
aliases?: string[]
/**
* One-line capability phrase used by ToolSearch for keyword matching.
* Helps the model find this tool via keyword search when it's deferred.
* 3–10 words, no trailing period.
* Prefer terms not already in the tool name (e.g. 'jupyter' for NotebookEdit).
*/
searchHint?: string
call(
args: z.infer<Input>,
context: ToolUseContext,
canUseTool: CanUseToolFn,
parentMessage: AssistantMessage,
onProgress?: ToolCallProgress<P>,
): Promise<ToolResult<Output>>
description(
input: z.infer<Input>,
options: {
isNonInteractiveSession: boolean
toolPermissionContext: ToolPermissionContext
tools: Tools
},
): Promise<string>
readonly inputSchema: Input
// Type for MCP tools that can specify their input schema directly in JSON Schema format
// rather than converting from Zod schema
readonly inputJSONSchema?: ToolInputJSONSchema
// Optional because TungstenTool doesn't define this. TODO: Make it required.
// When we do that, we can also go through and make this a bit more type-safe.
outputSchema?: z.ZodType<unknown>
inputsEquivalent?(a: z.infer<Input>, b: z.infer<Input>): boolean
isConcurrencySafe(input: z.infer<Input>): boolean
isEnabled(): boolean
isReadOnly(input: z.infer<Input>): boolean
/** Defaults to false. Only set when the tool performs irreversible operations (delete, overwrite, send). */
isDestructive?(input: z.infer<Input>): boolean
/**
* What should happen when the user submits a new message while this tool
* is running.
*
* - `'cancel'` — stop the tool and discard its result
* - `'block'` — keep running; the new message waits
*
* Defaults to `'block'` when not implemented.
*/
interruptBehavior?(): 'cancel' | 'block'
/**
* Returns information about whether this tool use is a search or read operation
* that should be collapsed into a condensed display in the UI. Examples include
* file searching (Grep, Glob), file reading (Read), and bash commands like find,
* grep, wc, etc.
*
* Returns an object indicating whether the operation is a search or read operation:
* - `isSearch: true` for search operations (grep, find, glob patterns)
* - `isRead: true` for read operations (cat, head, tail, file read)
* - `isList: true` for directory-listing operations (ls, tree, du)
* - All can be false if the operation shouldn't be collapsed
*/
isSearchOrReadCommand?(input: z.infer<Input>): {
isSearch: boolean
isRead: boolean
isList?: boolean
}
isOpenWorld?(input: z.infer<Input>): boolean
requiresUserInteraction?(): boolean
isMcp?: boolean
isLsp?: boolean
/**
* When true, this tool is deferred (sent with defer_loading: true) and requires
* ToolSearch to be used before it can be called.
*/
readonly shouldDefer?: boolean
/**
* When true, this tool is never deferred — its full schema appears in the
* initial prompt even when ToolSearch is enabled. For MCP tools, set via
* `_meta['anthropic/alwaysLoad']`. Use for tools the model must see on
* turn 1 without a ToolSearch round-trip.
*/
readonly alwaysLoad?: boolean
/**
* For MCP tools: the server and tool names as received from the MCP server (unnormalized).
* Present on all MCP tools regardless of whether `name` is prefixed (mcp__server__tool)
* or unprefixed (CLAUDE_AGENT_SDK_MCP_NO_PREFIX mode).
*/
mcpInfo?: { serverName: string; toolName: string }
readonly name: string
/**
* Maximum size in characters for tool result before it gets persisted to disk.
* When exceeded, the result is saved to a file and Claude receives a preview
* with the file path instead of the full content.
*
* Set to Infinity for tools whose output must never be persisted (e.g. Read,
* where persisting creates a circular Read→file→Read loop and the tool
* already self-bounds via its own limits).
*/
maxResultSizeChars: number
/**
* When true, enables strict mode for this tool, which causes the API to
* more strictly adhere to tool instructions and parameter schemas.
* Only applied when the tengu_tool_pear is enabled.
*/
readonly strict?: boolean
/**
* Called on copies of tool_use input before observers see it (SDK stream,
* transcript, canUseTool, PreToolUse/PostToolUse hooks). Mutate in place
* to add legacy/derived fields. Must be idempotent. The original API-bound
* input is never mutated (preserves prompt cache). Not re-applied when a
* hook/permission returns a fresh updatedInput — those own their shape.
*/
backfillObservableInput?(input: Record<string, unknown>): void
/**
* Determines if this tool is allowed to run with this input in the current context.
* It informs the model of why the tool use failed, and does not directly display any UI.
* @param input
* @param context
*/
validateInput?(
input: z.infer<Input>,
context: ToolUseContext,
): Promise<ValidationResult>
/**
* Determines if the user is asked for permission. Only called after validateInput() passes.
* General permission logic is in permissions.ts. This method contains tool-specific logic.
* @param input
* @param context
*/
checkPermissions(
input: z.infer<Input>,
context: ToolUseContext,
): Promise<PermissionResult>
// Optional method for tools that operate on a file path
getPath?(input: z.infer<Input>): string
/**
* Prepare a matcher for hook `if` conditions (permission-rule patterns like
* "git *" from "Bash(git *)"). Called once per hook-input pair; any
* expensive parsing happens here. Returns a closure that is called per
* hook pattern. If not implemented, only tool-name-level matching works.
*/
preparePermissionMatcher?(
input: z.infer<Input>,
): Promise<(pattern: string) => boolean>
prompt(options: {
getToolPermissionContext: () => Promise<ToolPermissionContext>
tools: Tools
agents: AgentDefinition[]
allowedAgentTypes?: string[]
}): Promise<string>
userFacingName(input: Partial<z.infer<Input>> | undefined): string
userFacingNameBackgroundColor?(
input: Partial<z.infer<Input>> | undefined,
): keyof Theme | undefined
/**
* Transparent wrappers (e.g. REPL) delegate all rendering to their progress
* handler, which emits native-looking blocks for each inner tool call.
* The wrapper itself shows nothing.
*/
isTransparentWrapper?(): boolean
/**
* Returns a short string summary of this tool use for display in compact views.
* @param input The tool input
* @returns A short string summary, or null to not display
*/
getToolUseSummary?(input: Partial<z.infer<Input>> | undefined): string | null
/**
* Returns a human-readable present-tense activity description for spinner display.
* Example: "Reading src/foo.ts", "Running bun test", "Searching for pattern"
* @param input The tool input
* @returns Activity description string, or null to fall back to tool name
*/
getActivityDescription?(
input: Partial<z.infer<Input>> | undefined,
): string | null
/**
* Returns a compact representation of this tool use for the auto-mode
* security classifier. Examples: `ls -la` for Bash, `/tmp/x: new content`
* for Edit. Return '' to skip this tool in the classifier transcript
* (e.g. tools with no security relevance). May return an object to avoid
* double-encoding when the caller JSON-wraps the value.
*/
toAutoClassifierInput(input: z.infer<Input>): unknown
mapToolResultToToolResultBlockParam(
content: Output,
toolUseID: string,
): ToolResultBlockParam
/**
* Optional. When omitted, the tool result renders nothing (same as returning
* null). Omit for tools whose results are surfaced elsewhere (e.g., TodoWrite
* updates the todo panel, not the transcript).
*/
renderToolResultMessage?(
content: Output,
progressMessagesForMessage: ProgressMessage<P>[],
options: {
style?: 'condensed'
theme: ThemeName
tools: Tools
verbose: boolean
isTranscriptMode?: boolean
isBriefOnly?: boolean
/** Original tool_use input, when available. Useful for compact result
* summaries that reference what was requested (e.g. "Sent to #foo"). */
input?: unknown
},
): React.ReactNode
/**
* Flattened text of what renderToolResultMessage shows IN TRANSCRIPT
* MODE (verbose=true, isTranscriptMode=true). For transcript search
* indexing: the index counts occurrences in this string, the highlight
* overlay scans the actual screen buffer. For count ≡ highlight, this
* must return the text that ends up visible — not the model-facing
* serialization from mapToolResultToToolResultBlockParam (which adds
* system-reminders, persisted-output wrappers).
*
* Chrome can be skipped (under-count is fine). "Found 3 files in 12ms"
* isn't worth indexing. Phantoms are not fine — text that's claimed
* here but doesn't render is a count≠highlight bug.
*
* Optional: omitted → field-name heuristic in transcriptSearch.ts.
* Drift caught by test/utils/transcriptSearch.renderFidelity.test.tsx
* which renders sample outputs and flags text that's indexed-but-not-
* rendered (phantom) or rendered-but-not-indexed (under-count warning).
*/
extractSearchText?(out: Output): string
/**
* Render the tool use message. Note that `input` is partial because we render
* the message as soon as possible, possibly before tool parameters have fully
* streamed in.
*/
renderToolUseMessage(
input: Partial<z.infer<Input>>,
options: { theme: ThemeName; verbose: boolean; commands?: Command[] },
): React.ReactNode
/**
* Returns true when the non-verbose rendering of this output is truncated
* (i.e., clicking to expand would reveal more content). Gates
* click-to-expand in fullscreen — only messages where verbose actually
* shows more get a hover/click affordance. Unset means never truncated.
*/
isResultTruncated?(output: Output): boolean
/**
* Renders an optional tag to display after the tool use message.
* Used for additional metadata like timeout, model, resume ID, etc.
* Returns null to not display anything.
*/
renderToolUseTag?(input: Partial<z.infer<Input>>): React.ReactNode
/**
* Optional. When omitted, no progress UI is shown while the tool runs.
*/
renderToolUseProgressMessage?(
progressMessagesForMessage: ProgressMessage<P>[],
options: {
tools: Tools
verbose: boolean
terminalSize?: { columns: number; rows: number }
inProgressToolCallCount?: number
isTranscriptMode?: boolean
},
): React.ReactNode
renderToolUseQueuedMessage?(): React.ReactNode
/**
* Optional. When omitted, falls back to <FallbackToolUseRejectedMessage />.
* Only define this for tools that need custom rejection UI (e.g., file edits
* that show the rejected diff).
*/
renderToolUseRejectedMessage?(
input: z.infer<Input>,
options: {
columns: number
messages: Message[]
style?: 'condensed'
theme: ThemeName
tools: Tools
verbose: boolean
progressMessagesForMessage: ProgressMessage<P>[]
isTranscriptMode?: boolean
},
): React.ReactNode
/**
* Optional. When omitted, falls back to <FallbackToolUseErrorMessage />.
* Only define this for tools that need custom error UI (e.g., search tools
* that show "File not found" instead of the raw error).
*/
renderToolUseErrorMessage?(
result: ToolResultBlockParam['content'],
options: {
progressMessagesForMessage: ProgressMessage<P>[]
tools: Tools
verbose: boolean
isTranscriptMode?: boolean
},
): React.ReactNode
/**
* Renders multiple parallel instances of this tool as a group.
* @returns React node to render, or
gitextract_kbo2q3kg/
├── README.md
├── claude-code-2.1.88.tgz
├── extract-sources.js
├── package/
│ ├── LICENSE.md
│ ├── README.md
│ ├── cli.js
│ ├── package.json
│ ├── sdk-tools.d.ts
│ └── vendor/
│ ├── audio-capture/
│ │ ├── arm64-darwin/
│ │ │ └── audio-capture.node
│ │ ├── arm64-linux/
│ │ │ └── audio-capture.node
│ │ ├── arm64-win32/
│ │ │ └── audio-capture.node
│ │ ├── x64-darwin/
│ │ │ └── audio-capture.node
│ │ ├── x64-linux/
│ │ │ └── audio-capture.node
│ │ └── x64-win32/
│ │ └── audio-capture.node
│ └── ripgrep/
│ ├── COPYING
│ ├── arm64-darwin/
│ │ └── rg
│ ├── arm64-linux/
│ │ └── rg
│ ├── x64-darwin/
│ │ └── rg
│ └── x64-linux/
│ └── rg
└── restored-src/
├── src/
│ ├── QueryEngine.ts
│ ├── Task.ts
│ ├── Tool.ts
│ ├── assistant/
│ │ └── sessionHistory.ts
│ ├── bootstrap/
│ │ └── state.ts
│ ├── bridge/
│ │ ├── bridgeApi.ts
│ │ ├── bridgeConfig.ts
│ │ ├── bridgeDebug.ts
│ │ ├── bridgeEnabled.ts
│ │ ├── bridgeMain.ts
│ │ ├── bridgeMessaging.ts
│ │ ├── bridgePermissionCallbacks.ts
│ │ ├── bridgePointer.ts
│ │ ├── bridgeStatusUtil.ts
│ │ ├── bridgeUI.ts
│ │ ├── capacityWake.ts
│ │ ├── codeSessionApi.ts
│ │ ├── createSession.ts
│ │ ├── debugUtils.ts
│ │ ├── envLessBridgeConfig.ts
│ │ ├── flushGate.ts
│ │ ├── inboundAttachments.ts
│ │ ├── inboundMessages.ts
│ │ ├── initReplBridge.ts
│ │ ├── jwtUtils.ts
│ │ ├── pollConfig.ts
│ │ ├── pollConfigDefaults.ts
│ │ ├── remoteBridgeCore.ts
│ │ ├── replBridge.ts
│ │ ├── replBridgeHandle.ts
│ │ ├── replBridgeTransport.ts
│ │ ├── sessionIdCompat.ts
│ │ ├── sessionRunner.ts
│ │ ├── trustedDevice.ts
│ │ ├── types.ts
│ │ └── workSecret.ts
│ ├── buddy/
│ │ ├── CompanionSprite.tsx
│ │ ├── companion.ts
│ │ ├── prompt.ts
│ │ ├── sprites.ts
│ │ ├── types.ts
│ │ └── useBuddyNotification.tsx
│ ├── cli/
│ │ ├── exit.ts
│ │ ├── handlers/
│ │ │ ├── agents.ts
│ │ │ ├── auth.ts
│ │ │ ├── autoMode.ts
│ │ │ ├── mcp.tsx
│ │ │ ├── plugins.ts
│ │ │ └── util.tsx
│ │ ├── ndjsonSafeStringify.ts
│ │ ├── print.ts
│ │ ├── remoteIO.ts
│ │ ├── structuredIO.ts
│ │ ├── transports/
│ │ │ ├── HybridTransport.ts
│ │ │ ├── SSETransport.ts
│ │ │ ├── SerialBatchEventUploader.ts
│ │ │ ├── WebSocketTransport.ts
│ │ │ ├── WorkerStateUploader.ts
│ │ │ ├── ccrClient.ts
│ │ │ └── transportUtils.ts
│ │ └── update.ts
│ ├── commands/
│ │ ├── add-dir/
│ │ │ ├── add-dir.tsx
│ │ │ ├── index.ts
│ │ │ └── validation.ts
│ │ ├── advisor.ts
│ │ ├── agents/
│ │ │ ├── agents.tsx
│ │ │ └── index.ts
│ │ ├── ant-trace/
│ │ │ └── index.js
│ │ ├── autofix-pr/
│ │ │ └── index.js
│ │ ├── backfill-sessions/
│ │ │ └── index.js
│ │ ├── branch/
│ │ │ ├── branch.ts
│ │ │ └── index.ts
│ │ ├── break-cache/
│ │ │ └── index.js
│ │ ├── bridge/
│ │ │ ├── bridge.tsx
│ │ │ └── index.ts
│ │ ├── bridge-kick.ts
│ │ ├── brief.ts
│ │ ├── btw/
│ │ │ ├── btw.tsx
│ │ │ └── index.ts
│ │ ├── bughunter/
│ │ │ └── index.js
│ │ ├── chrome/
│ │ │ ├── chrome.tsx
│ │ │ └── index.ts
│ │ ├── clear/
│ │ │ ├── caches.ts
│ │ │ ├── clear.ts
│ │ │ ├── conversation.ts
│ │ │ └── index.ts
│ │ ├── color/
│ │ │ ├── color.ts
│ │ │ └── index.ts
│ │ ├── commit-push-pr.ts
│ │ ├── commit.ts
│ │ ├── compact/
│ │ │ ├── compact.ts
│ │ │ └── index.ts
│ │ ├── config/
│ │ │ ├── config.tsx
│ │ │ └── index.ts
│ │ ├── context/
│ │ │ ├── context-noninteractive.ts
│ │ │ ├── context.tsx
│ │ │ └── index.ts
│ │ ├── copy/
│ │ │ ├── copy.tsx
│ │ │ └── index.ts
│ │ ├── cost/
│ │ │ ├── cost.ts
│ │ │ └── index.ts
│ │ ├── createMovedToPluginCommand.ts
│ │ ├── ctx_viz/
│ │ │ └── index.js
│ │ ├── debug-tool-call/
│ │ │ └── index.js
│ │ ├── desktop/
│ │ │ ├── desktop.tsx
│ │ │ └── index.ts
│ │ ├── diff/
│ │ │ ├── diff.tsx
│ │ │ └── index.ts
│ │ ├── doctor/
│ │ │ ├── doctor.tsx
│ │ │ └── index.ts
│ │ ├── effort/
│ │ │ ├── effort.tsx
│ │ │ └── index.ts
│ │ ├── env/
│ │ │ └── index.js
│ │ ├── exit/
│ │ │ ├── exit.tsx
│ │ │ └── index.ts
│ │ ├── export/
│ │ │ ├── export.tsx
│ │ │ └── index.ts
│ │ ├── extra-usage/
│ │ │ ├── extra-usage-core.ts
│ │ │ ├── extra-usage-noninteractive.ts
│ │ │ ├── extra-usage.tsx
│ │ │ └── index.ts
│ │ ├── fast/
│ │ │ ├── fast.tsx
│ │ │ └── index.ts
│ │ ├── feedback/
│ │ │ ├── feedback.tsx
│ │ │ └── index.ts
│ │ ├── files/
│ │ │ ├── files.ts
│ │ │ └── index.ts
│ │ ├── good-claude/
│ │ │ └── index.js
│ │ ├── heapdump/
│ │ │ ├── heapdump.ts
│ │ │ └── index.ts
│ │ ├── help/
│ │ │ ├── help.tsx
│ │ │ └── index.ts
│ │ ├── hooks/
│ │ │ ├── hooks.tsx
│ │ │ └── index.ts
│ │ ├── ide/
│ │ │ ├── ide.tsx
│ │ │ └── index.ts
│ │ ├── init-verifiers.ts
│ │ ├── init.ts
│ │ ├── insights.ts
│ │ ├── install-github-app/
│ │ │ ├── ApiKeyStep.tsx
│ │ │ ├── CheckExistingSecretStep.tsx
│ │ │ ├── CheckGitHubStep.tsx
│ │ │ ├── ChooseRepoStep.tsx
│ │ │ ├── CreatingStep.tsx
│ │ │ ├── ErrorStep.tsx
│ │ │ ├── ExistingWorkflowStep.tsx
│ │ │ ├── InstallAppStep.tsx
│ │ │ ├── OAuthFlowStep.tsx
│ │ │ ├── SuccessStep.tsx
│ │ │ ├── WarningsStep.tsx
│ │ │ ├── index.ts
│ │ │ ├── install-github-app.tsx
│ │ │ └── setupGitHubActions.ts
│ │ ├── install-slack-app/
│ │ │ ├── index.ts
│ │ │ └── install-slack-app.ts
│ │ ├── install.tsx
│ │ ├── issue/
│ │ │ └── index.js
│ │ ├── keybindings/
│ │ │ ├── index.ts
│ │ │ └── keybindings.ts
│ │ ├── login/
│ │ │ ├── index.ts
│ │ │ └── login.tsx
│ │ ├── logout/
│ │ │ ├── index.ts
│ │ │ └── logout.tsx
│ │ ├── mcp/
│ │ │ ├── addCommand.ts
│ │ │ ├── index.ts
│ │ │ ├── mcp.tsx
│ │ │ └── xaaIdpCommand.ts
│ │ ├── memory/
│ │ │ ├── index.ts
│ │ │ └── memory.tsx
│ │ ├── mobile/
│ │ │ ├── index.ts
│ │ │ └── mobile.tsx
│ │ ├── mock-limits/
│ │ │ └── index.js
│ │ ├── model/
│ │ │ ├── index.ts
│ │ │ └── model.tsx
│ │ ├── oauth-refresh/
│ │ │ └── index.js
│ │ ├── onboarding/
│ │ │ └── index.js
│ │ ├── output-style/
│ │ │ ├── index.ts
│ │ │ └── output-style.tsx
│ │ ├── passes/
│ │ │ ├── index.ts
│ │ │ └── passes.tsx
│ │ ├── perf-issue/
│ │ │ └── index.js
│ │ ├── permissions/
│ │ │ ├── index.ts
│ │ │ └── permissions.tsx
│ │ ├── plan/
│ │ │ ├── index.ts
│ │ │ └── plan.tsx
│ │ ├── plugin/
│ │ │ ├── AddMarketplace.tsx
│ │ │ ├── BrowseMarketplace.tsx
│ │ │ ├── DiscoverPlugins.tsx
│ │ │ ├── ManageMarketplaces.tsx
│ │ │ ├── ManagePlugins.tsx
│ │ │ ├── PluginErrors.tsx
│ │ │ ├── PluginOptionsDialog.tsx
│ │ │ ├── PluginOptionsFlow.tsx
│ │ │ ├── PluginSettings.tsx
│ │ │ ├── PluginTrustWarning.tsx
│ │ │ ├── UnifiedInstalledCell.tsx
│ │ │ ├── ValidatePlugin.tsx
│ │ │ ├── index.tsx
│ │ │ ├── parseArgs.ts
│ │ │ ├── plugin.tsx
│ │ │ ├── pluginDetailsHelpers.tsx
│ │ │ └── usePagination.ts
│ │ ├── pr_comments/
│ │ │ └── index.ts
│ │ ├── privacy-settings/
│ │ │ ├── index.ts
│ │ │ └── privacy-settings.tsx
│ │ ├── rate-limit-options/
│ │ │ ├── index.ts
│ │ │ └── rate-limit-options.tsx
│ │ ├── release-notes/
│ │ │ ├── index.ts
│ │ │ └── release-notes.ts
│ │ ├── reload-plugins/
│ │ │ ├── index.ts
│ │ │ └── reload-plugins.ts
│ │ ├── remote-env/
│ │ │ ├── index.ts
│ │ │ └── remote-env.tsx
│ │ ├── remote-setup/
│ │ │ ├── api.ts
│ │ │ ├── index.ts
│ │ │ └── remote-setup.tsx
│ │ ├── rename/
│ │ │ ├── generateSessionName.ts
│ │ │ ├── index.ts
│ │ │ └── rename.ts
│ │ ├── reset-limits/
│ │ │ └── index.js
│ │ ├── resume/
│ │ │ ├── index.ts
│ │ │ └── resume.tsx
│ │ ├── review/
│ │ │ ├── UltrareviewOverageDialog.tsx
│ │ │ ├── reviewRemote.ts
│ │ │ ├── ultrareviewCommand.tsx
│ │ │ └── ultrareviewEnabled.ts
│ │ ├── review.ts
│ │ ├── rewind/
│ │ │ ├── index.ts
│ │ │ └── rewind.ts
│ │ ├── sandbox-toggle/
│ │ │ ├── index.ts
│ │ │ └── sandbox-toggle.tsx
│ │ ├── security-review.ts
│ │ ├── session/
│ │ │ ├── index.ts
│ │ │ └── session.tsx
│ │ ├── share/
│ │ │ └── index.js
│ │ ├── skills/
│ │ │ ├── index.ts
│ │ │ └── skills.tsx
│ │ ├── stats/
│ │ │ ├── index.ts
│ │ │ └── stats.tsx
│ │ ├── status/
│ │ │ ├── index.ts
│ │ │ └── status.tsx
│ │ ├── statusline.tsx
│ │ ├── stickers/
│ │ │ ├── index.ts
│ │ │ └── stickers.ts
│ │ ├── summary/
│ │ │ └── index.js
│ │ ├── tag/
│ │ │ ├── index.ts
│ │ │ └── tag.tsx
│ │ ├── tasks/
│ │ │ ├── index.ts
│ │ │ └── tasks.tsx
│ │ ├── teleport/
│ │ │ └── index.js
│ │ ├── terminalSetup/
│ │ │ ├── index.ts
│ │ │ └── terminalSetup.tsx
│ │ ├── theme/
│ │ │ ├── index.ts
│ │ │ └── theme.tsx
│ │ ├── thinkback/
│ │ │ ├── index.ts
│ │ │ └── thinkback.tsx
│ │ ├── thinkback-play/
│ │ │ ├── index.ts
│ │ │ └── thinkback-play.ts
│ │ ├── ultraplan.tsx
│ │ ├── upgrade/
│ │ │ ├── index.ts
│ │ │ └── upgrade.tsx
│ │ ├── usage/
│ │ │ ├── index.ts
│ │ │ └── usage.tsx
│ │ ├── version.ts
│ │ ├── vim/
│ │ │ ├── index.ts
│ │ │ └── vim.ts
│ │ └── voice/
│ │ ├── index.ts
│ │ └── voice.ts
│ ├── commands.ts
│ ├── components/
│ │ ├── AgentProgressLine.tsx
│ │ ├── App.tsx
│ │ ├── ApproveApiKey.tsx
│ │ ├── AutoModeOptInDialog.tsx
│ │ ├── AutoUpdater.tsx
│ │ ├── AutoUpdaterWrapper.tsx
│ │ ├── AwsAuthStatusBox.tsx
│ │ ├── BaseTextInput.tsx
│ │ ├── BashModeProgress.tsx
│ │ ├── BridgeDialog.tsx
│ │ ├── BypassPermissionsModeDialog.tsx
│ │ ├── ChannelDowngradeDialog.tsx
│ │ ├── ClaudeCodeHint/
│ │ │ └── PluginHintMenu.tsx
│ │ ├── ClaudeInChromeOnboarding.tsx
│ │ ├── ClaudeMdExternalIncludesDialog.tsx
│ │ ├── ClickableImageRef.tsx
│ │ ├── CompactSummary.tsx
│ │ ├── ConfigurableShortcutHint.tsx
│ │ ├── ConsoleOAuthFlow.tsx
│ │ ├── ContextSuggestions.tsx
│ │ ├── ContextVisualization.tsx
│ │ ├── CoordinatorAgentStatus.tsx
│ │ ├── CostThresholdDialog.tsx
│ │ ├── CtrlOToExpand.tsx
│ │ ├── CustomSelect/
│ │ │ ├── SelectMulti.tsx
│ │ │ ├── index.ts
│ │ │ ├── option-map.ts
│ │ │ ├── select-input-option.tsx
│ │ │ ├── select-option.tsx
│ │ │ ├── select.tsx
│ │ │ ├── use-multi-select-state.ts
│ │ │ ├── use-select-input.ts
│ │ │ ├── use-select-navigation.ts
│ │ │ └── use-select-state.ts
│ │ ├── DesktopHandoff.tsx
│ │ ├── DesktopUpsell/
│ │ │ └── DesktopUpsellStartup.tsx
│ │ ├── DevBar.tsx
│ │ ├── DevChannelsDialog.tsx
│ │ ├── DiagnosticsDisplay.tsx
│ │ ├── EffortCallout.tsx
│ │ ├── EffortIndicator.ts
│ │ ├── ExitFlow.tsx
│ │ ├── ExportDialog.tsx
│ │ ├── FallbackToolUseErrorMessage.tsx
│ │ ├── FallbackToolUseRejectedMessage.tsx
│ │ ├── FastIcon.tsx
│ │ ├── Feedback.tsx
│ │ ├── FeedbackSurvey/
│ │ │ ├── FeedbackSurvey.tsx
│ │ │ ├── FeedbackSurveyView.tsx
│ │ │ ├── TranscriptSharePrompt.tsx
│ │ │ ├── submitTranscriptShare.ts
│ │ │ ├── useDebouncedDigitInput.ts
│ │ │ ├── useFeedbackSurvey.tsx
│ │ │ ├── useMemorySurvey.tsx
│ │ │ ├── usePostCompactSurvey.tsx
│ │ │ └── useSurveyState.tsx
│ │ ├── FileEditToolDiff.tsx
│ │ ├── FileEditToolUpdatedMessage.tsx
│ │ ├── FileEditToolUseRejectedMessage.tsx
│ │ ├── FilePathLink.tsx
│ │ ├── FullscreenLayout.tsx
│ │ ├── GlobalSearchDialog.tsx
│ │ ├── HelpV2/
│ │ │ ├── Commands.tsx
│ │ │ ├── General.tsx
│ │ │ └── HelpV2.tsx
│ │ ├── HighlightedCode/
│ │ │ └── Fallback.tsx
│ │ ├── HighlightedCode.tsx
│ │ ├── HistorySearchDialog.tsx
│ │ ├── IdeAutoConnectDialog.tsx
│ │ ├── IdeOnboardingDialog.tsx
│ │ ├── IdeStatusIndicator.tsx
│ │ ├── IdleReturnDialog.tsx
│ │ ├── InterruptedByUser.tsx
│ │ ├── InvalidConfigDialog.tsx
│ │ ├── InvalidSettingsDialog.tsx
│ │ ├── KeybindingWarnings.tsx
│ │ ├── LanguagePicker.tsx
│ │ ├── LogSelector.tsx
│ │ ├── LogoV2/
│ │ │ ├── AnimatedAsterisk.tsx
│ │ │ ├── AnimatedClawd.tsx
│ │ │ ├── ChannelsNotice.tsx
│ │ │ ├── Clawd.tsx
│ │ │ ├── CondensedLogo.tsx
│ │ │ ├── EmergencyTip.tsx
│ │ │ ├── Feed.tsx
│ │ │ ├── FeedColumn.tsx
│ │ │ ├── GuestPassesUpsell.tsx
│ │ │ ├── LogoV2.tsx
│ │ │ ├── Opus1mMergeNotice.tsx
│ │ │ ├── OverageCreditUpsell.tsx
│ │ │ ├── VoiceModeNotice.tsx
│ │ │ ├── WelcomeV2.tsx
│ │ │ └── feedConfigs.tsx
│ │ ├── LspRecommendation/
│ │ │ └── LspRecommendationMenu.tsx
│ │ ├── MCPServerApprovalDialog.tsx
│ │ ├── MCPServerDesktopImportDialog.tsx
│ │ ├── MCPServerDialogCopy.tsx
│ │ ├── MCPServerMultiselectDialog.tsx
│ │ ├── ManagedSettingsSecurityDialog/
│ │ │ ├── ManagedSettingsSecurityDialog.tsx
│ │ │ └── utils.ts
│ │ ├── Markdown.tsx
│ │ ├── MarkdownTable.tsx
│ │ ├── MemoryUsageIndicator.tsx
│ │ ├── Message.tsx
│ │ ├── MessageModel.tsx
│ │ ├── MessageResponse.tsx
│ │ ├── MessageRow.tsx
│ │ ├── MessageSelector.tsx
│ │ ├── MessageTimestamp.tsx
│ │ ├── Messages.tsx
│ │ ├── ModelPicker.tsx
│ │ ├── NativeAutoUpdater.tsx
│ │ ├── NotebookEditToolUseRejectedMessage.tsx
│ │ ├── OffscreenFreeze.tsx
│ │ ├── Onboarding.tsx
│ │ ├── OutputStylePicker.tsx
│ │ ├── PackageManagerAutoUpdater.tsx
│ │ ├── Passes/
│ │ │ └── Passes.tsx
│ │ ├── PrBadge.tsx
│ │ ├── PressEnterToContinue.tsx
│ │ ├── PromptInput/
│ │ │ ├── HistorySearchInput.tsx
│ │ │ ├── IssueFlagBanner.tsx
│ │ │ ├── Notifications.tsx
│ │ │ ├── PromptInput.tsx
│ │ │ ├── PromptInputFooter.tsx
│ │ │ ├── PromptInputFooterLeftSide.tsx
│ │ │ ├── PromptInputFooterSuggestions.tsx
│ │ │ ├── PromptInputHelpMenu.tsx
│ │ │ ├── PromptInputModeIndicator.tsx
│ │ │ ├── PromptInputQueuedCommands.tsx
│ │ │ ├── PromptInputStashNotice.tsx
│ │ │ ├── SandboxPromptFooterHint.tsx
│ │ │ ├── ShimmeredInput.tsx
│ │ │ ├── VoiceIndicator.tsx
│ │ │ ├── inputModes.ts
│ │ │ ├── inputPaste.ts
│ │ │ ├── useMaybeTruncateInput.ts
│ │ │ ├── usePromptInputPlaceholder.ts
│ │ │ ├── useShowFastIconHint.ts
│ │ │ ├── useSwarmBanner.ts
│ │ │ └── utils.ts
│ │ ├── QuickOpenDialog.tsx
│ │ ├── RemoteCallout.tsx
│ │ ├── RemoteEnvironmentDialog.tsx
│ │ ├── ResumeTask.tsx
│ │ ├── SandboxViolationExpandedView.tsx
│ │ ├── ScrollKeybindingHandler.tsx
│ │ ├── SearchBox.tsx
│ │ ├── SentryErrorBoundary.ts
│ │ ├── SessionBackgroundHint.tsx
│ │ ├── SessionPreview.tsx
│ │ ├── Settings/
│ │ │ ├── Config.tsx
│ │ │ ├── Settings.tsx
│ │ │ ├── Status.tsx
│ │ │ └── Usage.tsx
│ │ ├── ShowInIDEPrompt.tsx
│ │ ├── SkillImprovementSurvey.tsx
│ │ ├── Spinner/
│ │ │ ├── FlashingChar.tsx
│ │ │ ├── GlimmerMessage.tsx
│ │ │ ├── ShimmerChar.tsx
│ │ │ ├── SpinnerAnimationRow.tsx
│ │ │ ├── SpinnerGlyph.tsx
│ │ │ ├── TeammateSpinnerLine.tsx
│ │ │ ├── TeammateSpinnerTree.tsx
│ │ │ ├── index.ts
│ │ │ ├── teammateSelectHint.ts
│ │ │ ├── useShimmerAnimation.ts
│ │ │ ├── useStalledAnimation.ts
│ │ │ └── utils.ts
│ │ ├── Spinner.tsx
│ │ ├── Stats.tsx
│ │ ├── StatusLine.tsx
│ │ ├── StatusNotices.tsx
│ │ ├── StructuredDiff/
│ │ │ ├── Fallback.tsx
│ │ │ └── colorDiff.ts
│ │ ├── StructuredDiff.tsx
│ │ ├── StructuredDiffList.tsx
│ │ ├── TagTabs.tsx
│ │ ├── TaskListV2.tsx
│ │ ├── TeammateViewHeader.tsx
│ │ ├── TeleportError.tsx
│ │ ├── TeleportProgress.tsx
│ │ ├── TeleportRepoMismatchDialog.tsx
│ │ ├── TeleportResumeWrapper.tsx
│ │ ├── TeleportStash.tsx
│ │ ├── TextInput.tsx
│ │ ├── ThemePicker.tsx
│ │ ├── ThinkingToggle.tsx
│ │ ├── TokenWarning.tsx
│ │ ├── ToolUseLoader.tsx
│ │ ├── TrustDialog/
│ │ │ ├── TrustDialog.tsx
│ │ │ └── utils.ts
│ │ ├── ValidationErrorsList.tsx
│ │ ├── VimTextInput.tsx
│ │ ├── VirtualMessageList.tsx
│ │ ├── WorkflowMultiselectDialog.tsx
│ │ ├── WorktreeExitDialog.tsx
│ │ ├── agents/
│ │ │ ├── AgentDetail.tsx
│ │ │ ├── AgentEditor.tsx
│ │ │ ├── AgentNavigationFooter.tsx
│ │ │ ├── AgentsList.tsx
│ │ │ ├── AgentsMenu.tsx
│ │ │ ├── ColorPicker.tsx
│ │ │ ├── ModelSelector.tsx
│ │ │ ├── ToolSelector.tsx
│ │ │ ├── agentFileUtils.ts
│ │ │ ├── generateAgent.ts
│ │ │ ├── new-agent-creation/
│ │ │ │ ├── CreateAgentWizard.tsx
│ │ │ │ └── wizard-steps/
│ │ │ │ ├── ColorStep.tsx
│ │ │ │ ├── ConfirmStep.tsx
│ │ │ │ ├── ConfirmStepWrapper.tsx
│ │ │ │ ├── DescriptionStep.tsx
│ │ │ │ ├── GenerateStep.tsx
│ │ │ │ ├── LocationStep.tsx
│ │ │ │ ├── MemoryStep.tsx
│ │ │ │ ├── MethodStep.tsx
│ │ │ │ ├── ModelStep.tsx
│ │ │ │ ├── PromptStep.tsx
│ │ │ │ ├── ToolsStep.tsx
│ │ │ │ └── TypeStep.tsx
│ │ │ ├── types.ts
│ │ │ ├── utils.ts
│ │ │ └── validateAgent.ts
│ │ ├── design-system/
│ │ │ ├── Byline.tsx
│ │ │ ├── Dialog.tsx
│ │ │ ├── Divider.tsx
│ │ │ ├── FuzzyPicker.tsx
│ │ │ ├── KeyboardShortcutHint.tsx
│ │ │ ├── ListItem.tsx
│ │ │ ├── LoadingState.tsx
│ │ │ ├── Pane.tsx
│ │ │ ├── ProgressBar.tsx
│ │ │ ├── Ratchet.tsx
│ │ │ ├── StatusIcon.tsx
│ │ │ ├── Tabs.tsx
│ │ │ ├── ThemeProvider.tsx
│ │ │ ├── ThemedBox.tsx
│ │ │ ├── ThemedText.tsx
│ │ │ └── color.ts
│ │ ├── diff/
│ │ │ ├── DiffDetailView.tsx
│ │ │ ├── DiffDialog.tsx
│ │ │ └── DiffFileList.tsx
│ │ ├── grove/
│ │ │ └── Grove.tsx
│ │ ├── hooks/
│ │ │ ├── HooksConfigMenu.tsx
│ │ │ ├── PromptDialog.tsx
│ │ │ ├── SelectEventMode.tsx
│ │ │ ├── SelectHookMode.tsx
│ │ │ ├── SelectMatcherMode.tsx
│ │ │ └── ViewHookMode.tsx
│ │ ├── mcp/
│ │ │ ├── CapabilitiesSection.tsx
│ │ │ ├── ElicitationDialog.tsx
│ │ │ ├── MCPAgentServerMenu.tsx
│ │ │ ├── MCPListPanel.tsx
│ │ │ ├── MCPReconnect.tsx
│ │ │ ├── MCPRemoteServerMenu.tsx
│ │ │ ├── MCPSettings.tsx
│ │ │ ├── MCPStdioServerMenu.tsx
│ │ │ ├── MCPToolDetailView.tsx
│ │ │ ├── MCPToolListView.tsx
│ │ │ ├── McpParsingWarnings.tsx
│ │ │ ├── index.ts
│ │ │ └── utils/
│ │ │ └── reconnectHelpers.tsx
│ │ ├── memory/
│ │ │ ├── MemoryFileSelector.tsx
│ │ │ └── MemoryUpdateNotification.tsx
│ │ ├── messageActions.tsx
│ │ ├── messages/
│ │ │ ├── AdvisorMessage.tsx
│ │ │ ├── AssistantRedactedThinkingMessage.tsx
│ │ │ ├── AssistantTextMessage.tsx
│ │ │ ├── AssistantThinkingMessage.tsx
│ │ │ ├── AssistantToolUseMessage.tsx
│ │ │ ├── AttachmentMessage.tsx
│ │ │ ├── CollapsedReadSearchContent.tsx
│ │ │ ├── CompactBoundaryMessage.tsx
│ │ │ ├── GroupedToolUseContent.tsx
│ │ │ ├── HighlightedThinkingText.tsx
│ │ │ ├── HookProgressMessage.tsx
│ │ │ ├── PlanApprovalMessage.tsx
│ │ │ ├── RateLimitMessage.tsx
│ │ │ ├── ShutdownMessage.tsx
│ │ │ ├── SystemAPIErrorMessage.tsx
│ │ │ ├── SystemTextMessage.tsx
│ │ │ ├── TaskAssignmentMessage.tsx
│ │ │ ├── UserAgentNotificationMessage.tsx
│ │ │ ├── UserBashInputMessage.tsx
│ │ │ ├── UserBashOutputMessage.tsx
│ │ │ ├── UserChannelMessage.tsx
│ │ │ ├── UserCommandMessage.tsx
│ │ │ ├── UserImageMessage.tsx
│ │ │ ├── UserLocalCommandOutputMessage.tsx
│ │ │ ├── UserMemoryInputMessage.tsx
│ │ │ ├── UserPlanMessage.tsx
│ │ │ ├── UserPromptMessage.tsx
│ │ │ ├── UserResourceUpdateMessage.tsx
│ │ │ ├── UserTeammateMessage.tsx
│ │ │ ├── UserTextMessage.tsx
│ │ │ ├── UserToolResultMessage/
│ │ │ │ ├── RejectedPlanMessage.tsx
│ │ │ │ ├── RejectedToolUseMessage.tsx
│ │ │ │ ├── UserToolCanceledMessage.tsx
│ │ │ │ ├── UserToolErrorMessage.tsx
│ │ │ │ ├── UserToolRejectMessage.tsx
│ │ │ │ ├── UserToolResultMessage.tsx
│ │ │ │ ├── UserToolSuccessMessage.tsx
│ │ │ │ └── utils.tsx
│ │ │ ├── nullRenderingAttachments.ts
│ │ │ ├── teamMemCollapsed.tsx
│ │ │ └── teamMemSaved.ts
│ │ ├── permissions/
│ │ │ ├── AskUserQuestionPermissionRequest/
│ │ │ │ ├── AskUserQuestionPermissionRequest.tsx
│ │ │ │ ├── PreviewBox.tsx
│ │ │ │ ├── PreviewQuestionView.tsx
│ │ │ │ ├── QuestionNavigationBar.tsx
│ │ │ │ ├── QuestionView.tsx
│ │ │ │ ├── SubmitQuestionsView.tsx
│ │ │ │ └── use-multiple-choice-state.ts
│ │ │ ├── BashPermissionRequest/
│ │ │ │ ├── BashPermissionRequest.tsx
│ │ │ │ └── bashToolUseOptions.tsx
│ │ │ ├── ComputerUseApproval/
│ │ │ │ └── ComputerUseApproval.tsx
│ │ │ ├── EnterPlanModePermissionRequest/
│ │ │ │ └── EnterPlanModePermissionRequest.tsx
│ │ │ ├── ExitPlanModePermissionRequest/
│ │ │ │ └── ExitPlanModePermissionRequest.tsx
│ │ │ ├── FallbackPermissionRequest.tsx
│ │ │ ├── FileEditPermissionRequest/
│ │ │ │ └── FileEditPermissionRequest.tsx
│ │ │ ├── FilePermissionDialog/
│ │ │ │ ├── FilePermissionDialog.tsx
│ │ │ │ ├── ideDiffConfig.ts
│ │ │ │ ├── permissionOptions.tsx
│ │ │ │ ├── useFilePermissionDialog.ts
│ │ │ │ └── usePermissionHandler.ts
│ │ │ ├── FileWritePermissionRequest/
│ │ │ │ ├── FileWritePermissionRequest.tsx
│ │ │ │ └── FileWriteToolDiff.tsx
│ │ │ ├── FilesystemPermissionRequest/
│ │ │ │ └── FilesystemPermissionRequest.tsx
│ │ │ ├── NotebookEditPermissionRequest/
│ │ │ │ ├── NotebookEditPermissionRequest.tsx
│ │ │ │ └── NotebookEditToolDiff.tsx
│ │ │ ├── PermissionDecisionDebugInfo.tsx
│ │ │ ├── PermissionDialog.tsx
│ │ │ ├── PermissionExplanation.tsx
│ │ │ ├── PermissionPrompt.tsx
│ │ │ ├── PermissionRequest.tsx
│ │ │ ├── PermissionRequestTitle.tsx
│ │ │ ├── PermissionRuleExplanation.tsx
│ │ │ ├── PowerShellPermissionRequest/
│ │ │ │ ├── PowerShellPermissionRequest.tsx
│ │ │ │ └── powershellToolUseOptions.tsx
│ │ │ ├── SandboxPermissionRequest.tsx
│ │ │ ├── SedEditPermissionRequest/
│ │ │ │ └── SedEditPermissionRequest.tsx
│ │ │ ├── SkillPermissionRequest/
│ │ │ │ └── SkillPermissionRequest.tsx
│ │ │ ├── WebFetchPermissionRequest/
│ │ │ │ └── WebFetchPermissionRequest.tsx
│ │ │ ├── WorkerBadge.tsx
│ │ │ ├── WorkerPendingPermission.tsx
│ │ │ ├── hooks.ts
│ │ │ ├── rules/
│ │ │ │ ├── AddPermissionRules.tsx
│ │ │ │ ├── AddWorkspaceDirectory.tsx
│ │ │ │ ├── PermissionRuleDescription.tsx
│ │ │ │ ├── PermissionRuleInput.tsx
│ │ │ │ ├── PermissionRuleList.tsx
│ │ │ │ ├── RecentDenialsTab.tsx
│ │ │ │ ├── RemoveWorkspaceDirectory.tsx
│ │ │ │ └── WorkspaceTab.tsx
│ │ │ ├── shellPermissionHelpers.tsx
│ │ │ ├── useShellPermissionFeedback.ts
│ │ │ └── utils.ts
│ │ ├── sandbox/
│ │ │ ├── SandboxConfigTab.tsx
│ │ │ ├── SandboxDependenciesTab.tsx
│ │ │ ├── SandboxDoctorSection.tsx
│ │ │ ├── SandboxOverridesTab.tsx
│ │ │ └── SandboxSettings.tsx
│ │ ├── shell/
│ │ │ ├── ExpandShellOutputContext.tsx
│ │ │ ├── OutputLine.tsx
│ │ │ ├── ShellProgressMessage.tsx
│ │ │ └── ShellTimeDisplay.tsx
│ │ ├── skills/
│ │ │ └── SkillsMenu.tsx
│ │ ├── tasks/
│ │ │ ├── AsyncAgentDetailDialog.tsx
│ │ │ ├── BackgroundTask.tsx
│ │ │ ├── BackgroundTaskStatus.tsx
│ │ │ ├── BackgroundTasksDialog.tsx
│ │ │ ├── DreamDetailDialog.tsx
│ │ │ ├── InProcessTeammateDetailDialog.tsx
│ │ │ ├── RemoteSessionDetailDialog.tsx
│ │ │ ├── RemoteSessionProgress.tsx
│ │ │ ├── ShellDetailDialog.tsx
│ │ │ ├── ShellProgress.tsx
│ │ │ ├── renderToolActivity.tsx
│ │ │ └── taskStatusUtils.tsx
│ │ ├── teams/
│ │ │ ├── TeamStatus.tsx
│ │ │ └── TeamsDialog.tsx
│ │ ├── ui/
│ │ │ ├── OrderedList.tsx
│ │ │ ├── OrderedListItem.tsx
│ │ │ └── TreeSelect.tsx
│ │ └── wizard/
│ │ ├── WizardDialogLayout.tsx
│ │ ├── WizardNavigationFooter.tsx
│ │ ├── WizardProvider.tsx
│ │ ├── index.ts
│ │ └── useWizard.ts
│ ├── constants/
│ │ ├── apiLimits.ts
│ │ ├── betas.ts
│ │ ├── common.ts
│ │ ├── cyberRiskInstruction.ts
│ │ ├── errorIds.ts
│ │ ├── figures.ts
│ │ ├── files.ts
│ │ ├── github-app.ts
│ │ ├── keys.ts
│ │ ├── messages.ts
│ │ ├── oauth.ts
│ │ ├── outputStyles.ts
│ │ ├── product.ts
│ │ ├── prompts.ts
│ │ ├── spinnerVerbs.ts
│ │ ├── system.ts
│ │ ├── systemPromptSections.ts
│ │ ├── toolLimits.ts
│ │ ├── tools.ts
│ │ ├── turnCompletionVerbs.ts
│ │ └── xml.ts
│ ├── context/
│ │ ├── QueuedMessageContext.tsx
│ │ ├── fpsMetrics.tsx
│ │ ├── mailbox.tsx
│ │ ├── modalContext.tsx
│ │ ├── notifications.tsx
│ │ ├── overlayContext.tsx
│ │ ├── promptOverlayContext.tsx
│ │ ├── stats.tsx
│ │ └── voice.tsx
│ ├── context.ts
│ ├── coordinator/
│ │ └── coordinatorMode.ts
│ ├── cost-tracker.ts
│ ├── costHook.ts
│ ├── dialogLaunchers.tsx
│ ├── entrypoints/
│ │ ├── agentSdkTypes.ts
│ │ ├── cli.tsx
│ │ ├── init.ts
│ │ ├── mcp.ts
│ │ ├── sandboxTypes.ts
│ │ └── sdk/
│ │ ├── controlSchemas.ts
│ │ ├── coreSchemas.ts
│ │ └── coreTypes.ts
│ ├── history.ts
│ ├── hooks/
│ │ ├── fileSuggestions.ts
│ │ ├── notifs/
│ │ │ ├── useAutoModeUnavailableNotification.ts
│ │ │ ├── useCanSwitchToExistingSubscription.tsx
│ │ │ ├── useDeprecationWarningNotification.tsx
│ │ │ ├── useFastModeNotification.tsx
│ │ │ ├── useIDEStatusIndicator.tsx
│ │ │ ├── useInstallMessages.tsx
│ │ │ ├── useLspInitializationNotification.tsx
│ │ │ ├── useMcpConnectivityStatus.tsx
│ │ │ ├── useModelMigrationNotifications.tsx
│ │ │ ├── useNpmDeprecationNotification.tsx
│ │ │ ├── usePluginAutoupdateNotification.tsx
│ │ │ ├── usePluginInstallationStatus.tsx
│ │ │ ├── useRateLimitWarningNotification.tsx
│ │ │ ├── useSettingsErrors.tsx
│ │ │ ├── useStartupNotification.ts
│ │ │ └── useTeammateShutdownNotification.ts
│ │ ├── renderPlaceholder.ts
│ │ ├── toolPermission/
│ │ │ ├── PermissionContext.ts
│ │ │ ├── handlers/
│ │ │ │ ├── coordinatorHandler.ts
│ │ │ │ ├── interactiveHandler.ts
│ │ │ │ └── swarmWorkerHandler.ts
│ │ │ └── permissionLogging.ts
│ │ ├── unifiedSuggestions.ts
│ │ ├── useAfterFirstRender.ts
│ │ ├── useApiKeyVerification.ts
│ │ ├── useArrowKeyHistory.tsx
│ │ ├── useAssistantHistory.ts
│ │ ├── useAwaySummary.ts
│ │ ├── useBackgroundTaskNavigation.ts
│ │ ├── useBlink.ts
│ │ ├── useCanUseTool.tsx
│ │ ├── useCancelRequest.ts
│ │ ├── useChromeExtensionNotification.tsx
│ │ ├── useClaudeCodeHintRecommendation.tsx
│ │ ├── useClipboardImageHint.ts
│ │ ├── useCommandKeybindings.tsx
│ │ ├── useCommandQueue.ts
│ │ ├── useCopyOnSelect.ts
│ │ ├── useDeferredHookMessages.ts
│ │ ├── useDiffData.ts
│ │ ├── useDiffInIDE.ts
│ │ ├── useDirectConnect.ts
│ │ ├── useDoublePress.ts
│ │ ├── useDynamicConfig.ts
│ │ ├── useElapsedTime.ts
│ │ ├── useExitOnCtrlCD.ts
│ │ ├── useExitOnCtrlCDWithKeybindings.ts
│ │ ├── useFileHistorySnapshotInit.ts
│ │ ├── useGlobalKeybindings.tsx
│ │ ├── useHistorySearch.ts
│ │ ├── useIDEIntegration.tsx
│ │ ├── useIdeAtMentioned.ts
│ │ ├── useIdeConnectionStatus.ts
│ │ ├── useIdeLogging.ts
│ │ ├── useIdeSelection.ts
│ │ ├── useInboxPoller.ts
│ │ ├── useInputBuffer.ts
│ │ ├── useIssueFlagBanner.ts
│ │ ├── useLogMessages.ts
│ │ ├── useLspPluginRecommendation.tsx
│ │ ├── useMailboxBridge.ts
│ │ ├── useMainLoopModel.ts
│ │ ├── useManagePlugins.ts
│ │ ├── useMemoryUsage.ts
│ │ ├── useMergedClients.ts
│ │ ├── useMergedCommands.ts
│ │ ├── useMergedTools.ts
│ │ ├── useMinDisplayTime.ts
│ │ ├── useNotifyAfterTimeout.ts
│ │ ├── useOfficialMarketplaceNotification.tsx
│ │ ├── usePasteHandler.ts
│ │ ├── usePluginRecommendationBase.tsx
│ │ ├── usePrStatus.ts
│ │ ├── usePromptSuggestion.ts
│ │ ├── usePromptsFromClaudeInChrome.tsx
│ │ ├── useQueueProcessor.ts
│ │ ├── useRemoteSession.ts
│ │ ├── useReplBridge.tsx
│ │ ├── useSSHSession.ts
│ │ ├── useScheduledTasks.ts
│ │ ├── useSearchInput.ts
│ │ ├── useSessionBackgrounding.ts
│ │ ├── useSettings.ts
│ │ ├── useSettingsChange.ts
│ │ ├── useSkillImprovementSurvey.ts
│ │ ├── useSkillsChange.ts
│ │ ├── useSwarmInitialization.ts
│ │ ├── useSwarmPermissionPoller.ts
│ │ ├── useTaskListWatcher.ts
│ │ ├── useTasksV2.ts
│ │ ├── useTeammateViewAutoExit.ts
│ │ ├── useTeleportResume.tsx
│ │ ├── useTerminalSize.ts
│ │ ├── useTextInput.ts
│ │ ├── useTimeout.ts
│ │ ├── useTurnDiffs.ts
│ │ ├── useTypeahead.tsx
│ │ ├── useUpdateNotification.ts
│ │ ├── useVimInput.ts
│ │ ├── useVirtualScroll.ts
│ │ ├── useVoice.ts
│ │ ├── useVoiceEnabled.ts
│ │ └── useVoiceIntegration.tsx
│ ├── ink/
│ │ ├── Ansi.tsx
│ │ ├── bidi.ts
│ │ ├── clearTerminal.ts
│ │ ├── colorize.ts
│ │ ├── components/
│ │ │ ├── AlternateScreen.tsx
│ │ │ ├── App.tsx
│ │ │ ├── AppContext.ts
│ │ │ ├── Box.tsx
│ │ │ ├── Button.tsx
│ │ │ ├── ClockContext.tsx
│ │ │ ├── CursorDeclarationContext.ts
│ │ │ ├── ErrorOverview.tsx
│ │ │ ├── Link.tsx
│ │ │ ├── Newline.tsx
│ │ │ ├── NoSelect.tsx
│ │ │ ├── RawAnsi.tsx
│ │ │ ├── ScrollBox.tsx
│ │ │ ├── Spacer.tsx
│ │ │ ├── StdinContext.ts
│ │ │ ├── TerminalFocusContext.tsx
│ │ │ ├── TerminalSizeContext.tsx
│ │ │ └── Text.tsx
│ │ ├── constants.ts
│ │ ├── dom.ts
│ │ ├── events/
│ │ │ ├── click-event.ts
│ │ │ ├── dispatcher.ts
│ │ │ ├── emitter.ts
│ │ │ ├── event-handlers.ts
│ │ │ ├── event.ts
│ │ │ ├── focus-event.ts
│ │ │ ├── input-event.ts
│ │ │ ├── keyboard-event.ts
│ │ │ ├── terminal-event.ts
│ │ │ └── terminal-focus-event.ts
│ │ ├── focus.ts
│ │ ├── frame.ts
│ │ ├── get-max-width.ts
│ │ ├── hit-test.ts
│ │ ├── hooks/
│ │ │ ├── use-animation-frame.ts
│ │ │ ├── use-app.ts
│ │ │ ├── use-declared-cursor.ts
│ │ │ ├── use-input.ts
│ │ │ ├── use-interval.ts
│ │ │ ├── use-search-highlight.ts
│ │ │ ├── use-selection.ts
│ │ │ ├── use-stdin.ts
│ │ │ ├── use-tab-status.ts
│ │ │ ├── use-terminal-focus.ts
│ │ │ ├── use-terminal-title.ts
│ │ │ └── use-terminal-viewport.ts
│ │ ├── ink.tsx
│ │ ├── instances.ts
│ │ ├── layout/
│ │ │ ├── engine.ts
│ │ │ ├── geometry.ts
│ │ │ ├── node.ts
│ │ │ └── yoga.ts
│ │ ├── line-width-cache.ts
│ │ ├── log-update.ts
│ │ ├── measure-element.ts
│ │ ├── measure-text.ts
│ │ ├── node-cache.ts
│ │ ├── optimizer.ts
│ │ ├── output.ts
│ │ ├── parse-keypress.ts
│ │ ├── reconciler.ts
│ │ ├── render-border.ts
│ │ ├── render-node-to-output.ts
│ │ ├── render-to-screen.ts
│ │ ├── renderer.ts
│ │ ├── root.ts
│ │ ├── screen.ts
│ │ ├── searchHighlight.ts
│ │ ├── selection.ts
│ │ ├── squash-text-nodes.ts
│ │ ├── stringWidth.ts
│ │ ├── styles.ts
│ │ ├── supports-hyperlinks.ts
│ │ ├── tabstops.ts
│ │ ├── terminal-focus-state.ts
│ │ ├── terminal-querier.ts
│ │ ├── terminal.ts
│ │ ├── termio/
│ │ │ ├── ansi.ts
│ │ │ ├── csi.ts
│ │ │ ├── dec.ts
│ │ │ ├── esc.ts
│ │ │ ├── osc.ts
│ │ │ ├── parser.ts
│ │ │ ├── sgr.ts
│ │ │ ├── tokenize.ts
│ │ │ └── types.ts
│ │ ├── termio.ts
│ │ ├── useTerminalNotification.ts
│ │ ├── warn.ts
│ │ ├── widest-line.ts
│ │ ├── wrap-text.ts
│ │ └── wrapAnsi.ts
│ ├── ink.ts
│ ├── interactiveHelpers.tsx
│ ├── keybindings/
│ │ ├── KeybindingContext.tsx
│ │ ├── KeybindingProviderSetup.tsx
│ │ ├── defaultBindings.ts
│ │ ├── loadUserBindings.ts
│ │ ├── match.ts
│ │ ├── parser.ts
│ │ ├── reservedShortcuts.ts
│ │ ├── resolver.ts
│ │ ├── schema.ts
│ │ ├── shortcutFormat.ts
│ │ ├── template.ts
│ │ ├── useKeybinding.ts
│ │ ├── useShortcutDisplay.ts
│ │ └── validate.ts
│ ├── main.tsx
│ ├── memdir/
│ │ ├── findRelevantMemories.ts
│ │ ├── memdir.ts
│ │ ├── memoryAge.ts
│ │ ├── memoryScan.ts
│ │ ├── memoryTypes.ts
│ │ ├── paths.ts
│ │ ├── teamMemPaths.ts
│ │ └── teamMemPrompts.ts
│ ├── migrations/
│ │ ├── migrateAutoUpdatesToSettings.ts
│ │ ├── migrateBypassPermissionsAcceptedToSettings.ts
│ │ ├── migrateEnableAllProjectMcpServersToSettings.ts
│ │ ├── migrateFennecToOpus.ts
│ │ ├── migrateLegacyOpusToCurrent.ts
│ │ ├── migrateOpusToOpus1m.ts
│ │ ├── migrateReplBridgeEnabledToRemoteControlAtStartup.ts
│ │ ├── migrateSonnet1mToSonnet45.ts
│ │ ├── migrateSonnet45ToSonnet46.ts
│ │ ├── resetAutoModeOptInForDefaultOffer.ts
│ │ └── resetProToOpusDefault.ts
│ ├── moreright/
│ │ └── useMoreRight.tsx
│ ├── native-ts/
│ │ ├── color-diff/
│ │ │ └── index.ts
│ │ ├── file-index/
│ │ │ └── index.ts
│ │ └── yoga-layout/
│ │ ├── enums.ts
│ │ └── index.ts
│ ├── outputStyles/
│ │ └── loadOutputStylesDir.ts
│ ├── plugins/
│ │ ├── builtinPlugins.ts
│ │ └── bundled/
│ │ └── index.ts
│ ├── projectOnboardingState.ts
│ ├── query/
│ │ ├── config.ts
│ │ ├── deps.ts
│ │ ├── stopHooks.ts
│ │ └── tokenBudget.ts
│ ├── query.ts
│ ├── remote/
│ │ ├── RemoteSessionManager.ts
│ │ ├── SessionsWebSocket.ts
│ │ ├── remotePermissionBridge.ts
│ │ └── sdkMessageAdapter.ts
│ ├── replLauncher.tsx
│ ├── schemas/
│ │ └── hooks.ts
│ ├── screens/
│ │ ├── Doctor.tsx
│ │ ├── REPL.tsx
│ │ └── ResumeConversation.tsx
│ ├── server/
│ │ ├── createDirectConnectSession.ts
│ │ ├── directConnectManager.ts
│ │ └── types.ts
│ ├── services/
│ │ ├── AgentSummary/
│ │ │ └── agentSummary.ts
│ │ ├── MagicDocs/
│ │ │ ├── magicDocs.ts
│ │ │ └── prompts.ts
│ │ ├── PromptSuggestion/
│ │ │ ├── promptSuggestion.ts
│ │ │ └── speculation.ts
│ │ ├── SessionMemory/
│ │ │ ├── prompts.ts
│ │ │ ├── sessionMemory.ts
│ │ │ └── sessionMemoryUtils.ts
│ │ ├── analytics/
│ │ │ ├── config.ts
│ │ │ ├── datadog.ts
│ │ │ ├── firstPartyEventLogger.ts
│ │ │ ├── firstPartyEventLoggingExporter.ts
│ │ │ ├── growthbook.ts
│ │ │ ├── index.ts
│ │ │ ├── metadata.ts
│ │ │ ├── sink.ts
│ │ │ └── sinkKillswitch.ts
│ │ ├── api/
│ │ │ ├── adminRequests.ts
│ │ │ ├── bootstrap.ts
│ │ │ ├── claude.ts
│ │ │ ├── client.ts
│ │ │ ├── dumpPrompts.ts
│ │ │ ├── emptyUsage.ts
│ │ │ ├── errorUtils.ts
│ │ │ ├── errors.ts
│ │ │ ├── filesApi.ts
│ │ │ ├── firstTokenDate.ts
│ │ │ ├── grove.ts
│ │ │ ├── logging.ts
│ │ │ ├── metricsOptOut.ts
│ │ │ ├── overageCreditGrant.ts
│ │ │ ├── promptCacheBreakDetection.ts
│ │ │ ├── referral.ts
│ │ │ ├── sessionIngress.ts
│ │ │ ├── ultrareviewQuota.ts
│ │ │ ├── usage.ts
│ │ │ └── withRetry.ts
│ │ ├── autoDream/
│ │ │ ├── autoDream.ts
│ │ │ ├── config.ts
│ │ │ ├── consolidationLock.ts
│ │ │ └── consolidationPrompt.ts
│ │ ├── awaySummary.ts
│ │ ├── claudeAiLimits.ts
│ │ ├── claudeAiLimitsHook.ts
│ │ ├── compact/
│ │ │ ├── apiMicrocompact.ts
│ │ │ ├── autoCompact.ts
│ │ │ ├── compact.ts
│ │ │ ├── compactWarningHook.ts
│ │ │ ├── compactWarningState.ts
│ │ │ ├── grouping.ts
│ │ │ ├── microCompact.ts
│ │ │ ├── postCompactCleanup.ts
│ │ │ ├── prompt.ts
│ │ │ ├── sessionMemoryCompact.ts
│ │ │ └── timeBasedMCConfig.ts
│ │ ├── diagnosticTracking.ts
│ │ ├── extractMemories/
│ │ │ ├── extractMemories.ts
│ │ │ └── prompts.ts
│ │ ├── internalLogging.ts
│ │ ├── lsp/
│ │ │ ├── LSPClient.ts
│ │ │ ├── LSPDiagnosticRegistry.ts
│ │ │ ├── LSPServerInstance.ts
│ │ │ ├── LSPServerManager.ts
│ │ │ ├── config.ts
│ │ │ ├── manager.ts
│ │ │ └── passiveFeedback.ts
│ │ ├── mcp/
│ │ │ ├── InProcessTransport.ts
│ │ │ ├── MCPConnectionManager.tsx
│ │ │ ├── SdkControlTransport.ts
│ │ │ ├── auth.ts
│ │ │ ├── channelAllowlist.ts
│ │ │ ├── channelNotification.ts
│ │ │ ├── channelPermissions.ts
│ │ │ ├── claudeai.ts
│ │ │ ├── client.ts
│ │ │ ├── config.ts
│ │ │ ├── elicitationHandler.ts
│ │ │ ├── envExpansion.ts
│ │ │ ├── headersHelper.ts
│ │ │ ├── mcpStringUtils.ts
│ │ │ ├── normalization.ts
│ │ │ ├── oauthPort.ts
│ │ │ ├── officialRegistry.ts
│ │ │ ├── types.ts
│ │ │ ├── useManageMCPConnections.ts
│ │ │ ├── utils.ts
│ │ │ ├── vscodeSdkMcp.ts
│ │ │ ├── xaa.ts
│ │ │ └── xaaIdpLogin.ts
│ │ ├── mcpServerApproval.tsx
│ │ ├── mockRateLimits.ts
│ │ ├── notifier.ts
│ │ ├── oauth/
│ │ │ ├── auth-code-listener.ts
│ │ │ ├── client.ts
│ │ │ ├── crypto.ts
│ │ │ ├── getOauthProfile.ts
│ │ │ └── index.ts
│ │ ├── plugins/
│ │ │ ├── PluginInstallationManager.ts
│ │ │ ├── pluginCliCommands.ts
│ │ │ └── pluginOperations.ts
│ │ ├── policyLimits/
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ ├── preventSleep.ts
│ │ ├── rateLimitMessages.ts
│ │ ├── rateLimitMocking.ts
│ │ ├── remoteManagedSettings/
│ │ │ ├── index.ts
│ │ │ ├── securityCheck.tsx
│ │ │ ├── syncCache.ts
│ │ │ ├── syncCacheState.ts
│ │ │ └── types.ts
│ │ ├── settingsSync/
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ ├── teamMemorySync/
│ │ │ ├── index.ts
│ │ │ ├── secretScanner.ts
│ │ │ ├── teamMemSecretGuard.ts
│ │ │ ├── types.ts
│ │ │ └── watcher.ts
│ │ ├── tips/
│ │ │ ├── tipHistory.ts
│ │ │ ├── tipRegistry.ts
│ │ │ └── tipScheduler.ts
│ │ ├── tokenEstimation.ts
│ │ ├── toolUseSummary/
│ │ │ └── toolUseSummaryGenerator.ts
│ │ ├── tools/
│ │ │ ├── StreamingToolExecutor.ts
│ │ │ ├── toolExecution.ts
│ │ │ ├── toolHooks.ts
│ │ │ └── toolOrchestration.ts
│ │ ├── vcr.ts
│ │ ├── voice.ts
│ │ ├── voiceKeyterms.ts
│ │ └── voiceStreamSTT.ts
│ ├── setup.ts
│ ├── skills/
│ │ ├── bundled/
│ │ │ ├── batch.ts
│ │ │ ├── claudeApi.ts
│ │ │ ├── claudeApiContent.ts
│ │ │ ├── claudeInChrome.ts
│ │ │ ├── debug.ts
│ │ │ ├── index.ts
│ │ │ ├── keybindings.ts
│ │ │ ├── loop.ts
│ │ │ ├── loremIpsum.ts
│ │ │ ├── remember.ts
│ │ │ ├── scheduleRemoteAgents.ts
│ │ │ ├── simplify.ts
│ │ │ ├── skillify.ts
│ │ │ ├── stuck.ts
│ │ │ ├── updateConfig.ts
│ │ │ ├── verify.ts
│ │ │ └── verifyContent.ts
│ │ ├── bundledSkills.ts
│ │ ├── loadSkillsDir.ts
│ │ └── mcpSkillBuilders.ts
│ ├── state/
│ │ ├── AppState.tsx
│ │ ├── AppStateStore.ts
│ │ ├── onChangeAppState.ts
│ │ ├── selectors.ts
│ │ ├── store.ts
│ │ └── teammateViewHelpers.ts
│ ├── tasks/
│ │ ├── DreamTask/
│ │ │ └── DreamTask.ts
│ │ ├── InProcessTeammateTask/
│ │ │ ├── InProcessTeammateTask.tsx
│ │ │ └── types.ts
│ │ ├── LocalAgentTask/
│ │ │ └── LocalAgentTask.tsx
│ │ ├── LocalMainSessionTask.ts
│ │ ├── LocalShellTask/
│ │ │ ├── LocalShellTask.tsx
│ │ │ ├── guards.ts
│ │ │ └── killShellTasks.ts
│ │ ├── RemoteAgentTask/
│ │ │ └── RemoteAgentTask.tsx
│ │ ├── pillLabel.ts
│ │ ├── stopTask.ts
│ │ └── types.ts
│ ├── tasks.ts
│ ├── tools/
│ │ ├── AgentTool/
│ │ │ ├── AgentTool.tsx
│ │ │ ├── UI.tsx
│ │ │ ├── agentColorManager.ts
│ │ │ ├── agentDisplay.ts
│ │ │ ├── agentMemory.ts
│ │ │ ├── agentMemorySnapshot.ts
│ │ │ ├── agentToolUtils.ts
│ │ │ ├── built-in/
│ │ │ │ ├── claudeCodeGuideAgent.ts
│ │ │ │ ├── exploreAgent.ts
│ │ │ │ ├── generalPurposeAgent.ts
│ │ │ │ ├── planAgent.ts
│ │ │ │ ├── statuslineSetup.ts
│ │ │ │ └── verificationAgent.ts
│ │ │ ├── builtInAgents.ts
│ │ │ ├── constants.ts
│ │ │ ├── forkSubagent.ts
│ │ │ ├── loadAgentsDir.ts
│ │ │ ├── prompt.ts
│ │ │ ├── resumeAgent.ts
│ │ │ └── runAgent.ts
│ │ ├── AskUserQuestionTool/
│ │ │ ├── AskUserQuestionTool.tsx
│ │ │ └── prompt.ts
│ │ ├── BashTool/
│ │ │ ├── BashTool.tsx
│ │ │ ├── BashToolResultMessage.tsx
│ │ │ ├── UI.tsx
│ │ │ ├── bashCommandHelpers.ts
│ │ │ ├── bashPermissions.ts
│ │ │ ├── bashSecurity.ts
│ │ │ ├── commandSemantics.ts
│ │ │ ├── commentLabel.ts
│ │ │ ├── destructiveCommandWarning.ts
│ │ │ ├── modeValidation.ts
│ │ │ ├── pathValidation.ts
│ │ │ ├── prompt.ts
│ │ │ ├── readOnlyValidation.ts
│ │ │ ├── sedEditParser.ts
│ │ │ ├── sedValidation.ts
│ │ │ ├── shouldUseSandbox.ts
│ │ │ ├── toolName.ts
│ │ │ └── utils.ts
│ │ ├── BriefTool/
│ │ │ ├── BriefTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── attachments.ts
│ │ │ ├── prompt.ts
│ │ │ └── upload.ts
│ │ ├── ConfigTool/
│ │ │ ├── ConfigTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ ├── prompt.ts
│ │ │ └── supportedSettings.ts
│ │ ├── EnterPlanModeTool/
│ │ │ ├── EnterPlanModeTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── EnterWorktreeTool/
│ │ │ ├── EnterWorktreeTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── ExitPlanModeTool/
│ │ │ ├── ExitPlanModeV2Tool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── ExitWorktreeTool/
│ │ │ ├── ExitWorktreeTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── FileEditTool/
│ │ │ ├── FileEditTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ ├── prompt.ts
│ │ │ ├── types.ts
│ │ │ └── utils.ts
│ │ ├── FileReadTool/
│ │ │ ├── FileReadTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── imageProcessor.ts
│ │ │ ├── limits.ts
│ │ │ └── prompt.ts
│ │ ├── FileWriteTool/
│ │ │ ├── FileWriteTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── GlobTool/
│ │ │ ├── GlobTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── GrepTool/
│ │ │ ├── GrepTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── LSPTool/
│ │ │ ├── LSPTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── formatters.ts
│ │ │ ├── prompt.ts
│ │ │ ├── schemas.ts
│ │ │ └── symbolContext.ts
│ │ ├── ListMcpResourcesTool/
│ │ │ ├── ListMcpResourcesTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── MCPTool/
│ │ │ ├── MCPTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── classifyForCollapse.ts
│ │ │ └── prompt.ts
│ │ ├── McpAuthTool/
│ │ │ └── McpAuthTool.ts
│ │ ├── NotebookEditTool/
│ │ │ ├── NotebookEditTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── PowerShellTool/
│ │ │ ├── PowerShellTool.tsx
│ │ │ ├── UI.tsx
│ │ │ ├── clmTypes.ts
│ │ │ ├── commandSemantics.ts
│ │ │ ├── commonParameters.ts
│ │ │ ├── destructiveCommandWarning.ts
│ │ │ ├── gitSafety.ts
│ │ │ ├── modeValidation.ts
│ │ │ ├── pathValidation.ts
│ │ │ ├── powershellPermissions.ts
│ │ │ ├── powershellSecurity.ts
│ │ │ ├── prompt.ts
│ │ │ ├── readOnlyValidation.ts
│ │ │ └── toolName.ts
│ │ ├── REPLTool/
│ │ │ ├── constants.ts
│ │ │ └── primitiveTools.ts
│ │ ├── ReadMcpResourceTool/
│ │ │ ├── ReadMcpResourceTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── RemoteTriggerTool/
│ │ │ ├── RemoteTriggerTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── ScheduleCronTool/
│ │ │ ├── CronCreateTool.ts
│ │ │ ├── CronDeleteTool.ts
│ │ │ ├── CronListTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── SendMessageTool/
│ │ │ ├── SendMessageTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── SkillTool/
│ │ │ ├── SkillTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── SleepTool/
│ │ │ └── prompt.ts
│ │ ├── SyntheticOutputTool/
│ │ │ └── SyntheticOutputTool.ts
│ │ ├── TaskCreateTool/
│ │ │ ├── TaskCreateTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TaskGetTool/
│ │ │ ├── TaskGetTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TaskListTool/
│ │ │ ├── TaskListTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TaskOutputTool/
│ │ │ ├── TaskOutputTool.tsx
│ │ │ └── constants.ts
│ │ ├── TaskStopTool/
│ │ │ ├── TaskStopTool.ts
│ │ │ ├── UI.tsx
│ │ │ └── prompt.ts
│ │ ├── TaskUpdateTool/
│ │ │ ├── TaskUpdateTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TeamCreateTool/
│ │ │ ├── TeamCreateTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TeamDeleteTool/
│ │ │ ├── TeamDeleteTool.ts
│ │ │ ├── UI.tsx
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── TodoWriteTool/
│ │ │ ├── TodoWriteTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── ToolSearchTool/
│ │ │ ├── ToolSearchTool.ts
│ │ │ ├── constants.ts
│ │ │ └── prompt.ts
│ │ ├── WebFetchTool/
│ │ │ ├── UI.tsx
│ │ │ ├── WebFetchTool.ts
│ │ │ ├── preapproved.ts
│ │ │ ├── prompt.ts
│ │ │ └── utils.ts
│ │ ├── WebSearchTool/
│ │ │ ├── UI.tsx
│ │ │ ├── WebSearchTool.ts
│ │ │ └── prompt.ts
│ │ ├── shared/
│ │ │ ├── gitOperationTracking.ts
│ │ │ └── spawnMultiAgent.ts
│ │ ├── testing/
│ │ │ └── TestingPermissionTool.tsx
│ │ └── utils.ts
│ ├── tools.ts
│ ├── types/
│ │ ├── command.ts
│ │ ├── generated/
│ │ │ ├── events_mono/
│ │ │ │ ├── claude_code/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── claude_code_internal_event.ts
│ │ │ │ ├── common/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── auth.ts
│ │ │ │ └── growthbook/
│ │ │ │ └── v1/
│ │ │ │ └── growthbook_experiment_event.ts
│ │ │ └── google/
│ │ │ └── protobuf/
│ │ │ └── timestamp.ts
│ │ ├── hooks.ts
│ │ ├── ids.ts
│ │ ├── logs.ts
│ │ ├── permissions.ts
│ │ ├── plugin.ts
│ │ └── textInputTypes.ts
│ ├── upstreamproxy/
│ │ ├── relay.ts
│ │ └── upstreamproxy.ts
│ ├── utils/
│ │ ├── CircularBuffer.ts
│ │ ├── Cursor.ts
│ │ ├── QueryGuard.ts
│ │ ├── Shell.ts
│ │ ├── ShellCommand.ts
│ │ ├── abortController.ts
│ │ ├── activityManager.ts
│ │ ├── advisor.ts
│ │ ├── agentContext.ts
│ │ ├── agentId.ts
│ │ ├── agentSwarmsEnabled.ts
│ │ ├── agenticSessionSearch.ts
│ │ ├── analyzeContext.ts
│ │ ├── ansiToPng.ts
│ │ ├── ansiToSvg.ts
│ │ ├── api.ts
│ │ ├── apiPreconnect.ts
│ │ ├── appleTerminalBackup.ts
│ │ ├── argumentSubstitution.ts
│ │ ├── array.ts
│ │ ├── asciicast.ts
│ │ ├── attachments.ts
│ │ ├── attribution.ts
│ │ ├── auth.ts
│ │ ├── authFileDescriptor.ts
│ │ ├── authPortable.ts
│ │ ├── autoModeDenials.ts
│ │ ├── autoRunIssue.tsx
│ │ ├── autoUpdater.ts
│ │ ├── aws.ts
│ │ ├── awsAuthStatusManager.ts
│ │ ├── background/
│ │ │ └── remote/
│ │ │ ├── preconditions.ts
│ │ │ └── remoteSession.ts
│ │ ├── backgroundHousekeeping.ts
│ │ ├── bash/
│ │ │ ├── ParsedCommand.ts
│ │ │ ├── ShellSnapshot.ts
│ │ │ ├── ast.ts
│ │ │ ├── bashParser.ts
│ │ │ ├── bashPipeCommand.ts
│ │ │ ├── commands.ts
│ │ │ ├── heredoc.ts
│ │ │ ├── parser.ts
│ │ │ ├── prefix.ts
│ │ │ ├── registry.ts
│ │ │ ├── shellCompletion.ts
│ │ │ ├── shellPrefix.ts
│ │ │ ├── shellQuote.ts
│ │ │ ├── shellQuoting.ts
│ │ │ ├── specs/
│ │ │ │ ├── alias.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── nohup.ts
│ │ │ │ ├── pyright.ts
│ │ │ │ ├── sleep.ts
│ │ │ │ ├── srun.ts
│ │ │ │ ├── time.ts
│ │ │ │ └── timeout.ts
│ │ │ └── treeSitterAnalysis.ts
│ │ ├── betas.ts
│ │ ├── billing.ts
│ │ ├── binaryCheck.ts
│ │ ├── browser.ts
│ │ ├── bufferedWriter.ts
│ │ ├── bundledMode.ts
│ │ ├── caCerts.ts
│ │ ├── caCertsConfig.ts
│ │ ├── cachePaths.ts
│ │ ├── classifierApprovals.ts
│ │ ├── classifierApprovalsHook.ts
│ │ ├── claudeCodeHints.ts
│ │ ├── claudeDesktop.ts
│ │ ├── claudeInChrome/
│ │ │ ├── chromeNativeHost.ts
│ │ │ ├── common.ts
│ │ │ ├── mcpServer.ts
│ │ │ ├── prompt.ts
│ │ │ ├── setup.ts
│ │ │ ├── setupPortable.ts
│ │ │ └── toolRendering.tsx
│ │ ├── claudemd.ts
│ │ ├── cleanup.ts
│ │ ├── cleanupRegistry.ts
│ │ ├── cliArgs.ts
│ │ ├── cliHighlight.ts
│ │ ├── codeIndexing.ts
│ │ ├── collapseBackgroundBashNotifications.ts
│ │ ├── collapseHookSummaries.ts
│ │ ├── collapseReadSearch.ts
│ │ ├── collapseTeammateShutdowns.ts
│ │ ├── combinedAbortSignal.ts
│ │ ├── commandLifecycle.ts
│ │ ├── commitAttribution.ts
│ │ ├── completionCache.ts
│ │ ├── computerUse/
│ │ │ ├── appNames.ts
│ │ │ ├── cleanup.ts
│ │ │ ├── common.ts
│ │ │ ├── computerUseLock.ts
│ │ │ ├── drainRunLoop.ts
│ │ │ ├── escHotkey.ts
│ │ │ ├── executor.ts
│ │ │ ├── gates.ts
│ │ │ ├── hostAdapter.ts
│ │ │ ├── inputLoader.ts
│ │ │ ├── mcpServer.ts
│ │ │ ├── setup.ts
│ │ │ ├── swiftLoader.ts
│ │ │ ├── toolRendering.tsx
│ │ │ └── wrapper.tsx
│ │ ├── concurrentSessions.ts
│ │ ├── config.ts
│ │ ├── configConstants.ts
│ │ ├── contentArray.ts
│ │ ├── context.ts
│ │ ├── contextAnalysis.ts
│ │ ├── contextSuggestions.ts
│ │ ├── controlMessageCompat.ts
│ │ ├── conversationRecovery.ts
│ │ ├── cron.ts
│ │ ├── cronJitterConfig.ts
│ │ ├── cronScheduler.ts
│ │ ├── cronTasks.ts
│ │ ├── cronTasksLock.ts
│ │ ├── crossProjectResume.ts
│ │ ├── crypto.ts
│ │ ├── cwd.ts
│ │ ├── debug.ts
│ │ ├── debugFilter.ts
│ │ ├── deepLink/
│ │ │ ├── banner.ts
│ │ │ ├── parseDeepLink.ts
│ │ │ ├── protocolHandler.ts
│ │ │ ├── registerProtocol.ts
│ │ │ ├── terminalLauncher.ts
│ │ │ └── terminalPreference.ts
│ │ ├── desktopDeepLink.ts
│ │ ├── detectRepository.ts
│ │ ├── diagLogs.ts
│ │ ├── diff.ts
│ │ ├── directMemberMessage.ts
│ │ ├── displayTags.ts
│ │ ├── doctorContextWarnings.ts
│ │ ├── doctorDiagnostic.ts
│ │ ├── dxt/
│ │ │ ├── helpers.ts
│ │ │ └── zip.ts
│ │ ├── earlyInput.ts
│ │ ├── editor.ts
│ │ ├── effort.ts
│ │ ├── embeddedTools.ts
│ │ ├── env.ts
│ │ ├── envDynamic.ts
│ │ ├── envUtils.ts
│ │ ├── envValidation.ts
│ │ ├── errorLogSink.ts
│ │ ├── errors.ts
│ │ ├── exampleCommands.ts
│ │ ├── execFileNoThrow.ts
│ │ ├── execFileNoThrowPortable.ts
│ │ ├── execSyncWrapper.ts
│ │ ├── exportRenderer.tsx
│ │ ├── extraUsage.ts
│ │ ├── fastMode.ts
│ │ ├── file.ts
│ │ ├── fileHistory.ts
│ │ ├── fileOperationAnalytics.ts
│ │ ├── filePersistence/
│ │ │ ├── filePersistence.ts
│ │ │ └── outputsScanner.ts
│ │ ├── fileRead.ts
│ │ ├── fileReadCache.ts
│ │ ├── fileStateCache.ts
│ │ ├── findExecutable.ts
│ │ ├── fingerprint.ts
│ │ ├── forkedAgent.ts
│ │ ├── format.ts
│ │ ├── formatBriefTimestamp.ts
│ │ ├── fpsTracker.ts
│ │ ├── frontmatterParser.ts
│ │ ├── fsOperations.ts
│ │ ├── fullscreen.ts
│ │ ├── generatedFiles.ts
│ │ ├── generators.ts
│ │ ├── genericProcessUtils.ts
│ │ ├── getWorktreePaths.ts
│ │ ├── getWorktreePathsPortable.ts
│ │ ├── ghPrStatus.ts
│ │ ├── git/
│ │ │ ├── gitConfigParser.ts
│ │ │ ├── gitFilesystem.ts
│ │ │ └── gitignore.ts
│ │ ├── git.ts
│ │ ├── gitDiff.ts
│ │ ├── gitSettings.ts
│ │ ├── github/
│ │ │ └── ghAuthStatus.ts
│ │ ├── githubRepoPathMapping.ts
│ │ ├── glob.ts
│ │ ├── gracefulShutdown.ts
│ │ ├── groupToolUses.ts
│ │ ├── handlePromptSubmit.ts
│ │ ├── hash.ts
│ │ ├── headlessProfiler.ts
│ │ ├── heapDumpService.ts
│ │ ├── heatmap.ts
│ │ ├── highlightMatch.tsx
│ │ ├── hooks/
│ │ │ ├── AsyncHookRegistry.ts
│ │ │ ├── apiQueryHookHelper.ts
│ │ │ ├── execAgentHook.ts
│ │ │ ├── execHttpHook.ts
│ │ │ ├── execPromptHook.ts
│ │ │ ├── fileChangedWatcher.ts
│ │ │ ├── hookEvents.ts
│ │ │ ├── hookHelpers.ts
│ │ │ ├── hooksConfigManager.ts
│ │ │ ├── hooksConfigSnapshot.ts
│ │ │ ├── hooksSettings.ts
│ │ │ ├── postSamplingHooks.ts
│ │ │ ├── registerFrontmatterHooks.ts
│ │ │ ├── registerSkillHooks.ts
│ │ │ ├── sessionHooks.ts
│ │ │ ├── skillImprovement.ts
│ │ │ └── ssrfGuard.ts
│ │ ├── hooks.ts
│ │ ├── horizontalScroll.ts
│ │ ├── http.ts
│ │ ├── hyperlink.ts
│ │ ├── iTermBackup.ts
│ │ ├── ide.ts
│ │ ├── idePathConversion.ts
│ │ ├── idleTimeout.ts
│ │ ├── imagePaste.ts
│ │ ├── imageResizer.ts
│ │ ├── imageStore.ts
│ │ ├── imageValidation.ts
│ │ ├── immediateCommand.ts
│ │ ├── inProcessTeammateHelpers.ts
│ │ ├── ink.ts
│ │ ├── intl.ts
│ │ ├── jetbrains.ts
│ │ ├── json.ts
│ │ ├── jsonRead.ts
│ │ ├── keyboardShortcuts.ts
│ │ ├── lazySchema.ts
│ │ ├── listSessionsImpl.ts
│ │ ├── localInstaller.ts
│ │ ├── lockfile.ts
│ │ ├── log.ts
│ │ ├── logoV2Utils.ts
│ │ ├── mailbox.ts
│ │ ├── managedEnv.ts
│ │ ├── managedEnvConstants.ts
│ │ ├── markdown.ts
│ │ ├── markdownConfigLoader.ts
│ │ ├── mcp/
│ │ │ ├── dateTimeParser.ts
│ │ │ └── elicitationValidation.ts
│ │ ├── mcpInstructionsDelta.ts
│ │ ├── mcpOutputStorage.ts
│ │ ├── mcpValidation.ts
│ │ ├── mcpWebSocketTransport.ts
│ │ ├── memoize.ts
│ │ ├── memory/
│ │ │ ├── types.ts
│ │ │ └── versions.ts
│ │ ├── memoryFileDetection.ts
│ │ ├── messagePredicates.ts
│ │ ├── messageQueueManager.ts
│ │ ├── messages/
│ │ │ ├── mappers.ts
│ │ │ └── systemInit.ts
│ │ ├── messages.ts
│ │ ├── model/
│ │ │ ├── agent.ts
│ │ │ ├── aliases.ts
│ │ │ ├── antModels.ts
│ │ │ ├── bedrock.ts
│ │ │ ├── check1mAccess.ts
│ │ │ ├── configs.ts
│ │ │ ├── contextWindowUpgradeCheck.ts
│ │ │ ├── deprecation.ts
│ │ │ ├── model.ts
│ │ │ ├── modelAllowlist.ts
│ │ │ ├── modelCapabilities.ts
│ │ │ ├── modelOptions.ts
│ │ │ ├── modelStrings.ts
│ │ │ ├── modelSupportOverrides.ts
│ │ │ ├── providers.ts
│ │ │ └── validateModel.ts
│ │ ├── modelCost.ts
│ │ ├── modifiers.ts
│ │ ├── mtls.ts
│ │ ├── nativeInstaller/
│ │ │ ├── download.ts
│ │ │ ├── index.ts
│ │ │ ├── installer.ts
│ │ │ ├── packageManagers.ts
│ │ │ └── pidLock.ts
│ │ ├── notebook.ts
│ │ ├── objectGroupBy.ts
│ │ ├── pasteStore.ts
│ │ ├── path.ts
│ │ ├── pdf.ts
│ │ ├── pdfUtils.ts
│ │ ├── peerAddress.ts
│ │ ├── permissions/
│ │ │ ├── PermissionMode.ts
│ │ │ ├── PermissionPromptToolResultSchema.ts
│ │ │ ├── PermissionResult.ts
│ │ │ ├── PermissionRule.ts
│ │ │ ├── PermissionUpdate.ts
│ │ │ ├── PermissionUpdateSchema.ts
│ │ │ ├── autoModeState.ts
│ │ │ ├── bashClassifier.ts
│ │ │ ├── bypassPermissionsKillswitch.ts
│ │ │ ├── classifierDecision.ts
│ │ │ ├── classifierShared.ts
│ │ │ ├── dangerousPatterns.ts
│ │ │ ├── denialTracking.ts
│ │ │ ├── filesystem.ts
│ │ │ ├── getNextPermissionMode.ts
│ │ │ ├── pathValidation.ts
│ │ │ ├── permissionExplainer.ts
│ │ │ ├── permissionRuleParser.ts
│ │ │ ├── permissionSetup.ts
│ │ │ ├── permissions.ts
│ │ │ ├── permissionsLoader.ts
│ │ │ ├── shadowedRuleDetection.ts
│ │ │ ├── shellRuleMatching.ts
│ │ │ └── yoloClassifier.ts
│ │ ├── planModeV2.ts
│ │ ├── plans.ts
│ │ ├── platform.ts
│ │ ├── plugins/
│ │ │ ├── addDirPluginSettings.ts
│ │ │ ├── cacheUtils.ts
│ │ │ ├── dependencyResolver.ts
│ │ │ ├── fetchTelemetry.ts
│ │ │ ├── gitAvailability.ts
│ │ │ ├── headlessPluginInstall.ts
│ │ │ ├── hintRecommendation.ts
│ │ │ ├── installCounts.ts
│ │ │ ├── installedPluginsManager.ts
│ │ │ ├── loadPluginAgents.ts
│ │ │ ├── loadPluginCommands.ts
│ │ │ ├── loadPluginHooks.ts
│ │ │ ├── loadPluginOutputStyles.ts
│ │ │ ├── lspPluginIntegration.ts
│ │ │ ├── lspRecommendation.ts
│ │ │ ├── managedPlugins.ts
│ │ │ ├── marketplaceHelpers.ts
│ │ │ ├── marketplaceManager.ts
│ │ │ ├── mcpPluginIntegration.ts
│ │ │ ├── mcpbHandler.ts
│ │ │ ├── officialMarketplace.ts
│ │ │ ├── officialMarketplaceGcs.ts
│ │ │ ├── officialMarketplaceStartupCheck.ts
│ │ │ ├── orphanedPluginFilter.ts
│ │ │ ├── parseMarketplaceInput.ts
│ │ │ ├── performStartupChecks.tsx
│ │ │ ├── pluginAutoupdate.ts
│ │ │ ├── pluginBlocklist.ts
│ │ │ ├── pluginDirectories.ts
│ │ │ ├── pluginFlagging.ts
│ │ │ ├── pluginIdentifier.ts
│ │ │ ├── pluginInstallationHelpers.ts
│ │ │ ├── pluginLoader.ts
│ │ │ ├── pluginOptionsStorage.ts
│ │ │ ├── pluginPolicy.ts
│ │ │ ├── pluginStartupCheck.ts
│ │ │ ├── pluginVersioning.ts
│ │ │ ├── reconciler.ts
│ │ │ ├── refresh.ts
│ │ │ ├── schemas.ts
│ │ │ ├── validatePlugin.ts
│ │ │ ├── walkPluginMarkdown.ts
│ │ │ ├── zipCache.ts
│ │ │ └── zipCacheAdapters.ts
│ │ ├── powershell/
│ │ │ ├── dangerousCmdlets.ts
│ │ │ ├── parser.ts
│ │ │ └── staticPrefix.ts
│ │ ├── preflightChecks.tsx
│ │ ├── privacyLevel.ts
│ │ ├── process.ts
│ │ ├── processUserInput/
│ │ │ ├── processBashCommand.tsx
│ │ │ ├── processSlashCommand.tsx
│ │ │ ├── processTextPrompt.ts
│ │ │ └── processUserInput.ts
│ │ ├── profilerBase.ts
│ │ ├── promptCategory.ts
│ │ ├── promptEditor.ts
│ │ ├── promptShellExecution.ts
│ │ ├── proxy.ts
│ │ ├── queryContext.ts
│ │ ├── queryHelpers.ts
│ │ ├── queryProfiler.ts
│ │ ├── queueProcessor.ts
│ │ ├── readEditContext.ts
│ │ ├── readFileInRange.ts
│ │ ├── releaseNotes.ts
│ │ ├── renderOptions.ts
│ │ ├── ripgrep.ts
│ │ ├── sandbox/
│ │ │ ├── sandbox-adapter.ts
│ │ │ └── sandbox-ui-utils.ts
│ │ ├── sanitization.ts
│ │ ├── screenshotClipboard.ts
│ │ ├── sdkEventQueue.ts
│ │ ├── secureStorage/
│ │ │ ├── fallbackStorage.ts
│ │ │ ├── index.ts
│ │ │ ├── keychainPrefetch.ts
│ │ │ ├── macOsKeychainHelpers.ts
│ │ │ ├── macOsKeychainStorage.ts
│ │ │ └── plainTextStorage.ts
│ │ ├── semanticBoolean.ts
│ │ ├── semanticNumber.ts
│ │ ├── semver.ts
│ │ ├── sequential.ts
│ │ ├── sessionActivity.ts
│ │ ├── sessionEnvVars.ts
│ │ ├── sessionEnvironment.ts
│ │ ├── sessionFileAccessHooks.ts
│ │ ├── sessionIngressAuth.ts
│ │ ├── sessionRestore.ts
│ │ ├── sessionStart.ts
│ │ ├── sessionState.ts
│ │ ├── sessionStorage.ts
│ │ ├── sessionStoragePortable.ts
│ │ ├── sessionTitle.ts
│ │ ├── sessionUrl.ts
│ │ ├── set.ts
│ │ ├── settings/
│ │ │ ├── allErrors.ts
│ │ │ ├── applySettingsChange.ts
│ │ │ ├── changeDetector.ts
│ │ │ ├── constants.ts
│ │ │ ├── internalWrites.ts
│ │ │ ├── managedPath.ts
│ │ │ ├── mdm/
│ │ │ │ ├── constants.ts
│ │ │ │ ├── rawRead.ts
│ │ │ │ └── settings.ts
│ │ │ ├── permissionValidation.ts
│ │ │ ├── pluginOnlyPolicy.ts
│ │ │ ├── schemaOutput.ts
│ │ │ ├── settings.ts
│ │ │ ├── settingsCache.ts
│ │ │ ├── toolValidationConfig.ts
│ │ │ ├── types.ts
│ │ │ ├── validateEditTool.ts
│ │ │ ├── validation.ts
│ │ │ └── validationTips.ts
│ │ ├── shell/
│ │ │ ├── bashProvider.ts
│ │ │ ├── outputLimits.ts
│ │ │ ├── powershellDetection.ts
│ │ │ ├── powershellProvider.ts
│ │ │ ├── prefix.ts
│ │ │ ├── readOnlyCommandValidation.ts
│ │ │ ├── resolveDefaultShell.ts
│ │ │ ├── shellProvider.ts
│ │ │ ├── shellToolUtils.ts
│ │ │ └── specPrefix.ts
│ │ ├── shellConfig.ts
│ │ ├── sideQuery.ts
│ │ ├── sideQuestion.ts
│ │ ├── signal.ts
│ │ ├── sinks.ts
│ │ ├── skills/
│ │ │ └── skillChangeDetector.ts
│ │ ├── slashCommandParsing.ts
│ │ ├── sleep.ts
│ │ ├── sliceAnsi.ts
│ │ ├── slowOperations.ts
│ │ ├── standaloneAgent.ts
│ │ ├── startupProfiler.ts
│ │ ├── staticRender.tsx
│ │ ├── stats.ts
│ │ ├── statsCache.ts
│ │ ├── status.tsx
│ │ ├── statusNoticeDefinitions.tsx
│ │ ├── statusNoticeHelpers.ts
│ │ ├── stream.ts
│ │ ├── streamJsonStdoutGuard.ts
│ │ ├── streamlinedTransform.ts
│ │ ├── stringUtils.ts
│ │ ├── subprocessEnv.ts
│ │ ├── suggestions/
│ │ │ ├── commandSuggestions.ts
│ │ │ ├── directoryCompletion.ts
│ │ │ ├── shellHistoryCompletion.ts
│ │ │ ├── skillUsageTracking.ts
│ │ │ └── slackChannelSuggestions.ts
│ │ ├── swarm/
│ │ │ ├── It2SetupPrompt.tsx
│ │ │ ├── backends/
│ │ │ │ ├── ITermBackend.ts
│ │ │ │ ├── InProcessBackend.ts
│ │ │ │ ├── PaneBackendExecutor.ts
│ │ │ │ ├── TmuxBackend.ts
│ │ │ │ ├── detection.ts
│ │ │ │ ├── it2Setup.ts
│ │ │ │ ├── registry.ts
│ │ │ │ ├── teammateModeSnapshot.ts
│ │ │ │ └── types.ts
│ │ │ ├── constants.ts
│ │ │ ├── inProcessRunner.ts
│ │ │ ├── leaderPermissionBridge.ts
│ │ │ ├── permissionSync.ts
│ │ │ ├── reconnection.ts
│ │ │ ├── spawnInProcess.ts
│ │ │ ├── spawnUtils.ts
│ │ │ ├── teamHelpers.ts
│ │ │ ├── teammateInit.ts
│ │ │ ├── teammateLayoutManager.ts
│ │ │ ├── teammateModel.ts
│ │ │ └── teammatePromptAddendum.ts
│ │ ├── systemDirectories.ts
│ │ ├── systemPrompt.ts
│ │ ├── systemPromptType.ts
│ │ ├── systemTheme.ts
│ │ ├── taggedId.ts
│ │ ├── task/
│ │ │ ├── TaskOutput.ts
│ │ │ ├── diskOutput.ts
│ │ │ ├── framework.ts
│ │ │ ├── outputFormatting.ts
│ │ │ └── sdkProgress.ts
│ │ ├── tasks.ts
│ │ ├── teamDiscovery.ts
│ │ ├── teamMemoryOps.ts
│ │ ├── teammate.ts
│ │ ├── teammateContext.ts
│ │ ├── teammateMailbox.ts
│ │ ├── telemetry/
│ │ │ ├── betaSessionTracing.ts
│ │ │ ├── bigqueryExporter.ts
│ │ │ ├── events.ts
│ │ │ ├── instrumentation.ts
│ │ │ ├── logger.ts
│ │ │ ├── perfettoTracing.ts
│ │ │ ├── pluginTelemetry.ts
│ │ │ ├── sessionTracing.ts
│ │ │ └── skillLoadedEvent.ts
│ │ ├── telemetryAttributes.ts
│ │ ├── teleport/
│ │ │ ├── api.ts
│ │ │ ├── environmentSelection.ts
│ │ │ ├── environments.ts
│ │ │ └── gitBundle.ts
│ │ ├── teleport.tsx
│ │ ├── tempfile.ts
│ │ ├── terminal.ts
│ │ ├── terminalPanel.ts
│ │ ├── textHighlighting.ts
│ │ ├── theme.ts
│ │ ├── thinking.ts
│ │ ├── timeouts.ts
│ │ ├── tmuxSocket.ts
│ │ ├── todo/
│ │ │ └── types.ts
│ │ ├── tokenBudget.ts
│ │ ├── tokens.ts
│ │ ├── toolErrors.ts
│ │ ├── toolPool.ts
│ │ ├── toolResultStorage.ts
│ │ ├── toolSchemaCache.ts
│ │ ├── toolSearch.ts
│ │ ├── transcriptSearch.ts
│ │ ├── treeify.ts
│ │ ├── truncate.ts
│ │ ├── ultraplan/
│ │ │ ├── ccrSession.ts
│ │ │ └── keyword.ts
│ │ ├── unaryLogging.ts
│ │ ├── undercover.ts
│ │ ├── user.ts
│ │ ├── userAgent.ts
│ │ ├── userPromptKeywords.ts
│ │ ├── uuid.ts
│ │ ├── warningHandler.ts
│ │ ├── which.ts
│ │ ├── windowsPaths.ts
│ │ ├── withResolvers.ts
│ │ ├── words.ts
│ │ ├── workloadContext.ts
│ │ ├── worktree.ts
│ │ ├── worktreeModeEnabled.ts
│ │ ├── xdg.ts
│ │ ├── xml.ts
│ │ ├── yaml.ts
│ │ └── zodToJsonSchema.ts
│ ├── vim/
│ │ ├── motions.ts
│ │ ├── operators.ts
│ │ ├── textObjects.ts
│ │ ├── transitions.ts
│ │ └── types.ts
│ └── voice/
│ └── voiceModeEnabled.ts
└── vendor/
├── audio-capture-src/
│ └── index.ts
├── image-processor-src/
│ └── index.ts
├── modifiers-napi-src/
│ └── index.ts
└── url-handler-src/
└── index.ts
Showing preview only (1,368K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (15223 symbols across 1804 files)
FILE: extract-sources.js
function extractSources (line 5) | async function extractSources() {
FILE: package/sdk-tools.d.ts
type ToolInputSchemas (line 11) | type ToolInputSchemas =
type ToolOutputSchemas (line 34) | type ToolOutputSchemas =
type AgentOutput (line 55) | type AgentOutput =
type FileReadOutput (line 107) | type FileReadOutput =
type ListMcpResourcesOutput (line 231) | type ListMcpResourcesOutput = {
type McpOutput (line 256) | type McpOutput = string;
type AgentInput (line 258) | interface AgentInput {
type BashInput (line 296) | interface BashInput {
type TaskOutputInput (line 328) | interface TaskOutputInput {
type ExitPlanModeInput (line 342) | interface ExitPlanModeInput {
type FileEditInput (line 358) | interface FileEditInput {
type FileReadInput (line 376) | interface FileReadInput {
type FileWriteInput (line 394) | interface FileWriteInput {
type GlobInput (line 404) | interface GlobInput {
type GrepInput (line 414) | interface GrepInput {
type TaskStopInput (line 472) | interface TaskStopInput {
type ListMcpResourcesInput (line 482) | interface ListMcpResourcesInput {
type McpInput (line 488) | interface McpInput {
type NotebookEditInput (line 491) | interface NotebookEditInput {
type ReadMcpResourceInput (line 513) | interface ReadMcpResourceInput {
type TodoWriteInput (line 523) | interface TodoWriteInput {
type WebFetchInput (line 533) | interface WebFetchInput {
type WebSearchInput (line 543) | interface WebSearchInput {
type AskUserQuestionInput (line 557) | interface AskUserQuestionInput {
type ConfigInput (line 2134) | interface ConfigInput {
type EnterWorktreeInput (line 2144) | interface EnterWorktreeInput {
type ExitWorktreeInput (line 2150) | interface ExitWorktreeInput {
type BashOutput (line 2160) | interface BashOutput {
type ExitPlanModeOutput (line 2218) | interface ExitPlanModeOutput {
type FileEditOutput (line 2245) | interface FileEditOutput {
type FileWriteOutput (line 2293) | interface FileWriteOutput {
type GlobOutput (line 2333) | interface GlobOutput {
type GrepOutput (line 2351) | interface GrepOutput {
type TaskStopOutput (line 2361) | interface TaskStopOutput {
type NotebookEditOutput (line 2379) | interface NotebookEditOutput {
type ReadMcpResourceOutput (line 2417) | interface ReadMcpResourceOutput {
type TodoWriteOutput (line 2437) | interface TodoWriteOutput {
type WebFetchOutput (line 2456) | interface WebFetchOutput {
type WebSearchOutput (line 2482) | interface WebSearchOutput {
type AskUserQuestionOutput (line 2517) | interface AskUserQuestionOutput {
type ConfigOutput (line 2696) | interface ConfigOutput {
type EnterWorktreeOutput (line 2705) | interface EnterWorktreeOutput {
type ExitWorktreeOutput (line 2710) | interface ExitWorktreeOutput {
FILE: restored-src/src/QueryEngine.ts
type QueryEngineConfig (line 130) | type QueryEngineConfig = {
class QueryEngine (line 184) | class QueryEngine {
method constructor (line 200) | constructor(config: QueryEngineConfig) {
method submitMessage (line 209) | async *submitMessage(
method interrupt (line 1158) | interrupt(): void {
method getMessages (line 1162) | getMessages(): readonly Message[] {
method getReadFileState (line 1166) | getReadFileState(): FileStateCache {
method getSessionId (line 1170) | getSessionId(): string {
method setModel (line 1174) | setModel(model: string): void {
FILE: restored-src/src/Task.ts
type TaskType (line 6) | type TaskType =
type TaskStatus (line 15) | type TaskStatus =
function isTerminalTaskStatus (line 27) | function isTerminalTaskStatus(status: TaskStatus): boolean {
type TaskHandle (line 31) | type TaskHandle = {
type SetAppState (line 36) | type SetAppState = (f: (prev: AppState) => AppState) => void
type TaskContext (line 38) | type TaskContext = {
type TaskStateBase (line 45) | type TaskStateBase = {
type LocalShellSpawnInput (line 59) | type LocalShellSpawnInput = {
type Task (line 72) | type Task = {
constant TASK_ID_PREFIXES (line 79) | const TASK_ID_PREFIXES: Record<string, string> = {
function getTaskIdPrefix (line 90) | function getTaskIdPrefix(type: TaskType): string {
constant TASK_ID_ALPHABET (line 96) | const TASK_ID_ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz'
function generateTaskId (line 98) | function generateTaskId(type: TaskType): string {
function createTaskStateBase (line 108) | function createTaskStateBase(
FILE: restored-src/src/Tool.ts
type ToolInputJSONSchema (line 15) | type ToolInputJSONSchema = {
type QueryChainTracking (line 90) | type QueryChainTracking = {
type ValidationResult (line 95) | type ValidationResult =
type SetToolJSXFn (line 103) | type SetToolJSXFn = (
type ToolPermissionContext (line 123) | type ToolPermissionContext = DeepImmutable<{
type CompactProgressEvent (line 150) | type CompactProgressEvent =
type ToolUseContext (line 158) | type ToolUseContext = {
type Progress (line 305) | type Progress = ToolProgressData | HookProgress
type ToolProgress (line 307) | type ToolProgress<P extends ToolProgressData> = {
function filterToolProgressMessages (line 312) | function filterToolProgressMessages(
type ToolResult (line 321) | type ToolResult<T> = {
type ToolCallProgress (line 338) | type ToolCallProgress<P extends ToolProgressData = ToolProgressData> = (
type AnyObject (line 343) | type AnyObject = z.ZodType<{ [key: string]: unknown }>
function toolMatchesName (line 348) | function toolMatchesName(
function findToolByName (line 358) | function findToolByName(tools: Tools, name: string): Tool | undefined {
type Tool (line 362) | type Tool<
type Tools (line 701) | type Tools = readonly Tool[]
type DefaultableToolKeys (line 707) | type DefaultableToolKeys =
type ToolDef (line 721) | type ToolDef<
type BuiltTool (line 735) | type BuiltTool<D> = Omit<D, DefaultableToolKeys> & {
constant TOOL_DEFAULTS (line 757) | const TOOL_DEFAULTS = {
type ToolDefaults (line 774) | type ToolDefaults = typeof TOOL_DEFAULTS
type AnyToolDef (line 781) | type AnyToolDef = ToolDef<any, any, any>
function buildTool (line 783) | function buildTool<D extends AnyToolDef>(def: D): BuiltTool<D> {
FILE: restored-src/src/assistant/sessionHistory.ts
constant HISTORY_PAGE_SIZE (line 7) | const HISTORY_PAGE_SIZE = 100
type HistoryPage (line 9) | type HistoryPage = {
type SessionEventsResponse (line 18) | type SessionEventsResponse = {
type HistoryAuthCtx (line 25) | type HistoryAuthCtx = {
function createHistoryAuthCtx (line 31) | async function createHistoryAuthCtx(
function fetchPage (line 45) | async function fetchPage(
function fetchLatestEvents (line 73) | async function fetchLatestEvents(
function fetchOlderEvents (line 81) | async function fetchOlderEvents(
FILE: restored-src/src/bootstrap/state.ts
type RegisteredHookMatcher (line 27) | type RegisteredHookMatcher = HookCallbackMatcher | PluginHookMatcher
type ChannelEntry (line 37) | type ChannelEntry =
type AttributedCounter (line 41) | type AttributedCounter = {
type State (line 45) | type State = {
function getInitialState (line 260) | function getInitialState(): State {
constant STATE (line 429) | const STATE: State = getInitialState()
function getSessionId (line 431) | function getSessionId(): SessionId {
function regenerateSessionId (line 435) | function regenerateSessionId(
function getParentSessionId (line 452) | function getParentSessionId(): SessionId | undefined {
function switchSession (line 468) | function switchSession(
function getSessionProjectDir (line 496) | function getSessionProjectDir(): string | null {
function getOriginalCwd (line 500) | function getOriginalCwd(): string {
function getProjectRoot (line 511) | function getProjectRoot(): string {
function setOriginalCwd (line 515) | function setOriginalCwd(cwd: string): void {
function setProjectRoot (line 523) | function setProjectRoot(cwd: string): void {
function getCwdState (line 527) | function getCwdState(): string {
function setCwdState (line 531) | function setCwdState(cwd: string): void {
function getDirectConnectServerUrl (line 535) | function getDirectConnectServerUrl(): string | undefined {
function setDirectConnectServerUrl (line 539) | function setDirectConnectServerUrl(url: string): void {
function addToTotalDurationState (line 543) | function addToTotalDurationState(
function resetTotalDurationStateAndCost_FOR_TESTS_ONLY (line 551) | function resetTotalDurationStateAndCost_FOR_TESTS_ONLY(): void {
function addToTotalCostState (line 557) | function addToTotalCostState(
function getTotalCostUSD (line 566) | function getTotalCostUSD(): number {
function getTotalAPIDuration (line 570) | function getTotalAPIDuration(): number {
function getTotalDuration (line 574) | function getTotalDuration(): number {
function getTotalAPIDurationWithoutRetries (line 578) | function getTotalAPIDurationWithoutRetries(): number {
function getTotalToolDuration (line 582) | function getTotalToolDuration(): number {
function addToToolDuration (line 586) | function addToToolDuration(duration: number): void {
function getTurnHookDurationMs (line 592) | function getTurnHookDurationMs(): number {
function addToTurnHookDuration (line 596) | function addToTurnHookDuration(duration: number): void {
function resetTurnHookDuration (line 601) | function resetTurnHookDuration(): void {
function getTurnHookCount (line 606) | function getTurnHookCount(): number {
function getTurnToolDurationMs (line 610) | function getTurnToolDurationMs(): number {
function resetTurnToolDuration (line 614) | function resetTurnToolDuration(): void {
function getTurnToolCount (line 619) | function getTurnToolCount(): number {
function getTurnClassifierDurationMs (line 623) | function getTurnClassifierDurationMs(): number {
function addToTurnClassifierDuration (line 627) | function addToTurnClassifierDuration(duration: number): void {
function resetTurnClassifierDuration (line 632) | function resetTurnClassifierDuration(): void {
function getTurnClassifierCount (line 637) | function getTurnClassifierCount(): number {
function getStatsStore (line 641) | function getStatsStore(): {
function setStatsStore (line 647) | function setStatsStore(
function updateLastInteractionTime (line 667) | function updateLastInteractionTime(immediate?: boolean): void {
function flushInteractionTime (line 680) | function flushInteractionTime(): void {
function flushInteractionTime_inner (line 686) | function flushInteractionTime_inner(): void {
function addToTotalLinesChanged (line 691) | function addToTotalLinesChanged(added: number, removed: number): void {
function getTotalLinesAdded (line 696) | function getTotalLinesAdded(): number {
function getTotalLinesRemoved (line 700) | function getTotalLinesRemoved(): number {
function getTotalInputTokens (line 704) | function getTotalInputTokens(): number {
function getTotalOutputTokens (line 708) | function getTotalOutputTokens(): number {
function getTotalCacheReadInputTokens (line 712) | function getTotalCacheReadInputTokens(): number {
function getTotalCacheCreationInputTokens (line 716) | function getTotalCacheCreationInputTokens(): number {
function getTotalWebSearchRequests (line 720) | function getTotalWebSearchRequests(): number {
function getTurnOutputTokens (line 726) | function getTurnOutputTokens(): number {
function getCurrentTurnTokenBudget (line 729) | function getCurrentTurnTokenBudget(): number | null {
function snapshotOutputTokensForTurn (line 733) | function snapshotOutputTokensForTurn(budget: number | null): void {
function getBudgetContinuationCount (line 738) | function getBudgetContinuationCount(): number {
function incrementBudgetContinuationCount (line 741) | function incrementBudgetContinuationCount(): void {
function setHasUnknownModelCost (line 745) | function setHasUnknownModelCost(): void {
function hasUnknownModelCost (line 749) | function hasUnknownModelCost(): boolean {
function getLastMainRequestId (line 753) | function getLastMainRequestId(): string | undefined {
function setLastMainRequestId (line 757) | function setLastMainRequestId(requestId: string): void {
function getLastApiCompletionTimestamp (line 761) | function getLastApiCompletionTimestamp(): number | null {
function setLastApiCompletionTimestamp (line 765) | function setLastApiCompletionTimestamp(timestamp: number): void {
function markPostCompaction (line 771) | function markPostCompaction(): void {
function consumePostCompaction (line 777) | function consumePostCompaction(): boolean {
function getLastInteractionTime (line 783) | function getLastInteractionTime(): number {
constant SCROLL_DRAIN_IDLE_MS (line 794) | const SCROLL_DRAIN_IDLE_MS = 150
function markScrollActivity (line 798) | function markScrollActivity(): void {
function getIsScrollDraining (line 811) | function getIsScrollDraining(): boolean {
function waitForScrollIdle (line 818) | async function waitForScrollIdle(): Promise<void> {
function getModelUsage (line 826) | function getModelUsage(): { [modelName: string]: ModelUsage } {
function getUsageForModel (line 830) | function getUsageForModel(model: string): ModelUsage | undefined {
function getMainLoopModelOverride (line 838) | function getMainLoopModelOverride(): ModelSetting | undefined {
function getInitialMainLoopModel (line 842) | function getInitialMainLoopModel(): ModelSetting {
function setMainLoopModelOverride (line 846) | function setMainLoopModelOverride(
function setInitialMainLoopModel (line 852) | function setInitialMainLoopModel(model: ModelSetting): void {
function getSdkBetas (line 856) | function getSdkBetas(): string[] | undefined {
function setSdkBetas (line 860) | function setSdkBetas(betas: string[] | undefined): void {
function resetCostState (line 864) | function resetCostState(): void {
function setCostStateForRestore (line 881) | function setCostStateForRestore({
function resetStateForTests (line 919) | function resetStateForTests(): void {
function getModelStrings (line 933) | function getModelStrings(): ModelStrings | null {
function setModelStrings (line 938) | function setModelStrings(modelStrings: ModelStrings): void {
function resetModelStringsForTestingOnly (line 944) | function resetModelStringsForTestingOnly() {
function setMeter (line 948) | function setMeter(
function getMeter (line 989) | function getMeter(): Meter | null {
function getSessionCounter (line 993) | function getSessionCounter(): AttributedCounter | null {
function getLocCounter (line 997) | function getLocCounter(): AttributedCounter | null {
function getPrCounter (line 1001) | function getPrCounter(): AttributedCounter | null {
function getCommitCounter (line 1005) | function getCommitCounter(): AttributedCounter | null {
function getCostCounter (line 1009) | function getCostCounter(): AttributedCounter | null {
function getTokenCounter (line 1013) | function getTokenCounter(): AttributedCounter | null {
function getCodeEditToolDecisionCounter (line 1017) | function getCodeEditToolDecisionCounter(): AttributedCounter | null {
function getActiveTimeCounter (line 1021) | function getActiveTimeCounter(): AttributedCounter | null {
function getLoggerProvider (line 1025) | function getLoggerProvider(): LoggerProvider | null {
function setLoggerProvider (line 1029) | function setLoggerProvider(provider: LoggerProvider | null): void {
function getEventLogger (line 1033) | function getEventLogger(): ReturnType<typeof logs.getLogger> | null {
function setEventLogger (line 1037) | function setEventLogger(
function getMeterProvider (line 1043) | function getMeterProvider(): MeterProvider | null {
function setMeterProvider (line 1047) | function setMeterProvider(provider: MeterProvider | null): void {
function getTracerProvider (line 1050) | function getTracerProvider(): BasicTracerProvider | null {
function setTracerProvider (line 1053) | function setTracerProvider(provider: BasicTracerProvider | null): void {
function getIsNonInteractiveSession (line 1057) | function getIsNonInteractiveSession(): boolean {
function getIsInteractive (line 1061) | function getIsInteractive(): boolean {
function setIsInteractive (line 1065) | function setIsInteractive(value: boolean): void {
function getClientType (line 1069) | function getClientType(): string {
function setClientType (line 1073) | function setClientType(type: string): void {
function getSdkAgentProgressSummariesEnabled (line 1077) | function getSdkAgentProgressSummariesEnabled(): boolean {
function setSdkAgentProgressSummariesEnabled (line 1081) | function setSdkAgentProgressSummariesEnabled(value: boolean): void {
function getKairosActive (line 1085) | function getKairosActive(): boolean {
function setKairosActive (line 1089) | function setKairosActive(value: boolean): void {
function getStrictToolResultPairing (line 1093) | function getStrictToolResultPairing(): boolean {
function setStrictToolResultPairing (line 1097) | function setStrictToolResultPairing(value: boolean): void {
function getUserMsgOptIn (line 1104) | function getUserMsgOptIn(): boolean {
function setUserMsgOptIn (line 1108) | function setUserMsgOptIn(value: boolean): void {
function getSessionSource (line 1112) | function getSessionSource(): string | undefined {
function setSessionSource (line 1116) | function setSessionSource(source: string): void {
function getQuestionPreviewFormat (line 1120) | function getQuestionPreviewFormat(): 'markdown' | 'html' | undefined {
function setQuestionPreviewFormat (line 1124) | function setQuestionPreviewFormat(format: 'markdown' | 'html'): void {
function getAgentColorMap (line 1128) | function getAgentColorMap(): Map<string, AgentColorName> {
function getFlagSettingsPath (line 1132) | function getFlagSettingsPath(): string | undefined {
function setFlagSettingsPath (line 1136) | function setFlagSettingsPath(path: string | undefined): void {
function getFlagSettingsInline (line 1140) | function getFlagSettingsInline(): Record<string, unknown> | null {
function setFlagSettingsInline (line 1144) | function setFlagSettingsInline(
function getSessionIngressToken (line 1150) | function getSessionIngressToken(): string | null | undefined {
function setSessionIngressToken (line 1154) | function setSessionIngressToken(token: string | null): void {
function getOauthTokenFromFd (line 1158) | function getOauthTokenFromFd(): string | null | undefined {
function setOauthTokenFromFd (line 1162) | function setOauthTokenFromFd(token: string | null): void {
function getApiKeyFromFd (line 1166) | function getApiKeyFromFd(): string | null | undefined {
function setApiKeyFromFd (line 1170) | function setApiKeyFromFd(key: string | null): void {
function setLastAPIRequest (line 1174) | function setLastAPIRequest(
function getLastAPIRequest (line 1180) | function getLastAPIRequest(): Omit<
function setLastAPIRequestMessages (line 1187) | function setLastAPIRequestMessages(
function getLastAPIRequestMessages (line 1193) | function getLastAPIRequestMessages():
function setLastClassifierRequests (line 1199) | function setLastClassifierRequests(requests: unknown[] | null): void {
function getLastClassifierRequests (line 1203) | function getLastClassifierRequests(): unknown[] | null {
function setCachedClaudeMdContent (line 1207) | function setCachedClaudeMdContent(content: string | null): void {
function getCachedClaudeMdContent (line 1211) | function getCachedClaudeMdContent(): string | null {
function addToInMemoryErrorLog (line 1215) | function addToInMemoryErrorLog(errorInfo: {
function getAllowedSettingSources (line 1226) | function getAllowedSettingSources(): SettingSource[] {
function setAllowedSettingSources (line 1230) | function setAllowedSettingSources(sources: SettingSource[]): void {
function preferThirdPartyAuthentication (line 1234) | function preferThirdPartyAuthentication(): boolean {
function setInlinePlugins (line 1239) | function setInlinePlugins(plugins: Array<string>): void {
function getInlinePlugins (line 1243) | function getInlinePlugins(): Array<string> {
function setChromeFlagOverride (line 1247) | function setChromeFlagOverride(value: boolean | undefined): void {
function getChromeFlagOverride (line 1251) | function getChromeFlagOverride(): boolean | undefined {
function setUseCoworkPlugins (line 1255) | function setUseCoworkPlugins(value: boolean): void {
function getUseCoworkPlugins (line 1260) | function getUseCoworkPlugins(): boolean {
function setSessionBypassPermissionsMode (line 1264) | function setSessionBypassPermissionsMode(enabled: boolean): void {
function getSessionBypassPermissionsMode (line 1268) | function getSessionBypassPermissionsMode(): boolean {
function setScheduledTasksEnabled (line 1272) | function setScheduledTasksEnabled(enabled: boolean): void {
function getScheduledTasksEnabled (line 1276) | function getScheduledTasksEnabled(): boolean {
type SessionCronTask (line 1280) | type SessionCronTask = {
function getSessionCronTasks (line 1294) | function getSessionCronTasks(): SessionCronTask[] {
function addSessionCronTask (line 1298) | function addSessionCronTask(task: SessionCronTask): void {
function removeSessionCronTasks (line 1307) | function removeSessionCronTasks(ids: readonly string[]): number {
function setSessionTrustAccepted (line 1317) | function setSessionTrustAccepted(accepted: boolean): void {
function getSessionTrustAccepted (line 1321) | function getSessionTrustAccepted(): boolean {
function setSessionPersistenceDisabled (line 1325) | function setSessionPersistenceDisabled(disabled: boolean): void {
function isSessionPersistenceDisabled (line 1329) | function isSessionPersistenceDisabled(): boolean {
function hasExitedPlanModeInSession (line 1333) | function hasExitedPlanModeInSession(): boolean {
function setHasExitedPlanMode (line 1337) | function setHasExitedPlanMode(value: boolean): void {
function needsPlanModeExitAttachment (line 1341) | function needsPlanModeExitAttachment(): boolean {
function setNeedsPlanModeExitAttachment (line 1345) | function setNeedsPlanModeExitAttachment(value: boolean): void {
function handlePlanModeTransition (line 1349) | function handlePlanModeTransition(
function needsAutoModeExitAttachment (line 1365) | function needsAutoModeExitAttachment(): boolean {
function setNeedsAutoModeExitAttachment (line 1369) | function setNeedsAutoModeExitAttachment(value: boolean): void {
function handleAutoModeTransition (line 1373) | function handleAutoModeTransition(
function hasShownLspRecommendationThisSession (line 1402) | function hasShownLspRecommendationThisSession(): boolean {
function setLspRecommendationShownThisSession (line 1406) | function setLspRecommendationShownThisSession(value: boolean): void {
function setInitJsonSchema (line 1411) | function setInitJsonSchema(schema: Record<string, unknown>): void {
function getInitJsonSchema (line 1415) | function getInitJsonSchema(): Record<string, unknown> | null {
function registerHookCallbacks (line 1419) | function registerHookCallbacks(
function getRegisteredHooks (line 1436) | function getRegisteredHooks(): Partial<
function clearRegisteredHooks (line 1442) | function clearRegisteredHooks(): void {
function clearRegisteredPluginHooks (line 1446) | function clearRegisteredPluginHooks(): void {
function resetSdkInitState (line 1463) | function resetSdkInitState(): void {
function getPlanSlugCache (line 1468) | function getPlanSlugCache(): Map<string, string> {
function getSessionCreatedTeams (line 1472) | function getSessionCreatedTeams(): Set<string> {
function setTeleportedSessionInfo (line 1477) | function setTeleportedSessionInfo(info: {
function getTeleportedSessionInfo (line 1487) | function getTeleportedSessionInfo(): {
function markFirstTeleportMessageLogged (line 1495) | function markFirstTeleportMessageLogged(): void {
type InvokedSkillInfo (line 1502) | type InvokedSkillInfo = {
function addInvokedSkill (line 1510) | function addInvokedSkill(
function getInvokedSkills (line 1526) | function getInvokedSkills(): Map<string, InvokedSkillInfo> {
function getInvokedSkillsForAgent (line 1530) | function getInvokedSkillsForAgent(
function clearInvokedSkills (line 1543) | function clearInvokedSkills(
function clearInvokedSkillsForAgent (line 1557) | function clearInvokedSkillsForAgent(agentId: string): void {
constant MAX_SLOW_OPERATIONS (line 1566) | const MAX_SLOW_OPERATIONS = 10
constant SLOW_OPERATION_TTL_MS (line 1567) | const SLOW_OPERATION_TTL_MS = 10000
function addSlowOperation (line 1569) | function addSlowOperation(operation: string, durationMs: number): void {
constant EMPTY_SLOW_OPERATIONS (line 1589) | const EMPTY_SLOW_OPERATIONS: ReadonlyArray<{
function getSlowOperations (line 1595) | function getSlowOperations(): ReadonlyArray<{
function getMainThreadAgentType (line 1623) | function getMainThreadAgentType(): string | undefined {
function setMainThreadAgentType (line 1627) | function setMainThreadAgentType(agentType: string | undefined): void {
function getIsRemoteMode (line 1631) | function getIsRemoteMode(): boolean {
function setIsRemoteMode (line 1635) | function setIsRemoteMode(value: boolean): void {
function getSystemPromptSectionCache (line 1641) | function getSystemPromptSectionCache(): Map<string, string | null> {
function setSystemPromptSectionCacheEntry (line 1645) | function setSystemPromptSectionCacheEntry(
function clearSystemPromptSectionState (line 1652) | function clearSystemPromptSectionState(): void {
function getLastEmittedDate (line 1658) | function getLastEmittedDate(): string | null {
function setLastEmittedDate (line 1662) | function setLastEmittedDate(date: string | null): void {
function getAdditionalDirectoriesForClaudeMd (line 1666) | function getAdditionalDirectoriesForClaudeMd(): string[] {
function setAdditionalDirectoriesForClaudeMd (line 1670) | function setAdditionalDirectoriesForClaudeMd(
function getAllowedChannels (line 1676) | function getAllowedChannels(): ChannelEntry[] {
function setAllowedChannels (line 1680) | function setAllowedChannels(entries: ChannelEntry[]): void {
function getHasDevChannels (line 1684) | function getHasDevChannels(): boolean {
function setHasDevChannels (line 1688) | function setHasDevChannels(value: boolean): void {
function getPromptCache1hAllowlist (line 1692) | function getPromptCache1hAllowlist(): string[] | null {
function setPromptCache1hAllowlist (line 1696) | function setPromptCache1hAllowlist(allowlist: string[] | null): void {
function getPromptCache1hEligible (line 1700) | function getPromptCache1hEligible(): boolean | null {
function setPromptCache1hEligible (line 1704) | function setPromptCache1hEligible(eligible: boolean | null): void {
function getAfkModeHeaderLatched (line 1708) | function getAfkModeHeaderLatched(): boolean | null {
function setAfkModeHeaderLatched (line 1712) | function setAfkModeHeaderLatched(v: boolean): void {
function getFastModeHeaderLatched (line 1716) | function getFastModeHeaderLatched(): boolean | null {
function setFastModeHeaderLatched (line 1720) | function setFastModeHeaderLatched(v: boolean): void {
function getCacheEditingHeaderLatched (line 1724) | function getCacheEditingHeaderLatched(): boolean | null {
function setCacheEditingHeaderLatched (line 1728) | function setCacheEditingHeaderLatched(v: boolean): void {
function getThinkingClearLatched (line 1732) | function getThinkingClearLatched(): boolean | null {
function setThinkingClearLatched (line 1736) | function setThinkingClearLatched(v: boolean): void {
function clearBetaHeaderLatches (line 1744) | function clearBetaHeaderLatches(): void {
function getPromptId (line 1751) | function getPromptId(): string | null {
function setPromptId (line 1755) | function setPromptId(id: string | null): void {
FILE: restored-src/src/bridge/bridgeApi.ts
type BridgeApiDeps (line 12) | type BridgeApiDeps = {
constant BETA_HEADER (line 38) | const BETA_HEADER = 'environments-2025-11-01'
constant SAFE_ID_PATTERN (line 41) | const SAFE_ID_PATTERN = /^[a-zA-Z0-9_-]+$/
function validateBridgeId (line 48) | function validateBridgeId(id: string, label: string): string {
class BridgeFatalError (line 56) | class BridgeFatalError extends Error {
method constructor (line 60) | constructor(message: string, status: number, errorType?: string) {
function createBridgeApiClient (line 68) | function createBridgeApiClient(deps: BridgeApiDeps): BridgeApiClient {
function handleErrorStatus (line 454) | function handleErrorStatus(
function isExpiredErrorType (line 503) | function isExpiredErrorType(errorType: string | undefined): boolean {
function isSuppressible403 (line 516) | function isSuppressible403(err: BridgeFatalError): boolean {
function extractErrorTypeFromData (line 526) | function extractErrorTypeFromData(data: unknown): string | undefined {
FILE: restored-src/src/bridge/bridgeConfig.ts
function getBridgeTokenOverride (line 18) | function getBridgeTokenOverride(): string | undefined {
function getBridgeBaseUrlOverride (line 27) | function getBridgeBaseUrlOverride(): string | undefined {
function getBridgeAccessToken (line 38) | function getBridgeAccessToken(): string | undefined {
function getBridgeBaseUrl (line 46) | function getBridgeBaseUrl(): string {
FILE: restored-src/src/bridge/bridgeDebug.ts
type BridgeFault (line 22) | type BridgeFault = {
type BridgeDebugHandle (line 38) | type BridgeDebugHandle = {
function registerBridgeDebugHandle (line 57) | function registerBridgeDebugHandle(h: BridgeDebugHandle): void {
function clearBridgeDebugHandle (line 61) | function clearBridgeDebugHandle(): void {
function getBridgeDebugHandle (line 66) | function getBridgeDebugHandle(): BridgeDebugHandle | null {
function injectBridgeFault (line 70) | function injectBridgeFault(fault: BridgeFault): void {
function wrapApiForFaultInjection (line 84) | function wrapApiForFaultInjection(
FILE: restored-src/src/bridge/bridgeEnabled.ts
function isBridgeEnabled (line 28) | function isBridgeEnabled(): boolean {
function isBridgeEnabledBlocking (line 50) | async function isBridgeEnabledBlocking(): Promise<boolean> {
function getBridgeDisabledReason (line 70) | async function getBridgeDisabledReason(): Promise<string | null> {
function isClaudeAISubscriber (line 94) | function isClaudeAISubscriber(): boolean {
function hasProfileScope (line 101) | function hasProfileScope(): boolean {
function getOauthAccountInfo (line 108) | function getOauthAccountInfo(): ReturnType<
function isEnvLessBridgeEnabled (line 126) | function isEnvLessBridgeEnabled(): boolean {
function isCseShimEnabled (line 141) | function isCseShimEnabled(): boolean {
function checkBridgeMinVersion (line 160) | function checkBridgeMinVersion(): string | null {
function getCcrAutoConnectDefault (line 185) | function getCcrAutoConnectDefault(): boolean {
function isCcrMirrorEnabled (line 197) | function isCcrMirrorEnabled(): boolean {
FILE: restored-src/src/bridge/bridgeMain.ts
type BackoffConfig (line 59) | type BackoffConfig = {
constant DEFAULT_BACKOFF (line 72) | const DEFAULT_BACKOFF: BackoffConfig = {
constant STATUS_UPDATE_INTERVAL_MS (line 82) | const STATUS_UPDATE_INTERVAL_MS = 1_000
constant SPAWN_SESSIONS_DEFAULT (line 83) | const SPAWN_SESSIONS_DEFAULT = 32
function isMultiSessionSpawnEnabled (line 96) | async function isMultiSessionSpawnEnabled(): Promise<boolean> {
function pollSleepDetectionThresholdMs (line 107) | function pollSleepDetectionThresholdMs(backoff: BackoffConfig): number {
function spawnScriptArgs (line 119) | function spawnScriptArgs(): string[] {
function safeSpawn (line 127) | function safeSpawn(
function runBridgeLoop (line 141) | async function runBridgeLoop(
constant CONNECTION_ERROR_CODES (line 1582) | const CONNECTION_ERROR_CODES = new Set([
function isConnectionError (line 1590) | function isConnectionError(err: unknown): boolean {
function isServerError (line 1604) | function isServerError(err: unknown): boolean {
function addJitter (line 1615) | function addJitter(ms: number): number {
function formatDelay (line 1619) | function formatDelay(ms: number): string {
function stopWorkWithRetry (line 1627) | async function stopWorkWithRetry(
function onSessionTimeout (line 1678) | function onSessionTimeout(
type ParsedArgs (line 1699) | type ParsedArgs = {
constant SPAWN_FLAG_VALUES (line 1720) | const SPAWN_FLAG_VALUES = ['session', 'same-dir', 'worktree'] as const
function parseSpawnValue (line 1722) | function parseSpawnValue(raw: string | undefined): SpawnMode | string {
function parseCapacityValue (line 1729) | function parseCapacityValue(raw: string | undefined): number | string {
function parseArgs (line 1737) | function parseArgs(args: string[]): ParsedArgs {
function printHelp (line 1889) | async function printHelp(): Promise<void> {
constant TITLE_MAX_LEN (line 1953) | const TITLE_MAX_LEN = 80
function deriveSessionTitle (line 1956) | function deriveSessionTitle(text: string): string {
function fetchSessionTitle (line 1971) | async function fetchSessionTitle(
function bridgeMain (line 1980) | async function bridgeMain(args: string[]): Promise<void> {
class BridgeHeadlessPermanentError (line 2778) | class BridgeHeadlessPermanentError extends Error {
method constructor (line 2779) | constructor(message: string) {
type HeadlessBridgeOpts (line 2785) | type HeadlessBridgeOpts = {
function runBridgeHeadless (line 2810) | async function runBridgeHeadless(
function createHeadlessBridgeLogger (line 2968) | function createHeadlessBridgeLogger(log: (s: string) => void): BridgeLog...
FILE: restored-src/src/bridge/bridgeMessaging.ts
function isSDKMessage (line 36) | function isSDKMessage(value: unknown): value is SDKMessage {
function isSDKControlResponse (line 46) | function isSDKControlResponse(
function isSDKControlRequest (line 59) | function isSDKControlRequest(
function isEligibleBridgeMessage (line 77) | function isEligibleBridgeMessage(m: Message): boolean {
function extractTitleText (line 103) | function extractTitleText(m: Message): string | undefined {
function handleIngressMessage (line 132) | function handleIngressMessage(
type ServerControlRequestHandlers (line 212) | type ServerControlRequestHandlers = {
constant OUTBOUND_ONLY_ERROR (line 231) | const OUTBOUND_ONLY_ERROR =
function handleServerControlRequest (line 243) | function handleServerControlRequest(
function makeResultMessage (line 399) | function makeResultMessage(sessionId: string): SDKResultSuccess {
class BoundedUUIDSet (line 429) | class BoundedUUIDSet {
method constructor (line 435) | constructor(capacity: number) {
method add (line 440) | add(uuid: string): void {
method has (line 452) | has(uuid: string): boolean {
method clear (line 456) | clear(): void {
FILE: restored-src/src/bridge/bridgePermissionCallbacks.ts
type BridgePermissionResponse (line 3) | type BridgePermissionResponse = {
type BridgePermissionCallbacks (line 10) | type BridgePermissionCallbacks = {
function isBridgePermissionResponse (line 32) | function isBridgePermissionResponse(
FILE: restored-src/src/bridge/bridgePointer.ts
constant MAX_WORKTREE_FANOUT (line 19) | const MAX_WORKTREE_FANOUT = 50
constant BRIDGE_POINTER_TTL_MS (line 40) | const BRIDGE_POINTER_TTL_MS = 4 * 60 * 60 * 1000
type BridgePointer (line 50) | type BridgePointer = z.infer<ReturnType<typeof BridgePointerSchema>>
function getBridgePointerPath (line 52) | function getBridgePointerPath(dir: string): string {
function writeBridgePointer (line 62) | async function writeBridgePointer(
function readBridgePointer (line 83) | async function readBridgePointer(
function readBridgePointerAcrossWorktrees (line 129) | async function readBridgePointerAcrossWorktrees(
function clearBridgePointer (line 190) | async function clearBridgePointer(dir: string): Promise<void> {
function safeJsonParse (line 204) | function safeJsonParse(raw: string): unknown {
FILE: restored-src/src/bridge/bridgeStatusUtil.ts
type StatusState (line 10) | type StatusState =
constant TOOL_DISPLAY_EXPIRY_MS (line 18) | const TOOL_DISPLAY_EXPIRY_MS = 30_000
constant SHIMMER_INTERVAL_MS (line 21) | const SHIMMER_INTERVAL_MS = 150
function timestamp (line 23) | function timestamp(): string {
function abbreviateActivity (line 34) | function abbreviateActivity(summary: string): string {
function buildBridgeConnectUrl (line 39) | function buildBridgeConnectUrl(
function buildBridgeSessionUrl (line 52) | function buildBridgeSessionUrl(
function computeGlimmerIndex (line 61) | function computeGlimmerIndex(
function computeShimmerSegments (line 79) | function computeShimmerSegments(
type BridgeStatusInfo (line 114) | type BridgeStatusInfo = {
function getBridgeStatus (line 124) | function getBridgeStatus({
function buildIdleFooterText (line 144) | function buildIdleFooterText(url: string): string {
function buildActiveFooterText (line 149) | function buildActiveFooterText(url: string): string {
constant FAILED_FOOTER_TEXT (line 154) | const FAILED_FOOTER_TEXT = 'Something went wrong, please try again'
function wrapWithOsc8Link (line 161) | function wrapWithOsc8Link(text: string, url: string): string {
FILE: restored-src/src/bridge/bridgeUI.ts
constant QR_OPTIONS (line 30) | const QR_OPTIONS = {
function generateQr (line 37) | async function generateQr(url: string): Promise<string[]> {
function createBridgeLogger (line 42) | function createBridgeLogger(options: {
FILE: restored-src/src/bridge/capacityWake.ts
type CapacitySignal (line 11) | type CapacitySignal = { signal: AbortSignal; cleanup: () => void }
type CapacityWake (line 13) | type CapacityWake = {
function createCapacityWake (line 28) | function createCapacityWake(outerSignal: AbortSignal): CapacityWake {
FILE: restored-src/src/bridge/codeSessionApi.ts
constant ANTHROPIC_VERSION (line 16) | const ANTHROPIC_VERSION = '2023-06-01'
function oauthHeaders (line 18) | function oauthHeaders(accessToken: string): Record<string, string> {
function createCodeSession (line 26) | async function createCodeSession(
type RemoteCredentials (line 86) | type RemoteCredentials = {
function fetchRemoteCredentials (line 93) | async function fetchRemoteCredentials(
FILE: restored-src/src/bridge/createSession.ts
type GitSource (line 7) | type GitSource = {
type GitOutcome (line 13) | type GitOutcome = {
type SessionEvent (line 20) | type SessionEvent = {
function createBridgeSession (line 34) | async function createBridgeSession({
function getBridgeSession (line 190) | async function getBridgeSession(
function archiveBridgeSession (line 263) | async function archiveBridgeSession(
function updateBridgeSessionTitle (line 327) | async function updateBridgeSessionTitle(
FILE: restored-src/src/bridge/debugUtils.ts
constant DEBUG_MSG_LIMIT (line 9) | const DEBUG_MSG_LIMIT = 2000
constant SECRET_FIELD_NAMES (line 11) | const SECRET_FIELD_NAMES = [
constant SECRET_PATTERN (line 19) | const SECRET_PATTERN = new RegExp(
constant REDACT_MIN_LENGTH (line 24) | const REDACT_MIN_LENGTH = 16
function redactSecrets (line 26) | function redactSecrets(s: string): string {
function debugTruncate (line 37) | function debugTruncate(s: string): string {
function debugBody (line 46) | function debugBody(data: unknown): string {
function describeAxiosError (line 60) | function describeAxiosError(err: unknown): string {
function extractHttpStatus (line 88) | function extractHttpStatus(err: unknown): number | undefined {
function extractErrorDetail (line 106) | function extractErrorDetail(data: unknown): string | undefined {
function logBridgeSkip (line 128) | function logBridgeSkip(
FILE: restored-src/src/bridge/envLessBridgeConfig.ts
type EnvLessBridgeConfig (line 7) | type EnvLessBridgeConfig = {
constant DEFAULT_ENV_LESS_BRIDGE_CONFIG (line 44) | const DEFAULT_ENV_LESS_BRIDGE_CONFIG: EnvLessBridgeConfig = {
function getEnvLessBridgeConfig (line 130) | async function getEnvLessBridgeConfig(): Promise<EnvLessBridgeConfig> {
function checkEnvLessBridgeMinVersion (line 147) | async function checkEnvLessBridgeMinVersion(): Promise<string | null> {
function shouldShowAppUpgradeMessage (line 161) | async function shouldShowAppUpgradeMessage(): Promise<boolean> {
FILE: restored-src/src/bridge/flushGate.ts
class FlushGate (line 16) | class FlushGate<T> {
method active (line 20) | get active(): boolean {
method pendingCount (line 24) | get pendingCount(): number {
method start (line 29) | start(): void {
method end (line 37) | end(): T[] {
method enqueue (line 46) | enqueue(...items: T[]): boolean {
method drop (line 56) | drop(): number {
method deactivate (line 68) | deactivate(): void {
FILE: restored-src/src/bridge/inboundAttachments.ts
constant DOWNLOAD_TIMEOUT_MS (line 25) | const DOWNLOAD_TIMEOUT_MS = 30_000
function debug (line 27) | function debug(msg: string): void {
type InboundAttachment (line 39) | type InboundAttachment = z.infer<ReturnType<typeof attachmentSchema>>
function extractInboundAttachments (line 42) | function extractInboundAttachments(msg: unknown): InboundAttachment[] {
function sanitizeFileName (line 55) | function sanitizeFileName(name: string): string {
function uploadsDir (line 60) | function uploadsDir(): string {
function resolveOne (line 68) | async function resolveOne(att: InboundAttachment): Promise<string | unde...
function resolveInboundAttachments (line 123) | async function resolveInboundAttachments(
function prependPathRefs (line 142) | function prependPathRefs(
function resolveAndPrepend (line 167) | async function resolveAndPrepend(
FILE: restored-src/src/bridge/inboundMessages.ts
function extractInboundMessageFields (line 21) | function extractInboundMessageFields(
function normalizeImageBlocks (line 52) | function normalizeImageBlocks(
function isMalformedBase64Image (line 75) | function isMalformedBase64Image(
FILE: restored-src/src/bridge/initReplBridge.ts
type InitBridgeOptions (line 75) | type InitBridgeOptions = {
function initReplBridge (line 110) | async function initReplBridge(
constant TITLE_MAX_LEN (line 547) | const TITLE_MAX_LEN = 50
function deriveTitle (line 555) | function deriveTitle(raw: string): string | undefined {
FILE: restored-src/src/bridge/jwtUtils.ts
function formatDuration (line 8) | function formatDuration(ms: number): string {
function decodeJwtPayload (line 21) | function decodeJwtPayload(token: string): unknown | null {
function decodeJwtExpiry (line 38) | function decodeJwtExpiry(token: string): number | null {
constant TOKEN_REFRESH_BUFFER_MS (line 52) | const TOKEN_REFRESH_BUFFER_MS = 5 * 60 * 1000
constant FALLBACK_REFRESH_INTERVAL_MS (line 55) | const FALLBACK_REFRESH_INTERVAL_MS = 30 * 60 * 1000 // 30 minutes
constant MAX_REFRESH_FAILURES (line 58) | const MAX_REFRESH_FAILURES = 3
constant REFRESH_RETRY_DELAY_MS (line 61) | const REFRESH_RETRY_DELAY_MS = 60_000
function createTokenRefreshScheduler (line 72) | function createTokenRefreshScheduler({
FILE: restored-src/src/bridge/pollConfig.ts
function getPollIntervalConfig (line 102) | function getPollIntervalConfig(): PollIntervalConfig {
FILE: restored-src/src/bridge/pollConfigDefaults.ts
constant POLL_INTERVAL_MS_NOT_AT_CAPACITY (line 13) | const POLL_INTERVAL_MS_NOT_AT_CAPACITY = 2000
constant POLL_INTERVAL_MS_AT_CAPACITY (line 30) | const POLL_INTERVAL_MS_AT_CAPACITY = 600_000
constant MULTISESSION_POLL_INTERVAL_MS_NOT_AT_CAPACITY (line 38) | const MULTISESSION_POLL_INTERVAL_MS_NOT_AT_CAPACITY =
constant MULTISESSION_POLL_INTERVAL_MS_PARTIAL_CAPACITY (line 40) | const MULTISESSION_POLL_INTERVAL_MS_PARTIAL_CAPACITY =
constant MULTISESSION_POLL_INTERVAL_MS_AT_CAPACITY (line 42) | const MULTISESSION_POLL_INTERVAL_MS_AT_CAPACITY = POLL_INTERVAL_MS_AT_CA...
type PollIntervalConfig (line 44) | type PollIntervalConfig = {
constant DEFAULT_POLL_CONFIG (line 55) | const DEFAULT_POLL_CONFIG: PollIntervalConfig = {
FILE: restored-src/src/bridge/remoteBridgeCore.ts
constant ANTHROPIC_VERSION (line 74) | const ANTHROPIC_VERSION = '2023-06-01'
type ConnectCause (line 79) | type ConnectCause = 'initial' | 'proactive_refresh' | 'auth_401_recovery'
function oauthHeaders (line 81) | function oauthHeaders(accessToken: string): Record<string, string> {
type EnvLessBridgeParams (line 89) | type EnvLessBridgeParams = {
function initEnvLessBridgeCore (line 140) | async function initEnvLessBridgeCore(
function withRetry (line 892) | async function withRetry<T>(
function fetchRemoteCredentials (line 931) | async function fetchRemoteCredentials(
type ArchiveStatus (line 950) | type ArchiveStatus = number | 'timeout' | 'error' | 'no_token'
type ArchiveTelemetryStatus (line 956) | type ArchiveTelemetryStatus =
function archiveSession (line 963) | async function archiveSession(
FILE: restored-src/src/bridge/replBridge.ts
type ReplBridgeHandle (line 70) | type ReplBridgeHandle = {
type BridgeState (line 83) | type BridgeState = 'ready' | 'connected' | 'reconnecting' | 'failed'
type BridgeCoreParams (line 91) | type BridgeCoreParams = {
type BridgeCoreHandle (line 228) | type BridgeCoreHandle = ReplBridgeHandle & {
constant POLL_ERROR_INITIAL_DELAY_MS (line 244) | const POLL_ERROR_INITIAL_DELAY_MS = 2_000
constant POLL_ERROR_MAX_DELAY_MS (line 245) | const POLL_ERROR_MAX_DELAY_MS = 60_000
constant POLL_ERROR_GIVE_UP_MS (line 246) | const POLL_ERROR_GIVE_UP_MS = 15 * 60 * 1000
function initBridgeCore (line 260) | async function initBridgeCore(
function startWorkPollLoop (line 1851) | async function startWorkPollLoop({
FILE: restored-src/src/bridge/replBridgeHandle.ts
function setReplBridgeHandle (line 18) | function setReplBridgeHandle(h: ReplBridgeHandle | null): void {
function getReplBridgeHandle (line 25) | function getReplBridgeHandle(): ReplBridgeHandle | null {
function getSelfBridgeCompatId (line 33) | function getSelfBridgeCompatId(): string | undefined {
FILE: restored-src/src/bridge/replBridgeTransport.ts
type ReplBridgeTransport (line 23) | type ReplBridgeTransport = {
function createV1ReplTransport (line 78) | function createV1ReplTransport(
function createV2ReplTransport (line 119) | async function createV2ReplTransport(opts: {
FILE: restored-src/src/bridge/sessionIdCompat.ts
function setCseShimGate (line 21) | function setCseShimGate(gate: () => boolean): void {
function toCompatSessionId (line 38) | function toCompatSessionId(id: string): string {
function toInfraSessionId (line 54) | function toInfraSessionId(id: string): string {
FILE: restored-src/src/bridge/sessionRunner.ts
constant MAX_ACTIVITIES (line 16) | const MAX_ACTIVITIES = 10
constant MAX_STDERR_LINES (line 17) | const MAX_STDERR_LINES = 10
function safeFilenameId (line 24) | function safeFilenameId(id: string): string {
type PermissionRequest (line 33) | type PermissionRequest = {
type SessionSpawnerDeps (line 45) | type SessionSpawnerDeps = {
constant TOOL_VERBS (line 70) | const TOOL_VERBS: Record<string, string> = {
function toolSummary (line 91) | function toolSummary(name: string, input: Record<string, unknown>): stri...
function extractActivities (line 107) | function extractActivities(
function extractUserMessageText (line 207) | function extractUserMessageText(
function inputPreview (line 237) | function inputPreview(input: Record<string, unknown>): string {
function createSessionSpawner (line 248) | function createSessionSpawner(deps: SessionSpawnerDeps): SessionSpawner {
FILE: restored-src/src/bridge/trustedDevice.ts
constant TRUSTED_DEVICE_GATE (line 33) | const TRUSTED_DEVICE_GATE = 'tengu_sessions_elevated_auth_enforcement'
function isGateEnabled (line 35) | function isGateEnabled(): boolean {
function getTrustedDeviceToken (line 54) | function getTrustedDeviceToken(): string | undefined {
function clearTrustedDeviceTokenCache (line 61) | function clearTrustedDeviceTokenCache(): void {
function clearTrustedDeviceToken (line 72) | function clearTrustedDeviceToken(): void {
function enrollTrustedDevice (line 98) | async function enrollTrustedDevice(): Promise<void> {
FILE: restored-src/src/bridge/types.ts
constant DEFAULT_SESSION_TIMEOUT_MS (line 2) | const DEFAULT_SESSION_TIMEOUT_MS = 24 * 60 * 60 * 1000
constant BRIDGE_LOGIN_INSTRUCTION (line 5) | const BRIDGE_LOGIN_INSTRUCTION =
constant BRIDGE_LOGIN_ERROR (line 9) | const BRIDGE_LOGIN_ERROR =
constant REMOTE_CONTROL_DISCONNECTED_MSG (line 14) | const REMOTE_CONTROL_DISCONNECTED_MSG = 'Remote Control disconnected.'
type WorkData (line 18) | type WorkData = {
type WorkResponse (line 23) | type WorkResponse = {
type WorkSecret (line 33) | type WorkSecret = {
type SessionDoneStatus (line 53) | type SessionDoneStatus = 'completed' | 'failed' | 'interrupted'
type SessionActivityType (line 55) | type SessionActivityType = 'tool_start' | 'text' | 'result' | 'error'
type SessionActivity (line 57) | type SessionActivity = {
type SpawnMode (line 69) | type SpawnMode = 'single-session' | 'worktree' | 'same-dir'
type BridgeWorkerType (line 79) | type BridgeWorkerType = 'claude_code' | 'claude_code_assistant'
type BridgeConfig (line 81) | type BridgeConfig = {
type PermissionResponseEvent (line 124) | type PermissionResponseEvent = {
type BridgeApiClient (line 133) | type BridgeApiClient = {
type SessionHandle (line 178) | type SessionHandle = {
type SessionSpawnOpts (line 192) | type SessionSpawnOpts = {
type SessionSpawner (line 209) | type SessionSpawner = {
type BridgeLogger (line 213) | type BridgeLogger = {
FILE: restored-src/src/bridge/workSecret.ts
function decodeWorkSecret (line 6) | function decodeWorkSecret(secret: string): WorkSecret {
function buildSdkUrl (line 41) | function buildSdkUrl(apiBaseUrl: string, sessionId: string): string {
function sameSessionId (line 62) | function sameSessionId(a: string, b: string): boolean {
function buildCCRv2SdkUrl (line 81) | function buildCCRv2SdkUrl(
function registerWorker (line 97) | async function registerWorker(
FILE: restored-src/src/buddy/CompanionSprite.tsx
constant TICK_MS (line 16) | const TICK_MS = 500;
constant BUBBLE_SHOW (line 17) | const BUBBLE_SHOW = 20;
constant FADE_WINDOW (line 18) | const FADE_WINDOW = 6;
constant PET_BURST_MS (line 19) | const PET_BURST_MS = 2500;
constant IDLE_SEQUENCE (line 23) | const IDLE_SEQUENCE = [0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 2, 0, 0, 0];
constant PET_HEARTS (line 27) | const PET_HEARTS = [` ${H} ${H} `, ` ${H} ${H} ${H} `, ` ${H...
function wrap (line 28) | function wrap(text: string, width: number): string[] {
function SpeechBubble (line 43) | function SpeechBubble(t0) {
constant MIN_COLS_FOR_FULL_SPRITE (line 152) | const MIN_COLS_FOR_FULL_SPRITE = 100;
constant SPRITE_BODY_WIDTH (line 153) | const SPRITE_BODY_WIDTH = 12;
constant NAME_ROW_PAD (line 154) | const NAME_ROW_PAD = 2;
constant SPRITE_PADDING_X (line 155) | const SPRITE_PADDING_X = 2;
constant BUBBLE_WIDTH (line 156) | const BUBBLE_WIDTH = 36;
constant NARROW_QUIP_CAP (line 157) | const NARROW_QUIP_CAP = 24;
function spriteColWidth (line 158) | function spriteColWidth(nameWidth: number): number {
function companionReservedColumns (line 167) | function companionReservedColumns(terminalColumns: number, speaking: boo...
function CompanionSprite (line 176) | function CompanionSprite(): React.ReactNode {
function CompanionFloatingBubble (line 296) | function CompanionFloatingBubble() {
function _temp3 (line 359) | function _temp3(set) {
function _temp2 (line 362) | function _temp2(s_0) {
function _temp (line 368) | function _temp(s) {
FILE: restored-src/src/buddy/companion.ts
function mulberry32 (line 16) | function mulberry32(seed: number): () => number {
function hashString (line 27) | function hashString(s: string): number {
function pick (line 39) | function pick<T>(rng: () => number, arr: readonly T[]): T {
function rollRarity (line 43) | function rollRarity(rng: () => number): Rarity {
constant RARITY_FLOOR (line 53) | const RARITY_FLOOR: Record<Rarity, number> = {
function rollStats (line 62) | function rollStats(
constant SALT (line 84) | const SALT = 'friend-2026-401'
type Roll (line 86) | type Roll = {
function rollFrom (line 91) | function rollFrom(rng: () => number): Roll {
function roll (line 107) | function roll(userId: string): Roll {
function rollWithSeed (line 115) | function rollWithSeed(seed: string): Roll {
function companionUserId (line 119) | function companionUserId(): string {
function getCompanion (line 127) | function getCompanion(): Companion | undefined {
FILE: restored-src/src/buddy/prompt.ts
function companionIntroText (line 7) | function companionIntroText(name: string, species: string): string {
function getCompanionIntroAttachment (line 15) | function getCompanionIntroAttachment(
FILE: restored-src/src/buddy/sprites.ts
constant BODIES (line 26) | const BODIES: Record<Species, string[][]> = {
constant HAT_LINES (line 443) | const HAT_LINES: Record<Hat, string> = {
function renderSprite (line 454) | function renderSprite(bones: CompanionBones, frame = 0): string[] {
function spriteFrameCount (line 471) | function spriteFrameCount(species: Species): number {
function renderFace (line 475) | function renderFace(bones: CompanionBones): string {
FILE: restored-src/src/buddy/types.ts
constant RARITIES (line 1) | const RARITIES = [
type Rarity (line 8) | type Rarity = (typeof RARITIES)[number]
constant SPECIES (line 54) | const SPECIES = [
type Species (line 74) | type Species = (typeof SPECIES)[number] // biome-ignore format: keep com...
constant EYES (line 76) | const EYES = ['·', '✦', '×', '◉', '@', '°'] as const
type Eye (line 77) | type Eye = (typeof EYES)[number]
constant HATS (line 79) | const HATS = [
type Hat (line 89) | type Hat = (typeof HATS)[number]
constant STAT_NAMES (line 91) | const STAT_NAMES = [
type StatName (line 98) | type StatName = (typeof STAT_NAMES)[number]
type CompanionBones (line 101) | type CompanionBones = {
type CompanionSoul (line 111) | type CompanionSoul = {
type Companion (line 116) | type Companion = CompanionBones &
type StoredCompanion (line 124) | type StoredCompanion = CompanionSoul & { hatchedAt: number }
constant RARITY_WEIGHTS (line 126) | const RARITY_WEIGHTS = {
constant RARITY_STARS (line 134) | const RARITY_STARS = {
constant RARITY_COLORS (line 142) | const RARITY_COLORS = {
FILE: restored-src/src/buddy/useBuddyNotification.tsx
function isBuddyTeaserWindow (line 12) | function isBuddyTeaserWindow(): boolean {
function isBuddyLive (line 17) | function isBuddyLive(): boolean {
function RainbowText (line 22) | function RainbowText(t0) {
function _temp (line 40) | function _temp(ch, i) {
function useBuddyNotification (line 43) | function useBuddyNotification() {
function findBuddyTriggerPositions (line 79) | function findBuddyTriggerPositions(text: string): Array<{
FILE: restored-src/src/cli/exit.ts
function cliError (line 19) | function cliError(msg?: string): never {
function cliOk (line 27) | function cliOk(msg?: string): never {
FILE: restored-src/src/cli/handlers/agents.ts
function formatAgent (line 20) | function formatAgent(agent: ResolvedAgent): string {
function agentsHandler (line 32) | async function agentsHandler(): Promise<void> {
FILE: restored-src/src/cli/handlers/auth.ts
function installOAuthTokens (line 50) | async function installOAuthTokens(tokens: OAuthTokens): Promise<void> {
function authLogin (line 112) | async function authLogin({
function authStatus (line 232) | async function authStatus(opts: {
function authLogout (line 321) | async function authLogout(): Promise<void> {
FILE: restored-src/src/cli/handlers/autoMode.ts
function writeRules (line 20) | function writeRules(rules: AutoModeRules): void {
function autoModeDefaultsHandler (line 24) | function autoModeDefaultsHandler(): void {
function autoModeConfigHandler (line 35) | function autoModeConfigHandler(): void {
constant CRITIQUE_SYSTEM_PROMPT (line 49) | const CRITIQUE_SYSTEM_PROMPT =
function autoModeCritiqueHandler (line 73) | async function autoModeCritiqueHandler(options: {
function formatRulesForCritique (line 151) | function formatRulesForCritique(
FILE: restored-src/src/cli/handlers/mcp.tsx
function checkMcpServerHealth (line 26) | async function checkMcpServerHealth(name: string, server: ScopedMcpServe...
function mcpServeHandler (line 42) | async function mcpServeHandler({
function mcpRemoveHandler (line 74) | async function mcpRemoveHandler(name: string, options: {
function mcpListHandler (line 144) | async function mcpListHandler(): Promise<void> {
function mcpGetHandler (line 193) | async function mcpGetHandler(name: string): Promise<void> {
function mcpAddJsonHandler (line 286) | async function mcpAddJsonHandler(name: string, json: string, options: {
function mcpAddFromDesktopHandler (line 317) | async function mcpAddFromDesktopHandler(options: {
function mcpResetChoicesHandler (line 352) | async function mcpResetChoicesHandler(): Promise<void> {
FILE: restored-src/src/cli/handlers/plugins.ts
function handleMarketplaceError (line 68) | function handleMarketplaceError(error: unknown, action: string): never {
function printValidationResult (line 73) | function printValidationResult(result: ValidationResult): void {
function pluginValidateHandler (line 101) | async function pluginValidateHandler(
function pluginListHandler (line 157) | async function pluginListHandler(options: {
function marketplaceAddHandler (line 447) | async function marketplaceAddHandler(
function marketplaceListHandler (line 527) | async function marketplaceListHandler(options: {
function marketplaceRemoveHandler (line 595) | async function marketplaceRemoveHandler(
function marketplaceUpdateHandler (line 616) | async function marketplaceUpdateHandler(
function pluginInstallHandler (line 668) | async function pluginInstallHandler(
function pluginUninstallHandler (line 704) | async function pluginUninstallHandler(
function pluginEnableHandler (line 740) | async function pluginEnableHandler(
function pluginDisableHandler (line 782) | async function pluginDisableHandler(
function pluginUpdateHandler (line 846) | async function pluginUpdateHandler(
FILE: restored-src/src/cli/handlers/util.tsx
function setupTokenHandler (line 20) | async function setupTokenHandler(root: Root): Promise<void> {
function DoctorWithPlugins (line 56) | function DoctorWithPlugins(t0) {
function doctorHandler (line 72) | async function doctorHandler(root: Root): Promise<void> {
function installHandler (line 90) | async function installHandler(target: string | undefined, options: {
FILE: restored-src/src/cli/ndjsonSafeStringify.ts
constant JS_LINE_TERMINATORS (line 16) | const JS_LINE_TERMINATORS = /\u2028|\u2029/g
function escapeJsLineTerminators (line 18) | function escapeJsLineTerminators(json: string): string {
function ndjsonSafeStringify (line 30) | function ndjsonSafeStringify(value: unknown): string {
FILE: restored-src/src/cli/print.ts
constant SHUTDOWN_TEAM_PROMPT (line 379) | const SHUTDOWN_TEAM_PROMPT = `<system-reminder>
constant MAX_RECEIVED_UUIDS (line 394) | const MAX_RECEIVED_UUIDS = 10_000
function trackReceivedMessageUuid (line 398) | function trackReceivedMessageUuid(uuid: UUID): boolean {
type PromptValue (line 417) | type PromptValue = string | ContentBlockParam[]
function toBlocks (line 419) | function toBlocks(v: PromptValue): ContentBlockParam[] {
function joinPromptValues (line 428) | function joinPromptValues(values: PromptValue[]): PromptValue {
function canBatchWith (line 443) | function canBatchWith(
function runHeadless (line 455) | async function runHeadless(
function runHeadlessStreaming (line 976) | function runHeadlessStreaming(
function createCanUseToolWithPermissionPrompt (line 4149) | function createCanUseToolWithPermissionPrompt(
function getCanUseToolFn (line 4267) | function getCanUseToolFn(
function handleInitializeRequest (line 4336) | async function handleInitializeRequest(
function handleRewindFiles (line 4520) | async function handleRewindFiles(
function handleSetPermissionMode (line 4568) | function handleSetPermissionMode(
function handleChannelEnable (line 4662) | function handleChannelEnable(
function reregisterChannelHandlerAfterReconnect (line 4786) | function reregisterChannelHandlerAfterReconnect(
function emitLoadError (line 4841) | function emitLoadError(
function removeInterruptedMessage (line 4875) | function removeInterruptedMessage(
type LoadInitialMessagesResult (line 4887) | type LoadInitialMessagesResult = {
function loadInitialMessages (line 4893) | async function loadInitialMessages(
function getStructuredIO (line 5199) | function getStructuredIO(
function handleOrphanedPermissionResponse (line 5241) | async function handleOrphanedPermissionResponse({
type DynamicMcpState (line 5306) | type DynamicMcpState = {
function toScopedConfig (line 5316) | function toScopedConfig(
type SdkMcpState (line 5328) | type SdkMcpState = {
type McpSetServersResult (line 5337) | type McpSetServersResult = {
function handleMcpSetServers (line 5353) | async function handleMcpSetServers(
function reconcileMcpServers (line 5450) | async function reconcileMcpServers(
FILE: restored-src/src/cli/remoteIO.ts
class RemoteIO (line 35) | class RemoteIO extends StructuredIO {
method constructor (line 44) | constructor(
method flushInternalEvents (line 217) | override flushInternalEvents(): Promise<void> {
method internalEventsPending (line 221) | override get internalEventsPending(): number {
method write (line 231) | async write(message: StdoutMessage): Promise<void> {
method close (line 247) | close(): void {
FILE: restored-src/src/cli/structuredIO.ts
constant SANDBOX_NETWORK_ACCESS_TOOL_NAME (line 62) | const SANDBOX_NETWORK_ACCESS_TOOL_NAME = 'SandboxNetworkAccess'
function serializeDecisionReason (line 64) | function serializeDecisionReason(
function buildRequiresActionDetails (line 93) | function buildRequiresActionDetails(
type PendingRequest (line 119) | type PendingRequest<T> = {
constant MAX_RESOLVED_TOOL_USE_IDS (line 133) | const MAX_RESOLVED_TOOL_USE_IDS = 1000
class StructuredIO (line 135) | class StructuredIO {
method constructor (line 164) | constructor(
method trackResolvedToolUseId (line 176) | private trackResolvedToolUseId(request: SDKControlRequest): void {
method flushInternalEvents (line 190) | flushInternalEvents(): Promise<void> {
method internalEventsPending (line 195) | get internalEventsPending(): number {
method prependUserMessage (line 204) | prependUserMessage(content: string): void {
method read (line 215) | private async *read() {
method getPendingPermissionRequests (line 263) | getPendingPermissionRequests() {
method setUnexpectedResponseCallback (line 269) | setUnexpectedResponseCallback(
method injectControlResponse (line 283) | injectControlResponse(response: SDKControlResponse): void {
method setOnControlRequestSent (line 316) | setOnControlRequestSent(
method setOnControlRequestResolved (line 327) | setOnControlRequestResolved(
method processLine (line 333) | private async processLine(
method write (line 465) | async write(message: StdoutMessage): Promise<void> {
method sendRequest (line 469) | private async sendRequest<Response>(
method createCanUseTool (line 533) | createCanUseTool(
method createHookCallback (line 661) | createHookCallback(callbackId: string, timeout?: number): HookCallback {
method handleElicitation (line 694) | async handleElicitation(
method createSandboxAskCallback (line 731) | createSandboxAskCallback(): (hostPattern: {
method sendMcpMessage (line 758) | async sendMcpMessage(
function exitWithMessage (line 776) | function exitWithMessage(message: string): never {
function executePermissionRequestHooksForSDK (line 787) | async function executePermissionRequestHooksForSDK(
FILE: restored-src/src/cli/transports/HybridTransport.ts
constant BATCH_FLUSH_INTERVAL_MS (line 12) | const BATCH_FLUSH_INTERVAL_MS = 100
constant POST_TIMEOUT_MS (line 15) | const POST_TIMEOUT_MS = 15_000
constant CLOSE_GRACE_MS (line 22) | const CLOSE_GRACE_MS = 3000
class HybridTransport (line 54) | class HybridTransport extends WebSocketTransport {
method constructor (line 63) | constructor(
method write (line 117) | override async write(message: StdoutMessage): Promise<void> {
method writeBatch (line 135) | async writeBatch(messages: StdoutMessage[]): Promise<void> {
method droppedBatchCount (line 141) | get droppedBatchCount(): number {
method flush (line 149) | flush(): Promise<void> {
method takeStreamEvents (line 155) | private takeStreamEvents(): StdoutMessage[] {
method flushStreamEvents (line 166) | private flushStreamEvents(): void {
method close (line 171) | override close(): void {
method postOnce (line 202) | private async postOnce(events: StdoutMessage[]): Promise<void> {
function convertWsUrlToPostUrl (line 269) | function convertWsUrlToPostUrl(wsUrl: URL): string {
FILE: restored-src/src/cli/transports/SSETransport.ts
constant RECONNECT_BASE_DELAY_MS (line 16) | const RECONNECT_BASE_DELAY_MS = 1000
constant RECONNECT_MAX_DELAY_MS (line 17) | const RECONNECT_MAX_DELAY_MS = 30_000
constant RECONNECT_GIVE_UP_MS (line 19) | const RECONNECT_GIVE_UP_MS = 600_000
constant LIVENESS_TIMEOUT_MS (line 21) | const LIVENESS_TIMEOUT_MS = 45_000
constant PERMANENT_HTTP_CODES (line 27) | const PERMANENT_HTTP_CODES = new Set([401, 403, 404])
constant POST_MAX_RETRIES (line 30) | const POST_MAX_RETRIES = 10
constant POST_BASE_DELAY_MS (line 31) | const POST_BASE_DELAY_MS = 500
constant POST_MAX_DELAY_MS (line 32) | const POST_MAX_DELAY_MS = 8000
constant STREAM_DECODE_OPTS (line 35) | const STREAM_DECODE_OPTS: TextDecodeOptions = { stream: true }
function alwaysValidStatus (line 38) | function alwaysValidStatus(): boolean {
type SSEFrame (line 46) | type SSEFrame = {
function parseSSEFrames (line 58) | function parseSSEFrames(buffer: string): {
type SSETransportState (line 122) | type SSETransportState =
type StreamClientEvent (line 136) | type StreamClientEvent = {
class SSETransport (line 162) | class SSETransport implements Transport {
method constructor (line 190) | constructor(
method getLastSequenceNum (line 227) | getLastSequenceNum(): number {
method connect (line 231) | async connect(): Promise<void> {
method readStream (line 339) | private async readStream(body: ReadableStream<Uint8Array>): Promise<vo...
method handleSSEFrame (line 425) | private handleSSEFrame(eventType: string, data: string): void {
method handleConnectionError (line 470) | private handleConnectionError(): void {
method resetLivenessTimer (line 556) | private resetLivenessTimer(): void {
method clearLivenessTimer (line 561) | private clearLivenessTimer(): void {
method write (line 572) | async write(message: StdoutMessage): Promise<void> {
method isConnectedStatus (line 659) | isConnectedStatus(): boolean {
method isClosedStatus (line 663) | isClosedStatus(): boolean {
method setOnData (line 667) | setOnData(callback: (data: string) => void): void {
method setOnClose (line 671) | setOnClose(callback: (closeCode?: number) => void): void {
method setOnEvent (line 675) | setOnEvent(callback: (event: StreamClientEvent) => void): void {
method close (line 679) | close(): void {
function convertSSEUrlToPostUrl (line 704) | function convertSSEUrlToPostUrl(sseUrl: URL): string {
FILE: restored-src/src/cli/transports/SerialBatchEventUploader.ts
class RetryableError (line 26) | class RetryableError extends Error {
method constructor (line 27) | constructor(
type SerialBatchEventUploaderConfig (line 35) | type SerialBatchEventUploaderConfig<T> = {
class SerialBatchEventUploader (line 64) | class SerialBatchEventUploader<T> {
method constructor (line 75) | constructor(config: SerialBatchEventUploaderConfig<T>) {
method droppedBatchCount (line 84) | get droppedBatchCount(): number {
method pendingCount (line 92) | get pendingCount(): number {
method enqueue (line 101) | async enqueue(events: T | T[]): Promise<void> {
method flush (line 125) | flush(): Promise<void> {
method close (line 139) | close(): void {
method drain (line 156) | private async drain(): Promise<void> {
method takeBatch (line 213) | private takeBatch(): T[] {
method retryDelay (line 235) | private retryDelay(failures: number, retryAfterMs?: number): number {
method releaseBackpressure (line 255) | private releaseBackpressure(): void {
method sleep (line 261) | private sleep(ms: number): Promise<void> {
FILE: restored-src/src/cli/transports/WebSocketTransport.ts
constant KEEP_ALIVE_FRAME (line 20) | const KEEP_ALIVE_FRAME = '{"type":"keep_alive"}\n'
constant DEFAULT_MAX_BUFFER_SIZE (line 22) | const DEFAULT_MAX_BUFFER_SIZE = 1000
constant DEFAULT_BASE_RECONNECT_DELAY (line 23) | const DEFAULT_BASE_RECONNECT_DELAY = 1000
constant DEFAULT_MAX_RECONNECT_DELAY (line 24) | const DEFAULT_MAX_RECONNECT_DELAY = 30000
constant DEFAULT_RECONNECT_GIVE_UP_MS (line 26) | const DEFAULT_RECONNECT_GIVE_UP_MS = 600_000
constant DEFAULT_PING_INTERVAL (line 27) | const DEFAULT_PING_INTERVAL = 10000
constant DEFAULT_KEEPALIVE_INTERVAL (line 28) | const DEFAULT_KEEPALIVE_INTERVAL = 300_000 // 5 minutes
constant SLEEP_DETECTION_THRESHOLD_MS (line 36) | const SLEEP_DETECTION_THRESHOLD_MS = DEFAULT_MAX_RECONNECT_DELAY * 2 // 60s
constant PERMANENT_CLOSE_CODES (line 42) | const PERMANENT_CLOSE_CODES = new Set([
type WebSocketTransportOptions (line 48) | type WebSocketTransportOptions = {
type WebSocketTransportState (line 60) | type WebSocketTransportState =
type WebSocketLike (line 68) | type WebSocketLike = {
class WebSocketTransport (line 74) | class WebSocketTransport implements Transport {
method constructor (line 119) | constructor(
method connect (line 135) | public async connect(): Promise<void> {
method handleOpenEvent (line 296) | private handleOpenEvent(): void {
method sendLine (line 331) | protected sendLine(line: string): boolean {
method removeWsListeners (line 360) | private removeWsListeners(ws: WebSocketLike): void {
method doDisconnect (line 380) | protected doDisconnect(): void {
method handleConnectionError (line 397) | private handleConnectionError(closeCode?: number): void {
method close (line 556) | close(): void {
method replayBufferedMessages (line 574) | private replayBufferedMessages(lastId: string): void {
method isConnectedStatus (line 636) | isConnectedStatus(): boolean {
method isClosedStatus (line 640) | isClosedStatus(): boolean {
method setOnData (line 644) | setOnData(callback: (data: string) => void): void {
method setOnConnect (line 648) | setOnConnect(callback: () => void): void {
method setOnClose (line 652) | setOnClose(callback: (closeCode?: number) => void): void {
method getStateLabel (line 656) | getStateLabel(): string {
method write (line 660) | async write(message: StdoutMessage): Promise<void> {
method getControlMessageDetailLabel (line 683) | private getControlMessageDetailLabel(message: StdoutMessage): string {
method startPingInterval (line 697) | private startPingInterval(): void {
method stopPingInterval (line 760) | private stopPingInterval(): void {
method startKeepaliveInterval (line 767) | private startKeepaliveInterval(): void {
method stopKeepaliveInterval (line 794) | private stopKeepaliveInterval(): void {
FILE: restored-src/src/cli/transports/WorkerStateUploader.ts
type WorkerStateUploaderConfig (line 19) | type WorkerStateUploaderConfig = {
class WorkerStateUploader (line 29) | class WorkerStateUploader {
method constructor (line 35) | constructor(config: WorkerStateUploaderConfig) {
method enqueue (line 43) | enqueue(patch: Record<string, unknown>): void {
method close (line 49) | close(): void {
method drain (line 54) | private async drain(): Promise<void> {
method sendWithRetry (line 70) | private async sendWithRetry(payload: Record<string, unknown>): Promise...
method retryDelay (line 88) | private retryDelay(failures: number): number {
function coalescePatches (line 106) | function coalescePatches(
FILE: restored-src/src/cli/transports/ccrClient.ts
constant DEFAULT_HEARTBEAT_INTERVAL_MS (line 33) | const DEFAULT_HEARTBEAT_INTERVAL_MS = 20_000
constant STREAM_EVENT_FLUSH_INTERVAL_MS (line 42) | const STREAM_EVENT_FLUSH_INTERVAL_MS = 100
function alwaysValidStatus (line 45) | function alwaysValidStatus(): boolean {
type CCRInitFailReason (line 49) | type CCRInitFailReason =
class CCRInitError (line 55) | class CCRInitError extends Error {
method constructor (line 56) | constructor(readonly reason: CCRInitFailReason) {
constant MAX_CONSECUTIVE_AUTH_FAILURES (line 68) | const MAX_CONSECUTIVE_AUTH_FAILURES = 10
type EventPayload (line 70) | type EventPayload = {
type ClientEvent (line 76) | type ClientEvent = {
type CoalescedStreamEvent (line 86) | type CoalescedStreamEvent = {
type StreamAccumulatorState (line 104) | type StreamAccumulatorState = {
function createStreamAccumulator (line 116) | function createStreamAccumulator(): StreamAccumulatorState {
function scopeKey (line 120) | function scopeKey(m: {
function accumulateStreamEvents (line 141) | function accumulateStreamEvents(
function clearStreamAccumulatorForMessage (line 210) | function clearStreamAccumulatorForMessage(
type RequestResult (line 225) | type RequestResult = { ok: true } | { ok: false; retryAfterMs?: number }
type WorkerEvent (line 227) | type WorkerEvent = {
type InternalEvent (line 233) | type InternalEvent = {
type ListInternalEventsResponse (line 243) | type ListInternalEventsResponse = {
type WorkerStateResponse (line 248) | type WorkerStateResponse = {
class CCRClient (line 262) | class CCRClient {
method constructor (line 310) | constructor(
method initialize (line 459) | async initialize(epoch?: number): Promise<Record<string, unknown> | nu...
method getWorkerState (line 530) | private async getWorkerState(): Promise<{
method request (line 556) | private async request(
method reportState (line 645) | reportState(state: SessionState, details?: RequiresActionDetails): void {
method reportMetadata (line 661) | reportMetadata(metadata: Record<string, unknown>): void {
method handleEpochMismatch (line 669) | private handleEpochMismatch(): never {
method startHeartbeat (line 678) | private startHeartbeat(): void {
method stopHeartbeat (line 698) | private stopHeartbeat(): void {
method sendHeartbeat (line 706) | private async sendHeartbeat(): Promise<void> {
method writeEvent (line 735) | async writeEvent(message: StdoutMessage): Promise<void> {
method toClientEvent (line 754) | private toClientEvent(message: StdoutMessage): ClientEvent {
method flushStreamEventBuffer (line 771) | private async flushStreamEventBuffer(): Promise<void> {
method writeInternalEvent (line 793) | async writeInternalEvent(
method flushInternalEvents (line 820) | flushInternalEvents(): Promise<void> {
method flush (line 831) | async flush(): Promise<void> {
method readInternalEvents (line 842) | async readInternalEvents(): Promise<InternalEvent[] | null> {
method readSubagentInternalEvents (line 852) | async readSubagentInternalEvents(): Promise<InternalEvent[] | null> {
method paginatedGet (line 864) | private async paginatedGet(
method getWithRetry (line 905) | private async getWithRetry<T>(
method reportDelivery (line 964) | reportDelivery(
method getWorkerEpoch (line 972) | getWorkerEpoch(): number {
method internalEventsPending (line 977) | get internalEventsPending(): number {
method close (line 982) | close(): void {
FILE: restored-src/src/cli/transports/transportUtils.ts
function getTransportForUrl (line 16) | function getTransportForUrl(
FILE: restored-src/src/cli/update.ts
function update (line 30) | async function update() {
FILE: restored-src/src/commands.ts
method getPromptForCommand (line 197) | async getPromptForCommand(args, context) {
constant INTERNAL_ONLY_COMMANDS (line 225) | const INTERNAL_ONLY_COMMANDS = [
constant COMMANDS (line 258) | const COMMANDS = memoize((): Command[] => [
function getSkills (line 353) | async function getSkills(cwd: string): Promise<{
function meetsAvailabilityRequirement (line 417) | function meetsAvailabilityRequirement(cmd: Command): boolean {
function getCommands (line 476) | async function getCommands(cwd: string): Promise<Command[]> {
function clearCommandMemoizationCaches (line 523) | function clearCommandMemoizationCaches(): void {
function clearCommandsCache (line 534) | function clearCommandsCache(): void {
function getMcpSkillCommands (line 547) | function getMcpSkillCommands(
constant REMOTE_SAFE_COMMANDS (line 619) | const REMOTE_SAFE_COMMANDS: Set<Command> = new Set([
constant BRIDGE_SAFE_COMMANDS (line 651) | const BRIDGE_SAFE_COMMANDS: Set<Command> = new Set(
function isBridgeSafeCommand (line 672) | function isBridgeSafeCommand(cmd: Command): boolean {
function filterCommandsForRemoteMode (line 684) | function filterCommandsForRemoteMode(commands: Command[]): Command[] {
function findCommand (line 688) | function findCommand(
function hasCommand (line 700) | function hasCommand(commandName: string, commands: Command[]): boolean {
function getCommand (line 704) | function getCommand(commandName: string, commands: Command[]): Command {
function formatDescriptionWithSource (line 728) | function formatDescriptionWithSource(cmd: Command): string {
FILE: restored-src/src/commands/add-dir/add-dir.tsx
function AddDirError (line 15) | function AddDirError(t0) {
function call (line 65) | async function call(onDone: LocalJSXCommandOnDone, context: LocalJSXComm...
FILE: restored-src/src/commands/add-dir/validation.ts
type AddDirectoryResult (line 12) | type AddDirectoryResult =
function validateDirectoryForWorkspace (line 31) | async function validateDirectoryForWorkspace(
function addDirHelpMessage (line 95) | function addDirHelpMessage(result: AddDirectoryResult): string {
FILE: restored-src/src/commands/advisor.ts
method isHidden (line 102) | get isHidden() {
FILE: restored-src/src/commands/agents/agents.tsx
function call (line 6) | async function call(onDone: LocalJSXCommandOnDone, context: ToolUseConte...
FILE: restored-src/src/commands/branch/branch.ts
type TranscriptEntry (line 26) | type TranscriptEntry = TranscriptMessage & {
function deriveFirstPrompt (line 38) | function deriveFirstPrompt(
function createFork (line 61) | async function createFork(customTitle?: string): Promise<{
function getUniqueForkName (line 179) | async function getUniqueForkName(baseName: string): Promise<string> {
function call (line 222) | async function call(
FILE: restored-src/src/commands/bridge-kick.ts
constant USAGE (line 40) | const USAGE = `/bridge-kick <subcommand>
FILE: restored-src/src/commands/bridge/bridge.tsx
type Props (line 21) | type Props = {
function BridgeToggle (line 38) | function BridgeToggle(t0) {
function _temp3 (line 146) | function _temp3(s_1) {
function _temp2 (line 149) | function _temp2(s_0) {
function _temp (line 152) | function _temp(s) {
function BridgeDisconnectDialog (line 155) | function BridgeDisconnectDialog(t0) {
function _temp10 (line 432) | function _temp10(line, i_1) {
function _temp1 (line 435) | function _temp1(l) {
function _temp0 (line 438) | function _temp0(i_0) {
function _temp9 (line 441) | function _temp9(i) {
function _temp8 (line 444) | function _temp8(prev_0) {
function _temp7 (line 447) | function _temp7(prev) {
function _temp6 (line 458) | function _temp6(s_1) {
function _temp5 (line 461) | function _temp5(s_0) {
function _temp4 (line 464) | function _temp4(s) {
function checkBridgePrerequisites (line 467) | async function checkBridgePrerequisites(): Promise<string | null> {
function call (line 505) | async function call(onDone: LocalJSXCommandOnDone, _context: ToolUseCont...
FILE: restored-src/src/commands/bridge/index.ts
function isEnabled (line 5) | function isEnabled(): boolean {
method isHidden (line 19) | get isHidden() {
FILE: restored-src/src/commands/brief.ts
type BriefConfig (line 27) | type BriefConfig = z.infer<ReturnType<typeof briefConfigSchema>>
constant DEFAULT_BRIEF_CONFIG (line 29) | const DEFAULT_BRIEF_CONFIG: BriefConfig = {
function getBriefConfig (line 38) | function getBriefConfig(): BriefConfig {
method call (line 60) | async call(
FILE: restored-src/src/commands/btw/btw.tsx
type BtwComponentProps (line 26) | type BtwComponentProps = {
constant CHROME_ROWS (line 33) | const CHROME_ROWS = 5;
constant OUTER_CHROME_ROWS (line 34) | const OUTER_CHROME_ROWS = 6;
constant SCROLL_LINES (line 35) | const SCROLL_LINES = 3;
function BtwSideQuestion (line 36) | function BtwSideQuestion(t0) {
function _temp (line 198) | function _temp(f) {
function stripInProgressAssistantMessage (line 201) | function stripInProgressAssistantMessage(messages: Message[]): Message[] {
function buildCacheSafeParams (line 208) | async function buildCacheSafeParams(context: ProcessUserInputContext): P...
function call (line 229) | async function call(onDone: LocalJSXCommandOnDone, context: ProcessUserI...
FILE: restored-src/src/commands/chrome/chrome.tsx
constant CHROME_EXTENSION_URL (line 14) | const CHROME_EXTENSION_URL = 'https://claude.ai/chrome';
constant CHROME_PERMISSIONS_URL (line 15) | const CHROME_PERMISSIONS_URL = 'https://clau.de/chrome/permissions';
constant CHROME_RECONNECT_URL (line 16) | const CHROME_RECONNECT_URL = 'https://clau.de/chrome/reconnect';
type MenuAction (line 17) | type MenuAction = 'install-extension' | 'reconnect' | 'manage-permission...
type Props (line 18) | type Props = {
function ClaudeInChromeMenu (line 25) | function ClaudeInChromeMenu(t0) {
function _temp5 (line 263) | function _temp5(k) {
function _temp4 (line 266) | function _temp4(k_0) {
function _temp3 (line 269) | function _temp3(k_1) {
function _temp2 (line 272) | function _temp2(c) {
function _temp (line 275) | function _temp(s) {
FILE: restored-src/src/commands/clear/caches.ts
function clearSessionCaches (line 47) | function clearSessionCaches(
FILE: restored-src/src/commands/clear/conversation.ts
function clearConversation (line 49) | async function clearConversation({
FILE: restored-src/src/commands/color/color.ts
constant RESET_ALIASES (line 18) | const RESET_ALIASES = ['default', 'reset', 'none', 'gray', 'grey'] as const
function call (line 20) | async function call(
FILE: restored-src/src/commands/commit-push-pr.ts
constant ALLOWED_TOOLS (line 10) | const ALLOWED_TOOLS = [
function getPromptContent (line 26) | function getPromptContent(
method contentLength (line 113) | get contentLength() {
method getPromptForCommand (line 119) | async getPromptForCommand(args, context) {
FILE: restored-src/src/commands/commit.ts
constant ALLOWED_TOOLS (line 6) | const ALLOWED_TOOLS = [
function getPromptContent (line 12) | function getPromptContent(): string {
method getPromptForCommand (line 65) | async getPromptForCommand(_args, context) {
FILE: restored-src/src/commands/compact/compact.ts
function compactViaReactive (line 139) | async function compactViaReactive(
function buildDisplayText (line 230) | function buildDisplayText(
function getCacheSharingParams (line 250) | async function getCacheSharingParams(
FILE: restored-src/src/commands/context/context-noninteractive.ts
type CollectContextDataInput (line 22) | type CollectContextDataInput = {
function collectContextData (line 34) | async function collectContextData(
function call (line 79) | async function call(
function formatContextAsMarkdownTable (line 90) | function formatContextAsMarkdownTable(data: ContextData): string {
FILE: restored-src/src/commands/context/context.tsx
function toApiView (line 18) | function toApiView(messages: Message[]): Message[] {
function call (line 30) | async function call(onDone: LocalJSXCommandOnDone, context: LocalJSXComm...
FILE: restored-src/src/commands/context/index.ts
method isHidden (line 17) | get isHidden() {
method isEnabled (line 20) | isEnabled() {
FILE: restored-src/src/commands/copy/copy.tsx
constant COPY_DIR (line 23) | const COPY_DIR = join(tmpdir(), 'claude');
constant RESPONSE_FILENAME (line 24) | const RESPONSE_FILENAME = 'response.md';
constant MAX_LOOKBACK (line 25) | const MAX_LOOKBACK = 20;
type CodeBlock (line 26) | type CodeBlock = {
function extractCodeBlocks (line 30) | function extractCodeBlocks(markdown: string): CodeBlock[] {
function collectRecentAssistantTexts (line 50) | function collectRecentAssistantTexts(messages: Message[]): string[] {
function fileExtension (line 62) | function fileExtension(lang: string | undefined): string {
function writeToFile (line 73) | async function writeToFile(text: string, filename: string): Promise<stri...
function copyOrWriteToFile (line 81) | async function copyOrWriteToFile(text: string, filename: string): Promis...
function truncateLine (line 95) | function truncateLine(text: string, maxLen: number): string {
type PickerProps (line 111) | type PickerProps = {
type PickerSelection (line 119) | type PickerSelection = number | 'full' | 'always';
function CopyPicker (line 120) | function CopyPicker(t0) {
function _temp2 (line 320) | function _temp2(c) {
function _temp (line 326) | function _temp(block, index) {
FILE: restored-src/src/commands/cost/index.ts
method isHidden (line 12) | get isHidden() {
FILE: restored-src/src/commands/createMovedToPluginCommand.ts
type Options (line 5) | type Options = {
function createMovedToPluginCommand (line 22) | function createMovedToPluginCommand({
FILE: restored-src/src/commands/desktop/desktop.tsx
function call (line 4) | async function call(onDone: (result?: string, options?: {
FILE: restored-src/src/commands/desktop/index.ts
function isSupportedPlatform (line 3) | function isSupportedPlatform(): boolean {
method isHidden (line 20) | get isHidden() {
FILE: restored-src/src/commands/effort/effort.tsx
constant COMMON_HELP_ARGS (line 9) | const COMMON_HELP_ARGS = ['help', '-h', '--help'];
type EffortCommandResult (line 10) | type EffortCommandResult = {
function setEffortValue (line 16) | function setEffortValue(effortValue: EffortValue): EffortCommandResult {
function showCurrentEffort (line 62) | function showCurrentEffort(appStateEffort: EffortValue | undefined, mode...
function unsetEffortLevel (line 76) | function unsetEffortLevel(): EffortCommandResult {
function executeEffort (line 107) | function executeEffort(args: string): EffortCommandResult {
function ShowCurrentEffort (line 119) | function ShowCurrentEffort(t0) {
function _temp (line 131) | function _temp(s) {
function ApplyEffortAndClose (line 134) | function ApplyEffortAndClose(t0) {
function call (line 171) | async function call(onDone: LocalJSXCommandOnDone, _context: unknown, ar...
FILE: restored-src/src/commands/effort/index.ts
method immediate (line 9) | get immediate() {
FILE: restored-src/src/commands/exit/exit.tsx
constant GOODBYE_MESSAGES (line 10) | const GOODBYE_MESSAGES = ['Goodbye!', 'See ya!', 'Bye!', 'Catch you late...
function getRandomGoodbyeMessage (line 11) | function getRandomGoodbyeMessage(): string {
function call (line 14) | async function call(onDone: LocalJSXCommandOnDone): Promise<React.ReactN...
FILE: restored-src/src/commands/export/export.tsx
function formatTimestamp (line 10) | function formatTimestamp(date: Date): string {
function extractFirstPrompt (line 19) | function extractFirstPrompt(messages: Message[]): string {
function sanitizeFilename (line 42) | function sanitizeFilename(text: string): string {
function exportWithReactRenderer (line 49) | async function exportWithReactRenderer(context: ToolUseContext): Promise...
function call (line 53) | async function call(onDone: LocalJSXCommandOnDone, context: ToolUseConte...
FILE: restored-src/src/commands/extra-usage/extra-usage-core.ts
type ExtraUsageResult (line 14) | type ExtraUsageResult =
function runExtraUsage (line 18) | async function runExtraUsage(): Promise<ExtraUsageResult> {
FILE: restored-src/src/commands/extra-usage/extra-usage-noninteractive.ts
function call (line 3) | async function call(): Promise<{ type: 'text'; value: string }> {
FILE: restored-src/src/commands/extra-usage/extra-usage.tsx
function call (line 6) | async function call(onDone: LocalJSXCommandOnDone, context: LocalJSXComm...
FILE: restored-src/src/commands/extra-usage/index.ts
function isExtraUsageAllowed (line 6) | function isExtraUsageAllowed(): boolean {
method isHidden (line 27) | get isHidden() {
FILE: restored-src/src/commands/fast/fast.tsx
function applyFastMode (line 16) | function applyFastMode(enable: boolean, setAppState: (f: (prev: AppState...
function FastModePicker (line 41) | function FastModePicker(t0) {
function _temp4 (line 211) | function _temp4(prev_0) {
function _temp3 (line 214) | function _temp3(prev) {
function _temp2 (line 220) | function _temp2(s_0) {
function _temp (line 223) | function _temp(s) {
function handleFastModeShortcut (line 226) | async function handleFastModeShortcut(enable: boolean, getAppState: () =...
function call (line 248) | async function call(onDone: LocalJSXCommandOnDone, context: LocalJSXComm...
FILE: restored-src/src/commands/fast/index.ts
method description (line 11) | get description() {
method isHidden (line 16) | get isHidden() {
method immediate (line 20) | get immediate() {
FILE: restored-src/src/commands/feedback/feedback.tsx
function renderFeedbackComponent (line 8) | function renderFeedbackComponent(onDone: (result?: string, options?: {
function call (line 21) | async function call(onDone: LocalJSXCommandOnDone, context: LocalJSXComm...
FILE: restored-src/src/commands/files/files.ts
function call (line 7) | async function call(
FILE: restored-src/src/commands/heapdump/heapdump.ts
function call (line 3) | async function call(): Promise<{ type: 'text'; value: string }> {
FILE: restored-src/src/commands/ide/ide.tsx
type IDEScreenProps (line 18) | type IDEScreenProps = {
function IDEScreen (line 25) | function IDEScreen(t0) {
function _temp3 (line 198) | function _temp3(ide_3, index) {
function _temp2 (line 201) | function _temp2(ide_2) {
function _temp (line 204) | function _temp(acc, ide_0) {
function findCurrentIDE (line 208) | async function findCurrentIDE(availableIDEs: DetectedIDEInfo[], dynamicM...
type IDEOpenSelectionProps (line 220) | type IDEOpenSelectionProps = {
function IDEOpenSelection (line 227) | function IDEOpenSelection(t0) {
function _temp4 (line 310) | function _temp4(ide_0) {
function RunningIDESelector (line 316) | function RunningIDESelector(t0) {
function _temp5 (line 389) | function _temp5(ide) {
function InstallOnMount (line 395) | function InstallOnMount(t0) {
function call (line 419) | async function call(onDone: (result?: string, options?: {
constant IDE_CONNECTION_TIMEOUT_MS (line 507) | const IDE_CONNECTION_TIMEOUT_MS = 35000;
type IDECommandFlowProps (line 508) | type IDECommandFlowProps = {
function IDECommandFlow (line 518) | function IDECommandFlow({
function formatWorkspaceFolders (line 612) | function formatWorkspaceFolders(folders: string[], maxLength: number = 1...
FILE: restored-src/src/commands/init-verifiers.ts
method getPromptForCommand (line 11) | async getPromptForCommand() {
FILE: restored-src/src/commands/init.ts
constant OLD_INIT_PROMPT (line 6) | const OLD_INIT_PROMPT = `Please analyze this codebase and create a CLAUD...
constant NEW_INIT_PROMPT (line 28) | const NEW_INIT_PROMPT = `Set up a minimal CLAUDE.md (and optionally skil...
method description (line 229) | get description() {
method getPromptForCommand (line 239) | async getPromptForCommand() {
FILE: restored-src/src/commands/insights.ts
function getAnalysisModel (line 41) | function getAnalysisModel(): string {
function getInsightsModel (line 46) | function getInsightsModel(): string {
type RemoteHostInfo (line 54) | type RemoteHostInfo = {
type SessionMeta (line 228) | type SessionMeta = {
type SessionFacets (line 260) | type SessionFacets = {
type AggregatedData (line 275) | type AggregatedData = {
constant EXTENSION_TO_LANGUAGE (line 332) | const EXTENSION_TO_LANGUAGE: Record<string, string> = {
constant LABEL_MAP (line 352) | const LABEL_MAP: Record<string, string> = {
function getDataDir (line 420) | function getDataDir(): string {
function getFacetsDir (line 423) | function getFacetsDir(): string {
function getSessionMetaDir (line 426) | function getSessionMetaDir(): string {
constant FACET_EXTRACTION_PROMPT (line 430) | const FACET_EXTRACTION_PROMPT = `Analyze this Claude Code session and ex...
function getLanguageFromPath (line 462) | function getLanguageFromPath(filePath: string): string | null {
function extractToolStats (line 467) | function extractToolStats(log: LogOption): {
function hasValidDates (line 730) | function hasValidDates(log: LogOption): boolean {
function logToSessionMeta (line 737) | function logToSessionMeta(log: LogOption): SessionMeta {
function deduplicateSessionBranches (line 812) | function deduplicateSessionBranches(
function formatTranscriptForFacets (line 831) | function formatTranscriptForFacets(log: LogOption): string {
constant SUMMARIZE_CHUNK_PROMPT (line 870) | const SUMMARIZE_CHUNK_PROMPT = `Summarize this portion of a Claude Code ...
function summarizeTranscriptChunk (line 881) | async function summarizeTranscriptChunk(chunk: string): Promise<string> {
function formatTranscriptWithSummarization (line 906) | async function formatTranscriptWithSummarization(
function loadCachedFacets (line 941) | async function loadCachedFacets(
function saveFacets (line 963) | async function saveFacets(facets: SessionFacets): Promise<void> {
function loadCachedSessionMeta (line 976) | async function loadCachedSessionMeta(
function saveSessionMeta (line 988) | async function saveSessionMeta(meta: SessionMeta): Promise<void> {
function extractFacetsFromAPI (line 1001) | async function extractFacetsFromAPI(
function detectMultiClauding (line 1062) | function detectMultiClauding(
function aggregateData (line 1145) | function aggregateData(
type InsightSection (line 1329) | type InsightSection = {
constant INSIGHT_SECTIONS (line 1336) | const INSIGHT_SECTIONS: InsightSection[] = [
type InsightResults (line 1497) | type InsightResults = {
function generateSectionInsight (line 1572) | async function generateSectionInsight(
function generateParallelInsights (line 1612) | async function generateParallelInsights(
function escapeHtmlWithBold (line 1801) | function escapeHtmlWithBold(text: string): string {
constant SATISFACTION_ORDER (line 1807) | const SATISFACTION_ORDER = [
constant OUTCOME_ORDER (line 1816) | const OUTCOME_ORDER = [
function generateBarChart (line 1824) | function generateBarChart(
function generateResponseTimeHistogram (line 1863) | function generateResponseTimeHistogram(times: number[]): string {
function generateTimeOfDayChart (line 1902) | function generateTimeOfDayChart(messageHours: number[]): string {
function getHourCountsJson (line 1939) | function getHourCountsJson(messageHours: number[]): string {
function generateHtmlReport (line 1947) | function generateHtmlReport(
type InsightsExport (line 2655) | type InsightsExport = {
function buildExportData (line 2679) | function buildExportData(
type LiteSessionInfo (line 2743) | type LiteSessionInfo = {
function scanAllSessions (line 2755) | async function scanAllSessions(): Promise<LiteSessionInfo[]> {
function generateUsageReport (line 2796) | async function generateUsageReport(options?: {
function safeEntries (line 3025) | function safeEntries<V>(
function safeKeys (line 3031) | function safeKeys(obj: Record<string, unknown> | undefined | null): stri...
method getPromptForCommand (line 3046) | async getPromptForCommand(args) {
function isValidSessionFacets (line 3184) | function isValidSessionFacets(obj: unknown): obj is SessionFacets {
FILE: restored-src/src/commands/install-github-app/ApiKeyStep.tsx
type ApiKeyStepProps (line 7) | interface ApiKeyStepProps {
function ApiKeyStep (line 18) | function ApiKeyStep(t0) {
FILE: restored-src/src/commands/install-github-app/CheckExistingSecretStep.tsx
type CheckExistingSecretStepProps (line 7) | interface CheckExistingSecretStepProps {
function CheckExistingSecretStep (line 14) | function CheckExistingSecretStep(t0) {
FILE: restored-src/src/commands/install-github-app/CheckGitHubStep.tsx
function CheckGitHubStep (line 4) | function CheckGitHubStep() {
FILE: restored-src/src/commands/install-github-app/ChooseRepoStep.tsx
type ChooseRepoStepProps (line 7) | interface ChooseRepoStepProps {
function ChooseRepoStep (line 15) | function ChooseRepoStep(t0) {
FILE: restored-src/src/commands/install-github-app/CreatingStep.tsx
type CreatingStepProps (line 5) | interface CreatingStepProps {
function CreatingStep (line 13) | function CreatingStep(t0) {
FILE: restored-src/src/commands/install-github-app/ErrorStep.tsx
type ErrorStepProps (line 5) | interface ErrorStepProps {
function ErrorStep (line 10) | function ErrorStep(t0) {
function _temp (line 82) | function _temp(instruction, index) {
FILE: restored-src/src/commands/install-github-app/ExistingWorkflowStep.tsx
type ExistingWorkflowStepProps (line 5) | interface ExistingWorkflowStepProps {
function ExistingWorkflowStep (line 9) | function ExistingWorkflowStep(t0) {
FILE: restored-src/src/commands/install-github-app/InstallAppStep.tsx
type InstallAppStepProps (line 7) | interface InstallAppStepProps {
function InstallAppStep (line 11) | function InstallAppStep(t0) {
FILE: restored-src/src/commands/install-github-app/OAuthFlowStep.tsx
type OAuthFlowStepProps (line 13) | interface OAuthFlowStepProps {
type OAuthStatus (line 17) | type OAuthStatus = {
constant PASTE_HERE_MSG (line 35) | const PASTE_HERE_MSG = 'Paste code here if prompted > ';
function OAuthFlowStep (line 36) | function OAuthFlowStep({
FILE: restored-src/src/commands/install-github-app/SuccessStep.tsx
type SuccessStepProps (line 4) | type SuccessStepProps = {
function SuccessStep (line 10) | function SuccessStep(t0) {
FILE: restored-src/src/commands/install-github-app/WarningsStep.tsx
type WarningsStepProps (line 8) | interface WarningsStepProps {
function WarningsStep (line 12) | function WarningsStep(t0) {
function _temp2 (line 67) | function _temp2(warning, index) {
function _temp (line 70) | function _temp(instruction, i) {
FILE: restored-src/src/commands/install-github-app/install-github-app.tsx
constant INITIAL_STATE (line 28) | const INITIAL_STATE: State = {
function InstallGitHubApp (line 46) | function InstallGitHubApp(props: {
function call (line 584) | async function call(onDone: LocalJSXCommandOnDone): Promise<React.ReactN...
FILE: restored-src/src/commands/install-github-app/setupGitHubActions.ts
function createWorkflowFile (line 17) | async function createWorkflowFile(
function setupGitHubActions (line 112) | async function setupGitHubActions(
FILE: restored-src/src/commands/install-slack-app/install-slack-app.ts
constant SLACK_APP_URL (line 6) | const SLACK_APP_URL = 'https://slack.com/marketplace/A08SF47R6P4-claude'
function call (line 8) | async function call(): Promise<LocalCommandResult> {
FILE: restored-src/src/commands/install.tsx
type InstallProps (line 14) | interface InstallProps {
type InstallState (line 21) | type InstallState = {
function getInstallationPath (line 42) | function getInstallationPath(): string {
function SetupNotes (line 53) | function SetupNotes(t0) {
function _temp (line 86) | function _temp(message, index) {
function Install (line 89) | function Install({
method call (line 284) | async call(onDone: (result: string, options?: {
FILE: restored-src/src/commands/keybindings/keybindings.ts
function call (line 11) | async function call(): Promise<{ type: 'text'; value: string }> {
FILE: restored-src/src/commands/login/login.tsx
function call (line 19) | async function call(onDone: LocalJSXCommandOnDone, context: LocalJSXComm...
function Login (line 60) | function Login(props) {
function _temp (line 101) | function _temp(exitState) {
FILE: restored-src/src/commands/logout/logout.tsx
function performLogout (line 16) | async function performLogout({
function clearAuthRelatedCaches (line 51) | async function clearAuthRelatedCaches(): Promise<void> {
function call (line 72) | async function call(): Promise<React.ReactNode> {
FILE: restored-src/src/commands/mcp/addCommand.ts
function registerMcpAddCommand (line 33) | function registerMcpAddCommand(mcp: Command): void {
FILE: restored-src/src/commands/mcp/mcp.tsx
function MCPToggle (line 12) | function MCPToggle(t0) {
function _temp2 (line 57) | function _temp2(c) {
function _temp (line 60) | function _temp(s) {
function call (line 63) | async function call(onDone: LocalJSXCommandOnDone, _context: unknown, ar...
FILE: restored-src/src/commands/mcp/xaaIdpCommand.ts
function registerMcpXaaIdpCommand (line 24) | function registerMcpXaaIdpCommand(mcp: Command): void {
FILE: restored-src/src/commands/memory/memory.tsx
function MemoryCommand (line 14) | function MemoryCommand({
FILE: restored-src/src/commands/mobile/mobile.tsx
type Platform (line 10) | type Platform = 'ios' | 'android';
type Props (line 11) | type Props = {
constant PLATFORMS (line 14) | const PLATFORMS: Record<Platform, {
function MobileQRCode (line 24) | function MobileQRCode(t0) {
function _temp4 (line 261) | function _temp4(line_0, i) {
function _temp3 (line 264) | function _temp3(line) {
function _temp2 (line 267) | function _temp2(prev) {
function _temp (line 270) | function _temp() {}
function call (line 271) | async function call(onDone: LocalJSXCommandOnDone): Promise<React.ReactN...
FILE: restored-src/src/commands/model/index.ts
method description (line 8) | get description() {
method immediate (line 12) | get immediate() {
FILE: restored-src/src/commands/model/model.tsx
function ModelPickerWrapper (line 18) | function ModelPickerWrapper(t0) {
function _temp4 (line 115) | function _temp4(prev_0) {
function _temp3 (line 121) | function _temp3(s_1) {
function _temp2 (line 124) | function _temp2(s_0) {
function _temp (line 127) | function _temp(s) {
function SetModelAndClose (line 130) | function SetModelAndClose({
function isKnownAlias (line 233) | function isKnownAlias(model: string): boolean {
function isOpus1mUnavailable (line 236) | function isOpus1mUnavailable(model: string): boolean {
function isSonnet1mUnavailable (line 240) | function isSonnet1mUnavailable(model: string): boolean {
function ShowModelAndClose (line 246) | function ShowModelAndClose(t0) {
function _temp9 (line 262) | function _temp9(s_1) {
function _temp8 (line 265) | function _temp8(s_0) {
function _temp7 (line 268) | function _temp7(s) {
function renderModelLabel (line 293) | function renderModelLabel(model: string | null): string {
FILE: restored-src/src/commands/output-style/output-style.tsx
function call (line 2) | async function call(onDone: LocalJSXCommandOnDone): Promise<undefined> {
FILE: restored-src/src/commands/passes/index.ts
method description (line 10) | get description() {
method isHidden (line 17) | get isHidden() {
FILE: restored-src/src/commands/passes/passes.tsx
function call (line 7) | async function call(onDone: LocalJSXCommandOnDone): Promise<React.ReactN...
FILE: restored-src/src/commands/plan/plan.tsx
function PlanDisplay (line 14) | function PlanDisplay(t0) {
function call (line 64) | async function call(onDone: LocalJSXCommandOnDone, context: LocalJSXComm...
FILE: restored-src/src/commands/plugin/AddMarketplace.tsx
type Props (line 16) | type Props = {
function AddMarketplace (line 29) | function AddMarketplace({
FILE: restored-src/src/commands/plugin/BrowseMarketplace.tsx
type Props (line 28) | type Props = {
type ViewState (line 38) | type ViewState = 'marketplace-list' | 'plugin-list' | 'plugin-details' | {
type MarketplaceInfo (line 43) | type MarketplaceInfo = {
function BrowseMarketplace (line 49) | function BrowseMarketplace({
FILE: restored-src/src/commands/plugin/DiscoverPlugins.tsx
type Props (line 33) | type Props = {
type ViewState (line 43) | type ViewState = 'plugin-list' | 'plugin-details' | {
function DiscoverPlugins (line 48) | function DiscoverPlugins({
function DiscoverPluginsKeyHint (line 651) | function DiscoverPluginsKeyHint(t0) {
function EmptyStateMessage (line 706) | function EmptyStateMessage(t0) {
FILE: restored-src/src/commands/plugin/ManageMarketplaces.tsx
type Props (line 25) | type Props = {
type MarketplaceState (line 38) | type MarketplaceState = {
type InternalViewState (line 48) | type InternalViewState = 'list' | 'details' | 'confirm-remove';
function ManageMarketplaces (line 49) | function ManageMarketplaces({
type ManageMarketplacesKeyHintsProps (line 762) | type ManageMarketplacesKeyHintsProps = {
function ManageMarketplacesKeyHints (line 766) | function ManageMarketplacesKeyHints(t0) {
FILE: restored-src/src/commands/plugin/ManagePlugins.tsx
type Props (line 54) | type Props = {
type FlaggedPluginInfo (line 63) | type FlaggedPluginInfo = {
type FailedPluginInfo (line 71) | type FailedPluginInfo = {
type ViewState (line 78) | type ViewState = 'plugin-list' | 'plugin-details' | 'configuring' | {
type MarketplaceInfo (line 106) | type MarketplaceInfo = {
type PluginState (line 112) | type PluginState = {
function getBaseFileNames (line 129) | async function getBaseFileNames(dirPath: string): Promise<string[]> {
function getSkillDirNames (line 160) | async function getSkillDirNames(dirPath: string): Promise<string[]> {
function PluginComponentsDisplay (line 194) | function PluginComponentsDisplay({
function checkIfLocalPlugin (line 376) | async function checkIfLocalPlugin(pluginName: string, marketplaceName: s...
function filterManagedDisabledPlugins (line 391) | function filterManagedDisabledPlugins(plugins: LoadedPlugin[]): LoadedPl...
function ManagePlugins (line 397) | function ManagePlugins({
FILE: restored-src/src/commands/plugin/PluginErrors.tsx
function formatErrorMessage (line 2) | function formatErrorMessage(error: PluginError): string {
function getErrorGuidance (line 61) | function getErrorGuidance(error: PluginError): string | null {
FILE: restored-src/src/commands/plugin/PluginOptionsDialog.tsx
function buildFinalValues (line 24) | function buildFinalValues(fields: string[], collected: Record<string, st...
type Props (line 46) | type Props = {
function PluginOptionsDialog (line 55) | function PluginOptionsDialog(t0) {
function _temp3 (line 348) | function _temp3(prev_2) {
function _temp2 (line 351) | function _temp2(prev_1) {
function _temp (line 354) | function _temp(prev_0) {
FILE: restored-src/src/commands/plugin/PluginOptionsFlow.tsx
function findPluginOptionsTarget (line 27) | async function findPluginOptionsTarget(pluginId: string): Promise<Loaded...
type ConfigStep (line 39) | type ConfigStep = {
type Props (line 49) | type Props = {
function PluginOptionsFlow (line 59) | function PluginOptionsFlow({
FILE: restored-src/src/commands/plugin/PluginSettings.tsx
type TabId (line 30) | type TabId = 'discover' | 'installed' | 'marketplaces' | 'errors';
function MarketplaceList (line 31) | function MarketplaceList(t0) {
function _temp (line 75) | function _temp(n) {
function McpRedirectBanner (line 78) | function McpRedirectBanner() {
type ErrorRowAction (line 81) | type ErrorRowAction = {
type ErrorRow (line 101) | type ErrorRow = {
function getExtraMarketplaceSourceInfo (line 113) | function getExtraMarketplaceSourceInfo(name: string): {
function buildMarketplaceAction (line 153) | function buildMarketplaceAction(name: string): ErrorRowAction {
function buildPluginAction (line 184) | function buildPluginAction(pluginName: string): ErrorRowAction {
constant TRANSIENT_ERROR_TYPES (line 195) | const TRANSIENT_ERROR_TYPES = new Set(['git-auth-failed', 'git-timeout',...
function isTransientError (line 196) | function isTransientError(error: PluginError): boolean {
function getPluginNameFromError (line 204) | function getPluginNameFromError(error: PluginError): string | undefined {
function buildErrorRows (line 211) | function buildErrorRows(failedMarketplaces: Array<{
function removeExtraMarketplace (line 317) | function removeExtraMarketplace(name: string, sources: Array<{
function ErrorsTabContent (line 357) | function ErrorsTabContent(t0) {
function _temp9 (line 600) | function _temp9(prev_1) {
function _temp8 (line 603) | function _temp8(s_1) {
function _temp7 (line 606) | function _temp7(e_1) {
function _temp6 (line 615) | function _temp6(e_0) {
function _temp5 (line 624) | function _temp5(m_0) {
function _temp4 (line 627) | function _temp4(m) {
function _temp3 (line 630) | function _temp3(s_0) {
function _temp2 (line 633) | function _temp2(s) {
function getInitialViewState (line 636) | function getInitialViewState(parsedCommand: ParsedCommand): ViewState {
function getInitialTab (line 723) | function getInitialTab(viewState: ViewState): TabId {
function PluginSettings (line 728) | function PluginSettings(t0) {
function _temp1 (line 1054) | function _temp1(prev) {
function _temp0 (line 1063) | function _temp0(s) {
FILE: restored-src/src/commands/plugin/PluginTrustWarning.tsx
function PluginTrustWarning (line 6) | function PluginTrustWarning() {
FILE: restored-src/src/commands/plugin/UnifiedInstalledCell.tsx
type Props (line 7) | type Props = {
function UnifiedInstalledCell (line 11) | function UnifiedInstalledCell(t0) {
FILE: restored-src/src/commands/plugin/ValidatePlugin.tsx
type Props (line 10) | type Props = {
function ValidatePlugin (line 14) | function ValidatePlugin(t0) {
FILE: restored-src/src/commands/plugin/parseArgs.ts
type ParsedCommand (line 2) | type ParsedCommand =
function parsePluginArgs (line 17) | function parsePluginArgs(args?: string): ParsedCommand {
FILE: restored-src/src/commands/plugin/plugin.tsx
function call (line 4) | async function call(onDone: LocalJSXCommandOnDone, _context: unknown, ar...
FILE: restored-src/src/commands/plugin/pluginDetailsHelpers.tsx
type InstallablePlugin (line 17) | type InstallablePlugin = {
type PluginDetailsMenuOption (line 27) | type PluginDetailsMenuOption = {
function extractGitHubRepo (line 35) | function extractGitHubRepo(plugin: InstallablePlugin): string | null {
function buildPluginDetailsMenuOptions (line 46) | function buildPluginDetailsMenuOptions(hasHomepage: string | undefined, ...
function PluginSelectionKeyHint (line 79) | function PluginSelectionKeyHint(t0) {
FILE: restored-src/src/commands/plugin/usePagination.ts
constant DEFAULT_MAX_VISIBLE (line 3) | const DEFAULT_MAX_VISIBLE = 5
type UsePaginationOptions (line 5) | type UsePaginationOptions = {
type UsePaginationResult (line 11) | type UsePaginationResult<T> = {
function usePagination (line 48) | function usePagination<T>({
FILE: restored-src/src/commands/pr_comments/index.ts
method getPromptWhileMarketplaceIsPrivate (line 9) | async getPromptWhileMarketplaceIsPrivate(args) {
FILE: restored-src/src/commands/privacy-settings/privacy-settings.tsx
constant FALLBACK_MESSAGE (line 6) | const FALLBACK_MESSAGE = 'Review and manage your privacy settings at htt...
function call (line 7) | async function call(onDone: LocalJSXCommandOnDone): Promise<React.ReactN...
FILE: restored-src/src/commands/rate-limit-options/rate-limit-options.tsx
type RateLimitOptionsMenuOptionType (line 17) | type RateLimitOptionsMenuOptionType = 'upgrade' | 'extra-usage' | 'cancel';
type RateLimitOptionsMenuProps (line 18) | type RateLimitOptionsMenuProps = {
function RateLimitOptionsMenu (line 24) | function RateLimitOptionsMenu(t0) {
function call (line 207) | async function call(onDone: LocalJSXCommandOnDone, context: ToolUseConte...
FILE: restored-src/src/commands/release-notes/release-notes.ts
function formatReleaseNotes (line 9) | function formatReleaseNotes(notes: Array<[string, string[]]>): string {
function call (line 19) | async function call(): Promise<LocalCommandResult> {
FILE: restored-src/src/commands/reload-plugins/reload-plugins.ts
function n (line 59) | function n(count: number, noun: string): string {
FILE: restored-src/src/commands/remote-env/index.ts
method isHidden (line 11) | get isHidden() {
FILE: restored-src/src/commands/remote-env/remote-env.tsx
function call (line 4) | async function call(onDone: LocalJSXCommandOnDone): Promise<React.ReactN...
FILE: restored-src/src/commands/remote-setup/api.ts
constant CCR_BYOC_BETA_HEADER (line 7) | const CCR_BYOC_BETA_HEADER = 'ccr-byoc-2025-07-29'
class RedactedGithubToken (line 16) | class RedactedGithubToken {
method constructor (line 18) | constructor(raw: string) {
method reveal (line 21) | reveal(): string {
method toString (line 24) | toString(): string {
method toJSON (line 27) | toJSON(): string {
method [Symbol.for('nodejs.util.inspect.custom')] (line 30) | [Symbol.for('nodejs.util.inspect.custom')](): string {
type ImportTokenResult (line 35) | type ImportTokenResult = {
type ImportTokenError (line 39) | type ImportTokenError =
function importGithubToken (line 51) | async function importGithubToken(
function hasExistingEnvironment (line 102) | async function hasExistingEnvironment(): Promise<boolean> {
function createDefaultEnvironment (line 119) | async function createDefaultEnvironment(): Promise<boolean> {
function isSignedIn (line 171) | async function isSignedIn(): Promise<boolean> {
function getCodeWebUrl (line 180) | function getCodeWebUrl(): string {
FILE: restored-src/src/commands/remote-setup/index.ts
method isHidden (line 14) | get isHidden() {
FILE: restored-src/src/commands/remote-setup/remote-setup.tsx
type CheckResult (line 13) | type CheckResult = {
function checkLoginState (line 23) | async function checkLoginState(): Promise<CheckResult> {
function errorMessage (line 62) | function errorMessage(err: ImportTokenError, codeUrl: string): string {
type Step (line 74) | type Step = {
function Web (line 82) | function Web({
function call (line 184) | async function call(onDone: LocalJSXCommandOnDone): Promise<React.ReactN...
FILE: restored-src/src/commands/rename/generateSessionName.ts
function generateSessionName (line 10) | async function generateSessionName(
FILE: restored-src/src/commands/rename/rename.ts
function call (line 21) | async function call(
FILE: restored-src/src/commands/resume/resume.tsx
type ResumeResult (line 23) | type ResumeResult = {
function resumeHelpMessage (line 31) | function resumeHelpMessage(result: ResumeResult): string {
function ResumeError (line 39) | function ResumeError(t0) {
function ResumeCommand (line 89) | function ResumeCommand({
function filterResumableSessions (line 191) | function filterResumableSessions(logs: LogOption[], currentSessionId: st...
FILE: restored-src/src/commands/review.ts
constant CCR_TERMS_URL (line 7) | const CCR_TERMS_URL = 'https://code.claude.com/docs/en/claude-code-on-th...
method getPromptForCommand (line 40) | async getPromptForCommand(args): Promise<ContentBlockParam[]> {
FILE: restored-src/src/commands/review/UltrareviewOverageDialog.tsx
type Props (line 6) | type Props = {
function UltrareviewOverageDialog (line 10) | function UltrareviewOverageDialog(t0) {
FILE: restored-src/src/commands/review/reviewRemote.ts
function confirmOverage (line 38) | function confirmOverage(): void {
type OverageGate (line 42) | type OverageGate =
function checkOverageGate (line 52) | async function checkOverageGate(): Promise<OverageGate> {
function launchRemoteReview (line 128) | async function launchRemoteReview(
FILE: restored-src/src/commands/review/ultrareviewCommand.tsx
function contentBlocksToString (line 6) | function contentBlocksToString(blocks: ContentBlockParam[]): string {
function launchAndDone (line 9) | async function launchAndDone(args: string, context: Parameters<LocalJSXC...
FILE: restored-src/src/commands/review/ultrareviewEnabled.ts
function isUltrareviewEnabled (line 8) | function isUltrareviewEnabled(): boolean {
FILE: restored-src/src/commands/rewind/rewind.ts
function call (line 4) | async function call(
FILE: restored-src/src/commands/sandbox-toggle/index.ts
method description (line 7) | get description() {
method isHidden (line 39) | get isHidden() {
FILE: restored-src/src/commands/sandbox-toggle/sandbox-toggle.tsx
function call (line 10) | async function call(onDone: (result?: string) => void, _context: unknown...
FILE: restored-src/src/commands/security-review.ts
constant SECURITY_REVIEW_MARKDOWN (line 6) | const SECURITY_REVIEW_MARKDOWN = `---
method getPromptWhileMarketplaceIsPrivate (line 205) | async getPromptWhileMarketplaceIsPrivate(_args, context) {
FILE: restored-src/src/commands/session/index.ts
method isHidden (line 10) | get isHidden() {
FILE: restored-src/src/commands/session/session.tsx
type Props (line 11) | type Props = {
function SessionInfo (line 14) | function SessionInfo(t0) {
function _temp4 (line 125) | function _temp4(line_0, i) {
function _temp3 (line 128) | function _temp3(line) {
function _temp2 (line 131) | function _temp2(e) {
function _temp (line 134) | function _temp(s) {
FILE: restored-src/src/commands/skills/skills.tsx
function call (line 5) | async function call(onDone: LocalJSXCommandOnDone, context: LocalJSXComm...
FILE: restored-src/src/commands/status/status.tsx
function call (line 5) | async function call(onDone: LocalJSXCommandOnDone, context: LocalJSXComm...
FILE: restored-src/src/commands/statusline.tsx
method getPromptForCommand (line 15) | async getPromptForCommand(args): Promise<ContentBlockParam[]> {
FILE: restored-src/src/commands/stickers/stickers.ts
function call (line 4) | async function call(): Promise<LocalCommandResult> {
FILE: restored-src/src/commands/tag/tag.tsx
function ConfirmRemoveTag (line 15) | function ConfirmRemoveTag(t0) {
function ToggleTagAndClose (line 72) | function ToggleTagAndClose(t0) {
function ShowHelp (line 181) | function ShowHelp(t0) {
function call (line 205) | async function call(onDone: LocalJSXCommandOnDone, _context: unknown, ar...
FILE: restored-src/src/commands/tasks/tasks.tsx
function call (line 5) | async function call(onDone: LocalJSXCommandOnDone, context: LocalJSXComm...
FILE: restored-src/src/commands/terminalSetup/index.ts
constant NATIVE_CSIU_TERMINALS (line 5) | const NATIVE_CSIU_TERMINALS: Record<string, string> = {
FILE: restored-src/src/commands/terminalSetup/terminalSetup.tsx
constant EOL (line 23) | const EOL = '\n';
constant NATIVE_CSIU_TERMINALS (line 26) | const NATIVE_CSIU_TERMINALS: Record<string, string> = {
function isVSCodeRemoteSSH (line 39) | function isVSCodeRemoteSSH(): boolean {
function getNativeCSIuTerminalDisplayName (line 47) | function getNativeCSIuTerminalDisplayName(): string | null {
function formatPathLink (line 65) | function formatPathLink(filePath: string): string {
function shouldOfferTerminalSetup (line 73) | function shouldOfferTerminalSetup(): boolean {
function setupTerminal (line 79) | async function setupTerminal(theme: ThemeName): Promise<string> {
function isShiftEnterKeyBindingInstalled (line 127) | function isShiftEnterKeyBindingInstalled(): boolean {
function hasUsedBackslashReturn (line 130) | function hasUsedBackslashReturn(): boolean {
function markBackslashReturnUsed (line 133) | function markBackslashReturnUsed(): void {
function call (line 142) | async function call(onDone: LocalJSXCommandOnDone, context: ToolUseConte...
type VSCodeKeybinding (line 186) | type VSCodeKeybinding = {
function installBindingsForVSCodeTerminal (line 194) | async function installBindingsForVSCodeTerminal(editor: 'VSCode' | 'Curs...
function enableOptionAsMetaForProfile (line 270) | async function enableOptionAsMetaForProfile(profileName: string): Promis...
function disableAudioBellForProfile (line 289) | async function disableAudioBellForProfile(profileName: string): Promise<...
function enableOptionAsMetaForTerminal (line 310) | async function enableOptionAsMetaForTerminal(theme: ThemeName): Promise<...
function installBindingsForAlacritty (line 373) | async function installBindingsForAlacritty(theme: ThemeName): Promise<st...
function installBindingsForZed (line 462) | async function installBindingsForZed(theme: ThemeName): Promise<string> {
FILE: restored-src/src/commands/theme/theme.tsx
type Props (line 8) | type Props = {
function ThemePickerCommand (line 13) | function ThemePickerCommand(t0) {
FILE: restored-src/src/commands/thinkback-play/thinkback-play.ts
constant INTERNAL_MARKETPLACE_NAME (line 7) | const INTERNAL_MARKETPLACE_NAME = 'claude-code-marketplace'
constant SKILL_NAME (line 8) | const SKILL_NAME = 'thinkback'
function getPluginId (line 10) | function getPluginId(): string {
function call (line 18) | async function call(): Promise<LocalCommandResult> {
FILE: restored-src/src/commands/thinkback/thinkback.tsx
constant INTERNAL_MARKETPLACE_NAME (line 28) | const INTERNAL_MARKETPLACE_NAME = 'claude-code-marketplace';
constant INTERNAL_MARKETPLACE_REPO (line 29) | const INTERNAL_MARKETPLACE_REPO = 'anthropics/claude-code-marketplace';
constant OFFICIAL_MARKETPLACE_REPO (line 30) | const OFFICIAL_MARKETPLACE_REPO = 'anthropics/claude-plugins-official';
function getMarketplaceName (line 31) | function getMarketplaceName(): string {
function getMarketplaceRepo (line 34) | function getMarketplaceRepo(): string {
function getPluginId (line 37) | function getPluginId(): string {
constant SKILL_NAME (line 40) | const SKILL_NAME = 'thinkback';
function getThinkbackSkillDir (line 45) | async function getThinkbackSkillDir(): Promise<string | null> {
function playAnimation (line 59) | async function playAnimation(skillDir: string): Promise<{
type InstallState (line 138) | type InstallState = {
function ThinkbackInstaller (line 152) | function ThinkbackInstaller({
type MenuAction (line 269) | type MenuAction = 'play' | 'edit' | 'fix' | 'regenerate';
type GenerativeAction (line 270) | type GenerativeAction = Exclude<MenuAction, 'play'>;
function ThinkbackMenu (line 271) | function ThinkbackMenu(t0) {
constant EDIT_PROMPT (line 384) | const EDIT_PROMPT = 'Use the Skill tool to invoke the "thinkback" skill ...
constant FIX_PROMPT (line 385) | const FIX_PROMPT = 'Use the Skill tool to invoke the "thinkback" skill w...
constant REGENERATE_PROMPT (line 386) | const REGENERATE_PROMPT = 'Use the Skill tool to invoke the "thinkback" ...
function ThinkbackFlow (line 387) | function ThinkbackFlow(t0) {
function call (line 548) | async function call(onDone: (result?: string, options?: {
FILE: restored-src/src/commands/ultraplan.tsx
constant ULTRAPLAN_TIMEOUT_MS (line 24) | const ULTRAPLAN_TIMEOUT_MS = 30 * 60 * 1000;
constant CCR_TERMS_URL (line 25) | const CCR_TERMS_URL = 'https://code.claude.com/docs/en/claude-code-on-th...
function getUltraplanModel (line 32) | function getUltraplanModel(): string {
constant DEFAULT_INSTRUCTIONS (line 48) | const DEFAULT_INSTRUCTIONS: string = (typeof _rawPrompt === 'string' ? _...
constant ULTRAPLAN_INSTRUCTIONS (line 56) | const ULTRAPLAN_INSTRUCTIONS: string = "external" === 'ant' && process.e...
function buildUltraplanPrompt (line 63) | function buildUltraplanPrompt(blurb: string, seedPlan?: string): string {
function startDetachedPoll (line 74) | function startDetachedPoll(taskId: string, sessionId: string, url: strin...
function buildLaunchMessage (line 185) | function buildLaunchMessage(disconnectedBridge?: boolean): string {
function buildSessionReadyMessage (line 189) | function buildSessionReadyMessage(url: string): string {
function buildAlreadyActiveMessage (line 192) | function buildAlreadyActiveMessage(url: string | undefined): string {
function stopUltraplan (line 203) | async function stopUltraplan(taskId: string, sessionId: string, setAppSt...
function launchUltraplan (line 234) | async function launchUltraplan(opts: {
function launchDetached (line 294) | async function launchDetached(opts: {
FILE: restored-src/src/commands/upgrade/upgrade.tsx
function call (line 9) | async function call(onDone: LocalJSXCommandOnDone, context: LocalJSXComm...
FILE: restored-src/src/commands/voice/index.ts
method isHidden (line 13) | get isHidden() {
FILE: restored-src/src/commands/voice/voice.ts
constant LANG_HINT_MAX_SHOWS (line 14) | const LANG_HINT_MAX_SHOWS = 2
FILE: restored-src/src/components/AgentProgressLine.tsx
type Props (line 6) | type Props = {
function AgentProgressLine (line 23) | function AgentProgressLine(t0) {
FILE: restored-src/src/components/App.tsx
type Props (line 8) | type Props = {
function App (line 19) | function App(t0) {
FILE: restored-src/src/components/ApproveApiKey.tsx
type Props (line 7) | type Props = {
function ApproveApiKey (line 11) | function ApproveApiKey(t0) {
FILE: restored-src/src/components/AutoModeOptInDialog.tsx
constant AUTO_MODE_DESCRIPTION (line 10) | const AUTO_MODE_DESCRIPTION = "Auto mode lets Claude handle permission p...
type Props (line 11) | type Props = {
function AutoModeOptInDialog (line 17) | function AutoModeOptInDialog(t0) {
function _temp (line 139) | function _temp() {
FILE: restored-src/src/components/AutoUpdater.tsx
type Props (line 15) | type Props = {
function AutoUpdater (line 23) | function AutoUpdater({
FILE: restored-src/src/components/AutoUpdaterWrapper.tsx
type Props (line 11) | type Props = {
function AutoUpdaterWrapper (line 19) | function AutoUpdaterWrapper(t0) {
FILE: restored-src/src/components/AwsAuthStatusBox.tsx
constant URL_RE (line 5) | const URL_RE = /https?:\/\/\S+/;
function AwsAuthStatusBox (line 6) | function AwsAuthStatusBox() {
function _temp (line 71) | function _temp(line, index) {
FILE: restored-src/src/components/BaseTextInput.tsx
type BaseTextInputComponentProps (line 10) | type BaseTextInputComponentProps = BaseTextInputProps & {
function BaseTextInput (line 22) | function BaseTextInput(t0) {
FILE: restored-src/src/components/BashModeProgress.tsx
type Props (line 8) | type Props = {
function BashModeProgress (line 13) | function BashModeProgress(t0) {
FILE: restored-src/src/components/BridgeDialog.tsx
type Props (line 17) | type Props = {
function BridgeDialog (line 20) | function BridgeDialog(t0) {
function _temp14 (line 343) | function _temp14(line, i) {
function _temp13 (line 346) | function _temp13(l) {
function _temp12 (line 349) | function _temp12(prev_0) {
function _temp11 (line 358) | function _temp11(current) {
function _temp10 (line 367) | function _temp10(prev) {
function _temp1 (line 370) | function _temp1() {}
function _temp0 (line 371) | function _temp0(s_8) {
function _temp9 (line 374) | function _temp9(s_7) {
function _temp8 (line 377) | function _temp8(s_6) {
function _temp7 (line 380) | function _temp7(s_5) {
function _temp6 (line 383) | function _temp6(s_4) {
function _temp5 (line 386) | function _temp5(s_3) {
function _temp4 (line 389) | function _temp4(s_2) {
function _temp3 (line 392) | function _temp3(s_1) {
function _temp2 (line 395) | function _temp2(s_0) {
function _temp (line 398) | function _temp(s) {
FILE: restored-src/src/components/BypassPermissionsModeDialog.tsx
type Props (line 9) | type Props = {
function BypassPermissionsModeDialog (line 12) | function BypassPermissionsModeDialog(t0) {
function _temp2 (line 81) | function _temp2() {
function _temp (line 84) | function _temp() {
FILE: restored-src/src/components/ChannelDowngradeDialog.tsx
type ChannelDowngradeChoice (line 6) | type ChannelDowngradeChoice = 'downgrade' | 'stay' | 'cancel';
type Props (line 7) | type Props = {
function ChannelDowngradeDialog (line 16) | function ChannelDowngradeDialog(t0) {
FILE: restored-src/src/components/ClaudeCodeHint/PluginHintMenu.tsx
type Props (line 5) | type Props = {
constant AUTO_DISMISS_MS (line 12) | const AUTO_DISMISS_MS = 30_000;
function PluginHintMenu (line 13) | function PluginHintMenu({
FILE: restored-src/src/components/ClaudeInChromeOnboarding.tsx
constant CHROME_EXTENSION_URL (line 9) | const CHROME_EXTENSION_URL = 'https://claude.ai/chrome';
constant CHROME_PERMISSIONS_URL (line 10) | const CHROME_PERMISSIONS_URL = 'https://clau.de/chrome/permissions';
type Props (line 11) | type Props = {
function ClaudeInChromeOnboarding (line 14) | function ClaudeInChromeOnboarding(t0) {
function _temp (line 115) | function _temp(current) {
FILE: restored-src/src/components/ClaudeMdExternalIncludesDialog.tsx
type Props (line 9) | type Props = {
function ClaudeMdExternalIncludesDialog (line 14) | function ClaudeMdExternalIncludesDialog(t0) {
function _temp4 (line 117) | function _temp4(include, i) {
function _temp3 (line 120) | function _temp3(current_0) {
function _temp2 (line 127) | function _temp2(current) {
function _temp (line 134) | function _temp() {
FILE: restored-src/src/components/ClickableImageRef.tsx
type Props (line 9) | type Props = {
function ClickableImageRef (line 23) | function ClickableImageRef(t0) {
FILE: restored-src/src/components/CompactSummary.tsx
type Props (line 10) | type Props = {
function CompactSummary (line 14) | function CompactSummary(t0) {
FILE: restored-src/src/components/ConfigurableShortcutHint.tsx
type Props (line 6) | type Props = {
function ConfigurableShortcutHint (line 33) | function ConfigurableShortcutHint(t0) {
FILE: restored-src/src/components/ConsoleOAuthFlow.tsx
type Props (line 20) | type Props = {
type OAuthStatus (line 26) | type OAuthStatus = {
constant PASTE_HERE_MSG (line 53) | const PASTE_HERE_MSG = 'Paste code here if prompted > ';
function ConsoleOAuthFlow (line 54) | function ConsoleOAuthFlow({
type OAuthStatusMessageProps (line 332) | type OAuthStatusMessageProps = {
function OAuthStatusMessage (line 347) | function OAuthStatusMessage(t0) {
FILE: restored-src/src/components/ContextSuggestions.tsx
type Props (line 8) | type Props = {
function ContextSuggestions (line 11) | function ContextSuggestions(t0) {
function _temp (line 44) | function _temp(suggestion, i) {
FILE: restored-src/src/components/ContextVisualization.tsx
constant RESERVED_CATEGORY_NAME (line 12) | const RESERVED_CATEGORY_NAME = 'Autocompact buffer';
function CollapseStatus (line 21) | function CollapseStatus() {
constant SOURCE_DISPLAY_ORDER (line 74) | const SOURCE_DISPLAY_ORDER = ['Project', 'User', 'Managed', 'Plugin', 'B...
function groupBySource (line 77) | function groupBySource<T extends {
type Props (line 102) | interface Props {
function ContextVisualization (line 105) | function ContextVisualization(t0) {
function _temp27 (line 394) | function _temp27(attachment, i_10) {
function _temp26 (line 397) | function _temp26(tool_5, i_9) {
function _temp25 (line 400) | function _temp25(t0) {
function _temp24 (line 404) | function _temp24(skill, i_8) {
function _temp23 (line 407) | function _temp23(file, i_7) {
function _temp22 (line 410) | function _temp22(t0) {
function _temp21 (line 414) | function _temp21(agent, i_6) {
function _temp20 (line 417) | function _temp20(section, i_5) {
function _temp19 (line 420) | function _temp19(tool_4, i_4) {
function _temp18 (line 423) | function _temp18(t_4) {
function _temp17 (line 426) | function _temp17(t_5) {
function _temp16 (line 429) | function _temp16(tool_3, i_3) {
function _temp15 (line 432) | function _temp15(t_3) {
function _temp14 (line 435) | function _temp14(tool_2, i_2) {
function _temp13 (line 438) | function _temp13(tool_1, i_1) {
function _temp12 (line 441) | function _temp12(tool_0, i_0) {
function _temp11 (line 444) | function _temp11(t_1) {
function _temp10 (line 447) | function _temp10(t_2) {
function _temp1 (line 450) | function _temp1(tool, i) {
function _temp0 (line 453) | function _temp0(t) {
function _temp9 (line 456) | function _temp9(t_0) {
function _temp8 (line 459) | function _temp8(c_0) {
function _temp7 (line 462) | function _temp7(c) {
function _temp6 (line 465) | function _temp6(c_1) {
function _temp5 (line 468) | function _temp5(row, rowIndex) {
function _temp4 (line 471) | function _temp4(square, colIndex) {
function _temp3 (line 480) | function _temp3(cat_1) {
function _temp2 (line 483) | function _temp2(cat_0) {
function _temp (line 486) | function _temp(cat) {
FILE: restored-src/src/components/CoordinatorAgentStatus.tsx
function getVisibleAgentTasks (line 31) | function getVisibleAgentTasks(tasks: AppState['tasks']): LocalAgentTaskS...
function CoordinatorTaskPanel (line 34) | function CoordinatorTaskPanel(): React.ReactNode {
function useCoordinatorTaskCount (line 83) | function useCoordinatorTaskCount() {
function _temp (line 89) | function _temp(s) {
function MainLine (line 92) | function MainLine(t0) {
type AgentLineProps (line 136) | type AgentLineProps = {
function AgentLine (line 143) | function AgentLine(t0) {
FILE: restored-src/src/components/CostThresholdDialog.tsx
type Props (line 6) | type Props = {
function CostThresholdDialog (line 9) | function CostThresholdDialog(t0) {
FILE: restored-src/src/components/CtrlOToExpand.tsx
function SubAgentProvider (line 14) | function SubAgentProvider(t0) {
function CtrlOToExpand (line 29) | function CtrlOToExpand() {
function ctrlOToExpand (line 47) | function ctrlOToExpand(): string {
FILE: restored-src/src/components/CustomSelect/SelectMulti.tsx
type SelectMultiProps (line 11) | type SelectMultiProps<T> = {
function SelectMulti (line 58) | function SelectMulti(t0) {
function _temp (line 212) | function _temp() {}
FILE: restored-src/src/components/CustomSelect/option-map.ts
type OptionMapItem (line 4) | type OptionMapItem<T> = {
class OptionMap (line 13) | class OptionMap<T> extends Map<T, OptionMapItem<T>> {
method constructor (line 17) | constructor(options: OptionWithDescription<T>[]) {
FILE: restored-src/src/components/CustomSelect/select-input-option.tsx
type Props (line 15) | type Props<T> = {
function SelectInputOption (line 78) | function SelectInputOption(t0) {
function _temp (line 485) | function _temp(c) {
FILE: restored-src/src/components/CustomSelect/select-option.tsx
type SelectOptionProps (line 4) | type SelectOptionProps = {
function SelectOption (line 41) | function SelectOption(t0) {
FILE: restored-src/src/components/CustomSelect/select.tsx
function getTextContent (line 16) | function getTextContent(node: ReactNode): string {
type BaseOption (line 28) | type BaseOption<T> = {
type OptionWithDescription (line 35) | type OptionWithDescription<T = string> = (BaseOption<T> & {
type SelectProps (line 70) | type SelectProps<T> = {
function Select (line 192) | function Select(t0) {
function _temp9 (line 629) | function _temp9(c_3) {
function _temp8 (line 632) | function _temp8(opt_0) {
function _temp7 (line 635) | function _temp7(opt) {
function _temp6 (line 638) | function _temp6(c_2) {
function _temp5 (line 641) | function _temp5(c_1) {
function _temp4 (line 644) | function _temp4() {
function _temp3 (line 649) | function _temp3() {
function _temp2 (line 654) | function _temp2(c) {
function _temp (line 657) | function _temp(c_0) {
function TwoColumnRow (line 660) | function TwoColumnRow(t0) {
FILE: restored-src/src/components/CustomSelect/use-multi-select-state.ts
type UseMultiSelectStateProps (line 14) | type UseMultiSelectStateProps<T> = {
type MultiSelectState (line 96) | type MultiSelectState<T> = {
function useMultiSelectState (line 153) | function useMultiSelectState<T>({
FILE: restored-src/src/components/CustomSelect/use-select-input.ts
type UseSelectProps (line 13) | type UseSelectProps<T> = {
FILE: restored-src/src/components/CustomSelect/use-select-navigation.ts
type State (line 13) | type State<T> = {
type Action (line 40) | type Action<T> =
type SetFocusAction (line 48) | type SetFocusAction<T> = {
type FocusNextOptionAction (line 53) | type FocusNextOptionAction = {
type FocusPreviousOptionAction (line 57) | type FocusPreviousOptionAction = {
type FocusNextPageAction (line 61) | type FocusNextPageAction = {
type FocusPreviousPageAction (line 65) | type FocusPreviousPageAction = {
type ResetAction (line 69) | type ResetAction<T> = {
type UseSelectNavigationProps (line 332) | type UseSelectNavigationProps<T> = {
type SelectNavigation (line 361) | type SelectNavigation<T> = {
function useSelectNavigation (line 505) | function useSelectNavigation<T>({
FILE: restored-src/src/components/CustomSelect/use-select-state.ts
type UseSelectStateProps (line 5) | type UseSelectStateProps<T> = {
type SelectState (line 44) | type SelectState<T> = {
function useSelectState (line 127) | function useSelectState<T>({
FILE: restored-src/src/components/DesktopHandoff.tsx
constant DESKTOP_DOCS_URL (line 12) | const DESKTOP_DOCS_URL = 'https://clau.de/desktop';
function getDownloadUrl (line 13) | function getDownloadUrl(): string {
type DesktopHandoffState (line 21) | type DesktopHandoffState = 'checking' | 'prompt-download' | 'flushing' |...
type Props (line 22) | type Props = {
function DesktopHandoff (line 27) | function DesktopHandoff(t0) {
function _temp2 (line 186) | async function _temp2(onDone_0) {
function _temp (line 192) | function _temp() {}
FILE: restored-src/src/components/DesktopUpsell/DesktopUpsellStartup.tsx
type DesktopUpsellConfig (line 11) | type DesktopUpsellConfig = {
constant DESKTOP_UPSELL_DEFAULT (line 15) | const DESKTOP_UPSELL_DEFAULT: DesktopUpsellConfig = {
function getDesktopUpsellConfig (line 19) | function getDesktopUpsellConfig(): DesktopUpsellConfig {
function isSupportedPlatform (line 22) | function isSupportedPlatform(): boolean {
function shouldShowDesktopUpsellStartup (line 25) | function shouldShowDesktopUpsellStartup(): boolean {
type DesktopUpsellSelection (line 33) | type DesktopUpsellSelection = 'try' | 'not-now' | 'never';
type Props (line 34) | type Props = {
function DesktopUpsellStartup (line 37) | function DesktopUpsellStartup(t0) {
function _temp2 (line 147) | function _temp2(prev_0) {
function _temp (line 156) | function _temp() {
FILE: restored-src/src/components/DevBar.tsx
function shouldShowDevBar (line 8) | function shouldShowDevBar(): boolean {
function DevBar (line 11) | function DevBar() {
function _temp (line 46) | function _temp(op) {
FILE: restored-src/src/components/DevChannelsDialog.tsx
type Props (line 8) | type Props = {
function DevChannelsDialog (line 12) | function DevChannelsDialog(t0) {
function _temp2 (line 99) | function _temp2(c) {
function _temp (line 102) | function _temp() {
FILE: restored-src/src/components/DiagnosticsDisplay.tsx
type DiagnosticsAttachment (line 10) | type DiagnosticsAttachment = Extract<Attachment, {
type DiagnosticsDisplayProps (line 13) | type DiagnosticsDisplayProps = {
function DiagnosticsDisplay (line 17) | function DiagnosticsDisplay(t0) {
function _temp3 (line 86) | function _temp3(file_0, fileIndex) {
function _temp2 (line 89) | function _temp2(diagnostic, diagIndex) {
function _temp (line 92) | function _temp(sum, file) {
FILE: restored-src/src/components/EffortCallout.tsx
type EffortCalloutSelection (line 14) | type EffortCalloutSelection = EffortLevel | undefined | 'dismiss';
type Props (line 15) | type Props = {
constant AUTO_DISMISS_MS (line 19) | const AUTO_DISMISS_MS = 30_000;
function EffortCallout (line 20) | function EffortCallout(t0) {
function _temp (line 159) | function _temp() {
function EffortIndicatorSymbol (line 162) | function EffortIndicatorSymbol(t0) {
function EffortOptionLabel (line 185) | function EffortOptionLabel(t0) {
function shouldShowEffortCallout (line 219) | function shouldShowEffortCallout(model: string): boolean {
function markV2Dismissed (line 256) | function markV2Dismissed(): void {
FILE: restored-src/src/components/EffortIndicator.ts
function getEffortNotificationText (line 18) | function getEffortNotificationText(
function effortLevelToSymbol (line 27) | function effortLevelToSymbol(level: EffortLevel): string {
FILE: restored-src/src/components/ExitFlow.tsx
constant GOODBYE_MESSAGES (line 6) | const GOODBYE_MESSAGES = ['Goodbye!', 'See ya!', 'Bye!', 'Catch you late...
function getRandomGoodbyeMessage (line 7) | function getRandomGoodbyeMessage(): string {
type Props (line 10) | type Props = {
function ExitFlow (line 15) | function ExitFlow(t0) {
FILE: restored-src/src/components/ExportDialog.tsx
type ExportDialogProps (line 16) | type ExportDialogProps = {
type ExportOption (line 24) | type ExportOption = 'clipboard' | 'file';
function ExportDialog (line 25) | function ExportDialog({
FILE: restored-src/src/components/FallbackToolUseErrorMessage.tsx
constant MAX_RENDERED_LINES (line 11) | const MAX_RENDERED_LINES = 10;
type Props (line 12) | type Props = {
function FallbackToolUseErrorMessage (line 16) | function FallbackToolUseErrorMessage(t0) {
FILE: restored-src/src/components/FallbackToolUseRejectedMessage.tsx
function FallbackToolUseRejectedMessage (line 5) | function FallbackToolUseRejectedMessage() {
FILE: restored-src/src/components/FastIcon.tsx
type Props (line 9) | type Props = {
function FastIcon (line 12) | function FastIcon(t0) {
function getFastIconString (line 36) | function getFastIconString(applyColor = true, cooldown = false): string {
FILE: restored-src/src/components/Feedback.tsx
constant GITHUB_URL_LIMIT (line 34) | const GITHUB_URL_LIMIT = 7250;
constant GITHUB_ISSUES_REPO_URL (line 35) | const GITHUB_ISSUES_REPO_URL = "external" === 'ant' ? 'https://github.co...
type Props (line 36) | type Props = {
type Step (line 53) | type Step = 'userInput' | 'consent' | 'submitting' | 'done';
type FeedbackData (line 54) | type FeedbackData = {
function redactSensitiveInfo (line 71) | function redactSensitiveInfo(text: string): string {
function getSanitizedErrorLogs (line 116) | function getSanitizedErrorLogs(): Array<{
function loadRawTranscriptJsonl (line 137) | async function loadRawTranscriptJsonl(): Promise<string | null> {
function Feedback (line 154) | function Feedback({
function createGitHubIssueUrl (line 393) | function createGitHubIssueUrl(feedbackId: string, title: string, descrip...
function generateTitle (line 447) | async function generateTitle(description: string, abortSignal: AbortSign...
function createFallbackTitle (line 475) | function createFallbackTitle(description: string): string {
function sanitizeAndLogError (line 502) | function sanitizeAndLogError(err: unknown): void {
function submitFeedback (line 518) | async function submitFeedback(data: FeedbackData, signal?: AbortSignal):...
FILE: restored-src/src/components/FeedbackSurvey/FeedbackSurvey.tsx
type Props (line 10) | type Props = {
function FeedbackSurvey (line 20) | function FeedbackSurvey(t0) {
type ThanksProps (line 104) | type ThanksProps = {
function FeedbackSurveyThanks (line 111) | function FeedbackSurveyThanks(t0) {
FILE: restored-src/src/components/FeedbackSurvey/FeedbackSurveyView.tsx
type Props (line 6) | type Props = {
constant RESPONSE_INPUTS (line 12) | const RESPONSE_INPUTS = ['0', '1', '2', '3'] as const;
type ResponseInput (line 13) | type ResponseInput = (typeof RESPONSE_INPUTS)[number];
constant DEFAULT_MESSAGE (line 21) | const DEFAULT_MESSAGE = 'How is Claude doing this session? (optional)';
function FeedbackSurveyView (line 22) | function FeedbackSurveyView(t0) {
FILE: restored-src/src/components/FeedbackSurvey/TranscriptSharePrompt.tsx
type TranscriptShareResponse (line 6) | type TranscriptShareResponse = 'yes' | 'no' | 'dont_ask_again';
type Props (line 7) | type Props = {
constant RESPONSE_INPUTS (line 12) | const RESPONSE_INPUTS = ['1', '2', '3'] as const;
type ResponseInput (line 13) | type ResponseInput = (typeof RESPONSE_INPUTS)[number];
function TranscriptSharePrompt (line 20) | function TranscriptSharePrompt(t0) {
FILE: restored-src/src/components/FeedbackSurvey/submitTranscriptShare.ts
type TranscriptShareResult (line 18) | type TranscriptShareResult = {
type TranscriptShareTrigger (line 23) | type TranscriptShareTrigger =
function submitTranscriptShare (line 29) | async function submitTranscriptShare(
FILE: restored-src/src/components/FeedbackSurvey/useDebouncedDigitInput.ts
constant DEFAULT_DEBOUNCE_MS (line 8) | const DEFAULT_DEBOUNCE_MS = 400
function useDebouncedDigitInput (line 18) | function useDebouncedDigitInput<T extends string = string>({
FILE: restored-src/src/components/FeedbackSurvey/useFeedbackSurvey.tsx
type FeedbackSurveyConfig (line 17) | type FeedbackSurveyConfig = {
type TranscriptAskConfig (line 27) | type TranscriptAskConfig = {
constant DEFAULT_FEEDBACK_SURVEY_CONFIG (line 30) | const DEFAULT_FEEDBACK_SURVEY_CONFIG: FeedbackSurveyConfig = {
constant DEFAULT_TRANSCRIPT_ASK_CONFIG (line 40) | const DEFAULT_TRANSCRIPT_ASK_CONFIG: TranscriptAskConfig = {
function useFeedbackSurvey (line 43) | function useFeedbackSurvey(messages: Message[], isLoading: boolean, subm...
FILE: restored-src/src/components/FeedbackSurvey/useMemorySurvey.tsx
constant HIDE_THANKS_AFTER_MS (line 18) | const HIDE_THANKS_AFTER_MS = 3000;
constant MEMORY_SURVEY_GATE (line 19) | const MEMORY_SURVEY_GATE = 'tengu_dunwich_bell';
constant MEMORY_SURVEY_EVENT (line 20) | const MEMORY_SURVEY_EVENT = 'tengu_memory_survey_event';
constant SURVEY_PROBABILITY (line 21) | const SURVEY_PROBABILITY = 0.2;
constant TRANSCRIPT_SHARE_TRIGGER (line 22) | const TRANSCRIPT_SHARE_TRIGGER = 'memory_survey';
constant MEMORY_WORD_RE (line 23) | const MEMORY_WORD_RE = /\bmemor(?:y|ies)\b/i;
function hasMemoryFileRead (line 24) | function hasMemoryFileRead(messages: Message[]): boolean {
function useMemorySurvey (line 47) | function useMemorySurvey(messages: Message[], isLoading: boolean, hasAct...
FILE: restored-src/src/components/FeedbackSurvey/usePostCompactSurvey.tsx
constant HIDE_THANKS_AFTER_MS (line 13) | const HIDE_THANKS_AFTER_MS = 3000;
constant POST_COMPACT_SURVEY_GATE (line 14) | const POST_COMPACT_SURVEY_GATE = 'tengu_post_compact_survey';
constant SURVEY_PROBABILITY (line 15) | const SURVEY_PROBABILITY = 0.2;
function hasMessageAfterBoundary (line 17) | function hasMessageAfterBoundary(messages: Message[], boundaryUuid: stri...
function usePostCompactSurvey (line 32) | function usePostCompactSurvey(messages, isLoading, t0, t1) {
function _temp4 (line 172) | function _temp4(msg_0) {
function _temp3 (line 175) | function _temp3(msg) {
function _temp2 (line 178) | function _temp2(appearanceId_0, selected) {
function _temp (line 193) | function _temp(appearanceId) {
FILE: restored-src/src/components/FeedbackSurvey/useSurveyState.tsx
type SurveyState (line 5) | type SurveyState = 'closed' | 'open' | 'thanks' | 'transcript_prompt' | ...
type UseSurveyStateOptions (line 6) | type UseSurveyStateOptions = {
function useSurveyState (line 14) | function useSurveyState({
FILE: restored-src/src/components/FileEditToolDiff.tsx
type Props (line 14) | type Props = {
type DiffData (line 18) | type DiffData = {
function FileEditToolDiff (line 23) | function FileEditToolDiff(props) {
function DiffBody (line 53) | function DiffBody(t0) {
function DiffFrame (line 81) | function DiffFrame(t0) {
function loadDiffData (line 106) | async function loadDiffData(file_path: string, edits: FileEdit[]): Promi...
function diffToolInputsOnly (line 161) | function diffToolInputsOnly(filePath: string, edits: FileEdit[]): DiffDa...
function normalizeEdit (line 172) | function normalizeEdit(fileContent: string, edit: FileEdit): FileEdit {
FILE: restored-src/src/components/FileEditToolUpdatedMessage.tsx
type Props (line 9) | type Props = {
function FileEditToolUpdatedMessage (line 18) | function FileEditToolUpdatedMessage(t0) {
function _temp4 (line 112) | function _temp4(acc_0, hunk_0) {
function _temp3 (line 115) | function _temp3(__0) {
function _temp2 (line 118) | function _temp2(acc, hunk) {
function _temp (line 121) | function _temp(_) {
FILE: restored-src/src/components/FileEditToolUseRejectedMessage.tsx
constant MAX_LINES_TO_RENDER (line 11) | const MAX_LINES_TO_RENDER = 10;
type Props (line 12) | type Props = {
function FileEditToolUseRejectedMessage (line 24) | function FileEditToolUseRejectedMessage(t0) {
FILE: restored-src/src/components/FilePathLink.tsx
type Props (line 5) | type Props = {
function FilePathLink (line 17) | function FilePathLink(t0) {
FILE: restored-src/src/components/FullscreenLayout.tsx
constant MODAL_TRANSCRIPT_PEEK (line 20) | const MODAL_TRANSCRIPT_PEEK = 2;
type Props (line 31) | type Props = {
function useUnseenDivider (line 86) | function useUnseenDivider(messageCount: number): {
function countUnseenAssistantTurns (line 200) | function countUnseenAssistantTurns(messages: readonly Message[], divider...
function assistantHasVisibleText (line 217) | function assistantHasVisibleText(m: Message): boolean {
type UnseenDivider (line 224) | type UnseenDivider = {
function computeUnseenDivider (line 239) | function computeUnseenDivider(messages: readonly Message[], dividerIndex...
function FullscreenLayout (line 270) | function FullscreenLayout(t0) {
function _temp3 (line 468) | function _temp3() {
function _temp2 (line 481) | function _temp2(url) {
function _temp (line 490) | function _temp() {}
function NewMessagesPill (line 491) | function NewMessagesPill(t0) {
function StickyPromptHeader (line 551) | function StickyPromptHeader(t0) {
function SuggestionsOverlay (line 599) | function SuggestionsOverlay() {
function DialogOverlay (line 621) | function DialogOverlay() {
FILE: restored-src/src/components/GlobalSearchDialog.tsx
type Props (line 18) | type Props = {
type Match (line 22) | type Match = {
constant VISIBLE_RESULTS (line 27) | const VISIBLE_RESULTS = 12;
constant DEBOUNCE_MS (line 28) | const DEBOUNCE_MS = 100;
constant PREVIEW_CONTEXT_LINES (line 29) | const PREVIEW_CONTEXT_LINES = 4;
constant MAX_MATCHES_PER_FILE (line 31) | const MAX_MATCHES_PER_FILE = 10;
constant MAX_TOTAL_MATCHES (line 32) | const MAX_TOTAL_MATCHES = 500;
function GlobalSearchDialog (line 38) | function GlobalSearchDialog(t0) {
function _temp4 (line 265) | function _temp4(query_0, controller_1, setMatches_0, setTruncated_0, set...
function _temp3 (line 313) | function _temp3(m_2) {
function _temp2 (line 316) | function _temp2() {}
function _temp (line 317) | function _temp(m) {
function matchKey (line 320) | function matchKey(m: Match): string {
function parseRipgrepLine (line 331) | function parseRipgrepLine(line: string): Match | null {
FILE: restored-src/src/components/HelpV2/Commands.tsx
type Props (line 9) | type Props = {
function Commands (line 17) | function Commands(t0) {
function _temp (line 79) | function _temp(a, b) {
FILE: restored-src/src/components/HelpV2/General.tsx
function General (line 5) | function General() {
FILE: restored-src/src/components/HelpV2/HelpV2.tsx
type Props (line 14) | type Props = {
function HelpV2 (line 20) | function HelpV2(t0) {
FILE: restored-src/src/components/HighlightedCode.tsx
type Props (line 11) | type Props = {
constant DEFAULT_WIDTH (line 17) | const DEFAULT_WIDTH = 80;
function CodeLine (line 137) | function CodeLine(t0) {
FILE: restored-src/src/components/HighlightedCode/Fallback.tsx
type Props (line 9) | type Props = {
constant HL_CACHE_MAX (line 19) | const HL_CACHE_MAX = 500;
function cachedHighlight (line 21) | function cachedHighlight(hl: NonNullable<Awaited<ReturnType<typeof getCl...
function HighlightedCodeFallback (line 39) | function HighlightedCodeFallback(t0) {
function Highlighted (line 124) | function Highlighted(t0) {
FILE: restored-src/src/components/HistorySearchDialog.tsx
type Props (line 13) | type Props = {
constant PREVIEW_ROWS (line 18) | const PREVIEW_ROWS = 6;
constant AGE_WIDTH (line 19) | const AGE_WIDTH = 8;
type Item (line 20) | type Item = {
function HistorySearchDialog (line 27) | function HistorySearchDialog({
function isSubsequence (line 111) | function isSubsequence(text: string, query: string): boolean {
FILE: restored-src/src/components/IdeAutoConnectDialog.tsx
type IdeAutoConnectDialogProps (line 8) | type IdeAutoConnectDialogProps = {
function IdeAutoConnectDialog (line 11) | function IdeAutoConnectDialog(t0) {
function shouldShowAutoConnectDialog (line 73) | function shouldShowAutoConnectDialog(): boolean {
type IdeDisableAutoConnectDialogProps (line 77) | type IdeDisableAutoConnectDialogProps = {
function IdeDisableAutoConnectDialog (line 80) | function IdeDisableAutoConnectDialog(t0) {
function _temp (line 144) | function _temp(current) {
function shouldShowDisableAutoConnectDialog (line 150) | function shouldShowDisableAutoConnectDialog(): boolean {
FILE: restored-src/src/components/IdeOnboardingDialog.tsx
type Props (line 10) | interface Props {
function IdeOnboardingDialog (line 14) | function IdeOnboardingDialog(t0) {
function hasIdeOnboardingDialogBeenShown (line 149) | function hasIdeOnboardingDialogBeenShown(): boolean {
function markDialogAsShown (line 154) | function markDialogAsShown(): void {
FILE: restored-src/src/components/IdeStatusIndicator.tsx
type IdeStatusIndicatorProps (line 8) | type IdeStatusIndicatorProps = {
function IdeStatusIndicator (line 12) | function IdeStatusIndicator(t0) {
FILE: restored-src/src/components/IdleReturnDialog.tsx
type IdleReturnAction (line 7) | type IdleReturnAction = 'continue' | 'clear' | 'dismiss' | 'never';
type Props (line 8) | type Props = {
function IdleReturnDialog (line 13) | function IdleReturnDialog(t0) {
function formatIdleDuration (line 104) | function formatIdleDuration(minutes: number): string {
FILE: restored-src/src/components/InterruptedByUser.tsx
function InterruptedByUser (line 4) | function InterruptedByUser() {
FILE: restored-src/src/components/InvalidConfigDialog.tsx
type InvalidConfigHandlerProps (line 12) | interface InvalidConfigHandlerProps {
type InvalidConfigDialogProps (line 15) | interface InvalidConfigDialogProps {
function InvalidConfigDialog (line 25) | function InvalidConfigDialog(t0) {
constant SAFE_ERROR_THEME_NAME (line 120) | const SAFE_ERROR_THEME_NAME: ThemeName = 'dark';
function showInvalidConfigDialog (line 121) | async function showInvalidConfigDialog({
FILE: restored-src/src/components/InvalidSettingsDialog.tsx
type Props (line 8) | type Props = {
function InvalidSettingsDialog (line 18) | function InvalidSettingsDialog(t0) {
FILE: restored-src/src/components/KeybindingWarnings.tsx
function KeybindingWarnings (line 13) | function KeybindingWarnings() {
function _temp4 (line 43) | function _temp4(warning, i_0) {
function _temp3 (line 46) | function _temp3(error, i) {
function _temp2 (line 49) | function _temp2(w_0) {
function _temp (line 52) | function _temp(w) {
FILE: restored-src/src/components/LanguagePicker.tsx
type Props (line 7) | type Props = {
function LanguagePicker (line 12) | function LanguagePicker(t0) {
FILE: restored-src/src/components/LogSelector.tsx
type AgenticSearchState (line 33) | type AgenticSearchState = {
type LogSelectorProps (line 45) | type LogSelectorProps = {
type LogTreeNode (line 58) | type LogTreeNode = TreeNode<{
function normalizeAndTruncateToWidth (line 62) | function normalizeAndTruncateToWidth(text: string, maxWidth: number): st...
constant PARENT_PREFIX_WIDTH (line 68) | const PARENT_PREFIX_WIDTH = 2;
constant CHILD_PREFIX_WIDTH (line 69) | const CHILD_PREFIX_WIDTH = 4;
constant DEEP_SEARCH_MAX_MESSAGES (line 72) | const DEEP_SEARCH_MAX_MESSAGES = 2000;
constant DEEP_SEARCH_CROP_SIZE (line 73) | const DEEP_SEARCH_CROP_SIZE = 1000;
constant DEEP_SEARCH_MAX_TEXT_LENGTH (line 74) | const DEEP_SEARCH_MAX_TEXT_LENGTH = 50000;
constant FUSE_THRESHOLD (line 75) | const FUSE_THRESHOLD = 0.3;
constant DATE_TIE_THRESHOLD_MS (line 76) | const DATE_TIE_THRESHOLD_MS = 60 * 1000;
constant SNIPPET_CONTEXT_CHARS (line 77) | const SNIPPET_CONTEXT_CHARS = 50;
type Snippet (line 79) | type Snippet = {
function formatSnippet (line 84) | function formatSnippet({
function extractSnippet (line 91) | function extractSnippet(text: string, query: string, contextChars: numbe...
function buildLogLabel (line 110) | function buildLogLabel(log: LogOption, maxLabelWidth: number, options?: {
function buildLogMetadata (line 129) | function buildLogMetadata(log: LogOption, options?: {
function LogSelector (line 143) | function LogSelector(t0) {
function _temp7 (line 1454) | function _temp7(r_0) {
function _temp6 (line 1457) | function _temp6(log_6) {
function _temp5 (line 1460) | function _temp5(fuseIndex_0, debouncedDeepSearchQuery_0, setDeepSearchRe...
function _temp4 (line 1469) | function _temp4(r) {
function _temp3 (line 1476) | function _temp3(a, b) {
function _temp2 (line 1485) | function _temp2(log_1) {
function _temp (line 1504) | function _temp(log) {
function extractSearchableText (line 1507) | function extractSearchableText(message: SerializedMessage): string {
function buildSearchableText (line 1537) | function buildSearchableText(log: LogOption): string {
function groupLogsBySessionId (line 1544) | function groupLogsBySessionId(filteredLogs: LogOption[]): Map<string, Lo...
function getUniqueTags (line 1566) | function getUniqueTags(logs: LogOption[]): string[] {
FILE: restored-src/src/components/LogoV2/AnimatedAsterisk.tsx
constant SWEEP_DURATION_MS (line 7) | const SWEEP_DURATION_MS = 1500;
constant SWEEP_COUNT (line 8) | const SWEEP_COUNT = 2;
constant TOTAL_ANIMATION_MS (line 9) | const TOTAL_ANIMATION_MS = SWEEP_DURATION_MS * SWEEP_COUNT;
constant SETTLED_GREY (line 10) | const SETTLED_GREY = toRGBColor({
function AnimatedAsterisk (line 15) | function AnimatedAsterisk({
FILE: restored-src/src/components/LogoV2/AnimatedClawd.tsx
type Frame (line 7) | type Frame = {
function hold (line 13) | function hold(pose: ClawdPose, offset: number, frames: number): Frame[] {
constant JUMP_WAVE (line 28) | const JUMP_WAVE: readonly Frame[] = [...hold('default', 1, 2),
constant LOOK_AROUND (line 39) | const LOOK_AROUND: readonly Frame[] = [...hold('look-right', 0, 5), ...h...
constant CLICK_ANIMATIONS (line 40) | const CLICK_ANIMATIONS: readonly (readonly Frame[])[] = [JUMP_WAVE, LOOK...
constant IDLE (line 41) | const IDLE: Frame = {
constant FRAME_MS (line 45) | const FRAME_MS = 60;
constant CLAWD_HEIGHT (line 47) | const CLAWD_HEIGHT = 3;
function AnimatedClawd (line 57) | function AnimatedClawd() {
function useClawdAnimation (line 92) | function useClawdAnimation(): {
FILE: restored-src/src/components/LogoV2/ChannelsNotice.tsx
function ChannelsNotice (line 18) | function ChannelsNotice() {
function _temp4 (line 164) | function _temp4(u_0) {
function _temp3 (line 167) | function _temp3(u) {
function _temp2 (line 170) | function _temp2(c) {
function _temp (line 173) | function _temp() {
function formatEntry (line 199) | function formatEntry(c: ChannelEntry): string {
type Unmatched (line 202) | type Unmatched = {
function findUnmatched (line 206) | function findUnmatched(entries: readonly ChannelEntry[], allowlist: Retu...
FILE: restored-src/src/components/LogoV2/Clawd.tsx
type ClawdPose (line 5) | type ClawdPose = 'default' | 'arms-up' // both arms raised (used during ...
type Props (line 9) | type Props = {
type Segments (line 22) | type Segments = {
constant POSES (line 34) | const POSES: Record<ClawdPose, Segments> = {
constant APPLE_EYES (line 67) | const APPLE_EYES: Record<ClawdPose, string> = {
function Clawd (line 73) | function Clawd(t0) {
function AppleTerminalClawd (line 183) | function AppleTerminalClawd(t0) {
FILE: restored-src/src/components/LogoV2/CondensedLogo.tsx
function CondensedLogo (line 19) | function CondensedLogo() {
function _temp2 (line 155) | function _temp2(s_0) {
function _temp (line 158) | function _temp(s) {
FILE: restored-src/src/components/LogoV2/EmergencyTip.tsx
constant CONFIG_NAME (line 6) | const CONFIG_NAME = 'tengu-top-of-feed-tip';
function EmergencyTip (line 7) | function EmergencyTip(): React.ReactNode {
type TipOfFeed (line 42) | type TipOfFeed = {
constant DEFAULT_TIP (line 46) | const DEFAULT_TIP: TipOfFeed = {
function getTipOfFeed (line 55) | function getTipOfFeed(): TipOfFeed {
FILE: restored-src/src/components/LogoV2/Feed.tsx
type FeedLine (line 6) | type FeedLine = {
type FeedConfig (line 10) | type FeedConfig = {
type FeedProps (line 20) | type FeedProps = {
function calculateFeedWidth (line 24) | function calculateFeedWidth(config: FeedConfig): number {
function Feed (line 51) | function Feed(t0) {
function _temp (line 109) | function _temp(line) {
FILE: restored-src/src/components/LogoV2/FeedColumn.tsx
type FeedColumnProps (line 7) | type FeedColumnProps = {
function FeedColumn (line 11) | function FeedColumn(t0) {
function _temp (line 56) | function _temp(feed) {
FILE: restored-src/src/components/LogoV2/GuestPassesUpsell.tsx
function resetIfPassesRefreshed (line 8) | function resetIfPassesRefreshed(): void {
function shouldShowGuestPassesUpsell (line 22) | function shouldShowGuestPassesUpsell(): boolean {
function useShowGuestPassesUpsell (line 36) | function useShowGuestPassesUpsell() {
function _temp (line 40) | function _temp() {
function incrementGuestPassesSeenCount (line 43) | function incrementGuestPassesSeenCount(): void {
function GuestPassesUpsell (line 58) | function GuestPassesUpsell() {
FILE: restored-src/src/components/LogoV2/LogoV2.tsx
constant LEFT_PANEL_MAX_WIDTH (line 46) | const LEFT_PANEL_MAX_WIDTH = 50;
function LogoV2 (line 47) | function LogoV2() {
function _temp3 (line 528) | function _temp3(current) {
function _temp2 (line 537) | function _temp2(s_0) {
function _temp (line 540) | function _temp(s) {
FILE: restored-src/src/components/LogoV2/Opus1mMergeNotice.tsx
constant MAX_SHOW_COUNT (line 9) | const MAX_SHOW_COUNT = 6;
function shouldShowOpus1mMergeNotice (line 10) | function shouldShowOpus1mMergeNotice(): boolean {
function Opus1mMergeNotice (line 13) | function Opus1mMergeNotice() {
FILE: restored-src/src/components/LogoV2/OverageCreditUpsell.tsx
constant MAX_IMPRESSIONS (line 10) | const MAX_IMPRESSIONS = 3;
function isEligibleForOverageCreditGrant (line 27) | function isEligibleForOverageCreditGrant(): boolean {
function shouldShowOverageCreditUpsell (line 32) | function shouldShowOverageCreditUpsell(): boolean {
function maybeRefreshOverageCreditCache (line 44) | function maybeRefreshOverageCreditCache(): void {
function useShowOverageCreditUpsell (line 48) | function useShowOverageCreditUpsell() {
function _temp (line 52) | function _temp() {
function incrementOverageCreditUpsellSeenCount (line 56) | function incrementOverageCreditUpsellSeenCount(): void {
function getUsageText (line 71) | function getUsageText(amount: string): string {
constant FEED_SUBTITLE (line 77) | const FEED_SUBTITLE = 'On us. Works on third-party apps · /extra-usage';
function getFeedTitle (line 78) | function getFeedTitle(amount: string): string {
type Props (line 81) | type Props = {
function OverageCreditUpsell (line 85) | function OverageCreditUpsell(t0) {
function createOverageCreditFeed (line 153) | function createOverageCreditFeed(): FeedConfig {
FILE: restored-src/src/components/LogoV2/VoiceModeNotice.tsx
constant MAX_SHOW_COUNT (line 11) | const MAX_SHOW_COUNT = 3;
function VoiceModeNotice (line 12) | function VoiceModeNotice() {
function VoiceModeNoticeInner (line 23) | function VoiceModeNoticeInner() {
function _temp (line 65) | function _temp() {
FILE: restored-src/src/components/LogoV2/WelcomeV2.tsx
constant WELCOME_V2_WIDTH (line 5) | const WELCOME_V2_WIDTH = 58;
function WelcomeV2 (line 6) | function WelcomeV2() {
type AppleTerminalWelcomeV2Props (line 199) | type AppleTerminalWelcomeV2Props = {
function AppleTerminalWelcomeV2 (line 203) | function AppleTerminalWelcomeV2(t0) {
FILE: restored-src/src/components/LogoV2/feedConfigs.tsx
function createRecentActivityFeed (line 11) | function createRecentActivityFeed(activities: LogOption[]): FeedConfig {
function createWhatsNewFeed (line 27) | function createWhatsNewFeed(releaseNotes: string[]): FeedConfig {
function createProjectOnboardingFeed (line 50) | function createProjectOnboardingFeed(steps: Step[]): FeedConfig {
function createGuestPassesFeed (line 74) | function createGuestPassesFeed(): FeedConfig {
FILE: restored-src/src/components/LspRecommendation/LspRecommendationMenu.tsx
type Props (line 5) | type Props = {
constant AUTO_DISMISS_MS (line 11) | const AUTO_DISMISS_MS = 30_000;
function LspRecommendationMenu (line 12) | function LspRecommendationMenu({
FILE: restored-src/src/components/MCPServerApprovalDialog.tsx
type Props (line 8) | type Props = {
function MCPServerApprovalDialog (line 12) | function MCPServerApprovalDialog(t0) {
FILE: restored-src/src/components/MCPServerDesktopImportDialog.tsx
type Props (line 14) | type Props = {
function MCPServerDesktopImportDialog (line 19) | function MCPServerDesktopImportDialog(t0) {
FILE: restored-src/src/components/MCPServerDialogCopy.tsx
function MCPServerDialogCopy (line 4) | function MCPServerDialogCopy() {
FILE: restored-src/src/components/MCPServerMultiselectDialog.tsx
type Props (line 13) | type Props = {
function MCPServerMultiselectDialog (line 17) | function MCPServerMultiselectDialog(t0) {
function _temp (line 127) | function _temp(server_0) {
FILE: restored-src/src/components/ManagedSettingsSecurityDialog/ManagedSettingsSecurityDialog.tsx
type Props (line 10) | type Props = {
function ManagedSettingsSecurityDialog (line 15) | function ManagedSettingsSecurityDialog(t0) {
function _temp (line 146) | function _temp(item, index) {
FILE: restored-src/src/components/ManagedSettingsSecurityDialog/utils.ts
type DangerousShellSetting (line 8) | type DangerousShellSetting = (typeof DANGEROUS_SHELL_SETTINGS)[number]
type DangerousSettings (line 10) | type DangerousSettings = {
function extractDangerousSettings (line 24) | function extractDangerousSettings(
function hasDangerousSettings (line 75) | function hasDangerousSettings(dangerous: DangerousSettings): boolean {
function hasDangerousSettingsChanged (line 87) | function hasDangerousSettingsChanged(
function formatDangerousSettingsList (line 123) | function formatDangerousSettingsList(
FILE: restored-src/src/components/Markdown.tsx
type Props (line 11) | type Props = {
constant TOKEN_CACHE_MAX (line 22) | const TOKEN_CACHE_MAX = 500;
constant MD_SYNTAX_RE (line 31) | const MD_SYNTAX_RE = /[#*`|[>\-_~]|\n\n|^\d+\. |\n\d+\. /;
function hasMarkdownSyntax (line 32) | function hasMarkdownSyntax(s: string): boolean {
function cachedLexer (line 37) | function cachedLexer(content: string): Token[] {
function Markdown (line 78) | function Markdown(props) {
function MarkdownWithHighlight (line 102) | function MarkdownWithHighlight(props) {
function MarkdownBody (line 123) | function MarkdownBody(t0) {
type StreamingProps (line 172) | type StreamingProps = {
function StreamingMarkdown (line 186) | function StreamingMarkdown({
FILE: restored-src/src/components/MarkdownTable.tsx
constant SAFETY_MARGIN (line 15) | const SAFETY_MARGIN = 4;
constant MIN_COLUMN_WIDTH (line 18) | const MIN_COLUMN_WIDTH = 3;
constant MAX_ROW_LINES (line 25) | const MAX_ROW_LINES = 4;
constant ANSI_BOLD_START (line 28) | const ANSI_BOLD_START = '\x1b[1m';
constant ANSI_BOLD_END (line 29) | const ANSI_BOLD_END = '\x1b[22m';
type Props (line 30) | type Props = {
function wrapText (line 44) | function wrapText(text: string, width: number, options?: {
function MarkdownTable (line 72) | function MarkdownTable({
FILE: restored-src/src/components/MemoryUsageIndicator.tsx
function MemoryUsageIndicator (line 5) | function MemoryUsageIndicator(): React.ReactNode {
FILE: restored-src/src/components/Message.tsx
type Props (line 32) | type Props = {
function MessageImpl (line 58) | function MessageImpl(t0) {
function UserMessage (line 356) | function UserMessage(t0) {
function AssistantMessageBlock (line 433) | function AssistantMessageBlock(t0) {
function hasThinkingContent (line 591) | function hasThinkingContent(m: {
function areMessagePropsEqual (line 604) | function areMessagePropsEqual(prev: Props, next: Props): boolean {
FILE: restored-src/src/components/MessageModel.tsx
type Props (line 6) | type Props = {
function MessageModel (line 10) | function MessageModel(t0) {
function _temp (line 40) | function _temp(c) {
FILE: restored-src/src/components/MessageResponse.tsx
type Props (line 6) | type Props = {
function MessageResponse (line 10) | function MessageResponse(t0) {
function MessageResponseProvider (line 63) | function MessageResponseProvider(t0) {
FILE: restored-src/src/components/MessageRow.tsx
type Props (line 15) | type Props = {
function hasContentAfterIndex (line 50) | function hasContentAfterIndex(messages: RenderableMessage[], index: numb...
function MessageRowImpl (line 93) | function MessageRowImpl(t0) {
function _temp (line 293) | function _temp(c) {
function isMessageStreaming (line 296) | function isMessageStreaming(msg: RenderableMessage, streamingToolUseIDs:...
function allToolsResolved (line 315) | function allToolsResolved(msg: RenderableMessage, resolvedToolUseIDs: Se...
function areMessageRowPropsEqual (line 342) | function areMessageRowPropsEqual(prev: Props, next: Props): boolean {
FILE: restored-src/src/components/MessageSelector.tsx
function isTextBlock (line 19) | function isTextBlock(block: ContentBlockParam): block is TextBlockParam {
type RestoreOption (line 31) | type RestoreOption = 'both' | 'conversation' | 'code' | 'summarize' | 's...
function isSummarizeOption (line 32) | function isSummarizeOption(option: RestoreOption | null): option is 'sum...
type Props (line 35) | type Props = {
constant MAX_VISIBLE_MESSAGES (line 45) | const MAX_VISIBLE_MESSAGES = 7;
function MessageSelector (line 46) | function MessageSelector({
function getRestoreOptionConversationText (line 402) | function getRestoreOptionConversationText(option: RestoreOption): string {
function RestoreOptionDescription (line 416) | function RestoreOptionDescription(t0) {
function RestoreCodeConfirmation (line 461) | function RestoreCodeConfirmation(t0) {
function DiffStatsText (line 544) | function DiffStatsText(t0) {
function UserMessageOption (line 579) | function UserMessageOption(t0) {
function computeDiffStatsBetweenMessages (line 722) | function computeDiffStatsBetweenMessages(messages: Message[], fromMessag...
function selectableUserMessagesFilter (line 767) | function selectableUserMessagesFilter(message: Message): message is User...
function messagesAfterAreOnlySynthetic (line 799) | function messagesAfterAreOnlySynthetic(messages: Message[], fromIndex: n...
FILE: restored-src/src/components/MessageTimestamp.tsx
type Props (line 6) | type Props = {
function MessageTimestamp (line 10) | function MessageTimestamp(t0) {
function _temp (line 60) | function _temp(c) {
FILE: restored-src/src/components/Messages.tsx
constant BRIEF_TOOL_NAME (line 81) | const BRIEF_TOOL_NAME: string | null = feature('KAIROS') || feature('KAI...
constant SEND_USER_FILE_TOOL_NAME (line 82) | const SEND_USER_FILE_TOOL_NAME: string | null = feature('KAIROS') ? (req...
function filterForBriefTool (line 93) | function filterForBriefTool<T extends {
function dropTextInBriefTurns (line 169) | function dropTextInBriefTurns<T extends {
type Props (line 207) | type Props = {
constant MAX_MESSAGES_TO_SHOW_IN_TRANSCRIPT_MODE (line 276) | const MAX_MESSAGES_TO_SHOW_IN_TRANSCRIPT_MODE = 30;
constant MAX_MESSAGES_WITHOUT_VIRTUALIZATION (line 307) | const MAX_MESSAGES_WITHOUT_VIRTUALIZATION = 200;
constant MESSAGE_CAP_STEP (line 308) | const MESSAGE_CAP_STEP = 50;
type SliceAnchor (line 309) | type SliceAnchor = {
function computeSliceStart (line 315) | function computeSliceStart(collapsed: ReadonlyArray<{
function expandKey (line 725) | function expandKey(msg: RenderableMessage): string {
function setsEqual (line 734) | function setsEqual<T>(a: Set<T>, b: Set<T>): boolean {
function shouldRenderStatically (line 779) | function shouldRenderStatically(message: RenderableMessage, streamingToo...
FILE: restored-src/src/components/ModelPicker.tsx
type Props (line 21) | type Props = {
constant NO_PREFERENCE (line 38) | const NO_PREFERENCE = '__NO_PREFERENCE__';
function ModelPicker (line 39) | function ModelPicker(t0) {
function _temp4 (line 388) | function _temp4() {}
function _temp3 (line 389) | function _temp3(opt_0) {
function _temp2 (line 395) | function _temp2(s_0) {
function _temp (line 398) | function _temp(s) {
function resolveOptionModel (line 401) | function resolveOptionModel(value?: string): string | undefined {
function EffortLevelIndicator (line 405) | function EffortLevelIndicator(t0) {
function cycleEffortLevel (line 431) | function cycleEffortLevel(current: EffortLevel, direction: 'left' | 'rig...
function getDefaultEffortLevelForOption (line 443) | function getDefaultEffortLevelForOption(value?: string): EffortLevel {
FILE: restored-src/src/components/NativeAutoUpdater.tsx
function getErrorType (line 19) | function getErrorType(errorMessage: string): string {
type Props (line 43) | type Props = {
function NativeAutoUpdater (line 51) | function NativeAutoUpdater({
FILE: restored-src/src/components/NotebookEditToolUseRejectedMessage.tsx
type Props (line 8) | type Props = {
function NotebookEditToolUseRejectedMessage (line 16) | function NotebookEditToolUseRejectedMessage(t0) {
FILE: restored-src/src/components/OffscreenFreeze.tsx
type Props (line 5) | type Props = {
function OffscreenFreeze (line 23) | function OffscreenFreeze({
FILE: restored-src/src/components/Onboarding.tsx
type StepId (line 22) | type StepId = 'preflight' | 'theme' | 'oauth' | 'api-key' | 'security' |...
type OnboardingStep (line 23) | interface OnboardingStep {
type Props (line 27) | type Props = {
function Onboarding (line 30) | function Onboarding({
function SkippableStep (line 214) | function SkippableStep(t0) {
FILE: restored-src/src/components/OutputStylePicker.tsx
constant DEFAULT_OUTPUT_STYLE_LABEL (line 11) | const DEFAULT_OUTPUT_STYLE_LABEL = 'Default';
constant DEFAULT_OUTPUT_STYLE_DESCRIPTION (line 12) | const DEFAULT_OUTPUT_STYLE_DESCRIPTION = 'Claude completes coding tasks ...
function mapConfigsToOptions (line 13) | function mapConfigsToOptions(styles: {
type OutputStylePickerProps (line 22) | type OutputStylePickerProps = {
function OutputStylePicker (line 28) | function OutputStylePicker(t0) {
FILE: restored-src/src/components/PackageManagerAutoUpdater.tsx
type Props (line 12) | type Props = {
function PackageManagerAutoUpdater (line 20) | function PackageManagerAutoUpdater(t0) {
FILE: restored-src/src/components/Passes/Passes.tsx
type PassStatus (line 16) | type PassStatus = {
type Props (line 20) | type Props = {
function Passes (line 25) | function Passes({
FILE: restored-src/src/components/PrBadge.tsx
type Props (line 5) | type Props = {
function PrBadge (line 11) | function PrBadge(t0) {
function getPrStatusColor (line 83) | function getPrStatusColor(state?: PrReviewState): 'success' | 'error' | ...
FILE: restored-src/src/components/PressEnterToContinue.tsx
function PressEnterToContinue (line 4) | function PressEnterToContinue() {
FILE: restored-src/src/components/PromptInput/HistorySearchInput.tsx
type Props (line 6) | type Props = {
function HistorySearchInput (line 11) | function HistorySearchInput(t0) {
function _temp (line 49) | function _temp() {}
FILE: restored-src/src/components/PromptInput/IssueFlagBanner.tsx
function IssueFlagBanner (line 9) | function IssueFlagBanner() {
FILE: restored-src/src/components/PromptInput/Notifications.tsx
constant FOOTER_TEMPORARY_STATUS_TIMEOUT (line 40) | const FOOTER_TEMPORARY_STATUS_TIMEOUT = 5000;
type Props (line 41) | type Props = {
function Notifications (line 55) | function Notifications(t0) {
function _temp2 (line 210) | function _temp2() {
function _temp (line 213) | function _temp(s) {
function NotificationContent (line 216) | function NotificationContent({
FILE: restored-src/src/components/PromptInput/PromptInput.tsx
type Props (line 124) | type Props = {
constant PROMPT_FOOTER_LINES (line 192) | const PROMPT_FOOTER_LINES = 5;
constant MIN_INPUT_VIEWPORT_LINES (line 193) | const MIN_INPUT_VIEWPORT_LINES = 3;
function PromptInput (line 194) | function PromptInput({
function getInitialPasteId (line 2303) | function getInitialPasteId(messages: Message[]): number {
function buildBorderText (line 2328) | function buildBorderText(showFastIcon: boolean, showFastIconHint: boolea...
FILE: restored-src/src/components/PromptInput/PromptInputFooter.tsx
type Props (line 26) | type Props = {
function PromptInputFooter (line 63) | function PromptInputFooter({
type BridgeStatusProps (line 154) | type BridgeStatusProps = {
function BridgeStatusIndicator (line 157) | function BridgeStatusIndicator({
FILE: restored-src/src/components/PromptInput/PromptInputFooterLeftSide.tsx
constant MAX_VOICE_HINT_SHOWS (line 51) | const MAX_VOICE_HINT_SHOWS = 3;
type Props (line 52) | type Props = {
function ProactiveCountdown (line 74) | function ProactiveCountdown() {
function PromptInputFooterLeftSide (line 127) | function PromptInputFooterLeftSide(t0) {
type ModeIndicatorProps (line 226) | type ModeIndicatorProps = {
function ModeIndicator (line 237) | function ModeIndicator({
function getSpinnerHintParts (line 484) | function getSpinnerHintParts(isLoading: boolean, escShortcut: string, to...
function isPrStatusEnabled (line 514) | function isPrStatusEnabled(): boolean {
FILE: restored-src/src/components/PromptInput/PromptInputFooterSuggestions.tsx
type SuggestionItem (line 9) | type SuggestionItem = {
type SuggestionType (line 17) | type SuggestionType = 'command' | 'file' | 'directory' | 'agent' | 'shel...
constant OVERLAY_MAX_ITEMS (line 18) | const OVERLAY_MAX_ITEMS = 5;
function getIcon (line 24) | function getIcon(itemId: string): string {
function isUnifiedSuggestion (line 34) | function isUnifiedSuggestion(itemId: string): boolean {
type Props (line 202) | type Props = {
function PromptInputFooterSuggestions (line 213) | function PromptInputFooterSuggestions(t0) {
function _temp (line 289) | function _temp(item) {
FILE: restored-src/src/components/PromptInput/PromptInputHelpMenu.tsx
function formatShortcut (line 13) | function formatShortcut(shortcut: string): string {
type Props (line 16) | type Props = {
function PromptInputHelpMenu (line 22) | function PromptInputHelpMenu(props) {
FILE: restored-src/src/components/PromptInput/PromptInputModeIndicator.tsx
type Props (line 10) | type Props = {
function getTeammateThemeColor (line 21) | function getTeammateThemeColor(): keyof Theme | undefined {
type PromptCharProps (line 34) | type PromptCharProps = {
function PromptChar (line 44) | function PromptChar(t0) {
function PromptInputModeIndicator (line 63) | function PromptInputModeIndicator(t0) {
FILE: restored-src/src/components/PromptInput/PromptInputQueuedCommands.tsx
constant EMPTY_SET (line 14) | const EMPTY_SET = new Set<string>();
function isIdleNotification (line 20) | function isIdleNotification(value: string): boolean {
constant MAX_VISIBLE_NOTIFICATIONS (line 30) | const MAX_VISIBLE_NOTIFICATIONS = 3;
function createOverflowNotificationMessage (line 35) | function createOverflowNotificationMessage(count: number): string {
function processQueuedCommands (line 47) | function processQueuedCommands(queuedCommands: QueuedCommand[]): QueuedC...
function PromptInputQueuedCommandsImpl (line 71) | function PromptInputQueuedCommandsImpl(): React.ReactNode {
FILE: restored-src/src/components/PromptInput/PromptInputStashNotice.tsx
type Props (line 5) | type Props = {
function PromptInputStashNotice (line 8) | function PromptInputStashNotice(t0) {
FILE: restored-src/src/components/PromptInput/SandboxPromptFooterHint.tsx
function SandboxPromptFooterHint (line 7) | function SandboxPromptFooterHint() {
FILE: restored-src/src/components/PromptInput/ShimmeredInput.tsx
type Props (line 6) | type Props = {
type LinePart (line 10) | type LinePart = {
function HighlightedInput (line 15) | function HighlightedInput(t0) {
function _temp (line 140) | function _temp(h) {
FILE: restored-src/src/components/PromptInput/VoiceIndicator.tsx
type Props (line 7) | type Props = {
constant PROCESSING_DIM (line 12) | const PROCESSING_DIM = {
constant PROCESSING_BRIGHT (line 17) | const PROCESSING_BRIGHT = {
constant PULSE_PERIOD_S (line 22) | const PULSE_PERIOD_S = 2;
function VoiceIndicator (line 24) | function VoiceIndicator(props) {
function VoiceIndicatorImpl (line 39) | function VoiceIndicatorImpl(t0) {
function VoiceWarmupHint (line 78) | function VoiceWarmupHint() {
function ProcessingShimmer (line 92) | function ProcessingShimmer() {
FILE: restored-src/src/components/PromptInput/inputModes.ts
function prependModeCharacterToInput (line 4) | function prependModeCharacterToInput(
function getModeFromInput (line 16) | function getModeFromInput(input: string): HistoryMode {
function getValueFromInput (line 23) | function getValueFromInput(input: string): string {
function isInputModeCharacter (line 31) | function isInputModeCharacter(input: string): boolean {
FILE: restored-src/src/components/PromptInput/inputPaste.ts
constant TRUNCATION_THRESHOLD (line 4) | const TRUNCATION_THRESHOLD = 10000 // Characters before we truncate
constant PREVIEW_LENGTH (line 5) | const PREVIEW_LENGTH = 1000 // Characters to show at start and end
type TruncatedMessage (line 7) | type TruncatedMessage = {
function maybeTruncateMessageForInput (line 20) | function maybeTruncateMessageForInput(
function formatTruncatedTextRef (line 57) | function formatTruncatedTextRef(id: number, numLines: number): string {
function maybeTruncateInput (line 61) | function maybeTruncateInput(
FILE: restored-src/src/components/PromptInput/useMaybeTruncateInput.ts
type Props (line 5) | type Props = {
function useMaybeTruncateInput (line 13) | function useMaybeTruncateInput({
FILE: restored-src/src/components/PromptInput/usePromptInputPlaceholder.ts
type Props (line 16) | type Props = {
constant NUM_TIMES_QUEUE_HINT_SHOWN (line 22) | const NUM_TIMES_QUEUE_HINT_SHOWN = 3
constant MAX_TEAMMATE_NAME_LENGTH (line 23) | const MAX_TEAMMATE_NAME_LENGTH = 20
function usePromptInputPlaceholder (line 25) | function usePromptInputPlaceholder({
FILE: restored-src/src/components/PromptInput/useShowFastIconHint.ts
constant HINT_DISPLAY_DURATION_MS (line 3) | const HINT_DISPLAY_DURATION_MS = 5000
function useShowFastIconHint (line 11) | function useShowFastIconHint(showFastIcon: boolean): boolean {
FILE: restored-src/src/components/PromptInput/useSwarmBanner.ts
type SwarmBannerInfo (line 29) | type SwarmBannerInfo = {
function useSwarmBanner (line 44) | function useSwarmBanner(): SwarmBannerInfo {
function toThemeColor (line 148) | function toThemeColor(
FILE: restored-src/src/components/PromptInput/utils.ts
function isVimModeEnabled (line 12) | function isVimModeEnabled(): boolean {
function getNewlineInstructions (line 17) | function getNewlineInstructions(): string {
function isNonSpacePrintable (line 39) | function isNonSpacePrintable(input: string, key: Key): boolean {
FILE: restored-src/src/components/QuickOpenDialog.tsx
type Props (line 17) | type Props = {
constant VISIBLE_RESULTS (line 21) | const VISIBLE_RESULTS = 8;
constant PREVIEW_LINES (line 22) | const PREVIEW_LINES = 20;
function QuickOpenDialog (line 28) | function QuickOpenDialog(t0) {
function _temp6 (line 226) | function _temp6(q_0) {
function _temp5 (line 229) | function _temp5(p_3) {
function _temp4 (line 232) | function _temp4(p_0) {
function _temp3 (line 235) | function _temp3(p) {
function _temp2 (line 238) | function _temp2(i_0) {
function _temp (line 241) | function _temp(i) {
FILE: restored-src/src/components/RemoteCallout.tsx
type RemoteCalloutSelection (line 9) | type RemoteCalloutSelection = 'enable' | 'dismiss';
type Props (line 10) | type Props = {
function RemoteCallout (line 13) | function RemoteCallout({
function shouldShowRemoteCallout (line 68) | function shouldShowRemoteCallout(): boolean {
FILE: restored-src/src/components/RemoteEnvironmentDialog.tsx
constant DIALOG_TITLE (line 20) | const DIALOG_TITLE = 'Select Remote Environment';
constant SETUP_HINT (line 21) | const SETUP_HINT = `Configure environments at: https://claude.ai/code`;
type Props (line 22) | type Props = {
type LoadingState (line 25) | type LoadingState = 'loading' | 'updating' | null;
function RemoteEnvironmentDialog (line 26) | function RemoteEnvironmentDialog(t0) {
function EnvironmentLabel (line 193) | function EnvironmentLabel(t0) {
function SingleEnvironmentContent (line 225) | function SingleEnvironmentContent(t0) {
function MultipleEnvironmentsContent (line 260) | function MultipleEnvironmentsContent(t0) {
function _temp (line 334) | function _temp(env) {
FILE: restored-src/src/components/ResumeTask.tsx
type Props (line 17) | type Props = {
type LoadErrorType (line 22) | type LoadErrorType = 'network' | 'auth' | 'api' | 'other';
constant UPDATED_STRING (line 23) | const UPDATED_STRING = 'Updated';
constant SPACE_BETWEEN_TABLE_COLUMNS (line 24) | const SPACE_BETWEEN_TABLE_COLUMNS = ' ';
function ResumeTask (line 25) | function ResumeTask({
function determineErrorType (line 227) | function determineErrorType(errorMessage: string): LoadErrorType {
function renderErrorSpecificGuidance (line 244) | function renderErrorSpecificGuidance(errorType: LoadErrorType): React.Re...
FILE: restored-src/src/components/SandboxViolationExpandedView.tsx
function formatTime (line 12) | function formatTime(date: Date): string {
function SandboxViolationExpandedView (line 20) | function SandboxViolationExpandedView() {
function _temp (line 96) | function _temp(v, i) {
FILE: restored-src/src/components/ScrollKeybindingHandler.tsx
type Props (line 13) | type Props = {
constant WHEEL_ACCEL_WINDOW_MS (line 47) | const WHEEL_ACCEL_WINDOW_MS = 40;
constant WHEEL_ACCEL_STEP (line 48) | const WHEEL_ACCEL_STEP = 0.3;
constant WHEEL_ACCEL_MAX (line 49) | const WHEEL_ACCEL_MAX = 6;
constant WHEEL_BOUNCE_GAP_MAX_MS (line 65) | const WHEEL_BOUNCE_GAP_MAX_MS = 200;
constant WHEEL_MODE_STEP (line 68) | const WHEEL_MODE_STEP = 15;
constant WHEEL_MODE_CAP (line 69) | const WHEEL_MODE_CAP = 15;
constant WHEEL_MODE_RAMP (line 76) | const WHEEL_MODE_RAMP = 3;
constant WHEEL_MODE_IDLE_DISENGAGE_MS (line 82) | const WHEEL_MODE_IDLE_DISENGAGE_MS = 1500;
constant WHEEL_DECAY_HALFLIFE_MS (line 92) | const WHEEL_DECAY_HALFLIFE_MS = 150;
constant WHEEL_DECAY_STEP (line 93) | const WHEEL_DECAY_STEP = 5;
constant WHEEL_BURST_MS (line 96) | const WHEEL_BURST_MS = 5;
constant WHEEL_DECAY_GAP_MS (line 99) | const WHEEL_DECAY_GAP_MS = 80;
constant WHEEL_DECAY_CAP_SLOW (line 100) | const WHEEL_DECAY_CAP_SLOW = 3;
constant WHEEL_DECAY_CAP_FAST (line 101) | const WHEEL_DECAY_CAP_FAST = 6;
constant WHEEL_DECAY_IDLE_MS (line 104) | const WHEEL_DECAY_IDLE_MS = 500;
function shouldClearSelectionOnKey (line 115) | function shouldClearSelectionOnKey(key: Key): boolean {
function selectionFocusMoveForKey (line 132) | function selectionFocusMoveForKey(key: Key): FocusMove | null {
type WheelAccelState (line 142) | type WheelAccelState = {
function computeWheelStep (line 176) | function computeWheelStep(state: WheelAccelState, dir: 1 | -1, now: numb...
function readScrollSpeedBase (line 305) | function readScrollSpeedBase(): number {
function initWheelAccel (line 314) | function initWheelAccel(xtermJs = false, base = 1): WheelAccelState {
function initAndLogWheelAccel (line 334) | function initAndLogWheelAccel(): WheelAccelState {
constant AUTOSCROLL_LINES (line 344) | const AUTOSCROLL_LINES = 2;
constant AUTOSCROLL_INTERVAL_MS (line 345) | const AUTOSCROLL_INTERVAL_MS = 50;
constant AUTOSCROLL_MAX_TICKS (line 351) | const AUTOSCROLL_MAX_TICKS = 200;
function ScrollKeybindingHandler (line 359) | function ScrollKeybindingHandler({
function useDragToScroll (line 637) | function useDragToScroll(scrollRef: RefObject<ScrollBoxHandle | null>, s...
function dragScrollDirection (line 810) | function dragScrollDirection(sel: SelectionState | null, top: number, bo...
function jumpBy (line 834) | function jumpBy(s: ScrollBoxHandle, delta: number): boolean {
function scrollDown (line 852) | function scrollDown(s: ScrollBoxHandle, amount: number): boolean {
function scrollUp (line 873) | function scrollUp(s: ScrollBoxHandle, amount: number): void {
type ModalPagerAction (line 883) | type ModalPagerAction = 'lineUp' | 'lineDown' | 'halfPageUp' | 'halfPage...
function modalPagerAction (line 900) | function modalPagerAction(input: string, key: Pick<Key, 'ctrl' | 'meta' ...
function applyModalPagerAction (line 969) | function applyModalPagerAction(s: ScrollBoxHandle, act: ModalPagerAction...
FILE: restored-src/src/components/SearchBox.tsx
type Props (line 4) | type Props = {
function SearchBox (line 14) | function SearchBox(t0) {
FILE: restored-src/src/components/SentryErrorBoundary.ts
type Props (line 3) | interface Props {
type State (line 7) | interface State {
class SentryErrorBoundary (line 11) | class SentryErrorBoundary extends React.Component<Props, State> {
method constructor (line 12) | constructor(props: Props) {
method getDerivedStateFromError (line 17) | static getDerivedStateFromError(): State {
method render (line 21) | render(): React.ReactNode {
FILE: restored-src/src/components/SessionBackgroundHint.tsx
type Props (line 14) | type Props = {
function SessionBackgroundHint (line 27) | function SessionBackgroundHint(t0) {
function _temp2 (line 101) | function _temp2(c) {
function _temp (line 107) | function _temp() {}
FILE: restored-src/src/components/SessionPreview.tsx
type Props (line 15) | type Props = {
function SessionPreview (line 20) | function SessionPreview(t0) {
FILE: restored-src/src/components/Settings/Config.tsx
type Props (line 51) | type Props = {
type SettingBase (line 60) | type SettingBase = {
type Setting (line 68) | type Setting = (SettingBase & {
type SubMenu (line 84) | type SubMenu = 'Theme' | 'Model' | 'TeammateModel' | 'ExternalIncludes' ...
function Config (line 85) | function Config({
function teammateModelDisplayString (line 1738) | function teammateModelDisplayString(value: string | null | undefined): s...
constant THEME_LABELS (line 1745) | const THEME_LABELS: Record<string, string> = {
function NotifChannelLabel (line 1754) | function NotifChannelLabel(t0) {
FILE: restored-src/src/components/Settings/Settings.tsx
type Props (line 15) | type Props = {
function Settings (line 22) | function Settings(t0) {
function _temp2 (line 131) | function _temp2() {
function _temp (line 134) | function _temp() {
FILE: restored-src/src/components/Settings/Status.tsx
type Props (line 15) | type Props = {
function buildPrimarySection (line 19) | function buildPrimarySection(): Property[] {
function buildSecondarySection (line 37) | function buildSecondarySection({
function buildDiagnostics (line 54) | async function buildDiagnostics(): Promise<Diagnostic[]> {
function PropertyValue (line 57) | function PropertyValue(t0) {
function Status (line 102) | function Status(t0) {
function _temp4 (line 188) | function _temp4(properties, i) {
function _temp3 (line 191) | function _temp3(t0, j) {
function _temp2 (line 198) | function _temp2(s_0) {
function _temp (line 201) | function _temp(s) {
function Diagnostics (line 204) | function Diagnostics(t0) {
function _temp5 (line 238) | function _temp5(diagnostic, i) {
FILE: restored-src/src/components/Settings/Usage.tsx
type LimitBarProps (line 18) | type LimitBarProps = {
function LimitBar (line 25) | function LimitBar(t0) {
function Usage (line 174) | function Usage(): React.ReactNode {
type ExtraUsageSectionProps (line 266) | type ExtraUsageSectionProps = {
constant EXTRA_USAGE_SECTION_TITLE (line 270) | const EXTRA_USAGE_SECTION_TITLE = 'Extra usage';
function ExtraUsageSection (line 271) | function ExtraUsageSection(t0) {
FILE: restored-src/src/components/ShowInIDEPrompt.tsx
type Props (line 10) | type Props<A> = {
function ShowInIDEPrompt (line 25) | function ShowInIDEPrompt(t0) {
FILE: restored-src/src/components/SkillImprovementSurvey.tsx
type Props (line 9) | type Props = {
function SkillImprovementSurvey (line 17) | function SkillImprovementSurvey(t0) {
type ViewProps (line 47) | type ViewProps = {
constant VALID_INPUTS (line 56) | const VALID_INPUTS = ['0', '1'] as const;
function isValidInput (line 57) | function isValidInput(input: string): boolean {
function SkillImprovementSurveyView (line 60) | function SkillImprovementSurveyView(t0) {
function _temp (line 149) | function _temp(u, i) {
FILE: restored-src/src/components/Spinner.tsx
constant DEFAULT_CHARACTERS (line 40) | const DEFAULT_CHARACTERS = getDefaultCharacters();
constant SPINNER_FRAMES (line 41) | const SPINNER_FRAMES = [...DEFAULT_CHARACTERS, ...[...DEFAULT_CHARACTERS...
type Props (line 42) | type Props = {
function SpinnerWithVerb (line 62) | function SpinnerWithVerb(props: Props): React.ReactNode {
function SpinnerWithVerbInner (line 82) | function SpinnerWithVerbInner({
type BriefSpinnerProps (line 312) | type BriefSpinnerProps = {
function BriefSpinner (line 316) | function BriefSpinner(t0) {
function _temp6 (line 442) | function _temp6(s_0) {
function _temp5 (line 445) | function _temp5(s) {
function _temp4 (line 448) | function _temp4() {
function BriefIdleStatus (line 451) | function BriefIdleStatus() {
function _temp8 (line 501) | function _temp8(s_0) {
function _temp7 (line 504) | function _temp7(s) {
function Spinner (line 507) | function Spinner() {
function findNextPendingTask (line 551) | function findNextPendingTask(tasks: Task[] | undefined): Task | undefined {
FILE: restored-src/src/components/Spinner/FlashingChar.tsx
type Props (line 6) | type Props = {
function FlashingChar (line 12) | function FlashingChar(t0) {
FILE: restored-src/src/components/Spinner/GlimmerMessage.tsx
type Props (line 9) | type Props = {
constant ERROR_RED (line 18) | const ERROR_RED = {
function GlimmerMessage (line 23) | function GlimmerMessage(t0) {
FILE: restored-src/src/components/Spinner/ShimmerChar.tsx
type Props (line 5) | type Props = {
function ShimmerChar (line 12) | function ShimmerChar(t0) {
FILE: restored-src/src/components/Spinner/SpinnerAnimationRow.tsx
constant SEP_WIDTH (line 17) | const SEP_WIDTH = stringWidth(' · ');
constant THINKING_BARE_WIDTH (line 18) | const THINKING_BARE_WIDTH = stringWidth('thinking');
constant SHOW_TOKENS_AFTER_MS (line 19) | const SHOW_TOKENS_AFTER_MS = 30_000;
constant THINKING_INACTIVE (line 24) | const THINKING_INACTIVE = {
constant THINKING_INACTIVE_SHIMMER (line 29) | const THINKING_INACTIVE_SHIMMER = {
constant THINKING_DELAY_MS (line 34) | const THINKING_DELAY_MS = 3000;
constant THINKING_GLOW_PERIOD_S (line 35) | const THINKING_GLOW_PERIOD_S = 2;
type SpinnerAnimationRowProps (line 36) | type SpinnerAnimationRowProps = {
function SpinnerAnimationRow (line 81) | function SpinnerAnimationRow({
function SpinnerModeGlyph (line 232) | function SpinnerModeGlyph(t0) {
FILE: restored-src/src/components/Spinner/SpinnerGlyph.tsx
constant DEFAULT_CHARACTERS (line 6) | const DEFAULT_CHARACTERS = getDefaultCharacters();
constant SPINNER_FRAMES (line 7) | const SPINNER_FRAMES = [...DEFAULT_CHARACTERS, ...[...DEFAULT_CHARACTERS...
constant REDUCED_MOTION_DOT (line 8) | const REDUCED_MOTION_DOT = '●';
constant REDUCED_MOTION_CYCLE_MS (line 9) | const REDUCED_MOTION_CYCLE_MS = 2000;
constant ERROR_RED (line 10) | const ERROR_RED = {
type Props (line 15) | type Props = {
function SpinnerGlyph (line 22) | function SpinnerGlyph(t0) {
FILE: restored-src/src/components/Spinner/TeammateSpinnerLine.tsx
type Props (line 16) | type Props = {
function getMessagePreview (line 29) | function getMessagePreview(messages: InProcessTeammateTaskState['message...
function TeammateSpinnerLine (line 72) | function TeammateSpinnerLine({
FILE: restored-src/src/components/Spinner/TeammateSpinnerTree.tsx
type Props (line 10) | type Props = {
function TeammateSpinnerTree (line 21) | function TeammateSpinnerTree(t0) {
function _temp3 (line 203) | function _temp3(s_1) {
function _temp2 (line 206) | function _temp2(s_0) {
function _temp (line 209) | function _temp(s) {
function HideRow (line 212) | function HideRow(t0) {
FILE: restored-src/src/components/Spinner/teammateSelectHint.ts
constant TEAMMATE_SELECT_HINT (line 1) | const TEAMMATE_SELECT_HINT = 'shift + ↑/↓ to select'
FILE: restored-src/src/components/Sp
Copy disabled (too large)
Download .json
Condensed preview — 1925 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (31,221K chars).
[
{
"path": "README.md",
"chars": 1518,
"preview": "# claude-code-sourcemap\n\n[](https"
},
{
"path": "extract-sources.js",
"chars": 1612,
"preview": "const { SourceMapConsumer } = require('source-map');\nconst fs = require('fs');\nconst path = require('path');\n\nasync func"
},
{
"path": "package/LICENSE.md",
"chars": 146,
"preview": "© Anthropic PBC. All rights reserved. Use is subject to the Legal Agreements outlined here: https://code.claude.com/docs"
},
{
"path": "package/README.md",
"chars": 2037,
"preview": "# Claude Code\n\n [![npm]](https://www.npmjs."
},
{
"path": "package/package.json",
"chars": 1242,
"preview": "{\n \"name\": \"@anthropic-ai/claude-code\",\n \"version\": \"2.1.88\",\n \"bin\": {\n \"claude\": \"cli.js\"\n },\n \"engines\": {\n "
},
{
"path": "package/sdk-tools.d.ts",
"chars": 116935,
"preview": "/* eslint-disable */\n/**\n * This file was automatically generated by json-schema-to-typescript.\n * DO NOT MODIFY IT BY H"
},
{
"path": "package/vendor/ripgrep/COPYING",
"chars": 126,
"preview": "This project is dual-licensed under the Unlicense and MIT licenses.\n\nYou may use this code under the terms of either lic"
},
{
"path": "restored-src/src/QueryEngine.ts",
"chars": 46598,
"preview": "import { feature } from 'bun:bundle'\nimport type { ContentBlockParam } from '@anthropic-ai/sdk/resources/messages.mjs'\ni"
},
{
"path": "restored-src/src/Task.ts",
"chars": 3148,
"preview": "import { randomBytes } from 'crypto'\nimport type { AppState } from './state/AppState.js'\nimport type { AgentId } from '."
},
{
"path": "restored-src/src/Tool.ts",
"chars": 29456,
"preview": "import type {\n ToolResultBlockParam,\n ToolUseBlockParam,\n} from '@anthropic-ai/sdk/resources/index.mjs'\nimport type {\n"
},
{
"path": "restored-src/src/assistant/sessionHistory.ts",
"chars": 2501,
"preview": "import axios from 'axios'\nimport { getOauthConfig } from '../constants/oauth.js'\nimport type { SDKMessage } from '../ent"
},
{
"path": "restored-src/src/bootstrap/state.ts",
"chars": 56069,
"preview": "import type { BetaMessageStreamParams } from '@anthropic-ai/sdk/resources/beta/messages/messages.mjs'\nimport type { Attr"
},
{
"path": "restored-src/src/bridge/bridgeApi.ts",
"chars": 18048,
"preview": "import axios from 'axios'\n\nimport { debugBody, extractErrorDetail } from './debugUtils.js'\nimport {\n BRIDGE_LOGIN_INSTR"
},
{
"path": "restored-src/src/bridge/bridgeConfig.ts",
"chars": 1693,
"preview": "/**\n * Shared bridge auth/URL resolution. Consolidates the ant-only\n * CLAUDE_BRIDGE_* dev overrides that were previousl"
},
{
"path": "restored-src/src/bridge/bridgeDebug.ts",
"chars": 4905,
"preview": "import { logForDebugging } from '../utils/debug.js'\nimport { BridgeFatalError } from './bridgeApi.js'\nimport type { Brid"
},
{
"path": "restored-src/src/bridge/bridgeEnabled.ts",
"chars": 8402,
"preview": "import { feature } from 'bun:bundle'\nimport {\n checkGate_CACHED_OR_BLOCKING,\n getDynamicConfig_CACHED_MAY_BE_STALE,\n "
},
{
"path": "restored-src/src/bridge/bridgeMain.ts",
"chars": 115331,
"preview": "import { feature } from 'bun:bundle'\nimport { randomUUID } from 'crypto'\nimport { hostname, tmpdir } from 'os'\nimport { "
},
{
"path": "restored-src/src/bridge/bridgeMessaging.ts",
"chars": 15221,
"preview": "/**\n * Shared transport-layer helpers for bridge message handling.\n *\n * Extracted from replBridge.ts so both the env-ba"
},
{
"path": "restored-src/src/bridge/bridgePermissionCallbacks.ts",
"chars": 1411,
"preview": "import type { PermissionUpdate } from '../utils/permissions/PermissionUpdateSchema.js'\n\ntype BridgePermissionResponse = "
},
{
"path": "restored-src/src/bridge/bridgePointer.ts",
"chars": 7591,
"preview": "import { mkdir, readFile, stat, unlink, writeFile } from 'fs/promises'\nimport { dirname, join } from 'path'\nimport { z }"
},
{
"path": "restored-src/src/bridge/bridgeStatusUtil.ts",
"chars": 5141,
"preview": "import {\n getClaudeAiBaseUrl,\n getRemoteSessionUrl,\n} from '../constants/product.js'\nimport { stringWidth } from '../i"
},
{
"path": "restored-src/src/bridge/bridgeUI.ts",
"chars": 16766,
"preview": "import chalk from 'chalk'\nimport { toString as qrToString } from 'qrcode'\nimport {\n BRIDGE_FAILED_INDICATOR,\n BRIDGE_R"
},
{
"path": "restored-src/src/bridge/capacityWake.ts",
"chars": 1841,
"preview": "/**\n * Shared capacity-wake primitive for bridge poll loops.\n *\n * Both replBridge.ts and bridgeMain.ts need to sleep wh"
},
{
"path": "restored-src/src/bridge/codeSessionApi.ts",
"chars": 4834,
"preview": "/**\n * Thin HTTP wrappers for the CCR v2 code-session API.\n *\n * Separate file from remoteBridgeCore.ts so the SDK /brid"
},
{
"path": "restored-src/src/bridge/createSession.ts",
"chars": 12147,
"preview": "import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'\nimport { logForDebugging } from '../utils/debug.js'\nim"
},
{
"path": "restored-src/src/bridge/debugUtils.ts",
"chars": 4238,
"preview": "import {\n type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,\n logEvent,\n} from '../services/analytics/in"
},
{
"path": "restored-src/src/bridge/envLessBridgeConfig.ts",
"chars": 7210,
"preview": "import { z } from 'zod/v4'\nimport { getFeatureValue_DEPRECATED } from '../services/analytics/growthbook.js'\nimport { laz"
},
{
"path": "restored-src/src/bridge/flushGate.ts",
"chars": 1969,
"preview": "/**\n * State machine for gating message writes during an initial flush.\n *\n * When a bridge session starts, historical m"
},
{
"path": "restored-src/src/bridge/inboundAttachments.ts",
"chars": 6253,
"preview": "/**\n * Resolve file_uuid attachments on inbound bridge user messages.\n *\n * Web composer uploads via cookie-authed /api/"
},
{
"path": "restored-src/src/bridge/inboundMessages.ts",
"chars": 2725,
"preview": "import type {\n Base64ImageSource,\n ContentBlockParam,\n ImageBlockParam,\n} from '@anthropic-ai/sdk/resources/messages."
},
{
"path": "restored-src/src/bridge/initReplBridge.ts",
"chars": 23630,
"preview": "/**\n * REPL-specific wrapper around initBridgeCore. Owns the parts that read\n * bootstrap state — gates, cwd, session ID"
},
{
"path": "restored-src/src/bridge/jwtUtils.ts",
"chars": 9430,
"preview": "import { logEvent } from '../services/analytics/index.js'\nimport { logForDebugging } from '../utils/debug.js'\nimport { l"
},
{
"path": "restored-src/src/bridge/pollConfig.ts",
"chars": 4548,
"preview": "import { z } from 'zod/v4'\nimport { getFeatureValue_CACHED_WITH_REFRESH } from '../services/analytics/growthbook.js'\nimp"
},
{
"path": "restored-src/src/bridge/pollConfigDefaults.ts",
"chars": 3996,
"preview": "/**\n * Bridge poll interval defaults. Extracted from pollConfig.ts so callers\n * that don't need live GrowthBook tuning "
},
{
"path": "restored-src/src/bridge/remoteBridgeCore.ts",
"chars": 38550,
"preview": "// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered\n/**\n * Env-less Remote "
},
{
"path": "restored-src/src/bridge/replBridge.ts",
"chars": 100219,
"preview": "// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered\nimport { randomUUID } f"
},
{
"path": "restored-src/src/bridge/replBridgeHandle.ts",
"chars": 1467,
"preview": "import { updateSessionBridgeId } from '../utils/concurrentSessions.js'\nimport type { ReplBridgeHandle } from './replBrid"
},
{
"path": "restored-src/src/bridge/replBridgeTransport.ts",
"chars": 15452,
"preview": "import type { StdoutMessage } from 'src/entrypoints/sdk/controlTypes.js'\nimport { CCRClient } from '../cli/transports/cc"
},
{
"path": "restored-src/src/bridge/sessionIdCompat.ts",
"chars": 2526,
"preview": "/**\n * Session ID tag translation helpers for the CCR v2 compat layer.\n *\n * Lives in its own file (rather than workSecr"
},
{
"path": "restored-src/src/bridge/sessionRunner.ts",
"chars": 18012,
"preview": "import { type ChildProcess, spawn } from 'child_process'\nimport { createWriteStream, type WriteStream } from 'fs'\nimport"
},
{
"path": "restored-src/src/bridge/trustedDevice.ts",
"chars": 7739,
"preview": "import axios from 'axios'\nimport memoize from 'lodash-es/memoize.js'\nimport { hostname } from 'os'\nimport { getOauthConf"
},
{
"path": "restored-src/src/bridge/types.ts",
"chars": 10155,
"preview": "/** Default per-session timeout (24 hours). */\nexport const DEFAULT_SESSION_TIMEOUT_MS = 24 * 60 * 60 * 1000\n\n/** Reusab"
},
{
"path": "restored-src/src/bridge/workSecret.ts",
"chars": 4666,
"preview": "import axios from 'axios'\nimport { jsonParse, jsonStringify } from '../utils/slowOperations.js'\nimport type { WorkSecret"
},
{
"path": "restored-src/src/buddy/CompanionSprite.tsx",
"chars": 45901,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport { feature } from 'bun:bundle';\nimport figures from 'figures';\ni"
},
{
"path": "restored-src/src/buddy/companion.ts",
"chars": 3711,
"preview": "import { getGlobalConfig } from '../utils/config.js'\nimport {\n type Companion,\n type CompanionBones,\n EYES,\n HATS,\n "
},
{
"path": "restored-src/src/buddy/prompt.ts",
"chars": 1445,
"preview": "import { feature } from 'bun:bundle'\nimport type { Message } from '../types/message.js'\nimport type { Attachment } from "
},
{
"path": "restored-src/src/buddy/sprites.ts",
"chars": 9761,
"preview": "import type { CompanionBones, Eye, Hat, Species } from './types.js'\nimport {\n axolotl,\n blob,\n cactus,\n capybara,\n "
},
{
"path": "restored-src/src/buddy/types.ts",
"chars": 3764,
"preview": "export const RARITIES = [\n 'common',\n 'uncommon',\n 'rare',\n 'epic',\n 'legendary',\n] as const\nexport type Rarity = ("
},
{
"path": "restored-src/src/buddy/useBuddyNotification.tsx",
"chars": 9957,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport { feature } from 'bun:bundle';\nimport React, { useEffect } from"
},
{
"path": "restored-src/src/cli/exit.ts",
"chars": 1306,
"preview": "/**\n * CLI exit helpers for subcommand handlers.\n *\n * Consolidates the 4-5 line \"print + lint-suppress + exit\" block th"
},
{
"path": "restored-src/src/cli/handlers/agents.ts",
"chars": 2086,
"preview": "/**\n * Agents subcommand handler — prints the list of configured agents.\n * Dynamically imported only when `claude agent"
},
{
"path": "restored-src/src/cli/handlers/auth.ts",
"chars": 10748,
"preview": "/* eslint-disable custom-rules/no-process-exit -- CLI subcommand handler intentionally exits */\n\nimport {\n clearAuthRel"
},
{
"path": "restored-src/src/cli/handlers/autoMode.ts",
"chars": 5736,
"preview": "/**\n * Auto mode subcommand handlers — dump default/merged classifier rules and\n * critique user-written rules. Dynamica"
},
{
"path": "restored-src/src/cli/handlers/mcp.tsx",
"chars": 56145,
"preview": "/**\n * MCP subcommand handlers — extracted from main.tsx for lazy loading.\n * These are dynamically imported only when t"
},
{
"path": "restored-src/src/cli/handlers/plugins.ts",
"chars": 31033,
"preview": "/**\n * Plugin and marketplace subcommand handlers — extracted from main.tsx for lazy loading.\n * These are dynamically i"
},
{
"path": "restored-src/src/cli/handlers/util.tsx",
"chars": 14499,
"preview": "import { c as _c } from \"react/compiler-runtime\";\n/**\n * Miscellaneous subcommand handlers — extracted from main.tsx for"
},
{
"path": "restored-src/src/cli/ndjsonSafeStringify.ts",
"chars": 1403,
"preview": "import { jsonStringify } from '../utils/slowOperations.js'\n\n// JSON.stringify emits U+2028/U+2029 raw (valid per ECMA-40"
},
{
"path": "restored-src/src/cli/print.ts",
"chars": 212575,
"preview": "// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered\nimport { feature } from"
},
{
"path": "restored-src/src/cli/remoteIO.ts",
"chars": 9940,
"preview": "import type { StdoutMessage } from 'src/entrypoints/sdk/controlTypes.js'\nimport { PassThrough } from 'stream'\nimport { U"
},
{
"path": "restored-src/src/cli/structuredIO.ts",
"chars": 28704,
"preview": "import { feature } from 'bun:bundle'\nimport type {\n ElicitResult,\n JSONRPCMessage,\n} from '@modelcontextprotocol/sdk/t"
},
{
"path": "restored-src/src/cli/transports/HybridTransport.ts",
"chars": 10805,
"preview": "import axios, { type AxiosError } from 'axios'\nimport type { StdoutMessage } from 'src/entrypoints/sdk/controlTypes.js'\n"
},
{
"path": "restored-src/src/cli/transports/SSETransport.ts",
"chars": 23741,
"preview": "import axios, { type AxiosError } from 'axios'\nimport type { StdoutMessage } from 'src/entrypoints/sdk/controlTypes.js'\n"
},
{
"path": "restored-src/src/cli/transports/SerialBatchEventUploader.ts",
"chars": 9075,
"preview": "import { jsonStringify } from '../../utils/slowOperations.js'\n\n/**\n * Serial ordered event uploader with batching, retry"
},
{
"path": "restored-src/src/cli/transports/WebSocketTransport.ts",
"chars": 28150,
"preview": "import type { StdoutMessage } from 'src/entrypoints/sdk/controlTypes.js'\nimport type WsWebSocket from 'ws'\nimport { logE"
},
{
"path": "restored-src/src/cli/transports/WorkerStateUploader.ts",
"chars": 3867,
"preview": "import { sleep } from '../../utils/sleep.js'\n\n/**\n * Coalescing uploader for PUT /worker (session state + metadata).\n *\n"
},
{
"path": "restored-src/src/cli/transports/ccrClient.ts",
"chars": 33708,
"preview": "import { randomUUID } from 'crypto'\nimport type {\n SDKPartialAssistantMessage,\n StdoutMessage,\n} from 'src/entrypoints"
},
{
"path": "restored-src/src/cli/transports/transportUtils.ts",
"chars": 1765,
"preview": "import { URL } from 'url'\nimport { isEnvTruthy } from '../../utils/envUtils.js'\nimport { HybridTransport } from './Hybri"
},
{
"path": "restored-src/src/cli/update.ts",
"chars": 14465,
"preview": "import chalk from 'chalk'\nimport { logEvent } from 'src/services/analytics/index.js'\nimport {\n getLatestVersion,\n type"
},
{
"path": "restored-src/src/commands/add-dir/add-dir.tsx",
"chars": 18016,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport chalk from 'chalk';\nimport figures from 'figures';\nimport React"
},
{
"path": "restored-src/src/commands/add-dir/index.ts",
"chars": 260,
"preview": "import type { Command } from '../../commands.js'\n\nconst addDir = {\n type: 'local-jsx',\n name: 'add-dir',\n description"
},
{
"path": "restored-src/src/commands/add-dir/validation.ts",
"chars": 3207,
"preview": "import chalk from 'chalk'\nimport { stat } from 'fs/promises'\nimport { dirname, resolve } from 'path'\nimport type { ToolP"
},
{
"path": "restored-src/src/commands/advisor.ts",
"chars": 3182,
"preview": "import type { Command } from '../commands.js'\nimport type { LocalCommandCall } from '../types/command.js'\nimport {\n can"
},
{
"path": "restored-src/src/commands/agents/agents.tsx",
"chars": 2500,
"preview": "import * as React from 'react';\nimport { AgentsMenu } from '../../components/agents/AgentsMenu.js';\nimport type { ToolUs"
},
{
"path": "restored-src/src/commands/agents/index.ts",
"chars": 232,
"preview": "import type { Command } from '../../commands.js'\n\nconst agents = {\n type: 'local-jsx',\n name: 'agents',\n description:"
},
{
"path": "restored-src/src/commands/ant-trace/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/autofix-pr/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/backfill-sessions/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/branch/branch.ts",
"chars": 9576,
"preview": "import { randomUUID, type UUID } from 'crypto'\nimport { mkdir, readFile, writeFile } from 'fs/promises'\nimport { getOrig"
},
{
"path": "restored-src/src/commands/branch/index.ts",
"chars": 445,
"preview": "import { feature } from 'bun:bundle'\nimport type { Command } from '../../commands.js'\n\nconst branch = {\n type: 'local-j"
},
{
"path": "restored-src/src/commands/break-cache/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/bridge/bridge.tsx",
"chars": 46900,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport { feature } from 'bun:bundle';\nimport { toString as qrToString "
},
{
"path": "restored-src/src/commands/bridge/index.ts",
"chars": 604,
"preview": "import { feature } from 'bun:bundle'\nimport { isBridgeEnabled } from '../../bridge/bridgeEnabled.js'\nimport type { Comma"
},
{
"path": "restored-src/src/commands/bridge-kick.ts",
"chars": 6655,
"preview": "import { getBridgeDebugHandle } from '../bridge/bridgeDebug.js'\nimport type { Command } from '../commands.js'\nimport typ"
},
{
"path": "restored-src/src/commands/brief.ts",
"chars": 5161,
"preview": "import { feature } from 'bun:bundle'\nimport { z } from 'zod/v4'\nimport { getKairosActive, setUserMsgOptIn } from '../boo"
},
{
"path": "restored-src/src/commands/btw/btw.tsx",
"chars": 30247,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport * as React from 'react';\nimport { useEffect, useRef, useState }"
},
{
"path": "restored-src/src/commands/btw/index.ts",
"chars": 314,
"preview": "import type { Command } from '../../commands.js'\n\nconst btw = {\n type: 'local-jsx',\n name: 'btw',\n description:\n '"
},
{
"path": "restored-src/src/commands/bughunter/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/chrome/chrome.tsx",
"chars": 31974,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport React, { useState } from 'react';\nimport { type OptionWithDescr"
},
{
"path": "restored-src/src/commands/chrome/index.ts",
"chars": 381,
"preview": "import { getIsNonInteractiveSession } from '../../bootstrap/state.js'\nimport type { Command } from '../../commands.js'\n\n"
},
{
"path": "restored-src/src/commands/clear/caches.ts",
"chars": 6366,
"preview": "/**\n * Session cache clearing utilities.\n * This module is imported at startup by main.tsx, so keep imports minimal.\n */"
},
{
"path": "restored-src/src/commands/clear/clear.ts",
"chars": 254,
"preview": "import type { LocalCommandCall } from '../../types/command.js'\nimport { clearConversation } from './conversation.js'\n\nex"
},
{
"path": "restored-src/src/commands/clear/conversation.ts",
"chars": 9321,
"preview": "/**\n * Conversation clearing utility.\n * This module has heavier dependencies and should be lazy-loaded when possible.\n "
},
{
"path": "restored-src/src/commands/clear/index.ts",
"chars": 603,
"preview": "/**\n * Clear command - minimal metadata only.\n * Implementation is lazy-loaded from clear.ts to reduce startup time.\n * "
},
{
"path": "restored-src/src/commands/color/color.ts",
"chars": 2712,
"preview": "import type { UUID } from 'crypto'\nimport { getSessionId } from '../../bootstrap/state.js'\nimport type { ToolUseContext "
},
{
"path": "restored-src/src/commands/color/index.ts",
"chars": 417,
"preview": "/**\n * Color command - minimal metadata only.\n * Implementation is lazy-loaded from color.ts to reduce startup time.\n */"
},
{
"path": "restored-src/src/commands/commit-push-pr.ts",
"chars": 6307,
"preview": "import type { Command } from '../commands.js'\nimport {\n getAttributionTexts,\n getEnhancedPRAttribution,\n} from '../uti"
},
{
"path": "restored-src/src/commands/commit.ts",
"chars": 3492,
"preview": "import type { Command } from '../commands.js'\nimport { getAttributionTexts } from '../utils/attribution.js'\nimport { exe"
},
{
"path": "restored-src/src/commands/compact/compact.ts",
"chars": 10063,
"preview": "import { feature } from 'bun:bundle'\nimport chalk from 'chalk'\nimport { markPostCompaction } from 'src/bootstrap/state.j"
},
{
"path": "restored-src/src/commands/compact/index.ts",
"chars": 530,
"preview": "import type { Command } from '../../commands.js'\nimport { isEnvTruthy } from '../../utils/envUtils.js'\n\nconst compact = "
},
{
"path": "restored-src/src/commands/config/config.tsx",
"chars": 1408,
"preview": "import * as React from 'react';\nimport { Settings } from '../../components/Settings/Settings.js';\nimport type { LocalJSX"
},
{
"path": "restored-src/src/commands/config/index.ts",
"chars": 247,
"preview": "import type { Command } from '../../commands.js'\n\nconst config = {\n aliases: ['settings'],\n type: 'local-jsx',\n name:"
},
{
"path": "restored-src/src/commands/context/context-noninteractive.ts",
"chars": 10779,
"preview": "import { feature } from 'bun:bundle'\nimport { microcompactMessages } from '../../services/compact/microCompact.js'\nimpor"
},
{
"path": "restored-src/src/commands/context/context.tsx",
"chars": 9097,
"preview": "import { feature } from 'bun:bundle';\nimport * as React from 'react';\nimport type { LocalJSXCommandContext } from '../.."
},
{
"path": "restored-src/src/commands/context/index.ts",
"chars": 695,
"preview": "import { getIsNonInteractiveSession } from '../../bootstrap/state.js'\nimport type { Command } from '../../commands.js'\n\n"
},
{
"path": "restored-src/src/commands/copy/copy.tsx",
"chars": 42250,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport { mkdir, writeFile } from 'fs/promises';\nimport { marked, type "
},
{
"path": "restored-src/src/commands/copy/index.ts",
"chars": 393,
"preview": "/**\n * Copy command - minimal metadata only.\n * Implementation is lazy-loaded from copy.tsx to reduce startup time.\n */\n"
},
{
"path": "restored-src/src/commands/cost/cost.ts",
"chars": 909,
"preview": "import { formatTotalCost } from '../../cost-tracker.js'\nimport { currentLimits } from '../../services/claudeAiLimits.js'"
},
{
"path": "restored-src/src/commands/cost/index.ts",
"chars": 668,
"preview": "/**\n * Cost command - minimal metadata only.\n * Implementation is lazy-loaded from cost.ts to reduce startup time.\n */\ni"
},
{
"path": "restored-src/src/commands/createMovedToPluginCommand.ts",
"chars": 1789,
"preview": "import type { ContentBlockParam } from '@anthropic-ai/sdk/resources/messages.js'\nimport type { Command } from '../comman"
},
{
"path": "restored-src/src/commands/ctx_viz/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/debug-tool-call/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/desktop/desktop.tsx",
"chars": 1645,
"preview": "import React from 'react';\nimport type { CommandResultDisplay } from '../../commands.js';\nimport { DesktopHandoff } from"
},
{
"path": "restored-src/src/commands/desktop/index.ts",
"chars": 601,
"preview": "import type { Command } from '../../commands.js'\n\nfunction isSupportedPlatform(): boolean {\n if (process.platform === '"
},
{
"path": "restored-src/src/commands/diff/diff.tsx",
"chars": 1461,
"preview": "import * as React from 'react';\nimport type { LocalJSXCommandCall } from '../../types/command.js';\nexport const call: Lo"
},
{
"path": "restored-src/src/commands/diff/index.ts",
"chars": 221,
"preview": "import type { Command } from '../../commands.js'\n\nexport default {\n type: 'local-jsx',\n name: 'diff',\n description: '"
},
{
"path": "restored-src/src/commands/doctor/doctor.tsx",
"chars": 1309,
"preview": "import React from 'react';\nimport { Doctor } from '../../screens/Doctor.js';\nimport type { LocalJSXCommandCall } from '."
},
{
"path": "restored-src/src/commands/doctor/index.ts",
"chars": 381,
"preview": "import type { Command } from '../../commands.js'\nimport { isEnvTruthy } from '../../utils/envUtils.js'\n\nconst doctor: Co"
},
{
"path": "restored-src/src/commands/effort/effort.tsx",
"chars": 22124,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport * as React from 'react';\nimport { useMainLoopModel } from '../."
},
{
"path": "restored-src/src/commands/effort/index.ts",
"chars": 428,
"preview": "import type { Command } from '../../commands.js'\nimport { shouldInferenceConfigCommandBeImmediate } from '../../utils/im"
},
{
"path": "restored-src/src/commands/env/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/exit/exit.tsx",
"chars": 5270,
"preview": "import { feature } from 'bun:bundle';\nimport { spawnSync } from 'child_process';\nimport sample from 'lodash-es/sample.js"
},
{
"path": "restored-src/src/commands/exit/index.ts",
"chars": 250,
"preview": "import type { Command } from '../../commands.js'\n\nconst exit = {\n type: 'local-jsx',\n name: 'exit',\n aliases: ['quit'"
},
{
"path": "restored-src/src/commands/export/export.tsx",
"chars": 15102,
"preview": "import { join } from 'path';\nimport React from 'react';\nimport { ExportDialog } from '../../components/ExportDialog.js';"
},
{
"path": "restored-src/src/commands/export/index.ts",
"chars": 303,
"preview": "import type { Command } from '../../commands.js'\n\nconst exportCommand = {\n type: 'local-jsx',\n name: 'export',\n descr"
},
{
"path": "restored-src/src/commands/extra-usage/extra-usage-core.ts",
"chars": 3998,
"preview": "import {\n checkAdminRequestEligibility,\n createAdminRequest,\n getMyAdminRequests,\n} from '../../services/api/adminReq"
},
{
"path": "restored-src/src/commands/extra-usage/extra-usage-noninteractive.ts",
"chars": 466,
"preview": "import { runExtraUsage } from './extra-usage-core.js'\n\nexport async function call(): Promise<{ type: 'text'; value: stri"
},
{
"path": "restored-src/src/commands/extra-usage/extra-usage.tsx",
"chars": 3134,
"preview": "import React from 'react';\nimport type { LocalJSXCommandContext } from '../../commands.js';\nimport type { LocalJSXComman"
},
{
"path": "restored-src/src/commands/extra-usage/index.ts",
"chars": 1101,
"preview": "import { getIsNonInteractiveSession } from '../../bootstrap/state.js'\nimport type { Command } from '../../commands.js'\ni"
},
{
"path": "restored-src/src/commands/fast/fast.tsx",
"chars": 33925,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport * as React from 'react';\nimport { useState } from 'react';\nimpo"
},
{
"path": "restored-src/src/commands/fast/index.ts",
"chars": 693,
"preview": "import type { Command } from '../../commands.js'\nimport {\n FAST_MODE_MODEL_DISPLAY,\n isFastModeEnabled,\n} from '../../"
},
{
"path": "restored-src/src/commands/feedback/feedback.tsx",
"chars": 5095,
"preview": "import * as React from 'react';\nimport type { CommandResultDisplay, LocalJSXCommandContext } from '../../commands.js';\ni"
},
{
"path": "restored-src/src/commands/feedback/index.ts",
"chars": 931,
"preview": "import type { Command } from '../../commands.js'\nimport { isPolicyAllowed } from '../../services/policyLimits/index.js'\n"
},
{
"path": "restored-src/src/commands/files/files.ts",
"chars": 688,
"preview": "import { relative } from 'path'\nimport type { ToolUseContext } from '../../Tool.js'\nimport type { LocalCommandResult } f"
},
{
"path": "restored-src/src/commands/files/index.ts",
"chars": 316,
"preview": "import type { Command } from '../../commands.js'\n\nconst files = {\n type: 'local',\n name: 'files',\n description: 'List"
},
{
"path": "restored-src/src/commands/good-claude/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/heapdump/heapdump.ts",
"chars": 398,
"preview": "import { performHeapDump } from '../../utils/heapDumpService.js'\n\nexport async function call(): Promise<{ type: 'text'; "
},
{
"path": "restored-src/src/commands/heapdump/index.ts",
"chars": 288,
"preview": "import type { Command } from '../../commands.js'\n\nconst heapDump = {\n type: 'local',\n name: 'heapdump',\n description:"
},
{
"path": "restored-src/src/commands/help/help.tsx",
"chars": 1432,
"preview": "import * as React from 'react';\nimport { HelpV2 } from '../../components/HelpV2/HelpV2.js';\nimport type { LocalJSXComman"
},
{
"path": "restored-src/src/commands/help/index.ts",
"chars": 229,
"preview": "import type { Command } from '../../commands.js'\n\nconst help = {\n type: 'local-jsx',\n name: 'help',\n description: 'Sh"
},
{
"path": "restored-src/src/commands/hooks/hooks.tsx",
"chars": 2679,
"preview": "import * as React from 'react';\nimport { HooksConfigMenu } from '../../components/hooks/HooksConfigMenu.js';\nimport { lo"
},
{
"path": "restored-src/src/commands/hooks/index.ts",
"chars": 260,
"preview": "import type { Command } from '../../commands.js'\n\nconst hooks = {\n type: 'local-jsx',\n name: 'hooks',\n description: '"
},
{
"path": "restored-src/src/commands/ide/ide.tsx",
"chars": 77052,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport chalk from 'chalk';\nimport * as path from 'path';\nimport React,"
},
{
"path": "restored-src/src/commands/ide/index.ts",
"chars": 258,
"preview": "import type { Command } from '../../commands.js'\n\nconst ide = {\n type: 'local-jsx',\n name: 'ide',\n description: 'Mana"
},
{
"path": "restored-src/src/commands/init-verifiers.ts",
"chars": 10301,
"preview": "import type { Command } from '../commands.js'\n\nconst command = {\n type: 'prompt',\n name: 'init-verifiers',\n descripti"
},
{
"path": "restored-src/src/commands/init.ts",
"chars": 20849,
"preview": "import { feature } from 'bun:bundle'\nimport type { Command } from '../commands.js'\nimport { maybeMarkProjectOnboardingCo"
},
{
"path": "restored-src/src/commands/insights.ts",
"chars": 115917,
"preview": "import { execFileSync } from 'child_process'\nimport { diffLines } from 'diff'\nimport { constants as fsConstants } from '"
},
{
"path": "restored-src/src/commands/install-github-app/ApiKeyStep.tsx",
"chars": 23513,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport React, { useCallback, useState } from 'react';\nimport TextInput"
},
{
"path": "restored-src/src/commands/install-github-app/CheckExistingSecretStep.tsx",
"chars": 18130,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport React, { useCallback, useState } from 'react';\nimport TextInput"
},
{
"path": "restored-src/src/commands/install-github-app/CheckGitHubStep.tsx",
"chars": 1246,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport React from 'react';\nimport { Text } from '../../ink.js';\nexport"
},
{
"path": "restored-src/src/commands/install-github-app/ChooseRepoStep.tsx",
"chars": 21279,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport React, { useCallback, useState } from 'react';\nimport TextInput"
},
{
"path": "restored-src/src/commands/install-github-app/CreatingStep.tsx",
"chars": 9266,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport React from 'react';\nimport { Box, Text } from '../../ink.js';\ni"
},
{
"path": "restored-src/src/commands/install-github-app/ErrorStep.tsx",
"chars": 8600,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport React from 'react';\nimport { GITHUB_ACTION_SETUP_DOCS_URL } fro"
},
{
"path": "restored-src/src/commands/install-github-app/ExistingWorkflowStep.tsx",
"chars": 9833,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport React from 'react';\nimport { Select } from 'src/components/Cust"
},
{
"path": "restored-src/src/commands/install-github-app/InstallAppStep.tsx",
"chars": 9599,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport figures from 'figures';\nimport React from 'react';\nimport { GIT"
},
{
"path": "restored-src/src/commands/install-github-app/OAuthFlowStep.tsx",
"chars": 39923,
"preview": "import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { type AnalyticsMetadata_I_VERIFIED_THIS"
},
{
"path": "restored-src/src/commands/install-github-app/SuccessStep.tsx",
"chars": 10164,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport React from 'react';\nimport { Box, Text } from '../../ink.js';\nt"
},
{
"path": "restored-src/src/commands/install-github-app/WarningsStep.tsx",
"chars": 9130,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport figures from 'figures';\nimport React from 'react';\nimport { GIT"
},
{
"path": "restored-src/src/commands/install-github-app/index.ts",
"chars": 471,
"preview": "import type { Command } from '../../commands.js'\nimport { isEnvTruthy } from '../../utils/envUtils.js'\n\nconst installGit"
},
{
"path": "restored-src/src/commands/install-github-app/install-github-app.tsx",
"chars": 87155,
"preview": "import { execa } from 'execa';\nimport React, { useCallback, useState } from 'react';\nimport { type AnalyticsMetadata_I_V"
},
{
"path": "restored-src/src/commands/install-github-app/setupGitHubActions.ts",
"chars": 10150,
"preview": "import {\n type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,\n logEvent,\n} from 'src/services/analytics/i"
},
{
"path": "restored-src/src/commands/install-slack-app/index.ts",
"chars": 333,
"preview": "import type { Command } from '../../commands.js'\n\nconst installSlackApp = {\n type: 'local',\n name: 'install-slack-app'"
},
{
"path": "restored-src/src/commands/install-slack-app/install-slack-app.ts",
"chars": 875,
"preview": "import type { LocalCommandResult } from '../../commands.js'\nimport { logEvent } from '../../services/analytics/index.js'"
},
{
"path": "restored-src/src/commands/install.tsx",
"chars": 39066,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\ni"
},
{
"path": "restored-src/src/commands/issue/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/keybindings/index.ts",
"chars": 448,
"preview": "import type { Command } from '../../commands.js'\nimport { isKeybindingCustomizationEnabled } from '../../keybindings/loa"
},
{
"path": "restored-src/src/commands/keybindings/keybindings.ts",
"chars": 1643,
"preview": "import { mkdir, writeFile } from 'fs/promises'\nimport { dirname } from 'path'\nimport {\n getKeybindingsPath,\n isKeybind"
},
{
"path": "restored-src/src/commands/login/index.ts",
"chars": 489,
"preview": "import type { Command } from '../../commands.js'\nimport { hasAnthropicApiKeyAuth } from '../../utils/auth.js'\nimport { i"
},
{
"path": "restored-src/src/commands/login/login.tsx",
"chars": 16105,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport { feature } from 'bun:bundle';\nimport * as React from 'react';\n"
},
{
"path": "restored-src/src/commands/logout/index.ts",
"chars": 341,
"preview": "import type { Command } from '../../commands.js'\nimport { isEnvTruthy } from '../../utils/envUtils.js'\n\nexport default {"
},
{
"path": "restored-src/src/commands/logout/logout.tsx",
"chars": 10732,
"preview": "import * as React from 'react';\nimport { clearTrustedDeviceTokenCache } from '../../bridge/trustedDevice.js';\nimport { T"
},
{
"path": "restored-src/src/commands/mcp/addCommand.ts",
"chars": 9848,
"preview": "/**\n * MCP add CLI subcommand\n *\n * Extracted from main.tsx to enable direct testing.\n */\nimport { type Command, Option "
},
{
"path": "restored-src/src/commands/mcp/index.ts",
"chars": 280,
"preview": "import type { Command } from '../../commands.js'\n\nconst mcp = {\n type: 'local-jsx',\n name: 'mcp',\n description: 'Mana"
},
{
"path": "restored-src/src/commands/mcp/mcp.tsx",
"chars": 12126,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport React, { useEffect, useRef } from 'react';\nimport { MCPSettings"
},
{
"path": "restored-src/src/commands/mcp/xaaIdpCommand.ts",
"chars": 10262,
"preview": "/**\n * `claude mcp xaa` — manage the XAA (SEP-990) IdP connection.\n *\n * The IdP connection is user-level: configure onc"
},
{
"path": "restored-src/src/commands/memory/index.ts",
"chars": 220,
"preview": "import type { Command } from '../../commands.js'\n\nconst memory: Command = {\n type: 'local-jsx',\n name: 'memory',\n des"
},
{
"path": "restored-src/src/commands/memory/memory.tsx",
"chars": 12606,
"preview": "import { mkdir, writeFile } from 'fs/promises';\nimport * as React from 'react';\nimport type { CommandResultDisplay } fro"
},
{
"path": "restored-src/src/commands/mobile/index.ts",
"chars": 282,
"preview": "import type { Command } from '../../commands.js'\n\nconst mobile = {\n type: 'local-jsx',\n name: 'mobile',\n aliases: ['i"
},
{
"path": "restored-src/src/commands/mobile/mobile.tsx",
"chars": 21797,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport { toString as qrToString } from 'qrcode';\nimport * as React fro"
},
{
"path": "restored-src/src/commands/mock-limits/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/model/index.ts",
"chars": 559,
"preview": "import type { Command } from '../../commands.js'\nimport { shouldInferenceConfigCommandBeImmediate } from '../../utils/im"
},
{
"path": "restored-src/src/commands/model/model.tsx",
"chars": 37566,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport chalk from 'chalk';\nimport * as React from 'react';\nimport type"
},
{
"path": "restored-src/src/commands/oauth-refresh/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/onboarding/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/output-style/index.ts",
"chars": 291,
"preview": "import type { Command } from '../../commands.js'\n\nconst outputStyle = {\n type: 'local-jsx',\n name: 'output-style',\n d"
},
{
"path": "restored-src/src/commands/output-style/output-style.tsx",
"chars": 1343,
"preview": "import type { LocalJSXCommandOnDone } from '../../types/command.js';\nexport async function call(onDone: LocalJSXCommandO"
},
{
"path": "restored-src/src/commands/passes/index.ts",
"chars": 632,
"preview": "import type { Command } from '../../commands.js'\nimport {\n checkCachedPassesEligibility,\n getCachedReferrerReward,\n} f"
},
{
"path": "restored-src/src/commands/passes/passes.tsx",
"chars": 3783,
"preview": "import * as React from 'react';\nimport { Passes } from '../../components/Passes/Passes.js';\nimport { logEvent } from '.."
},
{
"path": "restored-src/src/commands/perf-issue/index.js",
"chars": 73,
"preview": "export default { isEnabled: () => false, isHidden: true, name: 'stub' };\n"
},
{
"path": "restored-src/src/commands/permissions/index.ts",
"chars": 296,
"preview": "import type { Command } from '../../commands.js'\n\nconst permissions = {\n type: 'local-jsx',\n name: 'permissions',\n al"
},
{
"path": "restored-src/src/commands/permissions/permissions.tsx",
"chars": 2223,
"preview": "import * as React from 'react';\nimport { PermissionRuleList } from '../../components/permissions/rules/PermissionRuleLis"
},
{
"path": "restored-src/src/commands/plan/index.ts",
"chars": 286,
"preview": "import type { Command } from '../../commands.js'\n\nconst plan = {\n type: 'local-jsx',\n name: 'plan',\n description: 'En"
},
{
"path": "restored-src/src/commands/plan/plan.tsx",
"chars": 13904,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport * as React from 'react';\nimport { handlePlanModeTransition } fr"
},
{
"path": "restored-src/src/commands/plugin/AddMarketplace.tsx",
"chars": 21815,
"preview": "import * as React from 'react';\nimport { useEffect, useRef, useState } from 'react';\nimport { type AnalyticsMetadata_I_V"
},
{
"path": "restored-src/src/commands/plugin/BrowseMarketplace.tsx",
"chars": 119532,
"preview": "import figures from 'figures';\nimport * as React from 'react';\nimport { useEffect, useState } from 'react';\nimport { Con"
},
{
"path": "restored-src/src/commands/plugin/DiscoverPlugins.tsx",
"chars": 106650,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport figures from 'figures';\nimport * as React from 'react';\nimport "
},
{
"path": "restored-src/src/commands/plugin/ManageMarketplaces.tsx",
"chars": 118880,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport figures from 'figures';\nimport * as React from 'react';\nimport "
},
{
"path": "restored-src/src/commands/plugin/ManagePlugins.tsx",
"chars": 321690,
"preview": "import figures from 'figures';\nimport type { Dirent } from 'fs';\nimport * as fs from 'fs/promises';\nimport * as path fro"
},
{
"path": "restored-src/src/commands/plugin/PluginErrors.tsx",
"chars": 23312,
"preview": "import { getPluginErrorMessage, type PluginError } from '../../types/plugin.js';\nexport function formatErrorMessage(erro"
},
{
"path": "restored-src/src/commands/plugin/PluginOptionsDialog.tsx",
"chars": 34532,
"preview": "import { c as _c } from \"react/compiler-runtime\";\nimport figures from 'figures';\nimport React, { useCallback, useState }"
},
{
"path": "restored-src/src/commands/plugin/PluginOptionsFlow.tsx",
"chars": 18692,
"preview": "/**\n * Post-install/post-enable config prompt.\n *\n * Given a LoadedPlugin, checks both the top-level manifest.userConfig"
}
]
// ... and 1725 more files (download for full content)
About this extraction
This page contains the full source code of the ChinaSiro/claude-code-sourcemap GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1925 files (71.3 MB), approximately 7.7M tokens, and a symbol index with 15223 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.