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.
This commit is contained in:
operator
2026-04-16 15:12:35 +00:00
parent 58a800a1aa
commit 2088cd12b4
2 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ export interface OpenClawAgentInfo {
export async function listOpenClawAgents(logger?: { debug?: (...args: any[]) => void; warn?: (...args: any[]) => void }): Promise<OpenClawAgentInfo[]> {
try {
const { stdout } = await execFileAsync('openclaw', ['agents', 'list'], {
timeout: 15000,
timeout: 30000,
maxBuffer: 1024 * 1024,
});
return parseOpenClawAgents(stdout);