From eb43434e488c0e73c880bbee65baf891b1875c38 Mon Sep 17 00:00:00 2001 From: zhi Date: Fri, 20 Mar 2026 06:24:40 +0000 Subject: [PATCH] fix(plugin): correct telemetry server path for installed plugin - Resolve telemetry.mjs relative to installed plugin root - Update installer messaging from challengeUuid to apiKey - Document correct OpenClaw plugin entry config structure --- plugin/index.ts | 2 +- scripts/install.mjs | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/plugin/index.ts b/plugin/index.ts index 98a9659..c082198 100644 --- a/plugin/index.ts +++ b/plugin/index.ts @@ -48,7 +48,7 @@ export default function register(api: PluginAPI, config: PluginConfig) { logger.warn('API authentication will fail. Generate apiKey from HarborForge Monitor admin.'); } - const serverPath = join(__dirname, '..', 'server', 'telemetry.mjs'); + const serverPath = join(__dirname, 'server', 'telemetry.mjs'); if (!existsSync(serverPath)) { logger.error('Telemetry server not found:', serverPath); diff --git a/scripts/install.mjs b/scripts/install.mjs index a66e003..e343d54 100644 --- a/scripts/install.mjs +++ b/scripts/install.mjs @@ -240,8 +240,8 @@ async function configure() { } logOk(`plugins.allow includes ${PLUGIN_NAME}`); - // Note: challengeUuid must be configured manually by user - logOk('Plugin configured (remember to set challengeUuid in ~/.openclaw/openclaw.json)'); + // Note: apiKey must be configured manually by user + logOk('Plugin configured (remember to set apiKey in plugins.entries.harborforge-monitor.config)'); } catch (err) { logWarn(`Config failed: ${err.message}`); @@ -262,13 +262,18 @@ function summary() { console.log(''); log('Next steps:', 'blue'); - log(' 1. Register server in HarborForge Monitor to get challengeUuid', 'cyan'); - log(' 2. Edit ~/.openclaw/openclaw.json:', 'cyan'); + log(' 1. Register server in HarborForge Monitor to get apiKey', 'cyan'); + log(' 2. Edit ~/.openclaw/openclaw.json under plugins.entries.harborforge-monitor.config:', 'cyan'); log(' {', 'cyan'); log(' "plugins": {', 'cyan'); - log(' "harborforge-monitor": {', 'cyan'); - log(' "enabled": true,', 'cyan'); - log(' "challengeUuid": "your-challenge-uuid"', 'cyan'); + log(' "entries": {', 'cyan'); + log(' "harborforge-monitor": {', 'cyan'); + log(' "enabled": true,', 'cyan'); + log(' "config": {', 'cyan'); + log(' "enabled": true,', 'cyan'); + log(' "apiKey": "your-api-key"', 'cyan'); + log(' }', 'cyan'); + log(' }', 'cyan'); log(' }', 'cyan'); log(' }', 'cyan'); log(' }', 'cyan');