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

@@ -1,7 +1,7 @@
import path from "node:path";
import { type Api, getEnvApiKey, type Model } from "@mariozechner/pi-ai";
import type { MoltbotConfig } from "../config/config.js";
import type { OpenClawConfig } from "../config/config.js";
import type { ModelProviderAuthMode, ModelProviderConfig } from "../config/types.js";
import { getShellEnvAppliedKeys } from "../infra/shell-env.js";
import { formatCliCommand } from "../cli/command-format.js";
@@ -23,7 +23,7 @@ const AWS_SECRET_KEY_ENV = "AWS_SECRET_ACCESS_KEY";
const AWS_PROFILE_ENV = "AWS_PROFILE";
function resolveProviderConfig(
cfg: MoltbotConfig | undefined,
cfg: OpenClawConfig | undefined,
provider: string,
): ModelProviderConfig | undefined {
const providers = cfg?.models?.providers ?? {};
@@ -45,7 +45,7 @@ function resolveProviderConfig(
}
export function getCustomProviderApiKey(
cfg: MoltbotConfig | undefined,
cfg: OpenClawConfig | undefined,
provider: string,
): string | undefined {
const entry = resolveProviderConfig(cfg, provider);
@@ -54,7 +54,7 @@ export function getCustomProviderApiKey(
}
function resolveProviderAuthOverride(
cfg: MoltbotConfig | undefined,
cfg: OpenClawConfig | undefined,
provider: string,
): ModelProviderAuthMode | undefined {
const entry = resolveProviderConfig(cfg, provider);
@@ -128,7 +128,7 @@ export type ResolvedProviderAuth = {
export async function resolveApiKeyForProvider(params: {
provider: string;
cfg?: MoltbotConfig;
cfg?: OpenClawConfig;
profileId?: string;
preferredProfile?: string;
store?: AuthProfileStore;
@@ -221,7 +221,7 @@ export async function resolveApiKeyForProvider(params: {
[
`No API key found for provider "${provider}".`,
`Auth store: ${authStorePath} (agentDir: ${resolvedAgentDir}).`,
`Configure auth for this agent (${formatCliCommand("moltbot agents add <id>")}) or copy auth-profiles.json from the main agentDir.`,
`Configure auth for this agent (${formatCliCommand("openclaw agents add <id>")}) or copy auth-profiles.json from the main agentDir.`,
].join(" "),
);
}
@@ -294,7 +294,7 @@ export function resolveEnvApiKey(provider: string): EnvApiKeyResult | null {
export function resolveModelAuthMode(
provider?: string,
cfg?: MoltbotConfig,
cfg?: OpenClawConfig,
store?: AuthProfileStore,
): ModelAuthMode | undefined {
const resolved = provider?.trim();
@@ -336,7 +336,7 @@ export function resolveModelAuthMode(
export async function getApiKeyForModel(params: {
model: Model<Api>;
cfg?: MoltbotConfig;
cfg?: OpenClawConfig;
profileId?: string;
preferredProfile?: string;
store?: AuthProfileStore;