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

@@ -6,7 +6,7 @@ import {
resolveModelRefFromString,
} from "../../agents/model-selection.js";
import {
type MoltbotConfig,
type OpenClawConfig,
readConfigFileSnapshot,
writeConfigFile,
} from "../../config/config.js";
@@ -31,8 +31,8 @@ export const formatMs = (value?: number | null) => {
};
export async function updateConfig(
mutator: (cfg: MoltbotConfig) => MoltbotConfig,
): Promise<MoltbotConfig> {
mutator: (cfg: OpenClawConfig) => OpenClawConfig,
): Promise<OpenClawConfig> {
const snapshot = await readConfigFileSnapshot();
if (!snapshot.valid) {
const issues = snapshot.issues.map((issue) => `- ${issue.path}: ${issue.message}`).join("\n");
@@ -43,7 +43,7 @@ export async function updateConfig(
return next;
}
export function resolveModelTarget(params: { raw: string; cfg: MoltbotConfig }): {
export function resolveModelTarget(params: { raw: string; cfg: OpenClawConfig }): {
provider: string;
model: string;
} {
@@ -62,7 +62,7 @@ export function resolveModelTarget(params: { raw: string; cfg: MoltbotConfig }):
return resolved.ref;
}
export function buildAllowlistSet(cfg: MoltbotConfig): Set<string> {
export function buildAllowlistSet(cfg: OpenClawConfig): Set<string> {
const allowed = new Set<string>();
const models = cfg.agents?.defaults?.models ?? {};
for (const raw of Object.keys(models)) {