mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 22:18:27 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import fs from "node:fs/promises";
|
||||
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import type { UpdateChannel } from "../infra/update-channels.js";
|
||||
import { resolveUserPath } from "../utils.js";
|
||||
import { discoverMoltbotPlugins } from "./discovery.js";
|
||||
import { discoverOpenClawPlugins } from "./discovery.js";
|
||||
import { installPluginFromNpmSpec, resolvePluginInstallDir } from "./install.js";
|
||||
import { recordPluginInstall } from "./installs.js";
|
||||
import { loadPluginManifest } from "./manifest.js";
|
||||
@@ -25,7 +25,7 @@ export type PluginUpdateOutcome = {
|
||||
};
|
||||
|
||||
export type PluginUpdateSummary = {
|
||||
config: MoltbotConfig;
|
||||
config: OpenClawConfig;
|
||||
changed: boolean;
|
||||
outcomes: PluginUpdateOutcome[];
|
||||
};
|
||||
@@ -38,7 +38,7 @@ export type PluginChannelSyncSummary = {
|
||||
};
|
||||
|
||||
export type PluginChannelSyncResult = {
|
||||
config: MoltbotConfig;
|
||||
config: OpenClawConfig;
|
||||
changed: boolean;
|
||||
summary: PluginChannelSyncSummary;
|
||||
};
|
||||
@@ -62,7 +62,7 @@ async function readInstalledPackageVersion(dir: string): Promise<string | undefi
|
||||
function resolveBundledPluginSources(params: {
|
||||
workspaceDir?: string;
|
||||
}): Map<string, BundledPluginSource> {
|
||||
const discovery = discoverMoltbotPlugins({ workspaceDir: params.workspaceDir });
|
||||
const discovery = discoverOpenClawPlugins({ workspaceDir: params.workspaceDir });
|
||||
const bundled = new Map<string, BundledPluginSource>();
|
||||
|
||||
for (const candidate of discovery.candidates) {
|
||||
@@ -73,7 +73,7 @@ function resolveBundledPluginSources(params: {
|
||||
if (bundled.has(pluginId)) continue;
|
||||
|
||||
const npmSpec =
|
||||
candidate.packageMoltbot?.install?.npmSpec?.trim() ||
|
||||
candidate.packageManifest?.install?.npmSpec?.trim() ||
|
||||
candidate.packageName?.trim() ||
|
||||
undefined;
|
||||
|
||||
@@ -127,7 +127,7 @@ function buildLoadPathHelpers(existing: string[]) {
|
||||
}
|
||||
|
||||
export async function updateNpmInstalledPlugins(params: {
|
||||
config: MoltbotConfig;
|
||||
config: OpenClawConfig;
|
||||
logger?: PluginUpdateLogger;
|
||||
pluginIds?: string[];
|
||||
skipIds?: Set<string>;
|
||||
@@ -290,7 +290,7 @@ export async function updateNpmInstalledPlugins(params: {
|
||||
}
|
||||
|
||||
export async function syncPluginsForUpdateChannel(params: {
|
||||
config: MoltbotConfig;
|
||||
config: OpenClawConfig;
|
||||
channel: UpdateChannel;
|
||||
workspaceDir?: string;
|
||||
logger?: PluginUpdateLogger;
|
||||
|
||||
Reference in New Issue
Block a user