refactor: centralize onboarding auth paths

This commit is contained in:
Peter Steinberger
2026-01-13 07:12:17 +00:00
parent ef66ad3b52
commit ba7d12f205
4 changed files with 96 additions and 60 deletions

View File

@@ -155,12 +155,3 @@ export function resolveAgentDir(cfg: ClawdbotConfig, agentId: string) {
const root = resolveStateDir(process.env, os.homedir);
return path.join(root, "agents", id, "agent");
}
/**
* Resolve the agent directory for the default agent without requiring config.
* Used by onboarding when writing auth profiles before config is fully set up.
*/
export function resolveDefaultAgentDir(): string {
const root = resolveStateDir(process.env, os.homedir);
return path.join(root, "agents", DEFAULT_AGENT_ID, "agent");
}