publishport-opencli 1.0.20 → 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/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 +17 -17
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as c,Strategy as l}from"@jackwener/opencli/registry";import{CliError as m}from"@jackwener/opencli/errors";c({site:"eastmoney",name:"kuaixun",access:"read",description:"东方财富 7x24 财经快讯",domain:"np-listapi.eastmoney.com",strategy:l.PUBLIC,browser:!1,args:[{name:"column",type:"string",default:"102",help:"频道:102 (重要) / 101 (全部) / 104 / 105 / 106 / 107"},{name:"limit",type:"int",default:20,help:"返回数量 (max 100)"}],columns:["time","title","summary","stocks"],func:async(e)=>{const o=String(e.column??"102").trim(),r=Math.max(1,Math.min(Number(e.limit)||20,100)),t=new URL("https://np-listapi.eastmoney.com/comm/web/getFastNewsList");t.searchParams.set("client","web");t.searchParams.set("biz","web_724");t.searchParams.set("fastColumn",o);t.searchParams.set("sortEnd","");t.searchParams.set("pageSize",String(r));t.searchParams.set("req_trace","1");const a=await fetch(t,{headers:{"User-Agent":"Mozilla/5.0",Accept:"application/json"}});if(!a.ok)throw new m("HTTP_ERROR",`kuaixun failed: HTTP ${a.status}`);const i=await a.json(),n=Array.isArray(i?.data?.fastNewsList)?i.data.fastNewsList:[];if(n.length===0)throw new m("NO_DATA","eastmoney returned no kuaixun data");return n.slice(0,r).map((s)=>({time:s.showTime,title:s.title,summary:(s.summary||"").replace(/\s+/g," ").slice(0,400),stocks:Array.isArray(s.stockList)?s.stockList.join(", "):""}))}});
|
package/clis/eastmoney/longhu.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as c,Strategy as l}from"@jackwener/opencli/registry";import{CliError as A}from"@jackwener/opencli/errors";function T(){const t=new Date(Date.now()+28800000);t.setUTCDate(t.getUTCDate()-30);return t.toISOString().slice(0,10)}c({site:"eastmoney",name:"longhu",access:"read",description:"龙虎榜明细(A股交易所公开披露榜单)",domain:"datacenter-web.eastmoney.com",strategy:l.PUBLIC,browser:!1,args:[{name:"date",type:"string",default:"",help:"开始交易日 YYYY-MM-DD (默认昨天)"},{name:"limit",type:"int",default:20,help:"返回数量 (max 100)"}],columns:["tradeDate","code","name","closePrice","changeRate","boardAmt","buyAmt","sellAmt","netAmt","turnover","dealRatio","market","reason"],func:async(t)=>{const s=String(t.date||"").trim()||T(),n=Math.max(1,Math.min(Number(t.limit)||20,100)),a=new URL("https://datacenter-web.eastmoney.com/api/data/v1/get");a.searchParams.set("sortColumns","TRADE_DATE,SECURITY_CODE");a.searchParams.set("sortTypes","-1,1");a.searchParams.set("pageSize",String(n));a.searchParams.set("pageNumber","1");a.searchParams.set("reportName","RPT_DAILYBILLBOARD_DETAILS");a.searchParams.set("columns","ALL");a.searchParams.set("source","WEB");a.searchParams.set("client","WEB");a.searchParams.set("filter",`(TRADE_DATE>='${s}')`);const r=await fetch(a,{headers:{"User-Agent":"Mozilla/5.0"}});if(!r.ok)throw new A("HTTP_ERROR",`longhu failed: HTTP ${r.status}`);const o=await r.json(),m=Array.isArray(o?.result?.data)?o.result.data:[];if(m.length===0)throw new A("NO_DATA",`No longhu data since ${s}`);return m.slice(0,n).map((e)=>({tradeDate:String(e.TRADE_DATE||"").slice(0,10),code:e.SECURITY_CODE,name:e.SECURITY_NAME_ABBR,closePrice:e.CLOSE_PRICE,changeRate:e.CHANGE_RATE,boardAmt:e.BILLBOARD_DEAL_AMT,buyAmt:e.BILLBOARD_BUY_AMT,sellAmt:e.BILLBOARD_SELL_AMT,netAmt:e.BILLBOARD_NET_AMT,turnover:e.ACCUM_AMOUNT,dealRatio:e.DEAL_AMOUNT_RATIO,market:e.TRADE_MARKET,reason:e.EXPLANATION}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as u,Strategy as h}from"@jackwener/opencli/registry";import{CliError as r}from"@jackwener/opencli/errors";const g="m:0+t:6,m:0+t:80,m:1+t:2,m:1+t:23,m:0+t:81+s:2048",o={today:{fid:"f62",fields:{net:"f62",netPct:"f184",super:"f66",big:"f72",medium:"f78",small:"f84"}},"5d":{fid:"f164",fields:{net:"f164",netPct:"f165",super:"f166",big:"f169",medium:"f172",small:"f175"}},"10d":{fid:"f174",fields:{net:"f174",netPct:"f175",super:"f176",big:"f179",medium:"f182",small:"f185"}}};u({site:"eastmoney",name:"money-flow",access:"read",description:"主力资金净流入排行(今日/5日/10日)",domain:"push2.eastmoney.com",strategy:h.PUBLIC,browser:!1,args:[{name:"range",type:"string",default:"today",help:"周期:today / 5d / 10d"},{name:"order",type:"string",default:"desc",help:"排序:desc (净流入排行) / asc (净流出)"},{name:"limit",type:"int",default:20,help:"返回数量 (max 100)"}],columns:["rank","code","name","price","changePercent","mainNet","mainNetRatio","superNet","bigNet","mediumNet","smallNet"],func:async(s)=>{const i=String(s.range??"today").toLowerCase(),e=o[i];if(!e)throw new r("INVALID_ARGUMENT",`Unknown range "${i}". Valid: ${Object.keys(o).join(", ")}`);const l=String(s.order??"desc").toLowerCase()==="asc"?"0":"1",f=Math.max(1,Math.min(Number(s.limit)||20,100)),c=["f12","f14","f2","f3",e.fields.net,e.fields.netPct,e.fields.super,e.fields.big,e.fields.medium,e.fields.small],t=new URL("https://push2.eastmoney.com/api/qt/clist/get");t.searchParams.set("pn","1");t.searchParams.set("pz",String(f));t.searchParams.set("po",l);t.searchParams.set("np","1");t.searchParams.set("fltt","2");t.searchParams.set("invt","2");t.searchParams.set("fid",e.fid);t.searchParams.set("fs",g);t.searchParams.set("fields",c.join(","));t.searchParams.set("ut","b2884a393a59ad64002292a3e90d46a5");const n=await fetch(t,{headers:{"User-Agent":"Mozilla/5.0"}});if(!n.ok)throw new r("HTTP_ERROR",`money-flow failed: HTTP ${n.status}`);const m=await n.json(),d=Array.isArray(m?.data?.diff)?m.data.diff:[];if(d.length===0)throw new r("NO_DATA","eastmoney returned no money-flow data");return d.slice(0,f).map((a,p)=>({rank:p+1,code:a.f12,name:a.f14,price:a.f2,changePercent:a.f3,mainNet:a[e.fields.net],mainNetRatio:a[e.fields.netPct],superNet:a[e.fields.super],bigNet:a[e.fields.big],mediumNet:a[e.fields.medium],smallNet:a[e.fields.small]}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as f,Strategy as p}from"@jackwener/opencli/registry";import{CliError as i}from"@jackwener/opencli/errors";f({site:"eastmoney",name:"northbound",access:"read",description:"沪深港通北向/南向资金当日分时净流入(万元)",domain:"push2.eastmoney.com",strategy:p.PUBLIC,browser:!1,args:[{name:"direction",type:"string",default:"north",help:"方向:north (北向,即外资买A) / south (南向,即内地买港)"},{name:"limit",type:"int",default:10,help:"返回最近 N 分钟"}],columns:["time","cumulativeNetYi","minuteNetYi","totalNetYi"],func:async(s)=>{const e=String(s.direction??"north").toLowerCase();if(!["north","south","n","s"].includes(e))throw new i("INVALID_ARGUMENT",`Unknown direction "${e}". Valid: north / south`);const l=Math.max(1,Math.min(Number(s.limit)||10,240)),a=new URL("https://push2.eastmoney.com/api/qt/kamtbs.rtmin/get");a.searchParams.set("fields1","f1,f2,f3,f4");a.searchParams.set("fields2","f51,f52,f54,f56");a.searchParams.set("ut","b2884a393a59ad64002292a3e90d46a5");const o=await fetch(a,{headers:{"User-Agent":"Mozilla/5.0"}});if(!o.ok)throw new i("HTTP_ERROR",`northbound failed: HTTP ${o.status}`);const r=await o.json(),n=e==="south"||e==="s"?"s2n":"n2s",m=Array.isArray(r?.data?.[n])?r.data[n]:[];if(m.length===0)throw new i("NO_DATA",`No ${n} data returned`);const h=m.map((t)=>t.split(",")).filter((t)=>t.length>=4&&t[1]!=="-");if(h.length===0)throw new i("NO_DATA",`${n} has no valid minute data yet (markets may not be open)`);return h.slice(-l).map(([t,d,u,c])=>({time:t,cumulativeNetYi:+(Number(d)/1e4).toFixed(4),minuteNetYi:+(Number(u)/1e4).toFixed(4),totalNetYi:+(Number(c)/1e4).toFixed(4)}))}});
|
package/clis/eastmoney/quote.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as m,Strategy as i}from"@jackwener/opencli/registry";import{CliError as o}from"@jackwener/opencli/errors";import{resolveSecid as l,splitSymbols as p}from"./_secid.js";const u=["f12","f13","f14","f2","f3","f4","f5","f6","f7","f8","f9","f10","f15","f16","f17","f18","f20","f21","f23"].join(",");function h(r){if(r===1)return"SH";if(r===0)return"SZ/BJ";if(r===116)return"HK";if(r===105||r===106||r===107)return"US";return String(r??"")}m({site:"eastmoney",name:"quote",access:"read",description:"个股实时行情(A股 / 港股 / 美股)— 来自 push2.eastmoney.com",domain:"push2.eastmoney.com",strategy:i.PUBLIC,browser:!1,args:[{name:"symbols",required:!0,positional:!0,help:"股票代码(可用逗号/空格分隔多个)"}],columns:["code","name","market","price","changePercent","change","open","high","low","prevClose","volume","turnover","turnoverRate","amplitude","peDynamic","priceBook","marketCap","floatMarketCap"],func:async(r)=>{const t=p(r.symbols);if(t.length===0)throw new o("INVALID_ARGUMENT","At least one symbol is required");const n=[];for(const e of t)try{n.push(l(e))}catch(d){throw new o("INVALID_ARGUMENT",`Unrecognized symbol "${e}"`)}const a=new URL("https://push2.eastmoney.com/api/qt/ulist.np/get");a.searchParams.set("secids",n.join(","));a.searchParams.set("fltt","2");a.searchParams.set("fields",u);a.searchParams.set("ut","bd1d9ddb04089700cf9c27f6f7426281");const s=await fetch(a,{headers:{"User-Agent":"Mozilla/5.0",Accept:"application/json"}});if(!s.ok)throw new o("HTTP_ERROR",`eastmoney quote failed: HTTP ${s.status}`);const f=await s.json(),c=Array.isArray(f?.data?.diff)?f.data.diff:[];if(c.length===0)throw new o("NO_DATA","eastmoney returned no quotes",`Check symbols: ${t.join(", ")}`);return c.map((e)=>({code:e.f12,name:e.f14,market:h(e.f13),price:e.f2,changePercent:e.f3,change:e.f4,open:e.f17,high:e.f15,low:e.f16,prevClose:e.f18,volume:e.f5,turnover:e.f6,turnoverRate:e.f8,amplitude:e.f7,peDynamic:e.f9,priceBook:e.f23,marketCap:e.f20,floatMarketCap:e.f21}))}});
|
package/clis/eastmoney/rank.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as u,Strategy as k}from"@jackwener/opencli/registry";import{CliError as t}from"@jackwener/opencli/errors";const h={"hs-a":"m:0+t:6,m:0+t:80,m:1+t:2,m:1+t:23,m:0+t:81+s:2048","sh-a":"m:1+t:2,m:1+t:23","sz-a":"m:0+t:6,m:0+t:80","bj-a":"m:0+t:81+s:2048",cyb:"m:0+t:80",kcb:"m:1+t:23",hk:"m:116+t:3,m:116+t:4,m:116+t:1,m:116+t:2",us:"m:105,m:106,m:107"},p={change:{fid:"f3",order:"desc"},drop:{fid:"f3",order:"asc"},turnover:{fid:"f6",order:"desc"},volume:{fid:"f5",order:"desc"},amplitude:{fid:"f7",order:"desc"},rate:{fid:"f8",order:"desc"}},y="f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23";u({site:"eastmoney",name:"rank",access:"read",description:"东财市场涨跌/成交排行(沪深/北证/创/科/港/美)",domain:"push2.eastmoney.com",strategy:k.PUBLIC,browser:!1,args:[{name:"market",type:"string",default:"hs-a",help:"市场:hs-a / sh-a / sz-a / bj-a / cyb / kcb / hk / us"},{name:"sort",type:"string",default:"change",help:"排序:change / drop / turnover / volume / amplitude / rate"},{name:"limit",type:"int",default:20,help:"返回数量 (max 100)"}],columns:["rank","code","name","price","changePercent","change","turnover","volume","turnoverRate","peDynamic","marketCap"],func:async(r)=>{const s=String(r.market??"hs-a").toLowerCase(),n=String(r.sort??"change").toLowerCase(),
|
|
1
|
+
import{cli as u,Strategy as k}from"@jackwener/opencli/registry";import{CliError as t}from"@jackwener/opencli/errors";const h={"hs-a":"m:0+t:6,m:0+t:80,m:1+t:2,m:1+t:23,m:0+t:81+s:2048","sh-a":"m:1+t:2,m:1+t:23","sz-a":"m:0+t:6,m:0+t:80","bj-a":"m:0+t:81+s:2048",cyb:"m:0+t:80",kcb:"m:1+t:23",hk:"m:116+t:3,m:116+t:4,m:116+t:1,m:116+t:2",us:"m:105,m:106,m:107"},p={change:{fid:"f3",order:"desc"},drop:{fid:"f3",order:"asc"},turnover:{fid:"f6",order:"desc"},volume:{fid:"f5",order:"desc"},amplitude:{fid:"f7",order:"desc"},rate:{fid:"f8",order:"desc"}},y="f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23";u({site:"eastmoney",name:"rank",access:"read",description:"东财市场涨跌/成交排行(沪深/北证/创/科/港/美)",domain:"push2.eastmoney.com",strategy:k.PUBLIC,browser:!1,args:[{name:"market",type:"string",default:"hs-a",help:"市场:hs-a / sh-a / sz-a / bj-a / cyb / kcb / hk / us"},{name:"sort",type:"string",default:"change",help:"排序:change / drop / turnover / volume / amplitude / rate"},{name:"limit",type:"int",default:20,help:"返回数量 (max 100)"}],columns:["rank","code","name","price","changePercent","change","turnover","volume","turnoverRate","peDynamic","marketCap"],func:async(r)=>{const s=String(r.market??"hs-a").toLowerCase(),n=String(r.sort??"change").toLowerCase(),f=Math.max(1,Math.min(Number(r.limit)||20,100)),c=h[s];if(!c)throw new t("INVALID_ARGUMENT",`Unknown market "${s}". Valid: ${Object.keys(h).join(", ")}`);const o=p[n];if(!o)throw new t("INVALID_ARGUMENT",`Unknown sort "${n}". Valid: ${Object.keys(p).join(", ")}`);const e=new URL("https://push2.eastmoney.com/api/qt/clist/get");e.searchParams.set("pn","1");e.searchParams.set("pz",String(f));e.searchParams.set("po",o.order==="desc"?"1":"0");e.searchParams.set("np","1");e.searchParams.set("fltt","2");e.searchParams.set("invt","2");e.searchParams.set("fid",o.fid);e.searchParams.set("fs",c);e.searchParams.set("fields",y);e.searchParams.set("ut","bd1d9ddb04089700cf9c27f6f7426281");const m=await fetch(e,{headers:{"User-Agent":"Mozilla/5.0",Accept:"application/json"}});if(!m.ok)throw new t("HTTP_ERROR",`eastmoney rank failed: HTTP ${m.status}`);const d=await m.json(),i=Array.isArray(d?.data?.diff)?d.data.diff:[];if(i.length===0)throw new t("NO_DATA","eastmoney returned no rank data",`market=${s} sort=${n}`);return i.slice(0,f).map((a,l)=>({rank:l+1,code:a.f12,name:a.f14,price:a.f2,changePercent:a.f3,change:a.f4,turnover:a.f6,volume:a.f5,turnoverRate:a.f8,peDynamic:a.f9,marketCap:a.f20}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as u,Strategy as y}from"@jackwener/opencli/registry";import{CliError as a}from"@jackwener/opencli/errors";const h={industry:"m:90+t:2",concept:"m:90+t:3",region:"m:90+t:1"},l={change:{fid:"f3",order:"desc"},drop:{fid:"f3",order:"asc"},"money-flow":{fid:"f62",order:"desc"},"out-flow":{fid:"f62",order:"asc"},turnover:{fid:"f6",order:"desc"}};u({site:"eastmoney",name:"sectors",access:"read",description:"板块排行(行业/概念/地域)按涨跌幅、主力资金或成交额排序",domain:"push2.eastmoney.com",strategy:y.PUBLIC,browser:!1,args:[{name:"type",type:"string",default:"industry",help:"板块类型:industry / concept / region"},{name:"sort",type:"string",default:"change",help:"排序:change / drop / money-flow / out-flow / turnover"},{name:"limit",type:"int",default:20,help:"返回数量 (max 100)"}],columns:["rank","code","name","price","changePercent","mainNet","leadStock","leadChangePercent","upCount","downCount"],func:async(r)=>{const o=String(r.type??"industry").toLowerCase(),c=h[o];if(!c)throw new a("INVALID_ARGUMENT",`Unknown sector type "${o}". Valid: ${Object.keys(h).join(", ")}`);const f=String(r.sort??"change").toLowerCase(),s=l[f];if(!s)throw new a("INVALID_ARGUMENT",`Unknown sort "${f}". Valid: ${Object.keys(l).join(", ")}`);const d=Math.max(1,Math.min(Number(r.limit)||20,100)),e=new URL("https://push2.eastmoney.com/api/qt/clist/get");e.searchParams.set("pn","1");e.searchParams.set("pz",String(d));e.searchParams.set("po",s.order==="desc"?"1":"0");e.searchParams.set("np","1");e.searchParams.set("fltt","2");e.searchParams.set("invt","2");e.searchParams.set("fid",s.fid);e.searchParams.set("fs",c);e.searchParams.set("fields","f12,f14,f2,f3,f62,f104,f105,f128,f136,f140,f141");e.searchParams.set("ut","b2884a393a59ad64002292a3e90d46a5");const n=await fetch(e,{headers:{"User-Agent":"Mozilla/5.0"}});if(!n.ok)throw new a("HTTP_ERROR",`sectors failed: HTTP ${n.status}`);const i=await n.json(),m=Array.isArray(i?.data?.diff)?i.data.diff:[];if(m.length===0)throw new a("NO_DATA","eastmoney returned no sector data");return m.slice(0,d).map((t,p)=>({rank:p+1,code:t.f12,name:t.f14,price:t.f2,changePercent:t.f3,mainNet:t.f62,leadStock:t.f128,leadChangePercent:t.f136,upCount:t.f104,downCount:t.f105}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as i,Strategy as p}from"@jackwener/opencli/registry";import{EmptyResultError as d}from"@jackwener/opencli/errors";import{EOL_BASE as u,eolFetch as f,normaliseDateOrFlag as l,requireProduct as c}from"./utils.js";i({site:"endoflife",name:"product",access:"read",description:"Release cycles + EOL / LTS / support dates for one product on endoflife.date",domain:"endoflife.date",strategy:p.PUBLIC,browser:!1,args:[{name:"product",positional:!0,type:"string",required:!0,help:'endoflife.date product slug (e.g. "nodejs", "python", "ubuntu")'}],columns:["product","cycle","releaseDate","latest","latestReleaseDate","lts","support","eol","extendedSupport","eolStatus","url"],func:async(n)=>{const t=c(n.product),s=await f(`${u}/${encodeURIComponent(t)}.json`,`endoflife product ${t}`);if(!Array.isArray(s)||s.length===0)throw new d("endoflife product",`endoflife.date returned no cycles for "${t}".`);const a=new Date().toISOString().slice(0,10);return s.map((e)=>{const o=l(e?.eol);let r=null;if(o==="ongoing")r="ongoing";else if(typeof o==="string"&&o>=a)r="active";else if(typeof o==="string")r="eol";return{product:t,cycle:String(e?.cycle??"").trim(),releaseDate:typeof e?.releaseDate==="string"?e.releaseDate:null,latest:String(e?.latest??"").trim(),latestReleaseDate:typeof e?.latestReleaseDate==="string"?e.latestReleaseDate:null,lts:l(e?.lts),support:l(e?.support),eol:o,extendedSupport:l(e?.extendedSupport),eolStatus:r,url:`https://endoflife.date/${t}`}})}});
|
package/clis/endoflife/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as s,CommandExecutionError as f,EmptyResultError as u}from"@jackwener/opencli/errors";export const EOL_BASE="https://endoflife.date/api";const a="opencli-endoflife-adapter (+https://github.com/jackwener/OpenCLI)",d=/^[a-z0-9][a-z0-9._-]{0,79}$/;export function requireProduct(e){const t=String(e??"").trim().toLowerCase();if(!t)throw new s('endoflife product is required (e.g. "nodejs", "python", "ubuntu")',"Use the slug visible at https://endoflife.date/<product>.");if(!d.test(t))throw new s(`endoflife product "${e}" is not a valid endoflife.date slug`,'Slugs are lowercase ASCII letters/digits/"._-", e.g. "nodejs", "python", "ubuntu".');return t}export function requireBoundedInt(e,t,r,o="limit"){const n=e??t,i=typeof n==="number"?n:Number(n);if(!Number.isInteger(i)||i<=0)throw new s(`endoflife ${o} must be a positive integer`);if(i>r)throw new s(`endoflife ${o} must be <= ${r}`);return i}export async function eolFetch(e,t){let r;try{r=await fetch(e,{headers:{"user-agent":a,accept:"application/json"}})}catch(n){throw new f(`${t} request failed: ${n?.message??n}`,"Check that endoflife.date is reachable from this network.")}if(r.status===404)throw new u(t,`endoflife.date returned 404 for ${e}.`);if(r.status===429)throw new f(`${t} returned HTTP 429 (rate limited)`,"endoflife.date throttles unauthenticated traffic; wait a few seconds and retry.");if(!r.ok)throw new f(`${t} returned HTTP ${r.status}`);let o;try{o=await r.json()}catch(n){throw new f(`${t} returned malformed JSON: ${n?.message??n}`)}return o}export function normaliseDateOrFlag(e){if(e===!0)return"ongoing";if(e===!1||e==null)return null;if(typeof e==="string")return e.trim()||null;return null}
|
package/clis/facebook/comment.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as i,AuthRequiredError as h,CommandExecutionError as a}from"@jackwener/opencli/errors";import{cli as b,Strategy as y}from"@jackwener/opencli/registry";const f='[data-lexical-editor="true"][contenteditable="true"]',s='[data-pp-fb-composer="1"]';b({site:"facebook",name:"comment",access:"write",description:"Post a comment on a Facebook post. Pass the post URL and the comment text (multi-line allowed). The comment is published from your logged-in account — write a genuine, on-topic remark, not filler.",domain:"facebook.com",strategy:y.COOKIE,browser:!0,args:[{name:"url",type:"string",required:!0,positional:!0,help:"Post URL (e.g. https://www.facebook.com/<user>/posts/<id> or a permalink)"},{name:"text",fromFile:!0,type:"string",required:!0,positional:!0,help:"Comment text (multi-line allowed)"}],columns:["status","url","message"],func:async(t,u)=>{if(!t)throw new a("Browser session required");const o=String(u.url??"").trim();if(!o)throw new i("Post URL is required.");let c;try{c=new URL(o)}catch{throw new i(`Invalid post URL: ${o}`)}if(!/facebook\.com$/.test(c.hostname)&&!c.hostname.endsWith(".facebook.com"))throw new i("URL must be a facebook.com post URL.");const n=String(u.text??"");if(!n.trim())throw new i("Comment text cannot be empty.");await t.goto(o,{waitUntil:"none"});let d=!1;for(let e=0;e<15;e++){const p=await t.evaluate(`(() => {
|
|
2
2
|
const path = location.pathname || '';
|
|
3
3
|
if (/^\\/(login|checkpoint)(\\/|$|\\.php)/.test(path)) return 'login';
|
|
4
4
|
const dialog = document.querySelector('[role="dialog"]');
|
|
5
5
|
const scope = dialog || document;
|
|
6
|
-
const ed = scope.querySelector('${
|
|
6
|
+
const ed = scope.querySelector('${f}') || document.querySelector('${f}');
|
|
7
7
|
if (!ed) return 'wait';
|
|
8
8
|
ed.setAttribute('data-pp-fb-composer', '1');
|
|
9
9
|
ed.scrollIntoView({ block: 'center' });
|
|
10
10
|
return 'ready';
|
|
11
|
-
})()`);if(
|
|
12
|
-
`);for(let
|
|
13
|
-
const ed = document.querySelector('${
|
|
11
|
+
})()`);if(p==="login")throw new h("www.facebook.com","Facebook redirected to login/checkpoint — not signed in");if(p==="ready"){d=!0;break}await t.wait(1)}if(!d)throw new a("Comment box not found — the post may be unavailable, or commenting is disabled.");await t.click(s);await t.wait(1);await t.pressKey("Control+A");await t.pressKey("Delete");const l=n.split(`
|
|
12
|
+
`);for(let e=0;e<l.length;e++){if(e>0)await t.pressKey("Shift+Enter");if(l[e].length)await t.typeText(s,l[e])}if(await t.evaluate(`(() => !!document.querySelector('[role="listbox"][aria-label], ul[role="listbox"]'))()`))await t.pressKey("Escape");const r=(e)=>String(e||"").replace(/\s+/g," ").trim(),m=await t.evaluate(`(() => {
|
|
13
|
+
const ed = document.querySelector('${s}');
|
|
14
14
|
return ed ? (ed.textContent || '') : null;
|
|
15
|
-
})()`);if(
|
|
16
|
-
const ed = document.querySelector('${
|
|
15
|
+
})()`);if(m===null||r(m)!==r(n))throw new a(`Composed text did not match before send (got ${JSON.stringify((m||"").slice(0,60))}).`);await t.pressKey("Enter");await t.wait(2);const w=await t.evaluate(`(() => {
|
|
16
|
+
const ed = document.querySelector('${s}');
|
|
17
17
|
return ed ? (ed.textContent || '') : '';
|
|
18
|
-
})()`);if(
|
|
18
|
+
})()`);if(r(w).length>0&&r(w)===r(n))throw new a("Comment still in the box after Enter — submit blocked (rate limit, restricted post, or no permission to comment).");return[{status:"success",url:o,message:"Comment posted."}]}});
|
package/clis/facebook/feed.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
2
|
-
const limit = ${
|
|
1
|
+
import{ArgumentError as m,AuthRequiredError as b,CommandExecutionError as i,EmptyResultError as a}from"@jackwener/opencli/errors";import{cli as k,Strategy as p}from"@jackwener/opencli/registry";const x="https://www.facebook.com/",l=50;function c(e){const r=Number(e);if(!Number.isInteger(r)||r<1||r>l)throw new m(`facebook feed --limit must be an integer between 1 and ${l}`);return r}function u(e){if(e&&typeof e==="object"&&"data"in e)return e.data;return e}function d(e){return`(() => {
|
|
2
|
+
const limit = ${e};
|
|
3
3
|
|
|
4
4
|
function clean(value) {
|
|
5
5
|
// Strip zero-width / bidi control chars first: Facebook injects them into
|
|
@@ -271,7 +271,7 @@ import{ArgumentError as K,AuthRequiredError as P,CommandExecutionError as Q,Empt
|
|
|
271
271
|
mainTextLength: textOf(document.querySelector('[role="main"]')).length,
|
|
272
272
|
},
|
|
273
273
|
};
|
|
274
|
-
})()`}async function
|
|
274
|
+
})()`}async function g(e,r){const s=`(async () => {
|
|
275
275
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
276
276
|
window.scrollTo(0, document.body.scrollHeight);
|
|
277
277
|
await sleep(800);
|
|
@@ -279,4 +279,4 @@ import{ArgumentError as K,AuthRequiredError as P,CommandExecutionError as Q,Empt
|
|
|
279
279
|
? document.querySelectorAll('[role="article"]').length
|
|
280
280
|
+ Array.from(document.querySelectorAll('[aria-label]')).filter((el) => /^(Actions for this post|此帖子的操作|针对此帖子的操作|贴文的操作)$/i.test((el.getAttribute('aria-label') || '').trim())).length
|
|
281
281
|
: 0;
|
|
282
|
-
})()`;let
|
|
282
|
+
})()`;let t=-1;for(let n=0;n<8;n+=1){let o=0;try{o=Number(u(await e.evaluate(s)))||0}catch{break}if(o>=r||o===t)break;t=o}}async function f(e,r){const s=c(r.limit??10);try{await e.goto(x,{settleMs:4000})}catch(o){throw new i(`Failed to navigate to facebook feed: ${o instanceof Error?o.message:o}`,"Check that facebook.com is reachable and the browser extension is connected.")}await g(e,s);let t;try{t=u(await e.evaluate(d(s)))}catch(o){throw new i(`Failed to read facebook feed: ${o instanceof Error?o.message:o}`,"Facebook may not have rendered or the feed markup may have changed.")}if(!t||typeof t!=="object"||!Array.isArray(t.rows))throw new i("facebook feed returned malformed extraction payload");if(t.status==="auth")throw new b("www.facebook.com","Open Chrome and log in to Facebook before retrying.");if(t.rows.length>0)return t.rows;if(t.status==="empty")throw new a("facebook feed","Facebook did not show any feed posts for this account.");const n=t.diagnostics||{};if(n.articleCount||n.actionMenuCount||n.fallbackActionCount||n.mainTextLength>200)throw new i("facebook feed page rendered but no feed rows could be extracted",`Diagnostics: articles=${n.articleCount||0}, actions=${n.fallbackActionCount||0}, mainTextLength=${n.mainTextLength||0}.`);throw new a("facebook feed","No Facebook feed content was visible in the current browser session.")}const h={site:"facebook",name:"feed",access:"read",description:"Get your Facebook news feed",domain:"www.facebook.com",strategy:p.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"limit",type:"int",default:10,help:"Number of posts"}],columns:["index","author","content","likes","comments","shares"],func:f};k(h);export const __test__={buildFeedExtractScript:d,command:h,getFacebookFeed:f,requireLimit:c};
|
package/clis/facebook/like.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as u,AuthRequiredError as w,CommandExecutionError as s}from"@jackwener/opencli/errors";import{cli as y,Strategy as g}from"@jackwener/opencli/registry";const k="data-pp-fb-like";function h(){return`(() => {
|
|
2
2
|
const path = location.pathname || '';
|
|
3
3
|
if (/^\\/(login|checkpoint)(\\/|$|\\.php)/.test(path)) return { auth: true, detail: 'on login/checkpoint page' };
|
|
4
4
|
// A permalink often renders as a modal dialog over the feed. Scope to the
|
|
@@ -14,16 +14,16 @@ import{ArgumentError as Z,AuthRequiredError as y,CommandExecutionError as V}from
|
|
|
14
14
|
.filter(b => !b.closest('[role="toolbar"]') && b.querySelector('i[data-visualcompletion="css-img"]'));
|
|
15
15
|
const like = btns[0];
|
|
16
16
|
if (!like) return { notfound: true, detail: 'like button not located' };
|
|
17
|
-
like.setAttribute(${JSON.stringify(
|
|
17
|
+
like.setAttribute(${JSON.stringify(k)}, '1');
|
|
18
18
|
like.scrollIntoView({ block: 'center' });
|
|
19
19
|
const icon = like.querySelector('i[data-visualcompletion="css-img"]');
|
|
20
20
|
const y = parseFloat((getComputedStyle(icon).backgroundPosition.split(' ')[1] || '0').replace('px','')) || 0;
|
|
21
21
|
return { y, label: like.getAttribute('aria-label') || '' };
|
|
22
|
-
})()`}function
|
|
23
|
-
const like = document.querySelector('[${
|
|
22
|
+
})()`}function v(){return`(() => {
|
|
23
|
+
const like = document.querySelector('[${k}="1"]');
|
|
24
24
|
if (!like) return null;
|
|
25
25
|
const icon = like.querySelector('i[data-visualcompletion="css-img"]');
|
|
26
26
|
if (!icon) return null;
|
|
27
27
|
const y = parseFloat((getComputedStyle(icon).backgroundPosition.split(' ')[1] || '0').replace('px','')) || 0;
|
|
28
28
|
return { y, label: like.getAttribute('aria-label') || '' };
|
|
29
|
-
})()`}async function
|
|
29
|
+
})()`}async function f(e,a,o){for(let i=0;i<o;i++){await e.click(`[${k}="1"]`);await e.wait(1);const n=await e.evaluate(v());if(n&&n.y!==a)return n}return null}y({site:"facebook",name:"like",access:"write",description:"Like a Facebook post (ends in the liked state; no-op if already liked). Pass the post URL. Reacts as a genuine like from your logged-in account — use it to engage with content you actually mean to endorse.",domain:"facebook.com",strategy:g.COOKIE,browser:!0,args:[{name:"url",type:"string",required:!0,positional:!0,help:"Post URL (e.g. https://www.facebook.com/<user>/posts/<id> or a permalink)"},{name:"remove",type:"bool",default:!1,help:"Remove your like instead (end in the un-liked state)"}],columns:["status","action","url","message"],func:async(e,a)=>{if(!e)throw new s("Browser session required");const o=String(a.url??"").trim();if(!o)throw new u("Post URL is required.");let i;try{i=new URL(o)}catch{throw new u(`Invalid post URL: ${o}`)}if(!/facebook\.com$/.test(i.hostname)&&!i.hostname.endsWith(".facebook.com"))throw new u("URL must be a facebook.com post URL.");const n=a.remove===!0;await e.goto(o,{waitUntil:"none"});let t=null;for(let d=0;d<15;d++){await e.wait(1);t=await e.evaluate(h());if(t?.auth)throw new w("www.facebook.com",`Facebook ${t.detail} — not signed in`);if(typeof t?.y==="number")break}if(typeof t?.y!=="number")throw new s(`Could not act on this post: ${t?.detail||"like button never appeared"}.`);const r=await f(e,t.y,5);if(!r)throw new s("Like did not register — Facebook ignored the click (post may be unavailable or reactions disabled).");const m=Math.max(t.y,r.y),p=r.y===m,b=t.y===m,c=!n;let l;if(p===c)l=c?b?"already-liked":"liked":"unliked";else{if(!await f(e,r.y,3))throw new s("Could not settle the reaction to the desired state (second toggle ignored).");l=c?"already-liked":"already-unliked"}return[{status:"success",action:l,url:o,message:{liked:"Post liked.","already-liked":"Post was already liked (left liked).",unliked:"Like removed.","already-unliked":"Post was not liked (left un-liked)."}[l]||"Reaction updated."}]}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as S,Strategy as k}from"@jackwener/opencli/registry";import{ArgumentError as E,AuthRequiredError as x,CommandExecutionError as y,EmptyResultError as w}from"@jackwener/opencli/errors";export const FB_HOST="https://www.facebook.com",NOTIFICATIONS_LIMIT_DEFAULT=15,NOTIFICATIONS_LIMIT_MAX=100,MARK_AS_READ_PREFIXES=["标记为已读,","Mark as read, ","Mark as Read, ","Marquer comme lu, ","Marcar como leído, ","既読にする, "],UNREAD_BADGE_LABELS=["未读","Unread","No leído","未読"];export function normalizeNotificationsLimit(e){if(e===void 0||e===null||e==="")return NOTIFICATIONS_LIMIT_DEFAULT;const n=typeof e==="number"?e:Number(e);if(!Number.isFinite(n)||!Number.isInteger(n)||n<1||n>NOTIFICATIONS_LIMIT_MAX)throw new E(`--limit must be a positive integer in [1, ${NOTIFICATIONS_LIMIT_MAX}], got ${JSON.stringify(e)}`);return n}export function stripMarkAsReadPrefix(e,n){if(!e)return null;const o=String(e).trim();if(!o)return null;for(let t=0;t<n.length;t+=1){const r=n[t];if(o.startsWith(r))return o.slice(r.length).trim()}return null}export function stripAnchorChrome(e,n,o){if(!e)return"";let t=String(e).trim();for(let r=0;r<o.length;r+=1){const i=o[r];if(t.startsWith(i)){t=t.slice(i.length).trim();break}}if(n){const r=String(n).trim();if(r&&t.endsWith(r))t=t.slice(0,t.length-r.length).trim()}t=t.replace(/[.。]+$/,"").trim();return t}export function parseNotifQuery(e,n){const o={notif_id:null,notif_type:null};if(!e)return o;let t;try{t=new URL(e,n)}catch(r){return o}o.notif_id=t.searchParams.get("notif_id")||null;o.notif_type=t.searchParams.get("notif_t")||null;return o}export function isFacebookAuthRedirectPath(e){return/^\/(?:login|checkpoint)(?:\.php)?(?:\/|$)/i.test(String(e||""))}export function extractNotificationRowsFromDoc(e,n,o){const t=[],r=e.querySelectorAll('[role="listitem"]');for(let i=0;i<r.length&&t.length<n;i+=1){const f=r[i],c=f.querySelector("a[href]");if(!c)continue;const m=c.href||c.getAttribute("href")||"";if(!m)continue;const d=f.querySelector("abbr"),g=d?(d.textContent||"").trim()||null:null;let u=!1;const h=f.querySelectorAll("div");for(let a=0;a<h.length;a+=1){const s=(h[a].textContent||"").trim();if(o.unreadBadges.indexOf(s)!==-1){u=!0;break}}if(!u){const a=(c.textContent||"").trim();for(let s=0;s<o.unreadBadges.length;s+=1)if(a.startsWith(o.unreadBadges[s])){u=!0;break}}let l=null;const p=f.querySelectorAll("[aria-label]");for(let a=0;a<p.length;a+=1){const s=p[a].getAttribute("aria-label"),b=o.stripMark(s,o.markPrefixes);if(b!==null){l=b.replace(/[.。]+$/,"").trim()||null;break}}if(!l)l=o.stripChrome(c.textContent||"",g,o.unreadBadges)||null;if(!l)continue;const{notif_id:A,notif_type:_}=o.parseQuery(m,o.fbHost);t.push({index:t.length+1,unread:u,text:l,time:g,url:m,notif_id:A,notif_type:_})}return t}export function buildNotificationsScript(e){return`
|
|
2
2
|
(async () => {
|
|
3
3
|
const FB_HOST = ${JSON.stringify(FB_HOST)};
|
|
4
4
|
const MARK_AS_READ_PREFIXES = ${JSON.stringify(MARK_AS_READ_PREFIXES)};
|
|
@@ -19,7 +19,7 @@ import{cli as H,Strategy as L}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
19
19
|
while (document.querySelectorAll('[role="listitem"]').length === 0 && Date.now() - start < 8000) {
|
|
20
20
|
await new Promise(function(r) { setTimeout(r, 200); });
|
|
21
21
|
}
|
|
22
|
-
return extractNotificationRowsFromDoc(document, ${JSON.stringify(
|
|
22
|
+
return extractNotificationRowsFromDoc(document, ${JSON.stringify(e)}, {
|
|
23
23
|
stripMark: stripMarkAsReadPrefix,
|
|
24
24
|
stripChrome: stripAnchorChrome,
|
|
25
25
|
parseQuery: parseNotifQuery,
|
|
@@ -28,4 +28,4 @@ import{cli as H,Strategy as L}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
28
28
|
unreadBadges: UNREAD_BADGE_LABELS,
|
|
29
29
|
});
|
|
30
30
|
})()
|
|
31
|
-
`}async function
|
|
31
|
+
`}async function R(e,n){const o=normalizeNotificationsLimit(n.limit);try{await e.goto(`${FB_HOST}/notifications`,{waitUntil:"load",settleMs:3000})}catch(r){const i=r instanceof Error?r.message:String(r);throw new y(`Failed to navigate to facebook notifications: ${i}`,"facebook.com may be unreachable")}let t;try{t=await e.evaluate(buildNotificationsScript(o))}catch(r){const i=r instanceof Error?r.message:String(r);if(/AUTH_REQUIRED/i.test(i))throw new x("facebook.com","Open Chrome and log in to Facebook before retrying");throw new y(`Failed to read facebook notifications: ${i}`,"facebook.com page may not have rendered or markup may have changed")}if(!Array.isArray(t)||t.length===0)throw new w("facebook/notifications","No notifications found — login session may have expired or you have no recent notifications");return t}export const notificationsCommand=S({site:"facebook",name:"notifications",access:"read",description:"Get recent Facebook notifications (含 unread / time / url / notif_id / notif_type 列)",domain:"www.facebook.com",strategy:k.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"limit",type:"int",default:NOTIFICATIONS_LIMIT_DEFAULT,help:`Number of notifications (1-${NOTIFICATIONS_LIMIT_MAX})`}],columns:["index","unread","text","time","url","notif_id","notif_type"],func:R}),__test__={buildNotificationsScript};
|
package/clis/facebook/post.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as w from"node:fs";import*as b from"node:path";import{ArgumentError as c,AuthRequiredError as y,CommandExecutionError as i}from"@jackwener/opencli/errors";import{cli as S,Strategy as k}from"@jackwener/opencli/registry";import{assertLiteralContent as P}from"../_shared/content-guard.js";import{setInputFiles as E}from"../_shared/file-inject.js";const g='[data-lexical-editor="true"][contenteditable="true"]',l='[data-pp-fb-composer="1"]',x='[data-pp-fb-trigger="1"]',v='[data-pp-fb-post="1"]',I="https://www.facebook.com/",q=new Set([".jpg",".jpeg",".png",".gif",".webp"]);function R(t){const o=String(t??"").trim();if(!o)return I;if(/^https?:\/\//i.test(o)){let e;try{e=new URL(o)}catch{throw new c(`Invalid target URL: ${o}`)}if(e.hostname!=="facebook.com"&&!e.hostname.endsWith(".facebook.com"))throw new c("target URL must be on facebook.com.");return e.href}const r=o.replace(/^@/,"").replace(/^\/+|\/+$/g,"");if(!/^[A-Za-z0-9.\-]+$/.test(r))throw new c(`Invalid target "${t}" — pass a facebook.com URL or a bare profile/Page vanity.`);return`https://www.facebook.com/${r}`}function U(t){return String(t).split(",").map((r)=>r.trim()).filter(Boolean).map((r)=>{const e=b.resolve(r),a=b.extname(e).toLowerCase();if(!q.has(a))throw new i(`Unsupported image format "${a}". Supported: jpg, png, gif, webp`);const s=w.statSync(e,{throwIfNoEntry:!1});if(!s||!s.isFile())throw new i(`Not a valid file: ${e}`);return e})}function N(){return`(() => {
|
|
2
2
|
const path = location.pathname || '';
|
|
3
3
|
if (/^\\/(login|checkpoint)(\\/|$|\\.php)/.test(path)) return 'login';
|
|
4
4
|
// Prefer an already-open editor (dialog first, so we don't grab a
|
|
5
5
|
// background feed publisher when the modal is up).
|
|
6
6
|
const dialog = document.querySelector('[role="dialog"]');
|
|
7
7
|
const scope = dialog || document;
|
|
8
|
-
const ed = scope.querySelector('${
|
|
8
|
+
const ed = scope.querySelector('${g}') || document.querySelector('${g}');
|
|
9
9
|
if (ed) {
|
|
10
10
|
ed.setAttribute('data-pp-fb-composer', '1');
|
|
11
11
|
ed.scrollIntoView({ block: 'center' });
|
|
@@ -31,9 +31,9 @@ import*as y from"node:fs";import*as f from"node:path";import{ArgumentError as q,
|
|
|
31
31
|
return 'trigger';
|
|
32
32
|
}
|
|
33
33
|
return 'wait';
|
|
34
|
-
})()`}function
|
|
34
|
+
})()`}function C(){return`(() => {
|
|
35
35
|
const dialog = document.querySelector('[role="dialog"]') || document;
|
|
36
|
-
const ed = dialog.querySelector('${
|
|
36
|
+
const ed = dialog.querySelector('${l}');
|
|
37
37
|
const btns = [...dialog.querySelectorAll('[role="button"][tabindex]')].filter((b) => {
|
|
38
38
|
if (ed && (b === ed || b.contains(ed) || ed.contains(b))) return false;
|
|
39
39
|
if (b.closest('[role="toolbar"]')) return false;
|
|
@@ -46,16 +46,16 @@ import*as y from"node:fs";import*as f from"node:path";import{ArgumentError as q,
|
|
|
46
46
|
submit.setAttribute('data-pp-fb-post', '1');
|
|
47
47
|
submit.scrollIntoView({ block: 'center' });
|
|
48
48
|
return { ok: true };
|
|
49
|
-
})()`}function
|
|
49
|
+
})()`}function L(t){return`(() => {
|
|
50
50
|
const collapse = (s) => String(s || '').replace(/\\s+/g, ' ').trim();
|
|
51
|
-
const ed = document.querySelector('${
|
|
51
|
+
const ed = document.querySelector('${l}');
|
|
52
52
|
if (!ed) return { ok: true };
|
|
53
53
|
const remaining = collapse(ed.textContent || '');
|
|
54
54
|
if (remaining.length === 0) return { ok: true };
|
|
55
|
-
if (remaining === collapse(${JSON.stringify(
|
|
55
|
+
if (remaining === collapse(${JSON.stringify(t)})) return { ok: false, remaining };
|
|
56
56
|
return { ok: true };
|
|
57
|
-
})()`}const
|
|
58
|
-
`);for(let
|
|
59
|
-
const ed = document.querySelector('${
|
|
57
|
+
})()`}const O='[role="dialog"] input[type="file"], input[type="file"][accept*="image"]';async function T(t,o){await E(t,O,o)}S({site:"facebook",name:"post",access:"write",description:"Publish a new post to your Facebook feed (or a Page you manage). Pass the post text (multi-line allowed); optionally attach local images and target a Page. Published from your logged-in account — write genuine, on-topic content, not filler.",domain:"facebook.com",strategy:k.UI,browser:!0,args:[{name:"text",fromFile:!0,type:"string",required:!0,positional:!0,help:"Post text (multi-line allowed)"},{name:"images",type:"string",required:!1,help:"Local image paths, comma-separated (jpg/png/gif/webp)"},{name:"target",type:"string",required:!1,help:"Optional Page/profile to post to: a facebook.com URL or a bare vanity. Omit to post to your own feed."}],columns:["status","target","message"],func:async(t,o)=>{if(!t)throw new i("Browser session required for facebook post");const r=P(o.text,{label:"帖子正文"});if(!r)throw new c("Post text cannot be empty.");const e=o.images?U(o.images):[],a=R(o.target);await t.goto(a,{waitUntil:"none"});let s=!1;for(let n=0;n<20;n++){const f=await t.evaluate(N());if(f==="login")throw new y("www.facebook.com","Facebook redirected to login/checkpoint — not signed in");if(f==="ready"){s=!0;break}if(f==="trigger")await t.click(x);await t.wait(1)}if(!s)throw new i("Post composer not found — the feed publisher may not have loaded, or you may lack permission to post here.");await t.click(l);await t.wait(1);await t.pressKey("Control+A");await t.pressKey("Delete");if(e.length>0){await T(t,e);await t.wait(2)}const u=r.split(`
|
|
58
|
+
`);for(let n=0;n<u.length;n++){if(n>0)await t.pressKey("Shift+Enter");if(u[n].length)await t.typeText(l,u[n])}if(await t.evaluate(`(() => !!document.querySelector('[role="listbox"][aria-label], ul[role="listbox"]'))()`))await t.pressKey("Escape");const m=(n)=>String(n||"").replace(/\s+/g," ").trim(),d=await t.evaluate(`(() => {
|
|
59
|
+
const ed = document.querySelector('${l}');
|
|
60
60
|
return ed ? (ed.textContent || '') : null;
|
|
61
|
-
})()`);if(
|
|
61
|
+
})()`);if(d===null||!m(d).includes(m(r)))throw new i(`Composed text did not land before publish (got ${JSON.stringify((d||"").slice(0,60))}).`);const p=await t.evaluate(C());if(p?.notfound)throw new i("Post button not found in the composer.");if(p?.disabled)throw new i("Post button is disabled — composer may be empty or the post was rejected.");await t.click(v);await t.wait(2);if(!(await t.evaluate(L(r)))?.ok)throw new i("Post still in the composer after clicking Post — publish blocked (rate limit, restricted, or no permission). Not confirmed sent; verify before retrying.");const h=e.length>0?` with ${e.length} image(s)`:"";return[{status:"success",target:a,message:`Post published${h}.`}]}});
|
package/clis/facebook/search.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
2
|
-
const limit = ${
|
|
1
|
+
import{ArgumentError as c,AuthRequiredError as p,CommandExecutionError as a,EmptyResultError as w}from"@jackwener/opencli/errors";import{cli as b,Strategy as g}from"@jackwener/opencli/registry";const y="https://www.facebook.com",i=50;function u(e){const t=Number(e);if(!Number.isInteger(t)||t<1||t>i)throw new c(`facebook search --limit must be an integer between 1 and ${i}`);return t}function l(e){const t=String(e??"").trim();if(!t)throw new c("facebook search requires a non-empty query");return t}function k(e){if(e&&typeof e==="object"&&"data"in e)return e.data;return e}function f(e){return`(() => {
|
|
2
|
+
const limit = ${e};
|
|
3
3
|
|
|
4
4
|
function clean(value) {
|
|
5
5
|
return String(value || '')
|
|
@@ -80,4 +80,4 @@ import{ArgumentError as V,AuthRequiredError as j,CommandExecutionError as P,Empt
|
|
|
80
80
|
mainTextLength: clean((document.querySelector('[role="main"]') || {}).textContent).length,
|
|
81
81
|
},
|
|
82
82
|
};
|
|
83
|
-
})()`}async function
|
|
83
|
+
})()`}async function h(e,t){const s=l(t.query),m=u(t.limit??10);try{await e.goto(y);await e.goto(`https://www.facebook.com/search/top?q=${encodeURIComponent(s)}`,{settleMs:4000})}catch(r){throw new a(`Failed to open facebook search: ${r instanceof Error?r.message:r}`,"Check that facebook.com is reachable and the browser extension is connected.")}let o;try{o=k(await e.evaluate(f(m)))}catch(r){throw new a(`Failed to read facebook search results: ${r instanceof Error?r.message:r}`,"Facebook may not have rendered or the search markup may have changed.")}if(!o||typeof o!=="object"||!Array.isArray(o.rows))throw new a("facebook search returned malformed extraction payload");if(o.status==="auth")throw new p("www.facebook.com","Open Chrome and log in to Facebook before retrying.");if(o.rows.length>0)return o.rows;const n=o.diagnostics||{};if(n.anchorCount||n.mainTextLength>200)throw new a("facebook search page rendered but no entity results could be extracted",`Diagnostics: feed=${!!n.feedFound}, anchors=${n.anchorCount||0}, mainTextLength=${n.mainTextLength||0}.`);throw new w("facebook search",`No Facebook results were visible for "${s}".`)}const d={site:"facebook",name:"search",access:"read",description:"Search Facebook for people, pages, or posts",domain:"www.facebook.com",strategy:g.COOKIE,browser:!0,navigateBefore:!1,args:[{name:"query",required:!0,positional:!0,help:"Search query"},{name:"limit",type:"int",default:10,help:"Number of results"}],columns:["index","title","text","url"],func:h};b(d);export const __test__={buildSearchExtractScript:f,command:d,searchFacebook:h,requireLimit:u,requireQuery:l};
|
package/clis/flathub/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as n,Strategy as p}from"@jackwener/opencli/registry";import{EmptyResultError as i}from"@jackwener/opencli/errors";import{FLATHUB_API_BASE as u,FLATHUB_APP_BASE as m,flathubFetch as c,joinList as o,pickLatestRelease as d,requireAppId as g}from"./utils.js";n({site:"flathub",name:"app",access:"read",description:"Full Flathub appstream metadata for an app id (license, categories, latest release)",domain:"flathub.org",strategy:p.PUBLIC,browser:!1,args:[{name:"appId",positional:!0,required:!0,help:'AppStream id (e.g. "org.mozilla.firefox", "org.gnome.Calculator")'}],columns:["appId","name","summary","developer","license","isFreeLicense","isEol","categories","keywords","latestVersion","latestReleaseDate","homepage","bugtracker","donation","url"],func:async(s)=>{const r=g(s.appId),l=`${u}/appstream/${encodeURIComponent(r)}`,e=await c(l,"flathub app");if(!e||typeof e!=="object"||!e.id)throw new i("flathub app",`Flathub app "${r}" returned empty payload.`);const t=e.urls&&typeof e.urls==="object"?e.urls:{},a=d(e.releases);return[{appId:typeof e.id==="string"?e.id:r,name:typeof e.name==="string"?e.name:null,summary:typeof e.summary==="string"?e.summary:null,developer:typeof e.developer_name==="string"?e.developer_name:null,license:typeof e.project_license==="string"?e.project_license:null,isFreeLicense:e.is_free_license===!0,isEol:e.is_eol===!0,categories:o(e.categories),keywords:o(e.keywords,8),latestVersion:a.version,latestReleaseDate:a.date,homepage:typeof t.homepage==="string"?t.homepage:null,bugtracker:typeof t.bugtracker==="string"?t.bugtracker:null,donation:typeof t.donation==="string"?t.donation:null,url:`${m}/${r}`}]}});
|
package/clis/flathub/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as p,Strategy as u}from"@jackwener/opencli/registry";import{EmptyResultError as m}from"@jackwener/opencli/errors";import{FLATHUB_API_BASE as c,FLATHUB_APP_BASE as d,flathubFetch as y,joinList as _,requireBoundedInt as f,requireString as g}from"./utils.js";p({site:"flathub",name:"search",access:"read",description:"Search Flathub apps by keyword",domain:"flathub.org",strategy:u.PUBLIC,browser:!1,args:[{name:"query",positional:!0,required:!0,help:"Search keyword"},{name:"limit",type:"int",default:25,help:"Max apps (1-100)"}],columns:["rank","appId","name","summary","developer","license","isFreeLicense","mainCategories","installsLastMonth","updatedAt","url"],func:async(t)=>{const r=g(t.query,"query"),n=f(t.limit,25,100),o=`${c}/search`,s=await y(o,"flathub search",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:r,hitsPerPage:n,page:1})}),l=Array.isArray(s?.hits)?s.hits:[];if(!l.length)throw new m("flathub search",`No Flathub apps matched "${r}".`);return l.slice(0,n).map((e,i)=>{const a=typeof e?.app_id==="string"?e.app_id:null;return{rank:i+1,appId:a,name:typeof e?.name==="string"?e.name:null,summary:typeof e?.summary==="string"?e.summary:null,developer:typeof e?.developer_name==="string"?e.developer_name:null,license:typeof e?.project_license==="string"?e.project_license:null,isFreeLicense:e?.is_free_license===!0,mainCategories:typeof e?.main_categories==="string"?e.main_categories:_(e?.main_categories),installsLastMonth:typeof e?.installs_last_month==="number"?e.installs_last_month:null,updatedAt:typeof e?.updated_at==="number"&&e.updated_at>0?new Date(e.updated_at*1000).toISOString().slice(0,10):typeof e?.updated_at==="string"?e.updated_at:null,url:a?`${d}/${a}`:""}})}});
|
package/clis/flathub/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as s,CommandExecutionError as a,EmptyResultError as p}from"@jackwener/opencli/errors";export const FLATHUB_API_BASE="https://flathub.org/api/v2",FLATHUB_APP_BASE="https://flathub.org/apps";const m="opencli-flathub-adapter/1.0 (+https://github.com/jackwener/OpenCLI; mailto:ppcli@example.com)",c=/^[A-Za-z][A-Za-z0-9_-]*(?:\.[A-Za-z0-9_][A-Za-z0-9_-]*){1,}$/;export function requireString(t,r){const e=String(t??"").trim();if(!e)throw new s(`flathub ${r} cannot be empty`);return e}export function requireBoundedInt(t,r,e,i="limit"){const o=t??r,n=typeof o==="number"?o:Number(o);if(!Number.isInteger(n)||n<=0)throw new s(`flathub ${i} must be a positive integer`);if(n>e)throw new s(`flathub ${i} must be <= ${e}`);return n}export function requireAppId(t){const r=String(t??"").trim();if(!r)throw new s('flathub appId is required (e.g. "org.mozilla.firefox")');if(!c.test(r))throw new s(`flathub appId "${t}" is not a valid AppStream identifier`,'AppStream IDs use reverse-DNS like "org.mozilla.firefox" — letters/digits/`._-` with at least one dot.');return r}export async function flathubFetch(t,r,e){let i;try{i=await fetch(t,{method:e?.method??"GET",headers:{"user-agent":m,accept:"application/json",...e?.headers??{}},body:e?.body})}catch(n){throw new a(`${r} request failed: ${n?.message??n}`,"Check that flathub.org is reachable from this network.")}if(i.status===404)throw new p(r,`Flathub returned 404 for ${t}.`);if(i.status===429)throw new a(`${r} returned HTTP 429 (rate limited)`);if(!i.ok)throw new a(`${r} returned HTTP ${i.status}`);let o;try{o=await i.json()}catch(n){throw new a(`${r} returned malformed JSON: ${n?.message??n}`)}return o}export function joinList(t,r=10){if(!Array.isArray(t))return"";const e=t.filter((i)=>typeof i==="string"&&i.trim());if(e.length===0)return"";if(e.length>r)return[...e.slice(0,r),`(+${e.length-r})`].join(", ");return e.join(", ")}function u(t){if(typeof t==="number"&&Number.isFinite(t))return t;if(typeof t==="string"&&/^\d+$/.test(t.trim()))return Number(t.trim());return 0}export function pickLatestRelease(t){if(!Array.isArray(t)||t.length===0)return{version:null,date:null};const e=[...t].filter((n)=>n&&typeof n==="object").sort((n,f)=>{return u(f?.timestamp)-u(n?.timestamp)})[0];if(!e)return{version:null,date:null};let i=null;const o=u(e.timestamp);if(o>0){const n=new Date(o*1000);if(!Number.isNaN(n.getTime()))i=n.toISOString().slice(0,10)}if(!i&&typeof e.date==="string"&&e.date.trim())i=e.date.trim();return{version:typeof e.version==="string"?e.version:null,date:i}}
|
package/clis/flomo/memos.js
CHANGED
|
@@ -10,4 +10,4 @@ import{cli as y,Strategy as A}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
12
|
})()
|
|
13
|
-
`}function P(t){return/auth|unauth|login|token|permission|forbidden|unauthorized|登录|登陆|鉴权|权限/i.test(String(t||""))}function
|
|
13
|
+
`}function P(t){return/auth|unauth|login|token|permission|forbidden|unauthorized|登录|登陆|鉴权|权限/i.test(String(t||""))}function k(t){if(!Array.isArray(t))return"";return t.map((e)=>{if(typeof e==="string")return e;return e?.name||e?.tag||e?.content||""}).map((e)=>String(e).trim()).filter(Boolean).join(", ")}function O(t){if(!Array.isArray(t))return"";return t.map((e)=>e?.thumbnail_url||e?.url||"").map((e)=>String(e).trim()).filter(Boolean).join(" | ")}function N(t){return t?`https://${f}/mine/?memo_id=${encodeURIComponent(t)}`:""}function h(t){if(!t||typeof t!=="object"||Array.isArray(t))throw new s("Flomo API returned a malformed memo entry");const e=String(t.slug||t.id||"").trim();if(!e)throw new s("Flomo API returned a memo without slug/id");return{id:e,url:N(e),content:String(t.content||"").trim(),slug:e,tags:k(t.tags),images:O(t.files),created_at:String(t.created_at||""),updated_at:String(t.updated_at||"")}}async function M(t,e){let n;try{n=await fetch(t,{headers:{Authorization:"Bearer "+e,"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",Accept:"application/json"}})}catch(r){throw new s(`Failed to fetch Flomo memos: ${r instanceof Error?r.message:String(r)}`)}if(n.status===401||n.status===403)throw new l(c,`Flomo API returned HTTP ${n.status}; please refresh your Flomo login session`);if(!n.ok)throw new s(`Flomo API returned HTTP ${n.status}`);try{return await n.json()}catch(r){throw new s(`Flomo API returned malformed JSON: ${r instanceof Error?r.message:String(r)}`)}}async function j(t){const e=I(await t.evaluate(F()));if(typeof e!=="string"||!e.trim())throw new l(c,"Flomo memos requires an active signed-in Flomo browser session");return e.trim()}const E=y({site:"flomo",name:"memos",access:"read",description:"List your Flomo memos",domain:c,strategy:A.COOKIE,browser:!0,navigateBefore:`https://${f}/`,args:[{name:"limit",type:"int",default:20,help:"Number of memos to fetch (1-200)"},{name:"since",type:"int",help:"Only memos updated after this Unix timestamp in seconds"},{name:"slug",help:"Pagination cursor from a previous memo page"}],columns:["id","url","content","slug","tags","images","created_at","updated_at"],func:async(t,e)=>{const n=d(e.limit,"limit",20,S),r=p(e.since),a=g(e.slug);await t.wait(3).catch(()=>{});const i=await j(t),o=await M(w(n,r,a),i);if(!o||typeof o!=="object"||Array.isArray(o))throw new s("Flomo API returned a malformed response");if(o.code!==0){const u=o.message||`Flomo API error code ${o.code}`;if(P(u))throw new l(c,u);throw new s(u)}if(!Array.isArray(o.data))throw new s("Flomo API returned malformed memo data");if(o.data.length===0)throw new b("flomo memos","No Flomo memos matched the requested filters.");return o.data.map(h)}});export const __test__={buildSignedUrl:w,command:E,normalizeMemo:h,parsePositiveIntArg:d,parseSinceArg:p,parseSlugArg:g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
`):"",
|
|
3
|
-
`):"",
|
|
4
|
-
`);if(
|
|
1
|
+
import{cli as d,Strategy as h}from"@jackwener/opencli/registry";import{ArgumentError as f}from"@jackwener/opencli/errors";import{GEMINI_DOMAIN as w,clickGeminiConversationByTitle as E,exportGeminiDeepResearchReport as R,getLatestGeminiAssistantResponse as G,getGeminiPageState as S,parseGeminiConversationUrl as g,parseGeminiTitleMatchMode as y,readGeminiSnapshot as v,resolveGeminiConversationForQuery as D,waitForGeminiTranscript as c,getGeminiConversationList as x}from"./utils.js";const m="Deep Research is still running. Please wait and retry later.",A="No Docs URL found. Please check Share & Export -> Export to Docs in Gemini UI.",C="Deep Research may still be running or preparing export. Please wait and retry later.";function I(e){return/\bresearching(?:\s+websites?)?\b|research in progress|working on your research|generating research plan|gathering sources|creating report|planning research|正在研究|研究中|调研中|生成研究计划|搜集资料|请稍候|稍候|请等待/i.test(e)}function u(e){return/\bcompleted\b|research complete|completed research|report completed|已完成|研究完成|完成了研究|报告已完成/i.test(e)}async function p(e,o){const t=await R(e,o);if(t.url)return t.url;const r=await v(e).catch(()=>null);if(r?.isGenerating)return m;const i=await G(e).catch(()=>""),l=Array.isArray(r?.turns)?r.turns.slice(-6).map((s)=>String(s?.Text??"")).join(`
|
|
2
|
+
`):"",a=Array.isArray(r?.transcriptLines)?r.transcriptLines.slice(-30).join(`
|
|
3
|
+
`):"",n=[i,l,a].map((s)=>String(s??"").trim()).filter(Boolean).join(`
|
|
4
|
+
`);if(n&&I(n)&&!u(n))return m;if(n&&u(n))return A;return C}export const deepResearchResultCommand=d({site:"gemini",name:"deep-research-result",access:"read",description:"Export Deep Research report URL from a Gemini conversation",domain:w,strategy:h.COOKIE,browser:!0,siteSession:"persistent",navigateBefore:!1,defaultFormat:"plain",args:[{name:"query",positional:!0,required:!1,help:"Conversation title or URL (optional; defaults to latest conversation)"},{name:"match",required:!1,default:"contains",choices:["contains","exact"],help:"Match mode"},{name:"timeout",type:"int",required:!1,default:120,help:"Max seconds to wait for Docs export (default: 120)"}],columns:["response"],func:async(e,o)=>{const t=String(o.query??"").trim(),r=y(o.match),i=o.timeout;if(!Number.isInteger(i)||i<1)throw new f("--timeout must be a positive integer (seconds)");if(!r)return[{response:"Invalid match mode. Use contains or exact."}];if((await S(e)).isSignedIn===!1)return[{response:"Not signed in to Gemini."}];const a=g(t);if(a){await e.goto(a,{waitUntil:"load",settleMs:2500});await e.wait(1);await c(e);return[{response:await p(e,i)}]}const n=await x(e),s=D(n,t,r);if(s?.Url){await e.goto(s.Url,{waitUntil:"load",settleMs:2500});await e.wait(1);await c(e)}else if(t){if(r==="exact")return[{response:`No conversation matched: ${t}`}];if(!await E(e,t))return[{response:`No conversation matched: ${t}`}];await c(e)}return[{response:await p(e,i)}]}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as I,Strategy as
|
|
1
|
+
import{cli as I,Strategy as F}from"@jackwener/opencli/registry";import{ArgumentError as y}from"@jackwener/opencli/errors";import{GEMINI_DEEP_RESEARCH_DEFAULT_CONFIRM_LABELS as E,GEMINI_DEEP_RESEARCH_DEFAULT_TOOL_LABELS as C,GEMINI_APP_URL as D,GEMINI_DOMAIN as N,getCurrentGeminiUrl as s,getLatestGeminiAssistantResponse as R,readGeminiSnapshot as G,resolveGeminiLabels as L,selectGeminiTool as w,sendGeminiMessage as M,startNewGeminiChat as O,waitForGeminiSubmission as S,waitForGeminiConfirmButton as h}from"./utils.js";function b(t){try{const e=new URL(t);return e.origin+e.pathname.replace(/\/+$/,"")===D}catch{return!1}}function _(t){const e=/\bresearching(?:\s+websites?)?\b|research in progress|working on your research|正在研究|研究中/i.test(t),n=/\bstart(?:\s+deep)?\s+research\b|begin\s+research|generate(?:\s+deep)?\s+research\s+plan|开始研究|开始深度研究|开始调研|生成研究计划|生成调研计划|try again without deep research/i.test(t);return{isResearching:e,waitingForStart:n}}export const deepResearchCommand=I({site:"gemini",name:"deep-research",access:"write",description:"Start a Gemini Deep Research run and confirm it",domain:N,strategy:F.COOKIE,browser:!0,siteSession:"persistent",navigateBefore:!1,defaultFormat:"plain",args:[{name:"prompt",fromFile:!0,positional:!0,required:!0,help:"Prompt to send"},{name:"timeout",type:"int",required:!1,help:"Max seconds for the overall command (default: 180; confirm-wait clamps internally to 6-20s)",default:180},{name:"tool",required:!1,help:"Override tool label (default: Deep Research)"},{name:"confirm",required:!1,help:"Override confirm button label (default: Start research)"}],columns:["status","url"],func:async(t,e)=>{const{prompt:n,timeout:i}=e;if(!Number.isInteger(i)||i<1)throw new y("--timeout must be a positive integer (seconds)");const p=Math.min(Math.max(i,6),20);await O(t);const o=L(e.tool,C),m=L(e.confirm,E);if(!await w(t,o))return[{status:"tool-not-found",url:await s(t)}];let c=await G(t);await M(t,n);let l=await S(t,c,p);if(!l){await w(t,o);c=await G(t);await M(t,n);l=await S(t,c,p)}if(!l)return[{status:"submit-not-found",url:await s(t)}];const A=await h(t,m,i);let r=await s(t);if(A&&!b(r))return[{status:"started",url:r}];{if(b(r)){await w(t,o);const d=await h(t,m,i);r=await s(t);if(d&&!b(r))return[{status:"started",url:r}]}let a=await R(t),{isResearching:u,waitingForStart:f}=_(a);if(!u&&f){const d=Array.from(new Set([...m,...E]));if(await h(t,d,Math.min(i,8))){r=await s(t);a=await R(t);({isResearching:u,waitingForStart:f}=_(a))}}if(u&&!f)return[{status:"started",url:r}];return[{status:"confirm-not-found",url:r}]}}});
|