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

推荐订阅源

雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - Franky
MyScale Blog
MyScale Blog
A
About on SuperTechFans
博客园_首页
B
Blog RSS Feed
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
C
Check Point Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
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(doctor): keep plugin runtime deps repair explicit (#7...
vincentkoc · 2026-05-01 · via Recent Commits to openclaw:main

@@ -121,27 +121,44 @@ function expectNoLegacyRuntimeDepsManifest(installRoot: string): void {

121121

expect(fs.existsSync(path.join(installRoot, ".openclaw-runtime-deps.json"))).toBe(false);

122122

}

123123124-

function createNonInteractivePrompter(

125-

options: { updateInProgress?: boolean } = {},

124+

function createNonInteractiveDoctorPrompter(

125+

options: {

126+

repair?: boolean;

127+

updateInProgress?: boolean;

128+

confirmAutoFix?: DoctorPrompter["confirmAutoFix"];

129+

} = {},

126130

): DoctorPrompter {

131+

const shouldRepair = options.repair ?? false;

127132

return {

128-

shouldRepair: false,

133+

shouldRepair,

129134

shouldForce: false,

130135

repairMode: {

131-

shouldRepair: false,

136+

shouldRepair,

132137

shouldForce: false,

133138

nonInteractive: true,

134139

canPrompt: false,

135140

updateInProgress: options.updateInProgress ?? false,

136141

},

137142

confirm: async () => false,

138-

confirmAutoFix: async () => false,

143+

confirmAutoFix: options.confirmAutoFix ?? (async () => false),

139144

confirmAggressiveAutoFix: async () => false,

140145

confirmRuntimeRepair: async () => false,

141146

select: async (_params: unknown, fallback: unknown) => fallback,

142147

} as DoctorPrompter;

143148

}

144149150+

function createPlainNonInteractivePrompter(

151+

options: { confirmAutoFix?: DoctorPrompter["confirmAutoFix"] } = {},

152+

): DoctorPrompter {

153+

return createNonInteractiveDoctorPrompter(options);

154+

}

155+156+

function createNonInteractiveRepairPrompter(

157+

options: { updateInProgress?: boolean } = {},

158+

): DoctorPrompter {

159+

return createNonInteractiveDoctorPrompter({ ...options, repair: true });

160+

}

161+145162

function createRuntime(options: { logs?: string[]; errors?: string[] } = {}): RuntimeEnv {

146163

return {

147164

log: (message: unknown) => {

@@ -487,7 +504,7 @@ describe("doctor bundled plugin runtime deps", () => {

487504488505

await maybeRepairBundledPluginRuntimeDeps({

489506

runtime: createRuntime(),

490-

prompter: createNonInteractivePrompter(),

507+

prompter: createNonInteractiveRepairPrompter(),

491508

packageRoot: root,

492509

config: {

493510

plugins: { enabled: true },

@@ -501,6 +518,36 @@ describe("doctor bundled plugin runtime deps", () => {

501518

expect(installed).toEqual([]);

502519

});

503520521+

it("does not repair missing runtime deps during plain non-interactive doctor", async () => {

522+

const root = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-doctor-bundled-"));

523+

writeJson(path.join(root, "package.json"), { name: "openclaw" });

524+

writeBundledProviderPlugin(root, "bedrock", ["bedrock"], {

525+

"bedrock-only": "1.0.0",

526+

});

527+

const installed = createInstalledRuntimeDeps();

528+

const confirmAutoFix = vi.fn(async () => true);

529+530+

await maybeRepairBundledPluginRuntimeDeps({

531+

runtime: createRuntime(),

532+

prompter: createPlainNonInteractivePrompter({ confirmAutoFix }),

533+

packageRoot: root,

534+

config: {

535+

plugins: {

536+

enabled: true,

537+

allow: ["bedrock"],

538+

entries: { bedrock: { enabled: true } },

539+

},

540+

},

541+

installDeps: (params) => {

542+

installed.push(params);

543+

materializeRuntimeDeps(params);

544+

},

545+

});

546+547+

expect(installed).toEqual([]);

548+

expect(confirmAutoFix).not.toHaveBeenCalled();

549+

});

550+504551

it("repairs explicitly enabled provider deps", async () => {

505552

const root = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-doctor-bundled-"));

506553

writeJson(path.join(root, "package.json"), { name: "openclaw" });

@@ -519,7 +566,7 @@ describe("doctor bundled plugin runtime deps", () => {

519566520567

await maybeRepairBundledPluginRuntimeDeps({

521568

runtime: createRuntime(),

522-

prompter: createNonInteractivePrompter(),

569+

prompter: createNonInteractiveRepairPrompter(),

523570

packageRoot: root,

524571

config: {

525572

plugins: {

@@ -553,7 +600,7 @@ describe("doctor bundled plugin runtime deps", () => {

553600554601

await maybeRepairBundledPluginRuntimeDeps({

555602

runtime: createRuntime(),

556-

prompter: createNonInteractivePrompter(),

603+

prompter: createNonInteractiveRepairPrompter(),

557604

packageRoot: root,

558605

config: {

559606

plugins: { enabled: true },

@@ -588,7 +635,7 @@ describe("doctor bundled plugin runtime deps", () => {

588635589636

await maybeRepairBundledPluginRuntimeDeps({

590637

runtime: createRuntime(),

591-

prompter: createNonInteractivePrompter(),

638+

prompter: createNonInteractiveRepairPrompter(),

592639

packageRoot: root,

593640

config: {

594641

plugins: { enabled: true },

@@ -624,15 +671,15 @@ describe("doctor bundled plugin runtime deps", () => {

624671

]);

625672

});

626673627-

it("repairs missing deps during non-interactive doctor", async () => {

674+

it("repairs missing deps during doctor --fix --non-interactive", async () => {

628675

const root = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-doctor-bundled-"));

629676

writeJson(path.join(root, "package.json"), { name: "openclaw" });

630677

writeBundledChannelPlugin(root, "telegram", { grammy: "1.37.0" });

631678

const installed = createInstalledRuntimeDeps();

632679633680

await maybeRepairBundledPluginRuntimeDeps({

634681

runtime: createRuntime(),

635-

prompter: createNonInteractivePrompter(),

682+

prompter: createNonInteractiveRepairPrompter(),

636683

packageRoot: root,

637684

config: {

638685

plugins: { enabled: true },

@@ -659,7 +706,7 @@ describe("doctor bundled plugin runtime deps", () => {

659706

expectNoLegacyRuntimeDepsManifest(installRoot);

660707

});

661708662-

it("repairs a previous incomplete runtime deps install during non-interactive doctor", async () => {

709+

it("repairs a previous incomplete runtime deps install during doctor --fix --non-interactive", async () => {

663710

const root = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-doctor-bundled-"));

664711

writeJson(path.join(root, "package.json"), { name: "openclaw" });

665712

writeBundledChannelPlugin(root, "telegram", { grammy: "1.37.0" });

@@ -672,7 +719,7 @@ describe("doctor bundled plugin runtime deps", () => {

672719673720

await maybeRepairBundledPluginRuntimeDeps({

674721

runtime: createRuntime(),

675-

prompter: createNonInteractivePrompter(),

722+

prompter: createNonInteractiveRepairPrompter(),

676723

packageRoot: root,

677724

config: {

678725

plugins: { enabled: true },

@@ -701,7 +748,7 @@ describe("doctor bundled plugin runtime deps", () => {

701748702749

await maybeRepairBundledPluginRuntimeDeps({

703750

runtime: createRuntime({ logs }),

704-

prompter: createNonInteractivePrompter(),

751+

prompter: createNonInteractiveRepairPrompter(),

705752

packageRoot: root,

706753

config: {

707754

plugins: { enabled: true },

@@ -728,7 +775,7 @@ describe("doctor bundled plugin runtime deps", () => {

728775729776

const repair = maybeRepairBundledPluginRuntimeDeps({

730777

runtime: createRuntime({ logs }),

731-

prompter: createNonInteractivePrompter(),

778+

prompter: createNonInteractiveRepairPrompter(),

732779

packageRoot: root,

733780

config: {

734781

plugins: { enabled: true },

@@ -760,7 +807,7 @@ describe("doctor bundled plugin runtime deps", () => {

760807761808

const repair = maybeRepairBundledPluginRuntimeDeps({

762809

runtime: { error: () => {}, log: () => {} } as never,

763-

prompter: createNonInteractivePrompter(),

810+

prompter: createNonInteractiveRepairPrompter(),

764811

packageRoot: root,

765812

config: {

766813

plugins: { enabled: true },

@@ -790,7 +837,7 @@ describe("doctor bundled plugin runtime deps", () => {

790837791838

await maybeRepairBundledPluginRuntimeDeps({

792839

runtime: createRuntime(),

793-

prompter: createNonInteractivePrompter(),

840+

prompter: createNonInteractiveRepairPrompter(),

794841

packageRoot: root,

795842

config: {

796843

plugins: { enabled: true },

@@ -820,7 +867,7 @@ describe("doctor bundled plugin runtime deps", () => {

820867821868

await maybeRepairBundledPluginRuntimeDeps({

822869

runtime: createRuntime(),

823-

prompter: createNonInteractivePrompter(),

870+

prompter: createNonInteractiveRepairPrompter(),

824871

packageRoot: root,

825872

config: {

826873

plugins: {

@@ -851,7 +898,7 @@ describe("doctor bundled plugin runtime deps", () => {

851898

await expect(

852899

maybeRepairBundledPluginRuntimeDeps({

853900

runtime: createRuntime({ errors }),

854-

prompter: createNonInteractivePrompter(),

901+

prompter: createNonInteractiveRepairPrompter(),

855902

packageRoot: root,

856903

config: {

857904

plugins: { enabled: true },

@@ -876,7 +923,7 @@ describe("doctor bundled plugin runtime deps", () => {

876923877924

await maybeRepairBundledPluginRuntimeDeps({

878925

runtime: createRuntime(),

879-

prompter: createNonInteractivePrompter({ updateInProgress: true }),

926+

prompter: createNonInteractiveRepairPrompter({ updateInProgress: true }),

880927

packageRoot: root,

881928

includeConfiguredChannels: true,

882929

config: {

@@ -909,7 +956,7 @@ describe("doctor bundled plugin runtime deps", () => {

909956910957

await maybeRepairBundledPluginRuntimeDeps({

911958

runtime: createRuntime(),

912-

prompter: createNonInteractivePrompter(),

959+

prompter: createNonInteractiveRepairPrompter(),

913960

env,

914961

packageRoot: root,

915962

config: {

@@ -963,7 +1010,7 @@ describe("doctor bundled plugin runtime deps", () => {

96310109641011

await maybeRepairBundledPluginRuntimeDeps({

9651012

runtime: createRuntime(),

966-

prompter: createNonInteractivePrompter(),

1013+

prompter: createNonInteractiveRepairPrompter(),

9671014

env,

9681015

packageRoot: root,

9691016

config: {

@@ -999,7 +1046,7 @@ describe("doctor bundled plugin runtime deps", () => {

999104610001047

await maybeRepairBundledPluginRuntimeDeps({

10011048

runtime: createRuntime(),

1002-

prompter: createNonInteractivePrompter(),

1049+

prompter: createNonInteractiveRepairPrompter(),

10031050

packageRoot: root,

10041051

includeConfiguredChannels: true,

10051052

config: {