style: format agent rotation updates

This commit is contained in:
Eyejoker
2026-03-24 17:09:17 +09:00
parent 8b2c46b89e
commit 744e2ce6e2
5 changed files with 9 additions and 12 deletions

View File

@@ -20,10 +20,7 @@ import {
} from './platform-prompts.js';
import type { AgentType, RegisteredGroup } from './types.js';
function writeCodexApiKeyAuth(
authPath: string,
openaiKey: string,
): void {
function writeCodexApiKeyAuth(authPath: string, openaiKey: string): void {
fs.writeFileSync(
authPath,
JSON.stringify(

View File

@@ -621,7 +621,9 @@ export class GroupQueue {
if (graceWaitMs > 0) {
await Promise.race([
Promise.all(
activeProcesses.map(({ process }) => this.waitForProcessExit(process)),
activeProcesses.map(({ process }) =>
this.waitForProcessExit(process),
),
),
new Promise((resolve) => setTimeout(resolve, graceWaitMs)),
]);

View File

@@ -74,9 +74,7 @@ function isClaudeUsageExhaustedMessage(text: string): boolean {
function isClaudeAuthExpiredMessage(text: string): boolean {
const normalized = text.trim().toLowerCase().replace(/\s+/g, ' ');
const looksLikeAuthFailure = normalized.startsWith(
'failed to authenticate',
);
const looksLikeAuthFailure = normalized.startsWith('failed to authenticate');
const hasExpiredTokenMarker =
normalized.includes('oauth token has expired') ||
normalized.includes('authentication_error') ||

View File

@@ -104,7 +104,9 @@ describe('provider fallback usage recovery', () => {
it('treats terminated 401 auth failures as an auth-expired fallback trigger', () => {
expect(
detectFallbackTrigger('Failed to authenticate. API Error: 401 terminated'),
detectFallbackTrigger(
'Failed to authenticate. API Error: 401 terminated',
),
).toEqual({
shouldFallback: true,
reason: 'auth-expired',

View File

@@ -94,9 +94,7 @@ function isClaudeUsageExhaustedMessage(text: string): boolean {
function isClaudeAuthExpiredMessage(text: string): boolean {
const normalized = text.trim().toLowerCase().replace(/\s+/g, ' ');
const looksLikeAuthFailure = normalized.startsWith(
'failed to authenticate',
);
const looksLikeAuthFailure = normalized.startsWith('failed to authenticate');
const hasExpiredTokenMarker =
normalized.includes('oauth token has expired') ||
normalized.includes('authentication_error') ||