Plugins: surface MCP servers and bundle capabilities in inspect reports

This commit is contained in:
Vincent Koc
2026-03-17 23:12:48 -07:00
parent b9b891b614
commit b48413e252
4 changed files with 156 additions and 2 deletions

View File

@@ -660,6 +660,8 @@ export function registerPluginsCli(program: Command) {
.map((entry) => (entry.severity === "warn" ? `warn:${entry.code}` : entry.code))
.join(", ")
: "none",
Bundle:
inspect.bundleCapabilities.length > 0 ? inspect.bundleCapabilities.join(", ") : "-",
Hooks: formatHookSummary({
usesLegacyBeforeAgentStart: inspect.usesLegacyBeforeAgentStart,
typedHookCount: inspect.typedHooks.length,
@@ -676,6 +678,7 @@ export function registerPluginsCli(program: Command) {
{ key: "Shape", header: "Shape", minWidth: 18 },
{ key: "Capabilities", header: "Capabilities", minWidth: 28, flex: true },
{ key: "Compatibility", header: "Compatibility", minWidth: 24, flex: true },
{ key: "Bundle", header: "Bundle", minWidth: 14, flex: true },
{ key: "Hooks", header: "Hooks", minWidth: 20, flex: true },
],
rows,
@@ -738,9 +741,9 @@ export function registerPluginsCli(program: Command) {
lines.push(
`${theme.muted("Legacy before_agent_start:")} ${inspect.usesLegacyBeforeAgentStart ? "yes" : "no"}`,
);
if ((inspect.plugin.bundleCapabilities?.length ?? 0) > 0) {
if (inspect.bundleCapabilities.length > 0) {
lines.push(
`${theme.muted("Bundle capabilities:")} ${inspect.plugin.bundleCapabilities?.join(", ")}`,
`${theme.muted("Bundle capabilities:")} ${inspect.bundleCapabilities.join(", ")}`,
);
}
lines.push(
@@ -785,6 +788,14 @@ export function registerPluginsCli(program: Command) {
lines.push(...formatInspectSection("CLI commands", inspect.cliCommands));
lines.push(...formatInspectSection("Services", inspect.services));
lines.push(...formatInspectSection("Gateway methods", inspect.gatewayMethods));
lines.push(
...formatInspectSection(
"MCP servers",
inspect.mcpServers.map((entry) =>
entry.hasStdioTransport ? entry.name : `${entry.name} (unsupported transport)`,
),
),
);
if (inspect.httpRouteCount > 0) {
lines.push(...formatInspectSection("HTTP routes", [String(inspect.httpRouteCount)]));
}