feat(telemetry): report openclaw and plugin versions separately
- Report remote OpenClaw CLI version as openclaw_version - Report harborforge-monitor plugin version as plugin_version - Pass plugin version from plugin runtime to sidecar - Read live config via api.pluginConfig/api.config helper
This commit is contained in:
23
plugin/core/live-config.js
Normal file
23
plugin/core/live-config.js
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getLivePluginConfig = getLivePluginConfig;
|
||||
function getLivePluginConfig(api, fallback) {
|
||||
const root = api.config || {};
|
||||
const plugins = root.plugins || {};
|
||||
const entries = plugins.entries || {};
|
||||
const entry = entries['harborforge-monitor'] || {};
|
||||
const cfg = entry.config || {};
|
||||
if (Object.keys(cfg).length > 0 || Object.keys(entry).length > 0) {
|
||||
return {
|
||||
...fallback,
|
||||
...cfg,
|
||||
enabled: typeof cfg.enabled === 'boolean'
|
||||
? cfg.enabled
|
||||
: typeof entry.enabled === 'boolean'
|
||||
? entry.enabled
|
||||
: fallback.enabled,
|
||||
};
|
||||
}
|
||||
return fallback;
|
||||
}
|
||||
//# sourceMappingURL=live-config.js.map
|
||||
Reference in New Issue
Block a user