Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
import crypto from "crypto";
/**
* Per-credential fingerprint used by the Zed import 2-step confirmation flow.
*
* SECURITY-AUDITOR-NOTE: This fingerprint lets the dashboard prove to the
* server "yes, the credential I just saw in the discover step is the same one
* I am now authorizing to import" without ever exposing the raw token outside
* the OS keychain. The server re-reads the keychain on the import step and
* filters by fingerprint, so a discover response cannot be replayed to import
* a token that no longer exists. See docs/security/SOCKET_DEV_FINDINGS.md §2.
*/
export function fingerprintZedCredential(
service: string,
account: string,
token: string
): string {
return crypto
.createHash("sha256")
.update(`${service}|${account}|${token}`)
.digest("hex")
.slice(0, 16);
}