Merge pull request 'fix: align no-reply-api install path with plugin runtime expectation' (#15) from fix/no-reply-api-install-path into feat/split-tools-and-mention-override

Reviewed-on: #15
This commit was merged in pull request #15.
This commit is contained in:
h z
2026-03-07 19:24:26 +00:00

View File

@@ -133,7 +133,7 @@ function syncDir(srcDir, destDir) {
// ── Determine plugin install path ───────────────────────────────────────── // ── Determine plugin install path ─────────────────────────────────────────
const PLUGINS_DIR = path.join(OPENCLAW_DIR, "plugins"); const PLUGINS_DIR = path.join(OPENCLAW_DIR, "plugins");
const PLUGIN_INSTALL_DIR = path.join(PLUGINS_DIR, "dirigent"); const PLUGIN_INSTALL_DIR = path.join(PLUGINS_DIR, "dirigent");
const NO_REPLY_INSTALL_DIR = path.join(PLUGINS_DIR, "dirigent-no-reply-api"); const NO_REPLY_INSTALL_DIR = path.join(PLUGINS_DIR, "no-reply-api");
// ── Config helpers ──────────────────────────────────────────────────────── // ── Config helpers ────────────────────────────────────────────────────────
const NO_REPLY_PROVIDER_ID = env.NO_REPLY_PROVIDER_ID || "dirigentway"; const NO_REPLY_PROVIDER_ID = env.NO_REPLY_PROVIDER_ID || "dirigentway";
@@ -448,11 +448,17 @@ else if (mode === "uninstall") {
console.log(`[dirigent] removed plugin dir: ${installedPluginDir}`); console.log(`[dirigent] removed plugin dir: ${installedPluginDir}`);
} }
// Also remove no-reply-api dir // Also remove no-reply-api dir
const noReplyDir = path.join(path.dirname(installedPluginDir), "dirigent-no-reply-api"); const noReplyDir = path.join(path.dirname(installedPluginDir), "no-reply-api");
if (fs.existsSync(noReplyDir)) { if (fs.existsSync(noReplyDir)) {
fs.rmSync(noReplyDir, { recursive: true, force: true }); fs.rmSync(noReplyDir, { recursive: true, force: true });
console.log(`[dirigent] removed no-reply-api dir: ${noReplyDir}`); console.log(`[dirigent] removed no-reply-api dir: ${noReplyDir}`);
} }
// Backward-compat cleanup for older mistaken install path
const legacyNoReplyDir = path.join(path.dirname(installedPluginDir), "dirigent-no-reply-api");
if (fs.existsSync(legacyNoReplyDir)) {
fs.rmSync(legacyNoReplyDir, { recursive: true, force: true });
console.log(`[dirigent] removed legacy no-reply-api dir: ${legacyNoReplyDir}`);
}
writeRecord("uninstall", delta); writeRecord("uninstall", delta);
console.log("[dirigent] uninstall ok"); console.log("[dirigent] uninstall ok");