mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-29 09:02:02 +03:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -86,7 +86,7 @@ function findPackageRoot(startDir: string, name: string): string | null {
|
||||
}
|
||||
}
|
||||
|
||||
function resolveClawdbotRoot(): string {
|
||||
function resolveMoltbotRoot(): string {
|
||||
if (coreRootCache) return coreRootCache;
|
||||
const override = process.env.MOLTBOT_ROOT?.trim() || process.env.CLAWDBOT_ROOT?.trim();
|
||||
if (override) {
|
||||
@@ -107,7 +107,7 @@ function resolveClawdbotRoot(): string {
|
||||
}
|
||||
|
||||
for (const start of candidates) {
|
||||
for (const name of ["moltbot", "clawdbot"]) {
|
||||
for (const name of ["moltbot", "moltbot"]) {
|
||||
const found = findPackageRoot(start, name);
|
||||
if (found) {
|
||||
coreRootCache = found;
|
||||
@@ -122,7 +122,7 @@ function resolveClawdbotRoot(): string {
|
||||
}
|
||||
|
||||
async function importCoreModule<T>(relativePath: string): Promise<T> {
|
||||
const root = resolveClawdbotRoot();
|
||||
const root = resolveMoltbotRoot();
|
||||
const distPath = path.join(root, "dist", relativePath);
|
||||
if (!fs.existsSync(distPath)) {
|
||||
throw new Error(
|
||||
|
||||
@@ -47,7 +47,7 @@ describe("CallManager", () => {
|
||||
fromNumber: "+15550000000",
|
||||
});
|
||||
|
||||
const storePath = path.join(os.tmpdir(), `clawdbot-voice-call-test-${Date.now()}`);
|
||||
const storePath = path.join(os.tmpdir(), `moltbot-voice-call-test-${Date.now()}`);
|
||||
const manager = new CallManager(config, storePath);
|
||||
manager.initialize(new FakeProvider(), "https://example.com/voice/webhook");
|
||||
|
||||
@@ -80,7 +80,7 @@ describe("CallManager", () => {
|
||||
fromNumber: "+15550000000",
|
||||
});
|
||||
|
||||
const storePath = path.join(os.tmpdir(), `clawdbot-voice-call-test-${Date.now()}`);
|
||||
const storePath = path.join(os.tmpdir(), `moltbot-voice-call-test-${Date.now()}`);
|
||||
const provider = new FakeProvider();
|
||||
const manager = new CallManager(config, storePath);
|
||||
manager.initialize(provider, "https://example.com/voice/webhook");
|
||||
|
||||
@@ -12,7 +12,7 @@ import type { VoiceCallConfig } from "./config.js";
|
||||
export type VoiceResponseParams = {
|
||||
/** Voice call config */
|
||||
voiceConfig: VoiceCallConfig;
|
||||
/** Core Clawdbot config */
|
||||
/** Core Moltbot config */
|
||||
coreConfig: CoreConfig;
|
||||
/** Call ID for session tracking */
|
||||
callId: string;
|
||||
|
||||
Reference in New Issue
Block a user