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:
+45
@@ -189,6 +189,9 @@ pub enum Command {
|
||||
Schedule(ScheduleCmd),
|
||||
/// List local models (ollama, llama.cpp, LM Studio) and prune unused ones
|
||||
Models(ModelsArgs),
|
||||
/// Community registry (issue #77): publish, search and install agent
|
||||
/// catalogs hosted on Gitea.
|
||||
Registry(RegistryArgs),
|
||||
/// Manage remote catalogs: update the official one, add external ones
|
||||
#[command(subcommand)]
|
||||
Catalog(CatalogCmd),
|
||||
@@ -628,6 +631,48 @@ pub struct LabArgs {
|
||||
pub list: bool,
|
||||
}
|
||||
|
||||
/// Arguments of the registry command (issue #77).
|
||||
#[derive(Args, Debug, Clone, Default)]
|
||||
pub struct RegistryArgs {
|
||||
#[command(subcommand)]
|
||||
pub sub: Option<RegistryCmd>,
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Debug, Clone)]
|
||||
pub enum RegistryCmd {
|
||||
/// Prepare a catalog + manifest (source, version, author, sha256) for
|
||||
/// publication on Gitea
|
||||
Publish {
|
||||
/// Path of the catalog YAML file
|
||||
catalog: PathBuf,
|
||||
/// Public URL of the catalog once pushed (recorded in the manifest)
|
||||
#[arg(long)]
|
||||
source: Option<String>,
|
||||
/// Author name recorded in the manifest
|
||||
#[arg(long)]
|
||||
author: Option<String>,
|
||||
/// Catalog version (default 1.0.0)
|
||||
#[arg(long)]
|
||||
version: Option<String>,
|
||||
},
|
||||
/// Search agents across the registered sources (settings.registry.sources)
|
||||
Search {
|
||||
/// Free-form keyword (agent name, description or tag)
|
||||
query: String,
|
||||
},
|
||||
/// Install a catalog from the registry: manifest + checksum validation,
|
||||
/// then an explicit trust decision for unknown sources
|
||||
Install {
|
||||
/// Catalog URL
|
||||
url: String,
|
||||
/// Skip the trust confirmation
|
||||
#[arg(long)]
|
||||
yes: bool,
|
||||
},
|
||||
/// List the registered sources
|
||||
List,
|
||||
}
|
||||
|
||||
/// Arguments of the plugins command (issue #75).
|
||||
#[derive(Args, Debug, Clone, Default)]
|
||||
pub struct PluginsArgs {
|
||||
|
||||
Reference in New Issue
Block a user