Added cmd to validate bundled extensions json (#7217)

This commit is contained in:
Zane
2026-02-17 09:47:48 -08:00
committed by GitHub
parent ff3ad4349d
commit fea34accc2
4 changed files with 290 additions and 0 deletions
+18
View File
@@ -7,7 +7,10 @@ mod routes;
mod state;
mod tunnel;
use std::path::PathBuf;
use clap::{Parser, Subcommand};
use goose::agents::validate_extensions;
use goose::config::paths::Paths;
use goose_mcp::{
mcp_server_runner::{serve, McpCommand},
@@ -31,6 +34,12 @@ enum Commands {
#[arg(value_parser = clap::value_parser!(McpCommand))]
server: McpCommand,
},
/// Validate a bundled-extensions JSON file
#[command(name = "validate-extensions")]
ValidateExtensions {
/// Path to the bundled-extensions JSON file
path: PathBuf,
},
}
#[tokio::main]
@@ -59,6 +68,15 @@ async fn main() -> anyhow::Result<()> {
}
}
}
Commands::ValidateExtensions { path } => {
match validate_extensions::validate_bundled_extensions(&path) {
Ok(msg) => println!("{msg}"),
Err(e) => {
eprintln!("{e}");
std::process::exit(1);
}
}
}
}
Ok(())