feat: add StepFun and Nous Portal provider support (#140)

- Add StepFun provider (API key auth, STEPFUN_API_KEY)
- Add Nous Portal provider with full OAuth device code flow
  (device code request → poll for token → mint agent key → save to auth.json)
- Add NousLoginModal component for OAuth UI (user code display + verification link)
- Update ProviderFormModal to handle Nous OAuth flow (hide API key fields)
- Add nous-auth backend controller and routes
- Update PROVIDER_ENV_MAP with stepfun and nous entries
- Add i18n translations for Nous OAuth in all 8 locales

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ekko
2026-04-23 08:39:19 +08:00
committed by GitHub
parent 696d19298e
commit df797d09b2
16 changed files with 692 additions and 3 deletions
@@ -0,0 +1,29 @@
import { request } from '../client'
export interface NousStartResult {
session_id: string
user_code: string
verification_url: string
expires_in: number
}
export interface NousPollResult {
status: 'pending' | 'approved' | 'denied' | 'expired' | 'error'
error: string | null
}
export interface NousStatusResult {
authenticated: boolean
}
export async function startNousLogin(): Promise<NousStartResult> {
return request<NousStartResult>('/api/hermes/auth/nous/start', { method: 'POST' })
}
export async function pollNousLogin(sessionId: string): Promise<NousPollResult> {
return request<NousPollResult>(`/api/hermes/auth/nous/poll/${sessionId}`)
}
export async function getNousAuthStatus(): Promise<NousStatusResult> {
return request<NousStatusResult>('/api/hermes/auth/nous/status')
}