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

推荐订阅源

WordPress大学
WordPress大学
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
月光博客
月光博客
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
IT之家
IT之家
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
博客园 - 司徒正美
爱范儿
爱范儿

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(onboard): refresh provider plugin registry after setu...
snowzlmbot · 2026-06-23 · via Recent Commits to openclaw:main

@@ -9,6 +9,7 @@ import path from "node:path";

99

import { uniqueStrings } from "@openclaw/normalization-core/string-normalization";

1010

import { sanitizeTerminalText } from "../../packages/terminal-core/src/safe-text.js";

1111

import { resolveBundledInstallPlanForCatalogEntry } from "../cli/plugin-install-plan.js";

12+

import { invalidatePluginRuntimeDiscoveryAfterConfigMutation } from "../cli/plugins-registry-refresh.js";

1213

import { assertConfigWriteAllowedInCurrentMode } from "../config/nix-mode-write-guard.js";

1314

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

1415

import { parseClawHubPluginSpec } from "../infra/clawhub-spec.js";

@@ -40,12 +41,14 @@ import {

4041

installPluginFromNpmPackArchive,

4142

type InstallPluginResult,

4243

} from "../plugins/install.js";

44+

import { clearLoadInstalledPluginIndexInstallRecordsCache } from "../plugins/installed-plugin-index-records.js";

4345

import {

4446

buildNpmResolutionInstallFields,

4547

recordPluginInstall,

4648

resolveNpmInstallRecordSpec,

4749

} from "../plugins/installs.js";

4850

import type { PluginPackageInstall } from "../plugins/manifest.js";

51+

import { clearPluginMetadataLifecycleCaches } from "../plugins/plugin-metadata-lifecycle.js";

4952

import type { RuntimeEnv } from "../runtime.js";

5053

import { withTimeout } from "../utils/with-timeout.js";

5154

import { VERSION } from "../version.js";

@@ -79,6 +82,22 @@ type OnboardingPluginInstallResult = {

7982

status: OnboardingPluginInstallStatus;

8083

};

818485+

async function markOnboardingPluginInstalled(

86+

result: OnboardingPluginInstallResult & { installed: true },

87+

params: {

88+

runtime: RuntimeEnv;

89+

},

90+

): Promise<OnboardingPluginInstallResult & { installed: true }> {

91+

// Onboarding has not committed config yet, so invalidate only process-local

92+

// discovery. The next lookup recovers the new package alongside persisted records.

93+

clearLoadInstalledPluginIndexInstallRecordsCache();

94+

clearPluginMetadataLifecycleCaches();

95+

await invalidatePluginRuntimeDiscoveryAfterConfigMutation({

96+

logger: { warn: (message) => params.runtime.log(message) },

97+

});

98+

return result;

99+

}

100+82101

function shouldFallbackClawHubToNpm(params: {

83102

result: { ok: false; code?: string };

84103

npmSpec?: string;

@@ -915,12 +934,15 @@ async function installPluginFromOverride(params: {

915934

...(result.version ? { version: result.version } : {}),

916935

...buildNpmResolutionInstallFields(result.npmResolution),

917936

} as const);

918-

return {

919-

cfg: recordPluginInstall(enableResult.config, install),

920-

installed: true,

921-

pluginId: result.pluginId,

922-

status: "installed",

923-

};

937+

return await markOnboardingPluginInstalled(

938+

{

939+

cfg: recordPluginInstall(enableResult.config, install),

940+

installed: true,

941+

pluginId: result.pluginId,

942+

status: "installed",

943+

},

944+

{ runtime: params.runtime },

945+

);

924946

}

925947926948

async function installPluginFromClawHubSpecWithProgress(params: {

@@ -1104,21 +1126,27 @@ export async function ensureOnboardingPluginInstalled(params: {

11041126

};

11051127

}

11061128

if (pathsReferToSameDirectory(localPath, bundledLocalPath)) {

1107-

return {

1108-

cfg: enableResult.config,

1109-

installed: true,

1110-

pluginId: entry.pluginId,

1111-

status: "installed",

1112-

};

1129+

return await markOnboardingPluginInstalled(

1130+

{

1131+

cfg: enableResult.config,

1132+

installed: true,

1133+

pluginId: entry.pluginId,

1134+

status: "installed",

1135+

},

1136+

{ runtime },

1137+

);

11131138

}

11141139

next = addPluginLoadPath(enableResult.config, localPath);

11151140

next = await recordLocalPluginInstall({ cfg: next, entry, localPath, npmSpec, workspaceDir });

1116-

return {

1117-

cfg: next,

1118-

installed: true,

1119-

pluginId: entry.pluginId,

1120-

status: "installed",

1121-

};

1141+

return await markOnboardingPluginInstalled(

1142+

{

1143+

cfg: next,

1144+

installed: true,

1145+

pluginId: entry.pluginId,

1146+

status: "installed",

1147+

},

1148+

{ runtime },

1149+

);

11221150

}

1123115111241152

let shouldTryNpm = choice === "npm";

@@ -1171,12 +1199,15 @@ export async function ensureOnboardingPluginInstalled(params: {

11711199

spec: clawhubSpecs?.recordSpec ?? clawhubInstallSpec,

11721200

installPath: result.targetDir,

11731201

});

1174-

return {

1175-

cfg: next,

1176-

installed: true,

1177-

pluginId: result.pluginId,

1178-

status: "installed",

1179-

};

1202+

return await markOnboardingPluginInstalled(

1203+

{

1204+

cfg: next,

1205+

installed: true,

1206+

pluginId: result.pluginId,

1207+

status: "installed",

1208+

},

1209+

{ runtime },

1210+

);

11801211

}

1181121211821213

await prompter.note(

@@ -1293,12 +1324,15 @@ export async function ensureOnboardingPluginInstalled(params: {

12931324

...buildNpmResolutionInstallFields(result.npmResolution),

12941325

} as const;

12951326

next = recordPluginInstall(next, install);

1296-

return {

1297-

cfg: next,

1298-

installed: true,

1299-

pluginId: result.pluginId,

1300-

status: "installed",

1301-

};

1327+

return await markOnboardingPluginInstalled(

1328+

{

1329+

cfg: next,

1330+

installed: true,

1331+

pluginId: result.pluginId,

1332+

status: "installed",

1333+

},

1334+

{ runtime },

1335+

);

13021336

}

1303133713041338

await prompter.note(

@@ -1338,21 +1372,27 @@ export async function ensureOnboardingPluginInstalled(params: {

13381372

};

13391373

}

13401374

if (pathsReferToSameDirectory(localPath, bundledLocalPath)) {

1341-

return {

1342-

cfg: enableResult.config,

1343-

installed: true,

1344-

pluginId: entry.pluginId,

1345-

status: "installed",

1346-

};

1375+

return await markOnboardingPluginInstalled(

1376+

{

1377+

cfg: enableResult.config,

1378+

installed: true,

1379+

pluginId: entry.pluginId,

1380+

status: "installed",

1381+

},

1382+

{ runtime },

1383+

);

13471384

}

13481385

next = addPluginLoadPath(enableResult.config, localPath);

13491386

next = await recordLocalPluginInstall({ cfg: next, entry, localPath, npmSpec, workspaceDir });

1350-

return {

1351-

cfg: next,

1352-

installed: true,

1353-

pluginId: entry.pluginId,

1354-

status: "installed",

1355-

};

1387+

return await markOnboardingPluginInstalled(

1388+

{

1389+

cfg: next,

1390+

installed: true,

1391+

pluginId: entry.pluginId,

1392+

status: "installed",

1393+

},

1394+

{ runtime },

1395+

);

13561396

}

13571397

}

13581398