From fbd20ad6e488fb3b9efc1612fdffee6e672976c1 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 14 Jun 2026 02:43:45 +0300 Subject: feat: add plugin v1 system Add manifest-driven plugin actions, event hooks, pane entrypoints, link handlers, and host APIs. Support plugin link, GitHub install, build commands, installed plugin registry, pane movement, runtime context, and plugin docs. --- src/app/api/plugins/env.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/app/api/plugins/env.rs (limited to 'src/app/api/plugins/env.rs') diff --git a/src/app/api/plugins/env.rs b/src/app/api/plugins/env.rs new file mode 100644 index 00000000..13644a19 --- /dev/null +++ b/src/app/api/plugins/env.rs @@ -0,0 +1,19 @@ +use crate::api::schema::InstalledPluginInfo; + +pub(super) fn plugin_path_env(plugin: &InstalledPluginInfo) -> Vec<(String, String)> { + let component = crate::api::schema::plugin_managed_path_component(&plugin.plugin_id); + let config_dir = crate::config::config_dir().join("plugins").join(&component); + let state_dir = crate::config::state_dir().join("plugins").join(component); + + vec![ + ("HERDR_PLUGIN_ROOT".to_string(), plugin.plugin_root.clone()), + ( + "HERDR_PLUGIN_CONFIG_DIR".to_string(), + config_dir.display().to_string(), + ), + ( + "HERDR_PLUGIN_STATE_DIR".to_string(), + state_dir.display().to_string(), + ), + ] +} -- cgit v1.2.3