feat: Secret injection as environment variables into agent tools

This commit is contained in:
2025-11-03 15:10:34 -07:00
parent 474c5bc76f
commit 843abe0621
3 changed files with 29 additions and 13 deletions
+4 -2
View File
@@ -12,16 +12,18 @@ use fancy_regex::Regex;
use gman::providers::local::LocalProvider;
use gman::providers::SecretProvider;
use inquire::{required, Password, PasswordDisplayMode};
use std::sync::LazyLock;
use std::sync::{Arc, LazyLock};
use tokio::runtime::Handle;
static SECRET_RE: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"\{\{(.+)}}").unwrap());
pub static SECRET_RE: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"\{\{(.+)}}").unwrap());
#[derive(Debug, Default, Clone)]
pub struct Vault {
local_provider: LocalProvider,
}
pub type GlobalVault = Arc<Vault>;
impl Vault {
pub fn init_bare() -> Self {
let vault_password_file = Config::default().vault_password_file();