feat: event-driven parity, Windows shell detection, dirty build timestamps, and gatekeeper integration
This commit is contained in:
1 parent
64857f9d5e
commit
f4dcf3acbf
33 files changed
+3501
-143
No files matched your search
@@ -26,13 +26,21 @@ impl McpTool for EnvironmentHandler {
|
||||
match req.action {
|
||||
EnvAction::UpdateFingerprint => {
|
||||
let tool_versions = req.tool_versions.unwrap_or_default();
|
||||
let detected_os = req.os.unwrap_or_else(|| std::env::consts::OS.to_string());
|
||||
let detected_shell = req.shell
|
||||
.or_else(|| std::env::var("SHELL").ok())
|
||||
.or_else(|| std::env::var("STARSHIP_SHELL").ok())
|
||||
.or_else(|| if std::env::var("PSModulePath").is_ok() { Some("pwsh".to_string()) } else { None })
|
||||
.or_else(|| if std::env::var("COMSPEC").is_ok() { Some("cmd".to_string()) } else { None })
|
||||
.unwrap_or_else(|| "unknown".to_string());
|
||||
|
||||
state.env.env_fingerprints.modify(|fps| {
|
||||
fps.insert(
|
||||
ns.clone(),
|
||||
crate::models::EnvFingerprint {
|
||||
namespace: ns.clone(),
|
||||
os: std::env::consts::OS.to_string(),
|
||||
shell: std::env::var("SHELL").unwrap_or_else(|_| "unknown".to_string()),
|
||||
os: detected_os,
|
||||
shell: detected_shell,
|
||||
tool_versions,
|
||||
updated_at: crate::handlers::utils::now_secs(),
|
||||
..Default::default()
|
||||
|
||||
Reference in new issue
Block a user