From ff5c07a38ce2254e64bb1ddafffbd7a78c28d75b Mon Sep 17 00:00:00 2001 From: orion Date: Sat, 4 Apr 2026 07:28:32 +0000 Subject: [PATCH] fix: use explicit monitor repository url --- scripts/install.mjs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/install.mjs b/scripts/install.mjs index ec543d8..1f6a703 100644 --- a/scripts/install.mjs +++ b/scripts/install.mjs @@ -30,6 +30,7 @@ const PLUGIN_NAME = 'harbor-forge'; const OLD_PLUGIN_NAME = 'harborforge-monitor'; const PLUGIN_SRC_DIR = join(__dirname, 'plugin'); const SKILLS_SRC_DIR = join(__dirname, 'skills'); +const MONITOR_REPO_URL = 'https://git.hangman-lab.top/zhi/HarborForge.Monitor.git'; const args = process.argv.slice(2); const options = { @@ -182,15 +183,12 @@ async function build() { function installManagedMonitor(openclawPath) { if (options.installMonitor !== 'yes') return null; - const projectRoot = resolve(__dirname, '..'); - const gitRoot = exec('git config --get remote.origin.url', { cwd: projectRoot, silent: true }).trim(); - const monitorRepo = gitRoot.replace(/HarborForge\.OpenclawPlugin(\.git)?$/, 'HarborForge.Monitor.git'); const tmpDir = join('/tmp', `harborforge-monitor-${Date.now()}`); const monitorDestDir = join(openclawPath, 'plugins', PLUGIN_NAME, 'bin'); const binaryPath = join(monitorDestDir, 'HarborForge.Monitor'); mkdirSync(monitorDestDir, { recursive: true }); try { - exec(`git clone --branch ${shellEscape(options.monitorBranch)} ${shellEscape(monitorRepo)} ${shellEscape(tmpDir)}`, { silent: !options.verbose }); + exec(`git clone --branch ${shellEscape(options.monitorBranch)} ${shellEscape(MONITOR_REPO_URL)} ${shellEscape(tmpDir)}`, { silent: !options.verbose }); exec(`go build -o ${shellEscape(binaryPath)} ./cmd/harborforge-monitor`, { cwd: tmpDir, silent: !options.verbose }); chmodSync(binaryPath, 0o755); logOk(`Managed monitor installed → ${binaryPath} (branch hint: ${options.monitorBranch})`);