diff --git a/src/claude-usage.ts b/src/claude-usage.ts index c98bc03..481d00f 100644 --- a/src/claude-usage.ts +++ b/src/claude-usage.ts @@ -253,7 +253,9 @@ export async function fetchClaudeUsageViaCli( }); } -export async function fetchAllClaudeProfiles(): Promise { +export async function fetchAllClaudeProfiles(): Promise< + ClaudeAccountProfile[] +> { return ensureProfiles(); } diff --git a/src/codex-token-rotation.ts b/src/codex-token-rotation.ts index 39f1e5f..7461559 100644 --- a/src/codex-token-rotation.ts +++ b/src/codex-token-rotation.ts @@ -74,7 +74,8 @@ function resolveActiveIndex(accountDirs: string[]): number { const hostAuth = readTextIfExists(path.join(HOST_CODEX_DIR, 'auth.json')); if (hostAuth) { const matchIndex = accountDirs.findIndex( - (accountDir) => readTextIfExists(path.join(accountDir, 'auth.json')) === hostAuth, + (accountDir) => + readTextIfExists(path.join(accountDir, 'auth.json')) === hostAuth, ); if (matchIndex >= 0) { activeIndexCache = matchIndex; @@ -93,7 +94,10 @@ function copyIfExists(src: string, dst: string): void { } function syncHostCodexAccount(accountDir: string): void { - copyIfExists(path.join(accountDir, 'auth.json'), path.join(HOST_CODEX_DIR, 'auth.json')); + copyIfExists( + path.join(accountDir, 'auth.json'), + path.join(HOST_CODEX_DIR, 'auth.json'), + ); } export function getAllCodexAccounts(): CodexAccountState[] { @@ -134,8 +138,7 @@ export function rotateCodexToken(_reason?: string): boolean { const nextIndex = candidates.find( (index) => index !== activeIndex && !rateLimitedAccounts.has(index), - ) ?? - candidates.find((index) => index !== activeIndex); + ) ?? candidates.find((index) => index !== activeIndex); if (nextIndex === undefined) return false; diff --git a/src/task-suspension.ts b/src/task-suspension.ts index 514f808..b3f4555 100644 --- a/src/task-suspension.ts +++ b/src/task-suspension.ts @@ -105,10 +105,7 @@ export function evaluateTaskSuspension( /** * Apply suspension to a task in the DB. */ -export function suspendTask( - taskId: string, - suspendedUntil: string, -): void { +export function suspendTask(taskId: string, suspendedUntil: string): void { updateTask(taskId, { suspended_until: suspendedUntil }); logger.info( { taskId, suspendedUntil }, diff --git a/src/token-rotation.ts b/src/token-rotation.ts index 0c7c7ca..18bb4cd 100644 --- a/src/token-rotation.ts +++ b/src/token-rotation.ts @@ -29,7 +29,10 @@ function syncHostClaudeAccount(accountDir: string): void { path.join(accountDir, '.credentials.json'), path.join(HOST_CLAUDE_DIR, '.credentials.json'), ); - copyIfExists(path.join(accountDir, 'settings.json'), path.join(HOST_CLAUDE_DIR, 'settings.json')); + copyIfExists( + path.join(accountDir, 'settings.json'), + path.join(HOST_CLAUDE_DIR, 'settings.json'), + ); } export function getTokenCount(): number { @@ -47,8 +50,7 @@ export function rotateToken(_reason?: string): boolean { const nextIndex = candidates.find( (index) => index !== activeIndex && !rateLimitedAccounts.has(index), - ) ?? - candidates.find((index) => index !== activeIndex); + ) ?? candidates.find((index) => index !== activeIndex); if (nextIndex === undefined) return false;