该目录是 src/tools 下的子模块,围绕 PowerShellTool 这一主题组织实现文件。
- 相对路径:
src/tools/PowerShellTool - 直接文件数:14
- 直接子目录数:0
- 递归文件数:14
- 主要文件类型:
.tsx 12、.tsxx 2
- 该目录最常引用的仓库内目录:
src/utils(25)、src/utils/permissions(11)、src/utils/powershell(11)、src(7)、src/types(7)、src/utils/shell(6)、src/tools/BashTool(3) - 最常引用该目录的仓库内目录:
src/components/permissions/PowerShellPermissionRequest(4)、src/utils/permissions(2)、src(1)、src/components/permissions(1)、src/services/tools(1)、src/utils(1)、src/utils/shell(1)
| 文件 | 行数 | 导出/关键符号 | 说明 |
|---|---|---|---|
PowerShellTool.tsx |
1001 | detectBlockedSleepPattern, PowerShellToolInput, Out, PowerShellTool |
工具实现或工具适配层;导出符号以 detectBlockedSleepPattern, PowerShellToolInput, Out, PowerShellTool 为主,结合所在目录可判断其服务于 src/tools/PowerShellTool 这条功能线。 |
UI.tsx |
131 | renderToolUseMessage, renderToolUseProgressMessage, renderToolUseQueuedMessage, renderToolResultMessage, renderToolUseErrorMessage |
界面组件或交互视图;导出符号以 renderToolUseMessage, renderToolUseProgressMessage, renderToolUseQueuedMessage, renderToolResultMessage 为主,结合所在目录可判断其服务于 src/tools/PowerShellTool 这条功能线。 |
clmTypes.ts |
211 | CLM_ALLOWED_TYPES, normalizeTypeName, isClmAllowedType |
类型定义;导出符号以 CLM_ALLOWED_TYPES, normalizeTypeName, isClmAllowedType 为主,顶部注释说明:PowerShell Constrained Language Mode allowed types. Microsoft's CLM restricts .NET type usage to this allowlist when ... |
commandSemantics.ts |
142 | CommandSemantic, interpretCommandResult |
命令实现或命令适配层;导出符号以 CommandSemantic, interpretCommandResult 为主,顶部注释说明:Command semantics configuration for interpreting exit codes in PowerShell. PowerShell-native cmdlets do NOT need exit... |
commonParameters.ts |
30 | COMMON_SWITCHES, COMMON_VALUE_PARAMS, COMMON_PARAMETERS |
工具实现;导出符号以 COMMON_SWITCHES, COMMON_VALUE_PARAMS, COMMON_PARAMETERS 为主,顶部注释说明:PowerShell Common Parameters (available on all cmdlets via [CmdletBinding()]). Source: about_CommonParameters (PowerS... |
destructiveCommandWarning.ts |
109 | getDestructiveCommandWarning |
命令实现或命令适配层;导出符号以 getDestructiveCommandWarning 为主,顶部注释说明:Detects potentially destructive PowerShell commands and returns a warning string for display in the permission dialog... |
gitSafety.ts |
176 | isGitInternalPathPS, isDotGitPathPS |
工具实现;导出符号以 isGitInternalPathPS, isDotGitPathPS 为主,顶部注释说明:Git can be weaponized for sandbox escape via two vectors: 1. Bare-repo attack: if cwd contains HEAD + objects/ + refs... |
modeValidation.ts |
404 | isSymlinkCreatingCommand, checkPermissionMode |
校验逻辑;导出符号以 isSymlinkCreatingCommand, checkPermissionMode 为主,顶部注释说明:PowerShell permission mode validation. Checks if commands should be auto-allowed based on the current permission mode... |
pathValidation.ts |
2049 | isDangerousRemovalRawPath, dangerousRemovalDeny, checkPathConstraints |
校验逻辑;导出符号以 isDangerousRemovalRawPath, dangerousRemovalDeny, checkPathConstraints 为主,顶部注释说明:PowerShell-specific path validation for command arguments. Extracts file paths from PowerShell commands using the AST... |
powershellPermissions.ts |
1648 | powershellPermissionRule, powershellToolCheckExactMatchPermission, powershellToolCheckPermission, powershellToolHasPermission |
权限相关逻辑;导出符号以 powershellPermissionRule, powershellToolCheckExactMatchPermission, powershellToolCheckPermission, powershellToolHasPermission 为主,顶部注释说明:PowerShell-specific permission checking, adapted from bashPermissions.ts for case-insensitive cmdlet matching. |
powershellSecurity.ts |
1090 | powershellCommandIsSafe |
工具实现;导出符号以 powershellCommandIsSafe 为主,顶部注释说明:PowerShell-specific security analysis for command validation. Detects dangerous patterns: code injection, download cr... |
prompt.ts |
145 | getDefaultTimeoutMs, getMaxTimeoutMs, getPrompt |
提示词/提示模板定义;导出符号以 getDefaultTimeoutMs, getMaxTimeoutMs, getPrompt 为主,结合所在目录可判断其服务于 src/tools/PowerShellTool 这条功能线。 |
readOnlyValidation.ts |
1823 | argLeaksValue, CMDLET_ALLOWLIST, resolveToCanonical, isCwdChangingCmdlet, isSafeOutputCommand, isAllowlistedPipelineTail |
校验逻辑;导出符号以 argLeaksValue, CMDLET_ALLOWLIST, resolveToCanonical, isCwdChangingCmdlet 为主,顶部注释说明:PowerShell read-only command validation. Cmdlets are case-insensitive; all matching is done in lowercase. |
toolName.ts |
2 | POWERSHELL_TOOL_NAME |
工具实现或工具适配层;导出符号以 POWERSHELL_TOOL_NAME 为主,顶部注释说明:Here to break circular dependency from prompt.ts |
该目录没有直接子目录。