refactor: remove token-refresh, use env-based auth only
Delete token-refresh.ts and credentials.json sync. Auth is now via CLAUDE_CODE_OAUTH_TOKEN in .env (1-year setup-token). No more auto-refresh loop or credentials.json dependency.
This commit is contained in:
@@ -57,10 +57,6 @@ import {
|
||||
isSessionCommandAllowed,
|
||||
} from './session-commands.js';
|
||||
import { startSchedulerLoop } from './task-scheduler.js';
|
||||
import {
|
||||
startTokenRefreshLoop,
|
||||
stopTokenRefreshLoop,
|
||||
} from './token-refresh.js';
|
||||
import { Channel, ChannelMeta, NewMessage, RegisteredGroup } from './types.js';
|
||||
import { logger } from './logger.js';
|
||||
|
||||
@@ -1017,7 +1013,6 @@ async function main(): Promise<void> {
|
||||
// Graceful shutdown handlers
|
||||
const shutdown = async (signal: string) => {
|
||||
logger.info({ signal }, 'Shutdown signal received');
|
||||
stopTokenRefreshLoop();
|
||||
await queue.shutdown(10000);
|
||||
for (const ch of channels) await ch.disconnect();
|
||||
process.exit(0);
|
||||
@@ -1077,9 +1072,6 @@ async function main(): Promise<void> {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Start OAuth token auto-refresh (before subsystems that spawn agents)
|
||||
startTokenRefreshLoop();
|
||||
|
||||
// Start subsystems (independently of connection handler)
|
||||
startSchedulerLoop({
|
||||
registeredGroups: () => registeredGroups,
|
||||
|
||||
Reference in New Issue
Block a user