feat(reddit): honest tiering — OpenCLI / rdt-cli, no zero-config path

- live-verified 2026-06: anonymous .json endpoints are 403-blocked (all
  variants) and the official API closed self-service registration in
  2025-11 — so the channel now says plainly: every Reddit backend needs
  a logged-in session, mainland China needs a proxy
- backends = [OpenCLI, rdt-cli]: OpenCLI rides the browser session
  (desktop preferred); rdt-cli stays for servers and existing installs
  (upstream unmaintained since 2026-03, noted in the ok message)
- install: desktop routes to OpenCLI, server installs rdt-cli from the
  pinned git source (split out as _install_rdt_cli)
- skill/references/social.md: Reddit section rewritten as two backend
  command groups + a PRAW note scoped to users who already hold
  pre-2025-11 credentials (explicitly not recommended for new users)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Pnant
2026-06-11 16:10:04 +08:00
parent 3e5f9df5b8
commit d7551bf19d
5 changed files with 156 additions and 38 deletions
+18 -1
View File
@@ -774,7 +774,24 @@ def _install_opencli_deps():
def _install_reddit_deps():
"""Install rdt-cli for Reddit search + reading."""
"""Set up Reddit — desktop prefers OpenCLI, rdt-cli for servers/legacy.
No zero-config path exists (anonymous .json blocked, official API
approval-gated since 2025-11) — every backend needs a logged-in session.
"""
if _detect_environment() != "server":
_install_opencli_deps()
print(" Reddit 走 OpenCLI(浏览器里登录过 reddit.com 即可用)")
import shutil
if shutil.which("rdt"):
print(" ✅ 检测到存量 rdt-cli,将作为备选后端继续可用")
return
_install_rdt_cli()
def _install_rdt_cli():
"""Install rdt-cli (pinned git source — PyPI lags upstream)."""
import shutil
import subprocess