publishport-opencli 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli-manifest.json +35 -0
- package/clis/12306/me.js +2 -2
- package/clis/12306/orders.js +3 -3
- package/clis/12306/passengers.js +3 -3
- package/clis/12306/price.js +1 -1
- package/clis/12306/stations.js +1 -1
- package/clis/12306/train.js +1 -1
- package/clis/12306/trains.js +1 -1
- package/clis/12306/utils.js +1 -1
- package/clis/1688/download.js +1 -1
- package/clis/1688/item.js +4 -4
- package/clis/1688/search.js +4 -4
- package/clis/1688/store.js +4 -4
- package/clis/1point3acres/forum.js +1 -1
- package/clis/1point3acres/forums.js +1 -1
- package/clis/1point3acres/notifications.js +1 -1
- package/clis/1point3acres/search.js +1 -1
- package/clis/1point3acres/thread.js +2 -2
- package/clis/1point3acres/user.js +1 -1
- package/clis/1point3acres/utils.js +2 -2
- package/clis/36kr/article.js +2 -2
- package/clis/36kr/hot.js +2 -2
- package/clis/36kr/news.js +1 -1
- package/clis/36kr/search.js +2 -2
- package/clis/51job/company.js +2 -2
- package/clis/51job/detail.js +2 -2
- package/clis/51job/hot.js +1 -1
- package/clis/51job/search.js +1 -1
- package/clis/51job/utils.js +7 -7
- package/clis/_atlassian/shared.js +9 -9
- package/clis/_shared/article/auth.js +4 -4
- package/clis/_shared/article/douban-md2draft.js +4 -4
- package/clis/_shared/article/format.js +1 -1
- package/clis/_shared/article/images.js +7 -7
- package/clis/_shared/article/login.js +1 -1
- package/clis/_shared/article/publish.js +11 -11
- package/clis/_shared/common.js +1 -1
- package/clis/_shared/content-guard.js +1 -1
- package/clis/_shared/desktop-commands.js +1 -1
- package/clis/_shared/file-inject.js +12 -12
- package/clis/_shared/self-hosted-sites.js +2 -2
- package/clis/_shared/site-auth.js +1 -1
- package/clis/_shared/token-auth.js +2 -2
- package/clis/_shared/video-publish.js +9 -9
- package/clis/amazon/offer.js +3 -3
- package/clis/amazon/product.js +5 -5
- package/clis/amazon/shared.js +6 -6
- package/clis/antigravity/_actions.js +13 -13
- package/clis/antigravity/audit-extras.js +10 -10
- package/clis/antigravity/delete.js +1 -1
- package/clis/antigravity/model.js +6 -6
- package/clis/antigravity/new.js +2 -2
- package/clis/antigravity/read.js +2 -2
- package/clis/antigravity/rename.js +1 -1
- package/clis/antigravity/send.js +3 -3
- package/clis/antigravity/serve.js +17 -17
- package/clis/antigravity/storage.js +6 -6
- package/clis/antigravity/watch.js +2 -2
- package/clis/apple-podcasts/episodes.js +1 -1
- package/clis/apple-podcasts/top.js +1 -1
- package/clis/apple-podcasts/utils.js +1 -1
- package/clis/archive/item.js +1 -1
- package/clis/archive/search.js +1 -1
- package/clis/archive/snapshots.js +1 -1
- package/clis/archive/wayback.js +1 -1
- package/clis/arxiv/author.js +1 -1
- package/clis/arxiv/utils.js +1 -1
- package/clis/autohome/brand.js +1 -1
- package/clis/autohome/score.js +1 -1
- package/clis/autohome/utils.js +1 -1
- package/clis/baijiahao/article.js +1 -1
- package/clis/baijiahao/lists.js +1 -1
- package/clis/baijiahao/login.js +1 -1
- package/clis/baijiahao/publish.js +9 -9
- package/clis/baijiahao/stats.js +1 -1
- package/clis/baijiahao/whoami.js +1 -1
- package/clis/band/bands.js +2 -2
- package/clis/band/mentions.js +2 -2
- package/clis/band/post.js +4 -4
- package/clis/band/posts.js +3 -3
- package/clis/barchart/flow.js +3 -3
- package/clis/barchart/greeks.js +2 -2
- package/clis/barchart/quote.js +3 -3
- package/clis/bbc/news.js +1 -1
- package/clis/bbc/topic.js +1 -1
- package/clis/bbc/utils.js +1 -1
- package/clis/bilibili/article.js +1 -1
- package/clis/bilibili/categories.js +1 -1
- package/clis/bilibili/coin.js +1 -1
- package/clis/bilibili/comment-del.js +1 -1
- package/clis/bilibili/comment-like.js +1 -1
- package/clis/bilibili/comment.js +1 -1
- package/clis/bilibili/comments.js +1 -1
- package/clis/bilibili/dm-list.js +1 -1
- package/clis/bilibili/dm-read.js +1 -1
- package/clis/bilibili/dm-send.js +1 -1
- package/clis/bilibili/download.js +2 -2
- package/clis/bilibili/drafts.js +1 -1
- package/clis/bilibili/dynamic-post.js +3 -3
- package/clis/bilibili/favorite-add.js +1 -1
- package/clis/bilibili/favorite.js +1 -1
- package/clis/bilibili/feed.js +2 -2
- package/clis/bilibili/follow.js +1 -1
- package/clis/bilibili/following.js +1 -1
- package/clis/bilibili/like.js +1 -1
- package/clis/bilibili/partitions.js +1 -1
- package/clis/bilibili/stats.js +1 -1
- package/clis/bilibili/subtitle.js +3 -3
- package/clis/bilibili/summary.js +1 -1
- package/clis/bilibili/topics.js +1 -1
- package/clis/bilibili/unfollow.js +1 -1
- package/clis/bilibili/upload.js +1 -1
- package/clis/bilibili/utils.js +10 -10
- package/clis/bilibili/video-drafts.js +1 -1
- package/clis/bilibili/video.js +1 -1
- package/clis/bloomberg/businessweek.js +4 -4
- package/clis/bloomberg/news.js +2 -2
- package/clis/bloomberg/utils.js +13 -13
- package/clis/bluesky/post.js +1 -1
- package/clis/bluesky/shared.js +11 -11
- package/clis/bluesky/whoami.js +1 -1
- package/clis/booking/search.js +2 -2
- package/clis/boss/accept.js +1 -1
- package/clis/boss/applied.js +1 -1
- package/clis/boss/auth.js +1 -1
- package/clis/boss/batchgreet.js +1 -1
- package/clis/boss/bossinfo.js +1 -1
- package/clis/boss/chatlist.js +1 -1
- package/clis/boss/chatmsg.js +1 -1
- package/clis/boss/cities.js +1 -1
- package/clis/boss/detail.js +1 -1
- package/clis/boss/exchange.js +1 -1
- package/clis/boss/greet.js +1 -1
- package/clis/boss/interviews.js +1 -1
- package/clis/boss/invite.js +1 -1
- package/clis/boss/joblist.js +1 -1
- package/clis/boss/mark.js +1 -1
- package/clis/boss/me.js +2 -2
- package/clis/boss/recommend.js +1 -1
- package/clis/boss/resumedelete.js +1 -1
- package/clis/boss/resumelist.js +1 -1
- package/clis/boss/resumeupload.js +11 -11
- package/clis/boss/search.js +1 -1
- package/clis/boss/send.js +1 -1
- package/clis/boss/sendresume.js +1 -1
- package/clis/boss/stats.js +1 -1
- package/clis/boss/unread.js +1 -1
- package/clis/boss/utils.js +13 -13
- package/clis/chaoxing/assignments.js +1 -1
- package/clis/chaoxing/exams.js +1 -1
- package/clis/chaoxing/utils.js +9 -9
- package/clis/chatgpt/ask.js +1 -1
- package/clis/chatgpt/auth.js +2 -2
- package/clis/chatgpt/detail.js +1 -1
- package/clis/chatgpt/image.js +1 -1
- package/clis/chatgpt/read.js +1 -1
- package/clis/chatgpt/send.js +1 -1
- package/clis/chatgpt/utils.js +59 -59
- package/clis/chatgpt-app/ask.js +1 -1
- package/clis/chatgpt-app/send.js +1 -1
- package/clis/chatwise/model.js +6 -6
- package/clis/chess/analyze.js +1 -1
- package/clis/chess/game.js +1 -1
- package/clis/chess/games.js +1 -1
- package/clis/chess/stats.js +1 -1
- package/clis/chess/utils.js +1 -1
- package/clis/claude/ask.js +2 -2
- package/clis/claude/detail.js +1 -1
- package/clis/claude/new.js +1 -1
- package/clis/claude/read.js +1 -1
- package/clis/claude/send.js +1 -1
- package/clis/claude/utils.js +23 -23
- package/clis/cnblogs/article.js +1 -1
- package/clis/cnblogs/login.js +1 -1
- package/clis/cnblogs/stats.js +7 -7
- package/clis/cnblogs/whoami.js +1 -1
- package/clis/codex/_actions.js +3 -3
- package/clis/codex/archive.js +1 -1
- package/clis/codex/ask.js +6 -6
- package/clis/codex/model.js +8 -8
- package/clis/codex/pin.js +1 -1
- package/clis/codex/rename.js +4 -4
- package/clis/codex/send.js +3 -3
- package/clis/codex/sidebar.js +1 -1
- package/clis/coingecko/categories.js +1 -1
- package/clis/coingecko/coin.js +1 -1
- package/clis/coingecko/derivatives.js +1 -1
- package/clis/coingecko/exchanges.js +1 -1
- package/clis/coingecko/global.js +1 -1
- package/clis/coingecko/trending.js +1 -1
- package/clis/confluence/search.js +1 -1
- package/clis/coupang/product.js +3 -3
- package/clis/coupang/utils.js +1 -1
- package/clis/crates/crate.js +1 -1
- package/clis/crates/search.js +1 -1
- package/clis/crates/utils.js +1 -1
- package/clis/csdn/article.js +13 -13
- package/clis/csdn/columns.js +1 -1
- package/clis/csdn/login.js +1 -1
- package/clis/csdn/stats.js +4 -4
- package/clis/csdn/whoami.js +1 -1
- package/clis/cto51/article.js +1 -1
- package/clis/cto51/whoami.js +1 -1
- package/clis/ctrip/flight.js +2 -2
- package/clis/ctrip/hotel-search.js +3 -3
- package/clis/ctrip/hotel-suggest.js +1 -1
- package/clis/ctrip/search.js +1 -1
- package/clis/ctrip/utils.js +6 -6
- package/clis/cursor/ask.js +5 -5
- package/clis/cursor/composer.js +2 -2
- package/clis/cursor/model.js +4 -4
- package/clis/cursor/send.js +2 -2
- package/clis/dblp/author.js +1 -1
- package/clis/dblp/paper.js +1 -1
- package/clis/dblp/search.js +1 -1
- package/clis/dblp/utils.js +1 -1
- package/clis/dblp/venue.js +1 -1
- package/clis/deepseek/ask.js +1 -1
- package/clis/deepseek/auth.js +2 -2
- package/clis/deepseek/detail.js +1 -1
- package/clis/deepseek/new.js +1 -1
- package/clis/deepseek/read.js +1 -1
- package/clis/deepseek/send.js +7 -7
- package/clis/deepseek/utils.js +25 -25
- package/clis/defillama/protocol.js +1 -1
- package/clis/defillama/protocols.js +1 -1
- package/clis/defillama/utils.js +1 -1
- package/clis/devto/auth.js +2 -2
- package/clis/devto/latest.js +1 -1
- package/clis/devto/publish.js +5 -5
- package/clis/devto/read.js +2 -2
- package/clis/devto/stats.js +3 -3
- package/clis/dianping/auth.js +2 -2
- package/clis/dianping/cityResolver.js +2 -2
- package/clis/dianping/search.js +1 -1
- package/clis/dianping/shop.js +1 -1
- package/clis/dianping/utils.js +1 -1
- package/clis/discord-app/delete.js +3 -3
- package/clis/discord-app/read.js +1 -1
- package/clis/discord-app/thread-read.js +1 -1
- package/clis/discord-web/auth.js +2 -2
- package/clis/discord-web/send.js +5 -5
- package/clis/dockerhub/image.js +1 -1
- package/clis/dockerhub/search.js +1 -1
- package/clis/dockerhub/utils.js +1 -1
- package/clis/dongchedi/koubei.js +1 -1
- package/clis/dongchedi/models.js +1 -1
- package/clis/dongchedi/score.js +1 -1
- package/clis/dongchedi/search.js +1 -1
- package/clis/dongchedi/series.js +1 -1
- package/clis/dongchedi/specs.js +1 -1
- package/clis/dongchedi/utils.js +1 -1
- package/clis/douban/article.js +3 -3
- package/clis/douban/auth.js +2 -2
- package/clis/douban/download.js +1 -1
- package/clis/douban/utils.js +23 -23
- package/clis/doubao/auth.js +3 -3
- package/clis/doubao/utils.js +39 -39
- package/clis/doubao-app/ask.js +1 -1
- package/clis/doubao-app/utils.js +4 -4
- package/clis/douyin/_shared/browser-fetch.js +7 -7
- package/clis/douyin/_shared/draft-cache.js +1 -1
- package/clis/douyin/_shared/imagex-upload.js +1 -1
- package/clis/douyin/_shared/sts2.js +1 -1
- package/clis/douyin/_shared/text-extra.js +1 -1
- package/clis/douyin/_shared/tos-upload.js +4 -4
- package/clis/douyin/_shared/transcode.js +1 -1
- package/clis/douyin/_shared/vod-upload.js +4 -4
- package/clis/douyin/draft.js +18 -18
- package/clis/douyin/drafts.js +1 -1
- package/clis/douyin/publish-image.js +12 -12
- package/clis/douyin/publish.js +9 -9
- package/clis/douyin/search.js +3 -3
- package/clis/douyin/videos.js +1 -1
- package/clis/eastmoney/_secid.js +1 -1
- package/clis/eastmoney/announcement.js +1 -1
- package/clis/eastmoney/article.js +1 -1
- package/clis/eastmoney/convertible.js +1 -1
- package/clis/eastmoney/etf.js +1 -1
- package/clis/eastmoney/holders.js +1 -1
- package/clis/eastmoney/index-board.js +1 -1
- package/clis/eastmoney/kline.js +1 -1
- package/clis/eastmoney/kuaixun.js +1 -1
- package/clis/eastmoney/longhu.js +1 -1
- package/clis/eastmoney/money-flow.js +1 -1
- package/clis/eastmoney/northbound.js +1 -1
- package/clis/eastmoney/quote.js +1 -1
- package/clis/eastmoney/rank.js +1 -1
- package/clis/eastmoney/sectors.js +1 -1
- package/clis/endoflife/product.js +1 -1
- package/clis/endoflife/utils.js +1 -1
- package/clis/facebook/comment.js +8 -8
- package/clis/facebook/feed.js +4 -4
- package/clis/facebook/like.js +5 -5
- package/clis/facebook/notifications.js +3 -3
- package/clis/facebook/post.js +11 -11
- package/clis/facebook/search.js +3 -3
- package/clis/flathub/app.js +1 -1
- package/clis/flathub/search.js +1 -1
- package/clis/flathub/utils.js +1 -1
- package/clis/flomo/memos.js +1 -1
- package/clis/gemini/deep-research-result.js +4 -4
- package/clis/gemini/deep-research.js +1 -1
- package/clis/gemini/detail.js +1 -1
- package/clis/gemini/history.js +1 -1
- package/clis/gemini/image.js +2 -2
- package/clis/gemini/status.js +1 -1
- package/clis/gemini/utils.js +43 -43
- package/clis/geogebra/hexagon.js +1 -1
- package/clis/geogebra/info.js +3 -3
- package/clis/geogebra/triangle.js +1 -1
- package/clis/geogebra/utils.js +11 -11
- package/clis/ghost/login.js +1 -1
- package/clis/ghost/shared.js +2 -2
- package/clis/gitee/auth.js +2 -2
- package/clis/github-trending/repos.js +1 -1
- package/clis/google/news.js +1 -1
- package/clis/google/search.js +2 -2
- package/clis/google/suggest.js +1 -1
- package/clis/google/trends.js +1 -1
- package/clis/google/utils.js +1 -1
- package/clis/goproxy/module.js +1 -1
- package/clis/goproxy/utils.js +1 -1
- package/clis/goproxy/versions.js +1 -1
- package/clis/gov-policy/recent.js +2 -2
- package/clis/gov-policy/search.js +2 -2
- package/clis/grok/ask.js +1 -1
- package/clis/grok/detail.js +1 -1
- package/clis/grok/image.js +8 -8
- package/clis/grok/pin.js +1 -1
- package/clis/grok/send.js +1 -1
- package/clis/grok/status.js +1 -1
- package/clis/grok/utils.js +21 -21
- package/clis/guazi/browse.js +1 -1
- package/clis/guazi/car.js +1 -1
- package/clis/guazi/utils.js +1 -1
- package/clis/hackernews/auth.js +2 -2
- package/clis/hackernews/comment.js +8 -8
- package/clis/hackernews/read.js +7 -7
- package/clis/hackernews/submit.js +7 -7
- package/clis/hashnode/auth.js +3 -3
- package/clis/hashnode/publish.js +14 -14
- package/clis/hf/auth.js +2 -2
- package/clis/hf/models.js +1 -1
- package/clis/hf/paper.js +1 -1
- package/clis/hf/spaces.js +1 -1
- package/clis/hf/top.js +1 -1
- package/clis/homebrew/cask.js +1 -1
- package/clis/homebrew/formula.js +1 -1
- package/clis/homebrew/popular.js +1 -1
- package/clis/homebrew/utils.js +1 -1
- package/clis/huodongxing/events.js +1 -1
- package/clis/hupu/detail.js +4 -4
- package/clis/hupu/hot.js +3 -3
- package/clis/hupu/reply.js +1 -1
- package/clis/hupu/search.js +1 -1
- package/clis/hupu/unlike.js +1 -1
- package/clis/hupu/utils.js +10 -10
- package/clis/imdb/person.js +2 -2
- package/clis/imdb/reviews.js +3 -3
- package/clis/imdb/search.js +2 -2
- package/clis/imdb/title.js +1 -1
- package/clis/imdb/top.js +1 -1
- package/clis/imdb/trending.js +1 -1
- package/clis/imdb/utils.js +13 -13
- package/clis/imooc/article.js +6 -6
- package/clis/imooc/login.js +1 -1
- package/clis/imooc/whoami.js +1 -1
- package/clis/indeed/job.js +2 -2
- package/clis/indeed/search.js +2 -2
- package/clis/indeed/utils.js +1 -1
- package/clis/infoq/article.js +2 -2
- package/clis/infoq/login.js +1 -1
- package/clis/infoq/whoami.js +1 -1
- package/clis/instagram/_shared/private-publish.js +4 -4
- package/clis/instagram/_shared/protocol-capture.js +9 -9
- package/clis/instagram/detail.js +3 -3
- package/clis/instagram/post.js +25 -25
- package/clis/instagram/reel.js +18 -18
- package/clis/instagram/story.js +4 -4
- package/clis/instagram/user.js +2 -2
- package/clis/jd/item.js +65 -65
- package/clis/jianshu/article.js +1 -1
- package/clis/jianshu/login.js +1 -1
- package/clis/jianshu/notebooks.js +1 -1
- package/clis/jianshu/whoami.js +1 -1
- package/clis/jianyu/search.js +6 -6
- package/clis/jianyu/shared/procurement-contract.js +1 -1
- package/clis/jike/api.js +6 -6
- package/clis/jike/auth.js +3 -3
- package/clis/jike/comment.js +1 -1
- package/clis/jike/create.js +6 -6
- package/clis/jike/feed.js +3 -3
- package/clis/jike/like.js +1 -1
- package/clis/jike/notifications.js +3 -3
- package/clis/jike/repost.js +13 -13
- package/clis/jike/search.js +3 -3
- package/clis/jimeng/auth.js +2 -2
- package/clis/jimeng/generate.js +10 -10
- package/clis/jira/shared.js +1 -1
- package/clis/juejin/article.js +4 -4
- package/clis/juejin/categories.js +1 -1
- package/clis/juejin/hot.js +1 -1
- package/clis/juejin/login.js +1 -1
- package/clis/juejin/recommend.js +1 -1
- package/clis/juejin/stats.js +3 -3
- package/clis/juejin/tags.js +1 -1
- package/clis/juejin/utils.js +1 -1
- package/clis/juejin/whoami.js +1 -1
- package/clis/ke/utils.js +4 -4
- package/clis/kimi/_utils.js +7 -7
- package/clis/kimi/audit-extras.js +14 -14
- package/clis/kimi/auth.js +3 -3
- package/clis/kimi/chat.js +15 -15
- package/clis/kimi/storage.js +5 -5
- package/clis/kimi/ui.js +13 -13
- package/clis/kimi/usage.js +3 -3
- package/clis/kuaishou/auth.js +1 -1
- package/clis/kuaishou/publish.js +6 -6
- package/clis/lesswrong/_helpers.js +5 -5
- package/clis/lesswrong/comments.js +5 -5
- package/clis/lichess/top.js +1 -1
- package/clis/lichess/user.js +1 -1
- package/clis/lichess/utils.js +1 -1
- package/clis/linkedin/comment.js +1 -1
- package/clis/linkedin/connect.js +11 -11
- package/clis/linkedin/create.js +5 -5
- package/clis/linkedin/follow.js +1 -1
- package/clis/linkedin/inbox.js +1 -1
- package/clis/linkedin/job-detail.js +3 -3
- package/clis/linkedin/like.js +1 -1
- package/clis/linkedin/notifications.js +1 -1
- package/clis/linkedin/people-search.js +1 -1
- package/clis/linkedin/post-comments.js +1 -1
- package/clis/linkedin/post-detail.js +1 -1
- package/clis/linkedin/profile-analytics.js +1 -1
- package/clis/linkedin/profile-api.js +13 -13
- package/clis/linkedin/profile-experience.js +1 -1
- package/clis/linkedin/profile-projects.js +1 -1
- package/clis/linkedin/profile-read.js +3 -3
- package/clis/linkedin/reply.js +1 -1
- package/clis/linkedin/repost.js +1 -1
- package/clis/linkedin/safe-send.js +8 -8
- package/clis/linkedin/salesnav-inbox.js +5 -5
- package/clis/linkedin/salesnav-message.js +3 -3
- package/clis/linkedin/salesnav-search.js +4 -4
- package/clis/linkedin/salesnav-thread.js +1 -1
- package/clis/linkedin/search-api.js +3 -3
- package/clis/linkedin/search.js +8 -8
- package/clis/linkedin/social-api.js +31 -31
- package/clis/linkedin/timeline.js +3 -3
- package/clis/linkedin-learning/search.js +2 -2
- package/clis/linkedin-learning/trending.js +2 -2
- package/clis/linux-do/feed.js +4 -4
- package/clis/linux-do/topic-content.js +8 -8
- package/clis/lobsters/domain.js +1 -1
- package/clis/lobsters/read.js +7 -7
- package/clis/maimai/auth.js +2 -2
- package/clis/maimai/search-talents.js +4 -4
- package/clis/manus/_utils.js +1 -1
- package/clis/mastodon/login.js +1 -1
- package/clis/mastodon/post.js +1 -1
- package/clis/mastodon/shared.js +12 -12
- package/clis/mastodon/whoami.js +1 -1
- package/clis/maven/artifact.js +1 -1
- package/clis/maven/search.js +1 -1
- package/clis/maven/utils.js +1 -1
- package/clis/mdn/search.js +1 -1
- package/clis/medium/article.js +5 -5
- package/clis/medium/login.js +1 -1
- package/clis/medium/stats.js +3 -3
- package/clis/medium/tag.js +1 -1
- package/clis/medium/whoami.js +1 -1
- package/clis/mubu/notes.js +1 -1
- package/clis/mubu/utils.js +15 -15
- package/clis/note/auth.js +2 -2
- package/clis/note/note-utils.js +2 -2
- package/clis/note/publish.js +8 -8
- package/clis/notebooklm/add-source.js +8 -8
- package/clis/notebooklm/create.js +1 -1
- package/clis/notebooklm/generate-slides.js +1 -1
- package/clis/notebooklm/notes-get.js +1 -1
- package/clis/notebooklm/rpc.js +8 -8
- package/clis/notebooklm/source-fulltext.js +1 -1
- package/clis/notebooklm/utils.js +10 -10
- package/clis/nowcoder/auth.js +2 -2
- package/clis/nowcoder/comment.js +1 -1
- package/clis/nowcoder/comments.js +1 -1
- package/clis/nowcoder/dm-list.js +1 -1
- package/clis/nowcoder/dm-read.js +1 -1
- package/clis/nowcoder/dm-send.js +1 -1
- package/clis/nowcoder/drafts.js +1 -1
- package/clis/nowcoder/inbox.js +1 -1
- package/clis/nowcoder/like.js +1 -1
- package/clis/nowcoder/my.js +1 -1
- package/clis/nowcoder/post.js +1 -1
- package/clis/nowcoder/utils.js +13 -13
- package/clis/npm/downloads.js +1 -1
- package/clis/npm/package.js +1 -1
- package/clis/npm/search.js +1 -1
- package/clis/npm/utils.js +1 -1
- package/clis/nuget/package.js +1 -1
- package/clis/nuget/search.js +1 -1
- package/clis/nuget/utils.js +1 -1
- package/clis/nvd/cve.js +1 -1
- package/clis/oeis/search.js +1 -1
- package/clis/oeis/sequence.js +1 -1
- package/clis/oeis/utils.js +1 -1
- package/clis/ones/common.js +6 -6
- package/clis/ones/enrich-tasks.js +1 -1
- package/clis/ones/my-tasks.js +1 -1
- package/clis/ones/resolve-labels.js +1 -1
- package/clis/ones/task-helpers.js +1 -1
- package/clis/ones/task.js +1 -1
- package/clis/ones/worklog.js +7 -7
- package/clis/openalex/search.js +1 -1
- package/clis/openalex/utils.js +1 -1
- package/clis/openalex/work.js +1 -1
- package/clis/openfda/drug-label.js +1 -1
- package/clis/openfda/food-recall.js +1 -1
- package/clis/openfda/utils.js +1 -1
- package/clis/openreview/author.js +1 -1
- package/clis/openreview/paper.js +1 -1
- package/clis/openreview/reviews.js +3 -3
- package/clis/openreview/search.js +1 -1
- package/clis/openreview/utils.js +1 -1
- package/clis/openreview/venue.js +1 -1
- package/clis/oschina/article.js +1 -1
- package/clis/oschina/catalogs.js +1 -1
- package/clis/oschina/login.js +1 -1
- package/clis/oschina/stats.js +6 -6
- package/clis/oschina/whoami.js +1 -1
- package/clis/osv/query.js +1 -1
- package/clis/osv/utils.js +1 -1
- package/clis/osv/vulnerability.js +1 -1
- package/clis/packagist/package.js +1 -1
- package/clis/packagist/search.js +1 -1
- package/clis/packagist/utils.js +1 -1
- package/clis/pinterest/api.js +1 -1
- package/clis/pinterest/auth.js +1 -1
- package/clis/pinterest/boards.js +1 -1
- package/clis/pinterest/client.js +6 -6
- package/clis/pinterest/publish.js +5 -5
- package/clis/pixiv/auth.js +2 -2
- package/clis/pixiv/download.js +1 -1
- package/clis/pixiv/illusts.js +1 -1
- package/clis/pixiv/search.js +1 -1
- package/clis/pixiv/utils.js +3 -3
- package/clis/powerchina/auth.js +2 -2
- package/clis/powerchina/search.js +1 -1
- package/clis/producthunt/browse.js +2 -2
- package/clis/producthunt/hot.js +2 -2
- package/clis/producthunt/posts.js +1 -1
- package/clis/producthunt/today.js +1 -1
- package/clis/producthunt/utils.js +1 -1
- package/clis/pypi/downloads.js +1 -1
- package/clis/pypi/package.js +1 -1
- package/clis/pypi/utils.js +1 -1
- package/clis/qiita/auth.js +1 -1
- package/clis/qiita/gql.js +6 -6
- package/clis/qiita/publish.js +4 -4
- package/clis/qiita/stats.js +4 -4
- package/clis/qoder/_utils.js +16 -16
- package/clis/qoder/composer.js +1 -1
- package/clis/qoder/quest.js +1 -1
- package/clis/qoder/ui.js +14 -14
- package/clis/quark/auth.js +2 -2
- package/clis/quark/utils.js +2 -2
- package/clis/quora/answer-comments.js +3 -3
- package/clis/quora/create-answer.js +4 -4
- package/clis/quora/create-question.js +3 -3
- package/clis/quora/shared.js +17 -17
- package/clis/quora/whoami.js +1 -1
- package/clis/qwen/ask.js +1 -1
- package/clis/qwen/auth.js +3 -3
- package/clis/qwen/detail.js +1 -1
- package/clis/qwen/image.js +5 -5
- package/clis/qwen/status.js +1 -1
- package/clis/qwen/utils.js +16 -16
- package/clis/reddit/home.js +3 -3
- package/clis/reddit/read.js +10 -10
- package/clis/reddit/reply.js +4 -4
- package/clis/reddit/submit.js +11 -11
- package/clis/reddit/subreddit-info.js +3 -3
- package/clis/reddit/subscribed.js +4 -4
- package/clis/reddit/whoami.js +2 -2
- package/clis/rednote/comments.js +1 -1
- package/clis/rednote/download.js +1 -1
- package/clis/rednote/feed.js +1 -1
- package/clis/rednote/note.js +1 -1
- package/clis/rednote/notifications.js +2 -2
- package/clis/rednote/search.js +2 -2
- package/clis/rest-countries/country.js +1 -1
- package/clis/rest-countries/region.js +1 -1
- package/clis/rest-countries/utils.js +1 -1
- package/clis/reuters/article-detail.js +1 -1
- package/clis/reuters/auth.js +3 -3
- package/clis/reuters/search.js +1 -1
- package/clis/reuters/utils.js +4 -4
- package/clis/rfc/rfc.js +1 -1
- package/clis/rfc/utils.js +1 -1
- package/clis/rubygems/gem.js +1 -1
- package/clis/rubygems/search.js +1 -1
- package/clis/rubygems/utils.js +1 -1
- package/clis/segmentfault/article.js +3 -3
- package/clis/segmentfault/channels.js +1 -1
- package/clis/segmentfault/login.js +1 -1
- package/clis/segmentfault/stats.js +4 -4
- package/clis/segmentfault/tags.js +1 -1
- package/clis/segmentfault/whoami.js +1 -1
- package/clis/semanticscholar/citations.js +1 -1
- package/clis/semanticscholar/paper.js +1 -1
- package/clis/semanticscholar/recommendations.js +1 -1
- package/clis/semanticscholar/search.js +1 -1
- package/clis/semanticscholar/utils.js +1 -1
- package/clis/sinafinance/news.js +1 -1
- package/clis/sinafinance/stock-rank.js +1 -1
- package/clis/sinafinance/stock.js +1 -1
- package/clis/slock/attachment-download.js +1 -1
- package/clis/slock/attachment-upload.js +7 -7
- package/clis/slock/attachment-url.js +1 -1
- package/clis/slock/auth-verify.js +1 -1
- package/clis/slock/bookmark-add.js +1 -1
- package/clis/slock/bookmark-remove.js +1 -1
- package/clis/slock/channel-action.js +1 -1
- package/clis/slock/channel-create.js +1 -1
- package/clis/slock/channel-files.js +1 -1
- package/clis/slock/channel-list.js +1 -1
- package/clis/slock/channel-mark.js +1 -1
- package/clis/slock/channel-members.js +1 -1
- package/clis/slock/channel-unarchive.js +1 -1
- package/clis/slock/dm-list.js +1 -1
- package/clis/slock/errors.js +1 -1
- package/clis/slock/in-page.js +28 -28
- package/clis/slock/inbox-done.js +5 -5
- package/clis/slock/inbox.js +1 -1
- package/clis/slock/message-read.js +22 -22
- package/clis/slock/message-search.js +10 -10
- package/clis/slock/message-send.js +25 -25
- package/clis/slock/reaction-add.js +1 -1
- package/clis/slock/reaction-remove.js +1 -1
- package/clis/slock/resolve.js +1 -1
- package/clis/slock/server-list.js +2 -2
- package/clis/slock/task-claim.js +4 -4
- package/clis/slock/task-convert.js +13 -13
- package/clis/slock/task-create.js +1 -1
- package/clis/slock/task-delete.js +5 -5
- package/clis/slock/task-get.js +5 -5
- package/clis/slock/task-list-server.js +4 -4
- package/clis/slock/task-list.js +5 -5
- package/clis/slock/task-status.js +3 -3
- package/clis/slock/task-unclaim.js +3 -3
- package/clis/slock/thread-follow.js +1 -1
- package/clis/slock/thread-state.js +1 -1
- package/clis/slock/unread-summary.js +5 -5
- package/clis/slock/whoami.js +1 -1
- package/clis/smzdm/search.js +3 -3
- package/clis/sohu/article.js +1 -1
- package/clis/sohu/attributes.js +1 -1
- package/clis/sohu/categories.js +1 -1
- package/clis/sohu/channels.js +1 -1
- package/clis/sohu/columns.js +1 -1
- package/clis/sohu/login.js +1 -1
- package/clis/sohu/stats.js +3 -3
- package/clis/sohu/topics.js +1 -1
- package/clis/sohu/whoami.js +1 -1
- package/clis/spotify/spotify.js +1 -1
- package/clis/stackoverflow/read.js +6 -6
- package/clis/stackoverflow/related.js +1 -1
- package/clis/stackoverflow/tag.js +1 -1
- package/clis/stackoverflow/user.js +1 -1
- package/clis/stackoverflow/utils.js +1 -1
- package/clis/steam/app.js +1 -1
- package/clis/steam/search.js +1 -1
- package/clis/steam/utils.js +1 -1
- package/clis/substack/auth.js +2 -2
- package/clis/substack/post-utils.js +2 -2
- package/clis/substack/publish.js +5 -5
- package/clis/suno/auth.js +2 -2
- package/clis/suno/download.js +5 -5
- package/clis/suno/generate.js +3 -3
- package/clis/suno/list.js +1 -1
- package/clis/suno/status.js +1 -1
- package/clis/suno/utils.js +29 -29
- package/clis/telegram/send.js +7 -7
- package/clis/telegram/shared.js +2 -2
- package/clis/telegram/whoami.js +1 -1
- package/clis/test-utils.js +1 -1
- package/clis/threads/post.js +23 -23
- package/clis/threads/shared.js +3 -3
- package/clis/threads/whoami.js +1 -1
- package/clis/tieba/hot.js +3 -3
- package/clis/tieba/posts.js +1 -1
- package/clis/tieba/read.js +2 -2
- package/clis/tieba/search.js +3 -3
- package/clis/tieba/utils.js +1 -1
- package/clis/tiktok/comment.js +2 -2
- package/clis/tiktok/creator-videos.js +3 -3
- package/clis/tiktok/explore.js +3 -3
- package/clis/tiktok/follow.js +8 -8
- package/clis/tiktok/following.js +4 -4
- package/clis/tiktok/friends.js +7 -7
- package/clis/tiktok/live.js +3 -3
- package/clis/tiktok/notifications.js +6 -6
- package/clis/tiktok/publish.js +16 -16
- package/clis/tiktok/unfollow.js +4 -4
- package/clis/tiktok/user.js +2 -2
- package/clis/tiktok/utils.js +1 -1
- package/clis/toutiao/article.js +1 -1
- package/clis/toutiao/articles.js +2 -2
- package/clis/toutiao/auth.js +2 -2
- package/clis/toutiao/hot.js +1 -1
- package/clis/toutiao/recommend.js +1 -1
- package/clis/toutiao/utils.js +2 -2
- package/clis/trae-solo/_actions.js +4 -4
- package/clis/trae-solo/_fs.js +5 -5
- package/clis/trae-solo/_state.js +2 -2
- package/clis/trae-solo/automation.js +4 -4
- package/clis/trae-solo/mode.js +4 -4
- package/clis/trae-solo/model.js +4 -4
- package/clis/trae-solo/renderer-storage.js +4 -4
- package/clis/trae-solo/settings.js +1 -1
- package/clis/trae-solo/skill-fs.js +1 -1
- package/clis/trae-solo/skill.js +12 -12
- package/clis/trae-solo/state-fs.js +2 -2
- package/clis/trae-solo/task-fs.js +5 -5
- package/clis/trae-solo/workspaces-fs.js +1 -1
- package/clis/tumblr/auth.js +2 -2
- package/clis/tumblr/publish.js +3 -3
- package/clis/tvmaze/search.js +1 -1
- package/clis/tvmaze/show.js +1 -1
- package/clis/tvmaze/utils.js +1 -1
- package/clis/twitter/accept.js +7 -7
- package/clis/twitter/article.js +7 -7
- package/clis/twitter/bookmark-folder.js +3 -3
- package/clis/twitter/bookmark-folders.js +3 -3
- package/clis/twitter/bookmarks.js +4 -4
- package/clis/twitter/delete.js +5 -5
- package/clis/twitter/device-follow.js +3 -3
- package/clis/twitter/dm-list.js +1 -1
- package/clis/twitter/dm-read.js +1 -1
- package/clis/twitter/dm-send.js +5 -5
- package/clis/twitter/dm-shared.js +3 -3
- package/clis/twitter/download.js +6 -6
- package/clis/twitter/followers.js +5 -5
- package/clis/twitter/following.js +2 -2
- package/clis/twitter/like.js +3 -3
- package/clis/twitter/likes.js +8 -8
- package/clis/twitter/list-add-core.js +9 -9
- package/clis/twitter/list-create.js +5 -5
- package/clis/twitter/list-remove-core.js +9 -9
- package/clis/twitter/list-tweets.js +7 -7
- package/clis/twitter/lists.js +6 -6
- package/clis/twitter/notifications.js +2 -2
- package/clis/twitter/post.js +24 -24
- package/clis/twitter/profile.js +7 -7
- package/clis/twitter/quote.js +7 -7
- package/clis/twitter/reply-dm.js +7 -7
- package/clis/twitter/reply.js +12 -12
- package/clis/twitter/retweet.js +3 -3
- package/clis/twitter/scheduled-delete.js +3 -3
- package/clis/twitter/scheduled-list.js +2 -2
- package/clis/twitter/scheduled-utils.js +3 -3
- package/clis/twitter/search.js +5 -5
- package/clis/twitter/shared.js +6 -6
- package/clis/twitter/thread.js +4 -4
- package/clis/twitter/timeline.js +3 -3
- package/clis/twitter/trending.js +2 -2
- package/clis/twitter/tweets.js +11 -11
- package/clis/twitter/unlike.js +3 -3
- package/clis/twitter/unretweet.js +3 -3
- package/clis/twitter/utils.js +6 -6
- package/clis/upwork/detail.js +2 -2
- package/clis/upwork/feed.js +2 -2
- package/clis/upwork/search.js +2 -2
- package/clis/upwork/utils.js +1 -1
- package/clis/v2ex/auth.js +2 -2
- package/clis/v2ex/daily.js +3 -3
- package/clis/v2ex/me.js +2 -2
- package/clis/v2ex/notifications.js +2 -2
- package/clis/vk/post.js +1 -1
- package/clis/vk/shared.js +2 -2
- package/clis/vk/whoami.js +1 -1
- package/clis/web/read.js +8 -8
- package/clis/wechat-channels/auth.js +2 -2
- package/clis/wechat-channels/publish.js +30 -30
- package/clis/weibo/article.js +1 -1
- package/clis/weibo/auth.js +3 -3
- package/clis/weibo/comments.js +1 -1
- package/clis/weibo/delete.js +2 -2
- package/clis/weibo/feed.js +3 -3
- package/clis/weibo/hot.js +1 -1
- package/clis/weibo/publish.js +10 -10
- package/clis/weibo/search.js +2 -2
- package/clis/weibo/user-posts.js +3 -3
- package/clis/weibo/user.js +2 -2
- package/clis/weibo/utils.js +3 -3
- package/clis/weixin/article.js +1 -1
- package/clis/weixin/create-draft.js +26 -26
- package/clis/weixin/download.js +2 -2
- package/clis/weixin/login.js +1 -1
- package/clis/weixin/search.js +2 -2
- package/clis/weixin/stats.js +3 -3
- package/clis/weixin/whoami.js +1 -1
- package/clis/weread/ai-outline.js +2 -2
- package/clis/weread/book-search.js +2 -2
- package/clis/weread/book.js +2 -2
- package/clis/weread/notebooks.js +1 -1
- package/clis/weread/search.js +1 -1
- package/clis/weread/shelf.js +1 -1
- package/clis/weread/utils.js +6 -6
- package/clis/weread-official/book.js +1 -1
- package/clis/weread-official/discover.js +1 -1
- package/clis/weread-official/list-apis.js +1 -1
- package/clis/weread-official/notes.js +1 -1
- package/clis/weread-official/readdata.js +1 -1
- package/clis/weread-official/review.js +1 -1
- package/clis/weread-official/search.js +1 -1
- package/clis/weread-official/shelf.js +1 -1
- package/clis/weread-official/utils.js +1 -1
- package/clis/wikidata/entity.js +1 -1
- package/clis/wikidata/search.js +1 -1
- package/clis/wikidata/utils.js +1 -1
- package/clis/wikipedia/page.js +1 -1
- package/clis/wikipedia/trending.js +1 -1
- package/clis/wikipedia/utils.js +1 -1
- package/clis/wordpress/login.js +1 -1
- package/clis/wordpress/publish.js +1 -1
- package/clis/wordpress/shared.js +3 -3
- package/clis/wordpress/whoami.js +1 -1
- package/clis/woshipm/article.js +1 -1
- package/clis/woshipm/login.js +1 -1
- package/clis/woshipm/stats.js +4 -4
- package/clis/woshipm/whoami.js +1 -1
- package/clis/wttr/current.js +1 -1
- package/clis/wttr/forecast.js +1 -1
- package/clis/wttr/utils.js +1 -1
- package/clis/xianyu/collect.js +1 -1
- package/clis/xianyu/inbox.js +1 -1
- package/clis/xianyu/item-stats.js +2 -2
- package/clis/xianyu/location.js +1 -1
- package/clis/xianyu/manage.js +1 -1
- package/clis/xianyu/messages.js +1 -1
- package/clis/xianyu/mtop.js +5 -5
- package/clis/xianyu/order.js +1 -1
- package/clis/xianyu/promote-stats.js +2 -2
- package/clis/xianyu/publish.js +17 -17
- package/clis/xianyu/rate.js +1 -1
- package/clis/xianyu/reply.js +1 -1
- package/clis/xianyu/search.js +8 -8
- package/clis/xianyu/seller-data.js +1 -1
- package/clis/xianyu/seller-list.js +1 -1
- package/clis/xianyu/user.js +1 -1
- package/clis/xiaoe/catalog.js +2 -2
- package/clis/xiaoe/content.js +2 -2
- package/clis/xiaoe/courses.js +2 -2
- package/clis/xiaohongshu/ask.js +6 -6
- package/clis/xiaohongshu/comments.js +6 -6
- package/clis/xiaohongshu/creator-note-detail.js +7 -7
- package/clis/xiaohongshu/creator-notes-summary.js +1 -1
- package/clis/xiaohongshu/creator-notes.js +13 -13
- package/clis/xiaohongshu/creator-profile.js +2 -2
- package/clis/xiaohongshu/creator-stats.js +2 -2
- package/clis/xiaohongshu/delete-note.js +7 -7
- package/clis/xiaohongshu/download.js +4 -4
- package/clis/xiaohongshu/feed.js +2 -2
- package/clis/xiaohongshu/follow.js +3 -3
- package/clis/xiaohongshu/human.js +3 -3
- package/clis/xiaohongshu/note-helpers.js +1 -1
- package/clis/xiaohongshu/note.js +2 -2
- package/clis/xiaohongshu/notifications.js +1 -1
- package/clis/xiaohongshu/publish-video.js +8 -8
- package/clis/xiaohongshu/publish.js +59 -59
- package/clis/xiaohongshu/search.js +8 -8
- package/clis/xiaohongshu/unfollow.js +4 -4
- package/clis/xiaohongshu/user-helpers.js +1 -1
- package/clis/xiaohongshu/user.js +2 -2
- package/clis/xiaoyuzhou/auth.js +3 -3
- package/clis/xiaoyuzhou/download.js +1 -1
- package/clis/xiaoyuzhou/utils.js +1 -1
- package/clis/xueqiu/article.js +4 -4
- package/clis/xueqiu/comments.js +4 -4
- package/clis/xueqiu/danjuan-utils.js +4 -4
- package/clis/xueqiu/earnings-date.js +1 -1
- package/clis/xueqiu/events.js +3 -3
- package/clis/xueqiu/hashtags.js +3 -3
- package/clis/xueqiu/stocks.js +3 -3
- package/clis/xueqiu/users.js +3 -3
- package/clis/xueqiu/utils.js +3 -3
- package/clis/yahoo-finance/quote.js +1 -1
- package/clis/yollomi/background.js +1 -1
- package/clis/yollomi/edit.js +1 -1
- package/clis/yollomi/face-swap.js +1 -1
- package/clis/yollomi/generate.js +1 -1
- package/clis/yollomi/object-remover.js +1 -1
- package/clis/yollomi/remove-bg.js +1 -1
- package/clis/yollomi/restore.js +1 -1
- package/clis/yollomi/try-on.js +1 -1
- package/clis/yollomi/upload.js +4 -4
- package/clis/yollomi/upscale.js +1 -1
- package/clis/yollomi/utils.js +4 -4
- package/clis/yollomi/video.js +1 -1
- package/clis/youtube/channel.js +4 -4
- package/clis/youtube/feed.js +2 -2
- package/clis/youtube/like.js +5 -5
- package/clis/youtube/playlist.js +7 -7
- package/clis/youtube/publish.js +11 -11
- package/clis/youtube/search.js +3 -3
- package/clis/youtube/subscribe.js +7 -7
- package/clis/youtube/subscriptions.js +1 -1
- package/clis/youtube/transcript-group.js +2 -2
- package/clis/youtube/transcript.js +13 -13
- package/clis/youtube/unlike.js +5 -5
- package/clis/youtube/unsubscribe.js +7 -7
- package/clis/youtube/utils.js +3 -3
- package/clis/youtube/video.js +4 -4
- package/clis/youtube/watch-later.js +2 -2
- package/clis/yuanbao/ask.js +18 -18
- package/clis/yuanbao/detail.js +1 -1
- package/clis/yuanbao/read.js +1 -1
- package/clis/yuanbao/shared.js +9 -9
- package/clis/yuanbao/status.js +1 -1
- package/clis/yuque/article.js +1 -1
- package/clis/yuque/whoami.js +1 -1
- package/clis/zhihu/answer-comments.js +2 -2
- package/clis/zhihu/answer-detail.js +3 -3
- package/clis/zhihu/answer.js +1 -1
- package/clis/zhihu/article-transform.js +1 -1
- package/clis/zhihu/article.js +1 -1
- package/clis/zhihu/auth.js +2 -2
- package/clis/zhihu/collection.js +3 -3
- package/clis/zhihu/collections.js +3 -3
- package/clis/zhihu/download.js +2 -2
- package/clis/zhihu/image-profile.js +6 -6
- package/clis/zhihu/paginate.js +3 -3
- package/clis/zhihu/pin.js +4 -4
- package/clis/zhihu/question.js +3 -3
- package/clis/zhihu/recommend.js +3 -3
- package/clis/zhihu/search.js +3 -3
- package/clis/zhihu/stats.js +3 -3
- package/clis/zhihu/user-arg.js +1 -1
- package/clis/zhihu/write-shared.js +7 -7
- package/clis/zlibrary/utils.js +6 -6
- package/clis/zsxq/auth.js +3 -3
- package/clis/zsxq/search.js +1 -1
- package/clis/zsxq/topic.js +1 -1
- package/clis/zsxq/utils.js +5 -5
- package/dist/src/adapter-source.js +1 -1
- package/dist/src/browser/analyze.js +1 -1
- package/dist/src/browser/article-extract.js +2 -2
- package/dist/src/browser/ax-snapshot.js +2 -2
- package/dist/src/browser/base-page.js +25 -25
- package/dist/src/browser/bridge.js +1 -1
- package/dist/src/browser/cdp.js +1 -1
- package/dist/src/browser/daemon-client.js +1 -1
- package/dist/src/browser/daemon-lifecycle.js +7 -7
- package/dist/src/browser/dom-helpers.js +35 -35
- package/dist/src/browser/dom-snapshot.js +19 -19
- package/dist/src/browser/errors.js +3 -3
- package/dist/src/browser/extract.js +5 -5
- package/dist/src/browser/find.js +13 -13
- package/dist/src/browser/fingerprint.js +2 -2
- package/dist/src/browser/html-tree.js +6 -6
- package/dist/src/browser/managed-chrome.js +1 -1
- package/dist/src/browser/network-cache.js +1 -1
- package/dist/src/browser/network-key.js +1 -1
- package/dist/src/browser/page.js +7 -7
- package/dist/src/browser/profile.js +2 -2
- package/dist/src/browser/proxy-test.js +8 -8
- package/dist/src/browser/shape-filter.js +1 -1
- package/dist/src/browser/shape.js +1 -1
- package/dist/src/browser/stealth.js +3 -3
- package/dist/src/browser/tabs.js +2 -2
- package/dist/src/browser/target-errors.js +1 -1
- package/dist/src/browser/target-resolver.js +23 -23
- package/dist/src/browser/trace.js +2 -2
- package/dist/src/browser/utils.js +1 -1
- package/dist/src/browser/verify-fixture.js +2 -2
- package/dist/src/browser-session-lock.js +1 -1
- package/dist/src/build-manifest.js +11 -11
- package/dist/src/capabilityRouting.js +1 -1
- package/dist/src/cli-argv-preprocess.js +1 -1
- package/dist/src/cli.js +32 -32
- package/dist/src/commanderAdapter.js +3 -3
- package/dist/src/commands/auth.js +3 -3
- package/dist/src/commands/daemon.js +1 -1
- package/dist/src/completion-fast.js +1 -1
- package/dist/src/completion.js +1 -1
- package/dist/src/constants.js +1 -1
- package/dist/src/convention-audit.js +2 -2
- package/dist/src/daemon-utils.js +1 -1
- package/dist/src/daemon.js +1 -1
- package/dist/src/discovery.js +2 -2
- package/dist/src/doctor.js +9 -9
- package/dist/src/download/article-download.js +15 -15
- package/dist/src/download/index.js +4 -4
- package/dist/src/download/media-download.js +1 -1
- package/dist/src/download/progress.js +3 -3
- package/dist/src/electron-apps.js +1 -1
- package/dist/src/errors.js +2 -2
- package/dist/src/execution.js +2 -2
- package/dist/src/external.js +1 -1
- package/dist/src/help.js +8 -8
- package/dist/src/hooks.js +1 -1
- package/dist/src/interceptor.js +21 -21
- package/dist/src/launcher.js +7 -7
- package/dist/src/logger.js +8 -8
- package/dist/src/main.js +7 -7
- package/dist/src/observation/artifact.js +5 -5
- package/dist/src/observation/retention.js +1 -1
- package/dist/src/output.js +2 -2
- package/dist/src/package-paths.js +1 -1
- package/dist/src/pipeline/executor.js +1 -1
- package/dist/src/pipeline/registry.js +1 -1
- package/dist/src/pipeline/steps/browser.js +1 -1
- package/dist/src/pipeline/steps/download.js +1 -1
- package/dist/src/pipeline/steps/fetch.js +6 -6
- package/dist/src/pipeline/steps/intercept.js +1 -1
- package/dist/src/pipeline/steps/tap.js +17 -17
- package/dist/src/pipeline/steps/transform.js +1 -1
- package/dist/src/pipeline/template.js +1 -1
- package/dist/src/plugin-manifest.js +1 -1
- package/dist/src/plugin-scaffold.js +19 -19
- package/dist/src/plugin.js +12 -12
- package/dist/src/rate-limit.js +1 -1
- package/dist/src/registry.js +1 -1
- package/dist/src/runtime-detect.js +1 -1
- package/dist/src/runtime.js +1 -1
- package/dist/src/scripts/framework.js +1 -1
- package/dist/src/scripts/interact.js +1 -1
- package/dist/src/scripts/store.js +1 -1
- package/dist/src/serialization.js +2 -2
- package/dist/src/session-lease.js +1 -1
- package/dist/src/snapshotFormatter.js +2 -2
- package/dist/src/tui.js +12 -12
- package/dist/src/user-runtime.js +1 -1
- package/dist/src/utils.d.ts +12 -0
- package/dist/src/utils.js +4 -4
- package/dist/src/validate.js +2 -2
- package/dist/src/verify.js +2 -2
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
package/clis/toutiao/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
2
|
-
`).map((
|
|
1
|
+
import{ArgumentError as l,CommandExecutionError as a}from"@jackwener/opencli/errors";const m=1,g=4,_=1,p=50,w=1,h=50;export function parseArticlesPage(t,n=1){if(t===void 0||t===null||t==="")return n;const e=Number(t);if(!Number.isFinite(e)||!Number.isInteger(e))throw new l(`--page must be an integer between ${m} and ${g}, got ${JSON.stringify(t)}`);if(e<m||e>g)throw new l(`--page must be between ${m} and ${g}, got ${e}`);return e}export function parseRecommendLimit(t,n=20){if(t===void 0||t===null||t==="")return n;const e=Number(t);if(!Number.isFinite(e)||!Number.isInteger(e))throw new l(`--limit must be an integer between ${w} and ${h}, got ${JSON.stringify(t)}`);if(e<w||e>h)throw new l(`--limit must be between ${w} and ${h}, got ${e}`);return e}export function parseRecommendCategory(t,n="__all__"){if(t===void 0||t===null||t==="")return n;const e=String(t).trim();if(!RECOMMEND_CATEGORIES.includes(e))throw new l(`--category must be one of ${RECOMMEND_CATEGORIES.join(", ")}, got ${JSON.stringify(t)}`);return e}export function parseHotLimit(t,n=30){if(t===void 0||t===null||t==="")return n;const e=Number(t);if(!Number.isFinite(e)||!Number.isInteger(e))throw new l(`--limit must be an integer between ${_} and ${p}, got ${JSON.stringify(t)}`);if(e<_||e>p)throw new l(`--limit must be between ${_} and ${p}, got ${e}`);return e}const S=new Set(["展现","阅读","点赞","评论","查看数据","查看评论","修改","更多","首发","已发布","定时发布","定时发布中","由文章生成","审核中","已推送","全部","状态:","~","~"]),M=/^共\s*[\d,]+\s*条(内容|作品)?$/,y=/展现\s*([\d,]+)\s*阅读\s*([\d,]+)\s*点赞\s*([\d,]+)\s*评论\s*([\d,]*)/;export function parseToutiaoArticlesText(t){const n=String(t||"").split(`
|
|
2
|
+
`).map((r)=>r.trim()).filter(Boolean),e=[];for(let r=0;r<n.length;r++){const c=n[r];if(!/^\d{2}-\d{2}\s+\d{2}:\d{2}$/.test(c))continue;const u=c;let d=null,b=null,I=null;for(let s=1;s<=3;s++){const o=n[r-s]||"";if(!o||o.length>=100||/^\d+$/.test(o)||S.has(o)||M.test(o))continue;d=o;break}for(let s=1;s<8;s++){const o=n[r+s]||"";if(o==="已发布"||o==="定时发布中"||o==="审核中"||o==="由文章生成")b=o;if(o.includes("展现")&&o.includes("阅读")){const f=o.match(y);if(f)I={"展现":f[1],"阅读":f[2],"点赞":f[3],"评论":f[4]||"0"}}}if(!d)continue;if(I)e.push({title:d,date:u,status:b,...I});else e.push({title:d,date:u,status:b,"展现":null,"阅读":null,"点赞":null,"评论":null})}return e}function i(t){const n=String(t??"").trim();return n?n:null}function E(t){const n=t?.Image?.url;if(typeof n==="string"&&n)return n;return(Array.isArray(t?.Image?.url_list)?t.Image.url_list.map((r)=>typeof r==="string"?r:r?.url).find((r)=>typeof r==="string"&&r):null)||null}function N(t){const n=Number(t);return Number.isFinite(n)&&n>=0?n:null}export function mapHotRow(t,n){if(!t||typeof t!=="object")return null;const e=i(t.ClusterIdStr||(t.ClusterId!=null?String(t.ClusterId):null)),r=i(t.Title);if(!r)return null;return{rank:n+1,group_id:e,title:r,query:i(t.QueryWord)||r,hot_value:N(t.HotValue),label:i(t.Label),url:i(t.Url),image_url:E(t)}}export const HOT_BOARD_URL="https://www.toutiao.com/hot-event/hot-board/?origin=toutiao_pc",RECOMMEND_URL="https://www.toutiao.com/api/pc/feed/",RECOMMEND_CATEGORIES=["__all__","news_tech","news_finance","news_world","news_sports","news_entertainment","news_military"];function T(t){const n=i(t?.image_url)||i(t?.middle_image?.url);if(!n)return null;return n.startsWith("//")?`https:${n}`:n}function O(t){const n=i(t);if(!n)return null;try{const e=n.startsWith("/")?new URL(n,"https://www.toutiao.com"):new URL(n);if(!/^https?:$/i.test(e.protocol)||!/(^|\.)toutiao\.com$/i.test(e.hostname))throw new a(`Malformed toutiao recommend row: off-domain source_url ${JSON.stringify(n)}.`);return e}catch(e){if(e instanceof a)throw e;throw new a(`Malformed toutiao recommend row: invalid source_url ${JSON.stringify(n)}.`)}}function L(t){return String(t||"").match(/^\/(?:group|article)\/([A-Za-z0-9_-]+)\/?$/)?.[1]||""}function R(t,n){const e=O(t),r=e?L(e.pathname):"",c=i(n),u=c||i(r);if(!u)throw new a("Malformed toutiao recommend row: missing group_id and article source_url.");if(!/^[A-Za-z0-9_-]+$/.test(u))throw new a(`Malformed toutiao recommend row: invalid group_id ${JSON.stringify(n)}.`);if(r&&c&&c!==r)throw new a(`Malformed toutiao recommend row: group_id/source_url mismatch for ${JSON.stringify(n)}.`);return{groupId:u,url:`https://www.toutiao.com/group/${u}/`}}function A(t){const n=Number(t);if(!Number.isFinite(n)||n<=0)return null;return`${new Date(n*1000).toISOString().slice(0,19)}Z`}export function mapRecommendRow(t,n){if(!t||typeof t!=="object")return null;if(t.is_feed_ad)return null;const e=i(t.title);if(!e)return null;const r=R(t.source_url,t.group_id!=null?String(t.group_id):null);return{rank:n+1,group_id:r.groupId,title:e,abstract:i(t.abstract),source:i(t.source),tag:i(t.chinese_tag),comments:N(t.comments_count),published_at:A(t.behot_time),url:r.url,image_url:T(t)}}export function looksToutiaoAuthWallUrl(t){const n=String(t||"").trim();if(!n)return!1;return/mp\.toutiao\.com\/(auth\/page\/login|profile_v4\/login)/.test(n)}export const __test__={ARTICLES_MIN_PAGE:m,ARTICLES_MAX_PAGE:g,HOT_MIN_LIMIT:_,HOT_MAX_LIMIT:p,RECOMMEND_MIN_LIMIT:w,RECOMMEND_MAX_LIMIT:h};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{CommandExecutionError as
|
|
1
|
+
import{CommandExecutionError as r}from"@jackwener/opencli/errors";export async function switchToPanel(n,t){const i=JSON.stringify(t),e=await n.evaluate(`(async () => {
|
|
2
2
|
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
3
|
-
const target = ${
|
|
3
|
+
const target = ${i};
|
|
4
4
|
// Check if already active.
|
|
5
5
|
const active = Array.from(document.querySelectorAll('.task-list-new-task-item'))
|
|
6
6
|
.find((el) => el.offsetParent && /\\b(task-list-skills-item|task-list-new-task-item-in)\\b/.test(el.className) && el.className.includes('active') && el.textContent.trim() === target);
|
|
@@ -23,8 +23,8 @@ import{CommandExecutionError as y}from"@jackwener/opencli/errors";export async f
|
|
|
23
23
|
entry.dispatchEvent(new MouseEvent('click', init));
|
|
24
24
|
await wait(900);
|
|
25
25
|
return { ok: true };
|
|
26
|
-
})()`);if(!
|
|
27
|
-
const target = ${
|
|
26
|
+
})()`);if(!e?.ok)throw new r(e?.reason||`Could not switch to ${t} panel.`,e?.detail||"");return e}export async function pointerClickByEval(n,t){return await n.evaluate(`(async () => {
|
|
27
|
+
const target = ${t};
|
|
28
28
|
if (!target) return { ok: false, reason: 'target not found' };
|
|
29
29
|
const r = target.getBoundingClientRect();
|
|
30
30
|
const init = {
|
package/clis/trae-solo/_fs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import*as
|
|
2
|
-
`)){const
|
|
1
|
+
import*as s from"node:fs";import*as t from"node:path";import*as f from"node:os";import{CommandExecutionError as l}from"@jackwener/opencli/errors";export const TRAE_USER_DIR=t.join(f.homedir(),".trae"),TRAE_SKILLS_DIR=t.join(TRAE_USER_DIR,"skills"),TRAE_SKILL_CONFIG=t.join(TRAE_USER_DIR,"skill-config.json"),TRAE_USER_RULES=t.join(TRAE_USER_DIR,"user_rules.md"),TRAE_APP_SUPPORT=t.join(f.homedir(),"Library/Application Support/TRAE SOLO"),TRAE_AI_AGENT_DIR=t.join(TRAE_APP_SUPPORT,"ModularData/ai-agent"),TRAE_SNAPSHOT_DIR=t.join(TRAE_AI_AGENT_DIR,"snapshot"),TRAE_AGENTCONFIG_DIR=t.join(TRAE_AI_AGENT_DIR,"agentconfig"),TRAE_WORK_MODE_PROJECTS=t.join(TRAE_AI_AGENT_DIR,"work-mode-projects"),TRAE_DB_WAL=t.join(TRAE_AI_AGENT_DIR,"database.db-wal");export function assertReadable(o,n){if(!s.existsSync(o))throw new l(`${n} not found: ${o}`,"Is Trae SOLO installed and run at least once?")}export function parseSkillMd(o){const n=t.join(o,"SKILL.md");if(!s.existsSync(n))return{name:t.basename(o),description:"",tags:[]};const i=s.readFileSync(n,"utf-8"),e={};let p=i;if(i.startsWith(`---
|
|
2
|
+
`)){const r=i.indexOf(`
|
|
3
3
|
---
|
|
4
|
-
`,4);if(
|
|
5
|
-
`)){const
|
|
6
|
-
`)){const
|
|
4
|
+
`,4);if(r>0){const a=i.slice(4,r);for(const m of a.split(`
|
|
5
|
+
`)){const c=m.match(/^([\w_-]+):\s*(.*)$/);if(c)e[c[1]]=c[2].replace(/^["']|["']$/g,"").trim()}p=i.slice(r+5)}}if(!e.description)for(const r of p.split(`
|
|
6
|
+
`)){const a=r.trim();if(!a)continue;if(a.startsWith("#"))continue;e.description=a.slice(0,200);break}return{name:e.name||t.basename(o),description:e.description||"",tags:e.tags?e.tags.split(/\s+/):[],version:e.version||"",author:e.author||"",path:o}}export function readSkillConfig(){assertReadable(TRAE_SKILL_CONFIG,"skill-config.json");return JSON.parse(s.readFileSync(TRAE_SKILL_CONFIG,"utf-8"))}export function updateSkillConfig(o){const n=readSkillConfig();o(n);const i=TRAE_SKILL_CONFIG+".tmp-"+process.pid;s.writeFileSync(i,JSON.stringify(n,null,4));s.renameSync(i,TRAE_SKILL_CONFIG)}export function checkAgentDbQuiet(o=5){if(!s.existsSync(TRAE_DB_WAL))return;const n=Date.now()-s.statSync(TRAE_DB_WAL).mtimeMs;if(n<o*1000)throw new l(`Trae is actively writing (database.db-wal touched ${(n/1000).toFixed(1)}s ago).`,`Wait ${o}+ s for Trae to settle, or quit Trae SOLO before mutating state.`)}
|
package/clis/trae-solo/_state.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
2
|
-
`).map((
|
|
1
|
+
import*as o from"node:fs";import*as i from"node:path";import{execFileSync as c}from"node:child_process";import{CommandExecutionError as a}from"@jackwener/opencli/errors";import{TRAE_APP_SUPPORT as l}from"./_fs.js";export const TRAE_USER_DIR_APP=i.join(l,"User"),TRAE_GLOBAL_STATE_DB=i.join(TRAE_USER_DIR_APP,"globalStorage/state.vscdb"),TRAE_WORKSPACE_STORAGE=i.join(TRAE_USER_DIR_APP,"workspaceStorage"),TRAE_EXTENSIONS_JSON=i.join(process.env.HOME||"",".trae/extensions/extensions.json");export function sqliteQuery(e,r){if(!o.existsSync(e))throw new a(`state.vscdb not found: ${e}`,"Has Trae SOLO been run at least once?");try{return c("/usr/bin/sqlite3",[e,r],{encoding:"utf-8",maxBuffer:67108864})}catch(n){throw new a(`sqlite3 failed on ${i.basename(e)}: ${n.message}`,"The DB may be locked by a running Trae SOLO instance. Try closing it or wait a few seconds.")}}export function listKeys(e){return sqliteQuery(e,"SELECT key FROM ItemTable ORDER BY key;").split(`
|
|
2
|
+
`).map((n)=>n.trim()).filter(Boolean)}export function getValue(e,r){const n=r.replace(/'/g,"''"),t=sqliteQuery(e,`SELECT value FROM ItemTable WHERE key = '${n}';`).trim();if(!t)return null;try{return JSON.parse(t)}catch{return t}}export function resolveWorkspaceJson(e){if(!o.existsSync(e))return{kind:"missing",target:"(no workspace.json)"};let r;try{r=JSON.parse(o.readFileSync(e,"utf-8"))}catch{return{kind:"invalid",target:"(invalid JSON)"}}if(r.folder)return{kind:"folder",target:decodeURI(r.folder.replace(/^file:\/\//,""))};if(r.workspace){const n=r.workspace.replace(/^file:\/\//,""),t=decodeURI(n);if(!o.existsSync(t))return{kind:"workspace",target:"(missing) "+t};try{return{kind:"workspace",target:(JSON.parse(o.readFileSync(t,"utf-8")).folders||[]).map((s)=>s.path||s.uri||JSON.stringify(s)).join("; ")||"(empty workspace)"}}catch{return{kind:"workspace",target:"(invalid inner) "+t}}}return{kind:"unknown",target:JSON.stringify(r).slice(0,100)}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as c,Strategy as u}from"@jackwener/opencli/registry";import{ArgumentError as m,EmptyResultError as d}from"@jackwener/opencli/errors";import{switchToPanel as f}from"./_actions.js";async function b(t,e){const n=JSON.stringify(e);await t.evaluate(`(async () => {
|
|
2
2
|
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
3
|
-
const target = ${
|
|
3
|
+
const target = ${n};
|
|
4
4
|
const tab = Array.from(document.querySelectorAll('.tab-u_Qz20'))
|
|
5
5
|
.find((t) => t.offsetParent && (t.textContent || '').trim() === target);
|
|
6
6
|
if (!tab || tab.className.includes('tabActive')) return;
|
|
@@ -16,7 +16,7 @@ import{cli as F,Strategy as G}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
16
16
|
tab.dispatchEvent(new MouseEvent('mouseup', init));
|
|
17
17
|
tab.dispatchEvent(new MouseEvent('click', init));
|
|
18
18
|
await wait(700);
|
|
19
|
-
})()`);await
|
|
19
|
+
})()`);await t.wait(0.3)}c({site:"trae-solo",name:"automation-list",access:"read",description:'List Trae SOLO Automation tab content. Default tab is "Configured"; pass --tab to switch.',domain:"localhost",strategy:u.UI,browser:!0,args:[{name:"tab",required:!1,default:"configured",help:"Tab to view: configured / run-history / task-template"},{name:"limit",type:"int",required:!1,default:50}],columns:["Index","Title","Summary"],func:async(t,e)=>{await f(t,"Automation");const n=String(e.tab||"configured").trim().toLowerCase(),a={configured:"Configured","run-history":"Run History","task-template":"Task Template"}[n];if(!a)throw new m("tab must be configured / run-history / task-template");await b(t,a);const r=await t.evaluate(`(function() {
|
|
20
20
|
// Each tab renders its content in a different container; pull all
|
|
21
21
|
// direct text rows from the main panel area.
|
|
22
22
|
const main = document.querySelector('.task-list-base-content') || document.querySelector('main') || document.body;
|
|
@@ -40,4 +40,4 @@ import{cli as F,Strategy as G}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
40
40
|
if (fallback) out.push({ title: '(empty)', summary: fallback.slice(0, 300) });
|
|
41
41
|
}
|
|
42
42
|
return out;
|
|
43
|
-
})()`),
|
|
43
|
+
})()`),s=Number.isInteger(e.limit)&&e.limit>0?e.limit:50,i=(r||[]).slice(0,s);if(!i.length)throw new d("trae-solo automation-list",`No items in tab '${a}'.`);return i.map((o,l)=>({Index:l+1,Title:o.title,Summary:o.summary}))}});
|
package/clis/trae-solo/mode.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as n,Strategy as c}from"@jackwener/opencli/registry";import{ArgumentError as i,CommandExecutionError as s,selectorError as u}from"@jackwener/opencli/errors";n({site:"trae-solo",name:"mode",access:"write",description:"Read or switch TRAE SOLO between Code mode and Work mode.",domain:"localhost",strategy:c.UI,browser:!0,args:[{name:"target",positional:!0,required:!1,help:"Target mode: code or work. Omit to read current."}],columns:["Status","Mode"],func:async(e,a)=>{const t=String(a.target||"").trim().toLowerCase();if(t&&!["code","work"].includes(t))throw new i('target must be "code" or "work"');const o=await e.evaluate(`(function() {
|
|
2
2
|
const cap = document.querySelector('[class*="capsule"]');
|
|
3
3
|
if (!cap) return '';
|
|
4
4
|
const aria = cap.getAttribute('aria-label') || '';
|
|
@@ -6,7 +6,7 @@ import{cli as F,Strategy as G}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
6
6
|
const m = aria.match(/Switch to (Code|Work) mode/i);
|
|
7
7
|
if (m) return m[1].toLowerCase() === 'work' ? 'code' : 'work';
|
|
8
8
|
return '';
|
|
9
|
-
})()`);if(!
|
|
9
|
+
})()`);if(!o)throw u("TRAE SOLO mode capsule (.index-module__capsule__ ...).");if(!t)return[{Status:"Active",Mode:o}];if(o===t)return[{Status:"no-op (already in target mode)",Mode:o}];await e.evaluate(`(async () => {
|
|
10
10
|
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
11
11
|
const cap = document.querySelector('[class*="capsule"]');
|
|
12
12
|
if (!cap) return;
|
|
@@ -22,10 +22,10 @@ import{cli as F,Strategy as G}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
22
22
|
cap.dispatchEvent(new MouseEvent('mouseup', init));
|
|
23
23
|
cap.dispatchEvent(new MouseEvent('click', init));
|
|
24
24
|
await wait(500);
|
|
25
|
-
})()`);await
|
|
25
|
+
})()`);await e.wait(0.4);const r=await e.evaluate(`(function() {
|
|
26
26
|
const cap = document.querySelector('[class*="capsule"]');
|
|
27
27
|
if (!cap) return '';
|
|
28
28
|
const aria = cap.getAttribute('aria-label') || '';
|
|
29
29
|
const m = aria.match(/Switch to (Code|Work) mode/i);
|
|
30
30
|
return m ? (m[1].toLowerCase() === 'work' ? 'code' : 'work') : '';
|
|
31
|
-
})()`);if(
|
|
31
|
+
})()`);if(r!==t)throw new s(`Mode toggle did not reach requested state "${t}".`,r?`current=${r}`:"Mode capsule state could not be read after click.");return[{Status:"switched",Mode:r}]}});
|
package/clis/trae-solo/model.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as g,Strategy as h}from"@jackwener/opencli/registry";import{CommandExecutionError as l,selectorError as p}from"@jackwener/opencli/errors";async function m(e){const n=await e.evaluate(`(function() {
|
|
2
2
|
const trigger = document.querySelector('.core-model-select-trigger');
|
|
3
3
|
return trigger ? (trigger.textContent || '').trim() : '';
|
|
4
|
-
})()`);return typeof
|
|
4
|
+
})()`);return typeof n==="string"?n.trim():""}g({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:h.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(e,n)=>{const o=String(n.name||"").trim().toLowerCase(),c=n.list===!0||n.list==="true",s=await m(e);if(!s)throw p("TRAE SOLO model trigger (.core-model-select-trigger). Make sure a chat task is open (not the project-list view).");if(c||o){const w=JSON.stringify(o),t=await e.evaluate(`(async () => {
|
|
5
5
|
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
6
6
|
const trigger = document.querySelector('.core-model-select-trigger');
|
|
7
7
|
if (!trigger) return { ok: false, reason: 'model trigger gone' };
|
|
@@ -32,7 +32,7 @@ import{cli as R,Strategy as T}from"@jackwener/opencli/registry";import{CommandEx
|
|
|
32
32
|
return ((nameEl ? nameEl.textContent : o.textContent) || '').trim();
|
|
33
33
|
});
|
|
34
34
|
return { ok: true, labels };
|
|
35
|
-
})()`);if(!
|
|
35
|
+
})()`);if(!t.ok)throw new l(t.reason,t.detail||"");if(c){try{await e.evaluate("document.body.click()")}catch{}return t.labels.map((i)=>({Status:i===s?"Active":"Available",Model:i}))}const a=t.labels.findIndex((i)=>i.toLowerCase().includes(o));if(a<0){try{await e.evaluate("document.body.click()")}catch{}throw new l(`No model matched: '${o}'`,"available="+JSON.stringify(t.labels))}const u=t.labels[a],d=`.core-model-select-model-item[role="option"]:nth-of-type(${a+1})`;try{await e.click(d)}catch(i){if(!await e.evaluate(`(function(i) {
|
|
36
36
|
const opts = Array.from(document.querySelectorAll('.core-model-select-model-item[role="option"]'))
|
|
37
37
|
.filter((el) => el.offsetParent);
|
|
38
38
|
const target = opts[i];
|
|
@@ -47,4 +47,4 @@ import{cli as R,Strategy as T}from"@jackwener/opencli/registry";import{CommandEx
|
|
|
47
47
|
target.dispatchEvent(new MouseEvent('mouseup', init));
|
|
48
48
|
target.dispatchEvent(new MouseEvent('click', init));
|
|
49
49
|
return true;
|
|
50
|
-
})(${
|
|
50
|
+
})(${a})`))throw new l("Click on model option failed.",`model=${u}`)}await e.wait(0.6);const r=await m(e);if(!r||!r.toLowerCase().includes(o))throw new l(`Model click did not verify selected model "${u}".`,r?`current=${r}`:"model trigger was unreadable after click");return[{Status:"switched",Model:r}]}return[{Status:"Active",Model:s}]}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
const s = ${
|
|
1
|
+
import{cli as c,Strategy as u}from"@jackwener/opencli/registry";import{ArgumentError as y,CommandExecutionError as h,EmptyResultError as d}from"@jackwener/opencli/errors";function g(o){const e=String(o?.storage||"local").trim().toLowerCase();if(e!=="local"&&e!=="session")throw new y("storage",'must be "local" or "session"');return e==="session"?"sessionStorage":"localStorage"}c({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:u.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(o,e)=>{const a=g(e),t=await o.evaluate(`(() => {
|
|
2
|
+
const s = ${a};
|
|
3
3
|
const out = [];
|
|
4
4
|
for (let i = 0; i < s.length; i++) {
|
|
5
5
|
const k = s.key(i);
|
|
@@ -7,5 +7,5 @@ import{cli as I,Strategy as J}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
7
7
|
out.push({ k, bytes: v.length });
|
|
8
8
|
}
|
|
9
9
|
return out;
|
|
10
|
-
})()`),
|
|
11
|
-
...(truncated)`:
|
|
10
|
+
})()`),s=e?.filter?String(e.filter).toLowerCase():null,l=s?t.filter((r)=>r.k.toLowerCase().includes(s)):t;if(!l.length)throw new d("trae-solo storage-keys",s?`No keys match "${s}".`:`${a} is empty.`);l.sort((r,n)=>r.k.localeCompare(n.k));const i=Number.isInteger(e?.limit)&&e.limit>0?e.limit:100;return l.slice(0,i).map((r,n)=>({Index:n+1,Key:r.k,Bytes:r.bytes,Name:"",Preview:"",Database:"",Version:""}))}});c({site:"trae-solo",name:"storage-get",access:"read",description:"Read a single localStorage / sessionStorage value on the Trae SOLO renderer.",domain:"localhost",strategy:u.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(o,e)=>{const a=String(e?.key||"").trim();if(!a)throw new y("key","is required");const t=g(e),s=await o.evaluate(`${t}.getItem(${JSON.stringify(a)})`);if(s===null)throw new h(`Key not found in ${t}: ${a}`,"");const l=Number.isInteger(e["max-bytes"])&&e["max-bytes"]>0?e["max-bytes"]:4000;let i=s,r="string";try{i=JSON.parse(s);r=Array.isArray(i)?"array":typeof i}catch{}const n=r==="string"?i:JSON.stringify(i,null,2),m=n.length>l;return[{Field:"Key",Value:a},{Field:"Store",Value:t},{Field:"Type",Value:r},{Field:"Size",Value:`${n.length} chars${m?" (truncated)":""}`},{Field:"Value",Value:m?n.slice(0,l)+`
|
|
11
|
+
...(truncated)`:n}]}});c({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:u.UI,browser:!0,args:[],columns:["Index","Key","Bytes","Name","Preview","Database","Version"],func:async(o)=>{const e=await o.evaluate("document.cookie");if(!e)throw new d("trae-solo cookies","document.cookie is empty (Trae uses Electron session cookies, mostly httpOnly).");return e.split("; ").map((t)=>{const s=t.indexOf("=");if(s<0)return{name:t,value:""};return{name:t.slice(0,s),value:t.slice(s+1)}}).map((t,s)=>({Index:s+1,Key:"",Name:t.name,Bytes:t.value.length,Preview:t.value.slice(0,40)+(t.value.length>40?"…":""),Database:"",Version:""}))}});c({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:u.UI,browser:!0,args:[],columns:["Index","Key","Bytes","Name","Preview","Database","Version"],func:async(o)=>{const e=await o.evaluate("(async () => indexedDB.databases ? await indexedDB.databases() : [])()");if(!Array.isArray(e)||!e.length)throw new d("trae-solo idb-list","No IndexedDB databases.");return e.map((a,t)=>({Index:t+1,Key:"",Bytes:"",Name:"",Preview:"",Database:a.name||"(unnamed)",Version:String(a.version||"")}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as n from"node:fs";import*as c from"node:path";import{cli as l,Strategy as p}from"@jackwener/opencli/registry";import{CommandExecutionError as m,EmptyResultError as a}from"@jackwener/opencli/errors";import{TRAE_APP_SUPPORT as g}from"./_fs.js";const r=c.join(g,"User/settings.json");l({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:p.LOCAL,browser:!1,args:[],columns:["Field","Value"],func:async()=>{if(!n.existsSync(r))throw new a("trae-solo settings-read",`settings.json not found: ${r}`);const i=n.readFileSync(r,"utf-8").replace(/\/\*[\s\S]*?\*\//g,"").replace(/^\s*\/\/.*$/gm,"").replace(/([^:"])\/\/.*$/gm,"$1").replace(/,(\s*[}\]])/g,"$1");let o;try{o=JSON.parse(i)}catch(t){throw new m(`Failed to parse settings.json: ${t.message}`,"")}const s=[];for(const[t,e]of Object.entries(o))s.push({Field:t,Value:typeof e==="object"?JSON.stringify(e):String(e)});if(!s.length)throw new a("trae-solo settings-read","settings.json is empty (or contains only defaults).");return s}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as n from"node:fs";import*as a from"node:path";import{cli as c,Strategy as d}from"@jackwener/opencli/registry";import{ArgumentError as f,CommandExecutionError as p,EmptyResultError as m}from"@jackwener/opencli/errors";import{TRAE_SKILLS_DIR as o,assertReadable as S,parseSkillMd as u,readSkillConfig as k}from"./_fs.js";c({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:d.LOCAL,args:[{name:"limit",type:"int",required:!1,default:200,help:"Max rows"}],columns:["Index","Name","Description","Source"],func:async(t)=>{S(o,"~/.trae/skills");const e=n.readdirSync(o).filter((s)=>{const r=a.join(o,s);return n.statSync(r).isDirectory()&&!s.startsWith("_")}).map((s)=>u(a.join(o,s))),i=Number.isInteger(t.limit)&&t.limit>0?t.limit:200;if(!e.length)throw new m("trae-solo skill-fs-list","No skills found under ~/.trae/skills/.");return e.slice(0,i).map((s,r)=>({Index:r+1,Name:s.name,Description:(s.description||"").slice(0,120),Source:""}))}});c({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:d.LOCAL,args:[],columns:["Index","Name","Description","Source"],func:async()=>{const l=k().managedSkills||{},e=Object.entries(l);if(!e.length)throw new m("trae-solo skill-fs-installed","No installed skills.");return e.map(([i,s],r)=>({Index:r+1,Name:i,Description:"",Source:s}))}});c({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:d.LOCAL,args:[{name:"name",positional:!0,required:!0,help:"Skill name (folder under ~/.trae/skills/)"}],columns:["Field","Value"],func:async(t)=>{const l=String(t.name||"").trim();if(!l)throw new f("name required");const e=a.join(o,l);if(!n.existsSync(e))throw new p(`Skill "${l}" not found.`,`Tried: ${e}`);const i=u(e),s=a.join(e,"SKILL.md"),r=n.existsSync(s)?n.readFileSync(s,"utf-8"):"(no SKILL.md)";return[{Field:"Name",Value:i.name},{Field:"Path",Value:e},{Field:"Description",Value:(i.description||"").slice(0,200)},{Field:"Tags",Value:(i.tags||[]).join(", ")},{Field:"Author",Value:i.author},{Field:"Version",Value:i.version},{Field:"Files",Value:n.readdirSync(e).join(", ").slice(0,200)},{Field:"SKILL.md (head)",Value:r.slice(0,1200)}]}});
|
package/clis/trae-solo/skill.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as c,Strategy as m}from"@jackwener/opencli/registry";import{ArgumentError as p,CommandExecutionError as h,EmptyResultError as f}from"@jackwener/opencli/errors";import{switchToPanel as u}from"./_actions.js";const y="Make sure TRAE SOLO is running and the Skills panel is reachable.";async function d(t,e){const i=JSON.stringify(e);await t.evaluate(`(async () => {
|
|
2
2
|
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
3
|
-
const target = ${
|
|
3
|
+
const target = ${i};
|
|
4
4
|
const tab = Array.from(document.querySelectorAll('.marketplace-tab'))
|
|
5
5
|
.find((t) => (t.textContent || '').trim().startsWith(target));
|
|
6
6
|
if (!tab) return;
|
|
@@ -17,8 +17,8 @@ import{cli as L,Strategy as M}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
17
17
|
tab.dispatchEvent(new MouseEvent('mouseup', init));
|
|
18
18
|
tab.dispatchEvent(new MouseEvent('click', init));
|
|
19
19
|
await wait(700);
|
|
20
|
-
})()`);await
|
|
21
|
-
const sel = ${
|
|
20
|
+
})()`);await t.wait(0.3)}c({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(t,e)=>{await u(t,"Skills");const i=e.installed===!0||e.installed==="true"||e.installed==="1";await d(t,i?"Installed":"Skills Marketplace");const a=await t.evaluate(`(function() {
|
|
21
|
+
const sel = ${i?"'.installed-card'":"'.marketplace-card-v2'"};
|
|
22
22
|
const cards = Array.from(document.querySelectorAll(sel)).filter((c) => c.offsetParent);
|
|
23
23
|
return cards.map((c, i) => {
|
|
24
24
|
const logo = c.querySelector('.skill-logo-svg');
|
|
@@ -29,14 +29,14 @@ import{cli as L,Strategy as M}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
29
29
|
if (name && desc.startsWith(name)) desc = desc.slice(name.length).trim();
|
|
30
30
|
return { index: i + 1, name: name || full.split(' ')[0], description: desc.slice(0, 200) };
|
|
31
31
|
});
|
|
32
|
-
})()`),
|
|
32
|
+
})()`),l=Number.isInteger(e.limit)&&e.limit>0?e.limit:100,s=(a||[]).slice(0,l);if(!s.length)throw new f("trae-solo skill-list",i?"No installed skills visible.":"No marketplace skills visible.");return s.map((n)=>({Index:n.index,Name:n.name,Description:n.description}))}});c({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(t,e)=>{await u(t,"Skills");await d(t,"Skills Marketplace");const i=String(e.keyword||"").trim();if(!i)throw new p("keyword cannot be empty");const a=JSON.stringify(i);await t.evaluate(`(function() {
|
|
33
33
|
const inp = document.querySelector('input[placeholder="Search"]');
|
|
34
34
|
if (!inp) return;
|
|
35
35
|
inp.focus();
|
|
36
36
|
const setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set;
|
|
37
|
-
setter.call(inp, ${
|
|
37
|
+
setter.call(inp, ${a});
|
|
38
38
|
inp.dispatchEvent(new Event('input', { bubbles: true }));
|
|
39
|
-
})()`);await
|
|
39
|
+
})()`);await t.wait(0.7);const l=await t.evaluate(`(function() {
|
|
40
40
|
const cards = Array.from(document.querySelectorAll('.marketplace-card-v2')).filter((c) => c.offsetParent);
|
|
41
41
|
return cards.map((c, i) => {
|
|
42
42
|
const logo = c.querySelector('.skill-logo-svg');
|
|
@@ -46,14 +46,14 @@ import{cli as L,Strategy as M}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
46
46
|
if (name && desc.startsWith(name)) desc = desc.slice(name.length).trim();
|
|
47
47
|
return { index: i + 1, name: name || full.split(' ')[0], description: desc.slice(0, 200) };
|
|
48
48
|
});
|
|
49
|
-
})()`),
|
|
49
|
+
})()`),s=Number.isInteger(e.limit)&&e.limit>0?e.limit:50,n=(l||[]).slice(0,s);if(!n.length)throw new f("trae-solo skill-search",`No skills matched "${i}".`);return n.map((o)=>({Index:o.index,Name:o.name,Description:o.description}))}});c({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(t,e)=>{await u(t,"Skills");await d(t,"Skills Marketplace");const i=e.list===!0||e.list==="true",a=String(e.name||"").trim().toLowerCase(),l=await t.evaluate(`(function() {
|
|
50
50
|
return Array.from(document.querySelectorAll('.marketplace-tag'))
|
|
51
51
|
.filter((c) => c.offsetParent)
|
|
52
52
|
.map((c) => ({ text: (c.textContent || '').trim(), active: c.className.includes('active') }));
|
|
53
|
-
})()`);if(
|
|
53
|
+
})()`);if(i)return(l||[]).map((r)=>({Index:"-",Name:r.text+(r.active?" (active)":""),Description:""}));if(!a)throw new p("name required (or pass --list)");const s=JSON.stringify(a),n=await t.evaluate(`(async () => {
|
|
54
54
|
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
55
55
|
const tag = Array.from(document.querySelectorAll('.marketplace-tag'))
|
|
56
|
-
.find((t) => t.offsetParent && (t.textContent || '').trim().toLowerCase().includes(${
|
|
56
|
+
.find((t) => t.offsetParent && (t.textContent || '').trim().toLowerCase().includes(${s}));
|
|
57
57
|
if (!tag) return { ok: false, reason: 'Category not found.' };
|
|
58
58
|
const r = tag.getBoundingClientRect();
|
|
59
59
|
const init = {
|
|
@@ -68,7 +68,7 @@ import{cli as L,Strategy as M}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
68
68
|
tag.dispatchEvent(new MouseEvent('click', init));
|
|
69
69
|
await wait(700);
|
|
70
70
|
return { ok: true, chosen: (tag.textContent || '').trim() };
|
|
71
|
-
})()`);if(!
|
|
71
|
+
})()`);if(!n?.ok)throw new h(n?.reason||"Category click failed.",y);const o=await t.evaluate(`(function() {
|
|
72
72
|
const cards = Array.from(document.querySelectorAll('.marketplace-card-v2')).filter((c) => c.offsetParent);
|
|
73
73
|
return cards.map((c, i) => {
|
|
74
74
|
const logo = c.querySelector('.skill-logo-svg');
|
|
@@ -78,4 +78,4 @@ import{cli as L,Strategy as M}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
78
78
|
if (name && desc.startsWith(name)) desc = desc.slice(name.length).trim();
|
|
79
79
|
return { index: i + 1, name: name || full.split(' ')[0], description: desc.slice(0, 200) };
|
|
80
80
|
});
|
|
81
|
-
})()`),
|
|
81
|
+
})()`),w=Number.isInteger(e.limit)&&e.limit>0?e.limit:100;return(o||[]).slice(0,w).map((r)=>({Index:r.index,Name:r.name,Description:r.description}))}});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
2
|
-
...(truncated, use --max-bytes to read more)`:
|
|
1
|
+
import*as f from"node:fs";import*as w from"node:path";import{cli as c,Strategy as d}from"@jackwener/opencli/registry";import{ArgumentError as k,CommandExecutionError as p,EmptyResultError as y}from"@jackwener/opencli/errors";import{TRAE_GLOBAL_STATE_DB as l,TRAE_WORKSPACE_STORAGE as h,listKeys as S,getValue as u}from"./_state.js";function m(e){const r=e.workspace?String(e.workspace).trim():"";if(!r)return l;const i=w.join(h,r,"state.vscdb");if(!f.existsSync(i))throw new p(`Workspace state.vscdb not found: ${i}`,"List valid workspace ids with `ppcli trae-solo workspaces-list`.");return i}c({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:d.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(e)=>{const r=m(e),i=S(r),t=e.filter?String(e.filter).toLowerCase():null,s=t?i.filter((a)=>a.toLowerCase().includes(t)):i;if(!s.length)throw new y("trae-solo storage-keys",t?`No keys match "${t}".`:"No keys.");const o=Number.isInteger(e.limit)&&e.limit>0?e.limit:200;return s.slice(0,o).map((a,n)=>({Index:n+1,Key:a,Kind:"",Path:""}))}});c({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:d.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(e)=>{const r=String(e.key||"").trim();if(!r)throw new k("key required");const i=m(e),t=u(i,r);if(t===null)throw new p(`Key not found: ${r}`,"List available keys with `ppcli trae-solo state-keys`.");const s=Number.isInteger(e["max-bytes"])&&e["max-bytes"]>0?e["max-bytes"]:8000,o=typeof t==="string"?t:JSON.stringify(t,null,2),a=o.length>s;return[{Field:"Key",Value:r},{Field:"Type",Value:typeof t==="string"?"string":Array.isArray(t)?"array":typeof t},{Field:"Size",Value:`${o.length} chars${a?" (truncated)":""}`},{Field:"Value",Value:a?o.slice(0,s)+`
|
|
2
|
+
...(truncated, use --max-bytes to read more)`:o}]}});c({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:d.LOCAL,args:[{name:"limit",type:"int",required:!1,default:20}],columns:["Index","Key","Kind","Path"],func:async(e)=>{if(!f.existsSync(l))throw new p(`state.vscdb not found: ${l}`,"");const r=u(l,"history.recentlyOpenedPathsList");if(!r)throw new y("trae-solo recent-workspaces","No recent workspaces recorded.");const i=r.entries||[];if(!i.length)throw new y("trae-solo recent-workspaces","history.recentlyOpenedPathsList has no entries.");const t=Number.isInteger(e.limit)&&e.limit>0?e.limit:20;return i.slice(0,t).map((s,o)=>{let a="other",n=JSON.stringify(s).slice(0,200);if(s.folderUri){a="folder";n=decodeURI(String(s.folderUri).replace(/^file:\/\//,""))}else if(s.workspace&&s.workspace.configPath){a="workspace";n=decodeURI(String(s.workspace.configPath).replace(/^file:\/\//,""))}else if(s.fileUri){a="file";n=decodeURI(String(s.fileUri).replace(/^file:\/\//,""))}return{Index:o+1,Key:"",Kind:a,Path:n}})}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import*as
|
|
2
|
-
`).filter(Boolean).map((
|
|
3
|
-
`).filter((
|
|
4
|
-
`).find((
|
|
5
|
-
`).filter(Boolean).map((
|
|
1
|
+
import*as n from"node:fs";import*as l from"node:path";import{execFileSync as x}from"node:child_process";import{cli as g,Strategy as S}from"@jackwener/opencli/registry";import{ArgumentError as I,CommandExecutionError as p,EmptyResultError as y}from"@jackwener/opencli/errors";import{TRAE_SNAPSHOT_DIR as u,TRAE_AGENTCONFIG_DIR as k,assertReadable as b}from"./_fs.js";function T(s){return l.join(u,s,"v2")}function w(s,i){return x("git",i,{cwd:s,encoding:"utf-8"}).trim()}g({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:S.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(s)=>{b(u,"ai-agent/snapshot");const i=new Set(n.readdirSync(u).filter((t)=>n.statSync(l.join(u,t)).isDirectory())),r=n.existsSync(k)?new Set(n.readdirSync(k).filter((t)=>t.endsWith(".json")&&!t.endsWith("-hooks.json")&&!t.startsWith("boot")&&!t.startsWith("ide_")).map((t)=>t.replace(/\.json$/,""))):new Set,d=[...new Set([...i,...r])].map((t)=>{const e=l.join(u,t),a=l.join(k,t+".json"),f=n.existsSync(e),c=n.existsSync(a);let o=0;if(f)o=Math.max(o,n.statSync(e).mtimeMs);if(c)o=Math.max(o,n.statSync(a).mtimeMs);return{id:t,hasSnap:f,hasCfg:c,mtime:o}}).sort((t,e)=>e.mtime-t.mtime),h=Number.isInteger(s.limit)&&s.limit>0?s.limit:100;if(!d.length)throw new y("trae-solo task-fs-list","No tasks on disk.");return d.slice(0,h).map((t,e)=>({Index:e+1,"Task Id":t.id,"Has Snapshot":t.hasSnap?"yes":"no","Has Config":t.hasCfg?"yes":"no",Modified:new Date(t.mtime).toISOString().replace("T"," ").slice(0,19),Phase:"","Turn Id":"",Commit:""}))}});g({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:S.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(s)=>{const i=String(s["task-id"]||"").trim();if(!i)throw new I("task-id required");const r=T(i);if(!n.existsSync(l.join(r,".git")))throw new p(`No snapshot repo for task ${i}.`,`Tried: ${r}`);const d=w(r,["for-each-ref","--format=%(refname:short)|%(*objectname:short)|%(objectname:short)|%(committerdate:iso8601)","refs/tags"]).split(`
|
|
2
|
+
`).filter(Boolean).map((t)=>{const[e,a,f,c]=t.split("|"),o=e.match(/^(before|after)-chat-turn-([0-9a-f]+)(?:-(refresh))?$/),C=o?o[1]+(o[3]?"/refresh":""):"misc",j=o?o[2]:e;return{phase:C,turnId:j,oid:f,date:c}}).sort((t,e)=>t.date.localeCompare(e.date));if(!d.length)throw new y("trae-solo task-fs-turns",`No chat-turn refs in ${r}.`);const h=Number.isInteger(s.limit)&&s.limit>0?s.limit:50;return d.slice(0,h).map((t,e)=>({Index:e+1,"Task Id":"","Has Snapshot":"","Has Config":"",Modified:"",Phase:t.phase,"Turn Id":t.turnId,Commit:t.oid}))}});g({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:S.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(s)=>{const i=String(s["task-id"]||"").trim();if(!i)throw new I("task-id required");const r=T(i);if(!n.existsSync(l.join(r,".git")))throw new p(`No snapshot repo for task ${i}.`,`Tried: ${r}`);let m;if(s.turn){const e=String(s.turn).trim(),f=w(r,["for-each-ref","--format=%(refname:short)","refs/tags"]).split(`
|
|
3
|
+
`).filter((c)=>c.includes(e));m=f.find((c)=>c.startsWith("after-chat-turn-"))||f[0];if(!m)throw new p(`No tag matched turn "${e}".`,"")}else{m=w(r,["for-each-ref","--sort=-committerdate","--format=%(refname:short)","refs/tags"]).split(`
|
|
4
|
+
`).find((a)=>a.startsWith("after-chat-turn-"));if(!m)throw new p("No after-chat-turn tags found.","")}const h=w(r,["ls-tree","-r","-l",m]).split(`
|
|
5
|
+
`).filter(Boolean).map((e)=>{const a=e.split(/\s+/);return{mode:a[0],oid:a[2],size:a[3],pth:a.slice(4).join(" ")}}),t=Number.isInteger(s.limit)&&s.limit>0?s.limit:50;return h.slice(0,t).map((e)=>({Mode:e.mode,Path:e.pth,Size:e.size}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as o from"node:fs";import*as l from"node:path";import{cli as p,Strategy as S}from"@jackwener/opencli/registry";import{CommandExecutionError as d,EmptyResultError as f}from"@jackwener/opencli/errors";import{TRAE_WORKSPACE_STORAGE as i,TRAE_EXTENSIONS_JSON as c,resolveWorkspaceJson as g}from"./_state.js";p({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:S.LOCAL,args:[{name:"limit",type:"int",required:!1,default:100}],columns:["Index","Workspace Id","Kind","Target","Modified","Id","Version","Source","Installed"],func:async(t)=>{if(!o.existsSync(i))throw new d(`workspaceStorage not found: ${i}`,"");const s=o.readdirSync(i).filter((e)=>{const r=l.join(i,e);return o.statSync(r).isDirectory()});if(!s.length)throw new f("trae-solo workspaces-list","No workspace storage entries.");const a=s.map((e)=>{const r=l.join(i,e),w=l.join(r,"workspace.json"),m=g(w),u=o.statSync(r).mtimeMs;return{id:e,kind:m.kind,target:m.target,mtime:u}}).sort((e,r)=>r.mtime-e.mtime),n=Number.isInteger(t.limit)&&t.limit>0?t.limit:100;return a.slice(0,n).map((e,r)=>({Index:r+1,"Workspace Id":e.id,Kind:e.kind,Target:(e.target||"").slice(0,120),Modified:new Date(e.mtime).toISOString().replace("T"," ").slice(0,19),Id:"",Version:"",Source:"",Installed:""}))}});p({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:S.LOCAL,args:[],columns:["Index","Workspace Id","Kind","Target","Modified","Id","Version","Source","Installed"],func:async()=>{if(!o.existsSync(c))throw new d(`extensions.json not found: ${c}`,"Trae SOLO has not installed any VSCode extensions yet.");let t;try{t=JSON.parse(o.readFileSync(c,"utf-8"))}catch(s){throw new d(`Failed to parse extensions.json: ${s.message}`,"")}if(!Array.isArray(t)||!t.length)throw new f("trae-solo extensions-list","No extensions installed.");return t.map((s,a)=>{const n=s?.metadata?.installedTimestamp,e=n?new Date(n).toISOString().replace("T"," ").slice(0,19):"";return{Index:a+1,"Workspace Id":"",Kind:"",Target:"",Modified:"",Id:s?.identifier?.id||"?",Version:s?.version||"",Source:s?.metadata?.source||"",Installed:e}})}});
|
package/clis/tumblr/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as t}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as s}from"../_shared/site-auth.js";const u="https://www.tumblr.com",m="https://www.tumblr.com/dashboard";async function e(o){const n=(await o.getCookies({url:u})).find((i)=>i.name==="logged_in");return!!(n&&n.value&&n.value!=="0")}async function a(o){await o.goto(m);const r=await o.evaluate(`(async () => {
|
|
2
2
|
try {
|
|
3
3
|
if (!(window.tumblr && typeof window.tumblr.apiFetch === 'function')) {
|
|
4
4
|
return { ok: false, reason: 'apiFetch unavailable — not on a logged-in tumblr page?' };
|
|
@@ -21,4 +21,4 @@ import{AuthRequiredError as I}from"@jackwener/opencli/errors";import{registerSit
|
|
|
21
21
|
if (status === 401 || status === 403) return { ok: false, reason: 'HTTP ' + status };
|
|
22
22
|
return { ok: false, reason: String((e && e.message) || e) };
|
|
23
23
|
}
|
|
24
|
-
})()`);if(!
|
|
24
|
+
})()`);if(!r||!r.ok)throw new t("tumblr.com",`Not logged in (${r?r.reason:"no probe"})`);return{name:r.name,primary_blog:r.primary_blog,blogs:r.blogs}}s({site:"tumblr",domain:"tumblr.com",loginUrl:"https://www.tumblr.com/login",columns:["name","primary_blog","blogs"],loginDescription:"打开 Tumblr 登录页并等待浏览器完成登录(供桌面客户端引导登录)。",quickCheck:e,verify:a,poll:async(o)=>{if(!await e(o))throw new t("tumblr.com","Waiting for tumblr.com session cookie");return a(o)}});
|
package/clis/tumblr/publish.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as c from"node:fs";import{cli as g,Strategy as h}from"@jackwener/opencli/registry";import{ArgumentError as a,AuthRequiredError as f,CommandExecutionError as s}from"@jackwener/opencli/errors";import{assertLiteralContent as y}from"../_shared/content-guard.js";const x="https://www.tumblr.com",w="https://www.tumblr.com/dashboard",p=["published","draft","queue","private"];export function blogHost(t){const e=String(t||"").trim();if(!e)return"";return e.includes(".")?e:`${e}.tumblr.com`}export function resolveBody(t){if(t["body-file"]){const e=String(t["body-file"]);if(!c.statSync(e,{throwIfNoEntry:!1})?.isFile())throw new a(`--body-file not found: ${e}`);return c.readFileSync(e,"utf8")}if(t.body!==void 0&&t.body!==null){y(String(t.body),{fileFlag:"--body-file"});return String(t.body)}if(t.text!==void 0&&t.text!==null){y(String(t.text),{fileFlag:"--body-file"});return String(t.text)}return}export function buildContent(t,e){const i=[];if(t.title)i.push({type:"text",subtype:"heading1",text:String(t.title)});if(e!==void 0&&e!=="")for(const o of String(e).split(/\n{2,}/)){const r=o.replace(/\n+$/,"");if(r.trim()!=="")i.push({type:"text",text:r})}if(t["image-url"])i.push({type:"image",media:[{url:String(t["image-url"])}]});if(t.link)i.push({type:"link",url:String(t.link)});if(i.length===0)throw new a("Provide at least one of --title, --text/--body/--body-file, --image-url, or --link");return i}export function resolveTags(t){if(t===void 0||t===null||t==="")return"";return String(t).split(",").map((e)=>e.trim()).filter(Boolean).join(",")}async function m(t,e,i){return t.evaluate(`(async () => {
|
|
2
2
|
try {
|
|
3
3
|
if (!(window.tumblr && typeof window.tumblr.apiFetch === 'function')) {
|
|
4
4
|
return { kind: 'auth', detail: 'apiFetch unavailable — not on a logged-in tumblr page?' };
|
|
5
5
|
}
|
|
6
|
-
var r = await window.tumblr.apiFetch(${JSON.stringify(
|
|
6
|
+
var r = await window.tumblr.apiFetch(${JSON.stringify(e)}, ${JSON.stringify(i)});
|
|
7
7
|
return { kind: 'ok', response: (r && r.response) || null, meta: (r && r.meta) || null };
|
|
8
8
|
} catch (e) {
|
|
9
9
|
var status = (e && (e.status || (e.body && e.body.meta && e.body.meta.status))) || 0;
|
|
@@ -11,4 +11,4 @@ import*as M from"node:fs";import{cli as _,Strategy as L}from"@jackwener/opencli/
|
|
|
11
11
|
if (status === 401 || status === 403) return { kind: 'auth', detail: 'HTTP ' + status + ' ' + msg };
|
|
12
12
|
return { kind: 'http', status: status, detail: String(msg).slice(0, 300) };
|
|
13
13
|
}
|
|
14
|
-
})()`)}async function
|
|
14
|
+
})()`)}async function S(t,e){if(e.blog)return blogHost(e.blog);const i=await m(t,"/v2/user/info",{method:"GET"});if(i?.kind==="auth")throw new f("tumblr.com",`Not logged in (${i.detail}). Run \`ppcli tumblr login\`.`);if(i?.kind!=="ok"||!i.response||!i.response.user)throw new s(`Failed to resolve default blog: ${JSON.stringify(i)}`);const o=i.response.user.blogs||[],r=o.find((l)=>l.primary)||o[0];if(!r||!r.name)throw new s("No blog found on this account; pass --blog explicitly.");return blogHost(r.name)}g({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:h.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:p,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(t,e)=>{if(!t)throw new s("Browser session required for tumblr publish");const i=String(e.state??"draft");if(!p.includes(i))throw new a(`Invalid --state "${i}". One of: ${p.join(", ")}`);const o=resolveBody(e),r=buildContent(e,o),l=resolveTags(e.tags);await t.goto(w);const u=await S(t,e),b={content:r,state:i};if(l)b.tags=l;const n=await m(t,`/v2/blog/${u}/posts`,{method:"POST",body:b});if(n?.kind==="auth")throw new f("tumblr.com",`Not logged in (${n.detail}). Run \`ppcli tumblr login\`.`);if(n?.kind==="http")throw new s(`Tumblr publish failed: HTTP ${n.status} ${n.detail}`);if(n?.kind!=="ok"||!n.response)throw new s(`Unexpected Tumblr response: ${JSON.stringify(n)}`);const d=n.response.id_string??(n.response.id!=null?String(n.response.id):"");if(!d)throw new s("Tumblr post response missing id");return[{status:"success",id:d,blog:u,state:i,url:i==="published"?`${x}/${u}/${d}`:""}]}});g({site:"tumblr",name:"delete",access:"write",description:"Delete a Tumblr post by id (POST /v2/blog/{blog}/post/delete).",domain:"tumblr.com",strategy:h.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(t,e)=>{if(!t)throw new s("Browser session required for tumblr delete");const i=String(e.id??"").trim();if(!i)throw new a("--id is required");await t.goto(w);const o=await S(t,e),r=await m(t,`/v2/blog/${o}/post/delete`,{method:"POST",body:{id:i}});if(r?.kind==="auth")throw new f("tumblr.com",`Not logged in (${r.detail}). Run \`ppcli tumblr login\`.`);if(r?.kind==="http")throw new s(`Tumblr delete failed: HTTP ${r.status} ${r.detail}`);if(r?.kind!=="ok")throw new s(`Unexpected Tumblr delete response: ${JSON.stringify(r)}`);return[{status:"deleted",id:i,blog:o}]}});export const __test__={blogHost,resolveBody,buildContent,resolveTags};
|
package/clis/tvmaze/search.js
CHANGED
|
@@ -1 +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
|
|
1
|
+
import{cli as o,Strategy as u}from"@jackwener/opencli/registry";import{EmptyResultError as l}from"@jackwener/opencli/errors";import{TVMAZE_BASE as g,joinList as c,requireBoundedInt as d,requireString as p,stripHtml as h,tvmazeFetch as y}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=p(a.query,"query"),i=d(a.limit,20,50,"limit"),t=await y(`${g}/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,m)=>{const e=n?.show??{},s=e.network?.name??e.webChannel?.name??"";return{rank:m+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(s).trim(),rating:e.rating?.average==null?null:Number(e.rating.average),matchScore:typeof n?.score==="number"?n.score:null,summary:h(e.summary),url:String(e.url??"").trim()}})}});
|