fix: separate MCP capability readiness from npx presence
This commit is contained in:
@@ -304,22 +304,18 @@ function Get-ReverseToolCatalog {
|
||||
[pscustomobject]@{
|
||||
Name = 'jshookmcp'
|
||||
Skill = 'js-reverse'
|
||||
Purpose = '通过 npx 启动 @jshookmcp/jshook MCP(仍需先配置并启用 MCP server)'
|
||||
Purpose = '通过 npx 启动 @jshookmcp/jshook MCP(需 MCP 注册;npx 本身不代表该能力已安装)'
|
||||
FixedVersion = '@jshookmcp/jshook@0.3.4'
|
||||
VersionArgs = @()
|
||||
Fallbacks = @(
|
||||
[pscustomobject]@{ Type = 'command'; Value = 'npx' }
|
||||
)
|
||||
Fallbacks = @()
|
||||
}
|
||||
[pscustomobject]@{
|
||||
Name = 'reqable-mcp'
|
||||
Skill = 'pentest-tools'
|
||||
Purpose = '通过 npx 启动 Reqable 桌面客户端 MCP(仍需先安装并启动 Reqable)'
|
||||
Purpose = '通过 npx 启动 Reqable 桌面客户端 MCP(需 MCP 注册与 Reqable;npx 本身不代表该能力已安装)'
|
||||
FixedVersion = 'reqable-mcp-server@1.0.1'
|
||||
VersionArgs = @()
|
||||
Fallbacks = @(
|
||||
[pscustomobject]@{ Type = 'command'; Value = 'npx' }
|
||||
)
|
||||
Fallbacks = @()
|
||||
}
|
||||
[pscustomobject]@{
|
||||
Name = 'agent-browser'
|
||||
@@ -840,6 +836,17 @@ function Get-ReverseCapabilityState {
|
||||
$toolReady = $false
|
||||
}
|
||||
|
||||
$runtimeReady = $toolReady
|
||||
if ($definition.bootstrapKind -eq 'npm-mcp') {
|
||||
try {
|
||||
$runtimeSpec = Resolve-ReverseToolSpec -Name 'npx'
|
||||
$runtimeReady = [bool]$runtimeSpec.Available
|
||||
}
|
||||
catch {
|
||||
$runtimeReady = $false
|
||||
}
|
||||
}
|
||||
|
||||
$verificationMode = if ($definition.PSObject.Properties['verificationMode']) { [string]$definition.verificationMode } else { '' }
|
||||
$ready = $toolReady
|
||||
if ($definition.PSObject.Properties['mcpNames']) {
|
||||
@@ -852,7 +859,7 @@ function Get-ReverseCapabilityState {
|
||||
}
|
||||
default {
|
||||
if ($definition.bootstrapKind -eq 'npm-mcp') {
|
||||
$ready = $registered -and $toolReady
|
||||
$ready = $registered -and $runtimeReady
|
||||
}
|
||||
else {
|
||||
$ready = $registered -or $toolReady
|
||||
@@ -868,6 +875,7 @@ function Get-ReverseCapabilityState {
|
||||
DocsUrl = [string]$definition.docsUrl
|
||||
Ready = $ready
|
||||
Registered = $registered
|
||||
RuntimeAvailable = $runtimeReady
|
||||
ServiceOnline = $serviceOnline
|
||||
McpHttpVerified = $mcpHttpVerified
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user