Commit Graph

63 Commits

Author SHA1 Message Date
Andrew Barnes 9045fee67e fix(reddit): install rdt-cli from GitHub source pinned to 0.4.2 (#326)
PyPI still only has rdt-cli 0.4.1 while the doctor hint required >=0.4.2, so the suggested install command always failed. Installs from the upstream GitHub repo pinned to the 0.4.2 commit instead, and syncs all four docs that still taught the PyPI path. Verified locally: clean-venv install from the pinned source yields rdt 0.4.2 and rdt status works. 86 tests pass. Fixes #294.
2026-06-10 14:59:16 +08:00
Pnant 781496540b fix: correct stale twitter flag, MP3 case match, reddit tier, bird residue (#344)
Four small correctness fixes found while live-testing community PRs:

- SKILL.md taught agents 'twitter search --limit 10' but twitter-cli
  v0.8.5 has no --limit (real flag is -n/--max) — every agent following
  the skill got a usage error
- transcribe_xiaoyuzhou.sh audio regex only matched lowercase .m4a/.mp3;
  current episodes serve uppercase .MP3 (verified on a live episode) —
  add /i flag
- reddit.py declared tier=0 (zero-config) while its own docstring says
  Reddit requires login since 2024 — set tier=1 to match reality (tier
  is doctor display metadata only)
- docs/README_en.md referenced the retired 'bird' CLI name once

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 14:16:25 +08:00
Thomas Lau 0aee897ef4 fix(reddit): detect auth status in doctor check (#261)
fix(reddit): detect auth status in doctor check, show recovery paths
2026-04-13 17:16:19 +08:00
Pgooone a45147c53d fix(wechat): Windows 系统上 doctor 误判微信公众号渠道不可用 (#263)
fix(wechat): Windows GBK encoding causes false negative in doctor check
2026-04-13 17:16:05 +08:00
Pnant e178470320 fix(twitter): support both twitter-cli and bird CLI, never uninstall user tools
CRITICAL FIX: update.md was telling agents to uninstall bird CLI,
which broke users who had working bird installations. Now:

- twitter.py: prefers twitter-cli, falls back to bird/birdx if installed
- update.md: removed "clean up deprecated tools" step entirely
- Added explicit rule: "Never uninstall any existing tools the user already has"
- Tests cover twitter-cli primary + bird fallback + preference order

78 tests passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 23:01:09 +08:00
Pnant 0f9cfe66ec fix(web): add read() via Jina Reader + skill install fallback (#238)
- WebChannel.read(): reads any URL via Jina Reader (r.jina.ai), returns Markdown
- _install_skill(): add fallback from importlib.resources to Path(__file__) for editable installs
- Explicit UTF-8 encoding on all file read/write operations

Inspired by PR #215, implemented correctly (Jina instead of raw requests).

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 18:31:48 +08:00
Pnant bc2d554e13 fix(xiaohongshu): switch from Docker MCP to xhs-cli (pipx install) (#236)
Docker + Cookie import → `pipx install xiaohongshu-cli` + `xhs login`.
Tier downgraded from 2 to 1. xhs-cli (1,477 stars) auto-extracts
cookies from browser, supports search/read/comment/post/hot/feed.

- xiaohongshu.py: check() detects `xhs` binary, parses `xhs status`
- cli.py: install via pipx instead of Docker
- skill/references/social.md: updated XHS commands
- tests: 3 new tests for CLI-based check()
- 77 tests passing

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 17:17:19 +08:00
Pnant 15f161e5b5 fix(reddit,bilibili): switch to rdt-cli and add bili-cli support (#235)
Reddit: Exa crawling had chronic CRAWL_LIVECRAWL_TIMEOUT issues.
rdt-cli (304 stars, public-clis) works without login — search, read
full posts, and comments all verified. Massive improvement.

Bilibili: add bili-cli (590 stars) as optional enhanced backend for
hot/rank/search/feed. yt-dlp remains for video metadata + subtitles.

Also fix UA string (was "agent-reach/1.0", now proper browser UA).

75 tests passing.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 17:04:58 +08:00
Pnant 794455cc9f refactor: remove Discord and Toutiao channels (#234)
Discord only returns server metadata (no messages without Bot Token),
not useful enough. Toutiao search was fragile (HTML scraping). Both
can be revisited when better upstream tools appear.

75 tests passing.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:54:17 +08:00
Pnant 6548a50824 fix(wechat): switch search from miku_ai to Exa, upgrade to tier 0 (#233)
miku_ai (Sogou WeChat search) has been unmaintained for 20 months.
Exa can search AND read WeChat articles via mp.weixin.qq.com domain
filtering — verified: search returns articles, crawling returns full text.
Jina Reader fails on WeChat (CAPTCHA block).

- wechat.py: check() now detects Exa (primary) + Camoufox (optional)
- tier downgraded from 2 to 0 (Exa is zero-config)
- skill/references/web.md: updated WeChat commands to use Exa
- 104 tests passing

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 15:57:54 +08:00
Pnant 21214fd02a fix(xueqiu): add rookiepy as primary cookie backend, keep browser_cookie3 as fallback (#232)
browser_cookie3 has been unmaintained for 15+ months and breaks with
newer browser versions. rookiepy (Rust-based, 345 stars, updated 2026-01)
is now the preferred cookie extraction backend.

- xueqiu.py: try rookiepy first, fallback to browser_cookie3
- cookie_extract.py: same priority order, compatible API wrapper
- Remove bird CLI credential sync (bird repo deleted)
- 104 tests passing

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 15:54:59 +08:00
Pnant c5a304dc20 fix(twitter): migrate from deleted bird CLI to twitter-cli (#231)
steipete/bird repo has been deleted (404). Migrates to twitter-cli
(public-clis/twitter-cli, 2137 stars, Python, actively maintained).

Changes:
- twitter.py: check() now detects `twitter` binary, parses `twitter status` YAML
- cli.py: install via pipx/uv instead of npm, test via `twitter status`
- cli.py: remove bird/xfetch credential sync, use TWITTER_AUTH_TOKEN/CT0 env
- skill references: bird commands → twitter-cli commands
- tests: 5 new tests covering all check() paths

104 tests passing.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 15:51:26 +08:00
Pnant 66883060bc feat(channels): add Discord channel (Exa search + public Invite API) (#230)
Zero-config channel (tier=0). Uses Discord Invite API to read public
server info (no auth), and Exa via mcporter for content search.
Tested: discord.gg/python returns 419K members, description, channel.
104 tests passing.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 15:16:15 +08:00
Pnant f4b3758478 feat(channels): add Toutiao channel with search and read (#229)
Zero-config channel (tier=0). Searches so.toutiao.com by scraping
embedded JSON from script tags. Fixes URL extraction order from PR #207
(article_url is the primary field, not display.info.url). Adds read()
via Jina Reader. 89 tests passing.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 15:11:09 +08:00
biyusku e90fbfe194 fix(youtube): use platform-aware yt-dlp config path and locale-safe reads (#225) 2026-03-31 14:56:16 +08:00
Pnant 5d046ecb61 fix(reddit): switch to Exa-only for search and read, remove proxy dependency
Reddit blocks nearly all non-browser access at IP level (including ISP proxies).
Switch Reddit channel to use Exa exclusively:
- Search: web_search_exa with includeDomains: ["reddit.com"]
- Read: crawling_exa for full post + comments
- check() now verifies Exa availability instead of probing Reddit API
- tier changed from 1 (needs config) to 0 (zero config)
- Removed reddit_proxy from config, CLI, and setup guide
- Updated all docs (README, README_en, install.md, SKILL.md, references)
- Fixed xreach→bird references in references/social.md

Fixes #218, Fixes #222, Fixes #221

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 14:21:31 +08:00
fernando_jacob d793afaba6 fix(xueqiu): fix 400 errors by using browser cookies and correct headers
The Xueqiu stock API requires a login session token (xq_a_token) that
is generated by Xueqiu's frontend JavaScript and cannot be obtained by
simply visiting the homepage. This caused persistent HTTP 400 (error
code 400016) for all users.

Changes:
- _ensure_cookies(): add three-level priority — config file (saved by
  --from-browser) → live Chrome cookies via browser_cookie3 → homepage
  fallback. The homepage-only approach only ever got acw_tc (anti-DDoS
  token), never xq_a_token.
- _get_json(): switch User-Agent from "agent-reach/1.0" to a real Chrome
  UA, and add Referer: https://xueqiu.com/ to all API requests.
- get_hot_posts(): replace the defunct /statuses/hot/listV3.json endpoint
  (returns empty body) with the v4 public timeline endpoint; correctly
  parse item.data as a JSON string to extract author, text, and likes.
- cookie_extract.py: add Xueqiu to PLATFORM_SPECS and configure_from_browser
  so that `agent-reach configure --from-browser chrome` now also saves
  Xueqiu cookies (only when xq_a_token is present).
- check(): improve error message to direct users to --from-browser instead
  of suggesting a proxy.
- Fix urllib.parse.quote usage (was using urllib.request.quote).
- Update tier and backends description to reflect cookie requirement.
- Add 2 new tests: cookie loading from config, Referer/UA header verification.
- Update docs: README, install guide, troubleshooting, SKILL.md, CHANGELOG.
2026-03-27 11:55:14 +08:00
Pnant 3be2a64120 fix: auto-register skill on doctor + add XHS output formatter (#154, #134) (#199)
- Add 'agent-reach skill --install/--uninstall' command for explicit skill management
- Make 'agent-reach doctor' auto-install skill if not present (fixes #154)
- Add format_xhs_result() to strip bloated XHS JSON to essential fields (fixes #134)
- Add 'agent-reach format xhs' CLI command (pipe mcporter output to clean it)
- Update SKILL.md with XHS formatter usage tip
- Add tests for both features (11 new tests, 73/73 total pass)

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
2026-03-23 19:40:57 +08:00
Pnant 470c1288d0 feat: add Xueqiu (雪球) channel (#198)
* feat: add Xueqiu (雪球) channel for stock quotes and community posts

Add a Tier 0 (zero-config) channel for Xueqiu, China's popular stock
market and investment community platform. Uses auto-generated session
cookies via http.cookiejar — no login required.

Supported methods:
- get_stock_quote(symbol) — real-time quotes (A/HK/US markets)
- search_stock(query) — search by name or code
- get_hot_posts(limit) — trending community posts
- get_hot_stocks(limit, stock_type) — popular stocks leaderboard

Inspired by https://github.com/jackwener/opencli xueqiu implementation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add Xueqiu to README platform tables, remove stale Instagram ref

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: fernando_jacob <f.jacob1996@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:44:13 +08:00
Panniantong 7ae0cd8c0a feat(twitter): migrate from xreach to bird CLI
- Replace xreach CLI with bird (@steipete/bird) as Twitter/X backend
- bird uses AUTH_TOKEN/CT0 env vars (simpler than xreach's session.json)
- Accept both 'bird' and 'birdx' binary names
- Remove version detection logic (bird v0.8.0 is the baseline)
- Write credentials.env to ~/.config/bird/ for easy sourcing
- Keep xfetch session.json sync for backward compatibility
- Update SKILL.md commands: bird search/read/user-tweets/thread
- Update install/uninstall to use npm @steipete/bird
- All 52 tests pass
2026-03-23 08:51:22 +01:00
Pnant c1af1cad14 fix(bilibili): add /all/v2 search API check to doctor (#182)
Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 00:26:42 +08:00
Panniantong 1f4154a897 fix(reddit): add User-Agent to doctor health check to avoid false 403
Reddit API requires a non-empty User-Agent header per its API rules.
Without it, the JSON endpoint returns 403 even when Reddit is reachable,
causing doctor to falsely report the channel as unavailable.

Changes:
- Add _reddit_reachable() helper that probes Reddit JSON API with UA
- doctor check() now distinguishes 'actually unreachable' from 'no proxy'
- Users on home IPs get 'ok' when Reddit is reachable; warn only on real failure

Fixes #168
2026-03-15 11:12:25 +01:00
Panniantong 77c62c76fb fix(xiaohongshu): robust JSON parsing + Windows timeouts for doctor check
- Replace brittle '"status": "ok"' string match with proper JSON parsing
  in _mcporter_status_ok(). Handles Windows BOM, CRLF line endings, and
  whitespace variations that caused false negatives on Windows + mcporter 0.7.3.
- Fallback to normalised string matching for backward compatibility.
- Extend config-get timeout to 15 s and list timeout to 30 s on Windows
  (unchanged on Linux/macOS: 5 s / 10 s).

Fixes #159
2026-03-13 07:13:10 +01:00
robert.chen 3416c0f6d3 fix: avoid xreach false alarm and xiaoyuzhou install crash 2026-03-12 19:26:58 +08:00
Kada Liao 31f00b8d78 feat(channels): add V2EX support via public API (zero-config, tier=0)
* feat(channels): add V2EX support via public API

V2EX provides a public JSON API that requires no authentication.
This PR adds:
- agent_reach/channels/v2ex.py: V2EXChannel (tier=0, zero-config)
  - can_handle() matches v2ex.com URLs
  - check() verifies API reachability via urllib (no extra deps)
- Register V2EXChannel in channels/__init__.py
- SKILL.md: add V2EX section with curl examples for hot topics,
  node browsing, topic detail, replies, and user info
- tests/test_channels.py: URL matching + mocked ok/warn check tests

V2EX API endpoints used:
  GET /api/v2/topics/hot          — hot topics
  GET /api/topics/show.json       — node topics / topic detail
  GET /api/replies/show.json      — topic replies
  GET /api/members/show.json      — user info

* feat(channels): expand V2EX channel with data-fetching methods

Add get_hot_topics, get_node_topics, get_topic, get_user, and search
methods to V2EXChannel using stdlib urllib only (no new dependencies).
Update unit tests and SKILL.md with Python call examples.

* feat(v2ex): add data fetching methods to V2EXChannel
2026-03-12 14:29:07 +08:00
Pnant 6737ba6dbd fix(groq): use Config class instead of hardcoded config.json (#136)
Config class writes YAML (config.yaml), but xiaoyuzhou.py, cli.py, and
transcribe.sh were hardcoded to read config.json (JSON format). Users who
configured groq-key via 'agent-reach configure' would not have their key
detected because the wrong file was being read.

Fixes #128 (related to config loading)

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
2026-03-10 14:21:34 +08:00
Pnant 00d80d2169 remove: drop Boss直聘 channel (non-functional) (#135)
Boss直聘 channel removed entirely — upstream mcp-bosszp
triggers account-level bans, making it unusable in practice.

Removed from: channel registry, README (CN/EN), install.md,
SKILL.md, tests, credits.

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
2026-03-10 10:14:59 +08:00
Pnant 55efebd395 fix(twitter): warn when xreach < 0.3.2 (longform tweet support) (#127)
xreach-cli v0.3.2 added:
- extractTweetText() preferring note_tweet.text for long tweets
- X Article URL support (/article/ path)

Previously, doctor reported 'ok' even when the user had v0.3.0/v0.3.1
installed, silently failing to read longform tweets. Now check() reads
`xreach --version` and returns a warn with upgrade instructions if the
version is below 0.3.2.

Closes #126

Co-authored-by: neo_minion1 <minion@openclaw.ai>
2026-03-10 10:08:36 +08:00
Pnant f3daa5cf97 fix(xiaoyuzhou): correct groq-api-key→groq-key in doctor hint and fix check() reading config after configure (#129)
Fixes #128

Two bugs:
1. doctor warn message said 'agent-reach configure groq-api-key' but the
   actual CLI arg is 'groq-key' (see cli.py:75 choices list and :993 handler).
   Same typo existed in cli.py _install_xiaoyuzhou_deps() output.

2. check() had a logic flaw: the inner 'if not has_key' was nested inside
   'if not os.environ.get(...)', so when GROQ_API_KEY env var was absent but
   config.json read succeeded, the outer condition never triggered the warning.
   Refactored to a flat has_key variable — cleaner and correct.

Verified: 36/36 tests pass, manual unit tests confirm warn uses 'groq-key'
and ok is returned when groq_api_key is present in config.json.

Co-authored-by: 小白(Agent) <neo@agent-reach.dev>
2026-03-09 18:18:15 +08:00
Pnant c912051173 feat: 新增小宇宙播客转文字渠道 (#124)
* feat: add Xiaoyuzhou podcast transcription channel

- New channel: 小宇宙播客 (xiaoyuzhoufm.com) → full text transcript
- Uses Groq Whisper API (free, no credit card needed)
- Auto-downloads audio, converts to low-bitrate MP3, splits by 25MB limit
- Supports any length podcast with automatic chunking
- Script installed to ~/.agent-reach/tools/xiaoyuzhou/transcribe.sh
- User just needs: agent-reach configure groq-key gsk_xxxxx
- Updated README (CN/EN), install.md, pyproject.toml

* docs: clarify Xiaoyuzhou setup — free key, limitations, step-by-step

---------

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
2026-03-09 00:34:22 +08:00
Peter Xue 7942f632e5 fix: make doctor checks resilient to slow mcporter calls (#103) 2026-03-08 22:25:50 +08:00
Pnant fedbf95f61 feat: add Weibo as default-install channel via Panniantong fork (#118)
- Weibo now auto-installs during 'agent-reach install' (no login needed)
- Uses Panniantong/mcp-server-weibo fork with visitor passport auth fix
- Works from overseas servers without proxy or cookies
- Updated README (CN/EN), install.md, and channel check to point to fork
- 10 tools: trending, search content/users/topics, profile, feeds, comments

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
2026-03-08 22:25:40 +08:00
AICodeLion db20c5d5d3 feat: add Weibo channel via mcp-server-weibo (#107)
Adds WeiboChannel integrating qinyuanpei/mcp-server-weibo (34+ stars,
MIT, 10 tools) via mcporter. Addresses #75.

Files changed (3 files, +57 lines):
- agent_reach/channels/weibo.py — new channel (54 lines)
- agent_reach/channels/__init__.py — register WeiboChannel
- tests/test_channel_contracts.py — add weibo URL sample

Co-authored-by: AICodeLion <AICodeLion@users.noreply.github.com>
2026-03-08 21:54:35 +08:00
Shawn 3a3d38acce fix: YouTube JS runtime check, Douyin health check, cli bare except, config permission race (#104)
- YouTube: warn when only Node.js is installed but yt-dlp config file
  is missing (previously returned "ok" incorrectly)
- Douyin: use `mcporter list` instead of calling with a hardcoded
  invalid share URL that always fails
- cli: replace bare `except:` with `except Exception:` in
  `_detect_environment` to avoid catching KeyboardInterrupt/SystemExit
- cli: fix unclosed file handle for cloud VM detection
- config: use `os.open()` with 0o600 mode to eliminate permission
  race window when saving credentials
2026-03-08 21:24:05 +08:00
Pnant 476935be92 feat: add WeChat search via miku_ai (sogou) (#68)
- wechat channel now supports both search and read
- Search: miku_ai (sogou weixin search) → article list with URLs
- Read: camoufox (stealth Firefox) → full Markdown content
- Doctor shows granular status (search only / read only / both)
- SKILL.md updated with search + read workflow examples

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
2026-03-04 18:02:05 +08:00
Pnant 4f4ad99d49 feat: add WeChat Official Account channel (#54) (#67)
New channel: wechat (微信公众号文章)
- Backend: wechat-article-for-ai (Camoufox stealth browser)
- Can read mp.weixin.qq.com article URLs → clean Markdown
- Bypasses WeChat anti-bot detection via stealth Firefox
- Doctor checks for camoufox package availability
- SKILL.md updated with usage examples

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
2026-03-04 17:53:39 +08:00
Pnant a91a74d880 fix: Windows encoding + .cmd subprocess resolution (#64) (#66)
- Replace text=True with encoding='utf-8', errors='replace' in all
  subprocess.run calls (channels + cli.py) to fix GBK decode errors
  on Chinese Windows systems
- Use shutil.which() resolved paths in channel subprocess calls to
  handle Windows .cmd wrappers (npm global installs)

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
2026-03-04 17:30:11 +08:00
Panniantong 0d1a33236e fix: YouTube requires JS runtime — auto-configure Node.js in install
yt-dlp now requires an external JS runtime (deno or Node.js) for YouTube.
Since agent-reach already installs Node.js, we configure yt-dlp to use it:

1. cli.py: install writes '--js-runtimes node' to ~/.config/yt-dlp/config
2. youtube.py: doctor checks JS runtime availability and config
3. SKILL.md: updated YouTube section with accurate troubleshooting

Bilibili note: 412 errors are IP-based (needs proxy), not cookie-related.

Fixes #47
2026-02-27 11:45:39 +01:00
Pnant 15a2961dfa Merge pull request #46 from Panniantong/migrate-bird-to-xreach
feat: 迁移 Twitter 后端 bird → xreach CLI
2026-02-27 15:21:25 +08:00
Panniantong 62aacf38b5 feat: migrate Twitter backend from bird CLI to xreach CLI
bird CLI (@steipete/bird) is deprecated and no longer maintained.
xreach CLI (xreach-cli on npm) is our maintained fork with:
- Fixed SearchTimeline (POST + updated query ID)
- Built-in proxy rotation support
- Additional features (DMs, notifications, lists)

Changes across 11 files:
- channels/twitter.py: detect xreach instead of bird/birdx
- cli.py: install/doctor/uninstall all reference xreach-cli
- SKILL.md: updated command examples (bird read → xreach tweet)
- guides/setup-twitter.md: rewritten for xreach
- docs/troubleshooting.md: updated proxy guidance
- README.md + README_en.md: all references updated
- config.py: twitter_bird → twitter_xreach
- core.py, mcp_server.py: comment updates

npm package: https://www.npmjs.com/package/xreach-cli
Source: https://github.com/Panniantong/xfetch
2026-02-27 08:17:51 +01:00
Panniantong d4e437bf2c fix: add ARM64/Apple Silicon support for xiaohongshu-mcp Docker setup
- Detect ARM64 architecture and auto-add --platform linux/amd64 to
  docker run hints in doctor/check output
- Add ARM64 FAQ section to setup guide with two options:
  Rosetta emulation (--platform linux/amd64) or build from source
- Closes #44
2026-02-27 08:06:06 +01:00
Your Name 4b2e6f2ffb fix: split security hardening and setup mcporter config checks 2026-02-27 12:16:00 +08:00
Panniantong 50f2181fcc feat: 新增抖音(Douyin)渠道 - 基于 douyin-mcp-server
- 新增 agent_reach/channels/douyin.py
- 更新 doctor 检测逻辑
- 更新 install.md/SKILL.md/README 文档
- 通过 mcporter 调用 douyin-mcp-server
- 支持视频解析、下载链接获取
- 无需登录即可使用
2026-02-26 13:25:57 +01:00
Panniantong a37e9aa190 refactor: strip to installer + doctor + docs, remove read/search wrapper layer
BREAKING CHANGE: Remove all `agent-reach read` and `agent-reach search-*` commands.

Agent Reach is now an installer, configuration tool, and doctor —
not a wrapper layer. After installation, agents call upstream tools
directly (bird CLI, yt-dlp, mcporter, gh CLI, Jina Reader, etc.).

What's kept:
- agent-reach install: one-shot installer
- agent-reach doctor: channel status overview
- agent-reach configure: cookies, proxy, credentials
- agent-reach setup: interactive wizard
- SKILL.md: complete guide for agents to use upstream tools directly

What's removed:
- agent-reach read URL (and all channel read() methods)
- agent-reach search-* commands (and all channel search() methods)
- ReadResult / SearchResult data classes
- URL routing system (get_channel_for_url)
- All parsing/conversion logic (VTT, Reddit JSON, bird text parser, etc.)
- MCP server read/search tools (kept only get_status)

Net change: -1790 lines. Less code = fewer bugs.
2026-02-26 08:15:56 +01:00
Pnant 1cbf6a7b9c fix(xiaohongshu): 修复 xsec_token 丢失导致无法读取笔记详情 (#17)
问题:搜索结果包含 xsecToken 但被丢弃,read() 只从首页 feed
查找 token,几乎不可能匹配到目标笔记。

修复:
1. search() 返回的 URL 携带 xsec_token 查询参数
2. read() 三级 token 查找:URL 参数 → 首页 feed → 搜索反查
3. 全部失败时回退到 Jina Reader

Fixes #15

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
2026-02-26 14:36:36 +08:00
Panniantong f70711e75e remove(instagram): 移除 Instagram 渠道
Instagram 反爬封杀导致所有开源工具(instaloader 等)失效,
无论有无 cookies 都无法正常使用。

- 删除 instagram.py 渠道文件
- 移除 CLI 中 search-instagram、configure instagram-cookies 等命令
- 移除 setup/doctor 中 instaloader 依赖检查
- 更新 README、docs、SKILL.md、pyproject.toml

上游 issue: instaloader#2585, instaloader#2648
Relates to: #13
2026-02-26 07:20:13 +01:00
Panniantong 12bd727e30 fix: Twitter bird CLI fetch failed — 自动代理注入 + 连通性检测 + Exa fallback
问题:bird CLI 用 Node.js 原生 fetch(),不走 HTTP_PROXY,
导致需要代理的用户(如 Windows + 本地代理)完全无法使用。

修复:
1. 自动代理注入:检测到 HTTP_PROXY/HTTPS_PROXY 时,通过 undici 的
   EnvHttpProxyAgent 让 Node.js fetch 自动走代理,用户无需任何额外配置
2. doctor 检测:实际跑 bird whoami 测连通性,失败时给出具体原因
3. search fallback:bird 搜索失败时自动 fallback 到 Exa
4. install:自动安装 undici(npm install -g undici)
5. 新增 troubleshooting.md:常见问题解决方案

Fixes #9
2026-02-25 21:35:21 +01:00
Panniantong 31eb6db537 fix: use encoding='utf-8' with errors='replace' for bird subprocess calls
Fixes non-UTF-8 character handling in Twitter content.
Replaces text=True with explicit encoding parameters.

Co-authored-by: dev-starlight <dev-starlight@users.noreply.github.com>
Closes #3
2026-02-25 13:44:47 +01:00
Panniantong 5906d4ee3f fix: LinkedIn MCP 参数适配 — 用 company_name/linkedin_username 替代 url
linkedin-scraper-mcp 的 API 参数是 company_name 和 linkedin_username,
不是 url。从 URL 中提取 slug 传给 MCP。
timeout 增加到 60 秒(浏览器自动化需要时间)。
search 去掉不支持的 limit 参数。
2026-02-25 13:16:00 +01:00
Panniantong e8fe33c80c feat: Instagram 支持 Cookie-Editor 导入 + 超时 fallback 优化
- agent-reach configure instagram-cookies 支持 Cookie-Editor Header String
- Instagram cookie 保存到 ~/.agent-reach/instagram-cookies.txt
- instaloader 429 限速时 15 秒自动超时 fallback 到 Jina Reader
- LinkedIn/Boss直聘 保持使用各自 MCP 的原生登录流程(不侵入)
- doctor 提示信息更新
2026-02-25 11:13:52 +01:00