runtime: canonicalize Claude token env names

This commit is contained in:
ejclaw
2026-04-11 14:32:43 +09:00
parent 91caf81069
commit e458382d3d
9 changed files with 102 additions and 30 deletions

View File

@@ -34,6 +34,17 @@ describe('verify state helpers', () => {
expect(detectCredentials(tempRoot)).toBe('configured');
});
it('detects configured multi-account credentials from .env', () => {
const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'ejclaw-verify-'));
tempRoots.push(tempRoot);
fs.writeFileSync(
path.join(tempRoot, '.env'),
'CLAUDE_CODE_OAUTH_TOKENS=test-token-1,test-token-2\n',
);
expect(detectCredentials(tempRoot)).toBe('configured');
});
it('detects canonical role-based channel auth names from process env', () => {
expect(
detectChannelAuth(