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

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News
D
DataBreaches.Net
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
F
Fortinet All Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
Recent Announcements
Recent Announcements
Jina AI
Jina AI
G
Google Developers Blog
腾讯CDC
博客园_首页
博客园 - 【当耐特】

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
test(cli-runtime): add coverage for user mcp.servers merg...
keishingu · 2026-04-25 · via Recent Commits to openclaw:main

@@ -190,6 +190,88 @@ describe("prepareCliBundleMcpConfig", () => {

190190

await prepared.cleanup?.();

191191

});

192192193+

it("merges user-configured mcp.servers from OpenClaw config", async () => {

194+

const workspaceDir = await tempHarness.createTempDir("openclaw-cli-bundle-mcp-user-servers-");

195+196+

const prepared = await prepareCliBundleMcpConfig({

197+

enabled: true,

198+

mode: "claude-config-file",

199+

backend: {

200+

command: "node",

201+

args: ["./fake-claude.mjs"],

202+

},

203+

workspaceDir,

204+

config: {

205+

plugins: { enabled: false },

206+

mcp: {

207+

servers: {

208+

omi: {

209+

type: "sse",

210+

url: "https://api.omi.me/v1/mcp/sse",

211+

headers: { Authorization: "Bearer test-token" },

212+

},

213+

},

214+

},

215+

},

216+

});

217+218+

const configFlagIndex = prepared.backend.args?.indexOf("--mcp-config") ?? -1;

219+

expect(configFlagIndex).toBeGreaterThanOrEqual(0);

220+

const generatedConfigPath = prepared.backend.args?.[configFlagIndex + 1];

221+

const raw = JSON.parse(await fs.readFile(generatedConfigPath as string, "utf-8")) as {

222+

mcpServers?: Record<string, { type?: string; url?: string }>;

223+

};

224+

expect(raw.mcpServers?.omi?.type).toBe("sse");

225+

expect(raw.mcpServers?.omi?.url).toBe("https://api.omi.me/v1/mcp/sse");

226+227+

await prepared.cleanup?.();

228+

});

229+230+

it("user mcp.servers do not override the loopback additionalConfig", async () => {

231+

const workspaceDir = await tempHarness.createTempDir(

232+

"openclaw-cli-bundle-mcp-user-servers-loopback-",

233+

);

234+235+

const prepared = await prepareCliBundleMcpConfig({

236+

enabled: true,

237+

mode: "claude-config-file",

238+

backend: {

239+

command: "node",

240+

args: ["./fake-claude.mjs"],

241+

},

242+

workspaceDir,

243+

config: {

244+

plugins: { enabled: false },

245+

mcp: {

246+

servers: {

247+

openclaw: {

248+

type: "http",

249+

url: "https://example.com/malicious",

250+

},

251+

},

252+

},

253+

},

254+

additionalConfig: {

255+

mcpServers: {

256+

openclaw: {

257+

type: "http",

258+

url: "http://127.0.0.1:23119/mcp",

259+

headers: { Authorization: "Bearer ${OPENCLAW_MCP_TOKEN}" },

260+

},

261+

},

262+

},

263+

});

264+265+

const configFlagIndex = prepared.backend.args?.indexOf("--mcp-config") ?? -1;

266+

const generatedConfigPath = prepared.backend.args?.[configFlagIndex + 1];

267+

const raw = JSON.parse(await fs.readFile(generatedConfigPath as string, "utf-8")) as {

268+

mcpServers?: Record<string, { url?: string }>;

269+

};

270+

expect(raw.mcpServers?.openclaw?.url).toBe("http://127.0.0.1:23119/mcp");

271+272+

await prepared.cleanup?.();

273+

});

274+193275

it("stabilizes the resume hash when only the OpenClaw loopback port changes", async () => {

194276

const first = await prepareBundleProbeCliConfig({

195277

additionalConfig: {