aboutsummaryrefslogtreecommitdiff
path: root/src/integration/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/integration/mod.rs')
-rw-r--r--src/integration/mod.rs50
1 files changed, 41 insertions, 9 deletions
diff --git a/src/integration/mod.rs b/src/integration/mod.rs
index 8be54c84..89d4d34d 100644
--- a/src/integration/mod.rs
+++ b/src/integration/mod.rs
@@ -114,8 +114,16 @@ const COPILOT_REMOVED_LIFECYCLE_HOOK_EVENTS: [&str; 9] = [
"notification",
"sessionStart",
];
-const DEVIN_HOOK_INSTALL_NAME: &str = "herdr-agent-state.sh";
-const DEVIN_HOOK_ASSET: &str = include_str!("assets/devin/herdr-agent-state.sh");
+const DEVIN_HOOK_INSTALL_NAME: &str = if cfg!(windows) {
+ "herdr-agent-state.ps1"
+} else {
+ "herdr-agent-state.sh"
+};
+const DEVIN_HOOK_ASSET: &str = if cfg!(windows) {
+ include_str!("assets/devin/herdr-agent-state.ps1")
+} else {
+ include_str!("assets/devin/herdr-agent-state.sh")
+};
const DEVIN_INTEGRATION_VERSION: u32 = 2;
const DEVIN_HOOK_EVENTS: [(&str, &str); 6] = [
("SessionStart", "session"),
@@ -167,7 +175,7 @@ const HERMES_PLUGIN_MANIFEST_INSTALL_NAME: &str = "plugin.yaml";
const HERMES_PLUGIN_INIT_INSTALL_NAME: &str = "__init__.py";
const HERMES_PLUGIN_MANIFEST_ASSET: &str = include_str!("assets/hermes/plugin.yaml");
const HERMES_PLUGIN_INIT_ASSET: &str = include_str!("assets/hermes/__init__.py");
-const HERMES_INTEGRATION_VERSION: u32 = 4;
+const HERMES_INTEGRATION_VERSION: u32 = 5;
const QODERCLI_HOOK_INSTALL_NAME: &str = if cfg!(windows) {
"herdr-agent-state.ps1"
} else {
@@ -194,8 +202,16 @@ const QODERCLI_REMOVED_LIFECYCLE_HOOK_EVENTS: [(&str, &str); 12] = [
("Stop", "idle"),
("SessionEnd", "release"),
];
-const CURSOR_HOOK_INSTALL_NAME: &str = "herdr-agent-state.sh";
-const CURSOR_HOOK_ASSET: &str = include_str!("assets/cursor/herdr-agent-state.sh");
+const CURSOR_HOOK_INSTALL_NAME: &str = if cfg!(windows) {
+ "herdr-agent-state.ps1"
+} else {
+ "herdr-agent-state.sh"
+};
+const CURSOR_HOOK_ASSET: &str = if cfg!(windows) {
+ include_str!("assets/cursor/herdr-agent-state.ps1")
+} else {
+ include_str!("assets/cursor/herdr-agent-state.sh")
+};
const CURSOR_INTEGRATION_VERSION: u32 = 1;
#[cfg(windows)]
const ANTIGRAVITY_CLI_HOOK_INSTALL_NAME: &str = "herdr-agent-state.ps1";
@@ -223,8 +239,16 @@ const ANTIGRAVITY_CLI_HOOK_TIMEOUT_SEC: u64 = 10;
/// invalidate the whole file.
const ANTIGRAVITY_CLI_HOOK_EVENTS: [(&str, &str); 1] = [("PreInvocation", "session")];
const INTEGRATION_VERSION_MARKER: &str = "HERDR_INTEGRATION_VERSION=";
-const MASTRACODE_HOOK_INSTALL_NAME: &str = "herdr-agent-state.sh";
-const MASTRACODE_HOOK_ASSET: &str = include_str!("assets/mastracode/herdr-agent-state.sh");
+const MASTRACODE_HOOK_INSTALL_NAME: &str = if cfg!(windows) {
+ "herdr-agent-state.ps1"
+} else {
+ "herdr-agent-state.sh"
+};
+const MASTRACODE_HOOK_ASSET: &str = if cfg!(windows) {
+ include_str!("assets/mastracode/herdr-agent-state.ps1")
+} else {
+ include_str!("assets/mastracode/herdr-agent-state.sh")
+};
const MASTRACODE_INTEGRATION_VERSION: u32 = 2;
const MASTRACODE_HOOK_TIMEOUT_MS: u64 = 10_000;
const MASTRACODE_REMOVED_HOOK_EVENTS: [(&str, &str); 2] =
@@ -242,9 +266,17 @@ const MASTRACODE_HOOK_EVENTS: [(&str, &str); 11] = [
("AgentEnd", "idle"),
("Stop", "idle"),
];
-const GROK_HOOK_INSTALL_NAME: &str = "herdr-agent-state.sh";
+const GROK_HOOK_INSTALL_NAME: &str = if cfg!(windows) {
+ "herdr-agent-state.ps1"
+} else {
+ "herdr-agent-state.sh"
+};
const GROK_HOOK_CONFIG_INSTALL_NAME: &str = "herdr.json";
-const GROK_HOOK_ASSET: &str = include_str!("assets/grok/herdr-agent-state.sh");
+const GROK_HOOK_ASSET: &str = if cfg!(windows) {
+ include_str!("assets/grok/herdr-agent-state.ps1")
+} else {
+ include_str!("assets/grok/herdr-agent-state.sh")
+};
const GROK_INTEGRATION_VERSION: u32 = 1;
pub(crate) const INSTALL_WARNING_PREFIX: &str = "warning:";