feat(oauth): zed/trae/windsurf providers + harden callback proxies

- zed live model discovery; codebuddy-intl handler; remove duplicate workbuddy
- split oauth providers.js into per-provider files (facade re-export)
- fold 5 standard refresh providers into config-driven generic
- hide trae/windsurf from registry (no tool calling support)
- fix login-CSRF + SSRF on trae/windsurf/zed local callback proxies
  via loopback-origin guard + strict state validation + apiOrigins allowlist
- move zed RSA private key transit to POST body; redact proxy logs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
decolua
2026-07-25 17:25:19 +07:00
co-authored by Claude Fable 5
parent 783e271c16
commit 8e04fe1734
46 changed files with 4569 additions and 2203 deletions
+15
View File
@@ -198,6 +198,21 @@ export function parseGrokCliBilling(billing, user = null) {
};
}
// SuperGrok weekly shared-pool usage (subscription tier). creditUsagePercent is
// the single total used %; productUsage is a breakdown legend, NOT independent
// quotas — never split it into separate bars.
const usedPct = unwrapVal(
config.creditUsagePercent ?? config.credit_usage_percent ?? root.creditUsagePercent,
NaN,
);
if (Number.isFinite(usedPct) && usedPct >= 0) {
quotas["Weekly SuperGrok"] = makeQuota({
used: Math.max(0, Math.min(100, usedPct)),
total: 100,
resetAt: periodEnd,
});
}
// Opportunistic richer credit envelopes (future / other account types)
const creditBags = [
root.credits,