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

推荐订阅源

B
Blog
Microsoft Security Blog
Microsoft Security Blog
Jina AI
Jina AI
博客园 - 叶小钗
J
Java Code Geeks
博客园 - 聂微东
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
美团技术团队
WordPress大学
WordPress大学
M
MIT News - Artificial intelligence
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
GbyAI
GbyAI
罗磊的独立博客
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
The Cloudflare Blog
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
小众软件
小众软件

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(plugins): trust official Codex package commands · ope...
vincentkoc · 2026-05-04 · via Recent Commits to openclaw:main

@@ -161,6 +161,110 @@ describe("host-hook fixture plugin contract", () => {

161161

);

162162

});

163163164+

it("allows the official ClawHub Codex plugin to keep /codex command ownership", () => {

165+

const { config, registry } = createPluginRegistryFixture();

166+

const codexRoot = path.join("/tmp", ".openclaw", "extensions", "codex");

167+

registerTestPlugin({

168+

registry,

169+

config,

170+

record: createPluginRecord({

171+

id: "codex",

172+

name: "Codex",

173+

packageName: "@openclaw/codex",

174+

origin: "global",

175+

rootDir: codexRoot,

176+

source: path.join(codexRoot, "dist", "index.js"),

177+

}),

178+

register(api) {

179+

api.registerCommand({

180+

name: "codex",

181+

description: "Official ClawHub Codex command",

182+

ownership: "reserved",

183+

handler: async () => ({ text: "ok" }),

184+

});

185+

},

186+

});

187+188+

expect(registry.registry.commands.map((entry) => entry.command.name)).toEqual(["codex"]);

189+

expect(registry.registry.diagnostics).not.toEqual(

190+

expect.arrayContaining([

191+

expect.objectContaining({

192+

pluginId: "codex",

193+

message: expect.stringContaining("only bundled plugins can claim reserved command"),

194+

}),

195+

]),

196+

);

197+

});

198+199+

it("rejects non-official global Codex plugins from /codex command ownership", () => {

200+

const { config, registry } = createPluginRegistryFixture();

201+

const codexRoot = path.join("/tmp", ".openclaw", "extensions", "codex");

202+

registerTestPlugin({

203+

registry,

204+

config,

205+

record: createPluginRecord({

206+

id: "codex",

207+

name: "Codex",

208+

origin: "global",

209+

rootDir: codexRoot,

210+

source: path.join(codexRoot, "dist", "index.js"),

211+

}),

212+

register(api) {

213+

api.registerCommand({

214+

name: "codex",

215+

description: "Impostor Codex command",

216+

ownership: "reserved",

217+

handler: async () => ({ text: "no" }),

218+

});

219+

},

220+

});

221+222+

expect(registry.registry.commands).toHaveLength(0);

223+

expect(registry.registry.diagnostics).toEqual(

224+

expect.arrayContaining([

225+

expect.objectContaining({

226+

pluginId: "codex",

227+

message: expect.stringContaining("only bundled plugins can claim reserved command"),

228+

}),

229+

]),

230+

);

231+

});

232+233+

it("rejects workspace Codex plugins that spoof the official package name", () => {

234+

const { config, registry } = createPluginRegistryFixture();

235+

const codexRoot = path.join("/tmp", "workspace", "codex");

236+

registerTestPlugin({

237+

registry,

238+

config,

239+

record: createPluginRecord({

240+

id: "codex",

241+

name: "Codex",

242+

packageName: "@openclaw/codex",

243+

origin: "workspace",

244+

rootDir: codexRoot,

245+

source: path.join(codexRoot, "dist", "index.js"),

246+

}),

247+

register(api) {

248+

api.registerCommand({

249+

name: "codex",

250+

description: "Workspace Codex command",

251+

ownership: "reserved",

252+

handler: async () => ({ text: "no" }),

253+

});

254+

},

255+

});

256+257+

expect(registry.registry.commands).toHaveLength(0);

258+

expect(registry.registry.diagnostics).toEqual(

259+

expect.arrayContaining([

260+

expect.objectContaining({

261+

pluginId: "codex",

262+

message: expect.stringContaining("only bundled plugins can claim reserved command"),

263+

}),

264+

]),

265+

);

266+

});

267+164268

it("rejects reserved command ownership for non-reserved bundled command names", () => {

165269

const { config, registry } = createPluginRegistryFixture();

166270

registerTestPlugin({