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
package/clis/chatwise/model.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as s,Strategy as r}from"@jackwener/opencli/registry";import{selectorError as n}from"@jackwener/opencli/errors";export const modelCommand=s({site:"chatwise",name:"model",access:"read",description:"Get or switch the active AI model in ChatWise",domain:"localhost",strategy:r.UI,browser:!0,args:[{name:"model-name",required:!1,positional:!0,help:"Model to switch to (e.g. gpt-4, claude-3)"}],columns:["Status","Model"],func:async(e,o)=>{const t=o["model-name"];if(!t)return[{Status:"Active",Model:await e.evaluate(`
|
|
2
2
|
(function() {
|
|
3
3
|
// ChatWise is a multi-LLM client, it typically shows the model name in a dropdown or header
|
|
4
4
|
const selectors = [
|
|
@@ -20,7 +20,7 @@ import{cli as v,Strategy as x}from"@jackwener/opencli/registry";import{selectorE
|
|
|
20
20
|
|
|
21
21
|
return 'Unknown or Not Found';
|
|
22
22
|
})()
|
|
23
|
-
`)}];else{if(!await
|
|
23
|
+
`)}];else{if(!await e.evaluate(`
|
|
24
24
|
(function(target) {
|
|
25
25
|
const selectors = [
|
|
26
26
|
'[class*="model"]',
|
|
@@ -33,8 +33,8 @@ import{cli as v,Strategy as x}from"@jackwener/opencli/registry";import{selectorE
|
|
|
33
33
|
if (el) { el.click(); return true; }
|
|
34
34
|
}
|
|
35
35
|
return false;
|
|
36
|
-
})(${JSON.stringify(
|
|
37
|
-
`))throw
|
|
36
|
+
})(${JSON.stringify(t)})
|
|
37
|
+
`))throw n("ChatWise model selector");await e.wait(0.5);return[{Status:await e.evaluate(`
|
|
38
38
|
(function(target) {
|
|
39
39
|
const options = document.querySelectorAll('[role="option"], [role="menuitem"], [class*="dropdown-item"], li');
|
|
40
40
|
for (const opt of options) {
|
|
@@ -44,5 +44,5 @@ import{cli as v,Strategy as x}from"@jackwener/opencli/registry";import{selectorE
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
return false;
|
|
47
|
-
})(${JSON.stringify(
|
|
48
|
-
`)?"Switched":"Dropdown opened but model not found",Model:
|
|
47
|
+
})(${JSON.stringify(t)})
|
|
48
|
+
`)?"Switched":"Dropdown opened but model not found",Model:t}]}}});
|
package/clis/chess/analyze.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as n,Strategy as m}from"@jackwener/opencli/registry";import{CommandExecutionError as
|
|
1
|
+
import{cli as n,Strategy as m}from"@jackwener/opencli/registry";import{CommandExecutionError as i}from"@jackwener/opencli/errors";import{parseGameUrl as l}from"./utils.js";n({site:"chess",name:"analyze",access:"read",description:"Open a Chess.com game in the browser analysis board",domain:"www.chess.com",strategy:m.UI,browser:!0,navigateBefore:!1,args:[{name:"game-url",type:"string",required:!0,positional:!0,help:"Full game URL, e.g. https://www.chess.com/game/live/168842570216"}],columns:["kind","game_id","analysis_url"],func:async(e,t)=>{if(!e)throw new i("Browser session required for chess analyze");const{kind:s,id:a}=l(t["game-url"]),r=`https://www.chess.com/analysis/game/${s}/${a}`;try{await e.goto(r);await e.wait(2)}catch(o){throw new i(`Failed to open Chess.com analysis board: ${o?.message||o}`)}return[{kind:s,game_id:a,analysis_url:r}]}});
|
package/clis/chess/game.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as k,Strategy as C}from"@jackwener/opencli/registry";import{CommandExecutionError as n,EmptyResultError as _}from"@jackwener/opencli/errors";import{UA as
|
|
1
|
+
import{cli as k,Strategy as C}from"@jackwener/opencli/registry";import{CommandExecutionError as n,EmptyResultError as _}from"@jackwener/opencli/errors";import{UA as E,formatDate as O,isPlainObject as h,parseGameUrl as b}from"./utils.js";const T="https://www.chess.com/callback";function r(t){return typeof t==="string"?t:""}function u(t){return typeof t==="string"||typeof t==="number"||typeof t==="boolean"?t:""}export function summarizeGame({kind:t,id:l,payload:a}){if(!h(a)||!h(a.game))throw new n("Chess.com callback returned no game payload");const e=a.game;if(e.pgnHeaders!==void 0&&!h(e.pgnHeaders))throw new n("Chess.com callback returned malformed PGN headers");if(a.players!==void 0&&!h(a.players))throw new n("Chess.com callback returned malformed player metadata");const o=a.players||{},i={};for(const y of["top","bottom"]){const m=o[y];if(m!==void 0&&!h(m))throw new n("Chess.com callback returned malformed player metadata");if(m?.color)i[m.color]=m}const c=i.white||{},d=i.black||{},s=e.pgnHeaders||{},w=r(c.username)||r(s.White),f=r(d.username)||r(s.Black),g=r(s.Result);if(!w||!f||!g)throw new n("Chess.com callback payload is missing stable game summary fields");const p=r(s.Date);return{kind:t,game_id:l,date:p?p.replace(/\./g,"-"):O(e.endTime),white:w,white_rating:u(c.rating)||u(s.WhiteElo),black:f,black_rating:u(d.rating)||u(s.BlackElo),result:g,winner_color:r(e.colorOfWinner),termination:r(s.Termination)||r(e.resultMessage),eco:r(s.ECO),time_control:r(s.TimeControl)||(typeof e.daysPerTurn==="number"?`${e.daysPerTurn}d/turn`:""),rated:e.isRated===!0,ply_count:e.plyCount??"",url:`https://www.chess.com/game/${t}/${l}`}}k({site:"chess",name:"game",access:"read",description:"Chess.com single-game detail (white, black, result, ECO, time control) by full game URL",domain:"www.chess.com",strategy:C.PUBLIC,browser:!1,args:[{name:"game-url",type:"string",required:!0,positional:!0,help:"Full game URL, e.g. https://www.chess.com/game/live/168842570216"}],columns:["kind","game_id","date","white","white_rating","black","black_rating","result","winner_color","termination","eco","time_control","rated","ply_count","url"],func:async(t)=>{const{kind:l,id:a}=b(t["game-url"]),e=`${T}/${l}/game/${a}`;let o;try{o=await fetch(e,{headers:{"User-Agent":E,accept:"application/json"}})}catch(c){throw new n(`Failed to fetch Chess.com callback ${e}: ${c?.message||c}`)}if(!o||typeof o!=="object")throw new n(`Chess.com callback returned an invalid response object for ${e}`);if(o.status===404)throw new _(`Chess.com has no ${l} game with id ${a}`);if(!o.ok)throw new n(`Chess.com callback returned HTTP ${o.status} for ${e}`);let i;try{i=await o.json()}catch(c){throw new n(`Chess.com callback returned malformed JSON for ${e}: ${c?.message||c}`)}return[summarizeGame({kind:l,id:a,payload:i})]}});export const __test__={parseGameUrl:b,summarizeGame};
|
package/clis/chess/games.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as f,Strategy as w}from"@jackwener/opencli/registry";import{ArgumentError as d,CommandExecutionError as i,EmptyResultError as h}from"@jackwener/opencli/errors";import{chessApi as l,validateUsername as _,mapGameRow as v}from"./utils.js";const o=100,p=6;function g(s){if(s===void 0||s===null||s==="")return 10;const e=Number(s);if(!Number.isInteger(e)||e<1||e>o)throw new d(`--limit must be an integer between 1 and ${o}`);return e}f({site:"chess",name:"games",access:"read",description:"Chess.com recent games for a player, newest first",domain:"api.chess.com",strategy:w.PUBLIC,browser:!1,args:[{name:"username",type:"string",required:!0,positional:!0,help:"Chess.com username"},{name:"limit",type:"int",default:10,help:`Number of recent games (1-${o})`}],columns:["date","time_class","rated","my_color","my_rating","my_result","opponent","opponent_rating","accuracy_white","accuracy_black","eco","opening_name","url"],func:async(s)=>{const e=_(s.username),n=g(s.limit),c=await l(`/player/${encodeURIComponent(e)}/games/archives`);if(!Array.isArray(c.archives))throw new i("Chess.com archives payload is missing archives array");const t=c.archives.slice().reverse();if(t.length===0)throw new h(`Chess.com has no game archives for ${e}`);const a=[];for(let r=0;r<t.length&&r<p&&a.length<n;r++){if(typeof t[r]!=="string"||!t[r].startsWith("https://api.chess.com/pub/player/"))throw new i("Chess.com archives payload contains an unexpected archive URL");const m=await l(t[r]);if(!Array.isArray(m.games))throw new i("Chess.com monthly archive payload is missing games array");const u=m.games.slice().reverse();for(const y of u){a.push(v(y,e));if(a.length>=n)break}}if(a.length===0)throw new h(`Chess.com has games archives for ${e} but no games in the most recent ${p} months`);return a.slice(0,n)}});export const __test__={parseLimit:g};
|
package/clis/chess/stats.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as n,Strategy as i}from"@jackwener/opencli/registry";import{EmptyResultError as o}from"@jackwener/opencli/errors";import{chessApi as c,validateUsername as m,summarizeStats as l}from"./utils.js";const d=["chess_rapid","chess_blitz","chess_bullet","chess_daily","chess960_daily","chess_daily_960"];n({site:"chess",name:"stats",access:"read",description:"Chess.com player ratings + win/loss record across game kinds",domain:"api.chess.com",strategy:i.PUBLIC,browser:!1,args:[{name:"username",type:"string",required:!0,positional:!0,help:"Chess.com username (case-insensitive)"}],columns:["kind","rating_current","rating_best","wins","losses","draws"],func:async(r)=>{const s=m(r.username),t=await c(`/player/${encodeURIComponent(s)}/stats`),e=d.map((a)=>l(t,a)).filter(Boolean);if(e.length===0)throw new o(`Chess.com returned no stats for ${s}`);return e}});
|
package/clis/chess/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as i,CommandExecutionError as o,EmptyResultError as p}from"@jackwener/opencli/errors";export const API_BASE="https://api.chess.com/pub",UA="Mozilla/5.0 (compatible; ppcli/1.0)";const u=/^[a-zA-Z0-9_-]{3,25}$/,f=/^https:\/\/www\.chess\.com\/game\/(live|daily)\/(\d+)/i;export function isPlainObject(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function c(e){return e===void 0||e===null||isPlainObject(e)}export function validateUsername(e){const r=String(e??"").trim().toLowerCase();if(!r)throw new i("<username> is required");if(!u.test(r))throw new i(`Invalid Chess.com username "${e}"`,"Usernames are 3-25 chars: a-z, 0-9, hyphen, underscore.");return r}export function parseGameUrl(e){const r=String(e??"").trim();if(!r)throw new i("<game-url> is required");const t=r.match(f);if(!t)throw new i(`Invalid Chess.com game URL: "${e}"`,"Expected https://www.chess.com/game/live/<id> or https://www.chess.com/game/daily/<id>.");return{kind:t[1].toLowerCase(),id:t[2]}}export async function chessApi(e,r=fetch){const t=e.startsWith("http")?e:`${API_BASE}${e}`;let s;try{s=await r(t,{headers:{"User-Agent":UA,accept:"application/json"}})}catch(n){throw new o(`Failed to fetch Chess.com API ${t}: ${n?.message||n}`)}if(!s||typeof s!=="object")throw new o(`Chess.com API returned an invalid response object for ${t}`);if(s.status===404)throw new p(`Chess.com returned 404 for ${t}`);if(!s.ok)throw new o(`Chess.com API returned HTTP ${s.status} for ${t}`);let a;try{a=await s.json()}catch(n){throw new o(`Chess.com API returned malformed JSON for ${t}: ${n?.message||n}`)}if(!isPlainObject(a))throw new o(`Chess.com API returned an unexpected payload shape for ${t}`);return a}export function summarizeStats(e,r){const t=e?.[r];if(!t)return null;if(!isPlainObject(t))throw new o(`Chess.com stats payload for ${r} is not an object`);if(!c(t.last))throw new o(`Chess.com stats payload for ${r}.last is not an object`);if(!c(t.best))throw new o(`Chess.com stats payload for ${r}.best is not an object`);if(!c(t.record))throw new o(`Chess.com stats payload for ${r}.record is not an object`);const s=isPlainObject(t.record)?t.record:{};return{kind:r.replace(/^chess_/,""),rating_current:t.last?.rating??"",rating_best:t.best?.rating??"",wins:s.win??"",losses:s.loss??"",draws:s.draw??""}}export function formatDate(e){if(!e||typeof e!=="number")return"";return new Date(e*1000).toISOString().slice(0,10)}export function openingName(e){if(typeof e!=="string"||!e.startsWith("http"))return"";const r=e.replace(/\/+$/,"").split("/").pop()||"";if(!r)return"";const t=r.match(/^([^.]+?)(?:-\d|\.\.\.|$)/);return(t?t[1]:r).replace(/-/g," ").trim()}export function mapGameRow(e,r){if(!isPlainObject(e))throw new o("Chess.com game archive entry is not an object");if(typeof e.url!=="string"||!/^https:\/\/www\.chess\.com\/game\/(?:live|daily)\/\d+(?:$|[/?#])/i.test(e.url))throw new o("Chess.com game archive entry is missing a stable game URL");const t=e?.white||{},s=e?.black||{};if(!isPlainObject(t)||!isPlainObject(s))throw new o("Chess.com game archive entry has malformed player objects");if(typeof t.username!=="string"||!t.username.trim()||typeof s.username!=="string"||!s.username.trim())throw new o("Chess.com game archive entry is missing stable player identities");const a=String(r||"").toLowerCase(),n=String(t.username||"").toLowerCase()===a,l=String(s.username||"").toLowerCase()===a;if(!n&&!l)throw new o("Chess.com game archive entry does not include the requested player");const m=n?t:s,h=n?s:t,w=e?.eco||"";return{date:formatDate(e?.end_time),time_class:e?.time_class||"",rated:e?.rated===!0,my_color:n?"white":"black",my_rating:m?.rating??"",my_result:m?.result||"",opponent:h?.username||"",opponent_rating:h?.rating??"",accuracy_white:typeof e?.accuracies?.white==="number"?e.accuracies.white:"",accuracy_black:typeof e?.accuracies?.black==="number"?e.accuracies.black:"",eco:w,opening_name:openingName(w),url:e?.url||""}}export const __test__={validateUsername,parseGameUrl,isPlainObject,isOptionalPlainObject:c,chessApi,summarizeStats,formatDate,mapGameRow,openingName};
|
package/clis/claude/ask.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as b,Strategy as v}from"@jackwener/opencli/registry";import{ArgumentError as w,CommandExecutionError as r,EmptyResultError as f}from"@jackwener/opencli/errors";import{CLAUDE_DOMAIN as S,CLAUDE_URL as g,COMPOSER_SELECTOR as A,MESSAGE_SELECTOR as M,ensureOnClaude as O,selectModel as x,setAdaptiveThinking as F,sendMessage as P,sendWithFile as q,getBubbleCount as k,waitForResponse as C,parseBoolFlag as E,withRetry as i,ensureClaudeComposer as _,requireNonEmptyPrompt as L,requirePositiveInt as N}from"./utils.js";export const askCommand=b({site:"claude",name:"ask",access:"write",description:"Send a prompt to Claude and get the response",domain:S,strategy:v.COOKIE,browser:!0,siteSession:"persistent",navigateBefore:!1,args:[{name:"prompt",fromFile:"prompt-file",positional:!0,required:!0,help:"Prompt to send"},{name:"timeout",type:"int",default:120,help:"Max seconds to wait for response"},{name:"new",type:"boolean",default:!1,help:"Start a new chat before sending"},{name:"model",default:"sonnet",choices:["sonnet","opus","haiku"],help:"Model to use: sonnet, opus, or haiku"},{name:"think",type:"boolean",default:!1,help:"Enable Adaptive thinking"},{name:"file",help:"Attach a file (image, PDF, text) with the prompt"}],columns:["response"],func:async(e,t)=>{const a=L(t.prompt,"claude ask"),l=N(Number(t.timeout??120),"claude ask --timeout",'Example: ppcli claude ask "hello" --timeout 120'),u=l*1000,c=E(t.think);if(E(t.new)){await e.goto(g);try{await e.wait({selector:A,timeout:8})}catch{}}else if(await O(e)){await e.evaluate(`(() => {
|
|
2
2
|
var link = document.querySelector('a[href*="/chat/"]');
|
|
3
3
|
if (link) link.click();
|
|
4
|
-
})()`);try{await
|
|
4
|
+
})()`);try{await e.wait({selector:M,timeout:5})}catch{}}await i(()=>_(e,"Claude ask requires a visible composer on the current page."));const d=(await e.evaluate("window.location.href")||"").includes("/chat/"),R=t.__opencliOptionSources?.model==="cli",s=t.model||"sonnet";if(d&&R)throw new w(`Cannot switch to ${s} model inside an existing conversation.`,"Re-run with --new to start a fresh chat before selecting a model.");if(!d){const n=await i(()=>x(e,s));if(!n?.ok){if(n?.upgrade)throw new w(`${s} model requires a paid Claude plan.`,"Pick --model sonnet or --model haiku, or upgrade your account.");throw new r(`Could not switch to ${s} model`)}}if(!(await i(()=>F(e,c)))?.ok&&c)throw new r("Could not enable Adaptive thinking");if(t.file){const n=await i(()=>k(e));try{const o=await q(e,t.file,a);if(o&&!o.ok)throw new r(o.reason||"Failed to attach file")}catch(o){if(!String(o?.message||o).includes("Promise was collected"))throw o}const p=await C(e,n,a,u);if(!p)throw new f("claude ask",`No Claude response appeared within ${l}s. Re-run with a higher --timeout if the model is still generating.`);return[{response:p}]}const y=await i(()=>k(e)),m=await i(()=>P(e,a));if(!m?.ok)throw new r(m?.reason||"Failed to send message");const h=await C(e,y,a,u);if(!h)throw new f("claude ask",`No Claude response appeared within ${l}s. Re-run with a higher --timeout if the model is still generating.`);return[{response:h}]}});
|
package/clis/claude/detail.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as i,Strategy as r}from"@jackwener/opencli/registry";import{EmptyResultError as o}from"@jackwener/opencli/errors";import{CLAUDE_DOMAIN as n,MESSAGE_SELECTOR as d,getVisibleMessages as l,ensureClaudeLogin as u,requireConversationId as c}from"./utils.js";export const detailCommand=i({site:"claude",name:"detail",access:"read",description:"Open a Claude conversation by ID and read its messages",domain:n,strategy:r.COOKIE,browser:!0,siteSession:"persistent",navigateBefore:!1,args:[{name:"id",positional:!0,required:!0,help:"Conversation ID (UUID from /chat/<id>)"}],columns:["Index","Role","Text"],func:async(e,s)=>{const t=c(s.id);await e.goto(`https://claude.ai/chat/${t}`);try{await e.wait({selector:d,timeout:10})}catch{}await u(e,"Claude detail requires a logged-in Claude session.");const a=await l(e);if(a.length>0)return a;throw new o("claude detail",`No visible Claude messages were found for conversation ${t}.`)}});
|
package/clis/claude/new.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as t,Strategy as a}from"@jackwener/opencli/registry";import{CLAUDE_DOMAIN as s,CLAUDE_URL as r,COMPOSER_SELECTOR as o,ensureClaudeComposer as i}from"./utils.js";export const newCommand=t({site:"claude",name:"new",access:"read",description:"Start a new conversation in Claude",domain:s,strategy:a.COOKIE,browser:!0,siteSession:"persistent",navigateBefore:!1,args:[],columns:["Status"],func:async(e)=>{await e.goto(r);try{await e.wait({selector:o,timeout:8})}catch{}await i(e,"Claude new requires a logged-in Claude session with a visible composer.");return[{Status:"New chat started"}]}});
|
package/clis/claude/read.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as s,Strategy as a}from"@jackwener/opencli/registry";import{EmptyResultError as t}from"@jackwener/opencli/errors";import{CLAUDE_DOMAIN as n,ensureOnClaude as o,getVisibleMessages as i,ensureClaudeLogin as d}from"./utils.js";export const readCommand=s({site:"claude",name:"read",access:"read",description:"Read the current Claude conversation",domain:n,strategy:a.COOKIE,browser:!0,siteSession:"persistent",navigateBefore:!1,args:[],columns:["Index","Role","Text"],func:async(e)=>{await o(e);await d(e,"Claude read requires a logged-in Claude session.");const r=await i(e);if(r.length>0)return r;throw new t("claude read","No visible Claude messages were found in the current conversation.")}});
|
package/clis/claude/send.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as n,Strategy as a}from"@jackwener/opencli/registry";import{CommandExecutionError as i}from"@jackwener/opencli/errors";import{CLAUDE_DOMAIN as m,CLAUDE_URL as u,COMPOSER_SELECTOR as d,ensureOnClaude as c,sendMessage as l,parseBoolFlag as p,withRetry as s,ensureClaudeComposer as w,requireNonEmptyPrompt as f}from"./utils.js";export const sendCommand=n({site:"claude",name:"send",access:"write",description:"Send a prompt to Claude without waiting for the response",domain:m,strategy:a.COOKIE,browser:!0,siteSession:"persistent",navigateBefore:!1,args:[{name:"prompt",fromFile:!0,positional:!0,required:!0,help:"Prompt to send"},{name:"new",type:"boolean",default:!1,help:"Start a new chat before sending"}],columns:["Status","SubmittedBy","InjectedText"],func:async(e,o)=>{const r=f(o.prompt,"claude send");if(p(o.new)){await e.goto(u);try{await e.wait({selector:d,timeout:8})}catch{}}else await c(e);await s(()=>w(e,"Claude send requires a visible composer on the current page."));const t=await s(()=>l(e,r));if(!t?.ok)throw new i(t?.reason||"Failed to send message");return[{Status:"Success",SubmittedBy:t.method||"send-button",InjectedText:r}]}});
|
package/clis/claude/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as f,AuthRequiredError as p,CommandExecutionError as h}from"@jackwener/opencli/errors";export const CLAUDE_DOMAIN="claude.ai",CLAUDE_URL="https://claude.ai/new",COMPOSER_SELECTOR='[data-testid="chat-input"]',MESSAGE_SELECTOR=".font-claude-response",MODEL_DROPDOWN_SELECTOR='[data-testid="model-selector-dropdown"]';const m={sonnet:"Sonnet 4.6",opus:"Opus 4.7",haiku:"Haiku 4.5"};export async function isOnClaude(e){const t=await e.evaluate("window.location.href").catch(()=>"");if(typeof t!=="string"||!t)return!1;try{const r=new URL(t).hostname;return r===CLAUDE_DOMAIN||r.endsWith(`.${CLAUDE_DOMAIN}`)}catch{return!1}}export async function ensureOnClaude(e){if(await isOnClaude(e))return!1;await e.goto(CLAUDE_URL);try{await e.wait({selector:COMPOSER_SELECTOR,timeout:8})}catch{}return!0}export async function getPageState(e){return e.evaluate(`(() => {
|
|
2
2
|
var composer = document.querySelector('${COMPOSER_SELECTOR}');
|
|
3
3
|
var userMenu = document.querySelector('[data-testid="user-menu-button"]');
|
|
4
4
|
return {
|
|
@@ -7,7 +7,7 @@ import{ArgumentError as Y,AuthRequiredError as F,CommandExecutionError as W}from
|
|
|
7
7
|
hasComposer: !!composer,
|
|
8
8
|
isLoggedIn: !!userMenu,
|
|
9
9
|
};
|
|
10
|
-
})()`)}export async function ensureClaudeLogin(
|
|
10
|
+
})()`)}export async function ensureClaudeLogin(e,t="Claude requires a logged-in browser session."){const r=await getPageState(e);if(!r.isLoggedIn)throw new p(CLAUDE_DOMAIN,t);return r}export async function ensureClaudeComposer(e,t="Claude composer is not available on the current page."){const r=await ensureClaudeLogin(e,t);if(!r.hasComposer)throw new h(t);return r}export function requireNonEmptyPrompt(e,t){const r=String(e??"").trim();if(!r)throw new f(`${t} prompt cannot be empty`,`Example: ppcli ${t} "hello"`);return r}export function requirePositiveInt(e,t,r){if(!Number.isInteger(e)||e<1)throw new f(`${t} must be a positive integer`,r);return e}export function requireConversationId(e){const t=String(e??"").trim();if(!t)throw new f("claude detail requires a conversation id","Example: ppcli claude detail 123e4567-e89b-12d3-a456-426614174000");return t}export async function getVisibleMessages(e){const t=await e.evaluate(`(() => {
|
|
11
11
|
var nodes = document.querySelectorAll('[data-testid="user-message"], ${MESSAGE_SELECTOR}');
|
|
12
12
|
var rows = [];
|
|
13
13
|
Array.from(nodes).forEach(function(el) {
|
|
@@ -21,7 +21,7 @@ import{ArgumentError as Y,AuthRequiredError as F,CommandExecutionError as W}from
|
|
|
21
21
|
if (raw) rows.push({ role: isUser ? 'user' : 'assistant', text: raw });
|
|
22
22
|
});
|
|
23
23
|
return rows;
|
|
24
|
-
})()`);if(!Array.isArray(
|
|
24
|
+
})()`);if(!Array.isArray(t))return[];return t.map(function(r,n){return{Index:n,Role:r.role,Text:r.text}})}export async function getConversationList(e){if(!await isOnClaude(e)||!(await e.evaluate("window.location.href")||"").includes("/recents")){await e.goto("https://claude.ai/recents");try{await e.wait({selector:'a[href*="/chat/"]',timeout:8})}catch{}}const t=await e.evaluate(`(() => {
|
|
25
25
|
var links = Array.from(document.querySelectorAll('a[href*="/chat/"]'));
|
|
26
26
|
return links.map(function(link, i) {
|
|
27
27
|
var href = link.getAttribute('href') || '';
|
|
@@ -33,18 +33,18 @@ import{ArgumentError as Y,AuthRequiredError as F,CommandExecutionError as W}from
|
|
|
33
33
|
Url: href.startsWith('http') ? href : ('https://claude.ai' + href),
|
|
34
34
|
};
|
|
35
35
|
});
|
|
36
|
-
})()`);return Array.isArray(
|
|
36
|
+
})()`);return Array.isArray(t)?t:[]}export async function selectModel(e,t){const r=m[String(t).toLowerCase()];if(!r)return{ok:!1};const n=await e.evaluate(`(() => {
|
|
37
37
|
var trigger = document.querySelector('${MODEL_DROPDOWN_SELECTOR}');
|
|
38
38
|
if (!trigger) return { ok: false };
|
|
39
39
|
var label = trigger.getAttribute('aria-label') || '';
|
|
40
|
-
if (label.indexOf(${JSON.stringify(
|
|
40
|
+
if (label.indexOf(${JSON.stringify(r)}) >= 0) {
|
|
41
41
|
return { ok: true, toggled: false };
|
|
42
42
|
}
|
|
43
43
|
trigger.click();
|
|
44
44
|
return { ok: true, opened: true };
|
|
45
|
-
})()`);if(!
|
|
45
|
+
})()`);if(!n?.ok)return n;if(!n.opened)return n;try{await e.wait({selector:'div[role="menuitemradio"]',timeout:3})}catch{}return e.evaluate(`(() => {
|
|
46
46
|
var items = Array.from(document.querySelectorAll('div[role="menuitemradio"]'));
|
|
47
|
-
var target = items.find(function(el) { return (el.innerText || '').indexOf(${JSON.stringify(
|
|
47
|
+
var target = items.find(function(el) { return (el.innerText || '').indexOf(${JSON.stringify(r)}) >= 0; });
|
|
48
48
|
if (!target) return { ok: false };
|
|
49
49
|
// Free-tier locked options carry an inline "Upgrade" button next to the label.
|
|
50
50
|
var upgrade = target.querySelector('button');
|
|
@@ -56,12 +56,12 @@ import{ArgumentError as Y,AuthRequiredError as F,CommandExecutionError as W}from
|
|
|
56
56
|
if (!alreadySelected) target.click();
|
|
57
57
|
else document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
|
58
58
|
return { ok: true, toggled: !alreadySelected };
|
|
59
|
-
})()`)}export async function setAdaptiveThinking(
|
|
59
|
+
})()`)}export async function setAdaptiveThinking(e,t){if(!(await e.evaluate(`(() => {
|
|
60
60
|
var trigger = document.querySelector('${MODEL_DROPDOWN_SELECTOR}');
|
|
61
61
|
if (!trigger) return { ok: false };
|
|
62
62
|
trigger.click();
|
|
63
63
|
return { ok: true };
|
|
64
|
-
})()`))?.ok)return{ok:!1};try{await
|
|
64
|
+
})()`))?.ok)return{ok:!1};try{await e.wait({selector:'div[role="menuitem"]',timeout:3})}catch{}return e.evaluate(`(() => {
|
|
65
65
|
var items = Array.from(document.querySelectorAll('div[role="menuitem"]'));
|
|
66
66
|
var target = items.find(function(el) { return (el.innerText || '').indexOf('Adaptive thinking') >= 0; });
|
|
67
67
|
if (!target) {
|
|
@@ -69,10 +69,10 @@ import{ArgumentError as Y,AuthRequiredError as F,CommandExecutionError as W}from
|
|
|
69
69
|
return { ok: false };
|
|
70
70
|
}
|
|
71
71
|
var isActive = target.getAttribute('aria-checked') === 'true';
|
|
72
|
-
if (${
|
|
72
|
+
if (${t} !== isActive) target.click();
|
|
73
73
|
else document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
|
74
|
-
return { ok: true, toggled: ${
|
|
75
|
-
})()`)}export async function sendMessage(
|
|
74
|
+
return { ok: true, toggled: ${t} !== isActive };
|
|
75
|
+
})()`)}export async function sendMessage(e,t){const r=JSON.stringify(t);if(!await e.evaluate(`(() => {
|
|
76
76
|
var box = document.querySelector('${COMPOSER_SELECTOR}');
|
|
77
77
|
if (!box) return false;
|
|
78
78
|
box.focus();
|
|
@@ -85,12 +85,12 @@ import{ArgumentError as Y,AuthRequiredError as F,CommandExecutionError as W}from
|
|
|
85
85
|
sel.addRange(range);
|
|
86
86
|
document.execCommand('delete', false);
|
|
87
87
|
return true;
|
|
88
|
-
})()`))return{ok:!1,reason:"composer not found"};let
|
|
88
|
+
})()`))return{ok:!1,reason:"composer not found"};let o=!1;if(e.nativeType)try{await e.nativeType(t);o=!0}catch(a){const i=String(a?.message||a);if(!i.includes("Unknown action")&&!i.includes("not supported"))throw a}if(!o)await e.evaluate(`(() => {
|
|
89
89
|
var box = document.querySelector('${COMPOSER_SELECTOR}');
|
|
90
90
|
if (!box) return;
|
|
91
91
|
box.focus();
|
|
92
|
-
document.execCommand('insertText', false, ${
|
|
93
|
-
})()`);await
|
|
92
|
+
document.execCommand('insertText', false, ${r});
|
|
93
|
+
})()`);await e.wait(1.2);return e.evaluate(`(() => {
|
|
94
94
|
var ariaCandidates = [
|
|
95
95
|
'button[aria-label="Send Message"]',
|
|
96
96
|
'button[aria-label="Send message"]',
|
|
@@ -117,9 +117,9 @@ import{ArgumentError as Y,AuthRequiredError as F,CommandExecutionError as W}from
|
|
|
117
117
|
return { ok: true, method: 'enter' };
|
|
118
118
|
}
|
|
119
119
|
return { ok: false, reason: 'send button not found' };
|
|
120
|
-
})()`)}export async function getBubbleCount(
|
|
120
|
+
})()`)}export async function getBubbleCount(e){return await e.evaluate(`(() => {
|
|
121
121
|
return document.querySelectorAll('${MESSAGE_SELECTOR}').length;
|
|
122
|
-
})()`)||0}export async function waitForResponse(
|
|
122
|
+
})()`)||0}export async function waitForResponse(e,t,r,n){const o=Date.now();let a="",i=0;while(Date.now()-o<n){await e.wait(3);let u;try{u=await e.evaluate(`(() => {
|
|
123
123
|
var bubbles = document.querySelectorAll('${MESSAGE_SELECTOR}');
|
|
124
124
|
// Adaptive thinking renders "Thought process" labels at the top
|
|
125
125
|
// of the response (often duplicated for the expand/collapse widget).
|
|
@@ -139,14 +139,14 @@ import{ArgumentError as Y,AuthRequiredError as F,CommandExecutionError as W}from
|
|
|
139
139
|
last: texts[texts.length - 1] || '',
|
|
140
140
|
streaming: !!document.querySelector('[data-is-streaming="true"]'),
|
|
141
141
|
};
|
|
142
|
-
})()`)}catch{continue}if(
|
|
142
|
+
})()`)}catch{continue}if(!u)continue;const s=u.last;if(!s||s===r.trim())continue;if(u.count<=t)continue;if(u.streaming){a=s;i=0;continue}if(s===a){i++;if(i>=3)return s}else{i=0;a=s}}return a||null}async function b(e,t){for(let r=0;r<12;r++){await e.wait(1);if(await e.evaluate(`(() => {
|
|
143
143
|
// Claude renders attachments as data-testid="file-thumbnail" cards with
|
|
144
144
|
// a sibling Remove button. Either signal indicates the file took.
|
|
145
145
|
if (document.querySelector('[data-testid="file-thumbnail"]')) return true;
|
|
146
146
|
var removeBtn = Array.from(document.querySelectorAll('button'))
|
|
147
147
|
.find(function(b) { return (b.getAttribute('aria-label') || '') === 'Remove'; });
|
|
148
148
|
return !!removeBtn;
|
|
149
|
-
})()`))return!0}return!1}export async function sendWithFile(
|
|
149
|
+
})()`))return!0}return!1}export async function sendWithFile(e,t,r){const n=await import("node:fs"),o=await import("node:path"),a=o.default.resolve(t);if(!n.default.existsSync(a))return{ok:!1,reason:`File not found: ${a}`};const i=n.default.statSync(a);if(i.size>31457280)return{ok:!1,reason:`File too large (${(i.size/1024/1024).toFixed(1)} MB). Max: 30 MB`};const u=o.default.basename(a);let s=!1;if(e.setFileInput)try{await e.setFileInput([a],'input[data-testid="file-upload"]');const l=await e.evaluate(`(() => {
|
|
150
150
|
var inp = document.querySelector('input[data-testid="file-upload"]');
|
|
151
151
|
if (!inp) return { ok: false, reason: 'file input not found' };
|
|
152
152
|
var propsKey = Object.keys(inp).find(function(k) { return k.startsWith('__reactProps$'); });
|
|
@@ -156,12 +156,12 @@ import{ArgumentError as Y,AuthRequiredError as F,CommandExecutionError as W}from
|
|
|
156
156
|
}
|
|
157
157
|
inp.dispatchEvent(new Event('change', { bubbles: true }));
|
|
158
158
|
return { ok: true, via: 'native' };
|
|
159
|
-
})()`);if(!
|
|
160
|
-
var binary = atob('${
|
|
159
|
+
})()`);if(!l?.ok)return l;s=!0}catch(l){const c=String(l?.message||l);if(!c.includes("Unknown action")&&!c.includes("not supported")&&!c.includes("Not allowed")&&!c.includes("File access not granted"))throw l}if(!s){const c=n.default.readFileSync(a).toString("base64"),d=await e.evaluate(`(async () => {
|
|
160
|
+
var binary = atob('${c}');
|
|
161
161
|
var bytes = new Uint8Array(binary.length);
|
|
162
162
|
for (var i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
|
163
163
|
|
|
164
|
-
var file = new File([bytes], ${JSON.stringify(
|
|
164
|
+
var file = new File([bytes], ${JSON.stringify(u)});
|
|
165
165
|
var dt = new DataTransfer();
|
|
166
166
|
dt.items.add(file);
|
|
167
167
|
|
|
@@ -176,4 +176,4 @@ import{ArgumentError as Y,AuthRequiredError as F,CommandExecutionError as W}from
|
|
|
176
176
|
inp.files = dt.files;
|
|
177
177
|
inp[propsKey].onChange({ target: { files: inp.files } });
|
|
178
178
|
return { ok: true };
|
|
179
|
-
})()`);if(
|
|
179
|
+
})()`);if(d&&!d.ok)return d}if(!await b(e,u))return{ok:!1,reason:"file preview did not appear"};return sendMessage(e,r)}export async function withRetry(e,t=2){for(let r=0;r<=t;r++)try{return await e()}catch(n){const o=String(n?.message||n);if(r<t&&o.includes("Promise was collected")){await new Promise((a)=>setTimeout(a,2000));continue}throw n}}export function parseBoolFlag(e){if(typeof e==="boolean")return e;return String(e??"").trim().toLowerCase()==="true"}
|
package/clis/cnblogs/article.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CliError as
|
|
1
|
+
import{CliError as c,CommandExecutionError as T}from"@jackwener/opencli/errors";import{cli as I,Strategy as N}from"@jackwener/opencli/registry";import{publishArticle as x}from"../_shared/article/publish.js";export const cnblogsProfile={home:"https://i.cnblogs.com/posts/edit",outputFormat:"markdown",image:{uploadFn:async(a,t)=>{const e=t.cookie("XSRF-TOKEN");if(!e)throw Error("未找到 XSRF-TOKEN cookie,请确认已登录博客园");const r=await fetch(a,{credentials:"omit"});if(!r.ok)throw Error("图片下载失败: "+a+"(HTTP "+r.status+")");const l=await r.blob(),s=new FormData;s.append("image",l,"image.png");s.append("app","blog");s.append("uploadType","Select");const i=await fetch("https://upload.cnblogs.com/v2/images/cors-upload",{method:"POST",credentials:"include",headers:{"x-xsrf-token":e},body:s}),n=await i.text();if(!i.ok)throw Error("图片上传失败: HTTP "+i.status+" "+n.slice(0,150));let o=null;try{o=JSON.parse(n)}catch(d){}if(!o)throw Error("图片上传失败: 响应不是 JSON - "+n.slice(0,100));const u=o.data||o.url||o.imageUrl||o.src;if(!u||typeof u!=="string")throw Error("图片上传失败: 无法解析图片 URL - "+JSON.stringify(o).slice(0,150));return{url:u}},skip:["cnblogs.com"]},publish:async(a,t)=>{const e=t.cookie("XSRF-TOKEN");if(!e)return{ok:!1,stage:"auth",status:401,message:"未找到 XSRF-TOKEN cookie,请确认已登录博客园并在 i.cnblogs.com 下访问过"};const r={"Content-Type":"application/json","x-xsrf-token":e},l={id:null,postType:2,accessPermission:0,title:a.title,url:null,postBody:a.content,categoryIds:null,categories:null,collectionIds:[],inSiteCandidate:!1,inSiteHome:!1,siteCategoryId:null,blogTeamIds:null,isPublished:!1,displayOnHomePage:!1,isAllowComments:!0,includeInMainSyndication:!1,isPinned:!1,showBodyWhenPinned:!1,isOnlyForRegisterUser:!1,isUpdateDateAdded:!1,entryName:null,description:null,featuredImage:null,tags:null,password:null,publishAt:null,datePublished:new Date().toISOString(),dateUpdated:null,isMarkdown:!0,isDraft:!0,autoDesc:null,changePostType:!1,blogId:0,author:null,removeScript:!1,clientInfo:null,changeCreatedTime:!1,canChangeCreatedTime:!1,isContributeToImpressiveBugActivity:!1,usingEditorId:5,sourceUrl:null},s=await fetch("https://i.cnblogs.com/api/posts",{method:"POST",credentials:"include",headers:r,body:JSON.stringify(l)}),i=await s.text();if(!s.ok)return{ok:!1,stage:"create",status:s.status,message:i.slice(0,300)};let n=null;try{n=JSON.parse(i)}catch(y){}if(!n||!n.id)return{ok:!1,stage:"create",status:s.status,message:"创建草稿失败: "+i.slice(0,300)};const o=String(n.id),u="https://i.cnblogs.com/articles/edit;postId="+o;if(a.draftOnly)return{ok:!0,draft:!0,id:o,url:u};const d=await fetch("https://i.cnblogs.com/api/articles/"+o,{credentials:"include",headers:r}),g=await d.text();let p=null;try{p=JSON.parse(g)}catch(y){}const f=p&&p.blogPost;if(!d.ok||!f)return{ok:!1,stage:"publish",status:d.status,message:"读取草稿完整对象失败: "+g.slice(0,300),id:o};f.isPublished=!0;f.isDraft=!1;const h=await fetch("https://i.cnblogs.com/api/posts",{method:"POST",credentials:"include",headers:r,body:JSON.stringify(f)}),w=await h.text();if(!h.ok)return{ok:!1,stage:"publish",status:h.status,message:w.slice(0,300),id:o};let m=null;try{m=JSON.parse(w)}catch(y){}const b=m&&m.url||u;return{ok:!0,draft:!1,id:o,url:b}}},cnblogsAuthProfile={home:"https://home.cnblogs.com",checkAuth:async(a)=>{try{const t=await fetch("https://home.cnblogs.com/user/CurrentUserInfo",{method:"GET",credentials:"include"});if(!t.ok)return{isAuthenticated:!1,error:"HTTP "+t.status};const e=await t.text(),r=e.match(/href="\/u\/([^/]+)\/"/),l=e.match(/<img[^>]+class="pfs"[^>]+src="([^"]+)"/);if(!r)return{isAuthenticated:!1};const s=r[1];return{isAuthenticated:!0,userId:s,username:s,avatar:l?l[1]:""}}catch(t){return{isAuthenticated:!1,error:String(t&&t.message||t)}}}};function P(a){if(!a.execute)throw new c("INVALID_INPUT","此命令需要 --execute 参数才会实际写入博客园。注意:本报错仅表示缺少 --execute,并未校验其余参数,不能当 dry-run 预览用")}async function S(a){const t=typeof a.text==="string"?a.text:void 0,e=typeof a.file==="string"?a.file:void 0;if(t&&e)throw new c("INVALID_INPUT","不能同时使用 <text> 和 --file,选其一即可");let r=t??"";if(e){const{readFile:l,stat:s}=await import("node:fs/promises");let i;try{i=await s(e)}catch{throw new c("INVALID_INPUT","文件不存在: "+e)}if(!i.isFile())throw new c("INVALID_INPUT","必须是可读文本文件: "+e);let n;try{n=await l(e)}catch{throw new c("INVALID_INPUT","文件读取失败: "+e)}try{r=new TextDecoder("utf-8",{fatal:!0}).decode(n)}catch{throw new c("INVALID_INPUT","文件不是有效 UTF-8 编码: "+e)}}if(!r.trim())throw new c("INVALID_INPUT","正文不能为空");return r}function k(a,t,e,r,l={}){return[{status:"success",outcome:r,message:a,target_type:t,target:e,...l}]}I({site:"cnblogs",name:"article",access:"write",description:"发布博客园文章(Markdown)。正文默认 Markdown;图片自动转存到博客园图床。",domain:"cnblogs.com",strategy:N.COOKIE,browser:!0,args:[{name:"title",positional:!0,required:!0,help:"文章标题"},{name:"text",positional:!0,help:"文章正文(Markdown,默认;--html 时按 HTML 处理)"},{name:"file",help:"从文件读取正文(UTF-8,Markdown 默认)"},{name:"html",type:"boolean",help:"将正文当作原始 HTML 而非 Markdown"},{name:"draft",type:"boolean",help:"仅保存草稿,不发布"},{name:"execute",type:"boolean",help:"实际执行写入。不加此参数命令拒绝写入。"}],columns:["status","outcome","message","target_type","target","created_target","created_url"],func:async(a,t)=>{if(!a)throw new T("博客园文章发布需要浏览器会话");P(t);const e=String(t.title??"").trim();if(!e)throw new c("INVALID_INPUT","文章标题不能为空");const r=await S(t),l=Boolean(t.draft),s=await x(a,{title:e,body:r,format:t.html?"html":"markdown",draftOnly:l,profile:cnblogsProfile}),i=s.images.uploaded.length|0,n=s.images.failed.length|0;let o=s.draft?"已保存博客园草稿":"已发布博客园文章";if(i||n)o+="·图片: "+i+" 张已转存"+(n?","+n+" 张失败":"");return k(o,"article","",s.draft?"draft":"created",{created_target:"article:"+s.id,created_url:s.url})}});
|
package/clis/cnblogs/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerArticleLogin as
|
|
1
|
+
import{registerArticleLogin as i}from"../_shared/article/login.js";import{cnblogsAuthProfile as o}from"./article.js";i({site:"cnblogs",domain:"cnblogs.com",profile:{home:o.home,checkAuth:o.checkAuth},loginDescription:"打开博客园登录页并等待浏览器完成登录(供桌面客户端引导登录)。"});
|
package/clis/cnblogs/stats.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as p,Strategy as f}from"@jackwener/opencli/registry";import{CliError as d,CommandExecutionError as c,EmptyResultError as m}from"@jackwener/opencli/errors";const y=10;async function g(i,o){const a=await i.evaluate(`(async () => {
|
|
2
2
|
if (location.href.includes('account.cnblogs.com')) {
|
|
3
3
|
return JSON.stringify({ authFail: true, reason: 'redirected_to_login' });
|
|
4
4
|
}
|
|
@@ -20,18 +20,18 @@ import{cli as Q,Strategy as U}from"@jackwener/opencli/registry";import{CliError
|
|
|
20
20
|
// 越界时博客园会回卷到第 1 页:pageIndex 与请求页不符即停止。
|
|
21
21
|
if (json.pageIndex !== p || items.length === 0) break;
|
|
22
22
|
for (const it of items) all.push(it);
|
|
23
|
-
if (all.length >= ${Number(
|
|
24
|
-
if (items.length < ${
|
|
23
|
+
if (all.length >= ${Number(o)} * 2) break;
|
|
24
|
+
if (items.length < ${y}) break;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
return JSON.stringify({ items: all });
|
|
28
|
-
})()`);let
|
|
29
|
-
const resp = await fetch('https://www.cnblogs.com/' + ${JSON.stringify(
|
|
28
|
+
})()`);let e=null;try{e=JSON.parse(typeof a==="string"?a:JSON.stringify(a))}catch(r){}if(!e)throw new c("博客园列表响应解析失败");if(e.authFail)throw new d("AUTH_REQUIRED","未登录博客园("+e.reason+"),请先在 Chrome 中登录 cnblogs.com 后重试");if(e.error)throw new c("博客园列表接口出错: "+e.error);return Array.isArray(e.items)?e.items:[]}async function h(i,o,a){try{await i.goto("https://www.cnblogs.com/"+o+"/");const e=await i.evaluate(`(async () => {
|
|
29
|
+
const resp = await fetch('https://www.cnblogs.com/' + ${JSON.stringify(o)} + '/ajax/GetPostStat', {
|
|
30
30
|
method: 'POST',
|
|
31
31
|
credentials: 'include',
|
|
32
32
|
headers: { 'Content-Type': 'application/json' },
|
|
33
|
-
body: JSON.stringify(${JSON.stringify(
|
|
33
|
+
body: JSON.stringify(${JSON.stringify(a)}),
|
|
34
34
|
});
|
|
35
35
|
if (!resp.ok) return JSON.stringify({ error: 'HTTP ' + resp.status });
|
|
36
36
|
return JSON.stringify({ stats: await resp.json() });
|
|
37
|
-
})()`),
|
|
37
|
+
})()`),r=JSON.parse(typeof e==="string"?e:JSON.stringify(e));if(!r||r.error||!Array.isArray(r.stats))return null;const l=new Map;for(const n of r.stats)if(n&&typeof n.postId==="number")l.set(n.postId,n);return l}catch(e){return null}}p({site:"cnblogs",name:"stats",access:"read",description:"博客园文章数据(每篇阅读/评论/推荐等全量运营指标)",domain:"i.cnblogs.com",strategy:f.COOKIE,browser:!0,args:[{name:"limit",type:"number",default:20,help:"返回条数"}],columns:["id","type","title","url","published_at","views","likes","comments","collects","shares","status","extra"],func:async(i,o)=>{if(!i)throw new c("博客园数据统计需要浏览器会话");const a=Math.max(1,Number(o.limit)||20),e=await g(i,a);if(e.length===0)throw new m("cnblogs stats","博客园后台没有任何随笔或文章。若确认已发布过内容,请检查是否登录了正确的账号。");e.sort((t,s)=>String(s.datePublished||"").localeCompare(String(t.datePublished||"")));const r=e.slice(0,a);let l="";for(const t of r){const s=String(t.url||"").match(/cnblogs\.com\/([^/]+)\//);if(s){l=s[1];break}}let n=null;if(l)n=await h(i,l,r.map((t)=>t.id));return r.map((t)=>{const s=n?n.get(t.id):null,u={buries:s?s.buryCount:null,web_views:t.webCount??null,feed_views:t.aggCount??null,updated_at:t.dateUpdated||"",is_pinned:Boolean(t.isPinned),is_in_site_home:Boolean(t.isInSiteHome),is_in_site_candidate:Boolean(t.isInSiteCandidate),access_permission:t.accessPermission??0,is_markdown:Boolean(t.isMarkdown)};if(!n)u.stat_note="推荐/反对数暂不可用(GetPostStat 请求失败),阅读/评论来自后台列表";return{id:String(t.id),type:t.postType===1?"随笔":"文章",title:t.title||"",url:t.url||"",published_at:t.datePublished||"",views:s?s.viewCount:t.viewCount??0,likes:s?s.diggCount:"",comments:s?s.feedbackCount:t.feedBackCount??0,collects:"",shares:"",status:t.isDraft?"草稿":t.isPublished?"已发布":"未发布",extra:JSON.stringify(u)}})}});
|
package/clis/cnblogs/whoami.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as s,Strategy as r}from"@jackwener/opencli/registry";import{checkLogin as t,cookieQuickCheck as c}from"../_shared/article/auth.js";import{cnblogsAuthProfile as i}from"./article.js";s({site:"cnblogs",name:"whoami",access:"read",description:"查看当前博客园登录账号信息。",domain:"cnblogs.com",strategy:r.COOKIE,browser:!0,columns:["logged_in","user_id","username"],authStatus:{quickCheck:c("https://home.cnblogs.com",[".Cnblogs.AspNetCore.Cookies"])},func:async(o)=>{const e=await t(o,i);return[{logged_in:e.isAuthenticated,user_id:e.userId||"",username:e.username||""}]}});
|
package/clis/codex/_actions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{CommandExecutionError as
|
|
1
|
+
import{CommandExecutionError as a}from"@jackwener/opencli/errors";import{collectCodexProjectsFromDocument as d,conversationSelectionArgs,hasConversationTarget as u,openCodexConversation as h}from"./sidebar.js";export{conversationSelectionArgs};export function unwrapEvaluateResult(e){if(e&&typeof e==="object"&&"data"in e&&"session"in e)return e.data;return e}function s(e){return String(e??"").replace(/\s+/g," ").trim()}function f(e,t){const n=s(e).toLowerCase(),o=s(t).toLowerCase();return!n||!o||n===o}export function findCodexConversation(e,t){if(!Array.isArray(e))return null;for(const n of e)for(const o of n.conversations||[]){if(t.threadId&&o.threadId===t.threadId)return{project:n,conversation:o};if(!t.threadId&&t.conversation&&s(o.title)===s(t.conversation)&&f(n.project,t.project))return{project:n,conversation:o}}return null}export function findActiveCodexConversation(e){const t=[];for(const n of e||[])for(const o of n.conversations||[])if(o.active)t.push({project:n,conversation:o});return t.length===1?t[0]:null}export async function readConversationProjects(e){const t=unwrapEvaluateResult(await e.evaluate(`(${d.toString()})()`));if(!Array.isArray(t))throw new a("Codex sidebar extraction returned an invalid payload.");return t}export async function resolveActionConversation(e,t){const n=await h(e,t),o=await readConversationProjects(e),r=n?findCodexConversation(o,n):findActiveCodexConversation(o);if(!r){const i=u(t)?"The selected Codex conversation was not visible after selection.":"Pass --project/--conversation/--index/--thread-id, or keep the active conversation visible in the sidebar.";throw new a("Could not resolve a stable Codex conversation identity.",i)}if(!r.conversation.threadId)throw new a("Could not resolve a stable Codex conversation identity.","The selected sidebar row is missing its Codex thread id; selectors may have drifted.");return{project:r.project.project,projectPath:r.project.projectPath,conversation:r.conversation.title,threadId:r.conversation.threadId,pinned:r.conversation.pinned,index:r.conversation.index}}function v(e){return e.threadId||`${e.project||"(unknown project)"}/${e.conversation||"(unknown conversation)"}`}export async function clickChatActionsMenuItem(e,t){const n=JSON.stringify(t);return unwrapEvaluateResult(await e.evaluate(`(async () => {
|
|
2
2
|
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
3
|
-
const labels = ${
|
|
3
|
+
const labels = ${n};
|
|
4
4
|
|
|
5
5
|
const trigger = document.querySelector('button[aria-label="Chat actions"]');
|
|
6
6
|
if (!(trigger instanceof HTMLButtonElement)) {
|
|
@@ -69,4 +69,4 @@ import{CommandExecutionError as I}from"@jackwener/opencli/errors";import{collect
|
|
|
69
69
|
const matchedLabel = leadingText(target);
|
|
70
70
|
Promise.resolve().then(() => { try { target.click(); } catch {} });
|
|
71
71
|
return { ok: true, clicked: matchedLabel };
|
|
72
|
-
})()`))||{ok:!1,reason:"Empty result from page.evaluate."}}export async function selectAndClickAction(
|
|
72
|
+
})()`))||{ok:!1,reason:"Empty result from page.evaluate."}}export async function selectAndClickAction(e,t,n){const o=await resolveActionConversation(e,t);await e.wait(0.4);const r=await clickChatActionsMenuItem(e,n);if(!r.ok){const i=r.detail?` ${r.detail}`:"";throw new a(`${r.reason||"Failed to perform action."}${i}`,"Make sure Codex Desktop is running and the target conversation is selectable.")}return{...r,selected:o}}export async function waitForConversationPostcondition(e,t,n,o,r=4000){const i=Date.now()+r;let c=null;while(Date.now()<i){const l=await readConversationProjects(e);c=findCodexConversation(l,t);if(n(c))return c;await e.wait(0.2)}throw new a(`Codex ${o} was not verified for ${v(t)}.`,"The UI action may have failed or the sidebar selectors may have drifted.")}export async function setConversationPinned(e,t,n){const o=await resolveActionConversation(e,t);if(o.pinned===n)return{status:n?"already-pinned":"already-unpinned",selected:o};const r=await selectAndClickAction(e,t,[n?"Pin chat":"Unpin chat"]);await waitForConversationPostcondition(e,r.selected,(i)=>i?.conversation?.pinned===n,n?"pin":"unpin");return{status:n?"pinned":"unpinned",selected:r.selected}}export async function archiveConversation(e,t){const n=await selectAndClickAction(e,t,["Archive chat"]);await waitForConversationPostcondition(e,n.selected,(o)=>!o,"archive");return{status:"archived",selected:n.selected}}
|
package/clis/codex/archive.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as s,Strategy as a}from"@jackwener/opencli/registry";import{archiveConversation as c,conversationSelectionArgs as n,resolveActionConversation as i}from"./_actions.js";s({site:"codex",name:"archive",access:"write",description:"Archive (Codex's term for delete) the selected conversation via the Chat actions header menu. No confirmation in UI — pass --yes to actually archive.",domain:"localhost",strategy:a.UI,browser:!0,args:[{name:"yes",type:"boolean",default:!1,help:"Actually archive (default: dry-run preview)"},...n],columns:["status","thread_id","project","conversation"],func:async(o,e)=>{if(!(e.yes===!0||e.yes==="true"||e.yes==="1")){const r=await i(o,e);return[{status:"dry-run",thread_id:r.threadId,project:r.project,conversation:r.conversation}]}const t=await c(o,e);return[{status:t.status,thread_id:t.selected.threadId,project:t.selected.project,conversation:t.selected.conversation}]}});
|
package/clis/codex/ask.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as m,Strategy as d}from"@jackwener/opencli/registry";import{ArgumentError as f,selectorError as x}from"@jackwener/opencli/errors";import{conversationSelectionArgs as p,openCodexConversation as v}from"./sidebar.js";export const askCommand=m({site:"codex",name:"ask",access:"write",description:"Send a prompt to the current or selected Codex conversation and wait for the AI response",domain:"localhost",strategy:d.UI,browser:!0,args:[{name:"text",fromFile:!0,required:!0,positional:!0,help:"Prompt to send"},{name:"timeout",type:"int",required:!1,help:"Max seconds to wait for response (default: 60)",default:60},...p],columns:["Role","Project","Conversation","Text"],func:async(t,n)=>{const{text:r,timeout:o}=n;if(!Number.isInteger(o)||o<1)throw new f("--timeout must be a positive integer (seconds)");const e=await v(t,n),l=await t.evaluate(`
|
|
2
2
|
(function() {
|
|
3
3
|
const turns = document.querySelectorAll('[data-content-search-turn-key]');
|
|
4
4
|
return turns.length;
|
|
5
5
|
})()
|
|
6
|
-
`);if(!await
|
|
6
|
+
`);if(!await t.evaluate(`
|
|
7
7
|
(function(text) {
|
|
8
8
|
const editables = Array.from(document.querySelectorAll('[contenteditable="true"]'));
|
|
9
9
|
const composer = editables.length > 0 ? editables[editables.length - 1] : document.querySelector('textarea');
|
|
@@ -11,13 +11,13 @@ import{cli as O,Strategy as Q}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
11
11
|
composer.focus();
|
|
12
12
|
document.execCommand('insertText', false, text);
|
|
13
13
|
return true;
|
|
14
|
-
})(${JSON.stringify(
|
|
15
|
-
`))throw
|
|
14
|
+
})(${JSON.stringify(r)})
|
|
15
|
+
`))throw x("Codex input element");await t.wait(0.5);await t.pressKey("Enter");const a=3,u=Math.ceil(o/a);let s="";for(let i=0;i<u;i++){await t.wait(a);const c=await t.evaluate(`
|
|
16
16
|
(function(prevLen) {
|
|
17
17
|
const turns = document.querySelectorAll('[data-content-search-turn-key]');
|
|
18
18
|
if (turns.length <= prevLen) return null;
|
|
19
19
|
const lastTurn = turns[turns.length - 1];
|
|
20
20
|
const text = lastTurn.innerText || lastTurn.textContent;
|
|
21
21
|
return text ? text.trim() : null;
|
|
22
|
-
})(${
|
|
23
|
-
`);if(
|
|
22
|
+
})(${l})
|
|
23
|
+
`);if(c){s=c;break}}if(!s)return[{Role:"User",Project:e?.project||"",Conversation:e?.conversation||"",Text:r},{Role:"System",Project:e?.project||"",Conversation:e?.conversation||"",Text:`No response within ${o}s. The agent may still be working.`}];return[{Role:"User",Project:e?.project||"",Conversation:e?.conversation||"",Text:r},{Role:"Assistant",Project:e?.project||"",Conversation:e?.conversation||"",Text:s}]}});
|