aboutsummaryrefslogtreecommitdiff
path: root/src/integration/actions.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-13 18:36:47 +0300
committerGitHub <noreply@github.com>2026-09-13 17:36:47 +0200
commitfc1cb77f0572948552377b23f7754a3016ac7dfa (patch)
tree5412b796aaaa00894fe628b2ffed8d747e6f452d /src/integration/actions.rs
parent3be35231497f33f38aeffd84df02642479995bc6 (diff)
feat: add Letta Code detection and restore (#3107)
refs #3106 Co-authored-by: Cameron <cameron@pfiffer.org>
Diffstat (limited to 'src/integration/actions.rs')
-rw-r--r--src/integration/actions.rs61
1 files changed, 57 insertions, 4 deletions
diff --git a/src/integration/actions.rs b/src/integration/actions.rs
index e8b3ab63..d51682f8 100644
--- a/src/integration/actions.rs
+++ b/src/integration/actions.rs
@@ -4,11 +4,11 @@ use super::registry::{integration_target_label, integration_target_supported};
use super::targets::{
install_antigravity_cli, install_claude, install_codex, install_copilot, install_cursor,
install_devin, install_droid, install_grok, install_hermes, install_kilo, install_kimi,
- install_mastracode, install_omp, install_opencode, install_pi, install_qodercli, install_qwen,
- uninstall_antigravity_cli, uninstall_claude, uninstall_codex, uninstall_copilot,
+ install_letta, install_mastracode, install_omp, install_opencode, install_pi, install_qodercli,
+ install_qwen, uninstall_antigravity_cli, uninstall_claude, uninstall_codex, uninstall_copilot,
uninstall_cursor, uninstall_devin, uninstall_droid, uninstall_grok, uninstall_hermes,
- uninstall_kilo, uninstall_kimi, uninstall_mastracode, uninstall_omp, uninstall_opencode,
- uninstall_pi, uninstall_qodercli, uninstall_qwen,
+ uninstall_kilo, uninstall_kimi, uninstall_letta, uninstall_mastracode, uninstall_omp,
+ uninstall_opencode, uninstall_pi, uninstall_qodercli, uninstall_qwen,
};
use super::version::{agent_version_requirement, enforce_agent_version};
use super::{KIMI_MIN_VERSION, PI_EXTENSION_INSTALL_NAME};
@@ -22,6 +22,59 @@ pub(crate) fn install_target(
result
}
+/// Experimental Letta install that bypasses the frozen client endpoint
+/// `IntegrationTarget` enum. Fold into the agent registry when it lands.
+pub(crate) fn install_experimental_letta() -> io::Result<Vec<String>> {
+ let result = install_letta().map(|installed| {
+ vec![
+ format!(
+ "installed letta integration hook to {}",
+ installed.hook_path.display()
+ ),
+ format!(
+ "ensured letta settings at {}",
+ installed.settings_path.display()
+ ),
+ ]
+ });
+ let outcome = if result.is_ok() { "ok" } else { "error" };
+ crate::logging::integration_action("install", "letta", outcome);
+ result
+}
+
+/// Experimental Letta uninstall counterpart.
+pub(crate) fn uninstall_experimental_letta() -> io::Result<Vec<String>> {
+ let result = uninstall_letta().map(|result| {
+ let mut messages = Vec::new();
+ if result.removed_hook_file {
+ messages.push(format!(
+ "removed letta hook at {}",
+ result.hook_path.display()
+ ));
+ } else {
+ messages.push(format!(
+ "no letta hook found at {}",
+ result.hook_path.display()
+ ));
+ }
+ if result.updated_settings {
+ messages.push(format!(
+ "removed herdr letta hook entry from {}",
+ result.settings_path.display()
+ ));
+ } else {
+ messages.push(format!(
+ "no herdr letta hook entry found in {}",
+ result.settings_path.display()
+ ));
+ }
+ messages
+ });
+ let outcome = if result.is_ok() { "ok" } else { "error" };
+ crate::logging::integration_action("uninstall", "letta", outcome);
+ result
+}
+
fn install_target_inner(target: crate::api::schema::IntegrationTarget) -> io::Result<Vec<String>> {
if !integration_target_supported(target) {
return Err(io::Error::other(format!(