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

推荐订阅源

博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
aimingoo的专栏
aimingoo的专栏
腾讯CDC
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
F
Fortinet All Blogs
G
Google Developers Blog
MongoDB | Blog
MongoDB | Blog
Microsoft Azure Blog
Microsoft Azure Blog
小众软件
小众软件
Engineering at Meta
Engineering at Meta
博客园_首页
B
Blog RSS Feed
D
Docker
M
MIT News - Artificial intelligence
爱范儿
爱范儿
I
InfoQ

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: auto-register bundled computer use marketplace · ope...
steipete · 2026-04-28 · via Recent Commits to openclaw:main

@@ -1,3 +1,6 @@

1+

import fs from "node:fs";

2+

import os from "node:os";

3+

import path from "node:path";

14

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

25

import {

36

ensureCodexComputerUse,

@@ -7,8 +10,13 @@ import {

710

} from "./computer-use.js";

811912

describe("Codex Computer Use setup", () => {

13+

const cleanupPaths: string[] = [];

14+1015

afterEach(() => {

1116

vi.useRealTimers();

17+

for (const cleanupPath of cleanupPaths.splice(0)) {

18+

fs.rmSync(cleanupPath, { recursive: true, force: true });

19+

}

1220

});

13211422

it("stays disabled until configured", async () => {

@@ -253,6 +261,69 @@ describe("Codex Computer Use setup", () => {

253261

});

254262

});

255263264+

it("auto-registers the bundled Codex app marketplace during auto-install", async () => {

265+

const bundledMarketplacePath = fs.mkdtempSync(

266+

path.join(os.tmpdir(), "openclaw-codex-bundled-marketplace-"),

267+

);

268+

cleanupPaths.push(bundledMarketplacePath);

269+

const request = createBundledMarketplaceComputerUseRequest(bundledMarketplacePath);

270+271+

await expect(

272+

ensureCodexComputerUse({

273+

pluginConfig: {

274+

computerUse: {

275+

enabled: true,

276+

autoInstall: true,

277+

},

278+

},

279+

request,

280+

defaultBundledMarketplacePath: bundledMarketplacePath,

281+

}),

282+

).resolves.toEqual(

283+

expect.objectContaining({

284+

ready: true,

285+

reason: "ready",

286+

marketplaceName: "openai-bundled",

287+

message: "Computer Use is ready.",

288+

}),

289+

);

290+

expect(request).toHaveBeenCalledWith("marketplace/add", {

291+

source: bundledMarketplacePath,

292+

});

293+

expect(request).toHaveBeenCalledWith("plugin/install", {

294+

marketplacePath: `${bundledMarketplacePath}/.agents/plugins/marketplace.json`,

295+

pluginName: "computer-use",

296+

});

297+

});

298+299+

it("allows auto-install from a configured local marketplace path", async () => {

300+

const request = createComputerUseRequest({ installed: false });

301+302+

await expect(

303+

ensureCodexComputerUse({

304+

pluginConfig: {

305+

computerUse: {

306+

enabled: true,

307+

autoInstall: true,

308+

marketplacePath: "/marketplaces/desktop-tools/.agents/plugins/marketplace.json",

309+

},

310+

},

311+

request,

312+

}),

313+

).resolves.toEqual(

314+

expect.objectContaining({

315+

ready: true,

316+

reason: "ready",

317+

message: "Computer Use is ready.",

318+

}),

319+

);

320+

expect(request).not.toHaveBeenCalledWith("marketplace/add", expect.anything());

321+

expect(request).toHaveBeenCalledWith("plugin/install", {

322+

marketplacePath: "/marketplaces/desktop-tools/.agents/plugins/marketplace.json",

323+

pluginName: "computer-use",

324+

});

325+

});

326+256327

it("requires an explicit install command for configured marketplace sources", async () => {

257328

const request = createComputerUseRequest({ installed: false });

258329

@@ -607,6 +678,87 @@ function createMultiMarketplaceComputerUseRequest(): CodexComputerUseRequest {

607678

}) as CodexComputerUseRequest;

608679

}

609680681+

function createBundledMarketplaceComputerUseRequest(

682+

bundledMarketplacePath: string,

683+

): CodexComputerUseRequest {

684+

let registered = false;

685+

let installed = false;

686+

return vi.fn(async (method: string, requestParams?: unknown) => {

687+

if (method === "experimentalFeature/enablement/set") {

688+

return { enablement: { plugins: true } };

689+

}

690+

if (method === "marketplace/add") {

691+

expect(requestParams).toEqual({

692+

source: bundledMarketplacePath,

693+

});

694+

registered = true;

695+

return {

696+

marketplaceName: "openai-bundled",

697+

installedRoot: bundledMarketplacePath,

698+

alreadyAdded: false,

699+

};

700+

}

701+

if (method === "plugin/list") {

702+

return {

703+

marketplaces: registered

704+

? [

705+

{

706+

name: "openai-bundled",

707+

path: `${bundledMarketplacePath}/.agents/plugins/marketplace.json`,

708+

interface: null,

709+

plugins: [pluginSummary(installed, "openai-bundled")],

710+

},

711+

]

712+

: [],

713+

marketplaceLoadErrors: [],

714+

featuredPluginIds: [],

715+

};

716+

}

717+

if (method === "plugin/read") {

718+

return {

719+

plugin: {

720+

marketplaceName: "openai-bundled",

721+

marketplacePath: `${bundledMarketplacePath}/.agents/plugins/marketplace.json`,

722+

summary: pluginSummary(installed, "openai-bundled"),

723+

description: "Control desktop apps.",

724+

skills: [],

725+

apps: [],

726+

mcpServers: ["computer-use"],

727+

},

728+

};

729+

}

730+

if (method === "plugin/install") {

731+

installed = true;

732+

return { authPolicy: "ON_INSTALL", appsNeedingAuth: [] };

733+

}

734+

if (method === "config/mcpServer/reload") {

735+

return undefined;

736+

}

737+

if (method === "mcpServerStatus/list") {

738+

return {

739+

data: installed

740+

? [

741+

{

742+

name: "computer-use",

743+

tools: {

744+

list_apps: {

745+

name: "list_apps",

746+

inputSchema: { type: "object" },

747+

},

748+

},

749+

resources: [],

750+

resourceTemplates: [],

751+

authStatus: "unsupported",

752+

},

753+

]

754+

: [],

755+

nextCursor: null,

756+

};

757+

}

758+

throw new Error(`unexpected request ${method}`);

759+

}) as CodexComputerUseRequest;

760+

}

761+610762

function marketplaceEntry(marketplaceName: string, installed: boolean) {

611763

return {

612764

name: marketplaceName,