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:
@@ -145,6 +145,10 @@ pub struct Settings {
|
||||
/// registry. `enabled: false` turns the whole command off.
|
||||
#[serde(default)]
|
||||
pub ask: Option<AskSettings>,
|
||||
/// Community registry (issue #77): trusted catalog sources + the author
|
||||
/// name recorded by `am registry publish`.
|
||||
#[serde(default)]
|
||||
pub registry: Option<RegistrySettings>,
|
||||
/// Plugin scripts (issue #75): default timeout and enable list.
|
||||
#[serde(default)]
|
||||
pub plugins: Option<PluginSettings>,
|
||||
@@ -196,6 +200,18 @@ impl Default for AskSettings {
|
||||
}
|
||||
}
|
||||
|
||||
/// Community registry settings (issue #77).
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
#[serde(default)]
|
||||
pub struct RegistrySettings {
|
||||
/// Trusted catalog sources: their manifests are validated (checksum)
|
||||
/// and their agents searchable through `am registry search`.
|
||||
#[serde(default)]
|
||||
pub sources: Vec<String>,
|
||||
/// Author name recorded by `am registry publish` (default: "unknown").
|
||||
pub author: Option<String>,
|
||||
}
|
||||
|
||||
/// One entry of the LLM provider registry (issue #88).
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
@@ -904,6 +920,9 @@ pub fn merge(base: &mut Config, overlay: Config) {
|
||||
if o.ask.is_some() {
|
||||
s.ask = o.ask;
|
||||
}
|
||||
if o.registry.is_some() {
|
||||
s.registry = o.registry;
|
||||
}
|
||||
if o.plugins.is_some() {
|
||||
s.plugins = o.plugins;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user