惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
L
LangChain Blog
爱范儿
爱范儿
博客园_首页
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 三生石上(FineUI控件)
大猫的无限游戏
大猫的无限游戏
宝玉的分享
宝玉的分享
GbyAI
GbyAI
H
Help Net Security
A
About on SuperTechFans
Recent Announcements
Recent Announcements
Hugging Face - Blog
Hugging Face - Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
D
Docker
博客园 - Franky
有赞技术团队
有赞技术团队
G
Google Developers Blog

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - wrsrsh/hinge-ts
warisareshi · 2026-06-17 · via Hacker News: Show HN

Typed browser SDK for Hinge automation, with Hinge REST, Sendbird chat, session persistence, redacted logging, and raw escape hatches.

This package is a TypeScript port of https://github.com/f0rr0/hinge-rs/.

This package is unofficial and is not affiliated with Hinge, Match Group, or Sendbird.

Install

Runtime Model

hinge-ts is browser-first. Full network access runs through your proxy:

  • browser app owns SDK state, types, persistence, and API calls
  • proxy performs upstream Hinge and Sendbird requests with SDK-generated headers
  • proxy relays Sendbird WebSocket frames because browser WebSocket cannot set the required custom handshake headers

Use BrowserFetchTransport only for environments where direct upstream requests are explicitly allowed.

Login

import {
  BrowserStorage,
  Email2FAError,
  HingeClient,
  HingeProxyTransport,
  ProxySendbirdRealtimeTransport
} from "hinge-ts";

const proxyToken = "your-short-lived-proxy-token";

const client = HingeClient.builder()
  .phoneNumber("+15555550123")
  .transport(new HingeProxyTransport({
    baseUrl: "/api/hinge-proxy",
    headers: { authorization: `Bearer ${proxyToken}` }
  }))
  .realtimeTransport(
    new ProxySendbirdRealtimeTransport({
      url: `/api/hinge-proxy/ws/sendbird?token=${encodeURIComponent(proxyToken)}`
    })
  )
  .storage(new BrowserStorage())
  .build();

await client.auth.initiateSms();

try {
  await client.auth.submitOtp("123456");
} catch (error) {
  if (error instanceof Email2FAError) {
    await client.auth.submitEmailCode(error.caseId, "654321");
  } else {
    throw error;
  }
}

await client.persistence.saveSession("session.json");

Use

await client.persistence.loadSession("session.json");

const recs = await client.recommendations.get();
const me = await client.profiles.me();
const likes = await client.likes.list();

await client.ratings.skip({
  subjectId: recs.feeds[0].subjects[0].subjectId,
  ratingToken: recs.feeds[0].subjects[0].ratingToken
});

await client.chat.sendMessage({
  ays: false,
  matchMessage: true,
  messageType: "text",
  messageData: { message: "hey" },
  subjectId: "peer-user-id",
  origin: "connection"
});

Realtime Chat

const subscription = await client.chat.subscribeEvents();

for await (const event of subscription) {
  if (event.kind === "typing") {
    console.log(event.event.channelUrl);
  }
}

Commands:

await client.chat.markRead("channel-url");
await client.chat.typingStart("channel-url");
await client.chat.typingEnd("channel-url");
await client.chat.ackMessage("channel-url", "message-id");
await client.chat.closeWs({ code: 1000, reason: "done" });

API Surface

Group Methods
auth initiateSms, submitOtp, submitEmailCode, isSessionValid, loadTokensSecure
recommendations get, getWithParams, repeatProfiles, save, load, cached, remove
profiles me, content, preferences, public, publicContent, update, updatePreferences, updateAnswers, deleteContent
likes limit, list, listRaw, subject, matchNote
ratings skip, rateUser, respond
prompts list, manager, text, search, byCategory, payload, evaluateAnswer, createPromptPoll, createVideoPrompt
connections list, detail, matchNote, standouts
settings preferences, updatePreferences, content, updateContent, auth, notifications, userTraits, accountInfo, exportStatus
chat credentials, channels, channel, messages, fullMessages, sendMessage, subscribeEvents, markRead, typingStart, typingEnd
persistence saveSession, loadSession, configure
raw hinge, sendbird

Proxy Contract

REST proxy endpoint:

POST /api/hinge-proxy/request

Body:

{
  "service": "hinge",
  "method": "POST",
  "pathOrUrl": "/auth/sms/v2/initiate",
  "url": "https://prod-api.hingeaws.net/auth/sms/v2/initiate",
  "headers": {},
  "body": {},
  "responseType": "json"
}

Realtime proxy endpoint:

GET /api/hinge-proxy/ws/sendbird?token=...

The browser sends a connect payload first. The proxy opens the upstream Sendbird socket with the provided headers, then relays text frames both ways.

Use an Authorization header for REST calls and a short-lived query token for the realtime socket.

See docs/proxy.md, docs/deploy.md, and examples.

Docs

Development

npm install
npm test
npm run pack:dry

Publish

npm login
npm test
npm run pack:dry
npm publish

prepack builds dist/ automatically.

GitHub Actions publishing:

  1. On npm, open hinge-ts package settings.
  2. Add a trusted publisher:
    • provider: GitHub Actions
    • organization/user: wrsrsh
    • repository: hinge-ts
    • workflow filename: publish.yml
    • environment name: npm
    • allowed action: npm publish
  3. Publish by tagging the package version:
npm version patch
git push origin main --tags

The workflow runs typecheck, tests, dry pack, checks the tag matches package.json, then publishes to npm. If that version already exists, the publish step is skipped instead of failing the run.

The same workflow also publishes a GitHub Packages copy as @wrsrsh/hinge-ts. It keeps the npmjs package name as hinge-ts, prepares a temporary manifest for GitHub Packages, and publishes with GITHUB_TOKEN.

Install the GitHub Packages copy with:

npm install @wrsrsh/hinge-ts --registry=https://npm.pkg.github.com

License

MIT.