Skip to content

Latest commit

 

History

History
67 lines (61 loc) · 18.1 KB

File metadata and controls

67 lines (61 loc) · 18.1 KB

目录说明:src/utils/plugins

目录定位

插件基础设施目录,负责 marketplace、安装、缓存、策略、校验、热更新与插件能力接入。

目录快照

  • 相对路径:src/utils/plugins
  • 直接文件数:44
  • 直接子目录数:0
  • 递归文件数:44
  • 主要文件类型:.ts x 43、.tsx x 1

依赖关系观察

  • 该目录最常引用的仓库内目录:src/utils (138)、src/utils/settings (24)、src/types (11)、src/services/analytics (10)、src/bootstrap (9)、src/tools/AgentTool (6)、src/services/mcp (5)
  • 最常引用该目录的仓库内目录:src/commands/plugin (48)、src/services/plugins (20)、src/hooks (14)、src/cli/handlers (11)、src (8)、src/utils (6)、src/commands/thinkback (6)

直接文件说明

文件 行数 导出/关键符号 说明
addDirPluginSettings.ts 71 getAddDirEnabledPlugins, getAddDirExtraMarketplaces 基础辅助逻辑;导出符号以 getAddDirEnabledPlugins, getAddDirExtraMarketplaces 为主,顶部注释说明:Reads plugin-related settings (enabledPlugins, extraKnownMarketplaces) from --add-dir directories. These have the LOW...
cacheUtils.ts 196 clearAllPluginCaches, clearAllCaches, markPluginVersionOrphaned, cleanupOrphanedPluginVersionsInBackground 通用辅助逻辑;导出符号以 clearAllPluginCaches, clearAllCaches, markPluginVersionOrphaned, cleanupOrphanedPluginVersionsInBackground 为主,结合所在目录可判断其服务于 src/utils/plugins 这条功能线。
dependencyResolver.ts 305 qualifyDependency, DependencyLookupResult, ResolutionResult, resolveDependencyClosure, verifyAndDemote, findReverseDependents 解析/决策分发逻辑;导出符号以 qualifyDependency, DependencyLookupResult, ResolutionResult, resolveDependencyClosure 为主,顶部注释说明:Plugin dependency resolution — pure functions, no I/O. Semantics are apt-style: a dependency is a *presence guarant...
fetchTelemetry.ts 135 PluginFetchSource, PluginFetchOutcome, logPluginFetch, classifyFetchError 基础辅助逻辑;导出符号以 PluginFetchSource, PluginFetchOutcome, logPluginFetch, classifyFetchError 为主,顶部注释说明:Telemetry for plugin/marketplace fetches that hit the network. Added for inc-5046 (GitHub complained about claude-plu...
gitAvailability.ts 69 checkGitAvailable, markGitUnavailable, clearGitAvailabilityCache 基础辅助逻辑;导出符号以 checkGitAvailable, markGitUnavailable, clearGitAvailabilityCache 为主,顶部注释说明:Utility for checking git availability. Git is required for installing GitHub-based marketplaces. This module provides...
headlessPluginInstall.ts 174 installPluginsForHeadless 基础辅助逻辑;导出符号以 installPluginsForHeadless 为主,顶部注释说明:Plugin installation for headless/CCR mode. This module provides plugin installation without AppState updates, suitabl...
hintRecommendation.ts 164 PluginHintRecommendation, maybeRecordPluginHint, _resetHintRecommendationForTesting, resolvePluginHint, markHintPluginShown, disableHintRecommendations 基础辅助逻辑;导出符号以 PluginHintRecommendation, maybeRecordPluginHint, _resetHintRecommendationForTesting, resolvePluginHint 为主,顶部注释说明:Plugin-hint recommendations. Companion to lspRecommendation.ts: where LSP recommendations are triggered by file edits...
installCounts.ts 292 getInstallCounts, formatInstallCount 基础辅助逻辑;导出符号以 getInstallCounts, formatInstallCount 为主,顶部注释说明:Plugin install counts data layer This module fetches and caches plugin install counts from the official Claude plugin...
installedPluginsManager.ts 1268 PersistableScope, getInstalledPluginsFilePath, getInstalledPluginsV2FilePath, clearInstalledPluginsCache, migrateToSinglePluginFile, resetMigrationState 资源或生命周期管理器;导出符号以 PersistableScope, getInstalledPluginsFilePath, getInstalledPluginsV2FilePath, clearInstalledPluginsCache 为主,顶部注释说明:Manages plugin installation metadata stored in installed_plugins.json This module separates plugin installation state...
loadPluginAgents.ts 348 loadPluginAgents, clearPluginAgentCache 基础辅助逻辑;导出符号以 loadPluginAgents, clearPluginAgentCache 为主,结合所在目录可判断其服务于 src/utils/plugins 这条功能线。
loadPluginCommands.ts 946 getPluginCommands, clearPluginCommandCache, getPluginSkills, clearPluginSkillsCache 命令实现或命令适配层;导出符号以 getPluginCommands, clearPluginCommandCache, getPluginSkills, clearPluginSkillsCache 为主,结合所在目录可判断其服务于 src/utils/plugins 这条功能线。
loadPluginHooks.ts 287 loadPluginHooks, clearPluginHookCache, pruneRemovedPluginHooks, resetHotReloadState, getPluginAffectingSettingsSnapshot, setupPluginHookHotReload hook 或 hook 执行逻辑;导出符号以 loadPluginHooks, clearPluginHookCache, pruneRemovedPluginHooks, resetHotReloadState 为主,顶部注释说明:Convert plugin hooks configuration to native matchers with plugin context
loadPluginOutputStyles.ts 178 loadPluginOutputStyles, clearPluginOutputStyleCache 基础辅助逻辑;导出符号以 loadPluginOutputStyles, clearPluginOutputStyleCache 为主,结合所在目录可判断其服务于 src/utils/plugins 这条功能线。
lspPluginIntegration.ts 387 loadPluginLspServers, resolvePluginLspEnvironment, addPluginScopeToLspServers, getPluginLspServers, extractLspServersFromPlugins 基础辅助逻辑;导出符号以 loadPluginLspServers, resolvePluginLspEnvironment, addPluginScopeToLspServers, getPluginLspServers 为主,顶部注释说明:Validate that a resolved path stays within the plugin directory. Prevents path traversal attacks via .. or absolute p...
lspRecommendation.ts 374 LspPluginRecommendation, getMatchingLspPlugins, addToNeverSuggest, incrementIgnoredCount, isLspRecommendationsDisabled, resetIgnoredCount 基础辅助逻辑;导出符号以 LspPluginRecommendation, getMatchingLspPlugins, addToNeverSuggest, incrementIgnoredCount 为主,顶部注释说明:LSP Plugin Recommendation Utility Scans installed marketplaces for LSP plugins and recommends plugins based on file e...
managedPlugins.ts 27 getManagedPluginNames 基础辅助逻辑;导出符号以 getManagedPluginNames 为主,顶部注释说明:Plugin names locked by org policy (policySettings.enabledPlugins). Returns null when managed settings declare no plug...
marketplaceHelpers.ts 592 formatFailureDetails, getMarketplaceSourceDisplay, createPluginId, loadMarketplacesWithGracefulDegradation, formatMarketplaceLoadingErrors, getStrictKnownMarketplaces 辅助函数集合;导出符号以 formatFailureDetails, getMarketplaceSourceDisplay, createPluginId, loadMarketplacesWithGracefulDegradation 为主,顶部注释说明:Format plugin failure details for user display @param failures - Array of failures with names and reasons @param incl...
marketplaceManager.ts 2643 getMarketplacesCacheDir, clearMarketplacesCache, KnownMarketplacesConfig, DeclaredMarketplace, getDeclaredMarketplaces, getMarketplaceDeclaringSource 资源或生命周期管理器;导出符号以 getMarketplacesCacheDir, clearMarketplacesCache, KnownMarketplacesConfig, DeclaredMarketplace 为主,顶部注释说明:Marketplace manager for Claude Code plugins This module provides functionality to: - Manage known marketplace sources...
mcpPluginIntegration.ts 634 loadPluginMcpServers, UnconfiguredChannel, getUnconfiguredChannels, addPluginScopeToServers, extractMcpServersFromPlugins, resolvePluginMcpEnvironment 基础辅助逻辑;导出符号以 loadPluginMcpServers, UnconfiguredChannel, getUnconfiguredChannels, addPluginScopeToServers 为主,顶部注释说明:Load MCP servers from an MCPB file Handles downloading, extracting, and converting DXT manifest to MCP config
mcpbHandler.ts 968 UserConfigValues, UserConfigSchema, McpbLoadResult, McpbNeedsConfigResult, McpbCacheMetadata, ProgressCallback 基础辅助逻辑;导出符号以 UserConfigValues, UserConfigSchema, McpbLoadResult, McpbNeedsConfigResult 为主,顶部注释说明:User configuration values for MCPB
officialMarketplace.ts 25 OFFICIAL_MARKETPLACE_SOURCE, OFFICIAL_MARKETPLACE_NAME 基础辅助逻辑;导出符号以 OFFICIAL_MARKETPLACE_SOURCE, OFFICIAL_MARKETPLACE_NAME 为主,顶部注释说明:Constants for the official Anthropic plugins marketplace. The official marketplace is hosted on GitHub and provides f...
officialMarketplaceGcs.ts 216 fetchOfficialMarketplaceFromGcs, classifyGcsError 基础辅助逻辑;导出符号以 fetchOfficialMarketplaceFromGcs, classifyGcsError 为主,顶部注释说明:inc-5046: fetch the official marketplace from a GCS mirror instead of git-cloning GitHub on every startup. Backend (a...
officialMarketplaceStartupCheck.ts 439 OfficialMarketplaceSkipReason, isOfficialMarketplaceAutoInstallDisabled, RETRY_CONFIG, OfficialMarketplaceCheckResult, checkAndInstallOfficialMarketplace 基础辅助逻辑;导出符号以 OfficialMarketplaceSkipReason, isOfficialMarketplaceAutoInstallDisabled, RETRY_CONFIG, OfficialMarketplaceCheckResult 为主,顶部注释说明:Auto-install logic for the official Anthropic marketplace. This module handles automatically installing the official ...
orphanedPluginFilter.ts 114 getGlobExclusionsForPluginCache, clearPluginCacheExclusions 基础辅助逻辑;导出符号以 getGlobExclusionsForPluginCache, clearPluginCacheExclusions 为主,顶部注释说明:Provides ripgrep glob exclusion patterns for orphaned plugin versions. When plugin versions are updated, old versions...
parseMarketplaceInput.ts 162 parseMarketplaceInput 基础辅助逻辑;导出符号以 parseMarketplaceInput 为主,顶部注释说明:Parses a marketplace input string and returns the appropriate marketplace source type. Handles various input formats:...
performStartupChecks.tsx 70 performStartupChecks 界面组件或交互视图;导出符号以 performStartupChecks 为主,顶部注释说明:Perform plugin startup checks and initiate background installations This function starts background installation of m...
pluginAutoupdate.ts 284 PluginAutoUpdateCallback, onPluginsAutoUpdated, getAutoUpdatedPluginNames, updatePluginsForMarketplaces, autoUpdateMarketplacesAndPluginsInBackground 基础辅助逻辑;导出符号以 PluginAutoUpdateCallback, onPluginsAutoUpdated, getAutoUpdatedPluginNames, updatePluginsForMarketplaces 为主,顶部注释说明:Background plugin autoupdate functionality At startup, this module: 1. First updates marketplaces that have autoUpdat...
pluginBlocklist.ts 127 detectDelistedPlugins, detectAndUninstallDelistedPlugins 基础辅助逻辑;导出符号以 detectDelistedPlugins, detectAndUninstallDelistedPlugins 为主,顶部注释说明:Plugin delisting detection. Compares installed plugins against marketplace manifests to find plugins that have been r...
pluginDirectories.ts 178 getPluginsDirectory, getPluginSeedDirs, pluginDataDirPath, getPluginDataDir, getPluginDataDirSize, deletePluginDataDir 基础辅助逻辑;导出符号以 getPluginsDirectory, getPluginSeedDirs, pluginDataDirPath, getPluginDataDir 为主,顶部注释说明:Centralized plugin directory configuration. This module provides the single source of truth for the plugins directory...
pluginFlagging.ts 208 FlaggedPlugin, loadFlaggedPlugins, getFlaggedPlugins, addFlaggedPlugin, markFlaggedPluginsSeen, removeFlaggedPlugin 基础辅助逻辑;导出符号以 FlaggedPlugin, loadFlaggedPlugins, getFlaggedPlugins, addFlaggedPlugin 为主,顶部注释说明:Flagged plugin tracking utilities Tracks plugins that were auto-removed because they were delisted from their marketp...
pluginIdentifier.ts 123 ExtendedPluginScope, PersistablePluginScope, SETTING_SOURCE_TO_SCOPE, ParsedPluginIdentifier, parsePluginIdentifier, buildPluginId 基础辅助逻辑;导出符号以 ExtendedPluginScope, PersistablePluginScope, SETTING_SOURCE_TO_SCOPE, ParsedPluginIdentifier 为主,顶部注释说明:Extended scope type that includes 'flag' for session-only plugins. 'flag' scope is NOT persisted to installed_plugins...
pluginInstallationHelpers.ts 595 PluginInstallationInfo, getCurrentTimestamp, validatePathWithinBase, cacheAndRegisterPlugin, registerPluginInstallation, parsePluginId 辅助函数集合;导出符号以 PluginInstallationInfo, getCurrentTimestamp, validatePathWithinBase, cacheAndRegisterPlugin 为主,顶部注释说明:Shared helper functions for plugin installation This module contains common utilities used across the plugin installa...
pluginLoader.ts 3302 getPluginCachePath, getVersionedCachePathIn, getVersionedCachePath, getVersionedZipCachePath, probeSeedCacheAnyVersion, getLegacyCachePath 基础辅助逻辑;导出符号以 getPluginCachePath, getVersionedCachePathIn, getVersionedCachePath, getVersionedZipCachePath 为主,顶部注释说明:Plugin Loader Module This module is responsible for discovering, loading, and validating Claude Code plugins from var...
pluginOptionsStorage.ts 400 PluginOptionValues, PluginOptionSchema, getPluginStorageId, loadPluginOptions, clearPluginOptionsCache, savePluginOptions 存储读写逻辑;导出符号以 PluginOptionValues, PluginOptionSchema, getPluginStorageId, loadPluginOptions 为主,顶部注释说明:Plugin option storage and substitution. Plugins declare user-configurable options in manifest.userConfig — a record...
pluginPolicy.ts 20 isPluginBlockedByPolicy 基础辅助逻辑;导出符号以 isPluginBlockedByPolicy 为主,顶部注释说明:Plugin policy checks backed by managed settings (policySettings). Kept as a leaf module (only imports settings) to av...
pluginStartupCheck.ts 341 checkEnabledPlugins, getPluginEditableScopes, isPersistableScope, settingSourceToScope, getInstalledPlugins, findMissingPlugins 基础辅助逻辑;导出符号以 checkEnabledPlugins, getPluginEditableScopes, isPersistableScope, settingSourceToScope 为主,顶部注释说明:Checks for enabled plugins across all settings sources, including --add-dir. Uses getInitialSettings() which merges a...
pluginVersioning.ts 157 calculatePluginVersion, getGitCommitSha, getVersionFromPath, isVersionedPath 基础辅助逻辑;导出符号以 calculatePluginVersion, getGitCommitSha, getVersionFromPath, isVersionedPath 为主,顶部注释说明:Plugin Version Calculation Module Handles version calculation for plugins from various sources. Versions are used for...
reconciler.ts 265 MarketplaceDiff, diffMarketplaces, ReconcileOptions, ReconcileProgressEvent, ReconcileResult, reconcileMarketplaces 基础辅助逻辑;导出符号以 MarketplaceDiff, diffMarketplaces, ReconcileOptions, ReconcileProgressEvent 为主,顶部注释说明:Marketplace reconciler — makes known_marketplaces.json consistent with declared intent in settings. Two layers: - dif...
refresh.ts 215 RefreshActivePluginsResult, refreshActivePlugins 基础辅助逻辑;导出符号以 RefreshActivePluginsResult, refreshActivePlugins 为主,顶部注释说明:Layer-3 refresh primitive: swap active plugin components in the running session. Three-layer model (see reconciler.ts...
schemas.ts 1681 ALLOWED_OFFICIAL_MARKETPLACE_NAMES, isMarketplaceAutoUpdate, BLOCKED_OFFICIAL_NAME_PATTERN, isBlockedOfficialName, OFFICIAL_GITHUB_ORG, validateOfficialNameSource schema 或约束定义;导出符号以 ALLOWED_OFFICIAL_MARKETPLACE_NAMES, isMarketplaceAutoUpdate, BLOCKED_OFFICIAL_NAME_PATTERN, isBlockedOfficialName 为主,顶部注释说明:First-layer defense against official marketplace impersonation. This validation blocks direct impersonation attempts ...
validatePlugin.ts 903 ValidationResult, ValidationError, ValidationWarning, validatePluginManifest, validateMarketplaceManifest, validatePluginContents 基础辅助逻辑;导出符号以 ValidationResult, ValidationError, ValidationWarning, validatePluginManifest 为主,顶部注释说明:Fields that belong in marketplace.json entries (PluginMarketplaceEntrySchema) but not plugin.json (PluginManifestSche...
walkPluginMarkdown.ts 69 walkPluginMarkdown 基础辅助逻辑;导出符号以 walkPluginMarkdown 为主,顶部注释说明:Recursively walk a plugin directory, invoking onFile for each .md file. The namespace array tracks the subdirectory p...
zipCache.ts 406 isPluginZipCacheEnabled, getPluginZipCachePath, getZipCacheKnownMarketplacesPath, getZipCacheInstalledPluginsPath, getZipCacheMarketplacesDir, getZipCachePluginsDir 基础辅助逻辑;导出符号以 isPluginZipCacheEnabled, getPluginZipCachePath, getZipCacheKnownMarketplacesPath, getZipCacheInstalledPluginsPath 为主,顶部注释说明:Plugin Zip Cache Module Manages plugins as ZIP archives in a mounted directory (e.g., Filestore). When CLAUDE_CODE_PL...
zipCacheAdapters.ts 164 readZipCacheKnownMarketplaces, writeZipCacheKnownMarketplaces, readMarketplaceJson, saveMarketplaceJsonToZipCache, syncMarketplacesToZipCache 基础辅助逻辑;导出符号以 readZipCacheKnownMarketplaces, writeZipCacheKnownMarketplaces, readMarketplaceJson, saveMarketplaceJsonToZipCache 为主,顶部注释说明:Zip Cache Adapters I/O helpers for the plugin zip cache. These functions handle reading/writing zip-cache-local metad...

直接子目录说明

该目录没有直接子目录。