9router/src/lib/oauth/services
thienpv 706e6513c9 feat(kiro): headless API-key auth + direct Claude/Kiro route
Adds long-lived API-key (ksk_) authentication for Kiro/AWS CodeWhisperer
and a direct claude:kiro / kiro:claude translation route that avoids the
lossy OpenAI two-hop pivot.

- translator: claude-to-kiro request + kiro-to-claude response translators,
  registered on the exact source:target pair (direct route ahead of the
  OpenAI pivot in index.js). claude-to-kiro uses shared schema constants
  (ROLE/CLAUDE_BLOCK/DEFAULT_IMAGE_MIME) per app convention.
- auth: POST /api/oauth/kiro/api-key imports + validates a key via
  ListAvailableProfiles, persists authMethod="api_key" (no refresh token).
- executor: send tokentype: API_KEY header and try *.amazonaws.com hosts
  first for api-key creds; OAuth keeps kiro.dev first.
- fix: never inject the default placeholder profileArn for api-key auth
  (CodeWhisperer 403s an ARN not owned by the key's account).
- ui: API Key method in the Kiro connect modal; surface api-key accounts
  on the Quota Tracker and provider count.
- stream: env-overridable TTFT vs stall timeouts + Kiro keepalive frame.
- tests: claude-kiro-direct + kiro-profile-arn (11 tests).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 10:01:30 +07:00
..
antigravity.js fix(oauth): align antigravity OAuth metadata with official client headers 2026-05-18 15:23:37 +07:00
claude.js Initial commit 2026-01-05 09:58:59 +07:00
codex.js refactor(open-sse): registry consolidation + DRY media/oauth/adhoc cleanup 2026-06-14 13:15:48 +07:00
cursor.js Merge branch 'pr-50' 2026-02-05 11:02:50 +07:00
gemini.js feat(antigravity): initial steps for Antigravity anti-ban alignment 2026-02-20 14:44:29 +07:00
github.js Initial commit 2026-01-05 09:58:59 +07:00
iflow.js Initial commit 2026-01-05 09:58:59 +07:00
index.js refactor(qoder): mirror Kiro's OAuth service layout 2026-05-29 17:36:27 +07:00
kiro.js feat(kiro): headless API-key auth + direct Claude/Kiro route 2026-06-17 10:01:30 +07:00
oauth.js Initial commit 2026-01-05 09:58:59 +07:00
openai.js Initial commit 2026-01-05 09:58:59 +07:00
qoder.js refactor(qoder): mirror Kiro's OAuth service layout 2026-05-29 17:36:27 +07:00
qwen.js Initial commit 2026-01-05 09:58:59 +07:00
xai.js feat(xai): add xAI Grok provider with OAuth + API key auth + image 2026-05-21 11:33:18 +07:00