publishport-opencli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +214 -0
- package/README.md +299 -0
- package/README.zh-CN.md +341 -0
- package/cli-manifest.json +51513 -0
- package/clis/12306/auth.js +25 -0
- package/clis/12306/me.js +9 -0
- package/clis/12306/orders.js +13 -0
- package/clis/12306/passengers.js +14 -0
- package/clis/12306/price.js +1 -0
- package/clis/12306/stations.js +1 -0
- package/clis/12306/train.js +1 -0
- package/clis/12306/trains.js +1 -0
- package/clis/12306/utils.js +1 -0
- package/clis/1688/assets.js +127 -0
- package/clis/1688/auth.js +1 -0
- package/clis/1688/download.js +1 -0
- package/clis/1688/item.js +21 -0
- package/clis/1688/search.js +129 -0
- package/clis/1688/shared.js +11 -0
- package/clis/1688/store.js +26 -0
- package/clis/1point3acres/auth.js +18 -0
- package/clis/1point3acres/digest.js +1 -0
- package/clis/1point3acres/forum.js +1 -0
- package/clis/1point3acres/forums.js +1 -0
- package/clis/1point3acres/hot.js +1 -0
- package/clis/1point3acres/latest.js +1 -0
- package/clis/1point3acres/notifications.js +1 -0
- package/clis/1point3acres/search.js +1 -0
- package/clis/1point3acres/thread.js +2 -0
- package/clis/1point3acres/user.js +1 -0
- package/clis/1point3acres/utils.js +6 -0
- package/clis/36kr/article.js +20 -0
- package/clis/36kr/hot.js +16 -0
- package/clis/36kr/news.js +1 -0
- package/clis/36kr/search.js +36 -0
- package/clis/51job/company.js +36 -0
- package/clis/51job/detail.js +35 -0
- package/clis/51job/hot.js +1 -0
- package/clis/51job/search.js +1 -0
- package/clis/51job/utils.js +21 -0
- package/clis/_atlassian/shared.js +21 -0
- package/clis/_shared/article/auth.js +16 -0
- package/clis/_shared/article/douban-md2draft.js +4 -0
- package/clis/_shared/article/format.js +1 -0
- package/clis/_shared/article/images.js +95 -0
- package/clis/_shared/article/login.js +1 -0
- package/clis/_shared/article/page-runtime.js +745 -0
- package/clis/_shared/article/publish.js +34 -0
- package/clis/_shared/common.js +1 -0
- package/clis/_shared/content-guard.js +1 -0
- package/clis/_shared/desktop-commands.js +1 -0
- package/clis/_shared/search-adapter.js +1 -0
- package/clis/_shared/site-auth.js +1 -0
- package/clis/_shared/token-auth.js +2 -0
- package/clis/_shared/video-publish.js +62 -0
- package/clis/aibase/news.js +31 -0
- package/clis/amazon/auth.js +19 -0
- package/clis/amazon/bestsellers.js +1 -0
- package/clis/amazon/discussion.js +20 -0
- package/clis/amazon/movers-shakers.js +1 -0
- package/clis/amazon/new-releases.js +1 -0
- package/clis/amazon/offer.js +29 -0
- package/clis/amazon/product.js +25 -0
- package/clis/amazon/rankings.js +68 -0
- package/clis/amazon/search.js +16 -0
- package/clis/amazon/shared.js +11 -0
- package/clis/antigravity/SKILL.md +38 -0
- package/clis/antigravity/_actions.js +201 -0
- package/clis/antigravity/audit-extras.js +78 -0
- package/clis/antigravity/delete.js +1 -0
- package/clis/antigravity/dump.js +1 -0
- package/clis/antigravity/extract-code.js +18 -0
- package/clis/antigravity/history.js +1 -0
- package/clis/antigravity/mark-read.js +1 -0
- package/clis/antigravity/model.js +90 -0
- package/clis/antigravity/new.js +9 -0
- package/clis/antigravity/read.js +10 -0
- package/clis/antigravity/rename.js +1 -0
- package/clis/antigravity/send.js +11 -0
- package/clis/antigravity/serve.js +97 -0
- package/clis/antigravity/status.js +1 -0
- package/clis/antigravity/storage.js +12 -0
- package/clis/antigravity/watch.js +6 -0
- package/clis/apple-podcasts/episodes.js +1 -0
- package/clis/apple-podcasts/search.js +1 -0
- package/clis/apple-podcasts/top.js +1 -0
- package/clis/apple-podcasts/utils.js +1 -0
- package/clis/archive/item.js +1 -0
- package/clis/archive/search.js +1 -0
- package/clis/archive/snapshots.js +1 -0
- package/clis/archive/wayback.js +1 -0
- package/clis/arxiv/author.js +1 -0
- package/clis/arxiv/paper.js +1 -0
- package/clis/arxiv/recent.js +1 -0
- package/clis/arxiv/search.js +1 -0
- package/clis/arxiv/utils.js +1 -0
- package/clis/autohome/__fixtures__/catalog.html +11 -0
- package/clis/autohome/__fixtures__/koubei.json +116 -0
- package/clis/autohome/brand.js +1 -0
- package/clis/autohome/score.js +1 -0
- package/clis/autohome/utils.js +1 -0
- package/clis/baidu-scholar/search.js +63 -0
- package/clis/baijiahao/article.js +1 -0
- package/clis/baijiahao/lists.js +1 -0
- package/clis/baijiahao/login.js +1 -0
- package/clis/baijiahao/publish.js +57 -0
- package/clis/baijiahao/stats.js +1 -0
- package/clis/baijiahao/whoami.js +1 -0
- package/clis/band/auth.js +29 -0
- package/clis/band/bands.js +37 -0
- package/clis/band/mentions.js +6 -0
- package/clis/band/post.js +76 -0
- package/clis/band/posts.js +50 -0
- package/clis/barchart/flow.js +70 -0
- package/clis/barchart/greeks.js +88 -0
- package/clis/barchart/options.js +61 -0
- package/clis/barchart/quote.js +87 -0
- package/clis/bbc/news.js +1 -0
- package/clis/bbc/topic.js +1 -0
- package/clis/bbc/utils.js +1 -0
- package/clis/bilibili/article.js +1 -0
- package/clis/bilibili/auth.js +1 -0
- package/clis/bilibili/categories.js +1 -0
- package/clis/bilibili/coin.js +1 -0
- package/clis/bilibili/comment-del.js +1 -0
- package/clis/bilibili/comment-like.js +1 -0
- package/clis/bilibili/comment.js +1 -0
- package/clis/bilibili/comments.js +1 -0
- package/clis/bilibili/dm-list.js +1 -0
- package/clis/bilibili/dm-read.js +1 -0
- package/clis/bilibili/dm-send.js +1 -0
- package/clis/bilibili/download.js +7 -0
- package/clis/bilibili/drafts.js +1 -0
- package/clis/bilibili/dynamic-post.js +24 -0
- package/clis/bilibili/dynamic.js +1 -0
- package/clis/bilibili/favorite-add.js +1 -0
- package/clis/bilibili/favorite.js +1 -0
- package/clis/bilibili/feed.js +2 -0
- package/clis/bilibili/follow.js +1 -0
- package/clis/bilibili/following.js +1 -0
- package/clis/bilibili/history.js +1 -0
- package/clis/bilibili/hot.js +15 -0
- package/clis/bilibili/like.js +1 -0
- package/clis/bilibili/me.js +1 -0
- package/clis/bilibili/partitions.js +1 -0
- package/clis/bilibili/ranking.js +1 -0
- package/clis/bilibili/search.js +1 -0
- package/clis/bilibili/stats.js +1 -0
- package/clis/bilibili/subtitle.js +21 -0
- package/clis/bilibili/summary.js +1 -0
- package/clis/bilibili/topics.js +1 -0
- package/clis/bilibili/unfollow.js +1 -0
- package/clis/bilibili/upload.js +1 -0
- package/clis/bilibili/user-videos.js +1 -0
- package/clis/bilibili/utils.js +50 -0
- package/clis/bilibili/video-drafts.js +1 -0
- package/clis/bilibili/video.js +1 -0
- package/clis/binance/asks.js +1 -0
- package/clis/binance/depth.js +1 -0
- package/clis/binance/gainers.js +1 -0
- package/clis/binance/klines.js +1 -0
- package/clis/binance/losers.js +1 -0
- package/clis/binance/pairs.js +1 -0
- package/clis/binance/price.js +1 -0
- package/clis/binance/prices.js +1 -0
- package/clis/binance/ticker.js +1 -0
- package/clis/binance/top.js +1 -0
- package/clis/binance/trades.js +1 -0
- package/clis/bloomberg/businessweek.js +12 -0
- package/clis/bloomberg/crypto.js +1 -0
- package/clis/bloomberg/economics.js +1 -0
- package/clis/bloomberg/feeds.js +1 -0
- package/clis/bloomberg/green.js +1 -0
- package/clis/bloomberg/industries.js +1 -0
- package/clis/bloomberg/main.js +1 -0
- package/clis/bloomberg/markets.js +1 -0
- package/clis/bloomberg/news.js +57 -0
- package/clis/bloomberg/opinions.js +1 -0
- package/clis/bloomberg/politics.js +1 -0
- package/clis/bloomberg/pursuits.js +1 -0
- package/clis/bloomberg/tech.js +1 -0
- package/clis/bloomberg/utils.js +17 -0
- package/clis/bluesky/post.js +1 -0
- package/clis/bluesky/shared.js +56 -0
- package/clis/bluesky/whoami.js +1 -0
- package/clis/booking/search.js +93 -0
- package/clis/boss/auth.js +13 -0
- package/clis/boss/batchgreet.js +1 -0
- package/clis/boss/chatlist.js +1 -0
- package/clis/boss/chatmsg.js +1 -0
- package/clis/boss/detail.js +1 -0
- package/clis/boss/exchange.js +1 -0
- package/clis/boss/greet.js +1 -0
- package/clis/boss/invite.js +4 -0
- package/clis/boss/joblist.js +1 -0
- package/clis/boss/mark.js +1 -0
- package/clis/boss/recommend.js +1 -0
- package/clis/boss/resume.js +90 -0
- package/clis/boss/search.js +1 -0
- package/clis/boss/send.js +1 -0
- package/clis/boss/stats.js +1 -0
- package/clis/boss/utils.js +161 -0
- package/clis/brave/search.js +23 -0
- package/clis/chaoxing/assignments.js +1 -0
- package/clis/chaoxing/auth.js +21 -0
- package/clis/chaoxing/exams.js +1 -0
- package/clis/chaoxing/utils.js +58 -0
- package/clis/chatgpt/ask.js +1 -0
- package/clis/chatgpt/auth.js +17 -0
- package/clis/chatgpt/detail.js +1 -0
- package/clis/chatgpt/history.js +1 -0
- package/clis/chatgpt/image.js +1 -0
- package/clis/chatgpt/model.js +1 -0
- package/clis/chatgpt/new.js +1 -0
- package/clis/chatgpt/project-file-add.js +1 -0
- package/clis/chatgpt/project-list.js +1 -0
- package/clis/chatgpt/read.js +1 -0
- package/clis/chatgpt/send.js +1 -0
- package/clis/chatgpt/status.js +1 -0
- package/clis/chatgpt/utils.js +1092 -0
- package/clis/chatgpt-app/ask.js +1 -0
- package/clis/chatgpt-app/ax.js +512 -0
- package/clis/chatgpt-app/model.js +1 -0
- package/clis/chatgpt-app/new.js +1 -0
- package/clis/chatgpt-app/read.js +1 -0
- package/clis/chatgpt-app/send.js +1 -0
- package/clis/chatgpt-app/status.js +1 -0
- package/clis/chatwise/ask.js +1 -0
- package/clis/chatwise/export.js +21 -0
- package/clis/chatwise/history.js +26 -0
- package/clis/chatwise/model.js +48 -0
- package/clis/chatwise/new.js +1 -0
- package/clis/chatwise/read.js +25 -0
- package/clis/chatwise/screenshot.js +1 -0
- package/clis/chatwise/send.js +1 -0
- package/clis/chatwise/status.js +1 -0
- package/clis/chatwise/utils.js +75 -0
- package/clis/chess/analyze.js +1 -0
- package/clis/chess/game.js +1 -0
- package/clis/chess/games.js +1 -0
- package/clis/chess/stats.js +1 -0
- package/clis/chess/utils.js +1 -0
- package/clis/claude/ask.js +4 -0
- package/clis/claude/auth.js +19 -0
- package/clis/claude/detail.js +1 -0
- package/clis/claude/history.js +1 -0
- package/clis/claude/new.js +1 -0
- package/clis/claude/read.js +1 -0
- package/clis/claude/send.js +1 -0
- package/clis/claude/status.js +1 -0
- package/clis/claude/utils.js +179 -0
- package/clis/cnblogs/article.js +1 -0
- package/clis/cnblogs/login.js +1 -0
- package/clis/cnblogs/stats.js +37 -0
- package/clis/cnblogs/whoami.js +1 -0
- package/clis/cnki/search.js +38 -0
- package/clis/codex/_actions.js +72 -0
- package/clis/codex/archive.js +1 -0
- package/clis/codex/ask.js +23 -0
- package/clis/codex/dump.js +1 -0
- package/clis/codex/export.js +12 -0
- package/clis/codex/extract-diff.js +28 -0
- package/clis/codex/history.js +1 -0
- package/clis/codex/model.js +118 -0
- package/clis/codex/new.js +1 -0
- package/clis/codex/pin.js +1 -0
- package/clis/codex/projects.js +1 -0
- package/clis/codex/read.js +16 -0
- package/clis/codex/rename.js +34 -0
- package/clis/codex/screenshot.js +1 -0
- package/clis/codex/send.js +16 -0
- package/clis/codex/sidebar.js +1 -0
- package/clis/codex/status.js +1 -0
- package/clis/coingecko/categories.js +1 -0
- package/clis/coingecko/coin.js +1 -0
- package/clis/coingecko/derivatives.js +1 -0
- package/clis/coingecko/exchanges.js +1 -0
- package/clis/coingecko/global.js +1 -0
- package/clis/coingecko/top.js +1 -0
- package/clis/coingecko/trending.js +1 -0
- package/clis/confluence/create.js +1 -0
- package/clis/confluence/page.js +1 -0
- package/clis/confluence/search.js +1 -0
- package/clis/confluence/shared.js +1 -0
- package/clis/confluence/update.js +1 -0
- package/clis/coupang/add-to-cart.js +86 -0
- package/clis/coupang/auth.js +16 -0
- package/clis/coupang/product.js +161 -0
- package/clis/coupang/search.js +385 -0
- package/clis/coupang/utils.js +1 -0
- package/clis/crates/crate.js +1 -0
- package/clis/crates/search.js +1 -0
- package/clis/crates/utils.js +1 -0
- package/clis/csdn/article.js +29 -0
- package/clis/csdn/columns.js +1 -0
- package/clis/csdn/login.js +1 -0
- package/clis/csdn/stats.js +71 -0
- package/clis/csdn/whoami.js +1 -0
- package/clis/cto51/article.js +1 -0
- package/clis/cto51/whoami.js +1 -0
- package/clis/ctrip/auth.js +1 -0
- package/clis/ctrip/flight.js +17 -0
- package/clis/ctrip/hotel-search.js +24 -0
- package/clis/ctrip/hotel-suggest.js +1 -0
- package/clis/ctrip/search.js +1 -0
- package/clis/ctrip/utils.js +119 -0
- package/clis/cursor/ask.js +22 -0
- package/clis/cursor/composer.js +12 -0
- package/clis/cursor/dump.js +1 -0
- package/clis/cursor/export.js +23 -0
- package/clis/cursor/extract-code.js +18 -0
- package/clis/cursor/history.js +26 -0
- package/clis/cursor/model.js +18 -0
- package/clis/cursor/new.js +1 -0
- package/clis/cursor/read.js +27 -0
- package/clis/cursor/screenshot.js +1 -0
- package/clis/cursor/send.js +12 -0
- package/clis/cursor/status.js +1 -0
- package/clis/dblp/author.js +1 -0
- package/clis/dblp/paper.js +1 -0
- package/clis/dblp/search.js +1 -0
- package/clis/dblp/utils.js +1 -0
- package/clis/dblp/venue.js +1 -0
- package/clis/deepseek/ask.js +1 -0
- package/clis/deepseek/auth.js +22 -0
- package/clis/deepseek/detail.js +1 -0
- package/clis/deepseek/history.js +1 -0
- package/clis/deepseek/new.js +1 -0
- package/clis/deepseek/read.js +1 -0
- package/clis/deepseek/send.js +50 -0
- package/clis/deepseek/status.js +1 -0
- package/clis/deepseek/utils.js +202 -0
- package/clis/defillama/protocol.js +1 -0
- package/clis/defillama/protocols.js +1 -0
- package/clis/defillama/utils.js +1 -0
- package/clis/devto/auth.js +9 -0
- package/clis/devto/latest.js +1 -0
- package/clis/devto/publish.js +17 -0
- package/clis/devto/read.js +3 -0
- package/clis/devto/stats.js +27 -0
- package/clis/devto/tag.js +1 -0
- package/clis/devto/top.js +1 -0
- package/clis/devto/user.js +1 -0
- package/clis/dianping/__fixtures__/search.html +168 -0
- package/clis/dianping/__fixtures__/shop.html +6 -0
- package/clis/dianping/auth.js +10 -0
- package/clis/dianping/cityResolver.js +4 -0
- package/clis/dianping/search.js +1 -0
- package/clis/dianping/shop.js +1 -0
- package/clis/dianping/utils.js +1 -0
- package/clis/dictionary/examples.js +1 -0
- package/clis/dictionary/search.js +1 -0
- package/clis/dictionary/synonyms.js +1 -0
- package/clis/discord-app/channels.js +1 -0
- package/clis/discord-app/delete.js +66 -0
- package/clis/discord-app/goto.js +1 -0
- package/clis/discord-app/members.js +21 -0
- package/clis/discord-app/read.js +1 -0
- package/clis/discord-app/search.js +29 -0
- package/clis/discord-app/send.js +10 -0
- package/clis/discord-app/servers.js +1 -0
- package/clis/discord-app/status.js +1 -0
- package/clis/discord-app/thread-read.js +1 -0
- package/clis/discord-app/threads.js +1 -0
- package/clis/discord-app/utils.js +226 -0
- package/clis/discord-web/auth.js +10 -0
- package/clis/discord-web/send.js +13 -0
- package/clis/dockerhub/image.js +1 -0
- package/clis/dockerhub/search.js +1 -0
- package/clis/dockerhub/utils.js +1 -0
- package/clis/dongchedi/__fixtures__/search.json +60 -0
- package/clis/dongchedi/__fixtures__/series-detail.json +911 -0
- package/clis/dongchedi/__fixtures__/series-score.json +1396 -0
- package/clis/dongchedi/koubei.js +1 -0
- package/clis/dongchedi/models.js +1 -0
- package/clis/dongchedi/score.js +1 -0
- package/clis/dongchedi/search.js +1 -0
- package/clis/dongchedi/series.js +1 -0
- package/clis/dongchedi/specs.js +1 -0
- package/clis/dongchedi/utils.js +1 -0
- package/clis/douban/article.js +53 -0
- package/clis/douban/auth.js +21 -0
- package/clis/douban/book-hot.js +1 -0
- package/clis/douban/download.js +1 -0
- package/clis/douban/marks.js +59 -0
- package/clis/douban/movie-hot.js +1 -0
- package/clis/douban/photos.js +1 -0
- package/clis/douban/reviews.js +53 -0
- package/clis/douban/search.js +1 -0
- package/clis/douban/subject.js +1 -0
- package/clis/douban/top250.js +50 -0
- package/clis/douban/utils.js +344 -0
- package/clis/doubao/ask.js +1 -0
- package/clis/doubao/auth.js +28 -0
- package/clis/doubao/detail.js +1 -0
- package/clis/doubao/history.js +1 -0
- package/clis/doubao/meeting-summary.js +1 -0
- package/clis/doubao/meeting-transcript.js +1 -0
- package/clis/doubao/new.js +1 -0
- package/clis/doubao/read.js +1 -0
- package/clis/doubao/send.js +1 -0
- package/clis/doubao/status.js +1 -0
- package/clis/doubao/utils.js +704 -0
- package/clis/doubao-app/ask.js +1 -0
- package/clis/doubao-app/dump.js +1 -0
- package/clis/doubao-app/new.js +1 -0
- package/clis/doubao-app/read.js +1 -0
- package/clis/doubao-app/screenshot.js +1 -0
- package/clis/doubao-app/send.js +1 -0
- package/clis/doubao-app/status.js +1 -0
- package/clis/doubao-app/utils.js +64 -0
- package/clis/douyin/_shared/browser-fetch.js +28 -0
- package/clis/douyin/_shared/creation-id.js +1 -0
- package/clis/douyin/_shared/evaluate-result.js +1 -0
- package/clis/douyin/_shared/imagex-upload.js +1 -0
- package/clis/douyin/_shared/public-api.js +1 -0
- package/clis/douyin/_shared/sts2.js +1 -0
- package/clis/douyin/_shared/text-extra.js +1 -0
- package/clis/douyin/_shared/timing.js +1 -0
- package/clis/douyin/_shared/tos-upload.js +5 -0
- package/clis/douyin/_shared/transcode.js +1 -0
- package/clis/douyin/_shared/types.js +1 -0
- package/clis/douyin/_shared/vod-upload.js +5 -0
- package/clis/douyin/activities.js +1 -0
- package/clis/douyin/auth.js +1 -0
- package/clis/douyin/collections.js +1 -0
- package/clis/douyin/delete.js +76 -0
- package/clis/douyin/draft.js +166 -0
- package/clis/douyin/drafts.js +1 -0
- package/clis/douyin/hashtag.js +1 -0
- package/clis/douyin/location.js +1 -0
- package/clis/douyin/profile.js +1 -0
- package/clis/douyin/publish-image.js +64 -0
- package/clis/douyin/publish.js +14 -0
- package/clis/douyin/search.js +51 -0
- package/clis/douyin/stats.js +1 -0
- package/clis/douyin/update.js +1 -0
- package/clis/douyin/user-videos.js +1 -0
- package/clis/douyin/videos.js +1 -0
- package/clis/duckduckgo/search.js +1 -0
- package/clis/duckduckgo/suggest.js +1 -0
- package/clis/eastmoney/_secid.js +1 -0
- package/clis/eastmoney/announcement.js +1 -0
- package/clis/eastmoney/article.js +1 -0
- package/clis/eastmoney/convertible.js +1 -0
- package/clis/eastmoney/etf.js +1 -0
- package/clis/eastmoney/holders.js +1 -0
- package/clis/eastmoney/hot-rank.js +30 -0
- package/clis/eastmoney/index-board.js +1 -0
- package/clis/eastmoney/kline.js +1 -0
- package/clis/eastmoney/kuaixun.js +1 -0
- package/clis/eastmoney/longhu.js +1 -0
- package/clis/eastmoney/money-flow.js +1 -0
- package/clis/eastmoney/northbound.js +1 -0
- package/clis/eastmoney/quote.js +1 -0
- package/clis/eastmoney/rank.js +1 -0
- package/clis/eastmoney/sectors.js +1 -0
- package/clis/eastmoney/whoami.js +1 -0
- package/clis/endoflife/product.js +1 -0
- package/clis/endoflife/utils.js +1 -0
- package/clis/facebook/__fixtures__/notifications-page.html +13 -0
- package/clis/facebook/add-friend.js +24 -0
- package/clis/facebook/auth.js +1 -0
- package/clis/facebook/comment.js +18 -0
- package/clis/facebook/events.js +26 -0
- package/clis/facebook/feed.js +209 -0
- package/clis/facebook/friends.js +24 -0
- package/clis/facebook/groups.js +32 -0
- package/clis/facebook/join-group.js +25 -0
- package/clis/facebook/like.js +29 -0
- package/clis/facebook/marketplace-inbox.js +34 -0
- package/clis/facebook/marketplace-listings.js +33 -0
- package/clis/facebook/memories.js +21 -0
- package/clis/facebook/notifications.js +31 -0
- package/clis/facebook/post.js +88 -0
- package/clis/facebook/profile.js +18 -0
- package/clis/facebook/search.js +22 -0
- package/clis/flathub/app.js +1 -0
- package/clis/flathub/search.js +1 -0
- package/clis/flathub/utils.js +1 -0
- package/clis/flomo/auth.js +22 -0
- package/clis/flomo/memos.js +13 -0
- package/clis/gemini/ask.js +1 -0
- package/clis/gemini/auth.js +14 -0
- package/clis/gemini/deep-research-result.js +4 -0
- package/clis/gemini/deep-research.js +1 -0
- package/clis/gemini/detail.js +1 -0
- package/clis/gemini/history.js +1 -0
- package/clis/gemini/image.js +3 -0
- package/clis/gemini/new.js +1 -0
- package/clis/gemini/read.js +1 -0
- package/clis/gemini/status.js +1 -0
- package/clis/gemini/utils.js +1234 -0
- package/clis/geogebra/add-circle.js +1 -0
- package/clis/geogebra/add-line.js +1 -0
- package/clis/geogebra/add-point.js +1 -0
- package/clis/geogebra/add-polygon.js +1 -0
- package/clis/geogebra/eval.js +1 -0
- package/clis/geogebra/hexagon.js +1 -0
- package/clis/geogebra/info.js +13 -0
- package/clis/geogebra/list.js +1 -0
- package/clis/geogebra/triangle.js +1 -0
- package/clis/geogebra/utils.js +99 -0
- package/clis/ghost/publish.js +1 -0
- package/clis/ghost/shared.js +1 -0
- package/clis/ghost/whoami.js +1 -0
- package/clis/gitee/auth.js +12 -0
- package/clis/gitee/index.js +1 -0
- package/clis/gitee/search.js +1 -0
- package/clis/gitee/trending.js +240 -0
- package/clis/gitee/user.js +71 -0
- package/clis/github/auth.js +7 -0
- package/clis/github-trending/repos.js +1 -0
- package/clis/google/news.js +1 -0
- package/clis/google/search.js +90 -0
- package/clis/google/suggest.js +1 -0
- package/clis/google/trends.js +1 -0
- package/clis/google/utils.js +1 -0
- package/clis/google-scholar/cite.js +20 -0
- package/clis/google-scholar/profile.js +36 -0
- package/clis/google-scholar/search.js +35 -0
- package/clis/goproxy/module.js +1 -0
- package/clis/goproxy/utils.js +1 -0
- package/clis/goproxy/versions.js +1 -0
- package/clis/gov-law/recent.js +1 -0
- package/clis/gov-law/search.js +14 -0
- package/clis/gov-law/shared.js +29 -0
- package/clis/gov-policy/__fixtures__/recent.html +16 -0
- package/clis/gov-policy/__fixtures__/search.html +41 -0
- package/clis/gov-policy/recent.js +8 -0
- package/clis/gov-policy/search.js +8 -0
- package/clis/gov-policy/utils.js +1 -0
- package/clis/grok/ask.js +1 -0
- package/clis/grok/auth.js +17 -0
- package/clis/grok/delete.js +1 -0
- package/clis/grok/detail.js +1 -0
- package/clis/grok/export-all.js +170 -0
- package/clis/grok/export-utils.js +1 -0
- package/clis/grok/export.js +106 -0
- package/clis/grok/history.js +1 -0
- package/clis/grok/image.js +119 -0
- package/clis/grok/image.test.ts +127 -0
- package/clis/grok/new.js +1 -0
- package/clis/grok/pin.js +1 -0
- package/clis/grok/read.js +1 -0
- package/clis/grok/send.js +1 -0
- package/clis/grok/status.js +1 -0
- package/clis/grok/utils.js +337 -0
- package/clis/guazi/__fixtures__/detail.html +7 -0
- package/clis/guazi/__fixtures__/list.html +5 -0
- package/clis/guazi/browse.js +1 -0
- package/clis/guazi/car.js +1 -0
- package/clis/guazi/utils.js +1 -0
- package/clis/hackernews/ask.js +1 -0
- package/clis/hackernews/auth.js +9 -0
- package/clis/hackernews/best.js +1 -0
- package/clis/hackernews/comment.js +61 -0
- package/clis/hackernews/jobs.js +1 -0
- package/clis/hackernews/new.js +1 -0
- package/clis/hackernews/read.js +11 -0
- package/clis/hackernews/search.js +1 -0
- package/clis/hackernews/show.js +1 -0
- package/clis/hackernews/submit.js +65 -0
- package/clis/hackernews/top.js +1 -0
- package/clis/hackernews/user.js +1 -0
- package/clis/hashnode/auth.js +11 -0
- package/clis/hashnode/publish.js +92 -0
- package/clis/hf/auth.js +12 -0
- package/clis/hf/datasets.js +1 -0
- package/clis/hf/models.js +1 -0
- package/clis/hf/paper.js +1 -0
- package/clis/hf/spaces.js +1 -0
- package/clis/hf/top.js +1 -0
- package/clis/homebrew/cask.js +1 -0
- package/clis/homebrew/formula.js +1 -0
- package/clis/homebrew/popular.js +1 -0
- package/clis/homebrew/utils.js +1 -0
- package/clis/huodongxing/events.js +1 -0
- package/clis/hupu/__fixtures__/hot-home.html +64 -0
- package/clis/hupu/auth.js +14 -0
- package/clis/hupu/detail.js +7 -0
- package/clis/hupu/hot.js +14 -0
- package/clis/hupu/like.js +1 -0
- package/clis/hupu/mentions.js +91 -0
- package/clis/hupu/reply.js +1 -0
- package/clis/hupu/search.js +1 -0
- package/clis/hupu/unlike.js +1 -0
- package/clis/hupu/utils.js +243 -0
- package/clis/imdb/person.js +140 -0
- package/clis/imdb/reviews.js +40 -0
- package/clis/imdb/search.js +113 -0
- package/clis/imdb/title.js +1 -0
- package/clis/imdb/top.js +1 -0
- package/clis/imdb/trending.js +1 -0
- package/clis/imdb/utils.js +162 -0
- package/clis/imooc/article.js +59 -0
- package/clis/imooc/login.js +1 -0
- package/clis/imooc/whoami.js +1 -0
- package/clis/indeed/job.js +20 -0
- package/clis/indeed/search.js +37 -0
- package/clis/indeed/utils.js +1 -0
- package/clis/infoq/article.js +19 -0
- package/clis/infoq/login.js +1 -0
- package/clis/infoq/whoami.js +1 -0
- package/clis/instagram/_shared/private-publish.js +75 -0
- package/clis/instagram/_shared/protocol-capture.js +180 -0
- package/clis/instagram/_shared/runtime-info.js +33 -0
- package/clis/instagram/auth.js +22 -0
- package/clis/instagram/collection-create.js +38 -0
- package/clis/instagram/collection-delete.js +72 -0
- package/clis/instagram/comment.js +26 -0
- package/clis/instagram/detail.js +2 -0
- package/clis/instagram/download.js +83 -0
- package/clis/instagram/explore.js +27 -0
- package/clis/instagram/follow.js +24 -0
- package/clis/instagram/followers.js +30 -0
- package/clis/instagram/following.js +74 -0
- package/clis/instagram/like.js +25 -0
- package/clis/instagram/note.js +162 -0
- package/clis/instagram/post.js +718 -0
- package/clis/instagram/profile.js +25 -0
- package/clis/instagram/reel.js +452 -0
- package/clis/instagram/save.js +25 -0
- package/clis/instagram/saved.js +37 -0
- package/clis/instagram/search.js +23 -0
- package/clis/instagram/story.js +21 -0
- package/clis/instagram/unfollow.js +21 -0
- package/clis/instagram/unlike.js +25 -0
- package/clis/instagram/unsave.js +25 -0
- package/clis/instagram/user.js +1 -0
- package/clis/jd/add-cart.js +22 -0
- package/clis/jd/auth.js +12 -0
- package/clis/jd/cart.js +59 -0
- package/clis/jd/detail.js +42 -0
- package/clis/jd/item.js +98 -0
- package/clis/jd/item.test.ts +517 -0
- package/clis/jd/reviews.js +31 -0
- package/clis/jd/search.js +42 -0
- package/clis/jianshu/article.js +1 -0
- package/clis/jianshu/login.js +1 -0
- package/clis/jianshu/notebooks.js +1 -0
- package/clis/jianshu/whoami.js +1 -0
- package/clis/jianyu/auth.js +28 -0
- package/clis/jianyu/detail.js +1 -0
- package/clis/jianyu/search.js +73 -0
- package/clis/jianyu/shared/china-bid-search.js +86 -0
- package/clis/jianyu/shared/procurement-contract.js +1 -0
- package/clis/jianyu/shared/procurement-detail.js +18 -0
- package/clis/jike/auth.js +19 -0
- package/clis/jike/comment.js +82 -0
- package/clis/jike/create.js +83 -0
- package/clis/jike/feed.js +32 -0
- package/clis/jike/like.js +38 -0
- package/clis/jike/notifications.js +115 -0
- package/clis/jike/post.js +33 -0
- package/clis/jike/repost.js +67 -0
- package/clis/jike/search.js +29 -0
- package/clis/jike/topic.js +20 -0
- package/clis/jike/user.js +19 -0
- package/clis/jike/utils.js +15 -0
- package/clis/jimeng/auth.js +13 -0
- package/clis/jimeng/generate.js +60 -0
- package/clis/jimeng/history.js +32 -0
- package/clis/jimeng/new.js +26 -0
- package/clis/jimeng/workspaces.js +22 -0
- package/clis/jira/attachments.js +1 -0
- package/clis/jira/comments.js +1 -0
- package/clis/jira/issue.js +1 -0
- package/clis/jira/links.js +1 -0
- package/clis/jira/search.js +1 -0
- package/clis/jira/shared.js +1 -0
- package/clis/juejin/article.js +5 -0
- package/clis/juejin/categories.js +1 -0
- package/clis/juejin/hot.js +1 -0
- package/clis/juejin/login.js +1 -0
- package/clis/juejin/recommend.js +1 -0
- package/clis/juejin/stats.js +53 -0
- package/clis/juejin/tags.js +1 -0
- package/clis/juejin/utils.js +1 -0
- package/clis/juejin/whoami.js +1 -0
- package/clis/ke/auth.js +14 -0
- package/clis/ke/chengjiao.js +45 -0
- package/clis/ke/ershoufang.js +50 -0
- package/clis/ke/utils.js +21 -0
- package/clis/ke/xiaoqu.js +45 -0
- package/clis/ke/zufang.js +50 -0
- package/clis/kimi/_utils.js +38 -0
- package/clis/kimi/audit-extras.js +64 -0
- package/clis/kimi/auth.js +17 -0
- package/clis/kimi/chat.js +77 -0
- package/clis/kimi/storage.js +14 -0
- package/clis/kimi/ui.js +89 -0
- package/clis/kimi/usage.js +51 -0
- package/clis/kuaishou/auth.js +1 -0
- package/clis/kuaishou/publish.js +53 -0
- package/clis/lesswrong/_helpers.js +9 -0
- package/clis/lesswrong/comments.js +9 -0
- package/clis/lesswrong/curated.js +5 -0
- package/clis/lesswrong/frontpage.js +5 -0
- package/clis/lesswrong/new.js +5 -0
- package/clis/lesswrong/read.js +5 -0
- package/clis/lesswrong/sequences.js +5 -0
- package/clis/lesswrong/shortform.js +5 -0
- package/clis/lesswrong/tag.js +5 -0
- package/clis/lesswrong/tags.js +5 -0
- package/clis/lesswrong/top-month.js +5 -0
- package/clis/lesswrong/top-week.js +5 -0
- package/clis/lesswrong/top-year.js +5 -0
- package/clis/lesswrong/top.js +5 -0
- package/clis/lesswrong/user-posts.js +5 -0
- package/clis/lesswrong/user.js +5 -0
- package/clis/lichess/top.js +1 -0
- package/clis/lichess/user.js +1 -0
- package/clis/lichess/utils.js +1 -0
- package/clis/linkedin/auth.js +27 -0
- package/clis/linkedin/comment.js +1 -0
- package/clis/linkedin/connect.js +244 -0
- package/clis/linkedin/create.js +113 -0
- package/clis/linkedin/follow.js +1 -0
- package/clis/linkedin/inbox.js +1 -0
- package/clis/linkedin/job-detail.js +40 -0
- package/clis/linkedin/jobs-preferences.js +34 -0
- package/clis/linkedin/like.js +1 -0
- package/clis/linkedin/notifications.js +1 -0
- package/clis/linkedin/people-search.js +1 -0
- package/clis/linkedin/post-analytics.js +1 -0
- package/clis/linkedin/post-comments.js +1 -0
- package/clis/linkedin/post-detail.js +1 -0
- package/clis/linkedin/posts-core.js +138 -0
- package/clis/linkedin/posts.js +1 -0
- package/clis/linkedin/profile-analytics.js +1 -0
- package/clis/linkedin/profile-api.js +218 -0
- package/clis/linkedin/profile-experience.js +1 -0
- package/clis/linkedin/profile-projects.js +1 -0
- package/clis/linkedin/profile-read.js +3 -0
- package/clis/linkedin/reply.js +1 -0
- package/clis/linkedin/repost.js +1 -0
- package/clis/linkedin/safe-send.js +155 -0
- package/clis/linkedin/salesnav-inbox.js +21 -0
- package/clis/linkedin/salesnav-message.js +33 -0
- package/clis/linkedin/salesnav-search.js +15 -0
- package/clis/linkedin/salesnav-thread.js +1 -0
- package/clis/linkedin/search-api.js +42 -0
- package/clis/linkedin/search.js +50 -0
- package/clis/linkedin/sent-invitations.js +46 -0
- package/clis/linkedin/services-read.js +57 -0
- package/clis/linkedin/shared.js +10 -0
- package/clis/linkedin/social-api.js +260 -0
- package/clis/linkedin/thread-snapshot.js +81 -0
- package/clis/linkedin/timeline.js +37 -0
- package/clis/linkedin-learning/auth.js +27 -0
- package/clis/linkedin-learning/course.js +17 -0
- package/clis/linkedin-learning/search.js +17 -0
- package/clis/linkedin-learning/trending.js +17 -0
- package/clis/linux-do/auth.js +20 -0
- package/clis/linux-do/categories.js +1 -0
- package/clis/linux-do/feed.js +19 -0
- package/clis/linux-do/search.js +1 -0
- package/clis/linux-do/tags.js +1 -0
- package/clis/linux-do/topic-content.js +28 -0
- package/clis/linux-do/topic.js +1 -0
- package/clis/linux-do/user-posts.js +1 -0
- package/clis/linux-do/user-topics.js +1 -0
- package/clis/lobsters/active.js +1 -0
- package/clis/lobsters/domain.js +1 -0
- package/clis/lobsters/hot.js +1 -0
- package/clis/lobsters/newest.js +1 -0
- package/clis/lobsters/read.js +11 -0
- package/clis/lobsters/tag.js +1 -0
- package/clis/maimai/auth.js +19 -0
- package/clis/maimai/search-talents.js +37 -0
- package/clis/manus/_utils.js +28 -0
- package/clis/manus/auth.js +20 -0
- package/clis/manus/connectors.js +4 -0
- package/clis/manus/credits.js +4 -0
- package/clis/manus/list.js +7 -0
- package/clis/manus/read.js +7 -0
- package/clis/manus/skills.js +4 -0
- package/clis/manus/status.js +8 -0
- package/clis/mastodon/post.js +1 -0
- package/clis/mastodon/shared.js +48 -0
- package/clis/mastodon/whoami.js +1 -0
- package/clis/maven/artifact.js +1 -0
- package/clis/maven/search.js +1 -0
- package/clis/maven/utils.js +1 -0
- package/clis/mdn/search.js +1 -0
- package/clis/medium/article.js +12 -0
- package/clis/medium/feed.js +1 -0
- package/clis/medium/login.js +1 -0
- package/clis/medium/search.js +1 -0
- package/clis/medium/stats.js +56 -0
- package/clis/medium/tag.js +1 -0
- package/clis/medium/user.js +1 -0
- package/clis/medium/utils.js +62 -0
- package/clis/medium/whoami.js +1 -0
- package/clis/mubu/doc.js +1 -0
- package/clis/mubu/docs.js +1 -0
- package/clis/mubu/notes.js +1 -0
- package/clis/mubu/recent.js +1 -0
- package/clis/mubu/search.js +1 -0
- package/clis/mubu/utils.js +31 -0
- package/clis/note/auth.js +12 -0
- package/clis/note/note-utils.js +2 -0
- package/clis/note/publish.js +17 -0
- package/clis/notebooklm/add-source.js +46 -0
- package/clis/notebooklm/auth.js +21 -0
- package/clis/notebooklm/create.js +1 -0
- package/clis/notebooklm/current.js +1 -0
- package/clis/notebooklm/generate-audio.js +1 -0
- package/clis/notebooklm/generate-slides.js +1 -0
- package/clis/notebooklm/get.js +1 -0
- package/clis/notebooklm/history.js +1 -0
- package/clis/notebooklm/list.js +1 -0
- package/clis/notebooklm/note-list.js +1 -0
- package/clis/notebooklm/notes-get.js +1 -0
- package/clis/notebooklm/open.js +1 -0
- package/clis/notebooklm/rpc.js +36 -0
- package/clis/notebooklm/shared.js +1 -0
- package/clis/notebooklm/source-fulltext.js +1 -0
- package/clis/notebooklm/source-get.js +1 -0
- package/clis/notebooklm/source-guide.js +1 -0
- package/clis/notebooklm/source-list.js +1 -0
- package/clis/notebooklm/status.js +1 -0
- package/clis/notebooklm/summary.js +1 -0
- package/clis/notebooklm/utils.js +172 -0
- package/clis/notebooklm/write-note.js +1 -0
- package/clis/nowcoder/auth.js +24 -0
- package/clis/nowcoder/comment.js +1 -0
- package/clis/nowcoder/comments.js +1 -0
- package/clis/nowcoder/companies.js +1 -0
- package/clis/nowcoder/creators.js +1 -0
- package/clis/nowcoder/delete.js +1 -0
- package/clis/nowcoder/detail.js +46 -0
- package/clis/nowcoder/dm-list.js +1 -0
- package/clis/nowcoder/dm-read.js +1 -0
- package/clis/nowcoder/dm-send.js +1 -0
- package/clis/nowcoder/drafts.js +1 -0
- package/clis/nowcoder/experience.js +20 -0
- package/clis/nowcoder/hot.js +1 -0
- package/clis/nowcoder/inbox.js +1 -0
- package/clis/nowcoder/jobs.js +1 -0
- package/clis/nowcoder/like.js +1 -0
- package/clis/nowcoder/my.js +1 -0
- package/clis/nowcoder/notifications.js +16 -0
- package/clis/nowcoder/papers.js +22 -0
- package/clis/nowcoder/post.js +1 -0
- package/clis/nowcoder/practice.js +21 -0
- package/clis/nowcoder/recommend.js +1 -0
- package/clis/nowcoder/referral.js +21 -0
- package/clis/nowcoder/salary.js +22 -0
- package/clis/nowcoder/search.js +31 -0
- package/clis/nowcoder/suggest.js +17 -0
- package/clis/nowcoder/topics.js +1 -0
- package/clis/nowcoder/trending.js +1 -0
- package/clis/nowcoder/utils.js +68 -0
- package/clis/npm/downloads.js +1 -0
- package/clis/npm/package.js +1 -0
- package/clis/npm/search.js +1 -0
- package/clis/npm/utils.js +1 -0
- package/clis/nuget/package.js +1 -0
- package/clis/nuget/search.js +1 -0
- package/clis/nuget/utils.js +1 -0
- package/clis/nvd/cve.js +1 -0
- package/clis/oeis/search.js +1 -0
- package/clis/oeis/sequence.js +1 -0
- package/clis/oeis/utils.js +1 -0
- package/clis/ones/common.js +23 -0
- package/clis/ones/enrich-tasks.js +1 -0
- package/clis/ones/login.js +2 -0
- package/clis/ones/logout.js +1 -0
- package/clis/ones/me.js +1 -0
- package/clis/ones/my-tasks.js +1 -0
- package/clis/ones/resolve-labels.js +1 -0
- package/clis/ones/task-helpers.js +1 -0
- package/clis/ones/task.js +1 -0
- package/clis/ones/tasks.js +1 -0
- package/clis/ones/token-info.js +1 -0
- package/clis/ones/worklog.js +14 -0
- package/clis/openalex/search.js +1 -0
- package/clis/openalex/utils.js +1 -0
- package/clis/openalex/work.js +1 -0
- package/clis/openfda/drug-label.js +1 -0
- package/clis/openfda/food-recall.js +1 -0
- package/clis/openfda/utils.js +1 -0
- package/clis/openreview/author.js +1 -0
- package/clis/openreview/paper.js +1 -0
- package/clis/openreview/reviews.js +4 -0
- package/clis/openreview/search.js +1 -0
- package/clis/openreview/utils.js +1 -0
- package/clis/openreview/venue.js +1 -0
- package/clis/oschina/article.js +1 -0
- package/clis/oschina/catalogs.js +1 -0
- package/clis/oschina/login.js +1 -0
- package/clis/oschina/stats.js +54 -0
- package/clis/oschina/whoami.js +1 -0
- package/clis/osv/query.js +1 -0
- package/clis/osv/utils.js +1 -0
- package/clis/osv/vulnerability.js +1 -0
- package/clis/packagist/package.js +1 -0
- package/clis/packagist/search.js +1 -0
- package/clis/packagist/utils.js +1 -0
- package/clis/paperreview/feedback.js +1 -0
- package/clis/paperreview/review.js +1 -0
- package/clis/paperreview/submit.js +1 -0
- package/clis/paperreview/utils.js +1 -0
- package/clis/pinterest/api.js +1 -0
- package/clis/pinterest/auth.js +1 -0
- package/clis/pinterest/boards.js +1 -0
- package/clis/pinterest/client.js +20 -0
- package/clis/pinterest/publish.js +13 -0
- package/clis/pixiv/auth.js +17 -0
- package/clis/pixiv/detail.js +1 -0
- package/clis/pixiv/download.js +1 -0
- package/clis/pixiv/illusts.js +1 -0
- package/clis/pixiv/ranking.js +26 -0
- package/clis/pixiv/search.js +1 -0
- package/clis/pixiv/user.js +1 -0
- package/clis/pixiv/utils.js +18 -0
- package/clis/powerchina/auth.js +17 -0
- package/clis/powerchina/search.js +1 -0
- package/clis/producthunt/browse.js +54 -0
- package/clis/producthunt/hot.js +64 -0
- package/clis/producthunt/posts.js +1 -0
- package/clis/producthunt/today.js +1 -0
- package/clis/producthunt/utils.js +1 -0
- package/clis/pubmed/article.js +1 -0
- package/clis/pubmed/author.js +1 -0
- package/clis/pubmed/citations.js +1 -0
- package/clis/pubmed/clinical-trial.js +1 -0
- package/clis/pubmed/journal.js +1 -0
- package/clis/pubmed/mesh.js +1 -0
- package/clis/pubmed/related.js +1 -0
- package/clis/pubmed/review.js +1 -0
- package/clis/pubmed/search.js +1 -0
- package/clis/pubmed/utils.js +1 -0
- package/clis/pypi/downloads.js +1 -0
- package/clis/pypi/package.js +1 -0
- package/clis/pypi/utils.js +1 -0
- package/clis/qiita/auth.js +1 -0
- package/clis/qiita/gql.js +32 -0
- package/clis/qiita/publish.js +7 -0
- package/clis/qiita/stats.js +37 -0
- package/clis/qoder/_utils.js +113 -0
- package/clis/qoder/composer.js +1 -0
- package/clis/qoder/history.js +25 -0
- package/clis/qoder/quest.js +1 -0
- package/clis/qoder/read.js +1 -0
- package/clis/qoder/status.js +1 -0
- package/clis/qoder/ui.js +59 -0
- package/clis/quark/auth.js +16 -0
- package/clis/quark/ls.js +1 -0
- package/clis/quark/mkdir.js +1 -0
- package/clis/quark/mv.js +1 -0
- package/clis/quark/rename.js +1 -0
- package/clis/quark/rm.js +1 -0
- package/clis/quark/save.js +1 -0
- package/clis/quark/share-tree.js +1 -0
- package/clis/quark/utils.js +13 -0
- package/clis/quora/create-answer.js +22 -0
- package/clis/quora/create-question.js +24 -0
- package/clis/quora/shared.js +43 -0
- package/clis/quora/whoami.js +1 -0
- package/clis/qwen/ask.js +1 -0
- package/clis/qwen/auth.js +17 -0
- package/clis/qwen/detail.js +1 -0
- package/clis/qwen/history.js +1 -0
- package/clis/qwen/image.js +31 -0
- package/clis/qwen/new.js +1 -0
- package/clis/qwen/read.js +1 -0
- package/clis/qwen/send.js +1 -0
- package/clis/qwen/status.js +1 -0
- package/clis/qwen/utils.js +185 -0
- package/clis/reddit/auth.js +17 -0
- package/clis/reddit/comment.js +36 -0
- package/clis/reddit/frontpage.js +40 -0
- package/clis/reddit/home.js +32 -0
- package/clis/reddit/hot.js +46 -0
- package/clis/reddit/popular.js +46 -0
- package/clis/reddit/read.js +398 -0
- package/clis/reddit/reply.js +56 -0
- package/clis/reddit/save.js +30 -0
- package/clis/reddit/saved.js +24 -0
- package/clis/reddit/search.js +51 -0
- package/clis/reddit/submit.js +42 -0
- package/clis/reddit/subreddit-info.js +29 -0
- package/clis/reddit/subreddit.js +52 -0
- package/clis/reddit/subscribe.js +29 -0
- package/clis/reddit/subscribed.js +68 -0
- package/clis/reddit/upvote.js +43 -0
- package/clis/reddit/upvoted.js +24 -0
- package/clis/reddit/user-comments.js +20 -0
- package/clis/reddit/user-posts.js +17 -0
- package/clis/reddit/user.js +20 -0
- package/clis/reddit/whoami.js +19 -0
- package/clis/rednote/auth.js +19 -0
- package/clis/rednote/comments.js +1 -0
- package/clis/rednote/download.js +1 -0
- package/clis/rednote/feed.js +1 -0
- package/clis/rednote/note.js +1 -0
- package/clis/rednote/notifications.js +67 -0
- package/clis/rednote/search.js +32 -0
- package/clis/rednote/user.js +1 -0
- package/clis/rest-countries/country.js +1 -0
- package/clis/rest-countries/region.js +1 -0
- package/clis/rest-countries/utils.js +1 -0
- package/clis/reuters/article-detail.js +1 -0
- package/clis/reuters/auth.js +39 -0
- package/clis/reuters/search.js +1 -0
- package/clis/reuters/utils.js +50 -0
- package/clis/rfc/rfc.js +1 -0
- package/clis/rfc/utils.js +1 -0
- package/clis/rubygems/gem.js +1 -0
- package/clis/rubygems/search.js +1 -0
- package/clis/rubygems/utils.js +1 -0
- package/clis/segmentfault/_signed-request.js +43 -0
- package/clis/segmentfault/article.js +3 -0
- package/clis/segmentfault/channels.js +1 -0
- package/clis/segmentfault/login.js +1 -0
- package/clis/segmentfault/stats.js +82 -0
- package/clis/segmentfault/tags.js +1 -0
- package/clis/segmentfault/whoami.js +1 -0
- package/clis/semanticscholar/citations.js +1 -0
- package/clis/semanticscholar/paper.js +1 -0
- package/clis/semanticscholar/recommendations.js +1 -0
- package/clis/semanticscholar/search.js +1 -0
- package/clis/semanticscholar/utils.js +1 -0
- package/clis/sinablog/article.js +1 -0
- package/clis/sinablog/hot.js +1 -0
- package/clis/sinablog/search.js +1 -0
- package/clis/sinablog/user.js +1 -0
- package/clis/sinablog/utils.js +153 -0
- package/clis/sinafinance/news.js +1 -0
- package/clis/sinafinance/rolling-news.js +20 -0
- package/clis/sinafinance/stock-rank.js +41 -0
- package/clis/sinafinance/stock.js +1 -0
- package/clis/slock/attachment-download.js +1 -0
- package/clis/slock/attachment-upload.js +34 -0
- package/clis/slock/attachment-url.js +1 -0
- package/clis/slock/auth-verify.js +1 -0
- package/clis/slock/bookmark-add.js +11 -0
- package/clis/slock/bookmark-list.js +10 -0
- package/clis/slock/bookmark-remove.js +7 -0
- package/clis/slock/channel-action.js +1 -0
- package/clis/slock/channel-archive.js +1 -0
- package/clis/slock/channel-create.js +1 -0
- package/clis/slock/channel-files.js +1 -0
- package/clis/slock/channel-info.js +1 -0
- package/clis/slock/channel-join.js +1 -0
- package/clis/slock/channel-leave.js +1 -0
- package/clis/slock/channel-list.js +1 -0
- package/clis/slock/channel-mark.js +1 -0
- package/clis/slock/channel-members.js +1 -0
- package/clis/slock/channel-unarchive.js +1 -0
- package/clis/slock/dm-list.js +1 -0
- package/clis/slock/errors.js +1 -0
- package/clis/slock/in-page.js +113 -0
- package/clis/slock/inbox-done.js +9 -0
- package/clis/slock/inbox-read-all.js +1 -0
- package/clis/slock/inbox.js +1 -0
- package/clis/slock/login.js +1 -0
- package/clis/slock/message-read.js +61 -0
- package/clis/slock/message-search.js +24 -0
- package/clis/slock/message-send.js +55 -0
- package/clis/slock/reaction-add.js +1 -0
- package/clis/slock/reaction-remove.js +1 -0
- package/clis/slock/resolve.js +1 -0
- package/clis/slock/server-list.js +9 -0
- package/clis/slock/server-use.js +18 -0
- package/clis/slock/shared.js +1 -0
- package/clis/slock/task-claim.js +14 -0
- package/clis/slock/task-convert.js +35 -0
- package/clis/slock/task-create.js +24 -0
- package/clis/slock/task-delete.js +9 -0
- package/clis/slock/task-get.js +11 -0
- package/clis/slock/task-list-server.js +12 -0
- package/clis/slock/task-list.js +14 -0
- package/clis/slock/task-status.js +19 -0
- package/clis/slock/task-unclaim.js +13 -0
- package/clis/slock/thread-done.js +1 -0
- package/clis/slock/thread-follow.js +1 -0
- package/clis/slock/thread-list.js +1 -0
- package/clis/slock/thread-state.js +1 -0
- package/clis/slock/thread-undone.js +1 -0
- package/clis/slock/thread-unfollow.js +1 -0
- package/clis/slock/unread-summary.js +18 -0
- package/clis/slock/whoami.js +1 -0
- package/clis/smzdm/search.js +71 -0
- package/clis/sohu/article.js +1 -0
- package/clis/sohu/attributes.js +1 -0
- package/clis/sohu/categories.js +1 -0
- package/clis/sohu/channels.js +1 -0
- package/clis/sohu/columns.js +1 -0
- package/clis/sohu/login.js +1 -0
- package/clis/sohu/mpbp.js +1 -0
- package/clis/sohu/stats.js +95 -0
- package/clis/sohu/topics.js +1 -0
- package/clis/sohu/whoami.js +1 -0
- package/clis/spotify/spotify.js +1 -0
- package/clis/spotify/utils.js +8 -0
- package/clis/stackoverflow/bounties.js +1 -0
- package/clis/stackoverflow/hot.js +1 -0
- package/clis/stackoverflow/read.js +13 -0
- package/clis/stackoverflow/related.js +1 -0
- package/clis/stackoverflow/search.js +1 -0
- package/clis/stackoverflow/tag.js +1 -0
- package/clis/stackoverflow/unanswered.js +1 -0
- package/clis/stackoverflow/user.js +1 -0
- package/clis/stackoverflow/utils.js +1 -0
- package/clis/steam/app.js +1 -0
- package/clis/steam/search.js +1 -0
- package/clis/steam/top-sellers.js +1 -0
- package/clis/steam/utils.js +1 -0
- package/clis/substack/auth.js +11 -0
- package/clis/substack/feed.js +1 -0
- package/clis/substack/post-utils.js +2 -0
- package/clis/substack/publication.js +1 -0
- package/clis/substack/publish.js +10 -0
- package/clis/substack/search.js +1 -0
- package/clis/substack/utils.js +108 -0
- package/clis/suno/auth.js +21 -0
- package/clis/suno/download.js +17 -0
- package/clis/suno/generate.js +4 -0
- package/clis/suno/list.js +14 -0
- package/clis/suno/status.js +1 -0
- package/clis/suno/utils.js +102 -0
- package/clis/taobao/add-cart.js +93 -0
- package/clis/taobao/auth.js +8 -0
- package/clis/taobao/cart.js +68 -0
- package/clis/taobao/detail.js +48 -0
- package/clis/taobao/reviews.js +52 -0
- package/clis/taobao/search.js +64 -0
- package/clis/tdx/hot-rank.js +25 -0
- package/clis/telegram/send.js +18 -0
- package/clis/telegram/shared.js +21 -0
- package/clis/telegram/whoami.js +1 -0
- package/clis/test-utils.js +1 -0
- package/clis/threads/post.js +152 -0
- package/clis/threads/shared.js +27 -0
- package/clis/threads/whoami.js +1 -0
- package/clis/ths/hot-rank.js +27 -0
- package/clis/tieba/hot.js +16 -0
- package/clis/tieba/posts.js +1 -0
- package/clis/tieba/read.js +84 -0
- package/clis/tieba/search.js +54 -0
- package/clis/tieba/utils.js +1 -0
- package/clis/tiktok/auth.js +30 -0
- package/clis/tiktok/comment.js +69 -0
- package/clis/tiktok/creator-videos.js +45 -0
- package/clis/tiktok/explore.js +76 -0
- package/clis/tiktok/follow.js +49 -0
- package/clis/tiktok/following.js +103 -0
- package/clis/tiktok/friends.js +79 -0
- package/clis/tiktok/like.js +19 -0
- package/clis/tiktok/live.js +79 -0
- package/clis/tiktok/notifications.js +77 -0
- package/clis/tiktok/profile.js +26 -0
- package/clis/tiktok/publish.js +82 -0
- package/clis/tiktok/save.js +15 -0
- package/clis/tiktok/search.js +24 -0
- package/clis/tiktok/unfollow.js +59 -0
- package/clis/tiktok/unlike.js +19 -0
- package/clis/tiktok/unsave.js +17 -0
- package/clis/tiktok/user.js +143 -0
- package/clis/tiktok/utils.js +272 -0
- package/clis/toutiao/article.js +1 -0
- package/clis/toutiao/articles.js +6 -0
- package/clis/toutiao/auth.js +50 -0
- package/clis/toutiao/hot.js +1 -0
- package/clis/toutiao/utils.js +2 -0
- package/clis/trae-cn/activity.js +1 -0
- package/clis/trae-cn/approve.js +1 -0
- package/clis/trae-cn/ask.js +1 -0
- package/clis/trae-cn/dump.js +1 -0
- package/clis/trae-cn/export.js +3 -0
- package/clis/trae-cn/model.js +1 -0
- package/clis/trae-cn/new.js +1 -0
- package/clis/trae-cn/read.js +1 -0
- package/clis/trae-cn/screenshot.js +1 -0
- package/clis/trae-cn/select-model.js +1 -0
- package/clis/trae-cn/send.js +1 -0
- package/clis/trae-cn/setup.js +1 -0
- package/clis/trae-cn/status.js +1 -0
- package/clis/trae-cn/targets.js +1 -0
- package/clis/trae-cn/utils.js +456 -0
- package/clis/trae-cn/watch.js +3 -0
- package/clis/trae-solo/_actions.js +41 -0
- package/clis/trae-solo/_fs.js +6 -0
- package/clis/trae-solo/_state.js +2 -0
- package/clis/trae-solo/automation.js +43 -0
- package/clis/trae-solo/history.js +15 -0
- package/clis/trae-solo/mode.js +31 -0
- package/clis/trae-solo/model.js +50 -0
- package/clis/trae-solo/renderer-storage.js +11 -0
- package/clis/trae-solo/settings.js +1 -0
- package/clis/trae-solo/skill-fs.js +1 -0
- package/clis/trae-solo/skill.js +81 -0
- package/clis/trae-solo/state-fs.js +2 -0
- package/clis/trae-solo/status.js +1 -0
- package/clis/trae-solo/task-fs.js +5 -0
- package/clis/trae-solo/user-rules.js +1 -0
- package/clis/trae-solo/workspaces-fs.js +1 -0
- package/clis/tumblr/auth.js +24 -0
- package/clis/tumblr/publish.js +14 -0
- package/clis/tvmaze/search.js +1 -0
- package/clis/tvmaze/show.js +1 -0
- package/clis/tvmaze/utils.js +1 -0
- package/clis/twitter/accept.js +116 -0
- package/clis/twitter/article.js +116 -0
- package/clis/twitter/auth.js +4 -0
- package/clis/twitter/block.js +62 -0
- package/clis/twitter/bookmark-folder.js +4 -0
- package/clis/twitter/bookmark-folders.js +4 -0
- package/clis/twitter/bookmark.js +44 -0
- package/clis/twitter/bookmarks.js +27 -0
- package/clis/twitter/delete.js +36 -0
- package/clis/twitter/device-follow.js +13 -0
- package/clis/twitter/dm-list.js +1 -0
- package/clis/twitter/dm-read.js +1 -0
- package/clis/twitter/dm-send.js +13 -0
- package/clis/twitter/dm-shared.js +6 -0
- package/clis/twitter/download.js +38 -0
- package/clis/twitter/follow-batch.js +43 -0
- package/clis/twitter/follow.js +39 -0
- package/clis/twitter/followers.js +59 -0
- package/clis/twitter/following.js +4 -0
- package/clis/twitter/hide-reply.js +57 -0
- package/clis/twitter/like.js +48 -0
- package/clis/twitter/likes.js +14 -0
- package/clis/twitter/list-add-batch.js +1 -0
- package/clis/twitter/list-add-core.js +35 -0
- package/clis/twitter/list-add.js +1 -0
- package/clis/twitter/list-batch-utils.js +1 -0
- package/clis/twitter/list-create.js +12 -0
- package/clis/twitter/list-delete.js +36 -0
- package/clis/twitter/list-remove-batch.js +1 -0
- package/clis/twitter/list-remove-core.js +127 -0
- package/clis/twitter/list-remove.js +1 -0
- package/clis/twitter/list-tweets.js +27 -0
- package/clis/twitter/lists.js +27 -0
- package/clis/twitter/notifications.js +4 -0
- package/clis/twitter/post.js +158 -0
- package/clis/twitter/profile.js +66 -0
- package/clis/twitter/quote.js +123 -0
- package/clis/twitter/reply-dm.js +112 -0
- package/clis/twitter/reply.js +97 -0
- package/clis/twitter/retweet.js +62 -0
- package/clis/twitter/schedule.js +96 -0
- package/clis/twitter/scheduled-delete.js +60 -0
- package/clis/twitter/scheduled-list.js +15 -0
- package/clis/twitter/scheduled-utils.js +18 -0
- package/clis/twitter/search.js +12 -0
- package/clis/twitter/shared.js +76 -0
- package/clis/twitter/thread.js +4 -0
- package/clis/twitter/timeline.js +4 -0
- package/clis/twitter/trending.js +18 -0
- package/clis/twitter/tweets.js +12 -0
- package/clis/twitter/unblock.js +45 -0
- package/clis/twitter/unbookmark.js +41 -0
- package/clis/twitter/unfollow.js +45 -0
- package/clis/twitter/unlike.js +48 -0
- package/clis/twitter/unretweet.js +62 -0
- package/clis/twitter/utils.js +55 -0
- package/clis/uisdc/news.js +25 -0
- package/clis/uiverse/_shared.js +257 -0
- package/clis/uiverse/code.js +1 -0
- package/clis/uiverse/preview.js +1 -0
- package/clis/upwork/auth.js +19 -0
- package/clis/upwork/detail.js +22 -0
- package/clis/upwork/feed.js +21 -0
- package/clis/upwork/search.js +21 -0
- package/clis/upwork/utils.js +1 -0
- package/clis/v2ex/auth.js +10 -0
- package/clis/v2ex/daily.js +41 -0
- package/clis/v2ex/hot.js +1 -0
- package/clis/v2ex/latest.js +1 -0
- package/clis/v2ex/me.js +58 -0
- package/clis/v2ex/member.js +1 -0
- package/clis/v2ex/node.js +1 -0
- package/clis/v2ex/nodes.js +1 -0
- package/clis/v2ex/notifications.js +40 -0
- package/clis/v2ex/replies.js +1 -0
- package/clis/v2ex/topic.js +1 -0
- package/clis/v2ex/user.js +1 -0
- package/clis/vk/post.js +1 -0
- package/clis/vk/shared.js +8 -0
- package/clis/vk/whoami.js +1 -0
- package/clis/wanfang/search.js +42 -0
- package/clis/web/read.js +260 -0
- package/clis/wechat-channels/auth.js +31 -0
- package/clis/wechat-channels/publish.js +298 -0
- package/clis/weibo/article.js +1 -0
- package/clis/weibo/auth.js +17 -0
- package/clis/weibo/comments.js +28 -0
- package/clis/weibo/delete.js +84 -0
- package/clis/weibo/favorites.js +27 -0
- package/clis/weibo/feed.js +33 -0
- package/clis/weibo/hot.js +17 -0
- package/clis/weibo/me.js +51 -0
- package/clis/weibo/post.js +46 -0
- package/clis/weibo/publish.js +98 -0
- package/clis/weibo/search.js +47 -0
- package/clis/weibo/user-posts.js +92 -0
- package/clis/weibo/user.js +37 -0
- package/clis/weibo/utils.js +16 -0
- package/clis/weixin/article.js +1 -0
- package/clis/weixin/create-draft.js +152 -0
- package/clis/weixin/download.js +100 -0
- package/clis/weixin/drafts.js +27 -0
- package/clis/weixin/login.js +1 -0
- package/clis/weixin/search.js +44 -0
- package/clis/weixin/stats.js +43 -0
- package/clis/weixin/whoami.js +1 -0
- package/clis/weread/ai-outline.js +2 -0
- package/clis/weread/auth.js +24 -0
- package/clis/weread/book-search.js +2 -0
- package/clis/weread/book.js +3 -0
- package/clis/weread/highlights.js +1 -0
- package/clis/weread/notebooks.js +1 -0
- package/clis/weread/notes.js +1 -0
- package/clis/weread/ranking.js +1 -0
- package/clis/weread/search.js +1 -0
- package/clis/weread/shelf.js +1 -0
- package/clis/weread/utils.js +67 -0
- package/clis/weread-official/book.js +1 -0
- package/clis/weread-official/discover.js +1 -0
- package/clis/weread-official/list-apis.js +1 -0
- package/clis/weread-official/notes.js +1 -0
- package/clis/weread-official/readdata.js +1 -0
- package/clis/weread-official/review.js +1 -0
- package/clis/weread-official/search.js +1 -0
- package/clis/weread-official/shelf.js +1 -0
- package/clis/weread-official/utils.js +1 -0
- package/clis/wikidata/entity.js +1 -0
- package/clis/wikidata/search.js +1 -0
- package/clis/wikidata/utils.js +1 -0
- package/clis/wikipedia/page.js +3 -0
- package/clis/wikipedia/random.js +1 -0
- package/clis/wikipedia/search.js +1 -0
- package/clis/wikipedia/summary.js +1 -0
- package/clis/wikipedia/trending.js +1 -0
- package/clis/wikipedia/utils.js +1 -0
- package/clis/wordpress/login.js +1 -0
- package/clis/wordpress/publish.js +1 -0
- package/clis/wordpress/shared.js +54 -0
- package/clis/wordpress/whoami.js +1 -0
- package/clis/woshipm/article.js +1 -0
- package/clis/woshipm/login.js +1 -0
- package/clis/woshipm/stats.js +52 -0
- package/clis/woshipm/whoami.js +1 -0
- package/clis/wttr/current.js +1 -0
- package/clis/wttr/forecast.js +1 -0
- package/clis/wttr/utils.js +1 -0
- package/clis/xianyu/auth.js +11 -0
- package/clis/xianyu/chat.js +1 -0
- package/clis/xianyu/im.js +240 -0
- package/clis/xianyu/inbox.js +1 -0
- package/clis/xianyu/item.js +97 -0
- package/clis/xianyu/messages.js +1 -0
- package/clis/xianyu/publish.js +245 -0
- package/clis/xianyu/reply.js +1 -0
- package/clis/xianyu/search.js +141 -0
- package/clis/xianyu/utils.js +1 -0
- package/clis/xiaoe/auth.js +10 -0
- package/clis/xiaoe/catalog.js +134 -0
- package/clis/xiaoe/content.js +16 -0
- package/clis/xiaoe/courses.js +43 -0
- package/clis/xiaoe/detail.js +19 -0
- package/clis/xiaoe/play-url.js +97 -0
- package/clis/xiaohongshu/ask.js +130 -0
- package/clis/xiaohongshu/auth.js +13 -0
- package/clis/xiaohongshu/collection-helpers.js +64 -0
- package/clis/xiaohongshu/comments.js +89 -0
- package/clis/xiaohongshu/creator-note-detail.js +80 -0
- package/clis/xiaohongshu/creator-notes-summary.js +1 -0
- package/clis/xiaohongshu/creator-notes.js +107 -0
- package/clis/xiaohongshu/creator-profile.js +13 -0
- package/clis/xiaohongshu/creator-stats.js +13 -0
- package/clis/xiaohongshu/delete-note.js +69 -0
- package/clis/xiaohongshu/download.js +200 -0
- package/clis/xiaohongshu/draft-clear.js +44 -0
- package/clis/xiaohongshu/draft-delete.js +37 -0
- package/clis/xiaohongshu/draft-open.js +1 -0
- package/clis/xiaohongshu/draft-utils.js +36 -0
- package/clis/xiaohongshu/drafts.js +1 -0
- package/clis/xiaohongshu/feed.js +38 -0
- package/clis/xiaohongshu/follow.js +75 -0
- package/clis/xiaohongshu/liked.js +1 -0
- package/clis/xiaohongshu/note-helpers.js +1 -0
- package/clis/xiaohongshu/note.js +32 -0
- package/clis/xiaohongshu/notifications.js +1 -0
- package/clis/xiaohongshu/publish-video.js +87 -0
- package/clis/xiaohongshu/publish.js +637 -0
- package/clis/xiaohongshu/saved.js +1 -0
- package/clis/xiaohongshu/search.js +194 -0
- package/clis/xiaohongshu/unfollow.js +98 -0
- package/clis/xiaohongshu/user-helpers.js +1 -0
- package/clis/xiaohongshu/user.js +30 -0
- package/clis/xiaoyuzhou/auth.js +3 -0
- package/clis/xiaoyuzhou/download.js +1 -0
- package/clis/xiaoyuzhou/episode.js +1 -0
- package/clis/xiaoyuzhou/podcast-episodes.js +1 -0
- package/clis/xiaoyuzhou/podcast.js +1 -0
- package/clis/xiaoyuzhou/transcript.js +1 -0
- package/clis/xiaoyuzhou/utils.js +1 -0
- package/clis/xueqiu/article.js +4 -0
- package/clis/xueqiu/auth.js +27 -0
- package/clis/xueqiu/comments.js +38 -0
- package/clis/xueqiu/danjuan-utils.js +84 -0
- package/clis/xueqiu/earnings-date.js +1 -0
- package/clis/xueqiu/events.js +17 -0
- package/clis/xueqiu/feed.js +1 -0
- package/clis/xueqiu/fund-holdings.js +1 -0
- package/clis/xueqiu/fund-snapshot.js +1 -0
- package/clis/xueqiu/groups.js +1 -0
- package/clis/xueqiu/hashtags.js +26 -0
- package/clis/xueqiu/hot-stock.js +1 -0
- package/clis/xueqiu/hot.js +1 -0
- package/clis/xueqiu/kline.js +1 -0
- package/clis/xueqiu/search.js +1 -0
- package/clis/xueqiu/stock.js +1 -0
- package/clis/xueqiu/stocks.js +13 -0
- package/clis/xueqiu/users.js +12 -0
- package/clis/xueqiu/utils.js +9 -0
- package/clis/xueqiu/watchlist.js +1 -0
- package/clis/yahoo/search.js +21 -0
- package/clis/yahoo-finance/quote.js +50 -0
- package/clis/yollomi/background.js +1 -0
- package/clis/yollomi/edit.js +1 -0
- package/clis/yollomi/face-swap.js +1 -0
- package/clis/yollomi/generate.js +1 -0
- package/clis/yollomi/models.js +1 -0
- package/clis/yollomi/object-remover.js +1 -0
- package/clis/yollomi/remove-bg.js +1 -0
- package/clis/yollomi/restore.js +1 -0
- package/clis/yollomi/try-on.js +1 -0
- package/clis/yollomi/upload.js +17 -0
- package/clis/yollomi/upscale.js +1 -0
- package/clis/yollomi/utils.js +16 -0
- package/clis/yollomi/video.js +1 -0
- package/clis/youdao/note.js +113 -0
- package/clis/youtube/auth.js +20 -0
- package/clis/youtube/channel.js +118 -0
- package/clis/youtube/comments.js +64 -0
- package/clis/youtube/feed.js +89 -0
- package/clis/youtube/history.js +87 -0
- package/clis/youtube/like.js +33 -0
- package/clis/youtube/playlist.js +47 -0
- package/clis/youtube/publish.js +56 -0
- package/clis/youtube/search.js +39 -0
- package/clis/youtube/subscribe.js +42 -0
- package/clis/youtube/subscriptions.js +26 -0
- package/clis/youtube/transcript-group.js +2 -0
- package/clis/youtube/transcript.js +417 -0
- package/clis/youtube/unlike.js +33 -0
- package/clis/youtube/unsubscribe.js +42 -0
- package/clis/youtube/utils.js +34 -0
- package/clis/youtube/video.js +96 -0
- package/clis/youtube/watch-later.js +41 -0
- package/clis/yuanbao/ask.js +145 -0
- package/clis/yuanbao/auth.js +23 -0
- package/clis/yuanbao/detail.js +1 -0
- package/clis/yuanbao/history.js +1 -0
- package/clis/yuanbao/new.js +16 -0
- package/clis/yuanbao/read.js +1 -0
- package/clis/yuanbao/send.js +1 -0
- package/clis/yuanbao/shared.js +127 -0
- package/clis/yuanbao/status.js +1 -0
- package/clis/yuque/article.js +1 -0
- package/clis/yuque/whoami.js +1 -0
- package/clis/zhihu/answer-comments.js +11 -0
- package/clis/zhihu/answer-detail.js +11 -0
- package/clis/zhihu/answer.js +15 -0
- package/clis/zhihu/article-transform.js +1 -0
- package/clis/zhihu/article.js +7 -0
- package/clis/zhihu/auth.js +11 -0
- package/clis/zhihu/collection.js +7 -0
- package/clis/zhihu/collections.js +7 -0
- package/clis/zhihu/comment.js +17 -0
- package/clis/zhihu/download.js +39 -0
- package/clis/zhihu/favorite.js +39 -0
- package/clis/zhihu/follow.js +19 -0
- package/clis/zhihu/followers.js +1 -0
- package/clis/zhihu/following.js +1 -0
- package/clis/zhihu/hot.js +21 -0
- package/clis/zhihu/like.js +16 -0
- package/clis/zhihu/paginate.js +11 -0
- package/clis/zhihu/pin.js +24 -0
- package/clis/zhihu/pins.js +1 -0
- package/clis/zhihu/question.js +7 -0
- package/clis/zhihu/recommend.js +7 -0
- package/clis/zhihu/search.js +11 -0
- package/clis/zhihu/stats.js +41 -0
- package/clis/zhihu/target.js +1 -0
- package/clis/zhihu/text.js +6 -0
- package/clis/zhihu/user-answers.js +1 -0
- package/clis/zhihu/user-arg.js +1 -0
- package/clis/zhihu/user-articles.js +1 -0
- package/clis/zhihu/user.js +11 -0
- package/clis/zhihu/write-shared.js +71 -0
- package/clis/zlibrary/info.js +1 -0
- package/clis/zlibrary/search.js +1 -0
- package/clis/zlibrary/utils.js +48 -0
- package/clis/zsxq/auth.js +33 -0
- package/clis/zsxq/dynamics.js +1 -0
- package/clis/zsxq/groups.js +1 -0
- package/clis/zsxq/search.js +1 -0
- package/clis/zsxq/topic.js +1 -0
- package/clis/zsxq/topics.js +1 -0
- package/clis/zsxq/utils.js +72 -0
- package/dist/src/adapter-shadow.d.ts +11 -0
- package/dist/src/adapter-shadow.js +2 -0
- package/dist/src/adapter-shadow.test.d.ts +1 -0
- package/dist/src/adapter-source.d.ts +11 -0
- package/dist/src/adapter-source.js +1 -0
- package/dist/src/adapter-source.test.d.ts +1 -0
- package/dist/src/browser/analyze.d.ts +118 -0
- package/dist/src/browser/analyze.js +1 -0
- package/dist/src/browser/analyze.test.d.ts +1 -0
- package/dist/src/browser/article-extract.d.ts +57 -0
- package/dist/src/browser/article-extract.e2e.test.d.ts +1 -0
- package/dist/src/browser/article-extract.js +2 -0
- package/dist/src/browser/article-extract.test.d.ts +1 -0
- package/dist/src/browser/ax-snapshot.d.ts +37 -0
- package/dist/src/browser/ax-snapshot.js +2 -0
- package/dist/src/browser/ax-snapshot.test.d.ts +1 -0
- package/dist/src/browser/base-page.d.ts +151 -0
- package/dist/src/browser/base-page.js +225 -0
- package/dist/src/browser/base-page.test.d.ts +1 -0
- package/dist/src/browser/bridge-readiness.d.ts +14 -0
- package/dist/src/browser/bridge-readiness.js +1 -0
- package/dist/src/browser/bridge-readiness.test.d.ts +1 -0
- package/dist/src/browser/bridge.d.ts +26 -0
- package/dist/src/browser/bridge.js +1 -0
- package/dist/src/browser/cdp-click-fixture.test.d.ts +1 -0
- package/dist/src/browser/cdp.d.ts +51 -0
- package/dist/src/browser/cdp.js +1 -0
- package/dist/src/browser/cdp.test.d.ts +1 -0
- package/dist/src/browser/compound.d.ts +59 -0
- package/dist/src/browser/compound.js +82 -0
- package/dist/src/browser/compound.test.d.ts +1 -0
- package/dist/src/browser/config.d.ts +2 -0
- package/dist/src/browser/config.js +1 -0
- package/dist/src/browser/daemon-client.d.ts +79 -0
- package/dist/src/browser/daemon-client.js +1 -0
- package/dist/src/browser/daemon-client.test.d.ts +1 -0
- package/dist/src/browser/daemon-lifecycle.d.ts +37 -0
- package/dist/src/browser/daemon-lifecycle.js +12 -0
- package/dist/src/browser/daemon-transport.d.ts +55 -0
- package/dist/src/browser/daemon-transport.js +1 -0
- package/dist/src/browser/daemon-version.d.ts +4 -0
- package/dist/src/browser/daemon-version.js +2 -0
- package/dist/src/browser/dom-helpers.d.ts +41 -0
- package/dist/src/browser/dom-helpers.js +166 -0
- package/dist/src/browser/dom-helpers.test.d.ts +1 -0
- package/dist/src/browser/dom-snapshot.d.ts +93 -0
- package/dist/src/browser/dom-snapshot.js +809 -0
- package/dist/src/browser/dom-snapshot.test.d.ts +11 -0
- package/dist/src/browser/errors.d.ts +38 -0
- package/dist/src/browser/errors.js +5 -0
- package/dist/src/browser/errors.test.d.ts +1 -0
- package/dist/src/browser/extract.d.ts +69 -0
- package/dist/src/browser/extract.js +42 -0
- package/dist/src/browser/extract.test.d.ts +1 -0
- package/dist/src/browser/find.d.ts +84 -0
- package/dist/src/browser/find.js +328 -0
- package/dist/src/browser/find.test.d.ts +1 -0
- package/dist/src/browser/fingerprint.d.ts +44 -0
- package/dist/src/browser/fingerprint.js +82 -0
- package/dist/src/browser/html-tree.d.ts +75 -0
- package/dist/src/browser/html-tree.js +61 -0
- package/dist/src/browser/html-tree.test.d.ts +1 -0
- package/dist/src/browser/index.d.ts +14 -0
- package/dist/src/browser/index.js +1 -0
- package/dist/src/browser/managed-chrome.d.ts +89 -0
- package/dist/src/browser/managed-chrome.js +1 -0
- package/dist/src/browser/network-cache.d.ts +49 -0
- package/dist/src/browser/network-cache.js +1 -0
- package/dist/src/browser/network-cache.test.d.ts +1 -0
- package/dist/src/browser/network-key.d.ts +22 -0
- package/dist/src/browser/network-key.js +1 -0
- package/dist/src/browser/network-key.test.d.ts +1 -0
- package/dist/src/browser/page.d.ts +83 -0
- package/dist/src/browser/page.js +15 -0
- package/dist/src/browser/page.test.d.ts +1 -0
- package/dist/src/browser/profile.d.ts +96 -0
- package/dist/src/browser/profile.js +2 -0
- package/dist/src/browser/proxy-test.d.ts +28 -0
- package/dist/src/browser/proxy-test.js +12 -0
- package/dist/src/browser/shape-filter.d.ts +52 -0
- package/dist/src/browser/shape-filter.js +1 -0
- package/dist/src/browser/shape-filter.test.d.ts +1 -0
- package/dist/src/browser/shape.d.ts +23 -0
- package/dist/src/browser/shape.js +1 -0
- package/dist/src/browser/shape.test.d.ts +1 -0
- package/dist/src/browser/stealth.d.ts +18 -0
- package/dist/src/browser/stealth.js +391 -0
- package/dist/src/browser/stealth.test.d.ts +1 -0
- package/dist/src/browser/tabs.d.ts +13 -0
- package/dist/src/browser/tabs.js +2 -0
- package/dist/src/browser/target-errors.d.ts +39 -0
- package/dist/src/browser/target-errors.js +1 -0
- package/dist/src/browser/target-errors.test.d.ts +1 -0
- package/dist/src/browser/target-resolver.d.ts +158 -0
- package/dist/src/browser/target-resolver.js +423 -0
- package/dist/src/browser/target-resolver.test.d.ts +1 -0
- package/dist/src/browser/trace.d.ts +21 -0
- package/dist/src/browser/trace.js +2 -0
- package/dist/src/browser/utils.d.ts +20 -0
- package/dist/src/browser/utils.js +1 -0
- package/dist/src/browser/utils.test.d.ts +1 -0
- package/dist/src/browser/verify-fixture.d.ts +65 -0
- package/dist/src/browser/verify-fixture.js +2 -0
- package/dist/src/browser/verify-fixture.test.d.ts +1 -0
- package/dist/src/browser/visual-refs.d.ts +11 -0
- package/dist/src/browser/visual-refs.js +94 -0
- package/dist/src/browser-session-lock.d.ts +13 -0
- package/dist/src/browser-session-lock.js +1 -0
- package/dist/src/browser-session-lock.test.d.ts +1 -0
- package/dist/src/browser.test.d.ts +1 -0
- package/dist/src/build-manifest.d.ts +103 -0
- package/dist/src/build-manifest.js +16 -0
- package/dist/src/build-manifest.test.d.ts +1 -0
- package/dist/src/capabilityRouting.d.ts +19 -0
- package/dist/src/capabilityRouting.js +1 -0
- package/dist/src/capabilityRouting.test.d.ts +1 -0
- package/dist/src/cli-argv-preprocess.d.ts +63 -0
- package/dist/src/cli-argv-preprocess.js +1 -0
- package/dist/src/cli-argv-preprocess.test.d.ts +1 -0
- package/dist/src/cli.d.ts +79 -0
- package/dist/src/cli.js +132 -0
- package/dist/src/cli.test.d.ts +1 -0
- package/dist/src/commanderAdapter.d.ts +21 -0
- package/dist/src/commanderAdapter.js +3 -0
- package/dist/src/commanderAdapter.test.d.ts +1 -0
- package/dist/src/commands/auth.d.ts +40 -0
- package/dist/src/commands/auth.js +2 -0
- package/dist/src/commands/auth.test.d.ts +1 -0
- package/dist/src/commands/daemon.d.ts +25 -0
- package/dist/src/commands/daemon.js +1 -0
- package/dist/src/commands/daemon.test.d.ts +1 -0
- package/dist/src/completion-fast.d.ts +22 -0
- package/dist/src/completion-fast.js +1 -0
- package/dist/src/completion-shared.d.ts +13 -0
- package/dist/src/completion-shared.js +30 -0
- package/dist/src/completion.d.ts +21 -0
- package/dist/src/completion.js +1 -0
- package/dist/src/completion.test.d.ts +1 -0
- package/dist/src/constants.d.ts +22 -0
- package/dist/src/constants.js +1 -0
- package/dist/src/convention-audit.d.ts +50 -0
- package/dist/src/convention-audit.js +2 -0
- package/dist/src/convention-audit.test.d.ts +1 -0
- package/dist/src/daemon-utils.d.ts +18 -0
- package/dist/src/daemon-utils.js +1 -0
- package/dist/src/daemon.d.ts +22 -0
- package/dist/src/daemon.js +1 -0
- package/dist/src/daemon.test.d.ts +1 -0
- package/dist/src/discovery.d.ts +43 -0
- package/dist/src/discovery.js +2 -0
- package/dist/src/doctor.d.ts +38 -0
- package/dist/src/doctor.js +13 -0
- package/dist/src/doctor.test.d.ts +1 -0
- package/dist/src/download/article-download.d.ts +72 -0
- package/dist/src/download/article-download.js +21 -0
- package/dist/src/download/article-download.test.d.ts +1 -0
- package/dist/src/download/index.d.ts +71 -0
- package/dist/src/download/index.js +7 -0
- package/dist/src/download/index.test.d.ts +1 -0
- package/dist/src/download/media-download.d.ts +49 -0
- package/dist/src/download/media-download.js +1 -0
- package/dist/src/download/media-download.test.d.ts +1 -0
- package/dist/src/download/progress.d.ts +36 -0
- package/dist/src/download/progress.js +5 -0
- package/dist/src/download/progress.test.d.ts +1 -0
- package/dist/src/electron-apps.d.ts +31 -0
- package/dist/src/electron-apps.js +1 -0
- package/dist/src/electron-apps.test.d.ts +1 -0
- package/dist/src/engine.test.d.ts +1 -0
- package/dist/src/errors.d.ts +117 -0
- package/dist/src/errors.js +2 -0
- package/dist/src/errors.test.d.ts +1 -0
- package/dist/src/execution.d.ts +24 -0
- package/dist/src/execution.js +2 -0
- package/dist/src/execution.test.d.ts +1 -0
- package/dist/src/extension-manifest-regression.test.d.ts +1 -0
- package/dist/src/external-clis.yaml +109 -0
- package/dist/src/external.d.ts +49 -0
- package/dist/src/external.js +1 -0
- package/dist/src/external.test.d.ts +1 -0
- package/dist/src/help.d.ts +88 -0
- package/dist/src/help.js +8 -0
- package/dist/src/help.test.d.ts +1 -0
- package/dist/src/hooks.d.ts +46 -0
- package/dist/src/hooks.js +1 -0
- package/dist/src/hooks.test.d.ts +4 -0
- package/dist/src/interceptor.d.ts +44 -0
- package/dist/src/interceptor.js +123 -0
- package/dist/src/interceptor.test.d.ts +4 -0
- package/dist/src/launcher.d.ts +41 -0
- package/dist/src/launcher.js +7 -0
- package/dist/src/launcher.test.d.ts +1 -0
- package/dist/src/logger.d.ts +26 -0
- package/dist/src/logger.js +9 -0
- package/dist/src/main.d.ts +5 -0
- package/dist/src/main.js +10 -0
- package/dist/src/manifest-types.d.ts +43 -0
- package/dist/src/manifest-types.js +1 -0
- package/dist/src/node-network.d.ts +10 -0
- package/dist/src/node-network.js +1 -0
- package/dist/src/node-network.test.d.ts +1 -0
- package/dist/src/observation/artifact.d.ts +16 -0
- package/dist/src/observation/artifact.js +8 -0
- package/dist/src/observation/artifact.test.d.ts +1 -0
- package/dist/src/observation/events.d.ts +89 -0
- package/dist/src/observation/events.js +1 -0
- package/dist/src/observation/index.d.ts +7 -0
- package/dist/src/observation/index.js +1 -0
- package/dist/src/observation/manager.d.ts +9 -0
- package/dist/src/observation/manager.js +1 -0
- package/dist/src/observation/manager.test.d.ts +1 -0
- package/dist/src/observation/redaction.d.ts +11 -0
- package/dist/src/observation/redaction.js +2 -0
- package/dist/src/observation/redaction.test.d.ts +1 -0
- package/dist/src/observation/retention.d.ts +32 -0
- package/dist/src/observation/retention.js +1 -0
- package/dist/src/observation/retention.test.d.ts +1 -0
- package/dist/src/observation/ring-buffer.d.ts +22 -0
- package/dist/src/observation/ring-buffer.js +1 -0
- package/dist/src/observation/ring-buffer.test.d.ts +1 -0
- package/dist/src/observation/session.d.ts +25 -0
- package/dist/src/observation/session.js +1 -0
- package/dist/src/output.d.ts +14 -0
- package/dist/src/output.js +2 -0
- package/dist/src/output.test.d.ts +1 -0
- package/dist/src/package-exports.test.d.ts +1 -0
- package/dist/src/package-paths.d.ts +8 -0
- package/dist/src/package-paths.js +1 -0
- package/dist/src/pipeline/executor.d.ts +11 -0
- package/dist/src/pipeline/executor.js +1 -0
- package/dist/src/pipeline/executor.test.d.ts +4 -0
- package/dist/src/pipeline/index.d.ts +5 -0
- package/dist/src/pipeline/index.js +1 -0
- package/dist/src/pipeline/registry.d.ts +28 -0
- package/dist/src/pipeline/registry.js +1 -0
- package/dist/src/pipeline/steps/browser.d.ts +13 -0
- package/dist/src/pipeline/steps/browser.js +1 -0
- package/dist/src/pipeline/steps/download.d.ts +18 -0
- package/dist/src/pipeline/steps/download.js +1 -0
- package/dist/src/pipeline/steps/download.test.d.ts +1 -0
- package/dist/src/pipeline/steps/fetch.d.ts +5 -0
- package/dist/src/pipeline/steps/fetch.js +31 -0
- package/dist/src/pipeline/steps/fetch.test.d.ts +1 -0
- package/dist/src/pipeline/steps/intercept.d.ts +5 -0
- package/dist/src/pipeline/steps/intercept.js +1 -0
- package/dist/src/pipeline/steps/tap.d.ts +12 -0
- package/dist/src/pipeline/steps/tap.js +53 -0
- package/dist/src/pipeline/steps/transform.d.ts +9 -0
- package/dist/src/pipeline/steps/transform.js +1 -0
- package/dist/src/pipeline/template.d.ts +17 -0
- package/dist/src/pipeline/template.js +1 -0
- package/dist/src/pipeline/template.test.d.ts +4 -0
- package/dist/src/pipeline/transform.test.d.ts +4 -0
- package/dist/src/plugin-manifest.d.ts +70 -0
- package/dist/src/plugin-manifest.js +1 -0
- package/dist/src/plugin-manifest.test.d.ts +4 -0
- package/dist/src/plugin-scaffold.d.ts +28 -0
- package/dist/src/plugin-scaffold.js +75 -0
- package/dist/src/plugin-scaffold.test.d.ts +4 -0
- package/dist/src/plugin.d.ts +145 -0
- package/dist/src/plugin.js +20 -0
- package/dist/src/plugin.test.d.ts +4 -0
- package/dist/src/rate-limit.d.ts +15 -0
- package/dist/src/rate-limit.js +2 -0
- package/dist/src/rate-limit.test.d.ts +1 -0
- package/dist/src/registry-api.d.ts +13 -0
- package/dist/src/registry-api.js +1 -0
- package/dist/src/registry.d.ts +130 -0
- package/dist/src/registry.js +1 -0
- package/dist/src/registry.test.d.ts +4 -0
- package/dist/src/runtime-detect.d.ts +31 -0
- package/dist/src/runtime-detect.js +1 -0
- package/dist/src/runtime-detect.test.d.ts +1 -0
- package/dist/src/runtime.d.ts +57 -0
- package/dist/src/runtime.js +1 -0
- package/dist/src/scripts/framework.d.ts +7 -0
- package/dist/src/scripts/framework.js +1 -0
- package/dist/src/scripts/interact.d.ts +4 -0
- package/dist/src/scripts/interact.js +1 -0
- package/dist/src/scripts/store.d.ts +13 -0
- package/dist/src/scripts/store.js +1 -0
- package/dist/src/serialization.d.ts +42 -0
- package/dist/src/serialization.js +4 -0
- package/dist/src/serialization.test.d.ts +1 -0
- package/dist/src/skills.d.ts +14 -0
- package/dist/src/skills.js +6 -0
- package/dist/src/skills.test.d.ts +1 -0
- package/dist/src/snapshotFormatter.d.ts +11 -0
- package/dist/src/snapshotFormatter.js +3 -0
- package/dist/src/snapshotFormatter.test.d.ts +7 -0
- package/dist/src/tui.d.ts +28 -0
- package/dist/src/tui.js +16 -0
- package/dist/src/tui.test.d.ts +1 -0
- package/dist/src/types.d.ts +236 -0
- package/dist/src/types.js +1 -0
- package/dist/src/utils.d.ts +57 -0
- package/dist/src/utils.js +38 -0
- package/dist/src/utils.test.d.ts +1 -0
- package/dist/src/validate.d.ts +21 -0
- package/dist/src/validate.js +3 -0
- package/dist/src/validate.test.d.ts +9 -0
- package/dist/src/verify.d.ts +27 -0
- package/dist/src/verify.js +2 -0
- package/dist/src/verify.test.d.ts +8 -0
- package/dist/src/version.d.ts +4 -0
- package/dist/src/version.js +1 -0
- package/dist/src/weixin-download.test.d.ts +1 -0
- package/docs/guide/browser-bridge.md +94 -0
- package/docs/guide/electron-app-cli.md +199 -0
- package/docs/guide/exit-codes.md +24 -0
- package/docs/guide/extending-opencli.md +134 -0
- package/docs/guide/getting-started.md +81 -0
- package/docs/guide/installation.md +52 -0
- package/docs/guide/plugins.md +226 -0
- package/docs/guide/remote-orchestration.md +116 -0
- package/docs/guide/troubleshooting.md +69 -0
- package/package.json +116 -0
- package/scripts/check-doc-coverage.sh +81 -0
- package/scripts/check-listing-id-pairing.mjs +193 -0
- package/scripts/check-silent-column-drop.mjs +105 -0
- package/scripts/check-typed-error-lint.mjs +118 -0
- package/scripts/clean-dist.cjs +13 -0
- package/scripts/copy-yaml.cjs +12 -0
- package/scripts/fetch-adapters.js +293 -0
- package/scripts/minify-release.mjs +115 -0
- package/scripts/postinstall.js +174 -0
- package/scripts/silent-column-drop-baseline.json +910 -0
- package/scripts/typed-error-lint-baseline.json +1098 -0
- package/skills/opencli-adapter-author/SKILL.md +256 -0
- package/skills/opencli-adapter-author/references/adapter-template.md +471 -0
- package/skills/opencli-adapter-author/references/api-discovery.md +295 -0
- package/skills/opencli-adapter-author/references/coverage-matrix.md +81 -0
- package/skills/opencli-adapter-author/references/field-conventions.md +172 -0
- package/skills/opencli-adapter-author/references/field-decode-playbook.md +181 -0
- package/skills/opencli-adapter-author/references/jsdom-fixture-pattern.md +196 -0
- package/skills/opencli-adapter-author/references/output-design.md +149 -0
- package/skills/opencli-adapter-author/references/site-memory/bilibili.md +70 -0
- package/skills/opencli-adapter-author/references/site-memory/eastmoney.md +70 -0
- package/skills/opencli-adapter-author/references/site-memory/tonghuashun.md +51 -0
- package/skills/opencli-adapter-author/references/site-memory/xueqiu.md +58 -0
- package/skills/opencli-adapter-author/references/site-memory.md +231 -0
- package/skills/opencli-adapter-author/references/site-recon.md +134 -0
- package/skills/opencli-adapter-author/references/strategy-selection.md +169 -0
- package/skills/opencli-adapter-author/references/success-rate-pitfalls.md +162 -0
- package/skills/opencli-adapter-author/references/typed-errors.md +234 -0
- package/skills/opencli-autofix/SKILL.md +297 -0
- package/skills/opencli-browser/SKILL.md +468 -0
- package/skills/opencli-browser-sitemap/SKILL.md +96 -0
- package/skills/opencli-sitemap-author/SKILL.md +161 -0
- package/skills/opencli-sitemap-author/references/sitemap-schema.md +660 -0
- package/skills/opencli-usage/SKILL.md +168 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import{cli as R,Strategy as T}from"@jackwener/opencli/registry";import{CommandExecutionError as H,selectorError as U}from"@jackwener/opencli/errors";async function P(q){const A=await q.evaluate(`(function() {
|
|
2
|
+
const trigger = document.querySelector('.core-model-select-trigger');
|
|
3
|
+
return trigger ? (trigger.textContent || '').trim() : '';
|
|
4
|
+
})()`);return typeof A==="string"?A.trim():""}R({site:"trae-solo",name:"model",access:"write",description:"Read or switch the current AI model in TRAE SOLO. Without arguments, reports the current model. With <name> argument (substring, case-insensitive), switches to a matching model. Pass --list to enumerate available models.",domain:"localhost",strategy:T.UI,browser:!0,args:[{name:"name",required:!1,positional:!0,help:"Target model name (substring match, case-insensitive). Omit to read current."},{name:"list",type:"boolean",default:!1,help:"List all available models (does not switch)"}],columns:["Status","Model"],func:async(q,A)=>{const B=String(A.name||"").trim().toLowerCase(),K=A.list===!0||A.list==="true",I=await P(q);if(!I)throw U("TRAE SOLO model trigger (.core-model-select-trigger). Make sure a chat task is open (not the project-list view).");if(K||B){const V=JSON.stringify(B),z=await q.evaluate(`(async () => {
|
|
5
|
+
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
6
|
+
const trigger = document.querySelector('.core-model-select-trigger');
|
|
7
|
+
if (!trigger) return { ok: false, reason: 'model trigger gone' };
|
|
8
|
+
const r = trigger.getBoundingClientRect();
|
|
9
|
+
const init = {
|
|
10
|
+
bubbles: true, cancelable: true, button: 0, buttons: 1,
|
|
11
|
+
clientX: Math.round(r.left + Math.min(r.width / 2, 20)),
|
|
12
|
+
clientY: Math.round(r.top + Math.min(r.height / 2, 10)),
|
|
13
|
+
};
|
|
14
|
+
trigger.dispatchEvent(new PointerEvent('pointerdown', { ...init, pointerType: 'mouse' }));
|
|
15
|
+
trigger.dispatchEvent(new MouseEvent('mousedown', init));
|
|
16
|
+
trigger.dispatchEvent(new PointerEvent('pointerup', { ...init, pointerType: 'mouse' }));
|
|
17
|
+
trigger.dispatchEvent(new MouseEvent('mouseup', init));
|
|
18
|
+
trigger.dispatchEvent(new MouseEvent('click', init));
|
|
19
|
+
|
|
20
|
+
let opts = [];
|
|
21
|
+
for (let attempt = 0; attempt < 16; attempt += 1) {
|
|
22
|
+
await wait(80);
|
|
23
|
+
opts = Array.from(document.querySelectorAll('.core-model-select-model-item[role="option"]'))
|
|
24
|
+
.filter((el) => el instanceof HTMLElement && el.offsetParent);
|
|
25
|
+
if (opts.length) break;
|
|
26
|
+
}
|
|
27
|
+
if (!opts.length) {
|
|
28
|
+
return { ok: false, reason: 'Model menu did not open.' };
|
|
29
|
+
}
|
|
30
|
+
const labels = opts.map((o) => {
|
|
31
|
+
const nameEl = o.querySelector('.core-model-select-model-item-name');
|
|
32
|
+
return ((nameEl ? nameEl.textContent : o.textContent) || '').trim();
|
|
33
|
+
});
|
|
34
|
+
return { ok: true, labels };
|
|
35
|
+
})()`);if(!z.ok)throw new H(z.reason,z.detail||"");if(K){try{await q.evaluate("document.body.click()")}catch{}return z.labels.map((F)=>({Status:F===I?"Active":"Available",Model:F}))}const G=z.labels.findIndex((F)=>F.toLowerCase().includes(B));if(G<0){try{await q.evaluate("document.body.click()")}catch{}throw new H(`No model matched: '${B}'`,"available="+JSON.stringify(z.labels))}const N=z.labels[G],Q=`.core-model-select-model-item[role="option"]:nth-of-type(${G+1})`;try{await q.click(Q)}catch(F){if(!await q.evaluate(`(function(i) {
|
|
36
|
+
const opts = Array.from(document.querySelectorAll('.core-model-select-model-item[role="option"]'))
|
|
37
|
+
.filter((el) => el.offsetParent);
|
|
38
|
+
const target = opts[i];
|
|
39
|
+
if (!target) return false;
|
|
40
|
+
const r = target.getBoundingClientRect();
|
|
41
|
+
const init = { bubbles: true, cancelable: true, button: 0, buttons: 1,
|
|
42
|
+
clientX: Math.round(r.left + r.width / 2),
|
|
43
|
+
clientY: Math.round(r.top + r.height / 2) };
|
|
44
|
+
target.dispatchEvent(new PointerEvent('pointerdown', { ...init, pointerType: 'mouse' }));
|
|
45
|
+
target.dispatchEvent(new MouseEvent('mousedown', init));
|
|
46
|
+
target.dispatchEvent(new PointerEvent('pointerup', { ...init, pointerType: 'mouse' }));
|
|
47
|
+
target.dispatchEvent(new MouseEvent('mouseup', init));
|
|
48
|
+
target.dispatchEvent(new MouseEvent('click', init));
|
|
49
|
+
return true;
|
|
50
|
+
})(${G})`))throw new H("Click on model option failed.",`model=${N}`)}await q.wait(0.6);const D=await P(q);if(!D||!D.toLowerCase().includes(B))throw new H(`Model click did not verify selected model "${N}".`,D?`current=${D}`:"model trigger was unreadable after click");return[{Status:"switched",Model:D}]}return[{Status:"Active",Model:I}]}});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{cli as I,Strategy as J}from"@jackwener/opencli/registry";import{ArgumentError as M,CommandExecutionError as O,EmptyResultError as K}from"@jackwener/opencli/errors";function N(D){const h=String(D?.storage||"local").trim().toLowerCase();if(h!=="local"&&h!=="session")throw new M("storage",'must be "local" or "session"');return h==="session"?"sessionStorage":"localStorage"}I({site:"trae-solo",name:"storage-keys",access:"read",description:"List localStorage / sessionStorage keys on the Trae SOLO renderer (CDP). For the on-disk VSCode state.vscdb, see state-keys.",domain:"localhost",strategy:J.UI,browser:!0,args:[{name:"storage",required:!1,default:"local",help:'"local" or "session"'},{name:"filter",required:!1,help:"Case-insensitive substring filter"},{name:"limit",type:"int",required:!1,default:100,help:"Max rows to return"}],columns:["Index","Key","Bytes","Name","Preview","Database","Version"],func:async(D,h)=>{const z=N(h),q=await D.evaluate(`(() => {
|
|
2
|
+
const s = ${z};
|
|
3
|
+
const out = [];
|
|
4
|
+
for (let i = 0; i < s.length; i++) {
|
|
5
|
+
const k = s.key(i);
|
|
6
|
+
const v = s.getItem(k) || '';
|
|
7
|
+
out.push({ k, bytes: v.length });
|
|
8
|
+
}
|
|
9
|
+
return out;
|
|
10
|
+
})()`),v=h?.filter?String(h.filter).toLowerCase():null,H=v?q.filter((B)=>B.k.toLowerCase().includes(v)):q;if(!H.length)throw new K("trae-solo storage-keys",v?`No keys match "${v}".`:`${z} is empty.`);H.sort((B,F)=>B.k.localeCompare(F.k));const G=Number.isInteger(h?.limit)&&h.limit>0?h.limit:100;return H.slice(0,G).map((B,F)=>({Index:F+1,Key:B.k,Bytes:B.bytes,Name:"",Preview:"",Database:"",Version:""}))}});I({site:"trae-solo",name:"storage-get",access:"read",description:"Read a single localStorage / sessionStorage value on the Trae SOLO renderer.",domain:"localhost",strategy:J.UI,browser:!0,args:[{name:"key",positional:!0,required:!0,help:"Storage key (use storage-keys to discover)"},{name:"storage",required:!1,default:"local",help:'"local" or "session"'},{name:"max-bytes",type:"int",required:!1,default:4000,help:"Truncate value to this many chars"}],columns:["Field","Value"],func:async(D,h)=>{const z=String(h?.key||"").trim();if(!z)throw new M("key","is required");const q=N(h),v=await D.evaluate(`${q}.getItem(${JSON.stringify(z)})`);if(v===null)throw new O(`Key not found in ${q}: ${z}`,"");const H=Number.isInteger(h["max-bytes"])&&h["max-bytes"]>0?h["max-bytes"]:4000;let G=v,B="string";try{G=JSON.parse(v);B=Array.isArray(G)?"array":typeof G}catch{}const F=B==="string"?G:JSON.stringify(G,null,2),L=F.length>H;return[{Field:"Key",Value:z},{Field:"Store",Value:q},{Field:"Type",Value:B},{Field:"Size",Value:`${F.length} chars${L?" (truncated)":""}`},{Field:"Value",Value:L?F.slice(0,H)+`
|
|
11
|
+
...(truncated)`:F}]}});I({site:"trae-solo",name:"cookies",access:"read",description:"List cookies on the Trae SOLO renderer (JS-visible via document.cookie; httpOnly cookies not shown).",domain:"localhost",strategy:J.UI,browser:!0,args:[],columns:["Index","Key","Bytes","Name","Preview","Database","Version"],func:async(D)=>{const h=await D.evaluate("document.cookie");if(!h)throw new K("trae-solo cookies","document.cookie is empty (Trae uses Electron session cookies, mostly httpOnly).");return h.split("; ").map((q)=>{const v=q.indexOf("=");if(v<0)return{name:q,value:""};return{name:q.slice(0,v),value:q.slice(v+1)}}).map((q,v)=>({Index:v+1,Key:"",Name:q.name,Bytes:q.value.length,Preview:q.value.slice(0,40)+(q.value.length>40?"…":""),Database:"",Version:""}))}});I({site:"trae-solo",name:"idb-list",access:"read",description:"List IndexedDB databases on the Trae SOLO renderer. Trae ships an @byted/ve-rtc DB used by the Volcengine RTC voice/video infrastructure.",domain:"localhost",strategy:J.UI,browser:!0,args:[],columns:["Index","Key","Bytes","Name","Preview","Database","Version"],func:async(D)=>{const h=await D.evaluate("(async () => indexedDB.databases ? await indexedDB.databases() : [])()");if(!Array.isArray(h)||!h.length)throw new K("trae-solo idb-list","No IndexedDB databases.");return h.map((z,q)=>({Index:q+1,Key:"",Bytes:"",Name:"",Preview:"",Database:z.name||"(unnamed)",Version:String(z.version||"")}))}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as H from"node:fs";import*as M from"node:path";import{cli as Q,Strategy as V}from"@jackwener/opencli/registry";import{CommandExecutionError as W,EmptyResultError as K}from"@jackwener/opencli/errors";import{TRAE_APP_SUPPORT as X}from"./_fs.js";const D=M.join(X,"User/settings.json");Q({site:"trae-solo",name:"settings-read",access:"read",description:"Parse and pretty-print Trae SOLO user settings.json (~/Library/Application Support/TRAE SOLO/User/settings.json). Handles VSCode JSONC syntax (line comments + trailing commas).",domain:"localhost",strategy:V.LOCAL,browser:!1,args:[],columns:["Field","Value"],func:async()=>{if(!H.existsSync(D))throw new K("trae-solo settings-read",`settings.json not found: ${D}`);const L=H.readFileSync(D,"utf-8").replace(/\/\*[\s\S]*?\*\//g,"").replace(/^\s*\/\/.*$/gm,"").replace(/([^:"])\/\/.*$/gm,"$1").replace(/,(\s*[}\]])/g,"$1");let F;try{F=JSON.parse(L)}catch(z){throw new W(`Failed to parse settings.json: ${z.message}`,"")}const q=[];for(const[z,B]of Object.entries(F))q.push({Field:z,Value:typeof B==="object"?JSON.stringify(B):String(B)});if(!q.length)throw new K("trae-solo settings-read","settings.json is empty (or contains only defaults).");return q}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as H from"node:fs";import*as N from"node:path";import{cli as O,Strategy as P}from"@jackwener/opencli/registry";import{ArgumentError as V,CommandExecutionError as W,EmptyResultError as Q}from"@jackwener/opencli/errors";import{TRAE_SKILLS_DIR as J,assertReadable as X,parseSkillMd as U,readSkillConfig as Y}from"./_fs.js";O({site:"trae-solo",name:"skill-fs-list",access:"read",description:"List all Trae SOLO skills present on disk under ~/.trae/skills/. Reads SKILL.md front-matter for descriptions. Works while Trae is closed.",domain:"localhost",browser:!1,strategy:P.LOCAL,args:[{name:"limit",type:"int",required:!1,default:200,help:"Max rows"}],columns:["Index","Name","Description","Source"],func:async(F)=>{X(J,"~/.trae/skills");const q=H.readdirSync(J).filter((v)=>{const B=N.join(J,v);return H.statSync(B).isDirectory()&&!v.startsWith("_")}).map((v)=>U(N.join(J,v))),z=Number.isInteger(F.limit)&&F.limit>0?F.limit:200;if(!q.length)throw new Q("trae-solo skill-fs-list","No skills found under ~/.trae/skills/.");return q.slice(0,z).map((v,B)=>({Index:B+1,Name:v.name,Description:(v.description||"").slice(0,120),Source:""}))}});O({site:"trae-solo",name:"skill-fs-installed",access:"read",description:"List INSTALLED Trae SOLO skills (managedSkills entry in ~/.trae/skill-config.json).",domain:"localhost",browser:!1,strategy:P.LOCAL,args:[],columns:["Index","Name","Description","Source"],func:async()=>{const G=Y().managedSkills||{},q=Object.entries(G);if(!q.length)throw new Q("trae-solo skill-fs-installed","No installed skills.");return q.map(([z,v],B)=>({Index:B+1,Name:z,Description:"",Source:v}))}});O({site:"trae-solo",name:"skill-fs-show",access:"read",description:"Print a skill's SKILL.md content + on-disk path.",domain:"localhost",browser:!1,strategy:P.LOCAL,args:[{name:"name",positional:!0,required:!0,help:"Skill name (folder under ~/.trae/skills/)"}],columns:["Field","Value"],func:async(F)=>{const G=String(F.name||"").trim();if(!G)throw new V("name required");const q=N.join(J,G);if(!H.existsSync(q))throw new W(`Skill "${G}" not found.`,`Tried: ${q}`);const z=U(q),v=N.join(q,"SKILL.md"),B=H.existsSync(v)?H.readFileSync(v,"utf-8"):"(no SKILL.md)";return[{Field:"Name",Value:z.name},{Field:"Path",Value:q},{Field:"Description",Value:(z.description||"").slice(0,200)},{Field:"Tags",Value:(z.tags||[]).join(", ")},{Field:"Author",Value:z.author},{Field:"Version",Value:z.version},{Field:"Files",Value:H.readdirSync(q).join(", ").slice(0,200)},{Field:"SKILL.md (head)",Value:B.slice(0,1200)}]}});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import{cli as L,Strategy as M}from"@jackwener/opencli/registry";import{ArgumentError as V,CommandExecutionError as Y,EmptyResultError as W}from"@jackwener/opencli/errors";import{switchToPanel as Q}from"./_actions.js";const Z="Make sure TRAE SOLO is running and the Skills panel is reachable.";async function U(q,f){const v=JSON.stringify(f);await q.evaluate(`(async () => {
|
|
2
|
+
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
3
|
+
const target = ${v};
|
|
4
|
+
const tab = Array.from(document.querySelectorAll('.marketplace-tab'))
|
|
5
|
+
.find((t) => (t.textContent || '').trim().startsWith(target));
|
|
6
|
+
if (!tab) return;
|
|
7
|
+
if (tab.className.includes('active')) return;
|
|
8
|
+
const r = tab.getBoundingClientRect();
|
|
9
|
+
const init = {
|
|
10
|
+
bubbles: true, cancelable: true, button: 0, buttons: 1,
|
|
11
|
+
clientX: Math.round(r.left + r.width / 2),
|
|
12
|
+
clientY: Math.round(r.top + r.height / 2),
|
|
13
|
+
};
|
|
14
|
+
tab.dispatchEvent(new PointerEvent('pointerdown', { ...init, pointerType: 'mouse' }));
|
|
15
|
+
tab.dispatchEvent(new MouseEvent('mousedown', init));
|
|
16
|
+
tab.dispatchEvent(new PointerEvent('pointerup', { ...init, pointerType: 'mouse' }));
|
|
17
|
+
tab.dispatchEvent(new MouseEvent('mouseup', init));
|
|
18
|
+
tab.dispatchEvent(new MouseEvent('click', init));
|
|
19
|
+
await wait(700);
|
|
20
|
+
})()`);await q.wait(0.3)}L({site:"trae-solo",name:"skill-list",access:"read",description:"List Trae SOLO Skills — by default the Marketplace; pass --installed to list installed ones.",domain:"localhost",strategy:M.UI,browser:!0,args:[{name:"installed",type:"boolean",default:!1,help:"List installed skills instead of the marketplace"},{name:"limit",type:"int",required:!1,default:100,help:"Max rows to return"}],columns:["Index","Name","Description"],func:async(q,f)=>{await Q(q,"Skills");const v=f.installed===!0||f.installed==="true"||f.installed==="1";await U(q,v?"Installed":"Skills Marketplace");const B=await q.evaluate(`(function() {
|
|
21
|
+
const sel = ${v?"'.installed-card'":"'.marketplace-card-v2'"};
|
|
22
|
+
const cards = Array.from(document.querySelectorAll(sel)).filter((c) => c.offsetParent);
|
|
23
|
+
return cards.map((c, i) => {
|
|
24
|
+
const logo = c.querySelector('.skill-logo-svg');
|
|
25
|
+
const name = (logo && logo.getAttribute('aria-label')) || '';
|
|
26
|
+
// Card text starts with the name; trim that off to get description.
|
|
27
|
+
const full = (c.innerText || '').replace(/\\s+/g, ' ').trim();
|
|
28
|
+
let desc = full;
|
|
29
|
+
if (name && desc.startsWith(name)) desc = desc.slice(name.length).trim();
|
|
30
|
+
return { index: i + 1, name: name || full.split(' ')[0], description: desc.slice(0, 200) };
|
|
31
|
+
});
|
|
32
|
+
})()`),G=Number.isInteger(f.limit)&&f.limit>0?f.limit:100,D=(B||[]).slice(0,G);if(!D.length)throw new W("trae-solo skill-list",v?"No installed skills visible.":"No marketplace skills visible.");return D.map((z)=>({Index:z.index,Name:z.name,Description:z.description}))}});L({site:"trae-solo",name:"skill-search",access:"read",description:"Filter Skills Marketplace by keyword.",domain:"localhost",strategy:M.UI,browser:!0,args:[{name:"keyword",positional:!0,required:!0,help:"Search keyword (substring)"},{name:"limit",type:"int",required:!1,default:50,help:"Max rows"}],columns:["Index","Name","Description"],func:async(q,f)=>{await Q(q,"Skills");await U(q,"Skills Marketplace");const v=String(f.keyword||"").trim();if(!v)throw new V("keyword cannot be empty");const B=JSON.stringify(v);await q.evaluate(`(function() {
|
|
33
|
+
const inp = document.querySelector('input[placeholder="Search"]');
|
|
34
|
+
if (!inp) return;
|
|
35
|
+
inp.focus();
|
|
36
|
+
const setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set;
|
|
37
|
+
setter.call(inp, ${B});
|
|
38
|
+
inp.dispatchEvent(new Event('input', { bubbles: true }));
|
|
39
|
+
})()`);await q.wait(0.7);const G=await q.evaluate(`(function() {
|
|
40
|
+
const cards = Array.from(document.querySelectorAll('.marketplace-card-v2')).filter((c) => c.offsetParent);
|
|
41
|
+
return cards.map((c, i) => {
|
|
42
|
+
const logo = c.querySelector('.skill-logo-svg');
|
|
43
|
+
const name = (logo && logo.getAttribute('aria-label')) || '';
|
|
44
|
+
const full = (c.innerText || '').replace(/\\s+/g, ' ').trim();
|
|
45
|
+
let desc = full;
|
|
46
|
+
if (name && desc.startsWith(name)) desc = desc.slice(name.length).trim();
|
|
47
|
+
return { index: i + 1, name: name || full.split(' ')[0], description: desc.slice(0, 200) };
|
|
48
|
+
});
|
|
49
|
+
})()`),D=Number.isInteger(f.limit)&&f.limit>0?f.limit:50,z=(G||[]).slice(0,D);if(!z.length)throw new W("trae-solo skill-search",`No skills matched "${v}".`);return z.map((K)=>({Index:K.index,Name:K.name,Description:K.description}))}});L({site:"trae-solo",name:"skill-category",access:"read",description:"Filter Skills Marketplace by category. Pass --list to see categories.",domain:"localhost",strategy:M.UI,browser:!0,args:[{name:"name",positional:!0,required:!1,help:"Category name (substring; case-insensitive). Common: All / Developer Tools / Data Analysis / UI Design / Content Creation / Productivity"},{name:"list",type:"boolean",default:!1,help:"List available categories"},{name:"limit",type:"int",required:!1,default:100}],columns:["Index","Name","Description"],func:async(q,f)=>{await Q(q,"Skills");await U(q,"Skills Marketplace");const v=f.list===!0||f.list==="true",B=String(f.name||"").trim().toLowerCase(),G=await q.evaluate(`(function() {
|
|
50
|
+
return Array.from(document.querySelectorAll('.marketplace-tag'))
|
|
51
|
+
.filter((c) => c.offsetParent)
|
|
52
|
+
.map((c) => ({ text: (c.textContent || '').trim(), active: c.className.includes('active') }));
|
|
53
|
+
})()`);if(v)return(G||[]).map((F)=>({Index:"-",Name:F.text+(F.active?" (active)":""),Description:""}));if(!B)throw new V("name required (or pass --list)");const D=JSON.stringify(B),z=await q.evaluate(`(async () => {
|
|
54
|
+
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
55
|
+
const tag = Array.from(document.querySelectorAll('.marketplace-tag'))
|
|
56
|
+
.find((t) => t.offsetParent && (t.textContent || '').trim().toLowerCase().includes(${D}));
|
|
57
|
+
if (!tag) return { ok: false, reason: 'Category not found.' };
|
|
58
|
+
const r = tag.getBoundingClientRect();
|
|
59
|
+
const init = {
|
|
60
|
+
bubbles: true, cancelable: true, button: 0, buttons: 1,
|
|
61
|
+
clientX: Math.round(r.left + r.width / 2),
|
|
62
|
+
clientY: Math.round(r.top + r.height / 2),
|
|
63
|
+
};
|
|
64
|
+
tag.dispatchEvent(new PointerEvent('pointerdown', { ...init, pointerType: 'mouse' }));
|
|
65
|
+
tag.dispatchEvent(new MouseEvent('mousedown', init));
|
|
66
|
+
tag.dispatchEvent(new PointerEvent('pointerup', { ...init, pointerType: 'mouse' }));
|
|
67
|
+
tag.dispatchEvent(new MouseEvent('mouseup', init));
|
|
68
|
+
tag.dispatchEvent(new MouseEvent('click', init));
|
|
69
|
+
await wait(700);
|
|
70
|
+
return { ok: true, chosen: (tag.textContent || '').trim() };
|
|
71
|
+
})()`);if(!z?.ok)throw new Y(z?.reason||"Category click failed.",Z);const K=await q.evaluate(`(function() {
|
|
72
|
+
const cards = Array.from(document.querySelectorAll('.marketplace-card-v2')).filter((c) => c.offsetParent);
|
|
73
|
+
return cards.map((c, i) => {
|
|
74
|
+
const logo = c.querySelector('.skill-logo-svg');
|
|
75
|
+
const name = (logo && logo.getAttribute('aria-label')) || '';
|
|
76
|
+
const full = (c.innerText || '').replace(/\\s+/g, ' ').trim();
|
|
77
|
+
let desc = full;
|
|
78
|
+
if (name && desc.startsWith(name)) desc = desc.slice(name.length).trim();
|
|
79
|
+
return { index: i + 1, name: name || full.split(' ')[0], description: desc.slice(0, 200) };
|
|
80
|
+
});
|
|
81
|
+
})()`),X=Number.isInteger(f.limit)&&f.limit>0?f.limit:100;return(K||[]).slice(0,X).map((F)=>({Index:F.index,Name:F.name,Description:F.description}))}});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as $ from"node:fs";import*as h from"node:path";import{cli as U,Strategy as X}from"@jackwener/opencli/registry";import{ArgumentError as K,CommandExecutionError as Y,EmptyResultError as Z}from"@jackwener/opencli/errors";import{TRAE_GLOBAL_STATE_DB as Q,TRAE_WORKSPACE_STORAGE as V,listKeys as j,getValue as P}from"./_state.js";function W(q){const H=q.workspace?String(q.workspace).trim():"";if(!H)return Q;const I=h.join(V,H,"state.vscdb");if(!$.existsSync(I))throw new Y(`Workspace state.vscdb not found: ${I}`,"List valid workspace ids with `opencli trae-solo workspaces-list`.");return I}U({site:"trae-solo",name:"state-keys",access:"read",description:"List all keys present in Trae SOLO's globalStorage state.vscdb (VSCode-style UI/agent state). Pass --workspace <ws-id> to query a per-workspace DB instead. Use state-get to read a specific value. (See renderer storage-keys for browser-side LS/SS.)",domain:"localhost",browser:!1,strategy:X.LOCAL,args:[{name:"filter",required:!1,help:"Case-insensitive substring filter over keys"},{name:"workspace",required:!1,help:"Workspace id (from workspaces-list) to query a per-workspace DB"},{name:"limit",type:"int",required:!1,default:200}],columns:["Index","Key","Kind","Path"],func:async(q)=>{const H=W(q),I=j(H),z=q.filter?String(q.filter).toLowerCase():null,F=z?I.filter((J)=>J.toLowerCase().includes(z)):I;if(!F.length)throw new Z("trae-solo storage-keys",z?`No keys match "${z}".`:"No keys.");const M=Number.isInteger(q.limit)&&q.limit>0?q.limit:200;return F.slice(0,M).map((J,N)=>({Index:N+1,Key:J,Kind:"",Path:""}))}});U({site:"trae-solo",name:"state-get",access:"read",description:"Read a single key from Trae SOLO's globalStorage state.vscdb. Pass --workspace <ws-id> to query a per-workspace DB instead. Returns parsed JSON if the value is JSON.",domain:"localhost",browser:!1,strategy:X.LOCAL,args:[{name:"key",positional:!0,required:!0,help:"State key (use state-keys to discover)"},{name:"workspace",required:!1,help:"Workspace id (from workspaces-list) to query a per-workspace DB"},{name:"max-bytes",type:"int",required:!1,default:8000,help:"Truncate value to this many bytes"}],columns:["Field","Value"],func:async(q)=>{const H=String(q.key||"").trim();if(!H)throw new K("key required");const I=W(q),z=P(I,H);if(z===null)throw new Y(`Key not found: ${H}`,"List available keys with `opencli trae-solo state-keys`.");const F=Number.isInteger(q["max-bytes"])&&q["max-bytes"]>0?q["max-bytes"]:8000,M=typeof z==="string"?z:JSON.stringify(z,null,2),J=M.length>F;return[{Field:"Key",Value:H},{Field:"Type",Value:typeof z==="string"?"string":Array.isArray(z)?"array":typeof z},{Field:"Size",Value:`${M.length} chars${J?" (truncated)":""}`},{Field:"Value",Value:J?M.slice(0,F)+`
|
|
2
|
+
...(truncated, use --max-bytes to read more)`:M}]}});U({site:"trae-solo",name:"recent-workspaces",access:"read",description:`Show Trae SOLO's recently-opened workspaces (the File → Open Recent menu, stored under key "history.recentlyOpenedPathsList" in state.vscdb).`,domain:"localhost",browser:!1,strategy:X.LOCAL,args:[{name:"limit",type:"int",required:!1,default:20}],columns:["Index","Key","Kind","Path"],func:async(q)=>{if(!$.existsSync(Q))throw new Y(`state.vscdb not found: ${Q}`,"");const H=P(Q,"history.recentlyOpenedPathsList");if(!H)throw new Z("trae-solo recent-workspaces","No recent workspaces recorded.");const I=H.entries||[];if(!I.length)throw new Z("trae-solo recent-workspaces","history.recentlyOpenedPathsList has no entries.");const z=Number.isInteger(q.limit)&&q.limit>0?q.limit:20;return I.slice(0,z).map((F,M)=>{let J="other",N=JSON.stringify(F).slice(0,200);if(F.folderUri){J="folder";N=decodeURI(String(F.folderUri).replace(/^file:\/\//,""))}else if(F.workspace&&F.workspace.configPath){J="workspace";N=decodeURI(String(F.workspace.configPath).replace(/^file:\/\//,""))}else if(F.fileUri){J="file";N=decodeURI(String(F.fileUri).replace(/^file:\/\//,""))}return{Index:M+1,Key:"",Kind:J,Path:N}})}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{makeStatusCommand as o}from"../_shared/desktop-commands.js";export const statusCommand=o("trae-solo","Trae SOLO Desktop");
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import*as Q from"node:fs";import*as Y from"node:path";import{execFileSync as O}from"node:child_process";import{cli as b,Strategy as k}from"@jackwener/opencli/registry";import{ArgumentError as F,CommandExecutionError as z,EmptyResultError as G}from"@jackwener/opencli/errors";import{TRAE_SNAPSHOT_DIR as $,TRAE_AGENTCONFIG_DIR as H,assertReadable as x}from"./_fs.js";function w(B){return Y.join($,B,"v2")}function j(B,K){return O("git",K,{cwd:B,encoding:"utf-8"}).trim()}b({site:"trae-solo",name:"task-fs-list",access:"read",description:"List Trae SOLO task ids from disk (snapshot/<uuid> + agentconfig/<uuid>.json). Works while Trae is closed.",domain:"localhost",browser:!1,strategy:k.LOCAL,args:[{name:"limit",type:"int",required:!1,default:100}],columns:["Index","Task Id","Has Snapshot","Has Config","Modified","Phase","Turn Id","Commit"],func:async(B)=>{x($,"ai-agent/snapshot");const K=new Set(Q.readdirSync($).filter((q)=>Q.statSync(Y.join($,q)).isDirectory())),J=Q.existsSync(H)?new Set(Q.readdirSync(H).filter((q)=>q.endsWith(".json")&&!q.endsWith("-hooks.json")&&!q.startsWith("boot")&&!q.startsWith("ide_")).map((q)=>q.replace(/\.json$/,""))):new Set,X=[...new Set([...K,...J])].map((q)=>{const v=Y.join($,q),L=Y.join(H,q+".json"),W=Q.existsSync(v),U=Q.existsSync(L);let M=0;if(W)M=Math.max(M,Q.statSync(v).mtimeMs);if(U)M=Math.max(M,Q.statSync(L).mtimeMs);return{id:q,hasSnap:W,hasCfg:U,mtime:M}}).sort((q,v)=>v.mtime-q.mtime),Z=Number.isInteger(B.limit)&&B.limit>0?B.limit:100;if(!X.length)throw new G("trae-solo task-fs-list","No tasks on disk.");return X.slice(0,Z).map((q,v)=>({Index:v+1,"Task Id":q.id,"Has Snapshot":q.hasSnap?"yes":"no","Has Config":q.hasCfg?"yes":"no",Modified:new Date(q.mtime).toISOString().replace("T"," ").slice(0,19),Phase:"","Turn Id":"",Commit:""}))}});b({site:"trae-solo",name:"task-fs-turns",access:"read",description:"Show the chat-turn timeline for a Trae SOLO task as git tags (before-chat-turn-* / after-chat-turn-*).",domain:"localhost",browser:!1,strategy:k.LOCAL,args:[{name:"task-id",positional:!0,required:!0,help:"Task UUID (folder name under snapshot/)"},{name:"limit",type:"int",required:!1,default:50}],columns:["Index","Task Id","Has Snapshot","Has Config","Modified","Phase","Turn Id","Commit"],func:async(B)=>{const K=String(B["task-id"]||"").trim();if(!K)throw new F("task-id required");const J=w(K);if(!Q.existsSync(Y.join(J,".git")))throw new z(`No snapshot repo for task ${K}.`,`Tried: ${J}`);const X=j(J,["for-each-ref","--format=%(refname:short)|%(*objectname:short)|%(objectname:short)|%(committerdate:iso8601)","refs/tags"]).split(`
|
|
2
|
+
`).filter(Boolean).map((q)=>{const[v,L,W,U]=q.split("|"),M=v.match(/^(before|after)-chat-turn-([0-9a-f]+)(?:-(refresh))?$/),y=M?M[1]+(M[3]?"/refresh":""):"misc",D=M?M[2]:v;return{phase:y,turnId:D,oid:W,date:U}}).sort((q,v)=>q.date.localeCompare(v.date));if(!X.length)throw new G("trae-solo task-fs-turns",`No chat-turn refs in ${J}.`);const Z=Number.isInteger(B.limit)&&B.limit>0?B.limit:50;return X.slice(0,Z).map((q,v)=>({Index:v+1,"Task Id":"","Has Snapshot":"","Has Config":"",Modified:"",Phase:q.phase,"Turn Id":q.turnId,Commit:q.oid}))}});b({site:"trae-solo",name:"task-fs-show",access:"read",description:"Show the workspace tree at a given chat-turn ref (via git ls-tree). Pass --turn <turn-id> to pick a turn; otherwise the latest after-chat-turn ref.",domain:"localhost",browser:!1,strategy:k.LOCAL,args:[{name:"task-id",positional:!0,required:!0,help:"Task UUID"},{name:"turn",required:!1,help:"Specific turn id (omit for latest after-chat-turn)"},{name:"limit",type:"int",required:!1,default:50}],columns:["Mode","Path","Size"],func:async(B)=>{const K=String(B["task-id"]||"").trim();if(!K)throw new F("task-id required");const J=w(K);if(!Q.existsSync(Y.join(J,".git")))throw new z(`No snapshot repo for task ${K}.`,`Tried: ${J}`);let V;if(B.turn){const v=String(B.turn).trim(),W=j(J,["for-each-ref","--format=%(refname:short)","refs/tags"]).split(`
|
|
3
|
+
`).filter((U)=>U.includes(v));V=W.find((U)=>U.startsWith("after-chat-turn-"))||W[0];if(!V)throw new z(`No tag matched turn "${v}".`,"")}else{V=j(J,["for-each-ref","--sort=-committerdate","--format=%(refname:short)","refs/tags"]).split(`
|
|
4
|
+
`).find((L)=>L.startsWith("after-chat-turn-"));if(!V)throw new z("No after-chat-turn tags found.","")}const Z=j(J,["ls-tree","-r","-l",V]).split(`
|
|
5
|
+
`).filter(Boolean).map((v)=>{const L=v.split(/\s+/);return{mode:L[0],oid:L[2],size:L[3],pth:L.slice(4).join(" ")}}),q=Number.isInteger(B.limit)&&B.limit>0?B.limit:50;return Z.slice(0,q).map((v)=>({Mode:v.mode,Path:v.pth,Size:v.size}))}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"node:fs";import{cli as i,Strategy as a}from"@jackwener/opencli/registry";import{TRAE_USER_RULES as e}from"./_fs.js";i({site:"trae-solo",name:"user-rules",access:"read",description:"Print Trae SOLO user rules (~/.trae/user_rules.md).",domain:"localhost",browser:!1,strategy:a.LOCAL,args:[],columns:["Field","Value"],func:async()=>{if(!t.existsSync(e))return[{Field:"path",Value:e},{Field:"content",Value:"(file does not exist yet)"}];const r=t.readFileSync(e,"utf-8"),s=t.statSync(e);return[{Field:"path",Value:e},{Field:"size",Value:String(s.size)+" bytes"},{Field:"modified",Value:s.mtime.toISOString().replace("T"," ").slice(0,19)},{Field:"content",Value:r}]}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as F from"node:fs";import*as Q from"node:path";import{cli as Z,Strategy as $}from"@jackwener/opencli/registry";import{CommandExecutionError as U,EmptyResultError as b}from"@jackwener/opencli/errors";import{TRAE_WORKSPACE_STORAGE as H,TRAE_EXTENSIONS_JSON as V,resolveWorkspaceJson as I}from"./_state.js";Z({site:"trae-solo",name:"workspaces-list",access:"read",description:"List Trae SOLO workspaceStorage entries (~/Library/.../TRAE SOLO/User/workspaceStorage/<uuid>/), resolving each workspace.json to its single-folder path or multi-folder workspace target. Works while Trae is closed.",domain:"localhost",browser:!1,strategy:$.LOCAL,args:[{name:"limit",type:"int",required:!1,default:100}],columns:["Index","Workspace Id","Kind","Target","Modified","Id","Version","Source","Installed"],func:async(B)=>{if(!F.existsSync(H))throw new U(`workspaceStorage not found: ${H}`,"");const z=F.readdirSync(H).filter((q)=>{const D=Q.join(H,q);return F.statSync(D).isDirectory()});if(!z.length)throw new b("trae-solo workspaces-list","No workspace storage entries.");const M=z.map((q)=>{const D=Q.join(H,q),k=Q.join(D,"workspace.json"),Y=I(k),v=F.statSync(D).mtimeMs;return{id:q,kind:Y.kind,target:Y.target,mtime:v}}).sort((q,D)=>D.mtime-q.mtime),L=Number.isInteger(B.limit)&&B.limit>0?B.limit:100;return M.slice(0,L).map((q,D)=>({Index:D+1,"Workspace Id":q.id,Kind:q.kind,Target:(q.target||"").slice(0,120),Modified:new Date(q.mtime).toISOString().replace("T"," ").slice(0,19),Id:"",Version:"",Source:"",Installed:""}))}});Z({site:"trae-solo",name:"extensions-list",access:"read",description:"List VSCode extensions installed in Trae SOLO (~/.trae/extensions/extensions.json). Works while Trae is closed.",domain:"localhost",browser:!1,strategy:$.LOCAL,args:[],columns:["Index","Workspace Id","Kind","Target","Modified","Id","Version","Source","Installed"],func:async()=>{if(!F.existsSync(V))throw new U(`extensions.json not found: ${V}`,"Trae SOLO has not installed any VSCode extensions yet.");let B;try{B=JSON.parse(F.readFileSync(V,"utf-8"))}catch(z){throw new U(`Failed to parse extensions.json: ${z.message}`,"")}if(!Array.isArray(B)||!B.length)throw new b("trae-solo extensions-list","No extensions installed.");return B.map((z,M)=>{const L=z?.metadata?.installedTimestamp,q=L?new Date(L).toISOString().replace("T"," ").slice(0,19):"";return{Index:M+1,"Workspace Id":"",Kind:"",Target:"",Modified:"",Id:z?.identifier?.id||"?",Version:z?.version||"",Source:z?.metadata?.source||"",Installed:q}})}});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{AuthRequiredError as I}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as N}from"../_shared/site-auth.js";const P="https://www.tumblr.com",Q="https://www.tumblr.com/dashboard";async function J(z){const G=(await z.getCookies({url:P})).find((L)=>L.name==="logged_in");return!!(G&&G.value&&G.value!=="0")}async function K(z){await z.goto(Q);const y=await z.evaluate(`(async () => {
|
|
2
|
+
try {
|
|
3
|
+
if (!(window.tumblr && typeof window.tumblr.apiFetch === 'function')) {
|
|
4
|
+
return { ok: false, reason: 'apiFetch unavailable — not on a logged-in tumblr page?' };
|
|
5
|
+
}
|
|
6
|
+
var r = await window.tumblr.apiFetch('/v2/user/info');
|
|
7
|
+
var u = (r && r.response && r.response.user) || null;
|
|
8
|
+
if (!u || !u.name) return { ok: false, reason: 'anonymous' };
|
|
9
|
+
var blogs = (u.blogs || []).map(function (b) {
|
|
10
|
+
return { name: String(b.name || ''), primary: !!b.primary, uuid: String(b.uuid || '') };
|
|
11
|
+
});
|
|
12
|
+
var primary = blogs.filter(function (b) { return b.primary; })[0] || blogs[0] || null;
|
|
13
|
+
return {
|
|
14
|
+
ok: true,
|
|
15
|
+
name: String(u.name),
|
|
16
|
+
primary_blog: primary ? primary.name : '',
|
|
17
|
+
blogs: blogs.map(function (b) { return b.name; }).join(','),
|
|
18
|
+
};
|
|
19
|
+
} catch (e) {
|
|
20
|
+
var status = e && e.status;
|
|
21
|
+
if (status === 401 || status === 403) return { ok: false, reason: 'HTTP ' + status };
|
|
22
|
+
return { ok: false, reason: String((e && e.message) || e) };
|
|
23
|
+
}
|
|
24
|
+
})()`);if(!y||!y.ok)throw new I("tumblr.com",`Not logged in (${y?y.reason:"no probe"})`);return{name:y.name,primary_blog:y.primary_blog,blogs:y.blogs}}N({site:"tumblr",domain:"tumblr.com",loginUrl:"https://www.tumblr.com/login",columns:["name","primary_blog","blogs"],loginDescription:"打开 Tumblr 登录页并等待浏览器完成登录(供桌面客户端引导登录)。",quickCheck:J,verify:K,poll:async(z)=>{if(!await J(z))throw new I("tumblr.com","Waiting for tumblr.com session cookie");return K(z)}});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import*as M from"node:fs";import{cli as _,Strategy as L}from"@jackwener/opencli/registry";import{ArgumentError as U,AuthRequiredError as X,CommandExecutionError as P}from"@jackwener/opencli/errors";import{assertLiteralContent as j}from"../_shared/content-guard.js";const O="https://www.tumblr.com",q="https://www.tumblr.com/dashboard",Y=["published","draft","queue","private"];export function blogHost(z){const G=String(z||"").trim();if(!G)return"";return G.includes(".")?G:`${G}.tumblr.com`}export function resolveBody(z){if(z["body-file"]){const G=String(z["body-file"]);if(!M.statSync(G,{throwIfNoEntry:!1})?.isFile())throw new U(`--body-file not found: ${G}`);return M.readFileSync(G,"utf8")}if(z.body!==void 0&&z.body!==null){j(String(z.body),{fileFlag:"--body-file"});return String(z.body)}if(z.text!==void 0&&z.text!==null){j(String(z.text),{fileFlag:"--body-file"});return String(z.text)}return}export function buildContent(z,G){const I=[];if(z.title)I.push({type:"text",subtype:"heading1",text:String(z.title)});if(G!==void 0&&G!=="")for(const N of String(G).split(/\n{2,}/)){const J=N.replace(/\n+$/,"");if(J.trim()!=="")I.push({type:"text",text:J})}if(z["image-url"])I.push({type:"image",media:[{url:String(z["image-url"])}]});if(z.link)I.push({type:"link",url:String(z.link)});if(I.length===0)throw new U("Provide at least one of --title, --text/--body/--body-file, --image-url, or --link");return I}export function resolveTags(z){if(z===void 0||z===null||z==="")return"";return String(z).split(",").map((G)=>G.trim()).filter(Boolean).join(",")}async function Z(z,G,I){return z.evaluate(`(async () => {
|
|
2
|
+
try {
|
|
3
|
+
if (!(window.tumblr && typeof window.tumblr.apiFetch === 'function')) {
|
|
4
|
+
return { kind: 'auth', detail: 'apiFetch unavailable — not on a logged-in tumblr page?' };
|
|
5
|
+
}
|
|
6
|
+
var r = await window.tumblr.apiFetch(${JSON.stringify(G)}, ${JSON.stringify(I)});
|
|
7
|
+
return { kind: 'ok', response: (r && r.response) || null, meta: (r && r.meta) || null };
|
|
8
|
+
} catch (e) {
|
|
9
|
+
var status = (e && (e.status || (e.body && e.body.meta && e.body.meta.status))) || 0;
|
|
10
|
+
var msg = (e && (e.message || (e.body && e.body.meta && e.body.meta.msg))) || String(e);
|
|
11
|
+
if (status === 401 || status === 403) return { kind: 'auth', detail: 'HTTP ' + status + ' ' + msg };
|
|
12
|
+
return { kind: 'http', status: status, detail: String(msg).slice(0, 300) };
|
|
13
|
+
}
|
|
14
|
+
})()`)}async function F(z,G){if(G.blog)return blogHost(G.blog);const I=await Z(z,"/v2/user/info",{method:"GET"});if(I?.kind==="auth")throw new X("tumblr.com",`Not logged in (${I.detail}). Run \`opencli tumblr login\`.`);if(I?.kind!=="ok"||!I.response||!I.response.user)throw new P(`Failed to resolve default blog: ${JSON.stringify(I)}`);const N=I.response.user.blogs||[],J=N.find((Q)=>Q.primary)||N[0];if(!J||!J.name)throw new P("No blog found on this account; pass --blog explicitly.");return blogHost(J.name)}_({site:"tumblr",name:"publish",access:"write",description:"Publish a Tumblr post (NPF: title/text/image/link). Draft by default; pass --state published to go live.",domain:"tumblr.com",strategy:L.COOKIE,browser:!0,args:[{name:"title",type:"string",required:!1,help:"Title (rendered as a heading1 text block)"},{name:"text",type:"string",required:!1,help:"Body text (blank lines split paragraphs); alias of --body"},{name:"body",type:"string",required:!1,help:"Body text (blank lines split paragraphs)"},{name:"body-file",type:"string",required:!1,help:"Path to a text file for the body"},{name:"image-url",type:"string",required:!1,help:"Image URL (NPF image block)"},{name:"link",type:"string",required:!1,help:"Link URL (NPF link block)"},{name:"tags",type:"string",required:!1,help:"Comma-separated tags"},{name:"state",type:"string",required:!1,default:"draft",choices:Y,help:"draft | published | queue | private (default: draft)"},{name:"blog",type:"string",required:!1,help:"Target blog identifier (else your primary blog)"}],columns:["status","id","blog","state","url"],func:async(z,G)=>{if(!z)throw new P("Browser session required for tumblr publish");const I=String(G.state??"draft");if(!Y.includes(I))throw new U(`Invalid --state "${I}". One of: ${Y.join(", ")}`);const N=resolveBody(G),J=buildContent(G,N),Q=resolveTags(G.tags);await z.goto(q);const V=await F(z,G),$={content:J,state:I};if(Q)$.tags=Q;const K=await Z(z,`/v2/blog/${V}/posts`,{method:"POST",body:$});if(K?.kind==="auth")throw new X("tumblr.com",`Not logged in (${K.detail}). Run \`opencli tumblr login\`.`);if(K?.kind==="http")throw new P(`Tumblr publish failed: HTTP ${K.status} ${K.detail}`);if(K?.kind!=="ok"||!K.response)throw new P(`Unexpected Tumblr response: ${JSON.stringify(K)}`);const W=K.response.id_string??(K.response.id!=null?String(K.response.id):"");if(!W)throw new P("Tumblr post response missing id");return[{status:"success",id:W,blog:V,state:I,url:I==="published"?`${O}/${V}/${W}`:""}]}});_({site:"tumblr",name:"delete",access:"write",description:"Delete a Tumblr post by id (POST /v2/blog/{blog}/post/delete).",domain:"tumblr.com",strategy:L.COOKIE,browser:!0,args:[{name:"id",type:"string",required:!0,help:"Post id to delete"},{name:"blog",type:"string",required:!1,help:"Target blog identifier (else your primary blog)"}],columns:["status","id","blog"],func:async(z,G)=>{if(!z)throw new P("Browser session required for tumblr delete");const I=String(G.id??"").trim();if(!I)throw new U("--id is required");await z.goto(q);const N=await F(z,G),J=await Z(z,`/v2/blog/${N}/post/delete`,{method:"POST",body:{id:I}});if(J?.kind==="auth")throw new X("tumblr.com",`Not logged in (${J.detail}). Run \`opencli tumblr login\`.`);if(J?.kind==="http")throw new P(`Tumblr delete failed: HTTP ${J.status} ${J.detail}`);if(J?.kind!=="ok")throw new P(`Unexpected Tumblr delete response: ${JSON.stringify(J)}`);return[{status:"deleted",id:I,blog:N}]}});export const __test__={blogHost,resolveBody,buildContent,resolveTags};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as o,Strategy as u}from"@jackwener/opencli/registry";import{EmptyResultError as l}from"@jackwener/opencli/errors";import{TVMAZE_BASE as d,joinList as c,requireBoundedInt as g,requireString as h,stripHtml as p,tvmazeFetch as w}from"./utils.js";o({site:"tvmaze",name:"search",access:"read",description:"TVmaze TV show search by title (returns id, name, network, premiered/ended, rating)",domain:"tvmaze.com",strategy:u.PUBLIC,browser:!1,args:[{name:"query",positional:!0,type:"string",required:!0,help:"TV show title or fragment to search for"},{name:"limit",type:"int",default:20,help:"Max rows to return (1-50)"}],columns:["rank","id","name","type","language","genres","status","premiered","ended","network","rating","matchScore","summary","url"],func:async(a)=>{const r=h(a.query,"query"),i=g(a.limit,20,50,"limit"),t=await w(`${d}/search/shows?q=${encodeURIComponent(r)}`,`tvmaze search ${r}`);if(!Array.isArray(t)||t.length===0)throw new l("tvmaze search",`TVmaze returned no shows matching "${r}".`);return t.slice(0,i).map((n,s)=>{const e=n?.show??{},m=e.network?.name??e.webChannel?.name??"";return{rank:s+1,id:typeof e.id==="number"?e.id:null,name:String(e.name??"").trim(),type:String(e.type??"").trim(),language:String(e.language??"").trim(),genres:c(e.genres),status:String(e.status??"").trim(),premiered:typeof e.premiered==="string"?e.premiered:null,ended:typeof e.ended==="string"?e.ended:null,network:String(m).trim(),rating:e.rating?.average==null?null:Number(e.rating.average),matchScore:typeof n?.score==="number"?n.score:null,summary:p(e.summary),url:String(e.url??"").trim()}})}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as o,Strategy as u}from"@jackwener/opencli/registry";import{EmptyResultError as l}from"@jackwener/opencli/errors";import{TVMAZE_BASE as d,joinList as g,requireShowId as c,stripHtml as h,tvmazeFetch as w}from"./utils.js";o({site:"tvmaze",name:"show",access:"read",description:"Single TVmaze TV show detail by id (network, schedule, rating, IMDB/TheTVDB cross-refs)",domain:"tvmaze.com",strategy:u.PUBLIC,browser:!1,args:[{name:"id",positional:!0,type:"int",required:!0,help:"TVmaze show id (positive integer)"}],columns:["id","name","type","language","genres","status","premiered","ended","runtime","averageRuntime","network","country","schedule","rating","imdb","thetvdb","officialSite","summary","url"],func:async(i)=>{const t=c(i.id),e=await w(`${d}/shows/${t}`,`tvmaze show ${t}`);if(!e||e.id==null)throw new l("tvmaze show",`TVmaze returned no show for id ${t}.`);const a=e.network?.name??e.webChannel?.name??"",s=e.network?.country?.name??e.webChannel?.country?.name??"",r=Array.isArray(e.schedule?.days)?e.schedule.days.join(", "):"",n=String(e.schedule?.time??"").trim(),m=r||n?`${r}${r&&n?" ":""}${n}`.trim():"";return[{id:Number(e.id),name:String(e.name??"").trim(),type:String(e.type??"").trim(),language:String(e.language??"").trim(),genres:g(e.genres),status:String(e.status??"").trim(),premiered:typeof e.premiered==="string"?e.premiered:null,ended:typeof e.ended==="string"?e.ended:null,runtime:e.runtime==null?null:Number(e.runtime),averageRuntime:e.averageRuntime==null?null:Number(e.averageRuntime),network:String(a).trim(),country:String(s).trim(),schedule:m,rating:e.rating?.average==null?null:Number(e.rating.average),imdb:String(e.externals?.imdb??"").trim(),thetvdb:e.externals?.thetvdb==null?null:Number(e.externals.thetvdb),officialSite:String(e.officialSite??"").trim(),summary:h(e.summary),url:String(e.url??"").trim()}]}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ArgumentError as J,CommandExecutionError as K,EmptyResultError as O}from"@jackwener/opencli/errors";export const TVMAZE_BASE="https://api.tvmaze.com";const Q="opencli-tvmaze-adapter (+https://github.com/jackwener/opencli)";export function requireString(D,z){const q=String(D??"").trim();if(!q)throw new J(`tvmaze ${z} cannot be empty`);return q}export function requireShowId(D){const z=D,q=typeof z==="number"?z:Number(String(z??"").trim());if(!Number.isInteger(q)||q<=0)throw new J("tvmaze show id is required and must be a positive integer","TVmaze show ids appear in the URL: https://www.tvmaze.com/shows/<id>/<slug>.");return q}export function requireBoundedInt(D,z,q,F="limit"){const B=D??z,G=typeof B==="number"?B:Number(B);if(!Number.isInteger(G)||G<=0)throw new J(`tvmaze ${F} must be a positive integer`);if(G>q)throw new J(`tvmaze ${F} must be <= ${q}`);return G}export async function tvmazeFetch(D,z){let q;try{q=await fetch(D,{headers:{"user-agent":Q,accept:"application/json"}})}catch(B){throw new K(`${z} request failed: ${B?.message??B}`,"Check that api.tvmaze.com is reachable from this network.")}if(q.status===404)throw new O(z,`TVmaze returned 404 for ${D}.`);if(q.status===429)throw new K(`${z} returned HTTP 429 (rate limited)`,"TVmaze caps unauthenticated traffic at ~20 req/10s; wait a few seconds and retry.");if(!q.ok)throw new K(`${z} returned HTTP ${q.status}`);let F;try{F=await q.json()}catch(B){throw new K(`${z} returned malformed JSON: ${B?.message??B}`)}return F}const S={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",rsquo:"’",lsquo:"‘",rdquo:"”",ldquo:"“",hellip:"…",ndash:"–",mdash:"—"};export function stripHtml(D){if(D==null)return"";let z=String(D);z=z.replace(/<[^>]+>/g,"");z=z.replace(/&#x([0-9a-fA-F]+);/g,(q,F)=>{const B=parseInt(F,16);return Number.isFinite(B)?String.fromCodePoint(B):""}).replace(/&#(\d+);/g,(q,F)=>{const B=parseInt(F,10);return Number.isFinite(B)?String.fromCodePoint(B):""}).replace(/&([a-zA-Z]+);/g,(q,F)=>S[F]??q);return z.replace(/\s+/g," ").trim()}export function joinList(D){return Array.isArray(D)?D.filter(Boolean).join(", "):""}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import{CommandExecutionError as V}from"@jackwener/opencli/errors";import{cli as W,Strategy as X}from"@jackwener/opencli/registry";W({site:"twitter",name:"accept",access:"write",description:"Auto-accept DM requests containing specific keywords",domain:"x.com",strategy:X.UI,browser:!0,args:[{name:"query",type:"string",required:!0,positional:!0,help:'Keywords to match (comma-separated for OR, e.g. "群,微信")'},{name:"max",type:"int",required:!1,default:20,help:"Maximum number of requests to accept (default: 20)"},{name:"timeout",type:"int",required:!1,default:600,help:"Max seconds for the overall command (default: 600 — batch op)"}],columns:["index","status","user","message"],func:async(z,N)=>{if(!z)throw new V("Browser session required for twitter accept");const L=N.query.split(",").map((G)=>G.trim()).filter(Boolean),D=N.max??20,B=[];let F=0;const O=new Set;for(let G=0;G<D+50;G++){if(F>=D)break;await z.goto("https://x.com/messages/requests");await z.wait(4);const M=await z.evaluate(`(async () => {
|
|
2
|
+
try {
|
|
3
|
+
// Wait for initial items
|
|
4
|
+
let attempts = 0;
|
|
5
|
+
while (attempts < 10) {
|
|
6
|
+
const convs = document.querySelectorAll('[data-testid="conversation"]');
|
|
7
|
+
if (convs.length > 0) break;
|
|
8
|
+
await new Promise(r => setTimeout(r, 1000));
|
|
9
|
+
attempts++;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Scroll to load more
|
|
13
|
+
const seenCount = new Set();
|
|
14
|
+
let noNewCount = 0;
|
|
15
|
+
for (let scroll = 0; scroll < 20; scroll++) {
|
|
16
|
+
const convs = Array.from(document.querySelectorAll('[data-testid="conversation"]'));
|
|
17
|
+
const prevSize = seenCount.size;
|
|
18
|
+
convs.forEach((_, i) => seenCount.add(i));
|
|
19
|
+
if (convs.length >= ${D+10}) break;
|
|
20
|
+
|
|
21
|
+
// Scroll last item into view
|
|
22
|
+
if (convs.length > 0) {
|
|
23
|
+
convs[convs.length - 1].scrollIntoView({ behavior: 'instant', block: 'end' });
|
|
24
|
+
}
|
|
25
|
+
await new Promise(r => setTimeout(r, 1500));
|
|
26
|
+
|
|
27
|
+
if (seenCount.size <= prevSize) {
|
|
28
|
+
noNewCount++;
|
|
29
|
+
if (noNewCount >= 3) break;
|
|
30
|
+
} else {
|
|
31
|
+
noNewCount = 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const convs = Array.from(document.querySelectorAll('[data-testid="conversation"]'));
|
|
36
|
+
if (convs.length === 0) return { ok: false, count: 0, items: [] };
|
|
37
|
+
|
|
38
|
+
const items = convs.map((conv, idx) => {
|
|
39
|
+
const text = conv.innerText || '';
|
|
40
|
+
const link = conv.querySelector('a[href]');
|
|
41
|
+
const href = link ? link.href : '';
|
|
42
|
+
const lines = text.split('\\n').filter(l => l.trim());
|
|
43
|
+
const user = lines[0] || 'Unknown';
|
|
44
|
+
return { idx, text, href, user };
|
|
45
|
+
});
|
|
46
|
+
return { ok: true, count: convs.length, items };
|
|
47
|
+
} catch(e) {
|
|
48
|
+
return { ok: false, error: String(e), count: 0, items: [] };
|
|
49
|
+
}
|
|
50
|
+
})()`);if(!M?.ok||M.count===0){if(B.length===0)B.push({index:1,status:"info",user:"System",message:"No message requests found"});break}let P=!1;for(const H of M.items){if(F>=D)break;const Q=H.href||`conv-${H.idx}`;if(O.has(Q))continue;O.add(Q);if(!L.some((U)=>H.text.includes(U)))continue;if(!(await z.evaluate(`(async () => {
|
|
51
|
+
try {
|
|
52
|
+
const convs = Array.from(document.querySelectorAll('[data-testid="conversation"]'));
|
|
53
|
+
const conv = convs[${H.idx}];
|
|
54
|
+
if (!conv) return { ok: false, error: 'Conversation element not found' };
|
|
55
|
+
conv.click();
|
|
56
|
+
await new Promise(r => setTimeout(r, 2000));
|
|
57
|
+
return { ok: true };
|
|
58
|
+
} catch(e) {
|
|
59
|
+
return { ok: false, error: String(e) };
|
|
60
|
+
}
|
|
61
|
+
})()`))?.ok)continue;await z.wait(2);const J=await z.evaluate(`(async () => {
|
|
62
|
+
try {
|
|
63
|
+
const keywords = ${JSON.stringify(L)};
|
|
64
|
+
|
|
65
|
+
// Get username from conversation header
|
|
66
|
+
const heading = document.querySelector('[data-testid="conversation-header"]') ||
|
|
67
|
+
document.querySelector('[data-testid="DM-conversation-header"]');
|
|
68
|
+
let username = 'Unknown';
|
|
69
|
+
if (heading) {
|
|
70
|
+
username = heading.innerText.trim().split('\\n')[0];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Read full chat area text
|
|
74
|
+
const chatArea = document.querySelector('[data-testid="DmScrollerContainer"]') ||
|
|
75
|
+
document.querySelector('[data-testid="DMConversationBody"]') ||
|
|
76
|
+
document.querySelector('main [data-testid="cellInnerDiv"]')?.closest('section') ||
|
|
77
|
+
document.querySelector('main');
|
|
78
|
+
const text = chatArea ? chatArea.innerText : '';
|
|
79
|
+
|
|
80
|
+
// Verify keyword match in full chat content
|
|
81
|
+
const matchedKw = keywords.filter(k => text.includes(k));
|
|
82
|
+
if (matchedKw.length === 0) {
|
|
83
|
+
return { status: 'skipped', user: username, message: 'No keyword match in full content' };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Find the Accept button
|
|
87
|
+
const allBtns = Array.from(document.querySelectorAll('[role="button"]'));
|
|
88
|
+
const acceptBtn = allBtns.find(btn => {
|
|
89
|
+
const t = btn.innerText.trim().toLowerCase();
|
|
90
|
+
return t === 'accept' || t === '接受';
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
if (!acceptBtn) {
|
|
94
|
+
return { status: 'no_button', user: username, message: 'Keyword matched but no Accept button (already accepted?)' };
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Click Accept
|
|
98
|
+
acceptBtn.click();
|
|
99
|
+
await new Promise(r => setTimeout(r, 2000));
|
|
100
|
+
|
|
101
|
+
// Check for confirmation dialog
|
|
102
|
+
const btnsAfter = Array.from(document.querySelectorAll('[role="button"]'));
|
|
103
|
+
const confirmBtn = btnsAfter.find(btn => {
|
|
104
|
+
const t = btn.innerText.trim().toLowerCase();
|
|
105
|
+
return (t === 'accept' || t === '接受') && btn !== acceptBtn;
|
|
106
|
+
});
|
|
107
|
+
if (confirmBtn) {
|
|
108
|
+
confirmBtn.click();
|
|
109
|
+
await new Promise(r => setTimeout(r, 1000));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return { status: 'accepted', user: username, message: 'Accepted! Matched: ' + matchedKw.join(', ') };
|
|
113
|
+
} catch(e) {
|
|
114
|
+
return { status: 'error', user: 'system', message: String(e) };
|
|
115
|
+
}
|
|
116
|
+
})()`);if(J?.status==="accepted"){F++;P=!0;B.push({index:F,status:"accepted",user:J.user||"Unknown",message:J.message||"Accepted"});await z.wait(2);break}else if(J?.status==="no_button")continue}if(!P)break}if(B.length===0)B.push({index:0,status:"info",user:"System",message:`No requests matched keywords "${L.join(", ")}"`});return B}});
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import{AuthRequiredError as Z,CommandExecutionError as G}from"@jackwener/opencli/errors";import{cli as $,Strategy as b}from"@jackwener/opencli/registry";import{resolveTwitterQueryId as K,describeTwitterApiError as L}from"./shared.js";import{TWITTER_BEARER_TOKEN as N}from"./utils.js";const O="7xflPyRiUxGVbJd4uWmbfg";$({site:"twitter",name:"article",access:"read",description:"Fetch a Twitter Article (long-form content) and export as Markdown",domain:"x.com",strategy:b.COOKIE,browser:!0,args:[{name:"tweet-id",type:"string",positional:!0,required:!0,help:"Tweet ID or URL containing the article"}],columns:["title","author","content","url"],func:async(f,P)=>{let j=P["tweet-id"];const V=/\/article\/\d+/.test(j),H=j.match(/\/(?:status|article)\/(\d+)/);if(H)j=H[1];if(V){await f.goto(`https://x.com/i/article/${j}`);await f.wait(3);const F=await f.evaluate(`
|
|
2
|
+
(function() {
|
|
3
|
+
var links = document.querySelectorAll('a[href*="/status/"]');
|
|
4
|
+
for (var i = 0; i < links.length; i++) {
|
|
5
|
+
var m = links[i].href.match(/\\/status\\/(\\d+)/);
|
|
6
|
+
if (m) return m[1];
|
|
7
|
+
}
|
|
8
|
+
var og = document.querySelector('meta[property="og:url"]');
|
|
9
|
+
if (og && og.content) {
|
|
10
|
+
var m2 = og.content.match(/\\/status\\/(\\d+)/);
|
|
11
|
+
if (m2) return m2[1];
|
|
12
|
+
}
|
|
13
|
+
return null;
|
|
14
|
+
})()
|
|
15
|
+
`);if(!F||typeof F!=="string")throw new G(`Could not resolve article ${j} to a tweet ID. The article page may not contain a linked tweet.`);j=F}await f.goto(`https://x.com/i/status/${j}`);await f.wait(3);const J=(await f.getCookies({url:"https://x.com"})).find((F)=>F.name==="ct0")?.value||null;if(!J)throw new Z("x.com","Not logged into x.com (no ct0 cookie)");const X=await K(f,"TweetResultByRestId",O),z=await f.evaluate(`
|
|
16
|
+
async () => {
|
|
17
|
+
const tweetId = "${j}";
|
|
18
|
+
const ct0 = ${JSON.stringify(J)};
|
|
19
|
+
|
|
20
|
+
const bearer = ${JSON.stringify(N)};
|
|
21
|
+
const headers = {
|
|
22
|
+
'Authorization': 'Bearer ' + decodeURIComponent(bearer),
|
|
23
|
+
'X-Csrf-Token': ct0,
|
|
24
|
+
'X-Twitter-Auth-Type': 'OAuth2Session',
|
|
25
|
+
'X-Twitter-Active-User': 'yes'
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const variables = JSON.stringify({
|
|
29
|
+
tweetId: tweetId,
|
|
30
|
+
withCommunity: false,
|
|
31
|
+
includePromotedContent: false,
|
|
32
|
+
withVoice: false,
|
|
33
|
+
});
|
|
34
|
+
const features = JSON.stringify({
|
|
35
|
+
longform_notetweets_consumption_enabled: true,
|
|
36
|
+
responsive_web_twitter_article_tweet_consumption_enabled: true,
|
|
37
|
+
longform_notetweets_rich_text_read_enabled: true,
|
|
38
|
+
longform_notetweets_inline_media_enabled: true,
|
|
39
|
+
articles_preview_enabled: true,
|
|
40
|
+
responsive_web_graphql_exclude_directive_enabled: true,
|
|
41
|
+
verified_phone_label_enabled: false,
|
|
42
|
+
});
|
|
43
|
+
const fieldToggles = JSON.stringify({
|
|
44
|
+
withArticleRichContentState: true,
|
|
45
|
+
withArticlePlainText: true,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const url = '/i/api/graphql/' + ${JSON.stringify(X)} + '/TweetResultByRestId?variables='
|
|
49
|
+
+ encodeURIComponent(variables)
|
|
50
|
+
+ '&features=' + encodeURIComponent(features)
|
|
51
|
+
+ '&fieldToggles=' + encodeURIComponent(fieldToggles);
|
|
52
|
+
|
|
53
|
+
const resp = await fetch(url, {headers, credentials: 'include'});
|
|
54
|
+
if (!resp.ok) return {httpStatus: resp.status};
|
|
55
|
+
const d = await resp.json();
|
|
56
|
+
|
|
57
|
+
const result = d.data?.tweetResult?.result;
|
|
58
|
+
if (!result) return {error: 'Article not found'};
|
|
59
|
+
|
|
60
|
+
// Unwrap TweetWithVisibilityResults
|
|
61
|
+
const tw = result.tweet || result;
|
|
62
|
+
const legacy = tw.legacy || {};
|
|
63
|
+
const user = tw.core?.user_results?.result;
|
|
64
|
+
const screenName = user?.legacy?.screen_name || user?.core?.screen_name || 'unknown';
|
|
65
|
+
|
|
66
|
+
// Extract article content
|
|
67
|
+
const articleResults = tw.article?.article_results?.result;
|
|
68
|
+
if (!articleResults) {
|
|
69
|
+
// Fallback: return note_tweet text if present
|
|
70
|
+
const noteText = tw.note_tweet?.note_tweet_results?.result?.text;
|
|
71
|
+
if (noteText) {
|
|
72
|
+
return [{
|
|
73
|
+
title: '(Note Tweet)',
|
|
74
|
+
author: screenName,
|
|
75
|
+
content: noteText,
|
|
76
|
+
url: 'https://x.com/' + screenName + '/status/' + tweetId,
|
|
77
|
+
}];
|
|
78
|
+
}
|
|
79
|
+
return {error: 'Tweet ' + tweetId + ' has no article content'};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const title = articleResults.title || '(Untitled)';
|
|
83
|
+
const contentState = articleResults.content_state || {};
|
|
84
|
+
const blocks = contentState.blocks || [];
|
|
85
|
+
|
|
86
|
+
// Convert draft.js blocks to Markdown
|
|
87
|
+
const parts = [];
|
|
88
|
+
let orderedCounter = 0;
|
|
89
|
+
for (const block of blocks) {
|
|
90
|
+
const blockType = block.type || 'unstyled';
|
|
91
|
+
if (blockType === 'atomic') continue;
|
|
92
|
+
const text = block.text || '';
|
|
93
|
+
if (!text) continue;
|
|
94
|
+
if (blockType !== 'ordered-list-item') orderedCounter = 0;
|
|
95
|
+
|
|
96
|
+
if (blockType === 'header-one') parts.push('# ' + text);
|
|
97
|
+
else if (blockType === 'header-two') parts.push('## ' + text);
|
|
98
|
+
else if (blockType === 'header-three') parts.push('### ' + text);
|
|
99
|
+
else if (blockType === 'blockquote') parts.push('> ' + text);
|
|
100
|
+
else if (blockType === 'unordered-list-item') parts.push('- ' + text);
|
|
101
|
+
else if (blockType === 'ordered-list-item') {
|
|
102
|
+
orderedCounter++;
|
|
103
|
+
parts.push(orderedCounter + '. ' + text);
|
|
104
|
+
}
|
|
105
|
+
else if (blockType === 'code-block') parts.push('\`\`\`\\n' + text + '\\n\`\`\`');
|
|
106
|
+
else parts.push(text);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return [{
|
|
110
|
+
title,
|
|
111
|
+
author: screenName,
|
|
112
|
+
content: parts.join('\\n\\n') || legacy.full_text || '',
|
|
113
|
+
url: 'https://x.com/' + screenName + '/status/' + tweetId,
|
|
114
|
+
}];
|
|
115
|
+
}
|
|
116
|
+
`);if(z?.httpStatus)throw new G(L("TweetResultByRestId",z.httpStatus));if(z?.error)throw new G(z.error+(z.hint?` (${z.hint})`:""));return z||[]}});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{AuthRequiredError as r}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as s}from"../_shared/site-auth.js";import{normalizeTwitterScreenName as c,unwrapBrowserResult as m}from"./shared.js";async function n(t){const o=await t.getCookies({url:"https://x.com"}),e=new Set(o.filter((i)=>i.value).map((i)=>i.name));return e.has("auth_token")&&e.has("ct0")}async function a(t){if(!await n(t))throw new r("x.com","Twitter/X auth cookies are missing");await t.goto("https://x.com/home");await t.wait(1);const o=m(await t.evaluate(`() => {
|
|
2
|
+
const link = document.querySelector('a[data-testid="AppTabBar_Profile_Link"]');
|
|
3
|
+
return link ? link.getAttribute('href') : null;
|
|
4
|
+
}`)),e=c(typeof o==="string"?o:"");if(!e)throw new r("x.com","Could not detect the logged-in Twitter/X profile link");return{username:e,url:`https://x.com/${e}`}}s({site:"twitter",domain:"x.com",loginUrl:"https://x.com/i/flow/login",columns:["username","url"],quickCheck:n,verify:a,poll:async(t)=>{if(!await n(t))throw new r("x.com","Waiting for Twitter/X auth cookies");return a(t)}});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import{CommandExecutionError as i}from"@jackwener/opencli/errors";import{cli as n,Strategy as s}from"@jackwener/opencli/registry";n({site:"twitter",name:"block",access:"write",description:"Block a Twitter user",domain:"x.com",strategy:s.UI,browser:!0,args:[{name:"username",type:"string",positional:!0,required:!0,help:"Twitter screen name (without @)"}],columns:["status","message"],func:async(e,r)=>{if(!e)throw new i("Browser session required for twitter block");const t=r.username.replace(/^@/,"");await e.goto(`https://x.com/${t}`);await e.wait({selector:'[data-testid="primaryColumn"]'});const o=await e.evaluate(`(async () => {
|
|
2
|
+
try {
|
|
3
|
+
let attempts = 0;
|
|
4
|
+
|
|
5
|
+
// Check if already blocked (profile shows "Blocked" / unblock button)
|
|
6
|
+
while (attempts < 20) {
|
|
7
|
+
const blockedIndicator = document.querySelector('[data-testid$="-unblock"]');
|
|
8
|
+
if (blockedIndicator) {
|
|
9
|
+
return { ok: true, message: 'Already blocking @${t}.' };
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const moreBtn = document.querySelector('[data-testid="userActions"]');
|
|
13
|
+
if (moreBtn) break;
|
|
14
|
+
|
|
15
|
+
await new Promise(r => setTimeout(r, 500));
|
|
16
|
+
attempts++;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const moreBtn = document.querySelector('[data-testid="userActions"]');
|
|
20
|
+
if (!moreBtn) {
|
|
21
|
+
return { ok: false, message: 'Could not find user actions menu. Are you logged in?' };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Open the more actions menu
|
|
25
|
+
moreBtn.click();
|
|
26
|
+
await new Promise(r => setTimeout(r, 1000));
|
|
27
|
+
|
|
28
|
+
// Find the Block menu item
|
|
29
|
+
const menuItems = document.querySelectorAll('[role="menuitem"]');
|
|
30
|
+
let blockItem = null;
|
|
31
|
+
for (const item of menuItems) {
|
|
32
|
+
if (item.textContent && item.textContent.includes('Block')) {
|
|
33
|
+
blockItem = item;
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (!blockItem) {
|
|
39
|
+
return { ok: false, message: 'Could not find Block option in menu.' };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
blockItem.click();
|
|
43
|
+
await new Promise(r => setTimeout(r, 1000));
|
|
44
|
+
|
|
45
|
+
// Confirm the block in the dialog
|
|
46
|
+
const confirmBtn = document.querySelector('[data-testid="confirmationSheetConfirm"]');
|
|
47
|
+
if (confirmBtn) {
|
|
48
|
+
confirmBtn.click();
|
|
49
|
+
await new Promise(r => setTimeout(r, 1500));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Verify
|
|
53
|
+
const verify = document.querySelector('[data-testid$="-unblock"]');
|
|
54
|
+
if (verify) {
|
|
55
|
+
return { ok: true, message: 'Successfully blocked @${t}.' };
|
|
56
|
+
} else {
|
|
57
|
+
return { ok: false, message: 'Block action initiated but UI did not update.' };
|
|
58
|
+
}
|
|
59
|
+
} catch (e) {
|
|
60
|
+
return { ok: false, message: e.toString() };
|
|
61
|
+
}
|
|
62
|
+
})()`);if(o.ok)await e.wait(2);return[{status:o.ok?"success":"failed",message:o.message}]}});
|