惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog
Y
Y Combinator Blog
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
小众软件
小众软件
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
博客园 - 叶小钗
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
量子位
The Cloudflare Blog
T
The Blog of Author Tim Ferriss
博客园_首页
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
阮一峰的网络日志
阮一峰的网络日志
L
LangChain Blog
宝玉的分享
宝玉的分享

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
Fix memory plugin CLI help dispatch (#83841) · openclaw/o...
joshavant · 2026-05-19 · via Recent Commits to openclaw:main

@@ -2,6 +2,7 @@ import process from "node:process";

22

import { CommanderError } from "commander";

33

import { beforeEach, describe, expect, it, vi } from "vitest";

44

import { loggingState } from "../logging/state.js";

5+

import type { RootHelpRenderOptions } from "./program/root-help.js";

56

import { runCli, shouldStartProxyForCli } from "./run-main.js";

6778

const tryRouteCliMock = vi.hoisted(() => vi.fn());

@@ -18,6 +19,9 @@ const startTaskRegistryMaintenanceMock = vi.hoisted(() => vi.fn());

1819

const outputRootHelpMock = vi.hoisted(() => vi.fn());

1920

const outputPrecomputedRootHelpTextMock = vi.hoisted(() => vi.fn(() => false));

2021

const outputPrecomputedBrowserHelpTextMock = vi.hoisted(() => vi.fn(() => false));

22+

const loadRootHelpRenderOptionsForConfigSensitivePluginsMock = vi.hoisted(() =>

23+

vi.fn<() => Promise<RootHelpRenderOptions | null>>(async () => null),

24+

);

2125

const buildProgramMock = vi.hoisted(() => vi.fn());

2226

const getProgramContextMock = vi.hoisted(() => vi.fn(() => null));

2327

const registerCoreCliByNameMock = vi.hoisted(() => vi.fn());

@@ -168,6 +172,11 @@ vi.mock("./root-help-metadata.js", () => ({

168172

outputPrecomputedRootHelpText: outputPrecomputedRootHelpTextMock,

169173

}));

170174175+

vi.mock("./root-help-live-config.js", () => ({

176+

loadRootHelpRenderOptionsForConfigSensitivePlugins:

177+

loadRootHelpRenderOptionsForConfigSensitivePluginsMock,

178+

}));

179+171180

vi.mock("./program.js", () => ({

172181

buildProgram: buildProgramMock,

173182

}));

@@ -242,6 +251,7 @@ describe("runCli exit behavior", () => {

242251

listAgentHarnessIdsMock.mockReturnValue([]);

243252

outputPrecomputedBrowserHelpTextMock.mockReturnValue(false);

244253

outputPrecomputedRootHelpTextMock.mockReturnValue(false);

254+

loadRootHelpRenderOptionsForConfigSensitivePluginsMock.mockResolvedValue(null);

245255

hasEnvHttpProxyAgentConfiguredMock.mockReturnValue(false);

246256

loadConfigMock.mockReturnValue({});

247257

startProxyMock.mockResolvedValue(null);

@@ -401,6 +411,7 @@ describe("runCli exit behavior", () => {

401411402412

await runCli(["node", "openclaw", "--help"]);

403413414+

expect(loadRootHelpRenderOptionsForConfigSensitivePluginsMock).toHaveBeenCalledTimes(1);

404415

expect(outputPrecomputedRootHelpTextMock).toHaveBeenCalledTimes(1);

405416

expect(hasEnvHttpProxyAgentConfiguredMock).not.toHaveBeenCalled();

406417

expect(ensureGlobalUndiciEnvProxyDispatcherMock).not.toHaveBeenCalled();

@@ -416,6 +427,7 @@ describe("runCli exit behavior", () => {

416427417428

expect(maybeRunCliInContainerMock).toHaveBeenCalledWith(["node", "openclaw", "--help"]);

418429

expect(tryRouteCliMock).not.toHaveBeenCalled();

430+

expect(loadRootHelpRenderOptionsForConfigSensitivePluginsMock).toHaveBeenCalledTimes(1);

419431

expect(outputPrecomputedRootHelpTextMock).toHaveBeenCalledTimes(1);

420432

expect(outputRootHelpMock).toHaveBeenCalledTimes(1);

421433

expect(buildProgramMock).not.toHaveBeenCalled();

@@ -424,6 +436,28 @@ describe("runCli exit behavior", () => {

424436

exitSpy.mockRestore();

425437

});

426438439+

it("renders config-sensitive root help live instead of precomputed metadata", async () => {

440+

const liveOptions: RootHelpRenderOptions = {

441+

config: {

442+

plugins: {

443+

slots: {

444+

memory: "memory-lancedb",

445+

},

446+

},

447+

},

448+

env: process.env,

449+

};

450+

loadRootHelpRenderOptionsForConfigSensitivePluginsMock.mockResolvedValueOnce(liveOptions);

451+

outputPrecomputedRootHelpTextMock.mockReturnValueOnce(true);

452+453+

await runCli(["node", "openclaw", "--help"]);

454+455+

expect(loadRootHelpRenderOptionsForConfigSensitivePluginsMock).toHaveBeenCalledTimes(1);

456+

expect(outputPrecomputedRootHelpTextMock).not.toHaveBeenCalled();

457+

expect(outputRootHelpMock).toHaveBeenCalledWith(liveOptions);

458+

expect(buildProgramMock).not.toHaveBeenCalled();

459+

});

460+427461

it("does not start the managed proxy for local gateway client commands", async () => {

428462

tryRouteCliMock.mockResolvedValueOnce(true);

429463