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

推荐订阅源

美团技术团队
Microsoft Azure Blog
Microsoft Azure Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog
Y
Y Combinator Blog
博客园_首页
有赞技术团队
有赞技术团队
博客园 - Franky
腾讯CDC
G
Google Developers Blog
Recent Announcements
Recent Announcements
博客园 - 【当耐特】
D
Docker
The GitHub Blog
The GitHub Blog
MyScale Blog
MyScale Blog
H
Help Net Security
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
V
V2EX
U
Unit 42
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学

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): update external plugins in recorded root · ...
steipete · 2026-04-26 · via Recent Commits to openclaw:main

@@ -1,3 +1,4 @@

1+

import path from "node:path";

12

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

23

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

34

import type { NpmSpecResolution } from "../infra/install-source-utils.js";

@@ -155,6 +156,19 @@ function pathsEqual(

155156

return resolveUserPath(left, env) === resolveUserPath(right, env);

156157

}

157158159+

function resolveRecordedExtensionsDir(params: {

160+

pluginId: string;

161+

installPath: string;

162+

}): string | undefined {

163+

const parentDir = path.dirname(params.installPath);

164+

try {

165+

const canonicalInstallPath = resolvePluginInstallDir(params.pluginId, parentDir);

166+

return canonicalInstallPath === params.installPath ? parentDir : undefined;

167+

} catch {

168+

return undefined;

169+

}

170+

}

171+158172

function buildLoadPathHelpers(existing: string[], env: NodeJS.ProcessEnv = process.env) {

159173

let paths = [...existing];

160174

const resolveSet = () => new Set(paths.map((entry) => resolveUserPath(entry, env)));

@@ -535,6 +549,10 @@ export async function updateNpmInstalledPlugins(params: {

535549

continue;

536550

}

537551

const currentVersion = await readInstalledPackageVersion(installPath);

552+

const extensionsDir = resolveRecordedExtensionsDir({

553+

pluginId,

554+

installPath,

555+

});

538556539557

if (!params.dryRun && record.source === "npm" && currentVersion) {

540558

const metadataResult = await resolveNpmSpecMetadata({ spec: effectiveSpec! });

@@ -573,6 +591,7 @@ export async function updateNpmInstalledPlugins(params: {

573591

? await installPluginFromNpmSpec({

574592

spec: effectiveSpec!,

575593

mode: "update",

594+

extensionsDir,

576595

dryRun: true,

577596

dangerouslyForceUnsafeInstall: params.dangerouslyForceUnsafeInstall,

578597

expectedPluginId: pluginId,

@@ -590,6 +609,7 @@ export async function updateNpmInstalledPlugins(params: {

590609

spec: effectiveSpec ?? `clawhub:${record.clawhubPackage!}`,

591610

baseUrl: record.clawhubUrl,

592611

mode: "update",

612+

extensionsDir,

593613

dryRun: true,

594614

dangerouslyForceUnsafeInstall: params.dangerouslyForceUnsafeInstall,

595615

expectedPluginId: pluginId,

@@ -599,6 +619,7 @@ export async function updateNpmInstalledPlugins(params: {

599619

marketplace: record.marketplaceSource!,

600620

plugin: record.marketplacePlugin!,

601621

mode: "update",

622+

extensionsDir,

602623

dryRun: true,

603624

dangerouslyForceUnsafeInstall: params.dangerouslyForceUnsafeInstall,

604625

expectedPluginId: pluginId,

@@ -674,6 +695,7 @@ export async function updateNpmInstalledPlugins(params: {

674695

? await installPluginFromNpmSpec({

675696

spec: effectiveSpec!,

676697

mode: "update",

698+

extensionsDir,

677699

dangerouslyForceUnsafeInstall: params.dangerouslyForceUnsafeInstall,

678700

expectedPluginId: pluginId,

679701

expectedIntegrity,

@@ -690,6 +712,7 @@ export async function updateNpmInstalledPlugins(params: {

690712

spec: effectiveSpec ?? `clawhub:${record.clawhubPackage!}`,

691713

baseUrl: record.clawhubUrl,

692714

mode: "update",

715+

extensionsDir,

693716

dangerouslyForceUnsafeInstall: params.dangerouslyForceUnsafeInstall,

694717

expectedPluginId: pluginId,

695718

logger,

@@ -698,6 +721,7 @@ export async function updateNpmInstalledPlugins(params: {

698721

marketplace: record.marketplaceSource!,

699722

plugin: record.marketplacePlugin!,

700723

mode: "update",

724+

extensionsDir,

701725

dangerouslyForceUnsafeInstall: params.dangerouslyForceUnsafeInstall,

702726

expectedPluginId: pluginId,

703727

logger,