feat: v1.0 — am registry : registre communautaire de catalogues (publication + recherche sur Gitea), manifeste source/version/auteur/sha256, installation avec validation du checksum et décision de confiance explicite (closes #77)
- src/registry.rs : Manifest (schema/name/version/author/source/agents_count/sha256), publish (écrit am-manifest.json + instructions git), search (multi-sources via settings.registry.sources), install (manifeste → catalogue → sha256 → source cohérente → confiance → register_include), list
- settings.registry {sources, author} + doc config.yaml ; CLI/REPL/help/man/i18n
- 11 tests : hash, manifest_url, publish (fichier + refus catalogue vide/sans source), E2E install tiny_http (refus sans confiance, enregistrement avec --yes, 4 requêtes), source mismatch
This commit is contained in:
@@ -26,6 +26,7 @@ pub mod migrate_cmd;
|
||||
pub mod open_cmd;
|
||||
pub mod profile_cmd;
|
||||
pub mod projects_cmd;
|
||||
pub mod registry_cmd;
|
||||
pub mod run_cmd;
|
||||
pub mod schedule_cmd;
|
||||
pub mod search_cmd;
|
||||
@@ -99,6 +100,7 @@ pub fn execute_command(app: &App, cmd: &Command) -> Result<i32> {
|
||||
Command::Alias(sub) => alias_cmd::run(app, sub),
|
||||
Command::Secret(sub) => secret_cmd::run(app, sub),
|
||||
Command::Models(args) => models_cmd::run(app, args),
|
||||
Command::Registry(args) => registry_cmd::run(app, args.sub.as_ref()),
|
||||
Command::Catalog(sub) => catalog_cmd::run(app, sub),
|
||||
Command::Providers(args) => providers_cmd::run(app, args.sub.as_ref()),
|
||||
Command::Suggest { words } => suggest_cmd::run(app, &words.join(" ")),
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
//! am registry — community registry of agent catalogs (issue #77).
|
||||
//! publish (manifest), search (across settings.registry.sources),
|
||||
//! install (manifest + checksum + explicit trust), list.
|
||||
|
||||
use crate::app::App;
|
||||
use anyhow::Result;
|
||||
|
||||
pub fn run(app: &App, sub: Option<&crate::cli::RegistryCmd>) -> Result<i32> {
|
||||
match sub {
|
||||
None => crate::registry::list(app),
|
||||
Some(crate::cli::RegistryCmd::List) => crate::registry::list(app),
|
||||
Some(crate::cli::RegistryCmd::Publish {
|
||||
catalog,
|
||||
source,
|
||||
author,
|
||||
version,
|
||||
}) => crate::registry::publish(
|
||||
app,
|
||||
catalog,
|
||||
source.as_deref(),
|
||||
author.as_deref(),
|
||||
version.as_deref(),
|
||||
),
|
||||
Some(crate::cli::RegistryCmd::Search { query }) => crate::registry::search(app, query),
|
||||
Some(crate::cli::RegistryCmd::Install { url, yes }) => {
|
||||
crate::registry::install(app, url, *yes)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user