Skip to content

Commit 96b8efb

Browse files
alpslaclaude
andcommitted
fix(corgea): Use correct API endpoint and auth header
- Change base URL to https://www.corgea.app/api/v1 - Use CORGEA-TOKEN header instead of Bearer auth - Add authHeaderName config option to base API tool 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 874fecd commit 96b8efb

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

packages/agents/src/two-branch/tools/cloud-api/base-api-tool.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export interface CloudAPIConfig {
3131
/** API key or token for authentication */
3232
apiKey: string;
3333

34+
/** Custom auth header name (default: uses 'Authorization: Bearer <key>') */
35+
authHeaderName?: string;
36+
3437
/** Request timeout in milliseconds (default: 300000 = 5 min) */
3538
timeout?: number;
3639

@@ -200,10 +203,15 @@ export abstract class CloudAPIToolBase {
200203
const controller = new AbortController();
201204
const timeoutId = setTimeout(() => controller.abort(), timeout);
202205

206+
// Build auth header based on config
207+
const authHeader = this.config.authHeaderName
208+
? { [this.config.authHeaderName]: this.config.apiKey }
209+
: { 'Authorization': `Bearer ${this.config.apiKey}` };
210+
203211
const response = await fetch(url, {
204212
method,
205213
headers: {
206-
'Authorization': `Bearer ${this.config.apiKey}`,
214+
...authHeader,
207215
'Content-Type': 'application/json',
208216
'Accept': 'application/json',
209217
'User-Agent': 'CodeQual/1.0',

packages/agents/src/two-branch/tools/cloud-api/corgea-fixer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ export class CorgeaFixer extends CloudAPIToolBase {
153153
constructor(config: CorgeaConfig) {
154154
super({
155155
name: 'Corgea',
156-
baseUrl: config.baseUrl || 'https://api.corgea.app',
156+
baseUrl: config.baseUrl || 'https://www.corgea.app/api/v1',
157157
apiKey: config.apiKey,
158+
authHeaderName: 'CORGEA-TOKEN', // Corgea uses custom header, not Bearer
158159
timeout: config.timeout || 300000,
159160
retries: config.retries || 3,
160161
retryDelay: config.retryDelay || 1000

0 commit comments

Comments
 (0)