publishport-opencli 1.8.4-pp.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/README.md +300 -0
- package/README.zh-CN.md +341 -0
- package/cli-manifest.json +44212 -0
- package/clis/12306/auth.js +59 -0
- package/clis/12306/me.js +73 -0
- package/clis/12306/orders.js +96 -0
- package/clis/12306/passengers.js +90 -0
- package/clis/12306/price.js +166 -0
- package/clis/12306/stations.js +66 -0
- package/clis/12306/train.js +91 -0
- package/clis/12306/trains.js +166 -0
- package/clis/12306/utils.js +272 -0
- package/clis/12306/utils.test.js +424 -0
- package/clis/1688/assets.js +205 -0
- package/clis/1688/assets.test.js +39 -0
- package/clis/1688/auth.js +46 -0
- package/clis/1688/download.js +77 -0
- package/clis/1688/download.test.js +31 -0
- package/clis/1688/item.js +188 -0
- package/clis/1688/item.test.js +67 -0
- package/clis/1688/search.js +310 -0
- package/clis/1688/search.test.js +75 -0
- package/clis/1688/shared.js +557 -0
- package/clis/1688/shared.test.js +57 -0
- package/clis/1688/store.js +227 -0
- package/clis/1688/store.test.js +62 -0
- package/clis/1point3acres/auth.js +52 -0
- package/clis/1point3acres/digest.js +35 -0
- package/clis/1point3acres/forum.js +51 -0
- package/clis/1point3acres/forums.js +44 -0
- package/clis/1point3acres/hot.js +35 -0
- package/clis/1point3acres/latest.js +35 -0
- package/clis/1point3acres/notifications.js +64 -0
- package/clis/1point3acres/search.js +71 -0
- package/clis/1point3acres/thread.js +117 -0
- package/clis/1point3acres/user.js +77 -0
- package/clis/1point3acres/utils.js +247 -0
- package/clis/36kr/article.js +66 -0
- package/clis/36kr/article.test.js +46 -0
- package/clis/36kr/hot.js +87 -0
- package/clis/36kr/hot.test.js +15 -0
- package/clis/36kr/news.js +52 -0
- package/clis/36kr/news.test.js +85 -0
- package/clis/36kr/search.js +79 -0
- package/clis/51job/company.js +126 -0
- package/clis/51job/detail.js +109 -0
- package/clis/51job/hot.js +56 -0
- package/clis/51job/search.js +80 -0
- package/clis/51job/utils.js +302 -0
- package/clis/51job/utils.test.js +69 -0
- package/clis/_atlassian/shared.js +577 -0
- package/clis/_atlassian/shared.test.js +170 -0
- package/clis/_shared/common.js +32 -0
- package/clis/_shared/desktop-commands.js +112 -0
- package/clis/_shared/search-adapter.js +70 -0
- package/clis/_shared/site-auth.js +118 -0
- package/clis/_shared/site-auth.test.js +98 -0
- package/clis/aibase/news.js +110 -0
- package/clis/aibase/news.test.js +59 -0
- package/clis/amazon/auth.js +53 -0
- package/clis/amazon/bestsellers.js +8 -0
- package/clis/amazon/bestsellers.test.js +29 -0
- package/clis/amazon/discussion.js +123 -0
- package/clis/amazon/discussion.test.js +124 -0
- package/clis/amazon/movers-shakers.js +8 -0
- package/clis/amazon/new-releases.js +8 -0
- package/clis/amazon/offer.js +141 -0
- package/clis/amazon/offer.test.js +29 -0
- package/clis/amazon/product.js +93 -0
- package/clis/amazon/product.test.js +24 -0
- package/clis/amazon/rankings.js +227 -0
- package/clis/amazon/rankings.test.js +41 -0
- package/clis/amazon/search.js +88 -0
- package/clis/amazon/search.test.js +22 -0
- package/clis/amazon/shared.js +365 -0
- package/clis/amazon/shared.test.js +44 -0
- package/clis/antigravity/SKILL.md +38 -0
- package/clis/antigravity/_actions.js +318 -0
- package/clis/antigravity/antigravity.test.js +172 -0
- package/clis/antigravity/audit-extras.js +341 -0
- package/clis/antigravity/delete.js +60 -0
- package/clis/antigravity/dump.js +29 -0
- package/clis/antigravity/extract-code.js +33 -0
- package/clis/antigravity/history.js +26 -0
- package/clis/antigravity/mark-read.js +52 -0
- package/clis/antigravity/model.js +161 -0
- package/clis/antigravity/new.js +26 -0
- package/clis/antigravity/read.js +35 -0
- package/clis/antigravity/rename.js +33 -0
- package/clis/antigravity/send.js +36 -0
- package/clis/antigravity/serve.js +558 -0
- package/clis/antigravity/status.js +19 -0
- package/clis/antigravity/storage.js +366 -0
- package/clis/antigravity/watch.js +43 -0
- package/clis/apple-podcasts/commands.test.js +119 -0
- package/clis/apple-podcasts/episodes.js +29 -0
- package/clis/apple-podcasts/search.js +31 -0
- package/clis/apple-podcasts/top.js +45 -0
- package/clis/apple-podcasts/utils.js +30 -0
- package/clis/apple-podcasts/utils.test.js +57 -0
- package/clis/archive/archive.test.js +262 -0
- package/clis/archive/item.js +92 -0
- package/clis/archive/search.js +115 -0
- package/clis/archive/snapshots.js +129 -0
- package/clis/archive/wayback.js +83 -0
- package/clis/arxiv/arxiv.test.js +112 -0
- package/clis/arxiv/author.js +44 -0
- package/clis/arxiv/paper.js +22 -0
- package/clis/arxiv/recent.js +33 -0
- package/clis/arxiv/search.js +36 -0
- package/clis/arxiv/utils.js +112 -0
- package/clis/autohome/__fixtures__/catalog.html +11 -0
- package/clis/autohome/__fixtures__/koubei.json +116 -0
- package/clis/autohome/autohome.test.js +115 -0
- package/clis/autohome/brand.js +108 -0
- package/clis/autohome/score.js +103 -0
- package/clis/autohome/utils.js +157 -0
- package/clis/baidu-scholar/search.js +87 -0
- package/clis/baidu-scholar/search.test.js +23 -0
- package/clis/band/auth.js +62 -0
- package/clis/band/bands.js +73 -0
- package/clis/band/mentions.js +128 -0
- package/clis/band/post.js +176 -0
- package/clis/band/posts.js +95 -0
- package/clis/barchart/flow.js +116 -0
- package/clis/barchart/greeks.js +208 -0
- package/clis/barchart/greeks.test.js +138 -0
- package/clis/barchart/options.js +107 -0
- package/clis/barchart/quote.js +135 -0
- package/clis/bbc/news.js +42 -0
- package/clis/bbc/topic.js +57 -0
- package/clis/bbc/utils.js +79 -0
- package/clis/bilibili/auth.js +36 -0
- package/clis/bilibili/comment.js +107 -0
- package/clis/bilibili/comment.test.js +153 -0
- package/clis/bilibili/comments.js +136 -0
- package/clis/bilibili/comments.test.js +142 -0
- package/clis/bilibili/download.js +178 -0
- package/clis/bilibili/download.test.js +173 -0
- package/clis/bilibili/dynamic.js +34 -0
- package/clis/bilibili/dynamic.test.js +68 -0
- package/clis/bilibili/favorite.js +47 -0
- package/clis/bilibili/feed.js +220 -0
- package/clis/bilibili/follow.js +140 -0
- package/clis/bilibili/follow.test.js +203 -0
- package/clis/bilibili/following.js +44 -0
- package/clis/bilibili/history.js +45 -0
- package/clis/bilibili/hot.js +40 -0
- package/clis/bilibili/hot.test.js +17 -0
- package/clis/bilibili/me.js +13 -0
- package/clis/bilibili/ranking.js +25 -0
- package/clis/bilibili/search.js +24 -0
- package/clis/bilibili/subtitle.js +141 -0
- package/clis/bilibili/subtitle.test.js +240 -0
- package/clis/bilibili/summary.js +167 -0
- package/clis/bilibili/summary.test.js +210 -0
- package/clis/bilibili/unfollow.js +121 -0
- package/clis/bilibili/user-videos.js +39 -0
- package/clis/bilibili/utils.js +273 -0
- package/clis/bilibili/utils.test.js +97 -0
- package/clis/bilibili/video.js +155 -0
- package/clis/bilibili/video.test.js +308 -0
- package/clis/binance/asks.js +22 -0
- package/clis/binance/commands.test.js +70 -0
- package/clis/binance/depth.js +21 -0
- package/clis/binance/gainers.js +23 -0
- package/clis/binance/klines.js +22 -0
- package/clis/binance/losers.js +23 -0
- package/clis/binance/pairs.js +22 -0
- package/clis/binance/price.js +19 -0
- package/clis/binance/prices.js +20 -0
- package/clis/binance/ticker.js +22 -0
- package/clis/binance/top.js +22 -0
- package/clis/binance/trades.js +21 -0
- package/clis/bloomberg/businessweek.js +125 -0
- package/clis/bloomberg/businessweek.test.js +149 -0
- package/clis/bloomberg/crypto.js +18 -0
- package/clis/bloomberg/economics.js +18 -0
- package/clis/bloomberg/feeds.js +16 -0
- package/clis/bloomberg/green.js +18 -0
- package/clis/bloomberg/industries.js +18 -0
- package/clis/bloomberg/main.js +18 -0
- package/clis/bloomberg/markets.js +18 -0
- package/clis/bloomberg/news.js +106 -0
- package/clis/bloomberg/opinions.js +18 -0
- package/clis/bloomberg/politics.js +18 -0
- package/clis/bloomberg/pursuits.js +18 -0
- package/clis/bloomberg/tech.js +18 -0
- package/clis/bloomberg/utils.js +380 -0
- package/clis/bloomberg/utils.test.js +129 -0
- package/clis/bluesky/feeds.js +28 -0
- package/clis/bluesky/followers.js +28 -0
- package/clis/bluesky/following.js +28 -0
- package/clis/bluesky/profile.js +30 -0
- package/clis/bluesky/search.js +29 -0
- package/clis/bluesky/starter-packs.js +29 -0
- package/clis/bluesky/thread.js +31 -0
- package/clis/bluesky/trending.js +20 -0
- package/clis/bluesky/user.js +35 -0
- package/clis/booking/booking.test.js +356 -0
- package/clis/booking/search.js +351 -0
- package/clis/boss/auth.js +47 -0
- package/clis/boss/batchgreet.js +61 -0
- package/clis/boss/chatlist.js +116 -0
- package/clis/boss/chatlist.test.js +211 -0
- package/clis/boss/chatmsg.js +117 -0
- package/clis/boss/chatmsg.test.js +230 -0
- package/clis/boss/detail.js +63 -0
- package/clis/boss/exchange.js +46 -0
- package/clis/boss/greet.js +49 -0
- package/clis/boss/invite.js +64 -0
- package/clis/boss/joblist.js +31 -0
- package/clis/boss/mark.js +70 -0
- package/clis/boss/recommend.js +45 -0
- package/clis/boss/resume.js +150 -0
- package/clis/boss/search.js +197 -0
- package/clis/boss/search.test.js +78 -0
- package/clis/boss/send.js +44 -0
- package/clis/boss/stats.js +66 -0
- package/clis/boss/utils.js +468 -0
- package/clis/boss/utils.test.js +34 -0
- package/clis/brave/search.js +80 -0
- package/clis/brave/search.test.js +76 -0
- package/clis/chaoxing/assignments.js +76 -0
- package/clis/chaoxing/auth.js +54 -0
- package/clis/chaoxing/exams.js +75 -0
- package/clis/chaoxing/utils.js +223 -0
- package/clis/chaoxing/utils.test.js +45 -0
- package/clis/chatgpt/ask.js +129 -0
- package/clis/chatgpt/auth.js +52 -0
- package/clis/chatgpt/commands.test.js +204 -0
- package/clis/chatgpt/detail.js +63 -0
- package/clis/chatgpt/envelope.test.js +108 -0
- package/clis/chatgpt/history.js +39 -0
- package/clis/chatgpt/image.js +167 -0
- package/clis/chatgpt/image.test.js +207 -0
- package/clis/chatgpt/model.js +31 -0
- package/clis/chatgpt/model.test.js +36 -0
- package/clis/chatgpt/new.js +32 -0
- package/clis/chatgpt/project-file-add.js +74 -0
- package/clis/chatgpt/project-list.js +37 -0
- package/clis/chatgpt/read.js +44 -0
- package/clis/chatgpt/send.js +68 -0
- package/clis/chatgpt/status.js +29 -0
- package/clis/chatgpt/utils.js +2226 -0
- package/clis/chatgpt/utils.test.js +1453 -0
- package/clis/chatgpt-app/ask.js +87 -0
- package/clis/chatgpt-app/ax.js +603 -0
- package/clis/chatgpt-app/ax.test.js +95 -0
- package/clis/chatgpt-app/commands.test.js +45 -0
- package/clis/chatgpt-app/model.js +25 -0
- package/clis/chatgpt-app/new.js +61 -0
- package/clis/chatgpt-app/read.js +32 -0
- package/clis/chatgpt-app/send.js +37 -0
- package/clis/chatgpt-app/status.js +26 -0
- package/clis/chatwise/ask.js +54 -0
- package/clis/chatwise/composer.test.js +186 -0
- package/clis/chatwise/export.js +47 -0
- package/clis/chatwise/history.js +61 -0
- package/clis/chatwise/model.js +85 -0
- package/clis/chatwise/new.js +2 -0
- package/clis/chatwise/read.js +40 -0
- package/clis/chatwise/screenshot.js +2 -0
- package/clis/chatwise/send.js +28 -0
- package/clis/chatwise/status.js +2 -0
- package/clis/chatwise/utils.js +143 -0
- package/clis/chess/analyze.js +35 -0
- package/clis/chess/analyze.test.js +79 -0
- package/clis/chess/game.js +114 -0
- package/clis/chess/game.test.js +178 -0
- package/clis/chess/games.js +67 -0
- package/clis/chess/games.test.js +164 -0
- package/clis/chess/stats.js +32 -0
- package/clis/chess/stats.test.js +79 -0
- package/clis/chess/utils.js +170 -0
- package/clis/chess/utils.test.js +230 -0
- package/clis/claude/ask.js +144 -0
- package/clis/claude/ask.test.js +338 -0
- package/clis/claude/auth.js +55 -0
- package/clis/claude/commands.test.js +118 -0
- package/clis/claude/detail.js +38 -0
- package/clis/claude/history.js +33 -0
- package/clis/claude/new.js +29 -0
- package/clis/claude/read.js +27 -0
- package/clis/claude/send.js +48 -0
- package/clis/claude/status.js +26 -0
- package/clis/claude/utils.js +463 -0
- package/clis/claude/utils.test.js +148 -0
- package/clis/cnki/search.js +61 -0
- package/clis/cnki/search.test.js +18 -0
- package/clis/codex/_actions.js +270 -0
- package/clis/codex/archive.js +37 -0
- package/clis/codex/ask.js +78 -0
- package/clis/codex/dump.js +2 -0
- package/clis/codex/export.js +38 -0
- package/clis/codex/extract-diff.js +45 -0
- package/clis/codex/history.js +27 -0
- package/clis/codex/model.js +264 -0
- package/clis/codex/new.js +2 -0
- package/clis/codex/pin.js +30 -0
- package/clis/codex/projects.js +28 -0
- package/clis/codex/read.js +41 -0
- package/clis/codex/rename.js +86 -0
- package/clis/codex/screenshot.js +2 -0
- package/clis/codex/send.js +51 -0
- package/clis/codex/sidebar.js +356 -0
- package/clis/codex/sidebar.test.js +388 -0
- package/clis/codex/status.js +2 -0
- package/clis/coingecko/categories.js +75 -0
- package/clis/coingecko/coin.js +107 -0
- package/clis/coingecko/coingecko.test.js +109 -0
- package/clis/coingecko/derivatives.js +84 -0
- package/clis/coingecko/exchanges.js +74 -0
- package/clis/coingecko/global.js +71 -0
- package/clis/coingecko/top.js +64 -0
- package/clis/coingecko/trending.js +55 -0
- package/clis/confluence/commands.test.js +195 -0
- package/clis/confluence/create.js +39 -0
- package/clis/confluence/page.js +23 -0
- package/clis/confluence/search.js +34 -0
- package/clis/confluence/shared.js +173 -0
- package/clis/confluence/update.js +38 -0
- package/clis/coupang/add-to-cart.js +149 -0
- package/clis/coupang/auth.js +48 -0
- package/clis/coupang/coupang.test.js +159 -0
- package/clis/coupang/product.js +257 -0
- package/clis/coupang/search.js +474 -0
- package/clis/coupang/utils.js +316 -0
- package/clis/coupang/utils.test.js +62 -0
- package/clis/crates/crate.js +62 -0
- package/clis/crates/search.js +44 -0
- package/clis/crates/utils.js +72 -0
- package/clis/ctrip/auth.js +50 -0
- package/clis/ctrip/ctrip.test.js +719 -0
- package/clis/ctrip/flight.js +136 -0
- package/clis/ctrip/hotel-search.js +132 -0
- package/clis/ctrip/hotel-suggest.js +45 -0
- package/clis/ctrip/search.js +41 -0
- package/clis/ctrip/utils.js +473 -0
- package/clis/cursor/ask.js +74 -0
- package/clis/cursor/composer.js +43 -0
- package/clis/cursor/dump.js +2 -0
- package/clis/cursor/export.js +52 -0
- package/clis/cursor/extract-code.js +36 -0
- package/clis/cursor/history.js +44 -0
- package/clis/cursor/model.js +54 -0
- package/clis/cursor/new.js +2 -0
- package/clis/cursor/read.js +45 -0
- package/clis/cursor/screenshot.js +2 -0
- package/clis/cursor/send.js +41 -0
- package/clis/cursor/status.js +2 -0
- package/clis/dblp/author.js +133 -0
- package/clis/dblp/dblp.test.js +397 -0
- package/clis/dblp/paper.js +40 -0
- package/clis/dblp/search.js +45 -0
- package/clis/dblp/utils.js +290 -0
- package/clis/dblp/venue.js +64 -0
- package/clis/deepseek/ask.js +158 -0
- package/clis/deepseek/ask.test.js +399 -0
- package/clis/deepseek/auth.js +54 -0
- package/clis/deepseek/detail.js +46 -0
- package/clis/deepseek/detail.test.js +81 -0
- package/clis/deepseek/history.js +27 -0
- package/clis/deepseek/new.js +33 -0
- package/clis/deepseek/read.js +25 -0
- package/clis/deepseek/send.js +140 -0
- package/clis/deepseek/send.test.js +107 -0
- package/clis/deepseek/status.js +26 -0
- package/clis/deepseek/utils.js +487 -0
- package/clis/deepseek/utils.test.js +370 -0
- package/clis/defillama/defillama.test.js +99 -0
- package/clis/defillama/protocol.js +84 -0
- package/clis/defillama/protocols.js +55 -0
- package/clis/defillama/utils.js +99 -0
- package/clis/devto/devto.test.js +236 -0
- package/clis/devto/latest.js +74 -0
- package/clis/devto/read.js +103 -0
- package/clis/devto/tag.js +36 -0
- package/clis/devto/top.js +30 -0
- package/clis/devto/user.js +35 -0
- package/clis/dianping/__fixtures__/search.html +168 -0
- package/clis/dianping/__fixtures__/shop.html +6 -0
- package/clis/dianping/auth.js +49 -0
- package/clis/dianping/cityResolver.js +185 -0
- package/clis/dianping/dianping.test.js +578 -0
- package/clis/dianping/search.js +157 -0
- package/clis/dianping/shop.js +173 -0
- package/clis/dianping/utils.js +157 -0
- package/clis/dictionary/examples.js +28 -0
- package/clis/dictionary/search.js +30 -0
- package/clis/dictionary/synonyms.js +28 -0
- package/clis/discord-app/channels.js +26 -0
- package/clis/discord-app/commands.test.js +395 -0
- package/clis/discord-app/delete.js +115 -0
- package/clis/discord-app/goto.js +38 -0
- package/clis/discord-app/members.js +39 -0
- package/clis/discord-app/read.js +42 -0
- package/clis/discord-app/search.js +67 -0
- package/clis/discord-app/send.js +28 -0
- package/clis/discord-app/servers.js +26 -0
- package/clis/discord-app/status.js +17 -0
- package/clis/discord-app/thread-read.js +45 -0
- package/clis/discord-app/threads.js +37 -0
- package/clis/discord-app/utils.js +610 -0
- package/clis/dockerhub/image.js +52 -0
- package/clis/dockerhub/search.js +47 -0
- package/clis/dockerhub/utils.js +100 -0
- package/clis/dongchedi/__fixtures__/search.json +60 -0
- package/clis/dongchedi/__fixtures__/series-detail.json +911 -0
- package/clis/dongchedi/__fixtures__/series-score.json +1396 -0
- package/clis/dongchedi/dongchedi.test.js +191 -0
- package/clis/dongchedi/koubei.js +85 -0
- package/clis/dongchedi/models.js +91 -0
- package/clis/dongchedi/score.js +83 -0
- package/clis/dongchedi/search.js +83 -0
- package/clis/dongchedi/series.js +87 -0
- package/clis/dongchedi/specs.js +115 -0
- package/clis/dongchedi/utils.js +180 -0
- package/clis/douban/auth.js +50 -0
- package/clis/douban/book-hot.js +15 -0
- package/clis/douban/download.js +68 -0
- package/clis/douban/download.test.js +170 -0
- package/clis/douban/marks.js +116 -0
- package/clis/douban/movie-hot.js +15 -0
- package/clis/douban/movie-hot.test.js +14 -0
- package/clis/douban/photos.js +35 -0
- package/clis/douban/reviews.js +107 -0
- package/clis/douban/search.js +18 -0
- package/clis/douban/search.test.js +11 -0
- package/clis/douban/subject.js +46 -0
- package/clis/douban/subject.test.js +11 -0
- package/clis/douban/top250.js +68 -0
- package/clis/douban/utils.js +657 -0
- package/clis/douban/utils.test.js +488 -0
- package/clis/doubao/ask.js +40 -0
- package/clis/doubao/auth.js +66 -0
- package/clis/doubao/detail.js +35 -0
- package/clis/doubao/detail.test.js +42 -0
- package/clis/doubao/history.js +30 -0
- package/clis/doubao/history.test.js +37 -0
- package/clis/doubao/meeting-summary.js +41 -0
- package/clis/doubao/meeting-transcript.js +38 -0
- package/clis/doubao/new.js +22 -0
- package/clis/doubao/read.js +21 -0
- package/clis/doubao/send.js +24 -0
- package/clis/doubao/status.js +26 -0
- package/clis/doubao/utils.js +1156 -0
- package/clis/doubao/utils.test.js +396 -0
- package/clis/doubao-app/ask.js +54 -0
- package/clis/doubao-app/dump.js +25 -0
- package/clis/doubao-app/new.js +21 -0
- package/clis/doubao-app/read.js +19 -0
- package/clis/doubao-app/screenshot.js +19 -0
- package/clis/doubao-app/send.js +28 -0
- package/clis/doubao-app/status.js +17 -0
- package/clis/doubao-app/utils.js +110 -0
- package/clis/douyin/_shared/browser-fetch.js +66 -0
- package/clis/douyin/_shared/browser-fetch.test.js +64 -0
- package/clis/douyin/_shared/creation-id.js +5 -0
- package/clis/douyin/_shared/creation-id.test.js +22 -0
- package/clis/douyin/_shared/evaluate-result.js +16 -0
- package/clis/douyin/_shared/imagex-upload.js +53 -0
- package/clis/douyin/_shared/imagex-upload.test.js +87 -0
- package/clis/douyin/_shared/public-api.js +29 -0
- package/clis/douyin/_shared/sts2.js +21 -0
- package/clis/douyin/_shared/sts2.test.js +27 -0
- package/clis/douyin/_shared/text-extra.js +15 -0
- package/clis/douyin/_shared/text-extra.test.js +37 -0
- package/clis/douyin/_shared/timing.js +22 -0
- package/clis/douyin/_shared/timing.test.js +28 -0
- package/clis/douyin/_shared/tos-upload-short-read.test.js +83 -0
- package/clis/douyin/_shared/tos-upload.js +331 -0
- package/clis/douyin/_shared/tos-upload.test.js +229 -0
- package/clis/douyin/_shared/transcode.js +45 -0
- package/clis/douyin/_shared/transcode.test.js +91 -0
- package/clis/douyin/_shared/types.js +1 -0
- package/clis/douyin/_shared/vod-upload.js +212 -0
- package/clis/douyin/_shared/vod-upload.test.js +38 -0
- package/clis/douyin/activities.js +23 -0
- package/clis/douyin/activities.test.js +55 -0
- package/clis/douyin/auth.js +39 -0
- package/clis/douyin/collections.js +23 -0
- package/clis/douyin/collections.test.js +45 -0
- package/clis/douyin/delete.js +152 -0
- package/clis/douyin/delete.test.js +100 -0
- package/clis/douyin/draft.js +355 -0
- package/clis/douyin/draft.test.js +335 -0
- package/clis/douyin/drafts.js +24 -0
- package/clis/douyin/drafts.test.js +11 -0
- package/clis/douyin/hashtag.js +114 -0
- package/clis/douyin/hashtag.test.js +171 -0
- package/clis/douyin/location.js +25 -0
- package/clis/douyin/location.test.js +23 -0
- package/clis/douyin/profile.js +29 -0
- package/clis/douyin/profile.test.js +46 -0
- package/clis/douyin/publish-upload-id.test.js +206 -0
- package/clis/douyin/publish.js +341 -0
- package/clis/douyin/publish.test.js +38 -0
- package/clis/douyin/search.js +308 -0
- package/clis/douyin/search.test.js +307 -0
- package/clis/douyin/stats.js +28 -0
- package/clis/douyin/stats.test.js +22 -0
- package/clis/douyin/update.js +32 -0
- package/clis/douyin/update.test.js +11 -0
- package/clis/douyin/user-videos.js +82 -0
- package/clis/douyin/user-videos.test.js +151 -0
- package/clis/douyin/videos.js +52 -0
- package/clis/douyin/videos.test.js +54 -0
- package/clis/duckduckgo/search.js +131 -0
- package/clis/duckduckgo/search.test.js +128 -0
- package/clis/duckduckgo/suggest.js +45 -0
- package/clis/duckduckgo/suggest.test.js +66 -0
- package/clis/eastmoney/_secid.js +78 -0
- package/clis/eastmoney/announcement.js +53 -0
- package/clis/eastmoney/convertible.js +74 -0
- package/clis/eastmoney/etf.js +66 -0
- package/clis/eastmoney/holders.js +79 -0
- package/clis/eastmoney/hot-rank.js +51 -0
- package/clis/eastmoney/hot-rank.test.js +59 -0
- package/clis/eastmoney/index-board.js +97 -0
- package/clis/eastmoney/kline.js +88 -0
- package/clis/eastmoney/kuaixun.js +55 -0
- package/clis/eastmoney/longhu.js +68 -0
- package/clis/eastmoney/money-flow.js +79 -0
- package/clis/eastmoney/northbound.js +58 -0
- package/clis/eastmoney/quote.js +108 -0
- package/clis/eastmoney/rank.js +95 -0
- package/clis/eastmoney/sectors.js +77 -0
- package/clis/endoflife/endoflife.test.js +51 -0
- package/clis/endoflife/product.js +55 -0
- package/clis/endoflife/utils.js +89 -0
- package/clis/facebook/__fixtures__/notifications-page.html +13 -0
- package/clis/facebook/add-friend.js +44 -0
- package/clis/facebook/auth.js +43 -0
- package/clis/facebook/events.js +41 -0
- package/clis/facebook/feed.js +305 -0
- package/clis/facebook/feed.test.js +169 -0
- package/clis/facebook/friends.js +39 -0
- package/clis/facebook/groups.js +47 -0
- package/clis/facebook/join-group.js +45 -0
- package/clis/facebook/marketplace-inbox.js +84 -0
- package/clis/facebook/marketplace-listings.js +84 -0
- package/clis/facebook/marketplace.test.js +91 -0
- package/clis/facebook/memories.js +36 -0
- package/clis/facebook/notifications.js +333 -0
- package/clis/facebook/notifications.test.js +458 -0
- package/clis/facebook/profile.js +38 -0
- package/clis/facebook/search.js +39 -0
- package/clis/facebook/search.test.js +55 -0
- package/clis/flathub/app.js +71 -0
- package/clis/flathub/flathub.test.js +90 -0
- package/clis/flathub/search.js +80 -0
- package/clis/flathub/utils.js +114 -0
- package/clis/flomo/auth.js +55 -0
- package/clis/flomo/memos.js +228 -0
- package/clis/flomo/memos.test.js +144 -0
- package/clis/gemini/ask.js +51 -0
- package/clis/gemini/ask.test.js +100 -0
- package/clis/gemini/auth.js +48 -0
- package/clis/gemini/commands.test.js +212 -0
- package/clis/gemini/deep-research-result.js +96 -0
- package/clis/gemini/deep-research-result.test.js +155 -0
- package/clis/gemini/deep-research.js +103 -0
- package/clis/gemini/deep-research.test.js +181 -0
- package/clis/gemini/detail.js +82 -0
- package/clis/gemini/history.js +70 -0
- package/clis/gemini/image.js +111 -0
- package/clis/gemini/new.js +22 -0
- package/clis/gemini/read.js +36 -0
- package/clis/gemini/reply-state.test.js +671 -0
- package/clis/gemini/status.js +32 -0
- package/clis/gemini/utils.js +2056 -0
- package/clis/gemini/utils.test.js +392 -0
- package/clis/geogebra/add-circle.js +46 -0
- package/clis/geogebra/add-line.js +35 -0
- package/clis/geogebra/add-point.js +27 -0
- package/clis/geogebra/add-polygon.js +25 -0
- package/clis/geogebra/eval.js +35 -0
- package/clis/geogebra/geogebra.test.js +175 -0
- package/clis/geogebra/hexagon.js +62 -0
- package/clis/geogebra/info.js +72 -0
- package/clis/geogebra/list.js +35 -0
- package/clis/geogebra/triangle.js +60 -0
- package/clis/geogebra/utils.js +271 -0
- package/clis/gitee/auth.js +41 -0
- package/clis/gitee/index.js +3 -0
- package/clis/gitee/search.js +137 -0
- package/clis/gitee/search.test.js +65 -0
- package/clis/gitee/trending.js +568 -0
- package/clis/gitee/user.js +200 -0
- package/clis/gitee/user.test.js +63 -0
- package/clis/github/auth.js +44 -0
- package/clis/github-trending/repos.js +168 -0
- package/clis/github-trending/repos.test.js +149 -0
- package/clis/google/news.js +59 -0
- package/clis/google/search.js +138 -0
- package/clis/google/suggest.js +35 -0
- package/clis/google/trends.js +39 -0
- package/clis/google/utils.js +23 -0
- package/clis/google/utils.test.js +75 -0
- package/clis/google-scholar/cite.js +74 -0
- package/clis/google-scholar/cite.test.js +47 -0
- package/clis/google-scholar/profile.js +92 -0
- package/clis/google-scholar/profile.test.js +49 -0
- package/clis/google-scholar/search.js +73 -0
- package/clis/google-scholar/search.test.js +71 -0
- package/clis/goproxy/goproxy.test.js +103 -0
- package/clis/goproxy/module.js +47 -0
- package/clis/goproxy/utils.js +165 -0
- package/clis/goproxy/versions.js +59 -0
- package/clis/gov-law/commands.test.js +39 -0
- package/clis/gov-law/recent.js +22 -0
- package/clis/gov-law/search.js +41 -0
- package/clis/gov-law/shared.js +51 -0
- package/clis/gov-policy/__fixtures__/recent.html +16 -0
- package/clis/gov-policy/__fixtures__/search.html +41 -0
- package/clis/gov-policy/gov-policy.test.js +224 -0
- package/clis/gov-policy/recent.js +90 -0
- package/clis/gov-policy/search.js +91 -0
- package/clis/gov-policy/utils.js +54 -0
- package/clis/grok/ask.js +77 -0
- package/clis/grok/ask.test.js +29 -0
- package/clis/grok/auth.js +52 -0
- package/clis/grok/delete.js +54 -0
- package/clis/grok/detail.js +60 -0
- package/clis/grok/export-all.js +409 -0
- package/clis/grok/export-utils.js +94 -0
- package/clis/grok/export.js +189 -0
- package/clis/grok/export.test.js +210 -0
- package/clis/grok/history.js +48 -0
- package/clis/grok/image.js +343 -0
- package/clis/grok/image.test.ts +127 -0
- package/clis/grok/new.js +20 -0
- package/clis/grok/pin.js +68 -0
- package/clis/grok/read.js +39 -0
- package/clis/grok/send.js +50 -0
- package/clis/grok/status.js +41 -0
- package/clis/grok/utils.js +640 -0
- package/clis/grok/utils.test.js +141 -0
- package/clis/guazi/__fixtures__/detail.html +7 -0
- package/clis/guazi/__fixtures__/list.html +5 -0
- package/clis/guazi/browse.js +95 -0
- package/clis/guazi/car.js +110 -0
- package/clis/guazi/guazi.test.js +126 -0
- package/clis/guazi/utils.js +133 -0
- package/clis/hackernews/ask.js +31 -0
- package/clis/hackernews/best.js +31 -0
- package/clis/hackernews/hackernews.test.js +132 -0
- package/clis/hackernews/jobs.js +29 -0
- package/clis/hackernews/new.js +31 -0
- package/clis/hackernews/read.js +188 -0
- package/clis/hackernews/search.js +38 -0
- package/clis/hackernews/show.js +31 -0
- package/clis/hackernews/top.js +31 -0
- package/clis/hackernews/user.js +23 -0
- package/clis/hf/auth.js +41 -0
- package/clis/hf/datasets.js +88 -0
- package/clis/hf/hf.test.js +16 -0
- package/clis/hf/models.js +91 -0
- package/clis/hf/paper.js +79 -0
- package/clis/hf/spaces.js +101 -0
- package/clis/hf/top.js +121 -0
- package/clis/homebrew/cask.js +39 -0
- package/clis/homebrew/formula.js +41 -0
- package/clis/homebrew/popular.js +54 -0
- package/clis/homebrew/utils.js +100 -0
- package/clis/huodongxing/events.js +322 -0
- package/clis/huodongxing/events.test.js +296 -0
- package/clis/hupu/__fixtures__/hot-home.html +64 -0
- package/clis/hupu/auth.js +47 -0
- package/clis/hupu/detail.js +72 -0
- package/clis/hupu/hot.js +163 -0
- package/clis/hupu/hot.test.js +224 -0
- package/clis/hupu/like.js +76 -0
- package/clis/hupu/mentions.js +160 -0
- package/clis/hupu/reply.js +72 -0
- package/clis/hupu/search.js +60 -0
- package/clis/hupu/unlike.js +76 -0
- package/clis/hupu/utils.js +319 -0
- package/clis/imdb/person.js +204 -0
- package/clis/imdb/reviews.js +89 -0
- package/clis/imdb/search.js +162 -0
- package/clis/imdb/title.js +94 -0
- package/clis/imdb/top.js +54 -0
- package/clis/imdb/trending.js +53 -0
- package/clis/imdb/utils.js +285 -0
- package/clis/imdb/utils.test.js +88 -0
- package/clis/indeed/indeed.test.js +375 -0
- package/clis/indeed/job.js +86 -0
- package/clis/indeed/search.js +110 -0
- package/clis/indeed/utils.js +152 -0
- package/clis/instagram/_shared/private-publish.js +1030 -0
- package/clis/instagram/_shared/private-publish.test.js +705 -0
- package/clis/instagram/_shared/protocol-capture.js +282 -0
- package/clis/instagram/_shared/protocol-capture.test.js +114 -0
- package/clis/instagram/_shared/runtime-info.js +81 -0
- package/clis/instagram/auth.js +57 -0
- package/clis/instagram/collection-create.js +58 -0
- package/clis/instagram/collection-delete.js +92 -0
- package/clis/instagram/comment.js +48 -0
- package/clis/instagram/download.js +226 -0
- package/clis/instagram/download.test.js +118 -0
- package/clis/instagram/explore.js +42 -0
- package/clis/instagram/follow.js +44 -0
- package/clis/instagram/followers.js +46 -0
- package/clis/instagram/following.js +90 -0
- package/clis/instagram/instagram.test.js +381 -0
- package/clis/instagram/like.js +46 -0
- package/clis/instagram/note.js +223 -0
- package/clis/instagram/note.test.js +53 -0
- package/clis/instagram/post.js +1497 -0
- package/clis/instagram/post.test.js +1647 -0
- package/clis/instagram/profile.js +40 -0
- package/clis/instagram/reel.js +827 -0
- package/clis/instagram/reel.test.js +167 -0
- package/clis/instagram/save.js +46 -0
- package/clis/instagram/saved.js +53 -0
- package/clis/instagram/search.js +39 -0
- package/clis/instagram/story.js +116 -0
- package/clis/instagram/story.test.js +134 -0
- package/clis/instagram/unfollow.js +41 -0
- package/clis/instagram/unlike.js +46 -0
- package/clis/instagram/unsave.js +46 -0
- package/clis/instagram/user.js +49 -0
- package/clis/jd/add-cart.js +72 -0
- package/clis/jd/auth.js +46 -0
- package/clis/jd/cart.js +80 -0
- package/clis/jd/commands.test.js +41 -0
- package/clis/jd/detail.js +63 -0
- package/clis/jd/item.js +730 -0
- package/clis/jd/item.test.js +354 -0
- package/clis/jd/item.test.ts +517 -0
- package/clis/jd/reviews.js +55 -0
- package/clis/jd/search.js +66 -0
- package/clis/jianyu/auth.js +62 -0
- package/clis/jianyu/detail.js +21 -0
- package/clis/jianyu/search.js +634 -0
- package/clis/jianyu/search.test.js +153 -0
- package/clis/jianyu/shared/china-bid-search.js +165 -0
- package/clis/jianyu/shared/procurement-contract.js +324 -0
- package/clis/jianyu/shared/procurement-contract.test.js +72 -0
- package/clis/jianyu/shared/procurement-detail.js +107 -0
- package/clis/jianyu/shared/procurement-detail.test.js +84 -0
- package/clis/jike/auth.js +48 -0
- package/clis/jike/comment.js +107 -0
- package/clis/jike/create.js +106 -0
- package/clis/jike/feed.js +68 -0
- package/clis/jike/like.js +61 -0
- package/clis/jike/notifications.js +169 -0
- package/clis/jike/post.js +72 -0
- package/clis/jike/read.test.js +86 -0
- package/clis/jike/repost.js +103 -0
- package/clis/jike/search.js +68 -0
- package/clis/jike/topic.js +65 -0
- package/clis/jike/user.js +65 -0
- package/clis/jike/utils.js +25 -0
- package/clis/jimeng/auth.js +46 -0
- package/clis/jimeng/generate.js +84 -0
- package/clis/jimeng/history.js +48 -0
- package/clis/jimeng/new.js +44 -0
- package/clis/jimeng/workspaces.js +42 -0
- package/clis/jira/attachments.js +28 -0
- package/clis/jira/commands.test.js +287 -0
- package/clis/jira/comments.js +28 -0
- package/clis/jira/issue.js +28 -0
- package/clis/jira/links.js +28 -0
- package/clis/jira/search.js +47 -0
- package/clis/jira/shared.js +256 -0
- package/clis/juejin/hot.js +37 -0
- package/clis/juejin/juejin.test.js +241 -0
- package/clis/juejin/recommend.js +61 -0
- package/clis/juejin/utils.js +199 -0
- package/clis/ke/auth.js +46 -0
- package/clis/ke/chengjiao.js +78 -0
- package/clis/ke/ershoufang.js +101 -0
- package/clis/ke/utils.js +104 -0
- package/clis/ke/xiaoqu.js +78 -0
- package/clis/ke/zufang.js +95 -0
- package/clis/kimi/_utils.js +110 -0
- package/clis/kimi/audit-extras.js +268 -0
- package/clis/kimi/auth.js +57 -0
- package/clis/kimi/chat.js +470 -0
- package/clis/kimi/kimi.test.js +187 -0
- package/clis/kimi/storage.js +169 -0
- package/clis/kimi/ui.js +314 -0
- package/clis/kimi/usage.js +144 -0
- package/clis/lesswrong/_helpers.js +75 -0
- package/clis/lesswrong/comments.js +65 -0
- package/clis/lesswrong/curated.js +31 -0
- package/clis/lesswrong/frontpage.js +31 -0
- package/clis/lesswrong/frontpage.test.js +37 -0
- package/clis/lesswrong/new.js +31 -0
- package/clis/lesswrong/read.js +46 -0
- package/clis/lesswrong/sequences.js +28 -0
- package/clis/lesswrong/shortform.js +31 -0
- package/clis/lesswrong/tag.js +46 -0
- package/clis/lesswrong/tags.js +28 -0
- package/clis/lesswrong/top-month.js +31 -0
- package/clis/lesswrong/top-week.js +31 -0
- package/clis/lesswrong/top-year.js +31 -0
- package/clis/lesswrong/top.js +31 -0
- package/clis/lesswrong/user-posts.js +42 -0
- package/clis/lesswrong/user.js +45 -0
- package/clis/lichess/lichess.test.js +85 -0
- package/clis/lichess/top.js +46 -0
- package/clis/lichess/user.js +91 -0
- package/clis/lichess/utils.js +97 -0
- package/clis/linkedin/auth.js +62 -0
- package/clis/linkedin/connect.js +524 -0
- package/clis/linkedin/connect.test.js +328 -0
- package/clis/linkedin/inbox.js +234 -0
- package/clis/linkedin/inbox.test.js +152 -0
- package/clis/linkedin/job-detail.js +167 -0
- package/clis/linkedin/job-detail.test.js +38 -0
- package/clis/linkedin/jobs-preferences.js +113 -0
- package/clis/linkedin/jobs-preferences.test.js +43 -0
- package/clis/linkedin/people-search.js +262 -0
- package/clis/linkedin/people-search.test.js +216 -0
- package/clis/linkedin/post-analytics.js +74 -0
- package/clis/linkedin/post-analytics.test.js +40 -0
- package/clis/linkedin/posts-core.js +241 -0
- package/clis/linkedin/posts.js +22 -0
- package/clis/linkedin/posts.test.js +40 -0
- package/clis/linkedin/profile-analytics.js +104 -0
- package/clis/linkedin/profile-analytics.test.js +67 -0
- package/clis/linkedin/profile-experience.js +671 -0
- package/clis/linkedin/profile-experience.test.js +152 -0
- package/clis/linkedin/profile-projects.js +311 -0
- package/clis/linkedin/profile-projects.test.js +111 -0
- package/clis/linkedin/profile-read.js +148 -0
- package/clis/linkedin/profile-read.test.js +77 -0
- package/clis/linkedin/safe-send.js +357 -0
- package/clis/linkedin/safe-send.test.js +204 -0
- package/clis/linkedin/salesnav-inbox.js +210 -0
- package/clis/linkedin/salesnav-inbox.test.js +113 -0
- package/clis/linkedin/salesnav-message.js +360 -0
- package/clis/linkedin/salesnav-message.test.js +172 -0
- package/clis/linkedin/salesnav-search.js +186 -0
- package/clis/linkedin/salesnav-search.test.js +76 -0
- package/clis/linkedin/salesnav-thread.js +212 -0
- package/clis/linkedin/salesnav-thread.test.js +79 -0
- package/clis/linkedin/search.js +462 -0
- package/clis/linkedin/search.test.js +222 -0
- package/clis/linkedin/sent-invitations.js +92 -0
- package/clis/linkedin/sent-invitations.test.js +62 -0
- package/clis/linkedin/services-read.js +213 -0
- package/clis/linkedin/services-read.test.js +105 -0
- package/clis/linkedin/shared.js +124 -0
- package/clis/linkedin/thread-snapshot.js +214 -0
- package/clis/linkedin/thread-snapshot.test.js +89 -0
- package/clis/linkedin/timeline.js +511 -0
- package/clis/linkedin/timeline.test.js +81 -0
- package/clis/linkedin-learning/auth.js +62 -0
- package/clis/linkedin-learning/course.js +138 -0
- package/clis/linkedin-learning/course.test.js +114 -0
- package/clis/linkedin-learning/search.js +155 -0
- package/clis/linkedin-learning/search.test.js +144 -0
- package/clis/linkedin-learning/trending.js +133 -0
- package/clis/linkedin-learning/trending.test.js +123 -0
- package/clis/linux-do/auth.js +55 -0
- package/clis/linux-do/categories.js +50 -0
- package/clis/linux-do/feed.js +395 -0
- package/clis/linux-do/feed.test.js +153 -0
- package/clis/linux-do/search.js +29 -0
- package/clis/linux-do/tags.js +28 -0
- package/clis/linux-do/topic-content.js +155 -0
- package/clis/linux-do/topic-content.test.js +59 -0
- package/clis/linux-do/topic.js +53 -0
- package/clis/linux-do/user-posts.js +57 -0
- package/clis/linux-do/user-topics.js +37 -0
- package/clis/lobsters/active.js +29 -0
- package/clis/lobsters/domain.js +92 -0
- package/clis/lobsters/hot.js +29 -0
- package/clis/lobsters/lobsters.test.js +169 -0
- package/clis/lobsters/newest.js +29 -0
- package/clis/lobsters/read.js +196 -0
- package/clis/lobsters/tag.js +35 -0
- package/clis/maimai/auth.js +47 -0
- package/clis/maimai/search-talents.js +192 -0
- package/clis/maimai/search-talents.test.js +29 -0
- package/clis/manus/_utils.js +133 -0
- package/clis/manus/auth.js +54 -0
- package/clis/manus/connectors.js +40 -0
- package/clis/manus/credits.js +39 -0
- package/clis/manus/list.js +66 -0
- package/clis/manus/manus.test.js +382 -0
- package/clis/manus/read.js +63 -0
- package/clis/manus/skills.js +61 -0
- package/clis/manus/status.js +43 -0
- package/clis/maven/artifact.js +49 -0
- package/clis/maven/search.js +51 -0
- package/clis/maven/utils.js +110 -0
- package/clis/mdn/search.js +97 -0
- package/clis/medium/feed.js +16 -0
- package/clis/medium/search.js +16 -0
- package/clis/medium/tag.js +135 -0
- package/clis/medium/user.js +16 -0
- package/clis/medium/utils.js +79 -0
- package/clis/mubu/doc.js +41 -0
- package/clis/mubu/docs.js +44 -0
- package/clis/mubu/notes.js +245 -0
- package/clis/mubu/recent.js +28 -0
- package/clis/mubu/search.js +63 -0
- package/clis/mubu/utils.js +304 -0
- package/clis/notebooklm/add-source.js +269 -0
- package/clis/notebooklm/add-source.test.js +97 -0
- package/clis/notebooklm/auth.js +55 -0
- package/clis/notebooklm/compat.test.js +16 -0
- package/clis/notebooklm/create.js +76 -0
- package/clis/notebooklm/create.test.js +58 -0
- package/clis/notebooklm/current.js +28 -0
- package/clis/notebooklm/generate-audio.js +91 -0
- package/clis/notebooklm/generate-audio.test.js +63 -0
- package/clis/notebooklm/generate-slides.js +106 -0
- package/clis/notebooklm/generate-slides.test.js +75 -0
- package/clis/notebooklm/get.js +37 -0
- package/clis/notebooklm/history.js +25 -0
- package/clis/notebooklm/history.test.js +58 -0
- package/clis/notebooklm/list.js +36 -0
- package/clis/notebooklm/note-list.js +28 -0
- package/clis/notebooklm/note-list.test.js +56 -0
- package/clis/notebooklm/notes-get.js +47 -0
- package/clis/notebooklm/notes-get.test.js +72 -0
- package/clis/notebooklm/open.js +42 -0
- package/clis/notebooklm/open.test.js +63 -0
- package/clis/notebooklm/rpc.js +203 -0
- package/clis/notebooklm/rpc.test.js +131 -0
- package/clis/notebooklm/shared.js +3 -0
- package/clis/notebooklm/source-fulltext.js +44 -0
- package/clis/notebooklm/source-fulltext.test.js +106 -0
- package/clis/notebooklm/source-get.js +40 -0
- package/clis/notebooklm/source-get.test.js +84 -0
- package/clis/notebooklm/source-guide.js +44 -0
- package/clis/notebooklm/source-guide.test.js +104 -0
- package/clis/notebooklm/source-list.js +30 -0
- package/clis/notebooklm/status.js +31 -0
- package/clis/notebooklm/summary.js +30 -0
- package/clis/notebooklm/summary.test.js +78 -0
- package/clis/notebooklm/utils.js +814 -0
- package/clis/notebooklm/utils.test.js +449 -0
- package/clis/notebooklm/write-note.js +103 -0
- package/clis/notebooklm/write-note.test.js +70 -0
- package/clis/nowcoder/auth.js +65 -0
- package/clis/nowcoder/companies.js +24 -0
- package/clis/nowcoder/creators.js +28 -0
- package/clis/nowcoder/detail.js +62 -0
- package/clis/nowcoder/experience.js +37 -0
- package/clis/nowcoder/hot.js +25 -0
- package/clis/nowcoder/jobs.js +22 -0
- package/clis/nowcoder/notifications.js +30 -0
- package/clis/nowcoder/papers.js +41 -0
- package/clis/nowcoder/practice.js +38 -0
- package/clis/nowcoder/recommend.js +31 -0
- package/clis/nowcoder/referral.js +40 -0
- package/clis/nowcoder/salary.js +41 -0
- package/clis/nowcoder/search.js +50 -0
- package/clis/nowcoder/suggest.js +34 -0
- package/clis/nowcoder/topics.js +28 -0
- package/clis/nowcoder/trending.js +26 -0
- package/clis/npm/downloads.js +59 -0
- package/clis/npm/package.js +70 -0
- package/clis/npm/search.js +49 -0
- package/clis/npm/utils.js +76 -0
- package/clis/nuget/nuget.test.js +111 -0
- package/clis/nuget/package.js +101 -0
- package/clis/nuget/search.js +69 -0
- package/clis/nuget/utils.js +87 -0
- package/clis/nvd/cve.js +121 -0
- package/clis/oeis/oeis.test.js +88 -0
- package/clis/oeis/search.js +63 -0
- package/clis/oeis/sequence.js +71 -0
- package/clis/oeis/utils.js +88 -0
- package/clis/ones/common.js +144 -0
- package/clis/ones/enrich-tasks.js +37 -0
- package/clis/ones/login.js +81 -0
- package/clis/ones/logout.js +18 -0
- package/clis/ones/me.js +31 -0
- package/clis/ones/my-tasks.js +121 -0
- package/clis/ones/resolve-labels.js +64 -0
- package/clis/ones/task-helpers.js +212 -0
- package/clis/ones/task-helpers.test.js +12 -0
- package/clis/ones/task.js +67 -0
- package/clis/ones/tasks.js +80 -0
- package/clis/ones/token-info.js +43 -0
- package/clis/ones/worklog.js +268 -0
- package/clis/ones/worklog.test.js +20 -0
- package/clis/openalex/search.js +69 -0
- package/clis/openalex/utils.js +160 -0
- package/clis/openalex/work.js +65 -0
- package/clis/openfda/drug-label.js +74 -0
- package/clis/openfda/food-recall.js +65 -0
- package/clis/openfda/openfda.test.js +114 -0
- package/clis/openfda/utils.js +67 -0
- package/clis/openreview/author.js +58 -0
- package/clis/openreview/openreview.test.js +427 -0
- package/clis/openreview/paper.js +43 -0
- package/clis/openreview/reviews.js +131 -0
- package/clis/openreview/search.js +46 -0
- package/clis/openreview/utils.js +172 -0
- package/clis/openreview/venue.js +63 -0
- package/clis/osv/osv.test.js +97 -0
- package/clis/osv/query.js +72 -0
- package/clis/osv/utils.js +169 -0
- package/clis/osv/vulnerability.js +54 -0
- package/clis/packagist/package.js +49 -0
- package/clis/packagist/search.js +43 -0
- package/clis/packagist/utils.js +113 -0
- package/clis/paperreview/commands.test.js +243 -0
- package/clis/paperreview/feedback.js +53 -0
- package/clis/paperreview/review.js +38 -0
- package/clis/paperreview/submit.js +86 -0
- package/clis/paperreview/utils.js +197 -0
- package/clis/paperreview/utils.test.js +49 -0
- package/clis/pixiv/auth.js +64 -0
- package/clis/pixiv/detail.js +66 -0
- package/clis/pixiv/detail.test.js +93 -0
- package/clis/pixiv/download.js +82 -0
- package/clis/pixiv/download.test.js +97 -0
- package/clis/pixiv/illusts.js +66 -0
- package/clis/pixiv/illusts.test.js +99 -0
- package/clis/pixiv/ranking.js +60 -0
- package/clis/pixiv/search.js +44 -0
- package/clis/pixiv/search.test.js +83 -0
- package/clis/pixiv/user.js +59 -0
- package/clis/pixiv/user.test.js +100 -0
- package/clis/pixiv/utils.js +98 -0
- package/clis/powerchina/auth.js +52 -0
- package/clis/powerchina/search.js +251 -0
- package/clis/powerchina/search.test.js +93 -0
- package/clis/producthunt/browse.js +100 -0
- package/clis/producthunt/hot.js +111 -0
- package/clis/producthunt/posts.js +29 -0
- package/clis/producthunt/today.js +36 -0
- package/clis/producthunt/utils.js +99 -0
- package/clis/producthunt/utils.test.js +64 -0
- package/clis/pubmed/article.js +55 -0
- package/clis/pubmed/author.js +64 -0
- package/clis/pubmed/citations.js +36 -0
- package/clis/pubmed/clinical-trial.js +59 -0
- package/clis/pubmed/journal.js +59 -0
- package/clis/pubmed/mesh.js +47 -0
- package/clis/pubmed/pubmed.test.js +464 -0
- package/clis/pubmed/related.js +45 -0
- package/clis/pubmed/review.js +58 -0
- package/clis/pubmed/search.js +75 -0
- package/clis/pubmed/utils.js +325 -0
- package/clis/pypi/downloads.js +66 -0
- package/clis/pypi/package.js +79 -0
- package/clis/pypi/utils.js +55 -0
- package/clis/qoder/_utils.js +191 -0
- package/clis/qoder/composer.js +45 -0
- package/clis/qoder/history.js +49 -0
- package/clis/qoder/qoder.test.js +125 -0
- package/clis/qoder/quest.js +147 -0
- package/clis/qoder/read.js +29 -0
- package/clis/qoder/status.js +21 -0
- package/clis/qoder/ui.js +332 -0
- package/clis/quark/auth.js +47 -0
- package/clis/quark/ls.js +64 -0
- package/clis/quark/mkdir.js +37 -0
- package/clis/quark/mv.js +54 -0
- package/clis/quark/rename.js +27 -0
- package/clis/quark/rm.js +25 -0
- package/clis/quark/save.js +81 -0
- package/clis/quark/share-tree.js +46 -0
- package/clis/quark/utils.js +146 -0
- package/clis/quark/utils.test.js +58 -0
- package/clis/qwen/ask.js +104 -0
- package/clis/qwen/ask.test.js +36 -0
- package/clis/qwen/auth.js +56 -0
- package/clis/qwen/detail.js +62 -0
- package/clis/qwen/history.js +61 -0
- package/clis/qwen/image.js +179 -0
- package/clis/qwen/new.js +23 -0
- package/clis/qwen/read.js +41 -0
- package/clis/qwen/send.js +55 -0
- package/clis/qwen/status.js +37 -0
- package/clis/qwen/utils.js +461 -0
- package/clis/qwen/utils.test.js +128 -0
- package/clis/reddit/auth.js +52 -0
- package/clis/reddit/comment.js +58 -0
- package/clis/reddit/extract-media.test.js +149 -0
- package/clis/reddit/frontpage.js +70 -0
- package/clis/reddit/frontpage.test.js +34 -0
- package/clis/reddit/home.js +146 -0
- package/clis/reddit/home.test.js +170 -0
- package/clis/reddit/hot.js +81 -0
- package/clis/reddit/hot.test.js +32 -0
- package/clis/reddit/popular.js +79 -0
- package/clis/reddit/popular.test.js +26 -0
- package/clis/reddit/read.js +588 -0
- package/clis/reddit/read.test.js +402 -0
- package/clis/reddit/reply.js +182 -0
- package/clis/reddit/reply.test.js +89 -0
- package/clis/reddit/save.js +52 -0
- package/clis/reddit/saved.js +50 -0
- package/clis/reddit/search.js +102 -0
- package/clis/reddit/search.test.js +26 -0
- package/clis/reddit/subreddit-info.js +116 -0
- package/clis/reddit/subreddit-info.test.js +163 -0
- package/clis/reddit/subreddit.js +97 -0
- package/clis/reddit/subreddit.test.js +31 -0
- package/clis/reddit/subscribe.js +51 -0
- package/clis/reddit/subscribed.js +165 -0
- package/clis/reddit/subscribed.test.js +168 -0
- package/clis/reddit/upvote.js +65 -0
- package/clis/reddit/upvoted.js +50 -0
- package/clis/reddit/user-comments.js +45 -0
- package/clis/reddit/user-posts.js +43 -0
- package/clis/reddit/user.js +38 -0
- package/clis/reddit/whoami.js +83 -0
- package/clis/reddit/whoami.test.js +105 -0
- package/clis/rednote/auth.js +52 -0
- package/clis/rednote/comments.js +85 -0
- package/clis/rednote/download.js +59 -0
- package/clis/rednote/feed.js +27 -0
- package/clis/rednote/navigation.test.js +26 -0
- package/clis/rednote/note.js +68 -0
- package/clis/rednote/notifications.js +139 -0
- package/clis/rednote/rednote.test.js +240 -0
- package/clis/rednote/search.js +107 -0
- package/clis/rednote/user.js +55 -0
- package/clis/rest-countries/country.js +65 -0
- package/clis/rest-countries/region.js +64 -0
- package/clis/rest-countries/rest-countries.test.js +83 -0
- package/clis/rest-countries/utils.js +126 -0
- package/clis/reuters/article-detail.js +53 -0
- package/clis/reuters/auth.js +67 -0
- package/clis/reuters/reuters.test.js +299 -0
- package/clis/reuters/search.js +63 -0
- package/clis/reuters/utils.js +159 -0
- package/clis/rfc/rfc.js +52 -0
- package/clis/rfc/rfc.test.js +74 -0
- package/clis/rfc/utils.js +72 -0
- package/clis/rubygems/gem.js +42 -0
- package/clis/rubygems/search.js +47 -0
- package/clis/rubygems/utils.js +86 -0
- package/clis/semanticscholar/citations.js +61 -0
- package/clis/semanticscholar/paper.js +52 -0
- package/clis/semanticscholar/recommendations.js +47 -0
- package/clis/semanticscholar/search.js +48 -0
- package/clis/semanticscholar/semanticscholar.test.js +279 -0
- package/clis/semanticscholar/utils.js +196 -0
- package/clis/sinablog/article.js +15 -0
- package/clis/sinablog/hot.js +15 -0
- package/clis/sinablog/search.js +52 -0
- package/clis/sinablog/user.js +16 -0
- package/clis/sinablog/utils.js +186 -0
- package/clis/sinafinance/news.js +62 -0
- package/clis/sinafinance/rolling-news.js +41 -0
- package/clis/sinafinance/stock-rank.js +66 -0
- package/clis/sinafinance/stock.js +121 -0
- package/clis/sinafinance/stock.test.js +59 -0
- package/clis/slock/api-base-canary.test.js +62 -0
- package/clis/slock/attachment-download.js +72 -0
- package/clis/slock/attachment-download.test.js +102 -0
- package/clis/slock/attachment-upload.js +112 -0
- package/clis/slock/attachment-upload.test.js +131 -0
- package/clis/slock/attachment-url.js +53 -0
- package/clis/slock/attachment-url.test.js +41 -0
- package/clis/slock/auth-verify.js +19 -0
- package/clis/slock/bookmark-add.js +43 -0
- package/clis/slock/bookmark-add.test.js +38 -0
- package/clis/slock/bookmark-list.js +50 -0
- package/clis/slock/bookmark-list.test.js +47 -0
- package/clis/slock/bookmark-remove.js +42 -0
- package/clis/slock/bookmark-remove.test.js +24 -0
- package/clis/slock/channel-action.js +63 -0
- package/clis/slock/channel-action.test.js +65 -0
- package/clis/slock/channel-archive.js +9 -0
- package/clis/slock/channel-create.js +48 -0
- package/clis/slock/channel-create.test.js +40 -0
- package/clis/slock/channel-files.js +51 -0
- package/clis/slock/channel-files.test.js +32 -0
- package/clis/slock/channel-info.js +42 -0
- package/clis/slock/channel-info.test.js +25 -0
- package/clis/slock/channel-join.js +9 -0
- package/clis/slock/channel-leave.js +9 -0
- package/clis/slock/channel-list.js +40 -0
- package/clis/slock/channel-list.test.js +37 -0
- package/clis/slock/channel-mark.js +71 -0
- package/clis/slock/channel-mark.test.js +49 -0
- package/clis/slock/channel-members.js +64 -0
- package/clis/slock/channel-members.test.js +44 -0
- package/clis/slock/channel-unarchive.js +11 -0
- package/clis/slock/cross-command.test.js +21 -0
- package/clis/slock/dm-list.js +41 -0
- package/clis/slock/dm-list.test.js +26 -0
- package/clis/slock/error-detail-canary.test.js +144 -0
- package/clis/slock/errors.js +30 -0
- package/clis/slock/errors.test.js +29 -0
- package/clis/slock/in-page.js +213 -0
- package/clis/slock/in-page.test.js +362 -0
- package/clis/slock/inbox-done.js +40 -0
- package/clis/slock/inbox-done.test.js +21 -0
- package/clis/slock/inbox-read-all.js +32 -0
- package/clis/slock/inbox-read-all.test.js +20 -0
- package/clis/slock/inbox.js +74 -0
- package/clis/slock/inbox.test.js +46 -0
- package/clis/slock/login.js +3 -0
- package/clis/slock/message-read.js +168 -0
- package/clis/slock/message-read.test.js +83 -0
- package/clis/slock/message-search.js +72 -0
- package/clis/slock/message-search.test.js +61 -0
- package/clis/slock/message-send.js +149 -0
- package/clis/slock/message-send.test.js +127 -0
- package/clis/slock/reaction-add.js +42 -0
- package/clis/slock/reaction-add.test.js +36 -0
- package/clis/slock/reaction-remove.js +42 -0
- package/clis/slock/reaction-remove.test.js +29 -0
- package/clis/slock/resolve.js +74 -0
- package/clis/slock/resolve.test.js +102 -0
- package/clis/slock/server-list.js +38 -0
- package/clis/slock/server-list.test.js +24 -0
- package/clis/slock/server-override-canary.test.js +87 -0
- package/clis/slock/server-use.js +53 -0
- package/clis/slock/server-use.test.js +48 -0
- package/clis/slock/shared.js +14 -0
- package/clis/slock/short-id-canary.test.js +86 -0
- package/clis/slock/site-session-canary.test.js +49 -0
- package/clis/slock/task-claim.js +72 -0
- package/clis/slock/task-claim.test.js +81 -0
- package/clis/slock/task-convert.js +106 -0
- package/clis/slock/task-convert.test.js +82 -0
- package/clis/slock/task-create.js +82 -0
- package/clis/slock/task-create.test.js +65 -0
- package/clis/slock/task-delete.js +55 -0
- package/clis/slock/task-delete.test.js +52 -0
- package/clis/slock/task-get.js +59 -0
- package/clis/slock/task-get.test.js +45 -0
- package/clis/slock/task-list-server.js +63 -0
- package/clis/slock/task-list-server.test.js +48 -0
- package/clis/slock/task-list.js +70 -0
- package/clis/slock/task-list.test.js +59 -0
- package/clis/slock/task-status.js +93 -0
- package/clis/slock/task-status.test.js +76 -0
- package/clis/slock/task-unclaim.js +66 -0
- package/clis/slock/task-unclaim.test.js +49 -0
- package/clis/slock/thread-done.js +9 -0
- package/clis/slock/thread-follow.js +46 -0
- package/clis/slock/thread-follow.test.js +34 -0
- package/clis/slock/thread-list.js +44 -0
- package/clis/slock/thread-list.test.js +24 -0
- package/clis/slock/thread-state.js +45 -0
- package/clis/slock/thread-state.test.js +38 -0
- package/clis/slock/thread-undone.js +9 -0
- package/clis/slock/thread-unfollow.js +9 -0
- package/clis/slock/unread-summary.js +49 -0
- package/clis/slock/unread-summary.test.js +31 -0
- package/clis/slock/whoami.js +12 -0
- package/clis/slock/whoami.test.js +23 -0
- package/clis/smzdm/search.js +149 -0
- package/clis/smzdm/search.test.js +114 -0
- package/clis/spotify/spotify.js +327 -0
- package/clis/spotify/utils.js +66 -0
- package/clis/spotify/utils.test.js +67 -0
- package/clis/stackoverflow/bounties.js +35 -0
- package/clis/stackoverflow/hot.js +32 -0
- package/clis/stackoverflow/read.js +314 -0
- package/clis/stackoverflow/related.js +66 -0
- package/clis/stackoverflow/search.js +35 -0
- package/clis/stackoverflow/stackoverflow.test.js +404 -0
- package/clis/stackoverflow/tag.js +60 -0
- package/clis/stackoverflow/unanswered.js +33 -0
- package/clis/stackoverflow/user.js +50 -0
- package/clis/stackoverflow/utils.js +118 -0
- package/clis/steam/app.js +67 -0
- package/clis/steam/search.js +58 -0
- package/clis/steam/steam.test.js +46 -0
- package/clis/steam/top-sellers.js +26 -0
- package/clis/steam/utils.js +107 -0
- package/clis/substack/feed.js +16 -0
- package/clis/substack/publication.js +16 -0
- package/clis/substack/search.js +79 -0
- package/clis/substack/utils.js +136 -0
- package/clis/substack/utils.test.js +44 -0
- package/clis/suno/auth.js +63 -0
- package/clis/suno/commands.test.js +188 -0
- package/clis/suno/download.js +140 -0
- package/clis/suno/download.test.js +151 -0
- package/clis/suno/generate.js +231 -0
- package/clis/suno/generate.test.js +252 -0
- package/clis/suno/list.js +79 -0
- package/clis/suno/status.js +63 -0
- package/clis/suno/utils.js +549 -0
- package/clis/suno/utils.test.js +329 -0
- package/clis/taobao/add-cart.js +150 -0
- package/clis/taobao/auth.js +58 -0
- package/clis/taobao/cart.js +96 -0
- package/clis/taobao/commands.test.js +41 -0
- package/clis/taobao/detail.js +71 -0
- package/clis/taobao/reviews.js +77 -0
- package/clis/taobao/search.js +97 -0
- package/clis/tdx/hot-rank.js +48 -0
- package/clis/tdx/hot-rank.test.js +59 -0
- package/clis/test-utils.js +61 -0
- package/clis/ths/hot-rank.js +50 -0
- package/clis/ths/hot-rank.test.js +64 -0
- package/clis/tieba/commands.test.js +79 -0
- package/clis/tieba/hot.js +48 -0
- package/clis/tieba/posts.js +86 -0
- package/clis/tieba/read.js +141 -0
- package/clis/tieba/search.js +109 -0
- package/clis/tieba/utils.js +240 -0
- package/clis/tieba/utils.test.js +290 -0
- package/clis/tiktok/auth.js +65 -0
- package/clis/tiktok/comment.js +145 -0
- package/clis/tiktok/creator-videos.js +270 -0
- package/clis/tiktok/creator-videos.test.js +113 -0
- package/clis/tiktok/explore.js +144 -0
- package/clis/tiktok/follow.js +122 -0
- package/clis/tiktok/following.js +164 -0
- package/clis/tiktok/friends.js +146 -0
- package/clis/tiktok/like.js +34 -0
- package/clis/tiktok/live.js +144 -0
- package/clis/tiktok/notifications.js +153 -0
- package/clis/tiktok/profile.js +55 -0
- package/clis/tiktok/refactor.test.js +389 -0
- package/clis/tiktok/save.js +30 -0
- package/clis/tiktok/search.js +40 -0
- package/clis/tiktok/unfollow.js +131 -0
- package/clis/tiktok/unlike.js +34 -0
- package/clis/tiktok/unsave.js +32 -0
- package/clis/tiktok/user.js +216 -0
- package/clis/tiktok/utils.js +505 -0
- package/clis/tiktok/write-refactor.test.js +370 -0
- package/clis/toutiao/articles.js +55 -0
- package/clis/toutiao/auth.js +70 -0
- package/clis/toutiao/hot.js +63 -0
- package/clis/toutiao/toutiao.test.js +378 -0
- package/clis/toutiao/utils.js +161 -0
- package/clis/trae-cn/activity.js +22 -0
- package/clis/trae-cn/approve.js +52 -0
- package/clis/trae-cn/ask.js +99 -0
- package/clis/trae-cn/dump.js +5 -0
- package/clis/trae-cn/export.js +40 -0
- package/clis/trae-cn/model.js +22 -0
- package/clis/trae-cn/new.js +63 -0
- package/clis/trae-cn/read.js +23 -0
- package/clis/trae-cn/screenshot.js +5 -0
- package/clis/trae-cn/select-model.js +25 -0
- package/clis/trae-cn/send.js +23 -0
- package/clis/trae-cn/setup.js +75 -0
- package/clis/trae-cn/status.js +27 -0
- package/clis/trae-cn/targets.js +96 -0
- package/clis/trae-cn/trae-cn.test.js +412 -0
- package/clis/trae-cn/utils.js +750 -0
- package/clis/trae-cn/watch.js +119 -0
- package/clis/trae-solo/_actions.js +60 -0
- package/clis/trae-solo/_fs.js +118 -0
- package/clis/trae-solo/_state.js +111 -0
- package/clis/trae-solo/automation.js +97 -0
- package/clis/trae-solo/history.js +54 -0
- package/clis/trae-solo/mode.js +81 -0
- package/clis/trae-solo/model.js +134 -0
- package/clis/trae-solo/renderer-storage.js +170 -0
- package/clis/trae-solo/settings.js +54 -0
- package/clis/trae-solo/skill-fs.js +123 -0
- package/clis/trae-solo/skill.js +220 -0
- package/clis/trae-solo/state-fs.js +156 -0
- package/clis/trae-solo/status.js +2 -0
- package/clis/trae-solo/task-fs.js +181 -0
- package/clis/trae-solo/trae-solo.test.js +67 -0
- package/clis/trae-solo/user-rules.js +29 -0
- package/clis/trae-solo/workspaces-fs.js +113 -0
- package/clis/tvmaze/search.js +61 -0
- package/clis/tvmaze/show.js +60 -0
- package/clis/tvmaze/tvmaze.test.js +93 -0
- package/clis/tvmaze/utils.js +110 -0
- package/clis/twitter/accept.js +204 -0
- package/clis/twitter/article.js +170 -0
- package/clis/twitter/auth.js +41 -0
- package/clis/twitter/block.js +90 -0
- package/clis/twitter/bookmark-folder.js +190 -0
- package/clis/twitter/bookmark-folder.test.js +396 -0
- package/clis/twitter/bookmark-folders.js +114 -0
- package/clis/twitter/bookmark-folders.test.js +152 -0
- package/clis/twitter/bookmark.js +74 -0
- package/clis/twitter/bookmark.test.js +74 -0
- package/clis/twitter/bookmarks.js +181 -0
- package/clis/twitter/bookmarks.test.js +206 -0
- package/clis/twitter/delete.js +85 -0
- package/clis/twitter/delete.test.js +85 -0
- package/clis/twitter/device-follow.js +194 -0
- package/clis/twitter/device-follow.test.js +287 -0
- package/clis/twitter/download.js +481 -0
- package/clis/twitter/download.test.js +457 -0
- package/clis/twitter/follow-batch.js +162 -0
- package/clis/twitter/follow-batch.test.js +137 -0
- package/clis/twitter/follow.js +67 -0
- package/clis/twitter/followers.js +193 -0
- package/clis/twitter/followers.test.js +62 -0
- package/clis/twitter/following.js +274 -0
- package/clis/twitter/following.test.js +359 -0
- package/clis/twitter/hide-reply.js +87 -0
- package/clis/twitter/hide-reply.test.js +76 -0
- package/clis/twitter/like.js +80 -0
- package/clis/twitter/like.test.js +73 -0
- package/clis/twitter/likes.js +241 -0
- package/clis/twitter/likes.test.js +220 -0
- package/clis/twitter/list-add-batch.js +32 -0
- package/clis/twitter/list-add-core.js +245 -0
- package/clis/twitter/list-add.js +20 -0
- package/clis/twitter/list-add.test.js +133 -0
- package/clis/twitter/list-batch-utils.js +95 -0
- package/clis/twitter/list-batch.test.js +113 -0
- package/clis/twitter/list-create.js +155 -0
- package/clis/twitter/list-create.test.js +169 -0
- package/clis/twitter/list-delete.js +158 -0
- package/clis/twitter/list-delete.test.js +102 -0
- package/clis/twitter/list-remove-batch.js +32 -0
- package/clis/twitter/list-remove-core.js +291 -0
- package/clis/twitter/list-remove.js +20 -0
- package/clis/twitter/list-remove.test.js +147 -0
- package/clis/twitter/list-tweets.js +199 -0
- package/clis/twitter/list-tweets.test.js +198 -0
- package/clis/twitter/lists.js +178 -0
- package/clis/twitter/lists.test.js +253 -0
- package/clis/twitter/notifications.js +128 -0
- package/clis/twitter/post.js +316 -0
- package/clis/twitter/post.test.js +275 -0
- package/clis/twitter/profile.js +174 -0
- package/clis/twitter/profile.test.js +150 -0
- package/clis/twitter/quote.js +172 -0
- package/clis/twitter/quote.test.js +194 -0
- package/clis/twitter/reply-dm.js +183 -0
- package/clis/twitter/reply.js +248 -0
- package/clis/twitter/reply.test.js +237 -0
- package/clis/twitter/retweet.js +94 -0
- package/clis/twitter/retweet.test.js +73 -0
- package/clis/twitter/search.js +346 -0
- package/clis/twitter/search.test.js +400 -0
- package/clis/twitter/shared.js +564 -0
- package/clis/twitter/shared.test.js +1012 -0
- package/clis/twitter/thread.js +164 -0
- package/clis/twitter/thread.test.js +58 -0
- package/clis/twitter/timeline.js +211 -0
- package/clis/twitter/timeline.test.js +104 -0
- package/clis/twitter/trending.js +58 -0
- package/clis/twitter/trending.test.js +15 -0
- package/clis/twitter/tweets.js +314 -0
- package/clis/twitter/tweets.test.js +362 -0
- package/clis/twitter/unblock.js +73 -0
- package/clis/twitter/unbookmark.js +71 -0
- package/clis/twitter/unbookmark.test.js +73 -0
- package/clis/twitter/unfollow.js +73 -0
- package/clis/twitter/unlike.js +80 -0
- package/clis/twitter/unlike.test.js +75 -0
- package/clis/twitter/unretweet.js +94 -0
- package/clis/twitter/unretweet.test.js +73 -0
- package/clis/twitter/utils.js +323 -0
- package/clis/twitter/utils.test.js +169 -0
- package/clis/uisdc/news.js +105 -0
- package/clis/uisdc/news.test.js +66 -0
- package/clis/uiverse/_shared.js +427 -0
- package/clis/uiverse/_shared.test.js +62 -0
- package/clis/uiverse/code.js +49 -0
- package/clis/uiverse/navigation.test.js +12 -0
- package/clis/uiverse/preview.js +73 -0
- package/clis/upwork/auth.js +53 -0
- package/clis/upwork/detail.js +132 -0
- package/clis/upwork/feed.js +109 -0
- package/clis/upwork/search.js +115 -0
- package/clis/upwork/upwork.test.js +566 -0
- package/clis/upwork/utils.js +323 -0
- package/clis/v2ex/auth.js +44 -0
- package/clis/v2ex/daily.js +99 -0
- package/clis/v2ex/hot.js +26 -0
- package/clis/v2ex/latest.js +26 -0
- package/clis/v2ex/me.js +100 -0
- package/clis/v2ex/member.js +28 -0
- package/clis/v2ex/node.js +39 -0
- package/clis/v2ex/nodes.js +26 -0
- package/clis/v2ex/notifications.js +72 -0
- package/clis/v2ex/replies.js +27 -0
- package/clis/v2ex/topic.js +31 -0
- package/clis/v2ex/user.js +34 -0
- package/clis/wanfang/search.js +66 -0
- package/clis/wanfang/search.test.js +23 -0
- package/clis/web/read.js +491 -0
- package/clis/web/read.test.js +392 -0
- package/clis/wechat-channels/auth.js +62 -0
- package/clis/wechat-channels/publish.js +732 -0
- package/clis/wechat-channels/publish.test.js +144 -0
- package/clis/weibo/auth.js +53 -0
- package/clis/weibo/comments.js +53 -0
- package/clis/weibo/delete.js +172 -0
- package/clis/weibo/delete.test.js +94 -0
- package/clis/weibo/envelope.test.js +85 -0
- package/clis/weibo/favorites.js +170 -0
- package/clis/weibo/favorites.test.js +114 -0
- package/clis/weibo/feed.js +69 -0
- package/clis/weibo/hot.js +39 -0
- package/clis/weibo/me.js +75 -0
- package/clis/weibo/post.js +75 -0
- package/clis/weibo/publish.js +306 -0
- package/clis/weibo/publish.test.js +192 -0
- package/clis/weibo/search.js +80 -0
- package/clis/weibo/user-posts.js +234 -0
- package/clis/weibo/user-posts.test.js +92 -0
- package/clis/weibo/user.js +63 -0
- package/clis/weibo/utils.js +59 -0
- package/clis/weibo/utils.test.js +36 -0
- package/clis/weixin/create-draft.js +226 -0
- package/clis/weixin/download.js +371 -0
- package/clis/weixin/download.test.js +106 -0
- package/clis/weixin/drafts.js +66 -0
- package/clis/weixin/drafts.test.js +69 -0
- package/clis/weixin/search.js +157 -0
- package/clis/weixin/search.test.js +227 -0
- package/clis/weread/ai-outline.js +171 -0
- package/clis/weread/ai-outline.test.js +83 -0
- package/clis/weread/auth.js +59 -0
- package/clis/weread/book-search.js +438 -0
- package/clis/weread/book-search.test.js +242 -0
- package/clis/weread/book.js +233 -0
- package/clis/weread/commands.test.js +398 -0
- package/clis/weread/highlights.js +24 -0
- package/clis/weread/notebooks.js +22 -0
- package/clis/weread/notes.js +30 -0
- package/clis/weread/private-api-regression.test.js +369 -0
- package/clis/weread/ranking.js +29 -0
- package/clis/weread/search-regression.test.js +494 -0
- package/clis/weread/search.js +186 -0
- package/clis/weread/shelf.js +66 -0
- package/clis/weread/utils.js +321 -0
- package/clis/weread/utils.test.js +128 -0
- package/clis/weread-official/book.js +135 -0
- package/clis/weread-official/commands.test.js +385 -0
- package/clis/weread-official/discover.js +107 -0
- package/clis/weread-official/list-apis.js +95 -0
- package/clis/weread-official/notes.js +171 -0
- package/clis/weread-official/readdata.js +158 -0
- package/clis/weread-official/review.js +93 -0
- package/clis/weread-official/search.js +106 -0
- package/clis/weread-official/shelf.js +97 -0
- package/clis/weread-official/utils.js +293 -0
- package/clis/weread-official/utils.test.js +242 -0
- package/clis/wikidata/entity.js +60 -0
- package/clis/wikidata/search.js +50 -0
- package/clis/wikidata/utils.js +117 -0
- package/clis/wikidata/wikidata.test.js +83 -0
- package/clis/wikipedia/page.js +95 -0
- package/clis/wikipedia/random.js +20 -0
- package/clis/wikipedia/search.js +31 -0
- package/clis/wikipedia/summary.js +24 -0
- package/clis/wikipedia/trending.js +40 -0
- package/clis/wikipedia/trending.test.js +57 -0
- package/clis/wikipedia/utils.js +31 -0
- package/clis/wttr/current.js +63 -0
- package/clis/wttr/forecast.js +71 -0
- package/clis/wttr/utils.js +50 -0
- package/clis/wttr/wttr.test.js +84 -0
- package/clis/xianyu/auth.js +68 -0
- package/clis/xianyu/chat.js +74 -0
- package/clis/xianyu/chat.test.js +84 -0
- package/clis/xianyu/im.js +322 -0
- package/clis/xianyu/im.test.js +253 -0
- package/clis/xianyu/inbox.js +96 -0
- package/clis/xianyu/item.js +153 -0
- package/clis/xianyu/item.test.js +56 -0
- package/clis/xianyu/messages.js +91 -0
- package/clis/xianyu/publish.js +485 -0
- package/clis/xianyu/publish.test.js +220 -0
- package/clis/xianyu/reply.js +82 -0
- package/clis/xianyu/search.js +135 -0
- package/clis/xianyu/search.test.js +17 -0
- package/clis/xianyu/utils.js +8 -0
- package/clis/xiaoe/auth.js +55 -0
- package/clis/xiaoe/catalog.js +227 -0
- package/clis/xiaoe/content.js +175 -0
- package/clis/xiaoe/courses.js +127 -0
- package/clis/xiaoe/detail.js +36 -0
- package/clis/xiaoe/play-url.js +121 -0
- package/clis/xiaoe/xiaoe.test.js +486 -0
- package/clis/xiaohongshu/ask.js +426 -0
- package/clis/xiaohongshu/ask.test.js +271 -0
- package/clis/xiaohongshu/auth.js +53 -0
- package/clis/xiaohongshu/collection-helpers.js +283 -0
- package/clis/xiaohongshu/collection-helpers.test.js +125 -0
- package/clis/xiaohongshu/comments.js +228 -0
- package/clis/xiaohongshu/comments.test.js +320 -0
- package/clis/xiaohongshu/creator-note-detail.js +482 -0
- package/clis/xiaohongshu/creator-note-detail.test.js +451 -0
- package/clis/xiaohongshu/creator-notes-summary.js +98 -0
- package/clis/xiaohongshu/creator-notes-summary.test.js +94 -0
- package/clis/xiaohongshu/creator-notes.js +479 -0
- package/clis/xiaohongshu/creator-notes.test.js +281 -0
- package/clis/xiaohongshu/creator-profile.js +55 -0
- package/clis/xiaohongshu/creator-stats.js +76 -0
- package/clis/xiaohongshu/creator-stats.test.js +24 -0
- package/clis/xiaohongshu/delete-note.js +260 -0
- package/clis/xiaohongshu/delete-note.test.js +172 -0
- package/clis/xiaohongshu/download.js +249 -0
- package/clis/xiaohongshu/download.test.js +339 -0
- package/clis/xiaohongshu/draft-clear.js +91 -0
- package/clis/xiaohongshu/draft-delete.js +103 -0
- package/clis/xiaohongshu/draft-open.js +43 -0
- package/clis/xiaohongshu/draft-utils.js +142 -0
- package/clis/xiaohongshu/drafts.js +28 -0
- package/clis/xiaohongshu/drafts.test.js +172 -0
- package/clis/xiaohongshu/feed.js +163 -0
- package/clis/xiaohongshu/feed.test.js +126 -0
- package/clis/xiaohongshu/follow.js +226 -0
- package/clis/xiaohongshu/follow.test.js +211 -0
- package/clis/xiaohongshu/liked.js +29 -0
- package/clis/xiaohongshu/liked.test.js +82 -0
- package/clis/xiaohongshu/navigation.test.js +38 -0
- package/clis/xiaohongshu/note-helpers.js +69 -0
- package/clis/xiaohongshu/note.js +104 -0
- package/clis/xiaohongshu/note.test.js +249 -0
- package/clis/xiaohongshu/notifications.js +46 -0
- package/clis/xiaohongshu/publish.js +1423 -0
- package/clis/xiaohongshu/publish.test.js +1141 -0
- package/clis/xiaohongshu/saved.js +29 -0
- package/clis/xiaohongshu/saved.test.js +143 -0
- package/clis/xiaohongshu/search.js +330 -0
- package/clis/xiaohongshu/search.test.js +325 -0
- package/clis/xiaohongshu/unfollow.js +285 -0
- package/clis/xiaohongshu/user-helpers.js +78 -0
- package/clis/xiaohongshu/user-helpers.test.js +160 -0
- package/clis/xiaohongshu/user.js +140 -0
- package/clis/xiaohongshu/user.test.js +141 -0
- package/clis/xiaoyuzhou/auth.js +303 -0
- package/clis/xiaoyuzhou/auth.test.js +124 -0
- package/clis/xiaoyuzhou/download.js +54 -0
- package/clis/xiaoyuzhou/download.test.js +135 -0
- package/clis/xiaoyuzhou/episode.js +34 -0
- package/clis/xiaoyuzhou/podcast-episodes.js +41 -0
- package/clis/xiaoyuzhou/podcast-episodes.test.js +78 -0
- package/clis/xiaoyuzhou/podcast.js +33 -0
- package/clis/xiaoyuzhou/transcript.js +77 -0
- package/clis/xiaoyuzhou/transcript.test.js +195 -0
- package/clis/xiaoyuzhou/utils.js +15 -0
- package/clis/xiaoyuzhou/utils.test.js +39 -0
- package/clis/xueqiu/auth.js +63 -0
- package/clis/xueqiu/comments.js +355 -0
- package/clis/xueqiu/comments.test.js +696 -0
- package/clis/xueqiu/danjuan-utils.js +126 -0
- package/clis/xueqiu/danjuan-utils.test.js +41 -0
- package/clis/xueqiu/earnings-date.js +45 -0
- package/clis/xueqiu/feed.js +39 -0
- package/clis/xueqiu/fund-holdings.js +29 -0
- package/clis/xueqiu/fund-snapshot.js +26 -0
- package/clis/xueqiu/groups.js +23 -0
- package/clis/xueqiu/hot-stock.js +32 -0
- package/clis/xueqiu/hot.js +37 -0
- package/clis/xueqiu/kline.js +44 -0
- package/clis/xueqiu/search.js +37 -0
- package/clis/xueqiu/stock.js +65 -0
- package/clis/xueqiu/utils.js +48 -0
- package/clis/xueqiu/utils.test.js +26 -0
- package/clis/xueqiu/watchlist.js +37 -0
- package/clis/yahoo/search.js +92 -0
- package/clis/yahoo/search.test.js +94 -0
- package/clis/yahoo-finance/quote.js +74 -0
- package/clis/yollomi/background.js +46 -0
- package/clis/yollomi/edit.js +57 -0
- package/clis/yollomi/face-swap.js +44 -0
- package/clis/yollomi/generate.js +101 -0
- package/clis/yollomi/models.js +34 -0
- package/clis/yollomi/object-remover.js +43 -0
- package/clis/yollomi/remove-bg.js +39 -0
- package/clis/yollomi/restore.js +39 -0
- package/clis/yollomi/try-on.js +47 -0
- package/clis/yollomi/upload.js +72 -0
- package/clis/yollomi/upscale.js +54 -0
- package/clis/yollomi/utils.js +180 -0
- package/clis/yollomi/video.js +57 -0
- package/clis/youdao/note.js +258 -0
- package/clis/youdao/note.test.js +99 -0
- package/clis/youtube/auth.js +54 -0
- package/clis/youtube/channel.js +227 -0
- package/clis/youtube/channel.test.js +283 -0
- package/clis/youtube/comments.js +96 -0
- package/clis/youtube/feed.js +121 -0
- package/clis/youtube/feed.test.js +131 -0
- package/clis/youtube/history.js +119 -0
- package/clis/youtube/like.js +67 -0
- package/clis/youtube/playlist.js +98 -0
- package/clis/youtube/search.js +100 -0
- package/clis/youtube/subscribe.js +76 -0
- package/clis/youtube/subscriptions.js +58 -0
- package/clis/youtube/transcript-group.js +226 -0
- package/clis/youtube/transcript-group.test.js +99 -0
- package/clis/youtube/transcript.js +656 -0
- package/clis/youtube/transcript.test.js +296 -0
- package/clis/youtube/unlike.js +67 -0
- package/clis/youtube/unsubscribe.js +76 -0
- package/clis/youtube/utils.js +220 -0
- package/clis/youtube/utils.test.js +84 -0
- package/clis/youtube/video.js +152 -0
- package/clis/youtube/video.test.js +111 -0
- package/clis/youtube/watch-later.js +77 -0
- package/clis/yuanbao/ask.js +362 -0
- package/clis/yuanbao/ask.test.js +124 -0
- package/clis/yuanbao/auth.js +59 -0
- package/clis/yuanbao/detail.js +65 -0
- package/clis/yuanbao/history.js +51 -0
- package/clis/yuanbao/new.js +72 -0
- package/clis/yuanbao/new.test.js +30 -0
- package/clis/yuanbao/read.js +38 -0
- package/clis/yuanbao/send.js +57 -0
- package/clis/yuanbao/shared.js +341 -0
- package/clis/yuanbao/shared.test.js +80 -0
- package/clis/yuanbao/status.js +44 -0
- package/clis/zhihu/answer-comments.js +280 -0
- package/clis/zhihu/answer-comments.test.js +287 -0
- package/clis/zhihu/answer-detail.js +216 -0
- package/clis/zhihu/answer-detail.test.js +338 -0
- package/clis/zhihu/answer.js +54 -0
- package/clis/zhihu/answer.test.js +54 -0
- package/clis/zhihu/auth.js +59 -0
- package/clis/zhihu/collection.js +199 -0
- package/clis/zhihu/collection.test.js +337 -0
- package/clis/zhihu/collections.js +128 -0
- package/clis/zhihu/collections.test.js +182 -0
- package/clis/zhihu/comment.js +55 -0
- package/clis/zhihu/comment.test.js +50 -0
- package/clis/zhihu/download.js +80 -0
- package/clis/zhihu/download.test.js +12 -0
- package/clis/zhihu/favorite.js +87 -0
- package/clis/zhihu/favorite.test.js +59 -0
- package/clis/zhihu/follow.js +50 -0
- package/clis/zhihu/follow.test.js +42 -0
- package/clis/zhihu/followers.js +40 -0
- package/clis/zhihu/followers.test.js +42 -0
- package/clis/zhihu/following.js +40 -0
- package/clis/zhihu/following.test.js +44 -0
- package/clis/zhihu/hot.js +44 -0
- package/clis/zhihu/like.js +47 -0
- package/clis/zhihu/like.test.js +41 -0
- package/clis/zhihu/paginate.js +128 -0
- package/clis/zhihu/pins.js +41 -0
- package/clis/zhihu/pins.test.js +44 -0
- package/clis/zhihu/question.js +113 -0
- package/clis/zhihu/question.test.js +251 -0
- package/clis/zhihu/recommend.js +103 -0
- package/clis/zhihu/recommend.test.js +143 -0
- package/clis/zhihu/search.js +206 -0
- package/clis/zhihu/search.test.js +198 -0
- package/clis/zhihu/target.js +91 -0
- package/clis/zhihu/target.test.js +77 -0
- package/clis/zhihu/text.js +29 -0
- package/clis/zhihu/text.test.js +24 -0
- package/clis/zhihu/user-answers.js +41 -0
- package/clis/zhihu/user-answers.test.js +69 -0
- package/clis/zhihu/user-arg.js +34 -0
- package/clis/zhihu/user-articles.js +40 -0
- package/clis/zhihu/user-articles.test.js +44 -0
- package/clis/zhihu/user.js +59 -0
- package/clis/zhihu/user.test.js +73 -0
- package/clis/zhihu/write-shared.js +228 -0
- package/clis/zhihu/write-shared.test.js +176 -0
- package/clis/zlibrary/commands.test.js +65 -0
- package/clis/zlibrary/info.js +48 -0
- package/clis/zlibrary/search.js +47 -0
- package/clis/zlibrary/utils.js +136 -0
- package/clis/zsxq/auth.js +68 -0
- package/clis/zsxq/dynamics.js +48 -0
- package/clis/zsxq/groups.js +33 -0
- package/clis/zsxq/search.js +44 -0
- package/clis/zsxq/search.test.js +24 -0
- package/clis/zsxq/topic.js +50 -0
- package/clis/zsxq/topic.test.js +30 -0
- package/clis/zsxq/topics.js +26 -0
- package/clis/zsxq/topics.test.js +24 -0
- package/clis/zsxq/utils.js +233 -0
- package/clis/zsxq/utils.test.js +31 -0
- package/dist/src/adapter-shadow.d.ts +11 -0
- package/dist/src/adapter-shadow.js +72 -0
- package/dist/src/adapter-shadow.test.d.ts +1 -0
- package/dist/src/adapter-shadow.test.js +49 -0
- package/dist/src/adapter-source.d.ts +11 -0
- package/dist/src/adapter-source.js +24 -0
- package/dist/src/adapter-source.test.d.ts +1 -0
- package/dist/src/adapter-source.test.js +29 -0
- package/dist/src/browser/analyze.d.ts +118 -0
- package/dist/src/browser/analyze.js +405 -0
- package/dist/src/browser/analyze.test.d.ts +1 -0
- package/dist/src/browser/analyze.test.js +209 -0
- package/dist/src/browser/article-extract.d.ts +57 -0
- package/dist/src/browser/article-extract.e2e.test.d.ts +1 -0
- package/dist/src/browser/article-extract.e2e.test.js +105 -0
- package/dist/src/browser/article-extract.js +169 -0
- package/dist/src/browser/article-extract.test.d.ts +1 -0
- package/dist/src/browser/article-extract.test.js +94 -0
- package/dist/src/browser/ax-snapshot.d.ts +37 -0
- package/dist/src/browser/ax-snapshot.js +217 -0
- package/dist/src/browser/ax-snapshot.test.d.ts +1 -0
- package/dist/src/browser/ax-snapshot.test.js +91 -0
- package/dist/src/browser/base-page.d.ts +151 -0
- package/dist/src/browser/base-page.js +1060 -0
- package/dist/src/browser/base-page.test.d.ts +1 -0
- package/dist/src/browser/base-page.test.js +803 -0
- package/dist/src/browser/bridge.d.ts +28 -0
- package/dist/src/browser/bridge.js +172 -0
- package/dist/src/browser/cdp-click-fixture.test.d.ts +1 -0
- package/dist/src/browser/cdp-click-fixture.test.js +87 -0
- package/dist/src/browser/cdp.d.ts +46 -0
- package/dist/src/browser/cdp.js +536 -0
- package/dist/src/browser/cdp.test.d.ts +1 -0
- package/dist/src/browser/cdp.test.js +79 -0
- package/dist/src/browser/compound.d.ts +59 -0
- package/dist/src/browser/compound.js +112 -0
- package/dist/src/browser/compound.test.d.ts +1 -0
- package/dist/src/browser/compound.test.js +175 -0
- package/dist/src/browser/daemon-client.d.ts +133 -0
- package/dist/src/browser/daemon-client.js +154 -0
- package/dist/src/browser/daemon-client.test.d.ts +1 -0
- package/dist/src/browser/daemon-client.test.js +199 -0
- package/dist/src/browser/daemon-lifecycle.d.ts +23 -0
- package/dist/src/browser/daemon-lifecycle.js +67 -0
- package/dist/src/browser/daemon-version.d.ts +4 -0
- package/dist/src/browser/daemon-version.js +12 -0
- package/dist/src/browser/dom-helpers.d.ts +41 -0
- package/dist/src/browser/dom-helpers.js +239 -0
- package/dist/src/browser/dom-helpers.test.d.ts +1 -0
- package/dist/src/browser/dom-helpers.test.js +106 -0
- package/dist/src/browser/dom-snapshot.d.ts +93 -0
- package/dist/src/browser/dom-snapshot.js +894 -0
- package/dist/src/browser/dom-snapshot.test.d.ts +11 -0
- package/dist/src/browser/dom-snapshot.test.js +313 -0
- package/dist/src/browser/errors.d.ts +38 -0
- package/dist/src/browser/errors.js +78 -0
- package/dist/src/browser/errors.test.d.ts +1 -0
- package/dist/src/browser/errors.test.js +60 -0
- package/dist/src/browser/extract.d.ts +69 -0
- package/dist/src/browser/extract.js +132 -0
- package/dist/src/browser/extract.test.d.ts +1 -0
- package/dist/src/browser/extract.test.js +129 -0
- package/dist/src/browser/find.d.ts +84 -0
- package/dist/src/browser/find.js +398 -0
- package/dist/src/browser/find.test.d.ts +1 -0
- package/dist/src/browser/find.test.js +180 -0
- package/dist/src/browser/html-tree.d.ts +75 -0
- package/dist/src/browser/html-tree.js +112 -0
- package/dist/src/browser/html-tree.test.d.ts +1 -0
- package/dist/src/browser/html-tree.test.js +181 -0
- package/dist/src/browser/index.d.ts +14 -0
- package/dist/src/browser/index.js +12 -0
- package/dist/src/browser/network-cache.d.ts +49 -0
- package/dist/src/browser/network-cache.js +78 -0
- package/dist/src/browser/network-cache.test.d.ts +1 -0
- package/dist/src/browser/network-cache.test.js +75 -0
- package/dist/src/browser/network-key.d.ts +22 -0
- package/dist/src/browser/network-key.js +66 -0
- package/dist/src/browser/network-key.test.d.ts +1 -0
- package/dist/src/browser/network-key.test.js +49 -0
- package/dist/src/browser/page.d.ts +83 -0
- package/dist/src/browser/page.js +453 -0
- package/dist/src/browser/page.test.d.ts +1 -0
- package/dist/src/browser/page.test.js +406 -0
- package/dist/src/browser/profile.d.ts +14 -0
- package/dist/src/browser/profile.js +85 -0
- package/dist/src/browser/shape-filter.d.ts +52 -0
- package/dist/src/browser/shape-filter.js +101 -0
- package/dist/src/browser/shape-filter.test.d.ts +1 -0
- package/dist/src/browser/shape-filter.test.js +101 -0
- package/dist/src/browser/shape.d.ts +23 -0
- package/dist/src/browser/shape.js +95 -0
- package/dist/src/browser/shape.test.d.ts +1 -0
- package/dist/src/browser/shape.test.js +82 -0
- package/dist/src/browser/stealth.d.ts +11 -0
- package/dist/src/browser/stealth.js +359 -0
- package/dist/src/browser/stealth.test.d.ts +1 -0
- package/dist/src/browser/stealth.test.js +134 -0
- package/dist/src/browser/tabs.d.ts +13 -0
- package/dist/src/browser/tabs.js +70 -0
- package/dist/src/browser/target-errors.d.ts +39 -0
- package/dist/src/browser/target-errors.js +45 -0
- package/dist/src/browser/target-errors.test.d.ts +1 -0
- package/dist/src/browser/target-errors.test.js +94 -0
- package/dist/src/browser/target-resolver.d.ts +158 -0
- package/dist/src/browser/target-resolver.js +570 -0
- package/dist/src/browser/target-resolver.test.d.ts +1 -0
- package/dist/src/browser/target-resolver.test.js +118 -0
- package/dist/src/browser/utils.d.ts +20 -0
- package/dist/src/browser/utils.js +64 -0
- package/dist/src/browser/utils.test.d.ts +1 -0
- package/dist/src/browser/utils.test.js +29 -0
- package/dist/src/browser/verify-fixture.d.ts +65 -0
- package/dist/src/browser/verify-fixture.js +318 -0
- package/dist/src/browser/verify-fixture.test.d.ts +1 -0
- package/dist/src/browser/verify-fixture.test.js +219 -0
- package/dist/src/browser/visual-refs.d.ts +11 -0
- package/dist/src/browser/visual-refs.js +108 -0
- package/dist/src/browser.test.d.ts +1 -0
- package/dist/src/browser.test.js +287 -0
- package/dist/src/build-manifest.d.ts +103 -0
- package/dist/src/build-manifest.js +363 -0
- package/dist/src/build-manifest.test.d.ts +1 -0
- package/dist/src/build-manifest.test.js +341 -0
- package/dist/src/capabilityRouting.d.ts +19 -0
- package/dist/src/capabilityRouting.js +56 -0
- package/dist/src/capabilityRouting.test.d.ts +1 -0
- package/dist/src/capabilityRouting.test.js +63 -0
- package/dist/src/cli-argv-preprocess.d.ts +63 -0
- package/dist/src/cli-argv-preprocess.js +303 -0
- package/dist/src/cli-argv-preprocess.test.d.ts +1 -0
- package/dist/src/cli-argv-preprocess.test.js +304 -0
- package/dist/src/cli.d.ts +79 -0
- package/dist/src/cli.js +3357 -0
- package/dist/src/cli.test.d.ts +1 -0
- package/dist/src/cli.test.js +3003 -0
- package/dist/src/commanderAdapter.d.ts +21 -0
- package/dist/src/commanderAdapter.js +208 -0
- package/dist/src/commanderAdapter.test.d.ts +1 -0
- package/dist/src/commanderAdapter.test.js +352 -0
- package/dist/src/commands/auth.d.ts +40 -0
- package/dist/src/commands/auth.js +434 -0
- package/dist/src/commands/auth.test.d.ts +1 -0
- package/dist/src/commands/auth.test.js +252 -0
- package/dist/src/commands/daemon.d.ts +9 -0
- package/dist/src/commands/daemon.js +98 -0
- package/dist/src/commands/daemon.test.d.ts +1 -0
- package/dist/src/commands/daemon.test.js +283 -0
- package/dist/src/completion-fast.d.ts +22 -0
- package/dist/src/completion-fast.js +88 -0
- package/dist/src/completion-shared.d.ts +13 -0
- package/dist/src/completion-shared.js +60 -0
- package/dist/src/completion.d.ts +21 -0
- package/dist/src/completion.js +68 -0
- package/dist/src/completion.test.d.ts +1 -0
- package/dist/src/completion.test.js +24 -0
- package/dist/src/constants.d.ts +15 -0
- package/dist/src/constants.js +32 -0
- package/dist/src/convention-audit.d.ts +50 -0
- package/dist/src/convention-audit.js +553 -0
- package/dist/src/convention-audit.test.d.ts +1 -0
- package/dist/src/convention-audit.test.js +247 -0
- package/dist/src/daemon-utils.d.ts +18 -0
- package/dist/src/daemon-utils.js +37 -0
- package/dist/src/daemon.d.ts +22 -0
- package/dist/src/daemon.js +437 -0
- package/dist/src/daemon.test.d.ts +1 -0
- package/dist/src/daemon.test.js +60 -0
- package/dist/src/discovery.d.ts +43 -0
- package/dist/src/discovery.js +266 -0
- package/dist/src/doctor.d.ts +39 -0
- package/dist/src/doctor.js +230 -0
- package/dist/src/doctor.test.d.ts +1 -0
- package/dist/src/doctor.test.js +263 -0
- package/dist/src/download/article-download.d.ts +72 -0
- package/dist/src/download/article-download.js +305 -0
- package/dist/src/download/article-download.test.d.ts +1 -0
- package/dist/src/download/article-download.test.js +235 -0
- package/dist/src/download/index.d.ts +71 -0
- package/dist/src/download/index.js +363 -0
- package/dist/src/download/index.test.d.ts +1 -0
- package/dist/src/download/index.test.js +174 -0
- package/dist/src/download/media-download.d.ts +49 -0
- package/dist/src/download/media-download.js +127 -0
- package/dist/src/download/media-download.test.d.ts +1 -0
- package/dist/src/download/media-download.test.js +112 -0
- package/dist/src/download/progress.d.ts +36 -0
- package/dist/src/download/progress.js +120 -0
- package/dist/src/download/progress.test.d.ts +1 -0
- package/dist/src/download/progress.test.js +36 -0
- package/dist/src/electron-apps.d.ts +31 -0
- package/dist/src/electron-apps.js +91 -0
- package/dist/src/electron-apps.test.d.ts +1 -0
- package/dist/src/electron-apps.test.js +76 -0
- package/dist/src/engine.test.d.ts +1 -0
- package/dist/src/engine.test.js +312 -0
- package/dist/src/errors.d.ts +114 -0
- package/dist/src/errors.js +174 -0
- package/dist/src/errors.test.d.ts +1 -0
- package/dist/src/errors.test.js +109 -0
- package/dist/src/execution.d.ts +24 -0
- package/dist/src/execution.js +509 -0
- package/dist/src/execution.test.d.ts +1 -0
- package/dist/src/execution.test.js +645 -0
- package/dist/src/extension-manifest-regression.test.d.ts +1 -0
- package/dist/src/extension-manifest-regression.test.js +12 -0
- package/dist/src/external-clis.yaml +109 -0
- package/dist/src/external.d.ts +49 -0
- package/dist/src/external.js +211 -0
- package/dist/src/external.test.d.ts +1 -0
- package/dist/src/external.test.js +110 -0
- package/dist/src/help.d.ts +88 -0
- package/dist/src/help.js +555 -0
- package/dist/src/help.test.d.ts +1 -0
- package/dist/src/help.test.js +58 -0
- package/dist/src/hooks.d.ts +46 -0
- package/dist/src/hooks.js +58 -0
- package/dist/src/hooks.test.d.ts +4 -0
- package/dist/src/hooks.test.js +92 -0
- package/dist/src/interceptor.d.ts +44 -0
- package/dist/src/interceptor.js +183 -0
- package/dist/src/interceptor.test.d.ts +4 -0
- package/dist/src/interceptor.test.js +81 -0
- package/dist/src/launcher.d.ts +41 -0
- package/dist/src/launcher.js +226 -0
- package/dist/src/launcher.test.d.ts +1 -0
- package/dist/src/launcher.test.js +153 -0
- package/dist/src/logger.d.ts +26 -0
- package/dist/src/logger.js +49 -0
- package/dist/src/main.d.ts +5 -0
- package/dist/src/main.js +171 -0
- package/dist/src/manifest-types.d.ts +43 -0
- package/dist/src/manifest-types.js +9 -0
- package/dist/src/node-network.d.ts +10 -0
- package/dist/src/node-network.js +174 -0
- package/dist/src/node-network.test.d.ts +1 -0
- package/dist/src/node-network.test.js +55 -0
- package/dist/src/observation/artifact.d.ts +16 -0
- package/dist/src/observation/artifact.js +260 -0
- package/dist/src/observation/artifact.test.d.ts +1 -0
- package/dist/src/observation/artifact.test.js +121 -0
- package/dist/src/observation/events.d.ts +89 -0
- package/dist/src/observation/events.js +1 -0
- package/dist/src/observation/index.d.ts +7 -0
- package/dist/src/observation/index.js +7 -0
- package/dist/src/observation/manager.d.ts +9 -0
- package/dist/src/observation/manager.js +27 -0
- package/dist/src/observation/manager.test.d.ts +1 -0
- package/dist/src/observation/manager.test.js +13 -0
- package/dist/src/observation/redaction.d.ts +11 -0
- package/dist/src/observation/redaction.js +81 -0
- package/dist/src/observation/redaction.test.d.ts +1 -0
- package/dist/src/observation/redaction.test.js +32 -0
- package/dist/src/observation/retention.d.ts +32 -0
- package/dist/src/observation/retention.js +160 -0
- package/dist/src/observation/retention.test.d.ts +1 -0
- package/dist/src/observation/retention.test.js +118 -0
- package/dist/src/observation/ring-buffer.d.ts +22 -0
- package/dist/src/observation/ring-buffer.js +45 -0
- package/dist/src/observation/ring-buffer.test.d.ts +1 -0
- package/dist/src/observation/ring-buffer.test.js +22 -0
- package/dist/src/observation/session.d.ts +25 -0
- package/dist/src/observation/session.js +50 -0
- package/dist/src/output.d.ts +14 -0
- package/dist/src/output.js +152 -0
- package/dist/src/output.test.d.ts +1 -0
- package/dist/src/output.test.js +53 -0
- package/dist/src/package-exports.test.d.ts +1 -0
- package/dist/src/package-exports.test.js +112 -0
- package/dist/src/package-paths.d.ts +8 -0
- package/dist/src/package-paths.js +41 -0
- package/dist/src/pipeline/executor.d.ts +11 -0
- package/dist/src/pipeline/executor.js +93 -0
- package/dist/src/pipeline/executor.test.d.ts +4 -0
- package/dist/src/pipeline/executor.test.js +182 -0
- package/dist/src/pipeline/index.d.ts +5 -0
- package/dist/src/pipeline/index.js +5 -0
- package/dist/src/pipeline/registry.d.ts +28 -0
- package/dist/src/pipeline/registry.js +55 -0
- package/dist/src/pipeline/steps/browser.d.ts +13 -0
- package/dist/src/pipeline/steps/browser.js +86 -0
- package/dist/src/pipeline/steps/download.d.ts +18 -0
- package/dist/src/pipeline/steps/download.js +252 -0
- package/dist/src/pipeline/steps/download.test.d.ts +1 -0
- package/dist/src/pipeline/steps/download.test.js +102 -0
- package/dist/src/pipeline/steps/fetch.d.ts +5 -0
- package/dist/src/pipeline/steps/fetch.js +122 -0
- package/dist/src/pipeline/steps/fetch.test.d.ts +1 -0
- package/dist/src/pipeline/steps/fetch.test.js +117 -0
- package/dist/src/pipeline/steps/intercept.d.ts +5 -0
- package/dist/src/pipeline/steps/intercept.js +50 -0
- package/dist/src/pipeline/steps/tap.d.ts +12 -0
- package/dist/src/pipeline/steps/tap.js +93 -0
- package/dist/src/pipeline/steps/transform.d.ts +9 -0
- package/dist/src/pipeline/steps/transform.js +70 -0
- package/dist/src/pipeline/template.d.ts +17 -0
- package/dist/src/pipeline/template.js +338 -0
- package/dist/src/pipeline/template.test.d.ts +4 -0
- package/dist/src/pipeline/template.test.js +175 -0
- package/dist/src/pipeline/transform.test.d.ts +4 -0
- package/dist/src/pipeline/transform.test.js +133 -0
- package/dist/src/plugin-manifest.d.ts +70 -0
- package/dist/src/plugin-manifest.js +160 -0
- package/dist/src/plugin-manifest.test.d.ts +4 -0
- package/dist/src/plugin-manifest.test.js +179 -0
- package/dist/src/plugin-scaffold.d.ts +28 -0
- package/dist/src/plugin-scaffold.js +143 -0
- package/dist/src/plugin-scaffold.test.d.ts +4 -0
- package/dist/src/plugin-scaffold.test.js +83 -0
- package/dist/src/plugin.d.ts +145 -0
- package/dist/src/plugin.js +1245 -0
- package/dist/src/plugin.test.d.ts +4 -0
- package/dist/src/plugin.test.js +1324 -0
- package/dist/src/registry-api.d.ts +13 -0
- package/dist/src/registry-api.js +10 -0
- package/dist/src/registry.d.ts +123 -0
- package/dist/src/registry.js +125 -0
- package/dist/src/registry.test.d.ts +4 -0
- package/dist/src/registry.test.js +209 -0
- package/dist/src/runtime-detect.d.ts +31 -0
- package/dist/src/runtime-detect.js +47 -0
- package/dist/src/runtime-detect.test.d.ts +1 -0
- package/dist/src/runtime-detect.test.js +39 -0
- package/dist/src/runtime.d.ts +47 -0
- package/dist/src/runtime.js +66 -0
- package/dist/src/scripts/framework.d.ts +7 -0
- package/dist/src/scripts/framework.js +25 -0
- package/dist/src/scripts/interact.d.ts +4 -0
- package/dist/src/scripts/interact.js +20 -0
- package/dist/src/scripts/store.d.ts +13 -0
- package/dist/src/scripts/store.js +48 -0
- package/dist/src/serialization.d.ts +42 -0
- package/dist/src/serialization.js +102 -0
- package/dist/src/serialization.test.d.ts +1 -0
- package/dist/src/serialization.test.js +78 -0
- package/dist/src/skills.d.ts +14 -0
- package/dist/src/skills.js +127 -0
- package/dist/src/skills.test.d.ts +1 -0
- package/dist/src/skills.test.js +71 -0
- package/dist/src/snapshotFormatter.d.ts +11 -0
- package/dist/src/snapshotFormatter.js +338 -0
- package/dist/src/snapshotFormatter.test.d.ts +7 -0
- package/dist/src/snapshotFormatter.test.js +521 -0
- package/dist/src/tui.d.ts +28 -0
- package/dist/src/tui.js +179 -0
- package/dist/src/tui.test.d.ts +1 -0
- package/dist/src/tui.test.js +19 -0
- package/dist/src/types.d.ts +236 -0
- package/dist/src/types.js +7 -0
- package/dist/src/update-check.d.ts +66 -0
- package/dist/src/update-check.js +202 -0
- package/dist/src/update-check.test.d.ts +1 -0
- package/dist/src/update-check.test.js +116 -0
- package/dist/src/utils.d.ts +57 -0
- package/dist/src/utils.js +152 -0
- package/dist/src/utils.test.d.ts +1 -0
- package/dist/src/utils.test.js +155 -0
- package/dist/src/validate.d.ts +21 -0
- package/dist/src/validate.js +129 -0
- package/dist/src/validate.test.d.ts +9 -0
- package/dist/src/validate.test.js +90 -0
- package/dist/src/verify.d.ts +26 -0
- package/dist/src/verify.js +67 -0
- package/dist/src/version.d.ts +4 -0
- package/dist/src/version.js +22 -0
- package/dist/src/weixin-download.test.d.ts +1 -0
- package/dist/src/weixin-download.test.js +45 -0
- package/package.json +109 -0
- package/scripts/check-doc-coverage.sh +81 -0
- package/scripts/check-listing-id-pairing.mjs +193 -0
- package/scripts/check-silent-column-drop.mjs +105 -0
- package/scripts/check-typed-error-lint.mjs +118 -0
- package/scripts/clean-dist.cjs +13 -0
- package/scripts/copy-yaml.cjs +12 -0
- package/scripts/fetch-adapters.js +293 -0
- package/scripts/postinstall.js +174 -0
- package/scripts/silent-column-drop-baseline.json +910 -0
- package/scripts/typed-error-lint-baseline.json +1162 -0
- package/skills/opencli-adapter-author/SKILL.md +256 -0
- package/skills/opencli-adapter-author/references/adapter-template.md +471 -0
- package/skills/opencli-adapter-author/references/api-discovery.md +295 -0
- package/skills/opencli-adapter-author/references/coverage-matrix.md +81 -0
- package/skills/opencli-adapter-author/references/field-conventions.md +172 -0
- package/skills/opencli-adapter-author/references/field-decode-playbook.md +181 -0
- package/skills/opencli-adapter-author/references/jsdom-fixture-pattern.md +196 -0
- package/skills/opencli-adapter-author/references/output-design.md +149 -0
- package/skills/opencli-adapter-author/references/site-memory/bilibili.md +70 -0
- package/skills/opencli-adapter-author/references/site-memory/eastmoney.md +70 -0
- package/skills/opencli-adapter-author/references/site-memory/tonghuashun.md +51 -0
- package/skills/opencli-adapter-author/references/site-memory/xueqiu.md +58 -0
- package/skills/opencli-adapter-author/references/site-memory.md +231 -0
- package/skills/opencli-adapter-author/references/site-recon.md +134 -0
- package/skills/opencli-adapter-author/references/strategy-selection.md +169 -0
- package/skills/opencli-adapter-author/references/success-rate-pitfalls.md +162 -0
- package/skills/opencli-adapter-author/references/typed-errors.md +234 -0
- package/skills/opencli-autofix/SKILL.md +297 -0
- package/skills/opencli-browser/SKILL.md +444 -0
- package/skills/opencli-browser-sitemap/SKILL.md +96 -0
- package/skills/opencli-sitemap-author/SKILL.md +161 -0
- package/skills/opencli-sitemap-author/references/sitemap-schema.md +660 -0
- package/skills/opencli-usage/SKILL.md +169 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// semanticscholar recommendations: AI-curated related papers from Semantic
|
|
2
|
+
// Scholar's semantic graph. This endpoint has no equivalent in openalex or
|
|
3
|
+
// arxiv; it is the Semantic Scholar adapter's main differentiating surface.
|
|
4
|
+
//
|
|
5
|
+
// Hits `https://api.semanticscholar.org/recommendations/v1/papers/forpaper/{ref}`.
|
|
6
|
+
import { cli, Strategy } from '@jackwener/opencli/registry';
|
|
7
|
+
import { CommandExecutionError, EmptyResultError } from '@jackwener/opencli/errors';
|
|
8
|
+
import {
|
|
9
|
+
S2_REC_BASE,
|
|
10
|
+
normalizePaperRow,
|
|
11
|
+
requireBoundedInt,
|
|
12
|
+
requirePaperRef,
|
|
13
|
+
s2Fetch,
|
|
14
|
+
} from './utils.js';
|
|
15
|
+
|
|
16
|
+
const FIELDS = ['paperId', 'title', 'year', 'authors', 'citationCount', 'externalIds'].join(',');
|
|
17
|
+
|
|
18
|
+
cli({
|
|
19
|
+
site: 'semanticscholar',
|
|
20
|
+
name: 'recommendations',
|
|
21
|
+
access: 'read',
|
|
22
|
+
description: 'Semantic Scholar AI-curated related papers for a paperId, DOI, or arXiv id',
|
|
23
|
+
domain: 'api.semanticscholar.org',
|
|
24
|
+
strategy: Strategy.PUBLIC,
|
|
25
|
+
browser: false,
|
|
26
|
+
args: [
|
|
27
|
+
{ name: 'id', positional: true, required: true, help: 'paperId (40-char hex), DOI, arXiv id, or prefixed id' },
|
|
28
|
+
{ name: 'limit', type: 'int', default: 10, help: 'Max recommendations (1-500)' },
|
|
29
|
+
],
|
|
30
|
+
columns: ['rank', 'paperId', 'doi', 'title', 'year', 'firstAuthor', 'citationCount', 'url'],
|
|
31
|
+
func: async (args) => {
|
|
32
|
+
const ref = requirePaperRef(args.id);
|
|
33
|
+
const limit = requireBoundedInt(args.limit, 10, 500);
|
|
34
|
+
const url = `${S2_REC_BASE}/papers/forpaper/${encodeURIComponent(ref)}?fields=${FIELDS}&limit=${limit}`;
|
|
35
|
+
const body = await s2Fetch(url, 'semanticscholar recommendations');
|
|
36
|
+
|
|
37
|
+
const recommended = Array.isArray(body?.recommendedPapers) ? body.recommendedPapers : null;
|
|
38
|
+
if (recommended === null) {
|
|
39
|
+
throw new CommandExecutionError('semanticscholar recommendations returned an unexpected payload shape');
|
|
40
|
+
}
|
|
41
|
+
if (!recommended.length) {
|
|
42
|
+
throw new EmptyResultError('semanticscholar recommendations', `No Semantic Scholar recommendations for "${args.id}".`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return recommended.slice(0, limit).map((p, i) => normalizePaperRow(p, 'recommendations', { rank: i + 1 }));
|
|
46
|
+
},
|
|
47
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// semanticscholar search: paper search across the Semantic Scholar graph.
|
|
2
|
+
//
|
|
3
|
+
// Hits `/paper/search?query=...`. Returns the agent-useful projection:
|
|
4
|
+
// paperId (round-trips into `semanticscholar paper`), DOI, title, year,
|
|
5
|
+
// first author, citationCount. The bulk search endpoint is the rate-limited
|
|
6
|
+
// surface, so `utils.s2Fetch` retries once on 429.
|
|
7
|
+
import { cli, Strategy } from '@jackwener/opencli/registry';
|
|
8
|
+
import { CommandExecutionError, EmptyResultError } from '@jackwener/opencli/errors';
|
|
9
|
+
import {
|
|
10
|
+
S2_GRAPH_BASE,
|
|
11
|
+
normalizePaperRow,
|
|
12
|
+
requireBoundedInt,
|
|
13
|
+
requireString,
|
|
14
|
+
s2Fetch,
|
|
15
|
+
} from './utils.js';
|
|
16
|
+
|
|
17
|
+
const FIELDS = ['paperId', 'title', 'year', 'authors', 'citationCount', 'externalIds'].join(',');
|
|
18
|
+
|
|
19
|
+
cli({
|
|
20
|
+
site: 'semanticscholar',
|
|
21
|
+
name: 'search',
|
|
22
|
+
access: 'read',
|
|
23
|
+
description: 'Search Semantic Scholar papers by free text',
|
|
24
|
+
domain: 'api.semanticscholar.org',
|
|
25
|
+
strategy: Strategy.PUBLIC,
|
|
26
|
+
browser: false,
|
|
27
|
+
args: [
|
|
28
|
+
{ name: 'query', positional: true, required: true, help: 'Search text (e.g. "attention is all you need", "diffusion model")' },
|
|
29
|
+
{ name: 'limit', type: 'int', default: 20, help: 'Max papers (1-100, single Semantic Scholar page)' },
|
|
30
|
+
],
|
|
31
|
+
columns: ['rank', 'paperId', 'doi', 'title', 'year', 'firstAuthor', 'citationCount', 'url'],
|
|
32
|
+
func: async (args) => {
|
|
33
|
+
const query = requireString(args.query, 'query');
|
|
34
|
+
const limit = requireBoundedInt(args.limit, 20, 100);
|
|
35
|
+
const url = `${S2_GRAPH_BASE}/paper/search?query=${encodeURIComponent(query)}&limit=${limit}&fields=${FIELDS}`;
|
|
36
|
+
const body = await s2Fetch(url, 'semanticscholar search');
|
|
37
|
+
|
|
38
|
+
const data = Array.isArray(body?.data) ? body.data : null;
|
|
39
|
+
if (data === null) {
|
|
40
|
+
throw new CommandExecutionError('semanticscholar search returned an unexpected payload shape');
|
|
41
|
+
}
|
|
42
|
+
if (!data.length) {
|
|
43
|
+
throw new EmptyResultError('semanticscholar search', `No Semantic Scholar papers matched "${query}".`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return data.slice(0, limit).map((p, i) => normalizePaperRow(p, 'search', { rank: i + 1 }));
|
|
47
|
+
},
|
|
48
|
+
});
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
+
import { getRegistry } from '@jackwener/opencli/registry';
|
|
3
|
+
import { ArgumentError, CommandExecutionError, EmptyResultError } from '@jackwener/opencli/errors';
|
|
4
|
+
import './paper.js';
|
|
5
|
+
import './citations.js';
|
|
6
|
+
import './recommendations.js';
|
|
7
|
+
import './search.js';
|
|
8
|
+
|
|
9
|
+
function jsonResponse(body, status = 200) {
|
|
10
|
+
return new Response(JSON.stringify(body), {
|
|
11
|
+
status,
|
|
12
|
+
headers: { 'content-type': 'application/json' },
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
vi.unstubAllGlobals();
|
|
18
|
+
delete process.env.SEMANTIC_SCHOLAR_API_KEY;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
describe('semanticscholar adapter registry contracts', () => {
|
|
22
|
+
it('declares paper columns so paperId round-trips into citations and recommendations', () => {
|
|
23
|
+
const paper = getRegistry().get('semanticscholar/paper');
|
|
24
|
+
const citations = getRegistry().get('semanticscholar/citations');
|
|
25
|
+
const recommendations = getRegistry().get('semanticscholar/recommendations');
|
|
26
|
+
|
|
27
|
+
expect(paper).toBeDefined();
|
|
28
|
+
expect(citations).toBeDefined();
|
|
29
|
+
expect(recommendations).toBeDefined();
|
|
30
|
+
expect(paper.columns).toContain('paperId');
|
|
31
|
+
expect(citations.columns).toContain('paperId');
|
|
32
|
+
expect(recommendations.columns).toContain('paperId');
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('surfaces the unique Semantic Scholar fields on paper detail', () => {
|
|
36
|
+
const paper = getRegistry().get('semanticscholar/paper');
|
|
37
|
+
|
|
38
|
+
expect(paper.columns).toContain('influentialCitationCount');
|
|
39
|
+
expect(paper.columns).toContain('tldr');
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('marks every command as read access on the api.semanticscholar.org domain', () => {
|
|
43
|
+
for (const name of ['paper', 'citations', 'recommendations', 'search']) {
|
|
44
|
+
const cmd = getRegistry().get(`semanticscholar/${name}`);
|
|
45
|
+
expect(cmd, name).toBeDefined();
|
|
46
|
+
expect(cmd.access, name).toBe('read');
|
|
47
|
+
expect(cmd.domain, name).toBe('api.semanticscholar.org');
|
|
48
|
+
expect(cmd.browser, name).toBe(false);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
describe('semanticscholar paper command', () => {
|
|
54
|
+
const command = getRegistry().get('semanticscholar/paper');
|
|
55
|
+
|
|
56
|
+
it('returns the paper row with citation graph and tldr', async () => {
|
|
57
|
+
const fetchMock = vi.fn().mockResolvedValue(jsonResponse({
|
|
58
|
+
paperId: 'df2b0e26d0599ce3e70df8a9da02e51594e0e992',
|
|
59
|
+
title: 'BERT: Pre-training of Deep Bidirectional Transformers',
|
|
60
|
+
year: 2019,
|
|
61
|
+
authors: [{ name: 'Jacob Devlin' }, { name: 'Ming-Wei Chang' }],
|
|
62
|
+
citationCount: 116233,
|
|
63
|
+
influentialCitationCount: 22448,
|
|
64
|
+
referenceCount: 63,
|
|
65
|
+
tldr: { text: 'A new language representation model called BERT.' },
|
|
66
|
+
externalIds: { DOI: '10.18653/v1/N19-1423' },
|
|
67
|
+
url: 'https://www.semanticscholar.org/paper/df2b0e26d0599ce3e70df8a9da02e51594e0e992',
|
|
68
|
+
}));
|
|
69
|
+
vi.stubGlobal('fetch', fetchMock);
|
|
70
|
+
|
|
71
|
+
await expect(command.func({ id: '10.18653/v1/N19-1423' })).resolves.toEqual([{
|
|
72
|
+
paperId: 'df2b0e26d0599ce3e70df8a9da02e51594e0e992',
|
|
73
|
+
doi: '10.18653/v1/N19-1423',
|
|
74
|
+
title: 'BERT: Pre-training of Deep Bidirectional Transformers',
|
|
75
|
+
year: 2019,
|
|
76
|
+
firstAuthor: 'Jacob Devlin',
|
|
77
|
+
citationCount: 116233,
|
|
78
|
+
influentialCitationCount: 22448,
|
|
79
|
+
referenceCount: 63,
|
|
80
|
+
tldr: 'A new language representation model called BERT.',
|
|
81
|
+
url: 'https://www.semanticscholar.org/paper/df2b0e26d0599ce3e70df8a9da02e51594e0e992',
|
|
82
|
+
}]);
|
|
83
|
+
// DOI normalization: bare 10.x DOIs get the DOI: prefix encoded into the path.
|
|
84
|
+
expect(fetchMock.mock.calls[0][0]).toContain('DOI%3A10.18653%2Fv1%2FN19-1423');
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('forwards SEMANTIC_SCHOLAR_API_KEY as the x-api-key header when set', async () => {
|
|
88
|
+
process.env.SEMANTIC_SCHOLAR_API_KEY = 'test-key';
|
|
89
|
+
const paperId = 'a'.repeat(40);
|
|
90
|
+
const fetchMock = vi.fn().mockResolvedValue(jsonResponse({ paperId, title: 'x' }));
|
|
91
|
+
vi.stubGlobal('fetch', fetchMock);
|
|
92
|
+
|
|
93
|
+
await command.func({ id: paperId });
|
|
94
|
+
expect(fetchMock.mock.calls[0][1].headers['x-api-key']).toBe('test-key');
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('rejects invalid identifiers before fetching', async () => {
|
|
98
|
+
const fetchMock = vi.fn();
|
|
99
|
+
vi.stubGlobal('fetch', fetchMock);
|
|
100
|
+
|
|
101
|
+
await expect(command.func({ id: '' })).rejects.toBeInstanceOf(ArgumentError);
|
|
102
|
+
await expect(command.func({ id: 'not a real reference' })).rejects.toBeInstanceOf(ArgumentError);
|
|
103
|
+
expect(fetchMock).not.toHaveBeenCalled();
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it('typed-fails malformed paper detail rows instead of treating parser drift as empty', async () => {
|
|
107
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({})));
|
|
108
|
+
|
|
109
|
+
await expect(command.func({ id: '10.0/missing' })).rejects.toBeInstanceOf(CommandExecutionError);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it('typed-fails non-numeric metric fields instead of returning NaN', async () => {
|
|
113
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({
|
|
114
|
+
paperId: 'df2b0e26d0599ce3e70df8a9da02e51594e0e992',
|
|
115
|
+
title: 'Bad Metrics',
|
|
116
|
+
citationCount: 'many',
|
|
117
|
+
})));
|
|
118
|
+
|
|
119
|
+
await expect(command.func({ id: '10.0/bad-metrics' })).rejects.toBeInstanceOf(CommandExecutionError);
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
describe('semanticscholar citations command', () => {
|
|
124
|
+
const command = getRegistry().get('semanticscholar/citations');
|
|
125
|
+
|
|
126
|
+
it('unwraps citingPaper rows and offsets ranks correctly', async () => {
|
|
127
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({
|
|
128
|
+
data: [
|
|
129
|
+
{ citingPaper: { paperId: 'p1', title: 'Citing One', year: 2024, authors: [{ name: 'Alice' }], citationCount: 5, externalIds: { DOI: '10.1/p1' } } },
|
|
130
|
+
{ citingPaper: { paperId: 'p2', title: 'Citing Two', year: 2025, authors: [{ name: 'Bob' }], citationCount: 12, externalIds: {} } },
|
|
131
|
+
],
|
|
132
|
+
})));
|
|
133
|
+
|
|
134
|
+
await expect(command.func({ id: '10.18653/v1/N19-1423', limit: 2, offset: 10 })).resolves.toEqual([
|
|
135
|
+
{ rank: 11, paperId: 'p1', doi: '10.1/p1', title: 'Citing One', year: 2024, firstAuthor: 'Alice', citationCount: 5, url: 'https://www.semanticscholar.org/paper/p1' },
|
|
136
|
+
{ rank: 12, paperId: 'p2', doi: '', title: 'Citing Two', year: 2025, firstAuthor: 'Bob', citationCount: 12, url: 'https://www.semanticscholar.org/paper/p2' },
|
|
137
|
+
]);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it('rejects invalid arguments before fetching', async () => {
|
|
141
|
+
const fetchMock = vi.fn();
|
|
142
|
+
vi.stubGlobal('fetch', fetchMock);
|
|
143
|
+
|
|
144
|
+
await expect(command.func({ id: '', limit: 5 })).rejects.toBeInstanceOf(ArgumentError);
|
|
145
|
+
await expect(command.func({ id: '10.0/x', limit: 0 })).rejects.toBeInstanceOf(ArgumentError);
|
|
146
|
+
await expect(command.func({ id: '10.0/x', limit: 1001 })).rejects.toBeInstanceOf(ArgumentError);
|
|
147
|
+
expect(fetchMock).not.toHaveBeenCalled();
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it('maps empty citation pages to EmptyResultError', async () => {
|
|
151
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({ data: [] })));
|
|
152
|
+
|
|
153
|
+
await expect(command.func({ id: '10.0/x', limit: 5 })).rejects.toBeInstanceOf(EmptyResultError);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
it('typed-fails malformed payloads instead of returning empty rows', async () => {
|
|
157
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({ wrong: 'shape' })));
|
|
158
|
+
|
|
159
|
+
await expect(command.func({ id: '10.0/x', limit: 5 })).rejects.toBeInstanceOf(CommandExecutionError);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
it('typed-fails malformed citation rows without a citing paper identity', async () => {
|
|
163
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({
|
|
164
|
+
data: [{ citingPaper: { title: 'Missing identity' } }],
|
|
165
|
+
})));
|
|
166
|
+
|
|
167
|
+
await expect(command.func({ id: '10.0/x', limit: 5 })).rejects.toBeInstanceOf(CommandExecutionError);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it('typed-fails citation entries missing citingPaper instead of emitting blank rows', async () => {
|
|
171
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({
|
|
172
|
+
data: [{ contexts: ['missing citing paper'] }],
|
|
173
|
+
})));
|
|
174
|
+
|
|
175
|
+
await expect(command.func({ id: '10.0/x', limit: 5 })).rejects.toBeInstanceOf(CommandExecutionError);
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
describe('semanticscholar recommendations command', () => {
|
|
180
|
+
const command = getRegistry().get('semanticscholar/recommendations');
|
|
181
|
+
|
|
182
|
+
it('returns recommendedPapers rows ranked from 1', async () => {
|
|
183
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({
|
|
184
|
+
recommendedPapers: [
|
|
185
|
+
{ paperId: 'r1', title: 'Related One', year: 2024, authors: [{ name: 'Carol' }], citationCount: 7, externalIds: { DOI: '10.1/r1' } },
|
|
186
|
+
],
|
|
187
|
+
})));
|
|
188
|
+
|
|
189
|
+
await expect(command.func({ id: '10.18653/v1/N19-1423', limit: 1 })).resolves.toEqual([
|
|
190
|
+
{ rank: 1, paperId: 'r1', doi: '10.1/r1', title: 'Related One', year: 2024, firstAuthor: 'Carol', citationCount: 7, url: 'https://www.semanticscholar.org/paper/r1' },
|
|
191
|
+
]);
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it('maps empty recommendation responses to EmptyResultError', async () => {
|
|
195
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({ recommendedPapers: [] })));
|
|
196
|
+
|
|
197
|
+
await expect(command.func({ id: '10.0/x', limit: 5 })).rejects.toBeInstanceOf(EmptyResultError);
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
it('typed-fails when the payload is missing recommendedPapers entirely', async () => {
|
|
201
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({ wrong: 'shape' })));
|
|
202
|
+
|
|
203
|
+
await expect(command.func({ id: '10.0/x', limit: 5 })).rejects.toBeInstanceOf(CommandExecutionError);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
it('typed-fails malformed recommendation rows without a stable paper identity', async () => {
|
|
207
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({
|
|
208
|
+
recommendedPapers: [{ title: 'Missing id' }],
|
|
209
|
+
})));
|
|
210
|
+
|
|
211
|
+
await expect(command.func({ id: '10.0/x', limit: 5 })).rejects.toBeInstanceOf(CommandExecutionError);
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
describe('semanticscholar search command', () => {
|
|
216
|
+
const command = getRegistry().get('semanticscholar/search');
|
|
217
|
+
|
|
218
|
+
it('returns search rows that round-trip into semanticscholar paper', async () => {
|
|
219
|
+
const fetchMock = vi.fn().mockResolvedValue(jsonResponse({
|
|
220
|
+
data: [{
|
|
221
|
+
paperId: 'sp1',
|
|
222
|
+
title: 'A Search Hit',
|
|
223
|
+
year: 2023,
|
|
224
|
+
authors: [{ name: 'Dana' }],
|
|
225
|
+
citationCount: 99,
|
|
226
|
+
externalIds: { DOI: '10.1/sp1' },
|
|
227
|
+
}],
|
|
228
|
+
}));
|
|
229
|
+
vi.stubGlobal('fetch', fetchMock);
|
|
230
|
+
|
|
231
|
+
await expect(command.func({ query: 'transformers', limit: 1 })).resolves.toEqual([{
|
|
232
|
+
rank: 1,
|
|
233
|
+
paperId: 'sp1',
|
|
234
|
+
doi: '10.1/sp1',
|
|
235
|
+
title: 'A Search Hit',
|
|
236
|
+
year: 2023,
|
|
237
|
+
firstAuthor: 'Dana',
|
|
238
|
+
citationCount: 99,
|
|
239
|
+
url: 'https://www.semanticscholar.org/paper/sp1',
|
|
240
|
+
}]);
|
|
241
|
+
const url = new URL(fetchMock.mock.calls[0][0]);
|
|
242
|
+
expect(url.searchParams.get('query')).toBe('transformers');
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
it('rejects invalid arguments before fetching', async () => {
|
|
246
|
+
const fetchMock = vi.fn();
|
|
247
|
+
vi.stubGlobal('fetch', fetchMock);
|
|
248
|
+
|
|
249
|
+
await expect(command.func({ query: ' ', limit: 5 })).rejects.toBeInstanceOf(ArgumentError);
|
|
250
|
+
await expect(command.func({ query: 'x', limit: 0 })).rejects.toBeInstanceOf(ArgumentError);
|
|
251
|
+
await expect(command.func({ query: 'x', limit: 101 })).rejects.toBeInstanceOf(ArgumentError);
|
|
252
|
+
expect(fetchMock).not.toHaveBeenCalled();
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
it('retries once on 429 when no API key is configured', async () => {
|
|
256
|
+
const fetchMock = vi.fn()
|
|
257
|
+
.mockResolvedValueOnce(new Response('rate limited', { status: 429 }))
|
|
258
|
+
.mockResolvedValueOnce(jsonResponse({ data: [{ paperId: 'after', title: 'Recovered', year: 2024, authors: [], citationCount: 0, externalIds: {} }] }));
|
|
259
|
+
vi.stubGlobal('fetch', fetchMock);
|
|
260
|
+
|
|
261
|
+
const rows = await command.func({ query: 'bursty', limit: 1 });
|
|
262
|
+
expect(rows[0].paperId).toBe('after');
|
|
263
|
+
expect(fetchMock).toHaveBeenCalledTimes(2);
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
it('maps empty search results to EmptyResultError', async () => {
|
|
267
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({ data: [] })));
|
|
268
|
+
|
|
269
|
+
await expect(command.func({ query: 'zz-no-hit', limit: 5 })).rejects.toBeInstanceOf(EmptyResultError);
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
it('typed-fails malformed search rows without a stable paper identity', async () => {
|
|
273
|
+
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse({
|
|
274
|
+
data: [{ title: 'Missing id' }],
|
|
275
|
+
})));
|
|
276
|
+
|
|
277
|
+
await expect(command.func({ query: 'broken row', limit: 5 })).rejects.toBeInstanceOf(CommandExecutionError);
|
|
278
|
+
});
|
|
279
|
+
});
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// Shared helpers for the Semantic Scholar (`api.semanticscholar.org`) adapter.
|
|
2
|
+
//
|
|
3
|
+
// Semantic Scholar exposes a free Academic Graph + a separate Recommendations
|
|
4
|
+
// API. Anonymous traffic caps at roughly 100 requests / 5 minutes; an optional
|
|
5
|
+
// API key (free at https://www.semanticscholar.org/product/api#api-key-form)
|
|
6
|
+
// lifts the limit and is passed via `SEMANTIC_SCHOLAR_API_KEY`. Paper refs
|
|
7
|
+
// accept Semantic Scholar paperIds, DOIs, arXiv ids, ACL ids, MAG ids, PMID,
|
|
8
|
+
// or full URLs; they round-trip through `paper <ref>` to `citations <ref>`
|
|
9
|
+
// and `recommendations <ref>`.
|
|
10
|
+
import { ArgumentError, CommandExecutionError, EmptyResultError } from '@jackwener/opencli/errors';
|
|
11
|
+
|
|
12
|
+
export const S2_GRAPH_BASE = 'https://api.semanticscholar.org/graph/v1';
|
|
13
|
+
export const S2_REC_BASE = 'https://api.semanticscholar.org/recommendations/v1';
|
|
14
|
+
const UA = 'opencli-semanticscholar-adapter (+https://github.com/jackwener/opencli)';
|
|
15
|
+
|
|
16
|
+
// Semantic Scholar paperId: 40-char lowercase hex (SHA-ish).
|
|
17
|
+
const S2_PAPER_ID = /^[0-9a-f]{40}$/i;
|
|
18
|
+
// DOIs: anything starting with 10. after an optional `doi:` / `doi.org/` prefix.
|
|
19
|
+
const DOI_BARE = /^10\.\S+$/;
|
|
20
|
+
// arXiv ids: modern `YYMM.NNNNN` form or legacy `archive/YYMMNNN`.
|
|
21
|
+
const ARXIV_MODERN = /^\d{4}\.\d{4,5}(?:v\d+)?$/;
|
|
22
|
+
const ARXIV_LEGACY = /^[a-z-]+\/\d{7}(?:v\d+)?$/i;
|
|
23
|
+
// Other Semantic Scholar accepted prefixes that we pass through verbatim.
|
|
24
|
+
const PREFIXED = /^(ARXIV|MAG|ACL|PMID|PMCID|URL|CorpusId|DBLP):/i;
|
|
25
|
+
|
|
26
|
+
export function requireString(value, label) {
|
|
27
|
+
const s = String(value ?? '').trim();
|
|
28
|
+
if (!s) {
|
|
29
|
+
throw new ArgumentError(`semanticscholar ${label} cannot be empty`);
|
|
30
|
+
}
|
|
31
|
+
return s;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function requireBoundedInt(value, defaultValue, maxValue, label = 'limit') {
|
|
35
|
+
const raw = value ?? defaultValue;
|
|
36
|
+
const n = typeof raw === 'number' ? raw : Number(raw);
|
|
37
|
+
if (!Number.isInteger(n) || n <= 0) {
|
|
38
|
+
throw new ArgumentError(`semanticscholar ${label} must be a positive integer`);
|
|
39
|
+
}
|
|
40
|
+
if (n > maxValue) {
|
|
41
|
+
throw new ArgumentError(`semanticscholar ${label} must be <= ${maxValue}`);
|
|
42
|
+
}
|
|
43
|
+
return n;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Resolve a user-supplied paper reference to a Semantic Scholar paper id
|
|
48
|
+
* segment. Accepts:
|
|
49
|
+
*
|
|
50
|
+
* - bare Semantic Scholar paperId (40-char hex)
|
|
51
|
+
* - DOI (with or without `doi:` / `https://doi.org/` prefix)
|
|
52
|
+
* - arXiv id (`1706.03762` / `1706.03762v3` / `cs/0501067`)
|
|
53
|
+
* - typed prefixes Semantic Scholar accepts verbatim (`ARXIV:`, `MAG:`,
|
|
54
|
+
* `ACL:`, `PMID:`, `PMCID:`, `URL:`, `CorpusId:`, `DBLP:`)
|
|
55
|
+
* - full `https://www.semanticscholar.org/paper/<paperId>` URL
|
|
56
|
+
*/
|
|
57
|
+
export function requirePaperRef(value) {
|
|
58
|
+
const raw = String(value ?? '').trim();
|
|
59
|
+
if (!raw) {
|
|
60
|
+
throw new ArgumentError(
|
|
61
|
+
'semanticscholar paper id cannot be empty',
|
|
62
|
+
'Example: opencli semanticscholar paper 10.18653/v1/N19-1423',
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
const s2Url = raw.match(/^https?:\/\/(?:www\.)?semanticscholar\.org\/paper\/(?:[^/]+\/)?([0-9a-f]{40})/i);
|
|
66
|
+
if (s2Url) return s2Url[1].toLowerCase();
|
|
67
|
+
if (S2_PAPER_ID.test(raw)) return raw.toLowerCase();
|
|
68
|
+
if (PREFIXED.test(raw)) return raw;
|
|
69
|
+
if (/^doi:/i.test(raw)) {
|
|
70
|
+
const doi = raw.replace(/^doi:/i, '').trim();
|
|
71
|
+
if (DOI_BARE.test(doi)) return `DOI:${doi}`;
|
|
72
|
+
}
|
|
73
|
+
const doiUrl = raw.match(/^https?:\/\/(?:dx\.)?doi\.org\/(.+)$/i);
|
|
74
|
+
if (doiUrl && DOI_BARE.test(doiUrl[1])) return `DOI:${doiUrl[1]}`;
|
|
75
|
+
if (DOI_BARE.test(raw)) return `DOI:${raw}`;
|
|
76
|
+
if (ARXIV_MODERN.test(raw) || ARXIV_LEGACY.test(raw)) return `ARXIV:${raw}`;
|
|
77
|
+
throw new ArgumentError(
|
|
78
|
+
`semanticscholar paper id "${value}" is not recognised`,
|
|
79
|
+
'Use a Semantic Scholar paperId, a DOI, an arXiv id, or a prefixed id (e.g. "ARXIV:1706.03762", "PMID:12345").',
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Fetch with optional `SEMANTIC_SCHOLAR_API_KEY` header. Retries once on 429
|
|
85
|
+
* after a short pause; anonymous traffic hits the public ~100 req / 5 min
|
|
86
|
+
* cap, and a single retry covers the typical burst-then-cool-down case.
|
|
87
|
+
*/
|
|
88
|
+
export async function s2Fetch(url, label) {
|
|
89
|
+
const headers = { 'user-agent': UA, accept: 'application/json' };
|
|
90
|
+
const apiKey = process.env.SEMANTIC_SCHOLAR_API_KEY;
|
|
91
|
+
if (apiKey) headers['x-api-key'] = apiKey;
|
|
92
|
+
|
|
93
|
+
let resp;
|
|
94
|
+
let attempt = 0;
|
|
95
|
+
while (true) {
|
|
96
|
+
try {
|
|
97
|
+
resp = await fetch(url, { headers });
|
|
98
|
+
} catch (err) {
|
|
99
|
+
throw new CommandExecutionError(
|
|
100
|
+
`${label} request failed: ${err?.message ?? err}`,
|
|
101
|
+
'Check that api.semanticscholar.org is reachable from this network.',
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
if (resp.status === 429 && attempt === 0 && !apiKey) {
|
|
105
|
+
attempt += 1;
|
|
106
|
+
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (resp.status === 404) {
|
|
113
|
+
throw new EmptyResultError(label, `Semantic Scholar returned 404 for ${url}.`);
|
|
114
|
+
}
|
|
115
|
+
if (resp.status === 429) {
|
|
116
|
+
throw new CommandExecutionError(
|
|
117
|
+
`${label} returned HTTP 429 (rate limited)`,
|
|
118
|
+
'Semantic Scholar throttles anonymous traffic; set SEMANTIC_SCHOLAR_API_KEY (free at https://www.semanticscholar.org/product/api) or wait a minute and retry.',
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
if (!resp.ok) {
|
|
122
|
+
throw new CommandExecutionError(`${label} returned HTTP ${resp.status}`);
|
|
123
|
+
}
|
|
124
|
+
let body;
|
|
125
|
+
try {
|
|
126
|
+
body = await resp.json();
|
|
127
|
+
} catch (err) {
|
|
128
|
+
throw new CommandExecutionError(`${label} returned malformed JSON: ${err?.message ?? err}`);
|
|
129
|
+
}
|
|
130
|
+
if (body && typeof body === 'object' && body.error) {
|
|
131
|
+
throw new CommandExecutionError(`${label} returned an error: ${body.error}`);
|
|
132
|
+
}
|
|
133
|
+
return body;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Return the AI-generated one-line summary if present, else ''. */
|
|
137
|
+
export function tldrText(tldr) {
|
|
138
|
+
if (tldr && typeof tldr === 'object' && typeof tldr.text === 'string') {
|
|
139
|
+
return tldr.text.trim();
|
|
140
|
+
}
|
|
141
|
+
return '';
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** First author display name, or '' when authors is missing. */
|
|
145
|
+
export function firstAuthorName(authors) {
|
|
146
|
+
if (!Array.isArray(authors) || !authors.length) return '';
|
|
147
|
+
const first = authors[0];
|
|
148
|
+
if (first && typeof first === 'object' && typeof first.name === 'string') {
|
|
149
|
+
return first.name.trim();
|
|
150
|
+
}
|
|
151
|
+
return '';
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function optionalNumber(value, label) {
|
|
155
|
+
if (value == null) return null;
|
|
156
|
+
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
|
157
|
+
throw new CommandExecutionError(`semanticscholar ${label} must be a number when present`);
|
|
158
|
+
}
|
|
159
|
+
return value;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function normalizePaperRow(paper, label, { rank } = {}) {
|
|
163
|
+
if (!paper || typeof paper !== 'object') {
|
|
164
|
+
throw new CommandExecutionError(`semanticscholar ${label} row is not an object`);
|
|
165
|
+
}
|
|
166
|
+
if (typeof paper.paperId !== 'string' || !paper.paperId.trim()) {
|
|
167
|
+
throw new CommandExecutionError(`semanticscholar ${label} row is missing paperId`);
|
|
168
|
+
}
|
|
169
|
+
if (typeof paper.title !== 'string' || !paper.title.trim()) {
|
|
170
|
+
throw new CommandExecutionError(`semanticscholar ${label} row is missing title`);
|
|
171
|
+
}
|
|
172
|
+
if (paper.authors != null && !Array.isArray(paper.authors)) {
|
|
173
|
+
throw new CommandExecutionError(`semanticscholar ${label} row has malformed authors`);
|
|
174
|
+
}
|
|
175
|
+
const row = {
|
|
176
|
+
paperId: paper.paperId.trim(),
|
|
177
|
+
doi: pickDoi(paper.externalIds),
|
|
178
|
+
title: paper.title.trim(),
|
|
179
|
+
year: optionalNumber(paper.year, `${label} year`),
|
|
180
|
+
firstAuthor: firstAuthorName(paper.authors),
|
|
181
|
+
citationCount: optionalNumber(paper.citationCount, `${label} citationCount`),
|
|
182
|
+
url: typeof paper.url === 'string' && paper.url.trim()
|
|
183
|
+
? paper.url.trim()
|
|
184
|
+
: `https://www.semanticscholar.org/paper/${paper.paperId.trim()}`,
|
|
185
|
+
};
|
|
186
|
+
if (rank != null) return { rank, ...row };
|
|
187
|
+
return row;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** Strip the typed prefix from `externalIds.DOI` and similar. */
|
|
191
|
+
export function pickDoi(externalIds) {
|
|
192
|
+
if (externalIds && typeof externalIds === 'object' && typeof externalIds.DOI === 'string') {
|
|
193
|
+
return externalIds.DOI;
|
|
194
|
+
}
|
|
195
|
+
return '';
|
|
196
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cli, Strategy } from '@jackwener/opencli/registry';
|
|
2
|
+
import { loadSinaBlogArticle } from './utils.js';
|
|
3
|
+
cli({
|
|
4
|
+
site: 'sinablog',
|
|
5
|
+
name: 'article',
|
|
6
|
+
access: 'read',
|
|
7
|
+
description: '获取新浪博客单篇文章详情',
|
|
8
|
+
domain: 'blog.sina.com.cn',
|
|
9
|
+
strategy: Strategy.COOKIE,
|
|
10
|
+
args: [
|
|
11
|
+
{ name: 'url', required: true, positional: true, help: '文章URL(如 https://blog.sina.com.cn/s/blog_xxx.html)' },
|
|
12
|
+
],
|
|
13
|
+
columns: ['title', 'author', 'date', 'category', 'readCount', 'commentCount'],
|
|
14
|
+
func: async (page, args) => loadSinaBlogArticle(page, args.url),
|
|
15
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cli, Strategy } from '@jackwener/opencli/registry';
|
|
2
|
+
import { loadSinaBlogHot } from './utils.js';
|
|
3
|
+
cli({
|
|
4
|
+
site: 'sinablog',
|
|
5
|
+
name: 'hot',
|
|
6
|
+
access: 'read',
|
|
7
|
+
description: '获取新浪博客热门文章/推荐',
|
|
8
|
+
domain: 'blog.sina.com.cn',
|
|
9
|
+
strategy: Strategy.COOKIE,
|
|
10
|
+
args: [
|
|
11
|
+
{ name: 'limit', type: 'int', default: 20, help: '返回的文章数量' },
|
|
12
|
+
],
|
|
13
|
+
columns: ['rank', 'title', 'author', 'date', 'readCount', 'url'],
|
|
14
|
+
func: async (page, args) => loadSinaBlogHot(page, Number(args.limit) || 20),
|
|
15
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { cli, Strategy } from '@jackwener/opencli/registry';
|
|
2
|
+
function normalize(value) {
|
|
3
|
+
return typeof value === 'string' ? value.replace(/\s+/g, ' ').trim() : '';
|
|
4
|
+
}
|
|
5
|
+
function stripHtml(value) {
|
|
6
|
+
return value.replace(/<[^>]+>/g, '');
|
|
7
|
+
}
|
|
8
|
+
async function searchSinaBlog(keyword, limit) {
|
|
9
|
+
const url = new URL('https://search.sina.com.cn/api/search');
|
|
10
|
+
url.searchParams.set('q', keyword);
|
|
11
|
+
url.searchParams.set('tp', 'mix');
|
|
12
|
+
url.searchParams.set('sort', '0');
|
|
13
|
+
url.searchParams.set('page', '1');
|
|
14
|
+
url.searchParams.set('size', String(Math.max(limit, 10)));
|
|
15
|
+
url.searchParams.set('from', 'search_result');
|
|
16
|
+
const resp = await fetch(url, {
|
|
17
|
+
headers: {
|
|
18
|
+
'User-Agent': 'Mozilla/5.0',
|
|
19
|
+
Accept: 'application/json',
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
if (!resp.ok)
|
|
23
|
+
throw new Error(`Sina blog search failed: HTTP ${resp.status}`);
|
|
24
|
+
const data = await resp.json();
|
|
25
|
+
const list = Array.isArray(data?.data?.list) ? data.data.list : [];
|
|
26
|
+
return list
|
|
27
|
+
.filter((item) => normalize(item?.url).includes('blog.sina.com.cn/s/blog_'))
|
|
28
|
+
.slice(0, limit)
|
|
29
|
+
.map((item, index) => ({
|
|
30
|
+
rank: index + 1,
|
|
31
|
+
title: normalize(stripHtml(item?.title || '')),
|
|
32
|
+
author: normalize(item?.media_show || item?.author),
|
|
33
|
+
date: normalize(item?.time || item?.dataTime),
|
|
34
|
+
description: normalize(item?.intro || item?.searchSummary).slice(0, 150),
|
|
35
|
+
url: normalize(item?.url),
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
cli({
|
|
39
|
+
site: 'sinablog',
|
|
40
|
+
name: 'search',
|
|
41
|
+
access: 'read',
|
|
42
|
+
description: '搜索新浪博客文章(通过新浪搜索)',
|
|
43
|
+
domain: 'blog.sina.com.cn',
|
|
44
|
+
strategy: Strategy.PUBLIC,
|
|
45
|
+
browser: false,
|
|
46
|
+
args: [
|
|
47
|
+
{ name: 'keyword', required: true, positional: true, help: '搜索关键词' },
|
|
48
|
+
{ name: 'limit', type: 'int', default: 20, help: '返回的文章数量' },
|
|
49
|
+
],
|
|
50
|
+
columns: ['rank', 'title', 'author', 'date', 'description', 'url'],
|
|
51
|
+
func: async (args) => searchSinaBlog(args.keyword, Math.max(1, Math.min(Number(args.limit) || 20, 50))),
|
|
52
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cli, Strategy } from '@jackwener/opencli/registry';
|
|
2
|
+
import { loadSinaBlogUser } from './utils.js';
|
|
3
|
+
cli({
|
|
4
|
+
site: 'sinablog',
|
|
5
|
+
name: 'user',
|
|
6
|
+
access: 'read',
|
|
7
|
+
description: '获取新浪博客用户的文章列表',
|
|
8
|
+
domain: 'blog.sina.com.cn',
|
|
9
|
+
strategy: Strategy.COOKIE,
|
|
10
|
+
args: [
|
|
11
|
+
{ name: 'uid', required: true, positional: true, help: '新浪博客用户ID(如 1234567890)' },
|
|
12
|
+
{ name: 'limit', type: 'int', default: 20, help: '返回的文章数量' },
|
|
13
|
+
],
|
|
14
|
+
columns: ['rank', 'title', 'author', 'date', 'readCount', 'url'],
|
|
15
|
+
func: async (page, args) => loadSinaBlogUser(page, args.uid, Number(args.limit) || 20),
|
|
16
|
+
});
|