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

推荐订阅源

IT之家
IT之家
腾讯CDC
博客园 - Franky
S
SegmentFault 最新的问题
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
J
Java Code Geeks
Y
Y Combinator Blog
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
MongoDB | Blog
MongoDB | Blog
I
InfoQ
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
B
Blog RSS Feed
博客园 - 叶小钗
博客园_首页
有赞技术团队
有赞技术团队
雷峰网
雷峰网
量子位
小众软件
小众软件
月光博客
月光博客
U
Unit 42
D
DataBreaches.Net

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(cli): show working commands for pinned plugin drift (...
ooiuuii · 2026-06-23 · via Recent Commits to openclaw:main

@@ -2,7 +2,10 @@

22

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

33

import type { OpenClawConfig } from "../config/types.js";

44

import type { PluginInstallRecord } from "../config/types.plugins.js";

5-

import { detectPluginVersionDrift } from "./plugin-version-drift.js";

5+

import {

6+

detectPluginVersionDrift,

7+

resolvePluginVersionDriftUpdateCommand,

8+

} from "./plugin-version-drift.js";

69710

function npmRecord(

811

version: string,

@@ -318,3 +321,69 @@ describe("detectPluginVersionDrift", () => {

318321

expect(result.drifts.map((d) => d.pluginId)).toEqual(["discord", "matrix", "whatsapp"]);

319322

});

320323

});

324+325+

describe("resolvePluginVersionDriftUpdateCommand", () => {

326+

it("uses an exact npm package target when the drifted install is pinned", () => {

327+

expect(

328+

resolvePluginVersionDriftUpdateCommand({

329+

pluginId: "brave",

330+

installedVersion: "2026.6.9",

331+

gatewayVersion: "2026.6.10-beta.1",

332+

source: "npm",

333+

packageName: "@openclaw/brave-plugin",

334+

spec: "@openclaw/brave-plugin@2026.6.9",

335+

}),

336+

).toBe("openclaw plugins update @openclaw/brave-plugin@2026.6.10-beta.1");

337+

});

338+339+

it("parses the package name from exact npm specs when drift metadata is sparse", () => {

340+

expect(

341+

resolvePluginVersionDriftUpdateCommand({

342+

pluginId: "brave",

343+

installedVersion: "2026.6.9",

344+

gatewayVersion: "2026.6.10-beta.1",

345+

source: "npm",

346+

spec: "@openclaw/brave-plugin@2026.6.9",

347+

}),

348+

).toBe("openclaw plugins update @openclaw/brave-plugin@2026.6.10-beta.1");

349+

});

350+351+

it("prefers the parsed exact npm spec package over inconsistent drift metadata", () => {

352+

expect(

353+

resolvePluginVersionDriftUpdateCommand({

354+

pluginId: "brave",

355+

installedVersion: "2026.6.9",

356+

gatewayVersion: "2026.6.10-beta.1",

357+

source: "npm",

358+

packageName: "@openclaw/other-plugin",

359+

spec: "@openclaw/brave-plugin@2026.6.9",

360+

}),

361+

).toBe("openclaw plugins update @openclaw/brave-plugin@2026.6.10-beta.1");

362+

});

363+364+

it("keeps plugin-id updates for floating npm install records", () => {

365+

expect(

366+

resolvePluginVersionDriftUpdateCommand({

367+

pluginId: "brave",

368+

installedVersion: "2026.6.9",

369+

gatewayVersion: "2026.6.10-beta.1",

370+

source: "npm",

371+

packageName: "@openclaw/brave-plugin",

372+

spec: "@openclaw/brave-plugin",

373+

}),

374+

).toBe("openclaw plugins update brave");

375+

});

376+377+

it("keeps plugin-id updates when the gateway version is not a registry version", () => {

378+

expect(

379+

resolvePluginVersionDriftUpdateCommand({

380+

pluginId: "brave",

381+

installedVersion: "2026.6.9",

382+

gatewayVersion: "unknown",

383+

source: "npm",

384+

packageName: "@openclaw/brave-plugin",

385+

spec: "@openclaw/brave-plugin@2026.6.9",

386+

}),

387+

).toBe("openclaw plugins update brave");

388+

});

389+

});