refactor: rename to openclaw

This commit is contained in:
Peter Steinberger
2026-01-30 03:15:10 +01:00
parent 4583f88626
commit 9a7160786a
2357 changed files with 16688 additions and 16788 deletions

View File

@@ -5,7 +5,7 @@ import { resolveConfigDir, resolveUserPath } from "../utils.js";
import { resolveBundledPluginsDir } from "./bundled-dir.js";
import {
getPackageManifestMetadata,
type MoltbotPackageManifest,
type OpenClawPackageManifest,
type PackageManifest,
} from "./manifest.js";
import type { PluginDiagnostic, PluginOrigin } from "./types.js";
@@ -22,7 +22,7 @@ export type PluginCandidate = {
packageVersion?: string;
packageDescription?: string;
packageDir?: string;
packageMoltbot?: MoltbotPackageManifest;
packageManifest?: OpenClawPackageManifest;
};
export type PluginDiscoveryResult = {
@@ -63,7 +63,7 @@ function deriveIdHint(params: {
if (!rawPackageName) return base;
// Prefer the unscoped name so config keys stay stable even when the npm
// package is scoped (example: @moltbot/voice-call -> voice-call).
// package is scoped (example: @openclaw/voice-call -> voice-call).
const unscoped = rawPackageName.includes("/")
? (rawPackageName.split("/").pop() ?? rawPackageName)
: rawPackageName;
@@ -97,7 +97,7 @@ function addCandidate(params: {
packageVersion: manifest?.version?.trim() || undefined,
packageDescription: manifest?.description?.trim() || undefined,
packageDir: params.packageDir,
packageMoltbot: getPackageManifestMetadata(manifest ?? undefined),
packageManifest: getPackageManifestMetadata(manifest ?? undefined),
});
}
@@ -281,7 +281,7 @@ function discoverFromPath(params: {
}
}
export function discoverMoltbotPlugins(params: {
export function discoverOpenClawPlugins(params: {
workspaceDir?: string;
extraPaths?: string[];
}): PluginDiscoveryResult {
@@ -306,15 +306,17 @@ export function discoverMoltbotPlugins(params: {
}
if (workspaceDir) {
const workspaceRoot = resolveUserPath(workspaceDir);
const workspaceExt = path.join(workspaceRoot, ".clawdbot", "extensions");
discoverInDirectory({
dir: workspaceExt,
origin: "workspace",
workspaceDir: workspaceRoot,
candidates,
diagnostics,
seen,
});
const workspaceExtDirs = [path.join(workspaceRoot, ".openclaw", "extensions")];
for (const dir of workspaceExtDirs) {
discoverInDirectory({
dir,
origin: "workspace",
workspaceDir: workspaceRoot,
candidates,
diagnostics,
seen,
});
}
}
const globalDir = path.join(resolveConfigDir(), "extensions");