mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:40:44 +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.
|
- 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.
|
- 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.
|
- 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
|
- TTS: strip model-emitted TTS directives from streamed block text before channel
|
||||||
delivery, including directives split across adjacent blocks, while preserving
|
delivery, including directives split across adjacent blocks, while preserving
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ export async function ensureChannelSetupPluginInstalled(params: {
|
|||||||
cfg: params.cfg,
|
cfg: params.cfg,
|
||||||
entry: toOnboardingPluginInstallEntry(params.entry),
|
entry: toOnboardingPluginInstallEntry(params.entry),
|
||||||
prompter: params.prompter,
|
prompter: params.prompter,
|
||||||
refreshRegistry: false,
|
|
||||||
runtime: params.runtime,
|
runtime: params.runtime,
|
||||||
workspaceDir: params.workspaceDir,
|
workspaceDir: params.workspaceDir,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -147,12 +147,7 @@ describe("ensureOnboardingPluginInstalled", () => {
|
|||||||
spec: "@wecom/wecom-openclaw-plugin@1.2.3",
|
spec: "@wecom/wecom-openclaw-plugin@1.2.3",
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
expect(refreshPluginRegistryAfterConfigMutation).toHaveBeenCalledWith(
|
expect(refreshPluginRegistryAfterConfigMutation).not.toHaveBeenCalled();
|
||||||
expect.objectContaining({
|
|
||||||
config: result.cfg,
|
|
||||||
reason: "source-changed",
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns a timed out status and notes the retry path when npm install hangs", async () => {
|
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 fs from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { resolveBundledInstallPlanForCatalogEntry } from "../cli/plugin-install-plan.js";
|
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 type { OpenClawConfig } from "../config/types.openclaw.js";
|
||||||
import { parseRegistryNpmSpec } from "../infra/npm-registry-spec.js";
|
import { parseRegistryNpmSpec } from "../infra/npm-registry-spec.js";
|
||||||
import {
|
import {
|
||||||
@@ -136,23 +135,6 @@ function formatPortableLocalPath(localPath: string, workspaceDir?: string): stri
|
|||||||
return undefined;
|
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: {
|
async function recordLocalPluginInstall(params: {
|
||||||
cfg: OpenClawConfig;
|
cfg: OpenClawConfig;
|
||||||
entry: OnboardingPluginInstallEntry;
|
entry: OnboardingPluginInstallEntry;
|
||||||
@@ -438,7 +420,6 @@ export async function ensureOnboardingPluginInstalled(params: {
|
|||||||
cfg: OpenClawConfig;
|
cfg: OpenClawConfig;
|
||||||
entry: OnboardingPluginInstallEntry;
|
entry: OnboardingPluginInstallEntry;
|
||||||
prompter: WizardPrompter;
|
prompter: WizardPrompter;
|
||||||
refreshRegistry?: boolean;
|
|
||||||
runtime: RuntimeEnv;
|
runtime: RuntimeEnv;
|
||||||
workspaceDir?: string;
|
workspaceDir?: string;
|
||||||
}): Promise<OnboardingPluginInstallResult> {
|
}): Promise<OnboardingPluginInstallResult> {
|
||||||
@@ -495,12 +476,6 @@ export async function ensureOnboardingPluginInstalled(params: {
|
|||||||
}
|
}
|
||||||
next = addPluginLoadPath(enableResult.config, localPath);
|
next = addPluginLoadPath(enableResult.config, localPath);
|
||||||
next = await recordLocalPluginInstall({ cfg: next, entry, localPath, npmSpec, workspaceDir });
|
next = await recordLocalPluginInstall({ cfg: next, entry, localPath, npmSpec, workspaceDir });
|
||||||
await refreshRegistryAfterOnboardingPluginInstall({
|
|
||||||
cfg: next,
|
|
||||||
refreshRegistry: params.refreshRegistry,
|
|
||||||
runtime,
|
|
||||||
workspaceDir,
|
|
||||||
});
|
|
||||||
return {
|
return {
|
||||||
cfg: next,
|
cfg: next,
|
||||||
installed: true,
|
installed: true,
|
||||||
@@ -579,12 +554,6 @@ export async function ensureOnboardingPluginInstalled(params: {
|
|||||||
...buildNpmResolutionInstallFields(result.npmResolution),
|
...buildNpmResolutionInstallFields(result.npmResolution),
|
||||||
} as const;
|
} as const;
|
||||||
next = recordPluginInstall(next, install);
|
next = recordPluginInstall(next, install);
|
||||||
await refreshRegistryAfterOnboardingPluginInstall({
|
|
||||||
cfg: next,
|
|
||||||
refreshRegistry: params.refreshRegistry,
|
|
||||||
runtime,
|
|
||||||
workspaceDir,
|
|
||||||
});
|
|
||||||
return {
|
return {
|
||||||
cfg: next,
|
cfg: next,
|
||||||
installed: true,
|
installed: true,
|
||||||
@@ -624,12 +593,6 @@ export async function ensureOnboardingPluginInstalled(params: {
|
|||||||
}
|
}
|
||||||
next = addPluginLoadPath(enableResult.config, localPath);
|
next = addPluginLoadPath(enableResult.config, localPath);
|
||||||
next = await recordLocalPluginInstall({ cfg: next, entry, localPath, npmSpec, workspaceDir });
|
next = await recordLocalPluginInstall({ cfg: next, entry, localPath, npmSpec, workspaceDir });
|
||||||
await refreshRegistryAfterOnboardingPluginInstall({
|
|
||||||
cfg: next,
|
|
||||||
refreshRegistry: params.refreshRegistry,
|
|
||||||
runtime,
|
|
||||||
workspaceDir,
|
|
||||||
});
|
|
||||||
return {
|
return {
|
||||||
cfg: next,
|
cfg: next,
|
||||||
installed: true,
|
installed: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user