From 2088cd12b4e5ef1334b7e0ea48c9e5566f438f45 Mon Sep 17 00:00:00 2001 From: operator Date: Thu, 16 Apr 2026 15:12:35 +0000 Subject: [PATCH] fix: use OPENCLAW_SERVICE_VERSION for real version and increase agent list timeout api.version returns plugin API version (0.2.0), not the openclaw release version. Use OPENCLAW_SERVICE_VERSION env var set by the gateway instead. Also increase listOpenClawAgents timeout from 15s to 30s since plugin loading takes ~16s on T2. --- plugin/core/openclaw-agents.ts | 2 +- plugin/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/core/openclaw-agents.ts b/plugin/core/openclaw-agents.ts index b48a3c6..945f6e1 100644 --- a/plugin/core/openclaw-agents.ts +++ b/plugin/core/openclaw-agents.ts @@ -17,7 +17,7 @@ export interface OpenClawAgentInfo { export async function listOpenClawAgents(logger?: { debug?: (...args: any[]) => void; warn?: (...args: any[]) => void }): Promise { try { const { stdout } = await execFileAsync('openclaw', ['agents', 'list'], { - timeout: 15000, + timeout: 30000, maxBuffer: 1024 * 1024, }); return parseOpenClawAgents(stdout); diff --git a/plugin/index.ts b/plugin/index.ts index 24f0f1d..93b5f7b 100644 --- a/plugin/index.ts +++ b/plugin/index.ts @@ -96,7 +96,7 @@ export default { avg15: load[2], }, openclaw: { - version: api.version || 'unknown', + version: process.env.OPENCLAW_SERVICE_VERSION || api.version || 'unknown', pluginVersion: '0.3.1', // Bumped for PLG-CAL-004 }, timestamp: new Date().toISOString(), @@ -119,7 +119,7 @@ export default { if (!bridgeClient) return; const meta: OpenClawMeta = { - version: api.version || 'unknown', + version: process.env.OPENCLAW_SERVICE_VERSION || api.version || 'unknown', plugin_version: '0.3.1', agents: await listOpenClawAgents(logger), };