publishport-opencli 1.0.19 → 1.0.21
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/cli-manifest.json +35 -0
- package/clis/12306/me.js +2 -2
- package/clis/12306/orders.js +3 -3
- package/clis/12306/passengers.js +3 -3
- package/clis/12306/price.js +1 -1
- package/clis/12306/stations.js +1 -1
- package/clis/12306/train.js +1 -1
- package/clis/12306/trains.js +1 -1
- package/clis/12306/utils.js +1 -1
- package/clis/1688/download.js +1 -1
- package/clis/1688/item.js +4 -4
- package/clis/1688/search.js +4 -4
- package/clis/1688/store.js +4 -4
- package/clis/1point3acres/forum.js +1 -1
- package/clis/1point3acres/forums.js +1 -1
- package/clis/1point3acres/notifications.js +1 -1
- package/clis/1point3acres/search.js +1 -1
- package/clis/1point3acres/thread.js +2 -2
- package/clis/1point3acres/user.js +1 -1
- package/clis/1point3acres/utils.js +2 -2
- package/clis/36kr/article.js +2 -2
- package/clis/36kr/hot.js +2 -2
- package/clis/36kr/news.js +1 -1
- package/clis/36kr/search.js +2 -2
- package/clis/51job/company.js +2 -2
- package/clis/51job/detail.js +2 -2
- package/clis/51job/hot.js +1 -1
- package/clis/51job/search.js +1 -1
- package/clis/51job/utils.js +7 -7
- package/clis/_atlassian/shared.js +9 -9
- package/clis/_shared/article/auth.js +4 -4
- package/clis/_shared/article/douban-md2draft.js +4 -4
- package/clis/_shared/article/format.js +1 -1
- package/clis/_shared/article/images.js +7 -7
- package/clis/_shared/article/login.js +1 -1
- package/clis/_shared/article/publish.js +11 -11
- package/clis/_shared/common.js +1 -1
- package/clis/_shared/content-guard.js +1 -1
- package/clis/_shared/desktop-commands.js +1 -1
- package/clis/_shared/file-inject.js +12 -12
- package/clis/_shared/self-hosted-sites.js +2 -2
- package/clis/_shared/site-auth.js +1 -1
- package/clis/_shared/token-auth.js +2 -2
- package/clis/_shared/video-publish.js +9 -9
- package/clis/amazon/offer.js +3 -3
- package/clis/amazon/product.js +5 -5
- package/clis/amazon/shared.js +6 -6
- package/clis/antigravity/_actions.js +13 -13
- package/clis/antigravity/audit-extras.js +10 -10
- package/clis/antigravity/delete.js +1 -1
- package/clis/antigravity/model.js +6 -6
- package/clis/antigravity/new.js +2 -2
- package/clis/antigravity/read.js +2 -2
- package/clis/antigravity/rename.js +1 -1
- package/clis/antigravity/send.js +3 -3
- package/clis/antigravity/serve.js +17 -17
- package/clis/antigravity/storage.js +6 -6
- package/clis/antigravity/watch.js +2 -2
- package/clis/apple-podcasts/episodes.js +1 -1
- package/clis/apple-podcasts/top.js +1 -1
- package/clis/apple-podcasts/utils.js +1 -1
- package/clis/archive/item.js +1 -1
- package/clis/archive/search.js +1 -1
- package/clis/archive/snapshots.js +1 -1
- package/clis/archive/wayback.js +1 -1
- package/clis/arxiv/author.js +1 -1
- package/clis/arxiv/utils.js +1 -1
- package/clis/autohome/brand.js +1 -1
- package/clis/autohome/score.js +1 -1
- package/clis/autohome/utils.js +1 -1
- package/clis/baijiahao/article.js +1 -1
- package/clis/baijiahao/lists.js +1 -1
- package/clis/baijiahao/login.js +1 -1
- package/clis/baijiahao/publish.js +9 -9
- package/clis/baijiahao/stats.js +1 -1
- package/clis/baijiahao/whoami.js +1 -1
- package/clis/band/bands.js +2 -2
- package/clis/band/mentions.js +2 -2
- package/clis/band/post.js +4 -4
- package/clis/band/posts.js +3 -3
- package/clis/barchart/flow.js +3 -3
- package/clis/barchart/greeks.js +2 -2
- package/clis/barchart/quote.js +3 -3
- package/clis/bbc/news.js +1 -1
- package/clis/bbc/topic.js +1 -1
- package/clis/bbc/utils.js +1 -1
- package/clis/bilibili/article.js +1 -1
- package/clis/bilibili/categories.js +1 -1
- package/clis/bilibili/coin.js +1 -1
- package/clis/bilibili/comment-del.js +1 -1
- package/clis/bilibili/comment-like.js +1 -1
- package/clis/bilibili/comment.js +1 -1
- package/clis/bilibili/comments.js +1 -1
- package/clis/bilibili/dm-list.js +1 -1
- package/clis/bilibili/dm-read.js +1 -1
- package/clis/bilibili/dm-send.js +1 -1
- package/clis/bilibili/download.js +2 -2
- package/clis/bilibili/drafts.js +1 -1
- package/clis/bilibili/dynamic-post.js +3 -3
- package/clis/bilibili/favorite-add.js +1 -1
- package/clis/bilibili/favorite.js +1 -1
- package/clis/bilibili/feed.js +2 -2
- package/clis/bilibili/follow.js +1 -1
- package/clis/bilibili/following.js +1 -1
- package/clis/bilibili/like.js +1 -1
- package/clis/bilibili/partitions.js +1 -1
- package/clis/bilibili/stats.js +1 -1
- package/clis/bilibili/subtitle.js +3 -3
- package/clis/bilibili/summary.js +1 -1
- package/clis/bilibili/topics.js +1 -1
- package/clis/bilibili/unfollow.js +1 -1
- package/clis/bilibili/upload.js +1 -1
- package/clis/bilibili/utils.js +10 -10
- package/clis/bilibili/video-drafts.js +1 -1
- package/clis/bilibili/video.js +1 -1
- package/clis/bloomberg/businessweek.js +4 -4
- package/clis/bloomberg/news.js +2 -2
- package/clis/bloomberg/utils.js +13 -13
- package/clis/bluesky/post.js +1 -1
- package/clis/bluesky/shared.js +11 -11
- package/clis/bluesky/whoami.js +1 -1
- package/clis/booking/search.js +2 -2
- package/clis/boss/accept.js +1 -1
- package/clis/boss/applied.js +1 -1
- package/clis/boss/auth.js +1 -1
- package/clis/boss/batchgreet.js +1 -1
- package/clis/boss/bossinfo.js +1 -1
- package/clis/boss/chatlist.js +1 -1
- package/clis/boss/chatmsg.js +1 -1
- package/clis/boss/cities.js +1 -1
- package/clis/boss/detail.js +1 -1
- package/clis/boss/exchange.js +1 -1
- package/clis/boss/greet.js +1 -1
- package/clis/boss/interviews.js +1 -1
- package/clis/boss/invite.js +1 -1
- package/clis/boss/joblist.js +1 -1
- package/clis/boss/mark.js +1 -1
- package/clis/boss/me.js +2 -2
- package/clis/boss/recommend.js +1 -1
- package/clis/boss/resumedelete.js +1 -1
- package/clis/boss/resumelist.js +1 -1
- package/clis/boss/resumeupload.js +11 -11
- package/clis/boss/search.js +1 -1
- package/clis/boss/send.js +1 -1
- package/clis/boss/sendresume.js +1 -1
- package/clis/boss/stats.js +1 -1
- package/clis/boss/unread.js +1 -1
- package/clis/boss/utils.js +13 -13
- package/clis/chaoxing/assignments.js +1 -1
- package/clis/chaoxing/exams.js +1 -1
- package/clis/chaoxing/utils.js +9 -9
- package/clis/chatgpt/ask.js +1 -1
- package/clis/chatgpt/auth.js +2 -2
- package/clis/chatgpt/detail.js +1 -1
- package/clis/chatgpt/image.js +1 -1
- package/clis/chatgpt/read.js +1 -1
- package/clis/chatgpt/send.js +1 -1
- package/clis/chatgpt/utils.js +59 -59
- package/clis/chatgpt-app/ask.js +1 -1
- package/clis/chatgpt-app/send.js +1 -1
- package/clis/chatwise/model.js +6 -6
- package/clis/chess/analyze.js +1 -1
- package/clis/chess/game.js +1 -1
- package/clis/chess/games.js +1 -1
- package/clis/chess/stats.js +1 -1
- package/clis/chess/utils.js +1 -1
- package/clis/claude/ask.js +2 -2
- package/clis/claude/detail.js +1 -1
- package/clis/claude/new.js +1 -1
- package/clis/claude/read.js +1 -1
- package/clis/claude/send.js +1 -1
- package/clis/claude/utils.js +23 -23
- package/clis/cnblogs/article.js +1 -1
- package/clis/cnblogs/login.js +1 -1
- package/clis/cnblogs/stats.js +7 -7
- package/clis/cnblogs/whoami.js +1 -1
- package/clis/codex/_actions.js +3 -3
- package/clis/codex/archive.js +1 -1
- package/clis/codex/ask.js +6 -6
- package/clis/codex/model.js +8 -8
- package/clis/codex/pin.js +1 -1
- package/clis/codex/rename.js +4 -4
- package/clis/codex/send.js +3 -3
- package/clis/codex/sidebar.js +1 -1
- package/clis/coingecko/categories.js +1 -1
- package/clis/coingecko/coin.js +1 -1
- package/clis/coingecko/derivatives.js +1 -1
- package/clis/coingecko/exchanges.js +1 -1
- package/clis/coingecko/global.js +1 -1
- package/clis/coingecko/trending.js +1 -1
- package/clis/confluence/search.js +1 -1
- package/clis/coupang/product.js +3 -3
- package/clis/coupang/utils.js +1 -1
- package/clis/crates/crate.js +1 -1
- package/clis/crates/search.js +1 -1
- package/clis/crates/utils.js +1 -1
- package/clis/csdn/article.js +13 -13
- package/clis/csdn/columns.js +1 -1
- package/clis/csdn/login.js +1 -1
- package/clis/csdn/stats.js +4 -4
- package/clis/csdn/whoami.js +1 -1
- package/clis/cto51/article.js +1 -1
- package/clis/cto51/whoami.js +1 -1
- package/clis/ctrip/flight.js +2 -2
- package/clis/ctrip/hotel-search.js +3 -3
- package/clis/ctrip/hotel-suggest.js +1 -1
- package/clis/ctrip/search.js +1 -1
- package/clis/ctrip/utils.js +6 -6
- package/clis/cursor/ask.js +5 -5
- package/clis/cursor/composer.js +2 -2
- package/clis/cursor/model.js +4 -4
- package/clis/cursor/send.js +2 -2
- package/clis/dblp/author.js +1 -1
- package/clis/dblp/paper.js +1 -1
- package/clis/dblp/search.js +1 -1
- package/clis/dblp/utils.js +1 -1
- package/clis/dblp/venue.js +1 -1
- package/clis/deepseek/ask.js +1 -1
- package/clis/deepseek/auth.js +2 -2
- package/clis/deepseek/detail.js +1 -1
- package/clis/deepseek/new.js +1 -1
- package/clis/deepseek/read.js +1 -1
- package/clis/deepseek/send.js +7 -7
- package/clis/deepseek/utils.js +25 -25
- package/clis/defillama/protocol.js +1 -1
- package/clis/defillama/protocols.js +1 -1
- package/clis/defillama/utils.js +1 -1
- package/clis/devto/auth.js +2 -2
- package/clis/devto/latest.js +1 -1
- package/clis/devto/publish.js +5 -5
- package/clis/devto/read.js +2 -2
- package/clis/devto/stats.js +3 -3
- package/clis/dianping/auth.js +2 -2
- package/clis/dianping/cityResolver.js +2 -2
- package/clis/dianping/search.js +1 -1
- package/clis/dianping/shop.js +1 -1
- package/clis/dianping/utils.js +1 -1
- package/clis/discord-app/delete.js +3 -3
- package/clis/discord-app/read.js +1 -1
- package/clis/discord-app/thread-read.js +1 -1
- package/clis/discord-web/auth.js +2 -2
- package/clis/discord-web/send.js +5 -5
- package/clis/dockerhub/image.js +1 -1
- package/clis/dockerhub/search.js +1 -1
- package/clis/dockerhub/utils.js +1 -1
- package/clis/dongchedi/koubei.js +1 -1
- package/clis/dongchedi/models.js +1 -1
- package/clis/dongchedi/score.js +1 -1
- package/clis/dongchedi/search.js +1 -1
- package/clis/dongchedi/series.js +1 -1
- package/clis/dongchedi/specs.js +1 -1
- package/clis/dongchedi/utils.js +1 -1
- package/clis/douban/article.js +3 -3
- package/clis/douban/auth.js +2 -2
- package/clis/douban/download.js +1 -1
- package/clis/douban/utils.js +23 -23
- package/clis/doubao/auth.js +3 -3
- package/clis/doubao/utils.js +39 -39
- package/clis/doubao-app/ask.js +1 -1
- package/clis/doubao-app/utils.js +4 -4
- package/clis/douyin/_shared/browser-fetch.js +7 -7
- package/clis/douyin/_shared/draft-cache.js +1 -1
- package/clis/douyin/_shared/imagex-upload.js +1 -1
- package/clis/douyin/_shared/sts2.js +1 -1
- package/clis/douyin/_shared/text-extra.js +1 -1
- package/clis/douyin/_shared/tos-upload.js +4 -4
- package/clis/douyin/_shared/transcode.js +1 -1
- package/clis/douyin/_shared/vod-upload.js +4 -4
- package/clis/douyin/draft.js +18 -18
- package/clis/douyin/drafts.js +1 -1
- package/clis/douyin/publish-image.js +12 -12
- package/clis/douyin/publish.js +9 -9
- package/clis/douyin/search.js +3 -3
- package/clis/douyin/videos.js +1 -1
- package/clis/eastmoney/_secid.js +1 -1
- package/clis/eastmoney/announcement.js +1 -1
- package/clis/eastmoney/article.js +1 -1
- package/clis/eastmoney/convertible.js +1 -1
- package/clis/eastmoney/etf.js +1 -1
- package/clis/eastmoney/holders.js +1 -1
- package/clis/eastmoney/index-board.js +1 -1
- package/clis/eastmoney/kline.js +1 -1
- package/clis/eastmoney/kuaixun.js +1 -1
- package/clis/eastmoney/longhu.js +1 -1
- package/clis/eastmoney/money-flow.js +1 -1
- package/clis/eastmoney/northbound.js +1 -1
- package/clis/eastmoney/quote.js +1 -1
- package/clis/eastmoney/rank.js +1 -1
- package/clis/eastmoney/sectors.js +1 -1
- package/clis/endoflife/product.js +1 -1
- package/clis/endoflife/utils.js +1 -1
- package/clis/facebook/comment.js +8 -8
- package/clis/facebook/feed.js +4 -4
- package/clis/facebook/like.js +5 -5
- package/clis/facebook/notifications.js +3 -3
- package/clis/facebook/post.js +11 -11
- package/clis/facebook/search.js +3 -3
- package/clis/flathub/app.js +1 -1
- package/clis/flathub/search.js +1 -1
- package/clis/flathub/utils.js +1 -1
- package/clis/flomo/memos.js +1 -1
- package/clis/gemini/deep-research-result.js +4 -4
- package/clis/gemini/deep-research.js +1 -1
- package/clis/gemini/detail.js +1 -1
- package/clis/gemini/history.js +1 -1
- package/clis/gemini/image.js +2 -2
- package/clis/gemini/status.js +1 -1
- package/clis/gemini/utils.js +43 -43
- package/clis/geogebra/hexagon.js +1 -1
- package/clis/geogebra/info.js +3 -3
- package/clis/geogebra/triangle.js +1 -1
- package/clis/geogebra/utils.js +11 -11
- package/clis/ghost/login.js +1 -1
- package/clis/ghost/shared.js +2 -2
- package/clis/gitee/auth.js +2 -2
- package/clis/github-trending/repos.js +1 -1
- package/clis/google/news.js +1 -1
- package/clis/google/search.js +2 -2
- package/clis/google/suggest.js +1 -1
- package/clis/google/trends.js +1 -1
- package/clis/google/utils.js +1 -1
- package/clis/goproxy/module.js +1 -1
- package/clis/goproxy/utils.js +1 -1
- package/clis/goproxy/versions.js +1 -1
- package/clis/gov-policy/recent.js +2 -2
- package/clis/gov-policy/search.js +2 -2
- package/clis/grok/ask.js +1 -1
- package/clis/grok/detail.js +1 -1
- package/clis/grok/image.js +8 -8
- package/clis/grok/pin.js +1 -1
- package/clis/grok/send.js +1 -1
- package/clis/grok/status.js +1 -1
- package/clis/grok/utils.js +21 -21
- package/clis/guazi/browse.js +1 -1
- package/clis/guazi/car.js +1 -1
- package/clis/guazi/utils.js +1 -1
- package/clis/hackernews/auth.js +2 -2
- package/clis/hackernews/comment.js +8 -8
- package/clis/hackernews/read.js +7 -7
- package/clis/hackernews/submit.js +7 -7
- package/clis/hashnode/auth.js +3 -3
- package/clis/hashnode/publish.js +14 -14
- package/clis/hf/auth.js +2 -2
- package/clis/hf/models.js +1 -1
- package/clis/hf/paper.js +1 -1
- package/clis/hf/spaces.js +1 -1
- package/clis/hf/top.js +1 -1
- package/clis/homebrew/cask.js +1 -1
- package/clis/homebrew/formula.js +1 -1
- package/clis/homebrew/popular.js +1 -1
- package/clis/homebrew/utils.js +1 -1
- package/clis/huodongxing/events.js +1 -1
- package/clis/hupu/detail.js +4 -4
- package/clis/hupu/hot.js +3 -3
- package/clis/hupu/reply.js +1 -1
- package/clis/hupu/search.js +1 -1
- package/clis/hupu/unlike.js +1 -1
- package/clis/hupu/utils.js +10 -10
- package/clis/imdb/person.js +2 -2
- package/clis/imdb/reviews.js +3 -3
- package/clis/imdb/search.js +2 -2
- package/clis/imdb/title.js +1 -1
- package/clis/imdb/top.js +1 -1
- package/clis/imdb/trending.js +1 -1
- package/clis/imdb/utils.js +13 -13
- package/clis/imooc/article.js +6 -6
- package/clis/imooc/login.js +1 -1
- package/clis/imooc/whoami.js +1 -1
- package/clis/indeed/job.js +2 -2
- package/clis/indeed/search.js +2 -2
- package/clis/indeed/utils.js +1 -1
- package/clis/infoq/article.js +2 -2
- package/clis/infoq/login.js +1 -1
- package/clis/infoq/whoami.js +1 -1
- package/clis/instagram/_shared/private-publish.js +4 -4
- package/clis/instagram/_shared/protocol-capture.js +9 -9
- package/clis/instagram/detail.js +3 -3
- package/clis/instagram/post.js +25 -25
- package/clis/instagram/reel.js +18 -18
- package/clis/instagram/story.js +4 -4
- package/clis/instagram/user.js +2 -2
- package/clis/jd/item.js +65 -65
- package/clis/jianshu/article.js +1 -1
- package/clis/jianshu/login.js +1 -1
- package/clis/jianshu/notebooks.js +1 -1
- package/clis/jianshu/whoami.js +1 -1
- package/clis/jianyu/search.js +6 -6
- package/clis/jianyu/shared/procurement-contract.js +1 -1
- package/clis/jike/api.js +6 -6
- package/clis/jike/auth.js +3 -3
- package/clis/jike/comment.js +1 -1
- package/clis/jike/create.js +6 -6
- package/clis/jike/feed.js +3 -3
- package/clis/jike/like.js +1 -1
- package/clis/jike/notifications.js +3 -3
- package/clis/jike/repost.js +13 -13
- package/clis/jike/search.js +3 -3
- package/clis/jimeng/auth.js +2 -2
- package/clis/jimeng/generate.js +10 -10
- package/clis/jira/shared.js +1 -1
- package/clis/juejin/article.js +4 -4
- package/clis/juejin/categories.js +1 -1
- package/clis/juejin/hot.js +1 -1
- package/clis/juejin/login.js +1 -1
- package/clis/juejin/recommend.js +1 -1
- package/clis/juejin/stats.js +3 -3
- package/clis/juejin/tags.js +1 -1
- package/clis/juejin/utils.js +1 -1
- package/clis/juejin/whoami.js +1 -1
- package/clis/ke/utils.js +4 -4
- package/clis/kimi/_utils.js +7 -7
- package/clis/kimi/audit-extras.js +14 -14
- package/clis/kimi/auth.js +3 -3
- package/clis/kimi/chat.js +15 -15
- package/clis/kimi/storage.js +5 -5
- package/clis/kimi/ui.js +13 -13
- package/clis/kimi/usage.js +3 -3
- package/clis/kuaishou/auth.js +1 -1
- package/clis/kuaishou/publish.js +6 -6
- package/clis/lesswrong/_helpers.js +5 -5
- package/clis/lesswrong/comments.js +5 -5
- package/clis/lichess/top.js +1 -1
- package/clis/lichess/user.js +1 -1
- package/clis/lichess/utils.js +1 -1
- package/clis/linkedin/comment.js +1 -1
- package/clis/linkedin/connect.js +11 -11
- package/clis/linkedin/create.js +5 -5
- package/clis/linkedin/follow.js +1 -1
- package/clis/linkedin/inbox.js +1 -1
- package/clis/linkedin/job-detail.js +3 -3
- package/clis/linkedin/like.js +1 -1
- package/clis/linkedin/notifications.js +1 -1
- package/clis/linkedin/people-search.js +1 -1
- package/clis/linkedin/post-comments.js +1 -1
- package/clis/linkedin/post-detail.js +1 -1
- package/clis/linkedin/profile-analytics.js +1 -1
- package/clis/linkedin/profile-api.js +13 -13
- package/clis/linkedin/profile-experience.js +1 -1
- package/clis/linkedin/profile-projects.js +1 -1
- package/clis/linkedin/profile-read.js +3 -3
- package/clis/linkedin/reply.js +1 -1
- package/clis/linkedin/repost.js +1 -1
- package/clis/linkedin/safe-send.js +8 -8
- package/clis/linkedin/salesnav-inbox.js +5 -5
- package/clis/linkedin/salesnav-message.js +3 -3
- package/clis/linkedin/salesnav-search.js +4 -4
- package/clis/linkedin/salesnav-thread.js +1 -1
- package/clis/linkedin/search-api.js +3 -3
- package/clis/linkedin/search.js +8 -8
- package/clis/linkedin/social-api.js +31 -31
- package/clis/linkedin/timeline.js +3 -3
- package/clis/linkedin-learning/search.js +2 -2
- package/clis/linkedin-learning/trending.js +2 -2
- package/clis/linux-do/feed.js +4 -4
- package/clis/linux-do/topic-content.js +8 -8
- package/clis/lobsters/domain.js +1 -1
- package/clis/lobsters/read.js +7 -7
- package/clis/maimai/auth.js +2 -2
- package/clis/maimai/search-talents.js +4 -4
- package/clis/manus/_utils.js +1 -1
- package/clis/mastodon/login.js +1 -1
- package/clis/mastodon/post.js +1 -1
- package/clis/mastodon/shared.js +12 -12
- package/clis/mastodon/whoami.js +1 -1
- package/clis/maven/artifact.js +1 -1
- package/clis/maven/search.js +1 -1
- package/clis/maven/utils.js +1 -1
- package/clis/mdn/search.js +1 -1
- package/clis/medium/article.js +5 -5
- package/clis/medium/login.js +1 -1
- package/clis/medium/stats.js +3 -3
- package/clis/medium/tag.js +1 -1
- package/clis/medium/whoami.js +1 -1
- package/clis/mubu/notes.js +1 -1
- package/clis/mubu/utils.js +15 -15
- package/clis/note/auth.js +2 -2
- package/clis/note/note-utils.js +2 -2
- package/clis/note/publish.js +8 -8
- package/clis/notebooklm/add-source.js +8 -8
- package/clis/notebooklm/create.js +1 -1
- package/clis/notebooklm/generate-slides.js +1 -1
- package/clis/notebooklm/notes-get.js +1 -1
- package/clis/notebooklm/rpc.js +8 -8
- package/clis/notebooklm/source-fulltext.js +1 -1
- package/clis/notebooklm/utils.js +10 -10
- package/clis/nowcoder/auth.js +2 -2
- package/clis/nowcoder/comment.js +1 -1
- package/clis/nowcoder/comments.js +1 -1
- package/clis/nowcoder/dm-list.js +1 -1
- package/clis/nowcoder/dm-read.js +1 -1
- package/clis/nowcoder/dm-send.js +1 -1
- package/clis/nowcoder/drafts.js +1 -1
- package/clis/nowcoder/inbox.js +1 -1
- package/clis/nowcoder/like.js +1 -1
- package/clis/nowcoder/my.js +1 -1
- package/clis/nowcoder/post.js +1 -1
- package/clis/nowcoder/utils.js +13 -13
- package/clis/npm/downloads.js +1 -1
- package/clis/npm/package.js +1 -1
- package/clis/npm/search.js +1 -1
- package/clis/npm/utils.js +1 -1
- package/clis/nuget/package.js +1 -1
- package/clis/nuget/search.js +1 -1
- package/clis/nuget/utils.js +1 -1
- package/clis/nvd/cve.js +1 -1
- package/clis/oeis/search.js +1 -1
- package/clis/oeis/sequence.js +1 -1
- package/clis/oeis/utils.js +1 -1
- package/clis/ones/common.js +6 -6
- package/clis/ones/enrich-tasks.js +1 -1
- package/clis/ones/my-tasks.js +1 -1
- package/clis/ones/resolve-labels.js +1 -1
- package/clis/ones/task-helpers.js +1 -1
- package/clis/ones/task.js +1 -1
- package/clis/ones/worklog.js +7 -7
- package/clis/openalex/search.js +1 -1
- package/clis/openalex/utils.js +1 -1
- package/clis/openalex/work.js +1 -1
- package/clis/openfda/drug-label.js +1 -1
- package/clis/openfda/food-recall.js +1 -1
- package/clis/openfda/utils.js +1 -1
- package/clis/openreview/author.js +1 -1
- package/clis/openreview/paper.js +1 -1
- package/clis/openreview/reviews.js +3 -3
- package/clis/openreview/search.js +1 -1
- package/clis/openreview/utils.js +1 -1
- package/clis/openreview/venue.js +1 -1
- package/clis/oschina/article.js +1 -1
- package/clis/oschina/catalogs.js +1 -1
- package/clis/oschina/login.js +1 -1
- package/clis/oschina/stats.js +6 -6
- package/clis/oschina/whoami.js +1 -1
- package/clis/osv/query.js +1 -1
- package/clis/osv/utils.js +1 -1
- package/clis/osv/vulnerability.js +1 -1
- package/clis/packagist/package.js +1 -1
- package/clis/packagist/search.js +1 -1
- package/clis/packagist/utils.js +1 -1
- package/clis/pinterest/api.js +1 -1
- package/clis/pinterest/auth.js +1 -1
- package/clis/pinterest/boards.js +1 -1
- package/clis/pinterest/client.js +6 -6
- package/clis/pinterest/publish.js +5 -5
- package/clis/pixiv/auth.js +2 -2
- package/clis/pixiv/download.js +1 -1
- package/clis/pixiv/illusts.js +1 -1
- package/clis/pixiv/search.js +1 -1
- package/clis/pixiv/utils.js +3 -3
- package/clis/powerchina/auth.js +2 -2
- package/clis/powerchina/search.js +1 -1
- package/clis/producthunt/browse.js +2 -2
- package/clis/producthunt/hot.js +2 -2
- package/clis/producthunt/posts.js +1 -1
- package/clis/producthunt/today.js +1 -1
- package/clis/producthunt/utils.js +1 -1
- package/clis/pypi/downloads.js +1 -1
- package/clis/pypi/package.js +1 -1
- package/clis/pypi/utils.js +1 -1
- package/clis/qiita/auth.js +1 -1
- package/clis/qiita/gql.js +6 -6
- package/clis/qiita/publish.js +4 -4
- package/clis/qiita/stats.js +4 -4
- package/clis/qoder/_utils.js +16 -16
- package/clis/qoder/composer.js +1 -1
- package/clis/qoder/quest.js +1 -1
- package/clis/qoder/ui.js +14 -14
- package/clis/quark/auth.js +2 -2
- package/clis/quark/utils.js +2 -2
- package/clis/quora/answer-comments.js +3 -3
- package/clis/quora/create-answer.js +4 -4
- package/clis/quora/create-question.js +3 -3
- package/clis/quora/shared.js +17 -17
- package/clis/quora/whoami.js +1 -1
- package/clis/qwen/ask.js +1 -1
- package/clis/qwen/auth.js +3 -3
- package/clis/qwen/detail.js +1 -1
- package/clis/qwen/image.js +5 -5
- package/clis/qwen/status.js +1 -1
- package/clis/qwen/utils.js +16 -16
- package/clis/reddit/home.js +3 -3
- package/clis/reddit/read.js +10 -10
- package/clis/reddit/reply.js +4 -4
- package/clis/reddit/submit.js +11 -11
- package/clis/reddit/subreddit-info.js +3 -3
- package/clis/reddit/subscribed.js +4 -4
- package/clis/reddit/whoami.js +2 -2
- package/clis/rednote/comments.js +1 -1
- package/clis/rednote/download.js +1 -1
- package/clis/rednote/feed.js +1 -1
- package/clis/rednote/note.js +1 -1
- package/clis/rednote/notifications.js +2 -2
- package/clis/rednote/search.js +2 -2
- package/clis/rest-countries/country.js +1 -1
- package/clis/rest-countries/region.js +1 -1
- package/clis/rest-countries/utils.js +1 -1
- package/clis/reuters/article-detail.js +1 -1
- package/clis/reuters/auth.js +3 -3
- package/clis/reuters/search.js +1 -1
- package/clis/reuters/utils.js +4 -4
- package/clis/rfc/rfc.js +1 -1
- package/clis/rfc/utils.js +1 -1
- package/clis/rubygems/gem.js +1 -1
- package/clis/rubygems/search.js +1 -1
- package/clis/rubygems/utils.js +1 -1
- package/clis/segmentfault/article.js +3 -3
- package/clis/segmentfault/channels.js +1 -1
- package/clis/segmentfault/login.js +1 -1
- package/clis/segmentfault/stats.js +4 -4
- package/clis/segmentfault/tags.js +1 -1
- package/clis/segmentfault/whoami.js +1 -1
- package/clis/semanticscholar/citations.js +1 -1
- package/clis/semanticscholar/paper.js +1 -1
- package/clis/semanticscholar/recommendations.js +1 -1
- package/clis/semanticscholar/search.js +1 -1
- package/clis/semanticscholar/utils.js +1 -1
- package/clis/sinafinance/news.js +1 -1
- package/clis/sinafinance/stock-rank.js +1 -1
- package/clis/sinafinance/stock.js +1 -1
- package/clis/slock/attachment-download.js +1 -1
- package/clis/slock/attachment-upload.js +7 -7
- package/clis/slock/attachment-url.js +1 -1
- package/clis/slock/auth-verify.js +1 -1
- package/clis/slock/bookmark-add.js +1 -1
- package/clis/slock/bookmark-remove.js +1 -1
- package/clis/slock/channel-action.js +1 -1
- package/clis/slock/channel-create.js +1 -1
- package/clis/slock/channel-files.js +1 -1
- package/clis/slock/channel-list.js +1 -1
- package/clis/slock/channel-mark.js +1 -1
- package/clis/slock/channel-members.js +1 -1
- package/clis/slock/channel-unarchive.js +1 -1
- package/clis/slock/dm-list.js +1 -1
- package/clis/slock/errors.js +1 -1
- package/clis/slock/in-page.js +28 -28
- package/clis/slock/inbox-done.js +5 -5
- package/clis/slock/inbox.js +1 -1
- package/clis/slock/message-read.js +22 -22
- package/clis/slock/message-search.js +10 -10
- package/clis/slock/message-send.js +25 -25
- package/clis/slock/reaction-add.js +1 -1
- package/clis/slock/reaction-remove.js +1 -1
- package/clis/slock/resolve.js +1 -1
- package/clis/slock/server-list.js +2 -2
- package/clis/slock/task-claim.js +4 -4
- package/clis/slock/task-convert.js +13 -13
- package/clis/slock/task-create.js +1 -1
- package/clis/slock/task-delete.js +5 -5
- package/clis/slock/task-get.js +5 -5
- package/clis/slock/task-list-server.js +4 -4
- package/clis/slock/task-list.js +5 -5
- package/clis/slock/task-status.js +3 -3
- package/clis/slock/task-unclaim.js +3 -3
- package/clis/slock/thread-follow.js +1 -1
- package/clis/slock/thread-state.js +1 -1
- package/clis/slock/unread-summary.js +5 -5
- package/clis/slock/whoami.js +1 -1
- package/clis/smzdm/search.js +3 -3
- package/clis/sohu/article.js +1 -1
- package/clis/sohu/attributes.js +1 -1
- package/clis/sohu/categories.js +1 -1
- package/clis/sohu/channels.js +1 -1
- package/clis/sohu/columns.js +1 -1
- package/clis/sohu/login.js +1 -1
- package/clis/sohu/stats.js +3 -3
- package/clis/sohu/topics.js +1 -1
- package/clis/sohu/whoami.js +1 -1
- package/clis/spotify/spotify.js +1 -1
- package/clis/stackoverflow/read.js +6 -6
- package/clis/stackoverflow/related.js +1 -1
- package/clis/stackoverflow/tag.js +1 -1
- package/clis/stackoverflow/user.js +1 -1
- package/clis/stackoverflow/utils.js +1 -1
- package/clis/steam/app.js +1 -1
- package/clis/steam/search.js +1 -1
- package/clis/steam/utils.js +1 -1
- package/clis/substack/auth.js +2 -2
- package/clis/substack/post-utils.js +2 -2
- package/clis/substack/publish.js +5 -5
- package/clis/suno/auth.js +2 -2
- package/clis/suno/download.js +5 -5
- package/clis/suno/generate.js +3 -3
- package/clis/suno/list.js +1 -1
- package/clis/suno/status.js +1 -1
- package/clis/suno/utils.js +29 -29
- package/clis/telegram/send.js +7 -7
- package/clis/telegram/shared.js +2 -2
- package/clis/telegram/whoami.js +1 -1
- package/clis/test-utils.js +1 -1
- package/clis/threads/post.js +23 -23
- package/clis/threads/shared.js +3 -3
- package/clis/threads/whoami.js +1 -1
- package/clis/tieba/hot.js +3 -3
- package/clis/tieba/posts.js +1 -1
- package/clis/tieba/read.js +2 -2
- package/clis/tieba/search.js +3 -3
- package/clis/tieba/utils.js +1 -1
- package/clis/tiktok/comment.js +2 -2
- package/clis/tiktok/creator-videos.js +3 -3
- package/clis/tiktok/explore.js +3 -3
- package/clis/tiktok/follow.js +8 -8
- package/clis/tiktok/following.js +4 -4
- package/clis/tiktok/friends.js +7 -7
- package/clis/tiktok/live.js +3 -3
- package/clis/tiktok/notifications.js +6 -6
- package/clis/tiktok/publish.js +16 -16
- package/clis/tiktok/unfollow.js +4 -4
- package/clis/tiktok/user.js +2 -2
- package/clis/tiktok/utils.js +1 -1
- package/clis/toutiao/article.js +1 -1
- package/clis/toutiao/articles.js +2 -2
- package/clis/toutiao/auth.js +2 -2
- package/clis/toutiao/hot.js +1 -1
- package/clis/toutiao/recommend.js +1 -1
- package/clis/toutiao/utils.js +2 -2
- package/clis/trae-solo/_actions.js +4 -4
- package/clis/trae-solo/_fs.js +5 -5
- package/clis/trae-solo/_state.js +2 -2
- package/clis/trae-solo/automation.js +4 -4
- package/clis/trae-solo/mode.js +4 -4
- package/clis/trae-solo/model.js +4 -4
- package/clis/trae-solo/renderer-storage.js +4 -4
- package/clis/trae-solo/settings.js +1 -1
- package/clis/trae-solo/skill-fs.js +1 -1
- package/clis/trae-solo/skill.js +12 -12
- package/clis/trae-solo/state-fs.js +2 -2
- package/clis/trae-solo/task-fs.js +5 -5
- package/clis/trae-solo/workspaces-fs.js +1 -1
- package/clis/tumblr/auth.js +2 -2
- package/clis/tumblr/publish.js +3 -3
- package/clis/tvmaze/search.js +1 -1
- package/clis/tvmaze/show.js +1 -1
- package/clis/tvmaze/utils.js +1 -1
- package/clis/twitter/accept.js +7 -7
- package/clis/twitter/article.js +7 -7
- package/clis/twitter/bookmark-folder.js +3 -3
- package/clis/twitter/bookmark-folders.js +3 -3
- package/clis/twitter/bookmarks.js +4 -4
- package/clis/twitter/delete.js +5 -5
- package/clis/twitter/device-follow.js +3 -3
- package/clis/twitter/dm-list.js +1 -1
- package/clis/twitter/dm-read.js +1 -1
- package/clis/twitter/dm-send.js +5 -5
- package/clis/twitter/dm-shared.js +3 -3
- package/clis/twitter/download.js +6 -6
- package/clis/twitter/followers.js +5 -5
- package/clis/twitter/following.js +2 -2
- package/clis/twitter/like.js +3 -3
- package/clis/twitter/likes.js +8 -8
- package/clis/twitter/list-add-core.js +9 -9
- package/clis/twitter/list-create.js +5 -5
- package/clis/twitter/list-remove-core.js +9 -9
- package/clis/twitter/list-tweets.js +7 -7
- package/clis/twitter/lists.js +6 -6
- package/clis/twitter/notifications.js +2 -2
- package/clis/twitter/post.js +24 -24
- package/clis/twitter/profile.js +7 -7
- package/clis/twitter/quote.js +7 -7
- package/clis/twitter/reply-dm.js +7 -7
- package/clis/twitter/reply.js +12 -12
- package/clis/twitter/retweet.js +3 -3
- package/clis/twitter/scheduled-delete.js +3 -3
- package/clis/twitter/scheduled-list.js +2 -2
- package/clis/twitter/scheduled-utils.js +3 -3
- package/clis/twitter/search.js +5 -5
- package/clis/twitter/shared.js +6 -6
- package/clis/twitter/thread.js +4 -4
- package/clis/twitter/timeline.js +3 -3
- package/clis/twitter/trending.js +2 -2
- package/clis/twitter/tweets.js +11 -11
- package/clis/twitter/unlike.js +3 -3
- package/clis/twitter/unretweet.js +3 -3
- package/clis/twitter/utils.js +6 -6
- package/clis/upwork/detail.js +2 -2
- package/clis/upwork/feed.js +2 -2
- package/clis/upwork/search.js +2 -2
- package/clis/upwork/utils.js +1 -1
- package/clis/v2ex/auth.js +2 -2
- package/clis/v2ex/daily.js +3 -3
- package/clis/v2ex/me.js +2 -2
- package/clis/v2ex/notifications.js +2 -2
- package/clis/vk/post.js +1 -1
- package/clis/vk/shared.js +2 -2
- package/clis/vk/whoami.js +1 -1
- package/clis/web/read.js +8 -8
- package/clis/wechat-channels/auth.js +2 -2
- package/clis/wechat-channels/publish.js +30 -30
- package/clis/weibo/article.js +1 -1
- package/clis/weibo/auth.js +3 -3
- package/clis/weibo/comments.js +1 -1
- package/clis/weibo/delete.js +2 -2
- package/clis/weibo/feed.js +3 -3
- package/clis/weibo/hot.js +1 -1
- package/clis/weibo/publish.js +10 -10
- package/clis/weibo/search.js +2 -2
- package/clis/weibo/user-posts.js +3 -3
- package/clis/weibo/user.js +2 -2
- package/clis/weibo/utils.js +3 -3
- package/clis/weixin/article.js +1 -1
- package/clis/weixin/create-draft.js +26 -26
- package/clis/weixin/download.js +2 -2
- package/clis/weixin/login.js +1 -1
- package/clis/weixin/search.js +2 -2
- package/clis/weixin/stats.js +3 -3
- package/clis/weixin/whoami.js +1 -1
- package/clis/weread/ai-outline.js +2 -2
- package/clis/weread/book-search.js +2 -2
- package/clis/weread/book.js +2 -2
- package/clis/weread/notebooks.js +1 -1
- package/clis/weread/search.js +1 -1
- package/clis/weread/shelf.js +1 -1
- package/clis/weread/utils.js +6 -6
- package/clis/weread-official/book.js +1 -1
- package/clis/weread-official/discover.js +1 -1
- package/clis/weread-official/list-apis.js +1 -1
- package/clis/weread-official/notes.js +1 -1
- package/clis/weread-official/readdata.js +1 -1
- package/clis/weread-official/review.js +1 -1
- package/clis/weread-official/search.js +1 -1
- package/clis/weread-official/shelf.js +1 -1
- package/clis/weread-official/utils.js +1 -1
- package/clis/wikidata/entity.js +1 -1
- package/clis/wikidata/search.js +1 -1
- package/clis/wikidata/utils.js +1 -1
- package/clis/wikipedia/page.js +1 -1
- package/clis/wikipedia/trending.js +1 -1
- package/clis/wikipedia/utils.js +1 -1
- package/clis/wordpress/login.js +1 -1
- package/clis/wordpress/publish.js +1 -1
- package/clis/wordpress/shared.js +3 -3
- package/clis/wordpress/whoami.js +1 -1
- package/clis/woshipm/article.js +1 -1
- package/clis/woshipm/login.js +1 -1
- package/clis/woshipm/stats.js +4 -4
- package/clis/woshipm/whoami.js +1 -1
- package/clis/wttr/current.js +1 -1
- package/clis/wttr/forecast.js +1 -1
- package/clis/wttr/utils.js +1 -1
- package/clis/xianyu/collect.js +1 -1
- package/clis/xianyu/inbox.js +1 -1
- package/clis/xianyu/item-stats.js +2 -2
- package/clis/xianyu/location.js +1 -1
- package/clis/xianyu/manage.js +1 -1
- package/clis/xianyu/messages.js +1 -1
- package/clis/xianyu/mtop.js +5 -5
- package/clis/xianyu/order.js +1 -1
- package/clis/xianyu/promote-stats.js +2 -2
- package/clis/xianyu/publish.js +17 -17
- package/clis/xianyu/rate.js +1 -1
- package/clis/xianyu/reply.js +1 -1
- package/clis/xianyu/search.js +8 -8
- package/clis/xianyu/seller-data.js +1 -1
- package/clis/xianyu/seller-list.js +1 -1
- package/clis/xianyu/user.js +1 -1
- package/clis/xiaoe/catalog.js +2 -2
- package/clis/xiaoe/content.js +2 -2
- package/clis/xiaoe/courses.js +2 -2
- package/clis/xiaohongshu/ask.js +6 -6
- package/clis/xiaohongshu/comments.js +6 -6
- package/clis/xiaohongshu/creator-note-detail.js +7 -7
- package/clis/xiaohongshu/creator-notes-summary.js +1 -1
- package/clis/xiaohongshu/creator-notes.js +13 -13
- package/clis/xiaohongshu/creator-profile.js +2 -2
- package/clis/xiaohongshu/creator-stats.js +2 -2
- package/clis/xiaohongshu/delete-note.js +7 -7
- package/clis/xiaohongshu/download.js +4 -4
- package/clis/xiaohongshu/feed.js +2 -2
- package/clis/xiaohongshu/follow.js +3 -3
- package/clis/xiaohongshu/human.js +3 -3
- package/clis/xiaohongshu/note-helpers.js +1 -1
- package/clis/xiaohongshu/note.js +2 -2
- package/clis/xiaohongshu/notifications.js +1 -1
- package/clis/xiaohongshu/publish-video.js +8 -8
- package/clis/xiaohongshu/publish.js +59 -59
- package/clis/xiaohongshu/search.js +8 -8
- package/clis/xiaohongshu/unfollow.js +4 -4
- package/clis/xiaohongshu/user-helpers.js +1 -1
- package/clis/xiaohongshu/user.js +2 -2
- package/clis/xiaoyuzhou/auth.js +3 -3
- package/clis/xiaoyuzhou/download.js +1 -1
- package/clis/xiaoyuzhou/utils.js +1 -1
- package/clis/xueqiu/article.js +4 -4
- package/clis/xueqiu/comments.js +4 -4
- package/clis/xueqiu/danjuan-utils.js +4 -4
- package/clis/xueqiu/earnings-date.js +1 -1
- package/clis/xueqiu/events.js +3 -3
- package/clis/xueqiu/hashtags.js +3 -3
- package/clis/xueqiu/stocks.js +3 -3
- package/clis/xueqiu/users.js +3 -3
- package/clis/xueqiu/utils.js +3 -3
- package/clis/yahoo-finance/quote.js +1 -1
- package/clis/yollomi/background.js +1 -1
- package/clis/yollomi/edit.js +1 -1
- package/clis/yollomi/face-swap.js +1 -1
- package/clis/yollomi/generate.js +1 -1
- package/clis/yollomi/object-remover.js +1 -1
- package/clis/yollomi/remove-bg.js +1 -1
- package/clis/yollomi/restore.js +1 -1
- package/clis/yollomi/try-on.js +1 -1
- package/clis/yollomi/upload.js +4 -4
- package/clis/yollomi/upscale.js +1 -1
- package/clis/yollomi/utils.js +4 -4
- package/clis/yollomi/video.js +1 -1
- package/clis/youtube/channel.js +4 -4
- package/clis/youtube/feed.js +2 -2
- package/clis/youtube/like.js +5 -5
- package/clis/youtube/playlist.js +7 -7
- package/clis/youtube/publish.js +11 -11
- package/clis/youtube/search.js +3 -3
- package/clis/youtube/subscribe.js +7 -7
- package/clis/youtube/subscriptions.js +1 -1
- package/clis/youtube/transcript-group.js +2 -2
- package/clis/youtube/transcript.js +13 -13
- package/clis/youtube/unlike.js +5 -5
- package/clis/youtube/unsubscribe.js +7 -7
- package/clis/youtube/utils.js +3 -3
- package/clis/youtube/video.js +4 -4
- package/clis/youtube/watch-later.js +2 -2
- package/clis/yuanbao/ask.js +18 -18
- package/clis/yuanbao/detail.js +1 -1
- package/clis/yuanbao/read.js +1 -1
- package/clis/yuanbao/shared.js +9 -9
- package/clis/yuanbao/status.js +1 -1
- package/clis/yuque/article.js +1 -1
- package/clis/yuque/whoami.js +1 -1
- package/clis/zhihu/answer-comments.js +2 -2
- package/clis/zhihu/answer-detail.js +3 -3
- package/clis/zhihu/answer.js +1 -1
- package/clis/zhihu/article-transform.js +1 -1
- package/clis/zhihu/article.js +1 -1
- package/clis/zhihu/auth.js +2 -2
- package/clis/zhihu/collection.js +3 -3
- package/clis/zhihu/collections.js +3 -3
- package/clis/zhihu/download.js +2 -2
- package/clis/zhihu/image-profile.js +6 -6
- package/clis/zhihu/paginate.js +3 -3
- package/clis/zhihu/pin.js +4 -4
- package/clis/zhihu/question.js +3 -3
- package/clis/zhihu/recommend.js +3 -3
- package/clis/zhihu/search.js +3 -3
- package/clis/zhihu/stats.js +3 -3
- package/clis/zhihu/user-arg.js +1 -1
- package/clis/zhihu/write-shared.js +7 -7
- package/clis/zlibrary/utils.js +6 -6
- package/clis/zsxq/auth.js +3 -3
- package/clis/zsxq/search.js +1 -1
- package/clis/zsxq/topic.js +1 -1
- package/clis/zsxq/utils.js +5 -5
- package/dist/src/adapter-source.js +1 -1
- package/dist/src/browser/analyze.js +1 -1
- package/dist/src/browser/article-extract.js +2 -2
- package/dist/src/browser/ax-snapshot.js +2 -2
- package/dist/src/browser/base-page.js +25 -25
- package/dist/src/browser/bridge.js +1 -1
- package/dist/src/browser/cdp.js +1 -1
- package/dist/src/browser/daemon-client.js +1 -1
- package/dist/src/browser/daemon-lifecycle.js +7 -7
- package/dist/src/browser/dom-helpers.js +35 -35
- package/dist/src/browser/dom-snapshot.js +19 -19
- package/dist/src/browser/errors.js +3 -3
- package/dist/src/browser/extract.js +5 -5
- package/dist/src/browser/find.js +13 -13
- package/dist/src/browser/fingerprint.js +2 -2
- package/dist/src/browser/html-tree.js +6 -6
- package/dist/src/browser/managed-chrome.js +1 -1
- package/dist/src/browser/network-cache.js +1 -1
- package/dist/src/browser/network-key.js +1 -1
- package/dist/src/browser/page.js +7 -7
- package/dist/src/browser/profile.js +2 -2
- package/dist/src/browser/proxy-test.js +8 -8
- package/dist/src/browser/shape-filter.js +1 -1
- package/dist/src/browser/shape.js +1 -1
- package/dist/src/browser/stealth.js +3 -3
- package/dist/src/browser/tabs.js +2 -2
- package/dist/src/browser/target-errors.js +1 -1
- package/dist/src/browser/target-resolver.js +23 -23
- package/dist/src/browser/trace.js +2 -2
- package/dist/src/browser/utils.js +1 -1
- package/dist/src/browser/verify-fixture.js +2 -2
- package/dist/src/browser-session-lock.js +1 -1
- package/dist/src/build-manifest.js +11 -11
- package/dist/src/capabilityRouting.js +1 -1
- package/dist/src/cli-argv-preprocess.js +1 -1
- package/dist/src/cli.js +32 -32
- package/dist/src/commanderAdapter.js +3 -3
- package/dist/src/commands/auth.js +3 -3
- package/dist/src/commands/daemon.js +1 -1
- package/dist/src/completion-fast.js +1 -1
- package/dist/src/completion.js +1 -1
- package/dist/src/constants.js +1 -1
- package/dist/src/convention-audit.js +2 -2
- package/dist/src/daemon-utils.js +1 -1
- package/dist/src/daemon.js +1 -1
- package/dist/src/discovery.js +2 -2
- package/dist/src/doctor.js +9 -9
- package/dist/src/download/article-download.js +15 -15
- package/dist/src/download/index.js +4 -4
- package/dist/src/download/media-download.js +1 -1
- package/dist/src/download/progress.js +3 -3
- package/dist/src/electron-apps.js +1 -1
- package/dist/src/errors.js +2 -2
- package/dist/src/execution.js +2 -2
- package/dist/src/external.js +1 -1
- package/dist/src/help.js +8 -8
- package/dist/src/hooks.js +1 -1
- package/dist/src/interceptor.js +21 -21
- package/dist/src/launcher.js +7 -7
- package/dist/src/logger.js +8 -8
- package/dist/src/main.js +7 -7
- package/dist/src/observation/artifact.js +5 -5
- package/dist/src/observation/retention.js +1 -1
- package/dist/src/output.js +2 -2
- package/dist/src/package-paths.js +1 -1
- package/dist/src/pipeline/executor.js +1 -1
- package/dist/src/pipeline/registry.js +1 -1
- package/dist/src/pipeline/steps/browser.js +1 -1
- package/dist/src/pipeline/steps/download.js +1 -1
- package/dist/src/pipeline/steps/fetch.js +6 -6
- package/dist/src/pipeline/steps/intercept.js +1 -1
- package/dist/src/pipeline/steps/tap.js +17 -17
- package/dist/src/pipeline/steps/transform.js +1 -1
- package/dist/src/pipeline/template.js +1 -1
- package/dist/src/plugin-manifest.js +1 -1
- package/dist/src/plugin-scaffold.js +19 -19
- package/dist/src/plugin.js +12 -12
- package/dist/src/rate-limit.js +1 -1
- package/dist/src/registry.js +1 -1
- package/dist/src/runtime-detect.js +1 -1
- package/dist/src/runtime.js +1 -1
- package/dist/src/scripts/framework.js +1 -1
- package/dist/src/scripts/interact.js +1 -1
- package/dist/src/scripts/store.js +1 -1
- package/dist/src/serialization.js +2 -2
- package/dist/src/session-lease.js +1 -1
- package/dist/src/snapshotFormatter.js +2 -2
- package/dist/src/tui.js +12 -12
- package/dist/src/user-runtime.js +1 -1
- package/dist/src/utils.d.ts +12 -0
- package/dist/src/utils.js +4 -4
- package/dist/src/validate.js +2 -2
- package/dist/src/verify.js +2 -2
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
package/clis/jianshu/article.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CliError as
|
|
1
|
+
import{CliError as h,CommandExecutionError as I}from"@jackwener/opencli/errors";import{cli as N,Strategy as S}from"@jackwener/opencli/registry";import{publishArticle as _}from"../_shared/article/publish.js";export const jianshuProfile={home:"https://www.jianshu.com",outputFormat:"markdown",checkAuth:async(e)=>{try{const a=await fetch("https://www.jianshu.com/settings/basic.json",{method:"GET",credentials:"include",headers:{accept:"application/json"}});if(!a.ok)return{isAuthenticated:!1};const t=await a.text();let n=null;try{n=JSON.parse(t)}catch(i){return{isAuthenticated:!1}}const o=n&&n.data;if(!o||!o.nickname)return{isAuthenticated:!1};const r=/\/upload_avatars\/(\d+)\//.exec(o.avatar||"");return{isAuthenticated:!0,userId:r?r[1]:"",username:o.nickname,avatar:o.avatar||""}}catch(a){return{isAuthenticated:!1,error:String(a&&a.message||a)}}},image:{skip:["jianshu.io"],uploadFn:async(e,a)=>{const t=await fetch(e,{method:"GET"});if(!t.ok)throw Error("下载图片失败: "+t.status);const n=await t.blob(),r={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp"}[n.type]||"png",i=Date.now()+"-"+Math.random().toString(16).slice(2,8)+"."+r,u=await fetch("https://www.jianshu.com/upload_images/token.json?filename="+encodeURIComponent(i),{credentials:"include",headers:{accept:"application/json"}}).then((w)=>w.json());if(!u||!u.token||!u.key)throw Error("获取简书图片上传凭证失败");const l=new FormData;l.append("token",u.token);l.append("key",u.key);l.append("x:protocol","https");l.append("file",n,i);const p=await fetch("https://upload.qiniup.com/",{method:"POST",body:l}),d=await p.text();let c=null;try{c=JSON.parse(d)}catch(w){}if(!p.ok||!c||!c.url)throw Error("七牛上传失败: "+p.status+" "+d.slice(0,120));return{url:c.url}}},publish:async(e,a)=>{const t=e.params||{},n={accept:"application/json","content-type":"application/json"},o=String(t.notebook||"").trim();if(!o)return{ok:!1,stage:"validate",message:"发布简书文章必须指定文集:--notebook <文集名>(用 `jianshu notebooks` 查看可选文集)"};let r=[];try{r=await(await fetch("https://www.jianshu.com/author/notebooks",{credentials:"include",headers:{accept:"application/json"}})).json()}catch(s){return{ok:!1,stage:"notebook",message:"获取简书文集列表失败:"+String(s&&s.message||s)}}if(!Array.isArray(r)||!r.length)return{ok:!1,stage:"notebook",message:"简书账号下没有文集,请先在简书创作中心创建一个文集"};let i=r.find((s)=>s&&s.name===o);if(!i&&/^\d+$/.test(o))i=r.find((s)=>s&&String(s.id)===o);if(!i)return{ok:!1,stage:"notebook",message:"未找到文集「"+o+"」,可选:"+r.map((s)=>s.name).join(" / ")};const u=i.id,l=await fetch("https://www.jianshu.com/author/notes",{method:"POST",credentials:"include",headers:n,body:JSON.stringify({at_bottom:!1,notebook_id:u,title:e.title})}),p=await l.text();let d=null;try{d=JSON.parse(p)}catch(s){}if(!l.ok||!d||!d.id)return{ok:!1,stage:"create",status:l.status,message:p.slice(0,300)};const c=d.id,w=d.slug||"",f="https://www.jianshu.com/writer#/notebooks/"+u+"/notes/"+c;if(d.note_type!==2)return{ok:!1,stage:"create",message:"简书账号默认编辑器不是 Markdown(note_type="+d.note_type+")。请到 https://www.jianshu.com/settings/basic 将默认编辑器改为 Markdown 后重试。"};const k=await fetch("https://www.jianshu.com/author/notes/"+c,{method:"PUT",credentials:"include",headers:n,body:JSON.stringify({id:c,autosave_control:1,title:e.title,content:e.content})}),x=await k.text();if(!k.ok)return{ok:!1,stage:"content",status:k.status,message:x.slice(0,300),id:String(c),url:f};if(e.draftOnly)return{ok:!0,draft:!0,id:String(c),url:f};const g=await fetch("https://www.jianshu.com/author/notes/"+c+"/publicize",{method:"POST",credentials:"include",headers:n,body:JSON.stringify({})}),y=await g.text();let m=null;try{m=JSON.parse(y)}catch(s){}const b=m&&Array.isArray(m.error)&&m.error.length?m.error[0]:null;if(b)return{ok:!1,stage:"publish",status:g.status,message:(b.message||"简书拒绝了本次发布")+(b.code!=null?"(code "+b.code+")":""),id:String(c),url:f};if(!g.ok)return{ok:!1,stage:"publish",status:g.status,message:y.slice(0,300),id:String(c),url:f};const j="https://www.jianshu.com/p/"+w;try{const s=await fetch(j,{credentials:"include"});if(!s.ok)return{ok:!1,stage:"verify",status:s.status,message:"发布请求已受理但文章页不可访问,请到写作页确认状态:"+f,id:String(c),url:f}}catch(s){}return{ok:!0,draft:!1,id:String(c),url:j}}};import{readFile as P,stat as T}from"node:fs/promises";function A(e){if(!e.execute)throw new h("INVALID_INPUT","此命令需要 --execute 参数才能执行写操作。注意:本报错仅表示缺少 --execute,并未校验其余参数,不能当 dry-run 预览用")}async function D(e){const a=typeof e.text==="string"?e.text:void 0,t=typeof e.file==="string"?e.file:void 0;if(a&&t)throw new h("INVALID_INPUT","不能同时指定正文参数和 --file,请二选一");let n=a??"";if(t){let o;try{o=await T(t)}catch{throw new h("INVALID_INPUT","文件不存在: "+t)}if(!o.isFile())throw new h("INVALID_INPUT","必须是可读的文本文件: "+t);let r;try{r=await P(t)}catch{throw new h("INVALID_INPUT","无法读取文件: "+t)}try{n=new TextDecoder("utf-8",{fatal:!0}).decode(r)}catch{throw new h("INVALID_INPUT","文件必须是 UTF-8 编码: "+t)}}if(!n.trim())throw new h("INVALID_INPUT","正文不能为空");return n}function O(e,a,t,n,o={}){return[{status:"success",outcome:n,message:e,target_type:a,target:t,...o}]}N({site:"jianshu",name:"article",access:"write",description:"发布简书文章。默认正式发布;加 --draft 仅存草稿。必须指定文集 --notebook(用 `jianshu notebooks` 查看)。正文为 Markdown;图片自动转存至简书图床(七牛)。",domain:"jianshu.com",strategy:S.COOKIE,browser:!0,args:[{name:"title",positional:!0,required:!0,help:"文章标题"},{name:"text",positional:!0,help:"文章正文(Markdown)"},{name:"file",help:"正文文件路径(UTF-8 编码,Markdown)"},{name:"notebook",required:!0,help:"【必填】文集名(精确匹配;也接受文集数字 ID)。可用 `jianshu notebooks` 查看全部文集。"},{name:"draft",type:"boolean",help:"仅保存草稿,不发布"},{name:"execute",type:"boolean",help:"确认执行写操作。不加此参数则拒绝写入。"}],columns:["status","outcome","message","target_type","target","created_target","created_url"],func:async(e,a)=>{if(!e)throw new I("简书文章发布需要浏览器会话");A(a);const t=String(a.title??"").trim();if(!t)throw new h("INVALID_INPUT","文章标题不能为空");const n=await D(a),o=Boolean(a.draft),r={notebook:typeof a.notebook==="string"?a.notebook.trim():""},i=await _(e,{title:t,body:n,format:"markdown",draftOnly:o,profile:jianshuProfile,publishParams:r}),u=i.images.uploaded.length|0,l=i.images.failed.length|0;let p=i.draft?"草稿已保存至简书(可在写作页手动发布)":"文章已正式发布至简书";if(u||l)p+=";图片:"+u+" 张已转存"+(l?","+l+" 张失败":"");return O(p,"article","",i.draft?"draft":"publish",{created_target:"article:"+i.id,created_url:i.url})}});
|
package/clis/jianshu/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerArticleLogin as
|
|
1
|
+
import{registerArticleLogin as o}from"../_shared/article/login.js";import{jianshuProfile as i}from"./article.js";o({site:"jianshu",domain:"jianshu.com",profile:{home:i.home,checkAuth:i.checkAuth},loginUrl:"https://www.jianshu.com/sign_in",loginDescription:"打开简书登录页并等待浏览器完成登录(供桌面客户端引导登录)。"});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as e,Strategy as n}from"@jackwener/opencli/registry";import{CommandExecutionError as a}from"@jackwener/opencli/errors";import{gotoWritePage as o}from"../_shared/article/publish.js";e({site:"jianshu",name:"notebooks",access:"read",description:"列出简书账号下的全部文集(id 与名称),供 `jianshu article --notebook` 取值。",domain:"jianshu.com",strategy:n.COOKIE,browser:!0,columns:["id","name"],func:async(t)=>{if(!t)throw new a("简书文集查询需要浏览器会话");await o(t,"https://www.jianshu.com");const r=await t.evaluate("(async () => {const r = await fetch('https://www.jianshu.com/author/notebooks', { credentials: 'include', headers: { accept: 'application/json' },});if (!r.ok) return { __err: 'HTTP ' + r.status };const j = await r.json();if (!Array.isArray(j)) return { __err: 'unexpected payload' };return j.map(n => ({ id: String(n.id), name: n.name || '' }));})()");if(r&&r.__err)throw new a("获取简书文集失败("+r.__err+"),请确认已登录简书");return Array.isArray(r)?r:[]}});
|
package/clis/jianshu/whoami.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as t,Strategy as o}from"@jackwener/opencli/registry";import{checkLogin as s,cookieQuickCheck as c}from"../_shared/article/auth.js";import{jianshuProfile as r}from"./article.js";const u={home:r.home,checkAuth:r.checkAuth};t({site:"jianshu",name:"whoami",access:"read",description:"检测简书当前登录状态,返回用户 ID 和昵称。",domain:"jianshu.com",strategy:o.COOKIE,browser:!0,columns:["logged_in","user_id","username"],authStatus:{quickCheck:c("https://www.jianshu.com",["remember_user_token"])},func:async(i)=>{const e=await s(i,u);return[{logged_in:e.isAuthenticated,user_id:e.userId||"",username:e.username||""}]}});
|
package/clis/jianyu/search.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
`)){const
|
|
1
|
+
import{cli as B,Strategy as J}from"@jackwener/opencli/registry";import{AuthRequiredError as q}from"@jackwener/opencli/errors";import{buildSearchCandidates as G,cleanText as a,dedupeCandidates as w,detectAuthPrompt as z,normalizeDate as y,searchRowsFromEntries as Y}from"./shared/china-bid-search.js";import{toProcurementSearchRecords as E}from"./shared/procurement-contract.js";const _="jianyu",I="www.jianyu360.cn",R="https://www.jianyu360.cn/jylab/supsearch/index.html",Q=[R,"https://www.jianyu360.cn/list/stype/ZBGG.html","https://www.jianyu360.cn/"],X="https://r.jina.ai/http://duckduckgo.com/html/?q=",L=/(公告|招标|采购|中标|成交|项目|投标|结果|notice|tender|procurement|bidding)/i,K=/(请在下图依次点击|登录即可获得更多浏览权限|验证登录|请完成验证|图形验证码)/,Z=["/product/","/front/","/helpcenter/","/brand/","/page_workdesktop/","/list/","/list/stype/","/list/rmxm","/big/page/","/jylab/","/tags/","/sitemap","/datasmt/","/bank/","/hj/","/exhibition/","/swordfish/page_big_pc/search/"],tt=["/nologin/content/","/article/bdprivate/"],et=["fType","eType","vType","mType"];export function buildSearchUrl(r){const t=new URL(R);t.searchParams.set("keywords",r.trim());t.searchParams.set("selectType","title");t.searchParams.set("searchGroup","1");return t.toString()}function v(r){const t=buildSearchUrl(r),n=G(r,Q,["keywords","keyword","q","search","title"]),e=[],s=new Set;for(const o of[t,...n]){const i=a(o);if(!i||s.has(i))continue;s.add(i);e.push(i)}return e}function M(r){const t=a(r);if(!t)return!0;try{const n=new URL(t),e=a(n.pathname).toLowerCase().replace(/\/+$/,"/")||"/";if(e==="/")return!0;if(Z.some((s)=>e.startsWith(s)))return!0;return!1}catch{return!0}}function g(r){const t=a(r);if(!t)return{detail_status:"blocked",detail_reason:"missing_url"};try{const n=new URL(t),e=a(n.pathname).toLowerCase().replace(/\/+$/,"/")||"/";if(tt.some((s)=>e.includes(s)))return{detail_status:"blocked",detail_reason:"verification_or_paid_wall"};if(M(t))return{detail_status:"entry_only",detail_reason:"navigation_or_profile_entry"};return{detail_status:"ok",detail_reason:e.includes("/jybx/")?"jybx_detail":"detail_candidate"}}catch{return{detail_status:"blocked",detail_reason:"invalid_url"}}}function j(r){const t=a(r);if(!t)return"";try{const n=new URL(t),e=a(n.pathname),s=e.match(/\/jybx\/([^/?#]+)\.html$/i);if(s?.[1])return a(s[1]);const o=e.split("/").filter(Boolean),i=a(o[o.length-1]||"");return a(i.replace(/\.html?$/i,""))}catch{return""}}function U(r,t,n=new Date){const e=y(r);if(!e)return!1;const s=Date.parse(`${e}T00:00:00Z`);if(!Number.isFinite(s))return!1;const o=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()),i=Math.floor((o-s)/86400000);return i>=0&&i<=t}function A(r){const t=[],n=new Set;for(const e of r){const s=a(e.source_id||""),o=a(e.notice_id||""),i=s&&o?`${s} ${o}`:`${a(e.title)} ${a(e.url)}`;if(!i||n.has(i))continue;n.add(i);t.push(e)}return t}function x(r,t){const n=a(r).split(/\s+/).filter(Boolean).map((e)=>e.toLowerCase());return t.map((e)=>({title:a(e.title),url:a(e.url),date:y(a(e.date)),contextText:a(e.contextText)})).filter((e)=>{if(!e.title||!e.url)return!1;if(g(e.url).detail_status!=="ok")return!1;const o=`${e.title} ${e.contextText}`.toLowerCase(),i=n.length===0||n.some((l)=>o.includes(l)),c=L.test(`${e.title} ${e.contextText}`),d=!!e.date;if(!i)return!1;if(!M(e.url))return!0;return d&&c})}async function nt(r){const t=a(await r.evaluate('document.body ? document.body.innerText : ""'));if(K.test(t))return!0;return z(r)}function N(r){const t=a(r);if(!t)return"";if(t.startsWith("http://")||t.startsWith("https://"))return t;if(t.startsWith("//"))return`https:${t}`;if(t.startsWith("/"))try{return new URL(t,R).toString()}catch{return""}return""}function C(r){const t=a(r);if(!t)return"";const n=t.match(/\/(20\d{2})(\d{2})(\d{2})(?:[_/]|$)/);if(!n)return"";return`${n[1]}-${n[2]}-${n[3]}`}function D(r,t=0){if(t>2||r==null)return[];if(typeof r==="string"||typeof r==="number"){const n=a(String(r));return n?[n]:[]}if(Array.isArray(r))return r.flatMap((n)=>D(n,t+1));if(typeof r==="object")return Object.values(r).flatMap((n)=>D(n,t+1));return[]}function T(r,t){for(const n of t){const e=r[n];if(typeof e==="string"||typeof e==="number"){const s=a(String(e));if(s)return s}}return""}function P(r){if(!r||typeof r!=="object")return null;const t=r,n=D(t);let e=N(T(t,["url","detailUrl","detailURL","link","href","articleUrl","newsUrl","contentUrl","jumpUrl","sourceUrl"]));if(!e){const c=n.find((d)=>/jianyu360\.cn|\/jybx\/|\/nologin\/content\//i.test(d))||"";e=N(c)}let s=a(T(t,["title","noticeTitle","bidTitle","projectName","name","articleTitle","newsTitle","tenderTitle","contentTitle"]));if(!s)s=n.find((c)=>c.length>=8&&L.test(c))||"";const o=y(T(t,["publishTime","publishDate","pubDate","createTime","time","releaseTime","date"]))||C(e),i=a([T(t,["content","summary","desc","description","buyer","winner","agency","industry"]),...n.slice(0,6)].filter(Boolean).join(" "));if(!s||!e)return null;return{title:s,url:e,date:o,contextText:i}}function O(r){const t=[];for(const n of r.split(`
|
|
2
|
+
`)){const e=n.trim();if(!e.startsWith("## ["))continue;const s=e.slice(3),o=s.lastIndexOf("](");if(o<=0||!s.endsWith(")"))continue;const i=a(s.slice(1,o)),c=a(s.slice(o+2,-1));if(!i||!c)continue;t.push({title:i,url:c})}return t}function W(r){const t=a(r);if(!t)return"";const n=t.startsWith("//")?`https:${t}`:t;try{const e=new URL(n);if(!e.hostname.toLowerCase().endsWith("duckduckgo.com"))return n;const o=e.searchParams.get("uddg");if(!o)return n;try{return decodeURIComponent(o)}catch{return o}}catch{return""}}function rt(r){const t=a(r);if(!t)return!1;try{return new URL(t).hostname.toLowerCase().endsWith("jianyu360.cn")}catch{return!1}}function st(r){const t=a(r).split(/\s+/).filter(Boolean),n=[a(r),...t],e=[],s=new Set;for(const o of n){const i=a(o);if(!i||s.has(i))continue;s.add(i);e.push(i)}return e}async function at(r,t){const n=[],e=new Set;for(const s of st(r)){if(n.length>=t)break;const o=`site:jianyu360.cn ${s}`,i=`${X}${encodeURIComponent(o)}`;let c="";try{const l=await fetch(i,{headers:{Accept:"text/plain, text/markdown, */*","User-Agent":"opencli-jianyu-search/1.0"}});if(!l.ok)continue;c=await l.text()}catch{continue}const d=O(c);for(const l of d){const m=W(l.url),h=N(m)||a(m);if(!rt(h))continue;const k=`${l.title} ${h}`;if(e.has(k))continue;e.add(k);n.push({title:a(l.title),url:h,date:C(h),contextText:a(`${l.title} ${s}`)});if(n.length>=t)break}}return n}async function H(r,t,n){try{await r.goto(buildSearchUrl(t));await r.wait(2);const e=await r.evaluate(`
|
|
3
3
|
(async () => {
|
|
4
4
|
const now = Math.floor(Date.now() / 1000);
|
|
5
5
|
const body = {
|
|
6
6
|
searchGroup: 1,
|
|
7
7
|
reqType: 'lastNews',
|
|
8
8
|
pageNum: 1,
|
|
9
|
-
pageSize: Math.max(20, Math.min(${Math.max(20,
|
|
10
|
-
keyWords: ${JSON.stringify(
|
|
9
|
+
pageSize: Math.max(20, Math.min(${Math.max(20,n)}, 50)),
|
|
10
|
+
keyWords: ${JSON.stringify(t)},
|
|
11
11
|
searchMode: 0,
|
|
12
12
|
bidField: '',
|
|
13
13
|
publishTime: \`\${now - 3600 * 24 * 365 * 3}-\${now}\`,
|
|
@@ -28,7 +28,7 @@ import{cli as d,Strategy as u}from"@jackwener/opencli/registry";import{AuthRequi
|
|
|
28
28
|
winnerTel: '',
|
|
29
29
|
};
|
|
30
30
|
const responses = [];
|
|
31
|
-
const types = ${JSON.stringify([...
|
|
31
|
+
const types = ${JSON.stringify([...et])};
|
|
32
32
|
for (const type of types) {
|
|
33
33
|
try {
|
|
34
34
|
const response = await fetch('/jyapi/jybx/core/' + type + '/searchList', {
|
|
@@ -70,4 +70,4 @@ import{cli as d,Strategy as u}from"@jackwener/opencli/registry";import{AuthRequi
|
|
|
70
70
|
const challenge = responses.some((item) => item && item.payload && item.payload.antiVerify === -1);
|
|
71
71
|
return { challenge, responses };
|
|
72
72
|
})()
|
|
73
|
-
`),
|
|
73
|
+
`),s=Array.isArray(e?.responses)?e.responses:[],o=F(s),i=Boolean(e?.challenge);return{rows:o,challenge:i}}catch{return{rows:[],challenge:!1}}}function F(r){const t=[],n=new Set;for(const e of r){if(!e||typeof e!=="object")continue;const o=e.payload;if(!o||typeof o!=="object")continue;const i=o.list;if(!Array.isArray(i))continue;for(const c of i){const d=P(c);if(!d)continue;const l=`${d.title} ${d.url}`;if(n.has(l))continue;n.add(l);t.push(d)}}return t}B({site:_,name:"search",access:"read",description:"搜索剑鱼标讯公告",domain:I,strategy:J.COOKIE,browser:!0,args:[{name:"query",required:!0,positional:!0,help:'Search keyword, e.g. "procurement"'},{name:"limit",type:"int",default:20,help:"Number of results (max 50)"},{name:"since_days",type:"int",help:"Only keep rows published within N days"}],columns:["rank","content_type","title","published_at","detail_status","project_code","budget_or_limit","url"],func:async(r,t)=>{const n=a(t.query),e=Math.max(1,Math.min(Number(t.limit)||20,50)),s=Number(t.since_days),o=Number.isFinite(s)&&s>0?Math.max(1,Math.min(s,3650)):null,i=await H(r,n,e),c=w(x(n,i.rows)),d=await Y(r,{query:n,candidateUrls:v(n),allowedHostFragments:["jianyu360.cn"],limit:e}),l=w(x(n,d)),m=w([...c,...l]);if(m.length===0){const u=await at(n,e),p=w(x(n,u));if(p.length>0){const S=E(p,{site:_,query:n,limit:e});return A(S.map((f)=>{const b=g(f.url),V=y(f.publish_time||f.date);return{...f,source_id:_,notice_id:j(f.url),published_at:V,detail_status:b.detail_status,detail_reason:b.detail_reason}})).filter((f)=>f.detail_status==="ok").filter((f)=>o==null||U(f.published_at,o)).slice(0,e).map((f,b)=>({...f,rank:b+1}))}if(i.challenge||await nt(r))throw new q(I,"[taxonomy=selector_drift] site=jianyu command=search blocked by human verification / access challenge")}const h=E(m,{site:_,query:n,limit:e});return A(h.map((u)=>{const p=g(u.url),S=y(u.publish_time||u.date);return{...u,source_id:_,notice_id:j(u.url),published_at:S,detail_status:p.detail_status,detail_reason:p.detail_reason}})).filter((u)=>u.detail_status==="ok").filter((u)=>o==null||U(u.published_at,o)).slice(0,e).map((u,p)=>({...u,rank:p+1}))}});export const __test__={buildSearchCandidates:v,buildSearchUrl,normalizeDate:y,dedupeCandidates:w,filterNavigationRows:x,parseSearchIndexMarkdown:O,unwrapDuckDuckGoUrl:W,extractDateFromJianyuUrl:C,normalizeApiRow:P,fetchJianyuApiRows:H,collectApiRowsFromResponses:F,classifyDetailStatus:g,extractNoticeId:j,isWithinSinceDays:U,dedupeByNoticeKey:A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const S=["招标","采购","公告","项目","中标","成交","流标","终止","询价","竞价","比选","投标","tender","procurement","bidding","bid","notice"],x=["中标","成交","结果","候选人","中选","定标","评标","award","winner"],E=["招标","采购","询价","比选","公告","竞争性","邀请","投标","tender","procurement","notice"],k=["新闻","资讯","动态","政策","简讯","news","article"],N=["首页","官网","网站地图","联系我们","帮助中心","english","login","注册","导航","法规","政策文件","服务平台","信用中国"],R=["/detail","/content","/jybx/","/notice","/article","/view","/project","/bid","detail=","id="],L=["/search","/list","/index","/home","/portal","/channel","page="]
|
|
1
|
+
const S=["招标","采购","公告","项目","中标","成交","流标","终止","询价","竞价","比选","投标","tender","procurement","bidding","bid","notice"],x=["中标","成交","结果","候选人","中选","定标","评标","award","winner"],E=["招标","采购","询价","比选","公告","竞争性","邀请","投标","tender","procurement","notice"],k=["新闻","资讯","动态","政策","简讯","news","article"],N=["首页","官网","网站地图","联系我们","帮助中心","english","login","注册","导航","法规","政策文件","服务平台","信用中国"],R=["/detail","/content","/jybx/","/notice","/article","/view","/project","/bid","detail=","id="],L=["/search","/list","/index","/home","/portal","/channel","page="],j=[/(?:招标人|采购人|业主|建设单位|项目单位)\s*[::]\s*([^\n,。;]{2,60})/i],C=[/(?:项目编号|招标编号|采购编号|项目编码|项目代码|编号)\s*[::]\s*([A-Za-z0-9\-_/]{4,60})/i],I=[/(?:预算(?:金额)?|控制价|最高限价|限价|采购金额|合同估算价)\s*[::]\s*([^\n,。;]{2,80})/i],b=[/(?:报名截止时间|投标截止时间|开标时间|响应文件递交截止时间|截止时间|开标日期)\s*[::]\s*([^\n,。;]{2,80})/i],A=/(20\d{2})[.\-/年](\d{1,2})[.\-/月](\d{1,2})/;export function cleanText(t){return typeof t==="string"?t.replace(/\s+/g," ").trim():""}export function normalizeDate(t){const n=cleanText(t).match(A);if(!n)return"";const o=n[1],r=n[2].padStart(2,"0"),c=n[3].padStart(2,"0");return`${o}-${r}-${c}`}function D(t){const e=[],n=new Set;for(const o of t){const r=cleanText(o);if(!r||n.has(r))continue;n.add(r);e.push(r)}return e}function u(t,e){return e.some((n)=>t.includes(n.toLowerCase()))}function d(t,e){for(const n of e){const o=t.match(n);if(o?.[1])return cleanText(o[1])}return""}function P(t){const e=cleanText(t);if(!e)return"";return e.slice(0,220)}function h(t,e){const n=cleanText(t);if(!n)return[];const o=e.split(/\s+/).map((s)=>s.toLowerCase().trim()).filter(Boolean),c=n.split(/[。!?;\n]/).map((s)=>cleanText(s)).filter(Boolean).map((s)=>{const i=s.toLowerCase(),a=o.length===0?0:o.reduce((l,f)=>i.includes(f)?l+2:l,0),p=u(i,S)?1:0;return{chunk:s,score:a+p}}).sort((s,i)=>i.score-s.score||i.chunk.length-s.chunk.length).slice(0,5).map((s)=>s.chunk);return D(c)}function T(t,e,n){const o=`${t} ${n} ${e}`.toLowerCase();if(u(o,x))return"result";if(u(o,E))return"notice";if(u(o,k))return"news";if(u(o,N))return"navigation";return"unknown"}function g(t){const e=cleanText(t).toLowerCase();if(!e)return!1;if(!R.some((r)=>e.includes(r)))return!1;return!L.some((r)=>e.includes(r))}function v(t){const e=[];if(!t.project_owner)e.push("missing_project_owner");if(!t.project_code)e.push("missing_project_code");if(!t.budget_or_limit)e.push("missing_budget");if(!t.deadline_or_open_time)e.push("missing_deadline");if(t.content_type==="navigation")e.push("navigation_risk");if(!t.is_detail_page)e.push("list_page_url");return e}function q(t,e){const n=e.split(/\s+/).map((r)=>r.toLowerCase().trim()).filter(Boolean);if(n.length===0)return!0;const o=t.toLowerCase();return n.some((r)=>o.includes(r))}function y(t,{sourceSite:e}){const n=cleanText(t.title),o=cleanText(t.url),r=cleanText(t.contextText),c=normalizeDate(cleanText(t.date||r)),s=c,i=T(n,o,r),a=d(r,j),p=d(r,C),l=d(r,I),f=d(r,b),m=P(r||n),_={title:n,url:o,date:c,publish_time:s,source_site:e,is_detail_page:g(o),content_type:i,project_owner:a,project_code:p,budget_or_limit:l,deadline_or_open_time:f,snippet:m,summary:m,quality_flags:[]};_.quality_flags=v(_);return _}function w(t,e){if(!t.title||!t.url)return"missing_identity";if(t.content_type==="navigation")return"navigation_only";const n=`${t.title} ${t.snippet} ${t.url}`.toLowerCase();if(!q(n,e))return"query_mismatch";return null}function z(t){const e=[],n=new Set;for(const o of t){const r=`${o.title} ${o.url}`;if(n.has(r))continue;n.add(r);e.push(o)}return e}export function formatTaxonomyError(t,{site:e,command:n,detail:o}){return`[taxonomy=${t}] site=${e} command=${n} ${cleanText(o)}`}export function taxonomyError(t,e){return Error(formatTaxonomyError(t,e))}export function toProcurementSearchRecords(t,{site:e,query:n,limit:o}){const r=z(t.map((s)=>y(s,{sourceSite:e}))),c=[];for(const s of r){if(w(s,n))continue;c.push(s)}if(r.length>0&&c.length===0)throw taxonomyError("extraction_drift",{site:e,command:"search",detail:`all rows rejected by quality gate (raw=${r.length})`});return c.slice(0,Math.max(1,o)).map((s,i)=>({rank:i+1,...s}))}export function toProcurementDetailRecord({title:t,url:e,contextText:n,publishTime:o},{site:r,query:c=""}){const s=y({title:t,url:e,date:o,contextText:n},{sourceSite:r}),i=cleanText(n).slice(0,6000),a=h(i,c);return{...s,detail_text:i,evidence_blocks:a}}export const __test__={classifyContentType:T,isDetailPage:g,splitEvidenceBlocks:h,qualityRejectReason:w};
|
package/clis/jike/api.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{CommandExecutionError as
|
|
1
|
+
import{CommandExecutionError as a,AuthRequiredError as n}from"@jackwener/opencli/errors";export const JIKE_API_ORIGIN="https://web.okjike.com";export async function gotoJikeApiContext(r){await r.goto(JIKE_API_ORIGIN);for(let o=0;o<20;o++){const e=await r.evaluate(`(() => {
|
|
2
2
|
var href = ''; try { href = location.href; } catch (e) {}
|
|
3
3
|
var token = null; try { token = localStorage.getItem('JK_ACCESS_TOKEN'); } catch (e) {}
|
|
4
4
|
return { href: href, hasToken: !!token };
|
|
5
|
-
})()`);if(
|
|
5
|
+
})()`);if(e&&/^https:\/\/web\.okjike\.com/.test(e.href)){if(e.hasToken)return;throw new n("web.okjike.com","即刻未登录(web.okjike.com 的 localStorage 里没有 JK_ACCESS_TOKEN)")}await r.wait(0.5)}throw new a("无法在浏览器中打开 web.okjike.com(页面未落到该站点)。请确认 PublishPort 托管浏览器已连接。")}export async function jikeApi(r,o,e=null){const i=`(async () => {
|
|
6
6
|
var token = null;
|
|
7
7
|
try { token = localStorage.getItem('JK_ACCESS_TOKEN'); } catch (e) {}
|
|
8
8
|
if (!token) return { authMissing: true };
|
|
9
9
|
var init = {
|
|
10
|
-
method: ${
|
|
10
|
+
method: ${e?"'POST'":"'GET'"},
|
|
11
11
|
headers: {
|
|
12
12
|
'x-jike-access-token': token,
|
|
13
13
|
'Content-Type': 'application/json',
|
|
14
14
|
},
|
|
15
15
|
credentials: 'omit',
|
|
16
16
|
};
|
|
17
|
-
${
|
|
17
|
+
${e?`init.body = ${JSON.stringify(JSON.stringify(e))};`:""}
|
|
18
18
|
var resp;
|
|
19
19
|
try {
|
|
20
|
-
resp = await fetch(${JSON.stringify("https://api.ruguoapp.com"+
|
|
20
|
+
resp = await fetch(${JSON.stringify("https://api.ruguoapp.com"+o)}, init);
|
|
21
21
|
} catch (e) {
|
|
22
22
|
// 请求根本没发出去(网络/CORS),此时平台侧一定没收到,重试是安全的
|
|
23
23
|
return { networkError: String((e && e.message) || e) };
|
|
@@ -27,4 +27,4 @@ import{CommandExecutionError as H,AuthRequiredError as L}from"@jackwener/opencli
|
|
|
27
27
|
var data = null;
|
|
28
28
|
try { data = JSON.parse(raw); } catch (e) {}
|
|
29
29
|
return { status: resp.status, ok: resp.ok, data: data, raw: raw.slice(0, 500) };
|
|
30
|
-
})()`,
|
|
30
|
+
})()`,t=await r.evaluate(i);if(t&&t.authMissing)throw new n("web.okjike.com","即刻未登录(读不到 JK_ACCESS_TOKEN)");if(t&&t.networkError)throw new a(`即刻 API 请求未能发出(${t.networkError})。请求没有到达平台,重试是安全的。`);if(!t)throw new a("即刻 API 调用没有返回结果");if(t.status===401)throw new n("web.okjike.com","即刻登录态已失效(API 返回 401),请重新登录");return t}
|
package/clis/jike/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as n,CommandExecutionError as o}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as s}from"../_shared/site-auth.js";const a=`(async () => {
|
|
2
2
|
try {
|
|
3
3
|
const token = localStorage.getItem('JK_ACCESS_TOKEN') || '';
|
|
4
4
|
if (!token) return { kind: 'auth', detail: 'Jike JK_ACCESS_TOKEN missing from localStorage (anonymous)' };
|
|
@@ -14,6 +14,6 @@ import{AuthRequiredError as L,CommandExecutionError as K}from"@jackwener/opencli
|
|
|
14
14
|
} catch (e) {
|
|
15
15
|
return { kind: 'exception', detail: String(e && e.message || e) };
|
|
16
16
|
}
|
|
17
|
-
})()`;async function
|
|
17
|
+
})()`;async function u(e){await e.goto("https://web.okjike.com/");await e.wait(2);let i="";for(let r=0;r<30;r++){i=await e.evaluate("() => location.href");if(i.includes("okjike.com"))break;await e.wait(0.5)}if(!i.includes("okjike.com")){await e.screenshot({path:"/tmp/jike_whoami_nav_debug.png"});throw new o(`Jike whoami: navigation never settled on okjike.com (landed on ${i}). Debug screenshot: /tmp/jike_whoami_nav_debug.png`)}let t=await e.evaluate(a);for(let r=0;r<30&&t?.kind==="auth";r++){await e.wait(0.5);t=await e.evaluate(a)}if(t?.kind==="auth")throw new n("web.okjike.com",t.detail);if(t?.kind==="http")throw new o(`HTTP ${t.httpStatus} from Jike users/profile`);if(t?.kind==="exception"){const r=await e.evaluate("() => location.href");if(/^data:/.test(r)||/\/login/.test(i))throw new n("web.okjike.com","Jike session anonymous (redirected to /login)");throw new o(`Jike whoami failed: ${t.detail}`)}if(!t?.ok)throw new o(`Unexpected Jike probe: ${JSON.stringify(t)}`);return{user_id:t.user_id,screen_name:t.screen_name,username:t.username}}s({site:"jike",domain:"web.okjike.com",loginUrl:"https://web.okjike.com/login",columns:["user_id","screen_name","username"],verify:u,quickCheckRequiresNavigation:!0,quickCheck:async(e)=>{await e.goto("https://web.okjike.com/robots.txt");return{logged_in:await e.evaluate(`(() => {
|
|
18
18
|
try { return !!localStorage.getItem('JK_ACCESS_TOKEN'); } catch { return false; }
|
|
19
|
-
})()`)===!0}},poll:async(
|
|
19
|
+
})()`)===!0}},poll:async(e)=>{const i=await e.evaluate(a);if(!i?.ok)throw new n("web.okjike.com","Waiting for Jike login");return{user_id:i.user_id,screen_name:i.screen_name,username:i.username}}});
|
package/clis/jike/comment.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CommandExecutionError as
|
|
1
|
+
import{CommandExecutionError as e}from"@jackwener/opencli/errors";import{cli as n,Strategy as m}from"@jackwener/opencli/registry";import{gotoJikeApiContext as c,jikeApi as d}from"./api.js";n({site:"jike",name:"comment",access:"write",description:"评论即刻帖子(走即刻内部 API,不依赖页面渲染)",domain:"web.okjike.com",strategy:m.COOKIE,browser:!0,args:[{name:"id",type:"string",required:!0,positional:!0,help:"帖子 ID"},{name:"text",fromFile:!0,type:"string",required:!0,positional:!0,help:"评论内容(含空格时请用引号整体传入)"}],columns:["status","message","comment_id"],func:async(a,r)=>{const o=String(r.id??"").trim(),s=String(r.text??"").trim();if(!o)throw new e("帖子 ID 不能为空");if(!s)throw new e("评论内容不能为空");await c(a);const t=await d(a,"/1.0/comments/add",{targetId:o,targetType:"ORIGINAL_POST",content:s,pictureKeys:[],syncToPersonalUpdates:!1,force:!1,currentPageName:14,sourcePageName:50});if(!t.ok){const i=t.data&&(t.data.error||t.data.message)||t.raw||`HTTP ${t.status}`;throw new e(`评论失败(HTTP ${t.status}):${i}`)}return[{status:"success",message:"评论成功",comment_id:String(t.data&&t.data.data&&t.data.data.id||t.data&&t.data.id||"")}]}});
|
package/clis/jike/create.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CommandExecutionError as
|
|
1
|
+
import{CommandExecutionError as o}from"@jackwener/opencli/errors";import{cli as i,Strategy as c}from"@jackwener/opencli/registry";i({site:"jike",name:"create",access:"write",description:"发布即刻动态",domain:"web.okjike.com",strategy:c.UI,browser:!0,args:[{name:"text",fromFile:!0,type:"string",required:!0,positional:!0,help:"动态正文内容"}],columns:["status","message"],func:async(e,s)=>{await e.goto("https://web.okjike.com");for(let t=0;t<30;t++){if(await e.evaluate(`(() => {
|
|
2
2
|
const form = document.querySelector('[class*="_postForm_"]');
|
|
3
3
|
const editor = form
|
|
4
4
|
? form.querySelector('[contenteditable="true"]')
|
|
@@ -7,9 +7,9 @@ import{CommandExecutionError as z}from"@jackwener/opencli/errors";import{cli as
|
|
|
7
7
|
? form.querySelector('textarea')
|
|
8
8
|
: document.querySelector('textarea');
|
|
9
9
|
return !!(editor || textarea);
|
|
10
|
-
})()`))break;await
|
|
10
|
+
})()`))break;await e.wait(0.5)}const a=await e.evaluate(`(async () => {
|
|
11
11
|
try {
|
|
12
|
-
const textToInsert = ${JSON.stringify(
|
|
12
|
+
const textToInsert = ${JSON.stringify(s.text)};
|
|
13
13
|
|
|
14
14
|
// 首页发帖框在 _postForm_ 容器内,查找其中的 contenteditable
|
|
15
15
|
const form = document.querySelector('[class*="_postForm_"]');
|
|
@@ -54,12 +54,12 @@ import{CommandExecutionError as z}from"@jackwener/opencli/errors";import{cli as
|
|
|
54
54
|
} catch (e) {
|
|
55
55
|
return { ok: false, message: e.toString() };
|
|
56
56
|
}
|
|
57
|
-
})()`);if(!
|
|
57
|
+
})()`);if(!a.ok)throw new o(`发布动态失败:${a.message}`);for(let t=0;t<30;t++){if(await e.evaluate(`(() => {
|
|
58
58
|
return Array.from(document.querySelectorAll('button')).some(btn => {
|
|
59
59
|
const text = btn.textContent?.trim() || '';
|
|
60
60
|
return (text === '发送' || text === '发布') && !btn.disabled;
|
|
61
61
|
});
|
|
62
|
-
})()`))break;await
|
|
62
|
+
})()`))break;await e.wait(0.5)}const r=await e.evaluate(`(async () => {
|
|
63
63
|
try {
|
|
64
64
|
await new Promise(r => setTimeout(r, 500));
|
|
65
65
|
|
|
@@ -80,4 +80,4 @@ import{CommandExecutionError as z}from"@jackwener/opencli/errors";import{cli as
|
|
|
80
80
|
} catch (e) {
|
|
81
81
|
return { ok: false, message: e.toString() };
|
|
82
82
|
}
|
|
83
|
-
})()`);if(!
|
|
83
|
+
})()`);if(!r.ok)throw new o(`发布动态失败:${r.message}`);await e.wait(3);return[{status:"success",message:r.message}]}});
|
package/clis/jike/feed.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
${
|
|
1
|
+
import{cli as r,Strategy as s}from"@jackwener/opencli/registry";import{AuthRequiredError as c,EmptyResultError as l}from"@jackwener/opencli/errors";import{getPostDataJs as d}from"./utils.js";r({site:"jike",name:"feed",access:"read",description:"即刻首页动态流",domain:"web.okjike.com",strategy:s.COOKIE,browser:!0,args:[{name:"limit",type:"int",default:20}],columns:["id","author","content","likes","comments","time","url"],func:async(e,i)=>{const o=i.limit||20;await e.goto("https://web.okjike.com");const n=async()=>{return await e.evaluate(`(() => {
|
|
2
|
+
${d}
|
|
3
3
|
|
|
4
4
|
const results = [];
|
|
5
5
|
const seen = new Set();
|
|
@@ -29,4 +29,4 @@ import{cli as F,Strategy as G}from"@jackwener/opencli/registry";import{AuthRequi
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
return results;
|
|
32
|
-
})()`)};let
|
|
32
|
+
})()`)};let t=await n();for(let a=0;a<30&&t.length===0;a++){await e.wait(0.5);t=await n()}if(t.length===0){const a=await e.evaluate("() => location.href");if(/\/login/.test(a)||/^data:/.test(a))throw new c("web.okjike.com","Jike feed requires login (redirected to /login)");throw new l("jike feed","No posts rendered on web.okjike.com within 15s. The page structure may have changed.")}if(t.length<o){await e.autoScroll({times:Math.ceil(o/10),delayMs:2000});t=await n()}return t.slice(0,o)}});
|
package/clis/jike/like.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CommandExecutionError as
|
|
1
|
+
import{CommandExecutionError as r}from"@jackwener/opencli/errors";import{cli as n,Strategy as m}from"@jackwener/opencli/registry";import{gotoJikeApiContext as u,jikeApi as c}from"./api.js";n({site:"jike",name:"like",access:"write",description:"点赞即刻帖子(走即刻内部 API,不依赖页面渲染)",domain:"web.okjike.com",strategy:m.COOKIE,browser:!0,args:[{name:"id",type:"string",required:!0,positional:!0,help:"帖子 ID"},{name:"undo",type:"boolean",help:"取消点赞(改调 unlike)"}],columns:["status","message"],func:async(o,i)=>{const s=String(i.id??"").trim();if(!s)throw new r("帖子 ID 不能为空");const e=Boolean(i.undo);await u(o);const t=await c(o,e?"/1.0/originalPosts/unlike":"/1.0/originalPosts/like",{id:s});if(!t.ok){const a=t.data&&(t.data.error||t.data.message)||t.raw||`HTTP ${t.status}`;throw new r(`${e?"取消点赞":"点赞"}失败(HTTP ${t.status}):${a}`)}return[{status:"success",message:e?"已取消点赞":"点赞成功"}]}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as o,Strategy as r}from"@jackwener/opencli/registry";function c(t){if(!t)return"通知";const e=t.toUpperCase();if(e.includes("LIKE"))return"赞了你";if(e.includes("COMMENT"))return"评论了你";if(e.includes("FOLLOW"))return"关注了你";if(e.includes("REPOST"))return"转发了你";if(e.includes("MENTION"))return"提到了你";if(e.includes("REPLY"))return"回复了你";return t}o({site:"jike",name:"notifications",access:"read",description:"即刻通知",domain:"web.okjike.com",strategy:r.COOKIE,browser:!0,args:[{name:"limit",type:"int",default:20}],columns:["type","user","content","time"],func:async(t,e)=>{const i=e.limit||20;await t.goto("https://web.okjike.com/notification");for(let s=0;s<30;s++){if(await t.evaluate(`(() => document.querySelectorAll('[class*="_item_"]').length > 0)()`))break;await t.wait(0.5)}const a=await t.evaluate(`(() => {
|
|
2
2
|
// 从 React fiber 树中提取通知数据,向上最多走 15 层
|
|
3
3
|
function getNotificationData(element) {
|
|
4
4
|
for (const key of Object.keys(element)) {
|
|
@@ -57,7 +57,7 @@ import{cli as D,Strategy as E}from"@jackwener/opencli/registry";function F(d){if
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
return results;
|
|
60
|
-
})()`);if(
|
|
60
|
+
})()`);if(a.length>0)return a.map((n)=>({type:c(n.actionType),user:n.fromUser,content:n.content.replace(/\n/g," ").slice(0,100),time:n.time})).slice(0,i);await t.autoScroll({times:Math.ceil(i/10),delayMs:2000});return(await t.evaluate(`(() => {
|
|
61
61
|
const results = [];
|
|
62
62
|
const items = document.querySelectorAll('[class*="_item_"]');
|
|
63
63
|
|
|
@@ -112,4 +112,4 @@ import{cli as D,Strategy as E}from"@jackwener/opencli/registry";function F(d){if
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
return results;
|
|
115
|
-
})()`)).slice(0,
|
|
115
|
+
})()`)).slice(0,i)}});
|
package/clis/jike/repost.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{CommandExecutionError as
|
|
1
|
+
import{CommandExecutionError as o}from"@jackwener/opencli/errors";import{cli as u,Strategy as d}from"@jackwener/opencli/registry";u({site:"jike",name:"repost",access:"write",description:"转发即刻帖子",domain:"web.okjike.com",strategy:d.UI,browser:!0,args:[{name:"id",type:"string",required:!0,positional:!0,help:"帖子 ID"},{name:"text",fromFile:!0,positional:!0,type:"string",required:!1,help:"转发附言(可选)"}],columns:["status","message"],func:async(t,n)=>{await t.goto(`https://web.okjike.com/originalPost/${n.id}`);for(let e=0;e<30;e++){if(await t.evaluate("(() => document.querySelectorAll('button').length > 0)()"))break;await t.wait(0.5)}const a=await t.evaluate(`(() => {
|
|
2
2
|
var root = document.getElementById('root');
|
|
3
3
|
return {
|
|
4
4
|
buttons: document.querySelectorAll('button').length,
|
|
5
5
|
rootChildren: root ? root.children.length : -1,
|
|
6
6
|
href: location.href,
|
|
7
7
|
};
|
|
8
|
-
})()`);if(
|
|
8
|
+
})()`);if(a&&a.buttons===0)throw new o("即刻 web 端未渲染出任何可交互元素,无法完成转发:"+`当前地址 ${a.href},#root 子节点 ${a.rootChildren} 个、button 0 个。`+`
|
|
9
9
|
web.okjike.com 已改版为 SPA,在本环境下不渲染组件树,转发这条链路尚未迁移到内部 API。`+`
|
|
10
|
-
这不是帖子状态或选择器的问题,重试无用;评论(jike comment)与点赞(jike like)已改走 API,不受影响。`);for(let
|
|
10
|
+
这不是帖子状态或选择器的问题,重试无用;评论(jike comment)与点赞(jike like)已改走 API,不受影响。`);for(let e=0;e<30;e++){if(await t.evaluate(`(() => {
|
|
11
11
|
const actions = document.querySelector('[class*="_actions_"]');
|
|
12
12
|
if (!actions) return false;
|
|
13
13
|
const children = Array.from(actions.children).filter(c => c.offsetHeight > 0);
|
|
14
14
|
return !!children[2];
|
|
15
|
-
})()`))break;await
|
|
15
|
+
})()`))break;await t.wait(0.5)}const i=await t.evaluate(`(async () => {
|
|
16
16
|
try {
|
|
17
17
|
const actions = document.querySelector('[class*="_actions_"]');
|
|
18
18
|
if (!actions) return { ok: false, message: '未找到操作栏' };
|
|
@@ -24,11 +24,11 @@ web.okjike.com 已改版为 SPA,在本环境下不渲染组件树,转发这
|
|
|
24
24
|
} catch (e) {
|
|
25
25
|
return { ok: false, message: e.toString() };
|
|
26
26
|
}
|
|
27
|
-
})()`);if(!
|
|
27
|
+
})()`);if(!i.ok)throw new o(`转发失败:${i.message}`);await t.wait(1);for(let e=0;e<30;e++){if(await t.evaluate(`(() => {
|
|
28
28
|
return Array.from(document.querySelectorAll('button')).some(
|
|
29
29
|
b => b.textContent?.trim() === '转发动态'
|
|
30
30
|
);
|
|
31
|
-
})()`))break;await
|
|
31
|
+
})()`))break;await t.wait(0.5)}const c=await t.evaluate(`(async () => {
|
|
32
32
|
try {
|
|
33
33
|
const btn = Array.from(document.querySelectorAll('button')).find(
|
|
34
34
|
b => b.textContent?.trim() === '转发动态'
|
|
@@ -39,11 +39,11 @@ web.okjike.com 已改版为 SPA,在本环境下不渲染组件树,转发这
|
|
|
39
39
|
} catch (e) {
|
|
40
40
|
return { ok: false, message: e.toString() };
|
|
41
41
|
}
|
|
42
|
-
})()`);if(!
|
|
42
|
+
})()`);if(!c.ok)throw new o(`转发失败:${c.message}`);await t.wait(2);if(n.text){for(let r=0;r<30;r++){if(await t.evaluate(`(() => {
|
|
43
43
|
return !!document.querySelector('[class*="Modal"] [contenteditable="true"], [class*="modal"] [contenteditable="true"]');
|
|
44
|
-
})()`))break;await
|
|
44
|
+
})()`))break;await t.wait(0.5)}const e=await t.evaluate(`(async () => {
|
|
45
45
|
try {
|
|
46
|
-
const textToInsert = ${JSON.stringify(
|
|
46
|
+
const textToInsert = ${JSON.stringify(n.text)};
|
|
47
47
|
const editor = document.querySelector('[class*="Modal"] [contenteditable="true"], [class*="modal"] [contenteditable="true"]');
|
|
48
48
|
if (!editor) return { ok: false, message: '未找到转发弹窗内的附言输入框' };
|
|
49
49
|
editor.focus();
|
|
@@ -55,7 +55,7 @@ web.okjike.com 已改版为 SPA,在本环境下不渲染组件树,转发这
|
|
|
55
55
|
await new Promise(r => setTimeout(r, 500));
|
|
56
56
|
return { ok: true };
|
|
57
57
|
} catch(e) { return { ok: false, message: '附言写入失败: ' + e.toString() }; }
|
|
58
|
-
})()`);if(!
|
|
58
|
+
})()`);if(!e.ok)throw new o(`转发失败:${e.message}`)}const l=`(() => {
|
|
59
59
|
return Array.from(document.querySelectorAll('button')).find(b => {
|
|
60
60
|
const text = b.textContent?.trim() || '';
|
|
61
61
|
if (text !== '转发动态' && text !== '发送' && text !== '发布') return false;
|
|
@@ -63,14 +63,14 @@ web.okjike.com 已改版为 SPA,在本环境下不渲染组件树,转发这
|
|
|
63
63
|
if (b.closest('[class*="Popover"]')) return false;
|
|
64
64
|
return !!(b.closest('[class*="Modal"], [class*="modal"], [class*="_submitButton_"]'));
|
|
65
65
|
});
|
|
66
|
-
})`;for(let
|
|
66
|
+
})`;for(let e=0;e<30;e++){if(await t.evaluate(`(() => !!${l}())()`))break;await t.wait(0.5)}const s=await t.evaluate(`(async () => {
|
|
67
67
|
try {
|
|
68
68
|
await new Promise(r => setTimeout(r, 500));
|
|
69
|
-
const btn = ${
|
|
69
|
+
const btn = ${l}();
|
|
70
70
|
if (!btn) return { ok: false, message: '未找到转发弹窗内的确认按钮' };
|
|
71
71
|
btn.click();
|
|
72
72
|
return { ok: true, message: '转发成功' };
|
|
73
73
|
} catch (e) {
|
|
74
74
|
return { ok: false, message: e.toString() };
|
|
75
75
|
}
|
|
76
|
-
})()`);if(!
|
|
76
|
+
})()`);if(!s.ok)throw new o(`转发失败:${s.message}`);await t.wait(3);return[{status:"success",message:s.message}]}});
|
package/clis/jike/search.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
${
|
|
1
|
+
import{cli as c,Strategy as d}from"@jackwener/opencli/registry";import{EmptyResultError as l}from"@jackwener/opencli/errors";import{getPostDataJs as m}from"./utils.js";c({site:"jike",name:"search",access:"read",description:"搜索即刻帖子",domain:"web.okjike.com",strategy:d.COOKIE,browser:!0,args:[{name:"query",type:"string",required:!0,positional:!0,help:"即刻搜索关键词"},{name:"limit",type:"int",default:20}],columns:["id","author","content","likes","comments","time","url"],func:async(e,n)=>{const s=n.query,a=n.limit||20,i=encodeURIComponent(s);await e.goto(`https://web.okjike.com/search?q=${i}`);const o=async()=>{return await e.evaluate(`(() => {
|
|
2
|
+
${m}
|
|
3
3
|
|
|
4
4
|
const results = [];
|
|
5
5
|
const seen = new Set();
|
|
@@ -26,4 +26,4 @@ import{cli as C,Strategy as F}from"@jackwener/opencli/registry";import{EmptyResu
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
return results;
|
|
29
|
-
})()`)};let
|
|
29
|
+
})()`)};let t=await o();for(let r=0;r<30&&t.length===0;r++){await e.wait(0.5);t=await o()}if(t.length===0)throw new l("jike search",`No results rendered for "${s}" within 15s. The keyword may have no matches or the page structure changed.`);if(t.length<a){await e.autoScroll({times:Math.ceil(a/10),delayMs:2000});t=await o()}return t.slice(0,a)}});
|
package/clis/jimeng/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as r,CommandExecutionError as n}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as a}from"../_shared/site-auth.js";const s=`(async () => {
|
|
2
2
|
try {
|
|
3
3
|
const r = await fetch('/passport/account/info/v2/?aid=513695', { credentials: 'include', headers: { Accept: 'application/json' } });
|
|
4
4
|
if (r.status === 401 || r.status === 403) return { kind: 'auth', detail: 'Jimeng passport HTTP ' + r.status };
|
|
@@ -10,4 +10,4 @@ import{AuthRequiredError as L,CommandExecutionError as F}from"@jackwener/opencli
|
|
|
10
10
|
} catch (e) {
|
|
11
11
|
return { kind: 'exception', detail: String(e && e.message || e) };
|
|
12
12
|
}
|
|
13
|
-
})()`,
|
|
13
|
+
})()`,o=new Set(["sessionid","sessionid_ss","sid_tt"]);async function u(i){return{logged_in:(await i.getCookies({url:"https://jimeng.jianying.com"})).some((t)=>t.value&&o.has(t.name))}}async function c(i){await i.goto("https://jimeng.jianying.com/ai-tool/generate?type=image&workspace=0");await i.wait(2);const e=await i.evaluate(s);if(e?.kind==="auth")throw new r("jimeng.jianying.com",e.detail);if(e?.kind==="http")throw new n(`HTTP ${e.httpStatus} from Jimeng passport`);if(e?.kind==="exception")throw new n(`Jimeng whoami failed: ${e.detail}`);if(!e?.ok)throw new n(`Unexpected Jimeng probe: ${JSON.stringify(e)}`);return{user_id:e.user_id,screen_name:e.screen_name}}a({site:"jimeng",domain:"jimeng.jianying.com",loginUrl:"https://jimeng.jianying.com/",columns:["user_id","screen_name"],verify:c,quickCheck:u,poll:async(i)=>{const e=await i.evaluate(s);if(!e?.ok)throw new r("jimeng.jianying.com","Waiting for Jimeng login");return{user_id:e.user_id,screen_name:e.screen_name}}});
|
package/clis/jimeng/generate.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
const prompt = ${JSON.stringify(
|
|
1
|
+
import{cli as u,Strategy as g}from"@jackwener/opencli/registry";import{CommandExecutionError as o}from"@jackwener/opencli/errors";const p="https://jimeng.jianying.com/ai-tool/generate?type=image&workspace=0",a="/mweb/v1/get_history?aid=513695&device_platform=web®ion=cn&da_version=3.3.11&web_version=7.5.0&aigc_features=app_lip_sync",m=JSON.stringify({cursor:"",count:5,need_page_item:!0,need_aigc_data:!0,aigc_mode_list:["workbench"]}),_=(t)=>`(async () => {
|
|
2
|
+
const prompt = ${JSON.stringify(t)};
|
|
3
3
|
let existing = [];
|
|
4
4
|
try {
|
|
5
|
-
const r = await fetch(${JSON.stringify(
|
|
5
|
+
const r = await fetch(${JSON.stringify(a)}, {
|
|
6
6
|
method: 'POST', credentials: 'include',
|
|
7
7
|
headers: { 'Content-Type': 'application/json' },
|
|
8
|
-
body: ${JSON.stringify(
|
|
8
|
+
body: ${JSON.stringify(m)},
|
|
9
9
|
});
|
|
10
10
|
const d = await r.json();
|
|
11
11
|
existing = (d && d.data && d.data.records_list || []).map((x) => x.submit_id).filter(Boolean);
|
|
@@ -27,12 +27,12 @@ import{cli as h,Strategy as G}from"@jackwener/opencli/registry";import{CommandEx
|
|
|
27
27
|
if (btn.disabled || btn.getAttribute('aria-disabled') === 'true') return { ok: false, error: 'button_disabled' };
|
|
28
28
|
btn.click();
|
|
29
29
|
return { ok: true, existing };
|
|
30
|
-
})()`,
|
|
31
|
-
const existing = ${JSON.stringify(
|
|
32
|
-
const r = await fetch(${JSON.stringify(
|
|
30
|
+
})()`,f=(t)=>`(async () => {
|
|
31
|
+
const existing = ${JSON.stringify(t)};
|
|
32
|
+
const r = await fetch(${JSON.stringify(a)}, {
|
|
33
33
|
method: 'POST', credentials: 'include',
|
|
34
34
|
headers: { 'Content-Type': 'application/json' },
|
|
35
|
-
body: ${JSON.stringify(
|
|
35
|
+
body: ${JSON.stringify(m)},
|
|
36
36
|
});
|
|
37
37
|
const d = await r.json();
|
|
38
38
|
const recs = (d && d.data && d.data.records_list) || [];
|
|
@@ -56,5 +56,5 @@ import{cli as h,Strategy as G}from"@jackwener/opencli/registry";import{CommandEx
|
|
|
56
56
|
}
|
|
57
57
|
if (!done.length && failMsg) return { state: 'failed', error: failMsg };
|
|
58
58
|
return { state: 'pending', got: done.length, total };
|
|
59
|
-
})()`;
|
|
60
|
-
`)}];if(
|
|
59
|
+
})()`;u({site:"jimeng",name:"generate",access:"write",description:"即梦AI 文生图 — 输入 prompt 生成图片",domain:"jimeng.jianying.com",strategy:g.COOKIE,browser:!0,navigateBefore:!1,siteSession:"persistent",args:[{name:"prompt",fromFile:!0,type:"string",required:!0,positional:!0,help:"图片描述 prompt"},{name:"wait",type:"int",default:60,help:"等待生成完成的最长秒数(每 3 秒轮询一次,超时会返回 pending 并提示用 history 回查)"}],columns:["status","prompt","model","image_count","image_urls"],func:async(t,r)=>{const n=String(r.prompt??"").trim();if(!n)throw new o("prompt is required");const s=Number(r.wait??60);await t.goto(p);await t.wait(3);const i=await t.evaluate(_(n));if(!i?.ok){const d={editor_not_found:"找不到 prompt 输入框(页面结构可能已变)",button_not_found:"找不到生成按钮(页面结构可能已变)",button_disabled:"生成按钮不可点击(可能未登录、额度用尽或 prompt 为空)"}[i?.error]||`提交失败:${i?.error||"unknown"}`;throw new o(d)}const c=Array.isArray(i.existing)?i.existing:[],l=Date.now()+s*1000;let e=null;while(Date.now()<l){await t.wait(3);e=await t.evaluate(f(c));if(e?.state==="success")return[{status:"success",prompt:n.slice(0,80),model:e.model||"",image_count:e.urls.length,image_urls:e.urls.join(`
|
|
60
|
+
`)}];if(e?.state==="failed")throw new o(`即梦生成失败:${e.error}`)}return[{status:"pending",prompt:n.slice(0,80),model:e&&e.model||"",image_count:e&&e.got||0,image_urls:`生成仍在进行(已 ${s}s);稍后用 \`ppcli jimeng history\` 回查结果`}]}});
|