Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

fix(setup-agent): name generated Pi family extensions

AkitaOnRails3d4bcf0772e4
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bebfccc1..49528ce1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,8 +12,9 @@ version in [`docs/changelog/`](docs/changelog/):
## [Unreleased]
### Fixed
-- Corrected Pi MCP setup guidance to name `ai-memory-pi.ts` and describe its
- location when `PI_CODING_AGENT_DIR` is set.
+- Corrected Pi MCP/setup-agent guidance to name `ai-memory-pi.ts`, described
+ its location when `PI_CODING_AGENT_DIR` is set, and corrected OMP's
+ setup-agent hint to name `ai-memory-omp.ts`.
([#1446](https://github.com/akitaonrails/ai-memory/pull/1446))
- Routed OpenCode's `claude-haiku-5-5` through the Anthropic Messages API for
both Go and Zen instead of the unsupported Chat Completions protocol.
diff --git a/crates/ai-memory-cli/src/commands/setup_agent.rs b/crates/ai-memory-cli/src/commands/setup_agent.rs
index 803134c4..4bf1cc5b 100644
--- a/crates/ai-memory-cli/src/commands/setup_agent.rs
+++ b/crates/ai-memory-cli/src/commands/setup_agent.rs
@@ -435,8 +435,10 @@ fn normalise_hook_server_url(url: &str) -> String {
url.trim().trim_end_matches('/').to_string()
}
-fn emit_extension_setup_hint(config: &Config, args: &SetupAgentArgs) -> Result<()> {
- let (label, agent, restart_note, mcp_client) = match args.agent {
+fn extension_setup_metadata(
+ agent: AgentChoice,
+) -> Result<(&'static str, &'static str, &'static str, &'static str)> {
+ Ok(match agent {
AgentChoice::OpenCode => (
"OpenCode",
"opencode",
@@ -452,13 +454,13 @@ fn emit_extension_setup_hint(config: &Config, args: &SetupAgentArgs) -> Result<(
AgentChoice::Omp => (
"OMP",
"omp",
- "Then restart OMP so it loads ~/.omp/agent/extensions/ai-memory.ts.",
+ "Then restart OMP so it loads ~/.omp/agent/extensions/ai-memory-omp.ts.",
"omp",
),
AgentChoice::Pi => (
"Pi",
"pi",
- "Then restart Pi so it loads ~/.pi/agent/extensions/ai-memory.ts.",
+ "Then restart Pi so it loads ~/.pi/agent/extensions/ai-memory-pi.ts.",
"pi",
),
AgentChoice::Openclaw => (
@@ -468,7 +470,11 @@ fn emit_extension_setup_hint(config: &Config, args: &SetupAgentArgs) -> Result<(
"openclaw",
),
other => bail!("internal: {other:?} is not a generated-integration agent"),
- };
+ })
+}
+
+fn emit_extension_setup_hint(config: &Config, args: &SetupAgentArgs) -> Result<()> {
+ let (label, agent, restart_note, mcp_client) = extension_setup_metadata(args.agent)?;
println!("# {label} uses a TypeScript extension/plugin, not extracted shell scripts.");
println!(
"# Capture-policy capability v1 requires a freshly generated integration; re-run --apply after upgrades."
@@ -939,6 +945,17 @@ mod tests {
assert!(!tmp.path().join("hooks").exists());
}
+ #[test]
+ fn pi_family_setup_hints_name_the_installed_extension_files() {
+ let (_, _, omp_note, _) = extension_setup_metadata(AgentChoice::Omp).unwrap();
+ let (_, _, pi_note, _) = extension_setup_metadata(AgentChoice::Pi).unwrap();
+
+ assert!(omp_note.ends_with("/.omp/agent/extensions/ai-memory-omp.ts."));
+ assert!(pi_note.ends_with("/.pi/agent/extensions/ai-memory-pi.ts."));
+ assert!(!omp_note.ends_with("/ai-memory.ts."));
+ assert!(!pi_note.ends_with("/ai-memory.ts."));
+ }
+
#[test]
fn devin_setup_emits_script_hook_config() {
let args = SetupAgentArgs {