mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:00:43 +00:00
fix: defer onboarding install record commits
This commit is contained in:
@@ -67,6 +67,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
- Providers/Z.AI: map OpenClaw thinking controls to Z.AI's `thinking` payload and add opt-in preserved thinking replay via `params.preserveThinking`, so GLM 5.x can keep prior `reasoning_content` when requested. Fixes #58680. Thanks @xuanmingguo.
|
||||
- Channels/status: keep read-only channel lists on manifest and package metadata by default, loading setup runtime only for explicit fallback callers. Thanks @shakkernerd.
|
||||
- Plugins/onboarding: defer onboarding install-record index writes until the guarded config commit so setup failures cannot leave the plugin index ahead of `openclaw.json`. Thanks @shakkernerd.
|
||||
- Plugins/registry: resolve web provider ownership from the installed plugin index instead of broad manifest scans on secret, tool, and pricing paths. Thanks @shakkernerd.
|
||||
- TTS: strip model-emitted TTS directives from streamed block text before channel
|
||||
delivery, including directives split across adjacent blocks, while preserving
|
||||
|
||||
@@ -46,7 +46,6 @@ export async function ensureChannelSetupPluginInstalled(params: {
|
||||
cfg: params.cfg,
|
||||
entry: toOnboardingPluginInstallEntry(params.entry),
|
||||
prompter: params.prompter,
|
||||
refreshRegistry: false,
|
||||
runtime: params.runtime,
|
||||
workspaceDir: params.workspaceDir,
|
||||
});
|
||||
|
||||
@@ -147,12 +147,7 @@ describe("ensureOnboardingPluginInstalled", () => {
|
||||
spec: "@wecom/wecom-openclaw-plugin@1.2.3",
|
||||
}),
|
||||
});
|
||||
expect(refreshPluginRegistryAfterConfigMutation).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
config: result.cfg,
|
||||
reason: "source-changed",
|
||||
}),
|
||||
);
|
||||
expect(refreshPluginRegistryAfterConfigMutation).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("returns a timed out status and notes the retry path when npm install hangs", async () => {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { resolveBundledInstallPlanForCatalogEntry } from "../cli/plugin-install-plan.js";
|
||||
import { refreshPluginRegistryAfterConfigMutation } from "../cli/plugins-registry-refresh.js";
|
||||
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
||||
import { parseRegistryNpmSpec } from "../infra/npm-registry-spec.js";
|
||||
import {
|
||||
@@ -136,23 +135,6 @@ function formatPortableLocalPath(localPath: string, workspaceDir?: string): stri
|
||||
return undefined;
|
||||
}
|
||||
|
||||
async function refreshRegistryAfterOnboardingPluginInstall(params: {
|
||||
cfg: OpenClawConfig;
|
||||
refreshRegistry?: boolean;
|
||||
runtime: RuntimeEnv;
|
||||
workspaceDir?: string;
|
||||
}) {
|
||||
if (params.refreshRegistry === false) {
|
||||
return;
|
||||
}
|
||||
await refreshPluginRegistryAfterConfigMutation({
|
||||
config: params.cfg,
|
||||
reason: "source-changed",
|
||||
...(params.workspaceDir ? { workspaceDir: params.workspaceDir } : {}),
|
||||
logger: { warn: (message) => params.runtime.log(message) },
|
||||
});
|
||||
}
|
||||
|
||||
async function recordLocalPluginInstall(params: {
|
||||
cfg: OpenClawConfig;
|
||||
entry: OnboardingPluginInstallEntry;
|
||||
@@ -438,7 +420,6 @@ export async function ensureOnboardingPluginInstalled(params: {
|
||||
cfg: OpenClawConfig;
|
||||
entry: OnboardingPluginInstallEntry;
|
||||
prompter: WizardPrompter;
|
||||
refreshRegistry?: boolean;
|
||||
runtime: RuntimeEnv;
|
||||
workspaceDir?: string;
|
||||
}): Promise<OnboardingPluginInstallResult> {
|
||||
@@ -495,12 +476,6 @@ export async function ensureOnboardingPluginInstalled(params: {
|
||||
}
|
||||
next = addPluginLoadPath(enableResult.config, localPath);
|
||||
next = await recordLocalPluginInstall({ cfg: next, entry, localPath, npmSpec, workspaceDir });
|
||||
await refreshRegistryAfterOnboardingPluginInstall({
|
||||
cfg: next,
|
||||
refreshRegistry: params.refreshRegistry,
|
||||
runtime,
|
||||
workspaceDir,
|
||||
});
|
||||
return {
|
||||
cfg: next,
|
||||
installed: true,
|
||||
@@ -579,12 +554,6 @@ export async function ensureOnboardingPluginInstalled(params: {
|
||||
...buildNpmResolutionInstallFields(result.npmResolution),
|
||||
} as const;
|
||||
next = recordPluginInstall(next, install);
|
||||
await refreshRegistryAfterOnboardingPluginInstall({
|
||||
cfg: next,
|
||||
refreshRegistry: params.refreshRegistry,
|
||||
runtime,
|
||||
workspaceDir,
|
||||
});
|
||||
return {
|
||||
cfg: next,
|
||||
installed: true,
|
||||
@@ -624,12 +593,6 @@ export async function ensureOnboardingPluginInstalled(params: {
|
||||
}
|
||||
next = addPluginLoadPath(enableResult.config, localPath);
|
||||
next = await recordLocalPluginInstall({ cfg: next, entry, localPath, npmSpec, workspaceDir });
|
||||
await refreshRegistryAfterOnboardingPluginInstall({
|
||||
cfg: next,
|
||||
refreshRegistry: params.refreshRegistry,
|
||||
runtime,
|
||||
workspaceDir,
|
||||
});
|
||||
return {
|
||||
cfg: next,
|
||||
installed: true,
|
||||
|
||||
Reference in New Issue
Block a user