refactor: rename to openclaw
This commit is contained in:
@@ -44,7 +44,9 @@ const parseArgs = (): Args => {
|
||||
|
||||
const loadAuthProfiles = (agentId: string) => {
|
||||
const stateRoot =
|
||||
process.env.CLAWDBOT_STATE_DIR?.trim() || path.join(os.homedir(), ".clawdbot");
|
||||
process.env.OPENCLAW_STATE_DIR?.trim() ||
|
||||
process.env.CLAWDBOT_STATE_DIR?.trim() ||
|
||||
path.join(os.homedir(), ".openclaw");
|
||||
const authPath = path.join(stateRoot, "agents", agentId, "agent", "auth-profiles.json");
|
||||
if (!fs.existsSync(authPath)) throw new Error(`Missing: ${authPath}`);
|
||||
const store = JSON.parse(fs.readFileSync(authPath, "utf8")) as {
|
||||
@@ -73,7 +75,7 @@ const fetchAnthropicOAuthUsage = async (token: string) => {
|
||||
Accept: "application/json",
|
||||
"anthropic-version": "2023-06-01",
|
||||
"anthropic-beta": "oauth-2025-04-20",
|
||||
"User-Agent": "moltbot-debug",
|
||||
"User-Agent": "openclaw-debug",
|
||||
},
|
||||
});
|
||||
const text = await res.text();
|
||||
|
||||
Reference in New Issue
Block a user