3 Commits

2 changed files with 26 additions and 8 deletions
+21 -8
View File
@@ -1,10 +1,3 @@
use anyhow::{Context, Result, bail};
use indexmap::IndexMap;
use inquire::{Confirm, Select};
use std::ffi::{OsStr, OsString};
use std::fs;
use std::path::{Path, PathBuf};
use crate::config::{InstallFilter, paths};
#[cfg(not(windows))]
use crate::function::Language;
@@ -12,6 +5,13 @@ use crate::mcp::{McpServer, McpServersConfig};
use crate::utils;
use crate::utils::IS_STDOUT_TERMINAL;
use crate::vault::{Vault, create_vault_password_file, interpolate_secrets};
use anyhow::{Context, Result, bail};
use indexmap::IndexMap;
use indoc::formatdoc;
use inquire::{Confirm, Select};
use std::ffi::{OsStr, OsString};
use std::fs;
use std::path::{Path, PathBuf};
pub fn install_remote(git_url: &str, filter: Option<InstallFilter>, force: bool) -> Result<()> {
let (url, reference) = parse_url_with_ref(git_url)?;
@@ -732,7 +732,20 @@ fn merge_mcp_json(
write_atomically(&final_path, &serialized)?;
let vault = Vault::init_bare()?;
let (_parsed, missing) = interpolate_secrets(&serialized, &vault)?;
let missing = match interpolate_secrets(&serialized, &vault) {
Ok((_, missing)) => missing,
Err(e) => {
eprintln!(
"{}",
formatdoc! {"
Skipping secret resolution for merged mcp.json: {e:#}
Continuing without resolving missing secrets
You may need to add any additional missing secrets to the vault manually.
"}
);
Vec::new()
}
};
let mut deduped: Vec<String> = Vec::new();
for s in missing {
if !deduped.contains(&s) {
+5
View File
@@ -205,7 +205,12 @@ impl GraphValidator {
.and_then(|c| c.app_config.visible_skills.as_deref());
let skill_exists = self.skill_exists;
let has_agent_ctx = self.agent_ctx.is_some();
let check_visibility = |name: &str| -> Option<String> {
if !has_agent_ctx {
return None;
}
match visible_skills {
Some(list) if !list.iter().any(|s| s == name) => Some(format!(
"'{name}' is not in the global 'visible_skills' allow-list"