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

推荐订阅源

M
MIT News - Artificial intelligence
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
J
Java Code Geeks
G
Google Developers Blog
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Blog of Author Tim Ferriss
月光博客
月光博客
B
Blog
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
博客园_首页
人人都是产品经理
人人都是产品经理
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
Jina AI
Jina AI
S
SegmentFault 最新的问题
H
Help Net Security
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
Google DeepMind News
Google DeepMind News

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): repair missing openclaw peer links on updat...
ProspectOre · 2026-05-05 · via Recent Commits to openclaw:main

@@ -250,12 +250,24 @@ function createCodexAppServerInstallConfig(params: {

250250

};

251251

}

252252253-

function createInstalledPackageDir(params: { name?: string; version: string }): string {

253+

function createInstalledPackageDir(params: {

254+

name?: string;

255+

version: string;

256+

peerDependencies?: Record<string, string>;

257+

}): string {

254258

const dir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-plugin-update-test-"));

255259

tempDirs.push(dir);

256260

fs.writeFileSync(

257261

path.join(dir, "package.json"),

258-

JSON.stringify({ name: params.name ?? "test-plugin", version: params.version }, null, 2),

262+

JSON.stringify(

263+

{

264+

name: params.name ?? "test-plugin",

265+

version: params.version,

266+

...(params.peerDependencies ? { peerDependencies: params.peerDependencies } : {}),

267+

},

268+

null,

269+

2,

270+

),

259271

);

260272

return dir;

261273

}

@@ -708,6 +720,119 @@ describe("updateNpmInstalledPlugins", () => {

708720

]);

709721

});

710722723+

it("repairs missing openclaw peer links before skipping unchanged npm plugins", async () => {

724+

const installPath = createInstalledPackageDir({

725+

name: "@openclaw/codex",

726+

version: "2026.5.3",

727+

peerDependencies: { openclaw: ">=2026.5.3" },

728+

});

729+

mockNpmViewMetadata({

730+

name: "@openclaw/codex",

731+

version: "2026.5.3",

732+

integrity: "sha512-same",

733+

shasum: "same",

734+

});

735+

installPluginFromNpmSpecMock.mockResolvedValue(

736+

createSuccessfulNpmUpdateResult({

737+

pluginId: "codex",

738+

targetDir: installPath,

739+

version: "2026.5.3",

740+

npmResolution: {

741+

name: "@openclaw/codex",

742+

version: "2026.5.3",

743+

resolvedSpec: "@openclaw/codex@2026.5.3",

744+

},

745+

}),

746+

);

747+

const config: OpenClawConfig = {

748+

plugins: {

749+

installs: {

750+

codex: {

751+

source: "npm",

752+

spec: "@openclaw/codex",

753+

installPath,

754+

resolvedName: "@openclaw/codex",

755+

resolvedVersion: "2026.5.3",

756+

resolvedSpec: "@openclaw/codex@2026.5.3",

757+

integrity: "sha512-same",

758+

shasum: "same",

759+

},

760+

},

761+

},

762+

};

763+764+

const result = await updateNpmInstalledPlugins({

765+

config,

766+

pluginIds: ["codex"],

767+

});

768+769+

expect(installPluginFromNpmSpecMock).toHaveBeenCalledWith(

770+

expect.objectContaining({

771+

spec: "@openclaw/codex",

772+

mode: "update",

773+

expectedPluginId: "codex",

774+

}),

775+

);

776+

expect(result.changed).toBe(true);

777+

expect(result.outcomes).toEqual([

778+

{

779+

pluginId: "codex",

780+

status: "unchanged",

781+

currentVersion: "2026.5.3",

782+

nextVersion: "2026.5.3",

783+

message: "codex already at 2026.5.3.",

784+

},

785+

]);

786+

});

787+788+

it("skips unchanged npm plugins when the openclaw peer link already resolves", async () => {

789+

const installPath = createInstalledPackageDir({

790+

name: "@openclaw/codex",

791+

version: "2026.5.3",

792+

peerDependencies: { openclaw: ">=2026.5.3" },

793+

});

794+

fs.mkdirSync(path.join(installPath, "node_modules", "openclaw"), { recursive: true });

795+

mockNpmViewMetadata({

796+

name: "@openclaw/codex",

797+

version: "2026.5.3",

798+

integrity: "sha512-same",

799+

shasum: "same",

800+

});

801+

installPluginFromNpmSpecMock.mockRejectedValue(new Error("installer should not run"));

802+803+

const result = await updateNpmInstalledPlugins({

804+

config: {

805+

plugins: {

806+

installs: {

807+

codex: {

808+

source: "npm",

809+

spec: "@openclaw/codex",

810+

installPath,

811+

resolvedName: "@openclaw/codex",

812+

resolvedVersion: "2026.5.3",

813+

resolvedSpec: "@openclaw/codex@2026.5.3",

814+

integrity: "sha512-same",

815+

shasum: "same",

816+

},

817+

},

818+

},

819+

},

820+

pluginIds: ["codex"],

821+

});

822+823+

expect(installPluginFromNpmSpecMock).not.toHaveBeenCalled();

824+

expect(result.changed).toBe(false);

825+

expect(result.outcomes).toEqual([

826+

{

827+

pluginId: "codex",

828+

status: "unchanged",

829+

currentVersion: "2026.5.3",

830+

nextVersion: "2026.5.3",

831+

message: "codex is up to date (2026.5.3).",

832+

},

833+

]);

834+

});

835+711836

it("refreshes legacy npm install records before skipping unchanged artifacts", async () => {

712837

const installPath = createInstalledPackageDir({

713838

name: "@martian-engineering/lossless-claw",