mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 12:56:01 -06:00
fix(plugins): serialize lifecycle mutations and preserve setup-required installs (#112763)
* fix(plugins): harden concurrent lifecycle mutations * fix(update): preserve post-core restart snapshot * fix(update): retain authoritative plugin records on resume * fix(update): reconcile plugin records after handoff
This commit is contained in:
committed by
GitHub
parent
67ef07863f
commit
a12e0f26ee
@@ -43,6 +43,7 @@ import {
|
||||
resolveMarketplaceInstallShortcut,
|
||||
} from "../plugins/marketplace.js";
|
||||
import { resolveCatalogOfficialExternalInstallPlan } from "../plugins/official-external-install-trust.js";
|
||||
import { withPluginLifecycleLease } from "../plugins/plugin-lifecycle-lease.js";
|
||||
import { tracePluginLifecyclePhaseAsync } from "../plugins/plugin-lifecycle-trace.js";
|
||||
import { defaultRuntime, type RuntimeEnv } from "../runtime.js";
|
||||
import { markClawPackageIndependentlyOwned } from "../state/claw-package-adoption.js";
|
||||
@@ -757,7 +758,7 @@ if (process.env.VITEST || process.env.NODE_ENV === "test") {
|
||||
] = { loadConfigForInstall };
|
||||
}
|
||||
|
||||
export async function runPluginInstallCommand(params: {
|
||||
type RunPluginInstallCommandParams = {
|
||||
raw: string;
|
||||
opts: InstallSafetyOverrides & {
|
||||
acknowledgeClawHubRisk?: boolean;
|
||||
@@ -771,7 +772,17 @@ export async function runPluginInstallCommand(params: {
|
||||
invalidateRuntimeCache?: boolean;
|
||||
clawManaged?: boolean;
|
||||
runtime?: RuntimeEnv;
|
||||
}) {
|
||||
};
|
||||
|
||||
export async function runPluginInstallCommand(params: RunPluginInstallCommandParams) {
|
||||
assertConfigWriteAllowedInCurrentMode();
|
||||
return await withPluginLifecycleLease(
|
||||
{},
|
||||
async () => await runPluginInstallCommandUnlocked(params),
|
||||
);
|
||||
}
|
||||
|
||||
async function runPluginInstallCommandUnlocked(params: RunPluginInstallCommandParams) {
|
||||
assertConfigWriteAllowedInCurrentMode();
|
||||
|
||||
const runtime = params.runtime ?? defaultRuntime;
|
||||
|
||||
Reference in New Issue
Block a user