Compare commits
3 Commits
25593037f6
...
d494f8825f
| Author | SHA1 | Date | |
|---|---|---|---|
|
d494f8825f
|
|||
|
5e8194d271
|
|||
|
b40ae70084
|
@@ -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};
|
use crate::config::{InstallFilter, paths};
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
use crate::function::Language;
|
use crate::function::Language;
|
||||||
@@ -12,6 +5,13 @@ use crate::mcp::{McpServer, McpServersConfig};
|
|||||||
use crate::utils;
|
use crate::utils;
|
||||||
use crate::utils::IS_STDOUT_TERMINAL;
|
use crate::utils::IS_STDOUT_TERMINAL;
|
||||||
use crate::vault::{Vault, create_vault_password_file, interpolate_secrets};
|
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<()> {
|
pub fn install_remote(git_url: &str, filter: Option<InstallFilter>, force: bool) -> Result<()> {
|
||||||
let (url, reference) = parse_url_with_ref(git_url)?;
|
let (url, reference) = parse_url_with_ref(git_url)?;
|
||||||
@@ -732,7 +732,20 @@ fn merge_mcp_json(
|
|||||||
write_atomically(&final_path, &serialized)?;
|
write_atomically(&final_path, &serialized)?;
|
||||||
|
|
||||||
let vault = Vault::init_bare()?;
|
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();
|
let mut deduped: Vec<String> = Vec::new();
|
||||||
for s in missing {
|
for s in missing {
|
||||||
if !deduped.contains(&s) {
|
if !deduped.contains(&s) {
|
||||||
|
|||||||
@@ -205,7 +205,12 @@ impl GraphValidator {
|
|||||||
.and_then(|c| c.app_config.visible_skills.as_deref());
|
.and_then(|c| c.app_config.visible_skills.as_deref());
|
||||||
|
|
||||||
let skill_exists = self.skill_exists;
|
let skill_exists = self.skill_exists;
|
||||||
|
let has_agent_ctx = self.agent_ctx.is_some();
|
||||||
let check_visibility = |name: &str| -> Option<String> {
|
let check_visibility = |name: &str| -> Option<String> {
|
||||||
|
if !has_agent_ctx {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
match visible_skills {
|
match visible_skills {
|
||||||
Some(list) if !list.iter().any(|s| s == name) => Some(format!(
|
Some(list) if !list.iter().any(|s| s == name) => Some(format!(
|
||||||
"'{name}' is not in the global 'visible_skills' allow-list"
|
"'{name}' is not in the global 'visible_skills' allow-list"
|
||||||
|
|||||||
Reference in New Issue
Block a user