From 1436684a6de8666aba11fdbfb6411d3928263296 Mon Sep 17 00:00:00 2001 From: Clawdio Date: Tue, 24 Mar 2026 19:28:57 +0000 Subject: [PATCH 1/2] feat: embed fawxai public key + point registry to fawxai/registry - Bundles the official fawxai Ed25519 public key so skill install works out of the box without manual key setup - Updates registry URL from fawxai/fawx-skills to fawxai/registry - Users can still add third-party publisher keys in ~/.fawx/trusted_keys/ - Fixes stale registry name in search output --- .../crates/fx-cli/src/commands/marketplace.rs | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/engine/crates/fx-cli/src/commands/marketplace.rs b/engine/crates/fx-cli/src/commands/marketplace.rs index b1b353ab..cb118d93 100644 --- a/engine/crates/fx-cli/src/commands/marketplace.rs +++ b/engine/crates/fx-cli/src/commands/marketplace.rs @@ -5,7 +5,13 @@ use std::path::{Path, PathBuf}; use fx_marketplace::{InstalledSkill, RegistryConfig, SkillEntry}; /// Default registry URL (raw GitHub content). -const DEFAULT_REGISTRY: &str = "https://raw.githubusercontent.com/fawxai/fawx-skills/main"; +const DEFAULT_REGISTRY: &str = "https://raw.githubusercontent.com/fawxai/registry/main"; + +/// Official fawxai publisher Ed25519 public key (32 bytes). +const FAWXAI_PUBLIC_KEY: [u8; 32] = [ + 62, 38, 70, 230, 12, 59, 226, 179, 11, 150, 52, 48, 238, 181, 159, 188, + 106, 55, 109, 208, 1, 191, 157, 233, 161, 111, 154, 212, 209, 133, 28, 68, +]; /// Resolve the Fawx data directory (`~/.fawx`). fn data_dir() -> anyhow::Result { @@ -15,15 +21,14 @@ fn data_dir() -> anyhow::Result { /// Load trusted keys from `~/.fawx/trusted_keys/`. fn load_trusted_keys(data: &Path) -> anyhow::Result>> { + let mut keys = vec![FAWXAI_PUBLIC_KEY.to_vec()]; let keys_dir = data.join("trusted_keys"); - if !keys_dir.exists() { - return Ok(Vec::new()); - } - let mut keys = Vec::new(); - for entry in std::fs::read_dir(&keys_dir)? { - let path = entry?.path(); - if path.is_file() { - keys.push(std::fs::read(&path)?); + if keys_dir.exists() { + for entry in std::fs::read_dir(&keys_dir)? { + let path = entry?.path(); + if path.is_file() { + keys.push(std::fs::read(&path)?); + } } } Ok(keys) From a463cf0f546010e23a4e201c0d811c05ab13eeb8 Mon Sep 17 00:00:00 2001 From: Clawdio Date: Tue, 24 Mar 2026 19:47:55 +0000 Subject: [PATCH 2/2] style: cargo fmt --- engine/crates/fx-cli/src/commands/marketplace.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/crates/fx-cli/src/commands/marketplace.rs b/engine/crates/fx-cli/src/commands/marketplace.rs index cb118d93..4165184f 100644 --- a/engine/crates/fx-cli/src/commands/marketplace.rs +++ b/engine/crates/fx-cli/src/commands/marketplace.rs @@ -9,8 +9,8 @@ const DEFAULT_REGISTRY: &str = "https://raw.githubusercontent.com/fawxai/registr /// Official fawxai publisher Ed25519 public key (32 bytes). const FAWXAI_PUBLIC_KEY: [u8; 32] = [ - 62, 38, 70, 230, 12, 59, 226, 179, 11, 150, 52, 48, 238, 181, 159, 188, - 106, 55, 109, 208, 1, 191, 157, 233, 161, 111, 154, 212, 209, 133, 28, 68, + 62, 38, 70, 230, 12, 59, 226, 179, 11, 150, 52, 48, 238, 181, 159, 188, 106, 55, 109, 208, 1, + 191, 157, 233, 161, 111, 154, 212, 209, 133, 28, 68, ]; /// Resolve the Fawx data directory (`~/.fawx`).