@huyuan-ai/cli 1.0.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -7
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +4 -2
- package/dist/cli/program.js.map +1 -1
- package/dist/constants.d.ts +15 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +32 -10
- package/dist/constants.js.map +1 -1
- package/dist/core/gateway-token.d.ts +5 -0
- package/dist/core/gateway-token.d.ts.map +1 -0
- package/dist/core/gateway-token.js +53 -0
- package/dist/core/gateway-token.js.map +1 -0
- package/dist/core/huyuan-skill.d.ts +5 -0
- package/dist/core/huyuan-skill.d.ts.map +1 -0
- package/dist/core/huyuan-skill.js +80 -0
- package/dist/core/huyuan-skill.js.map +1 -0
- package/dist/core/install.d.ts.map +1 -1
- package/dist/core/install.js +4 -47
- package/dist/core/install.js.map +1 -1
- package/dist/core/skills-hub.d.ts +22 -0
- package/dist/core/skills-hub.d.ts.map +1 -0
- package/dist/core/skills-hub.js +131 -0
- package/dist/core/skills-hub.js.map +1 -0
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/opencli/bootstrap.js +2 -2
- package/dist/integrations/opencli/bootstrap.js.map +1 -1
- package/dist/integrations/opencli/commands/doubao-ask-with-citations.js +1 -1
- package/dist/integrations/opencli/commands/doubao-ask-with-citations.js.map +1 -1
- package/dist/integrations/opencli/execute-registry-command.js +3 -3
- package/dist/integrations/opencli/execute-registry-command.js.map +1 -1
- package/dist/sites/huyuan-skill/check.d.ts +2 -0
- package/dist/sites/huyuan-skill/check.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/check.js +103 -0
- package/dist/sites/huyuan-skill/check.js.map +1 -0
- package/dist/sites/huyuan-skill/install-from-hub.d.ts +3 -0
- package/dist/sites/huyuan-skill/install-from-hub.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/install-from-hub.js +60 -0
- package/dist/sites/huyuan-skill/install-from-hub.js.map +1 -0
- package/dist/sites/huyuan-skill/list.d.ts +2 -0
- package/dist/sites/huyuan-skill/list.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/list.js +44 -0
- package/dist/sites/huyuan-skill/list.js.map +1 -0
- package/dist/sites/huyuan-skill/register.d.ts +4 -0
- package/dist/sites/huyuan-skill/register.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/register.js +69 -0
- package/dist/sites/huyuan-skill/register.js.map +1 -0
- package/dist/sites/huyuan-skill/search.d.ts +2 -0
- package/dist/sites/huyuan-skill/search.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/search.js +45 -0
- package/dist/sites/huyuan-skill/search.js.map +1 -0
- package/dist/sites/huyuan-skill/skill-md-version.d.ts +11 -0
- package/dist/sites/huyuan-skill/skill-md-version.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/skill-md-version.js +74 -0
- package/dist/sites/huyuan-skill/skill-md-version.js.map +1 -0
- package/dist/sites/huyuan-skill/skills-hub.d.ts +24 -0
- package/dist/sites/huyuan-skill/skills-hub.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/skills-hub.js +131 -0
- package/dist/sites/huyuan-skill/skills-hub.js.map +1 -0
- package/dist/utils/install-root.d.ts +5 -0
- package/dist/utils/install-root.d.ts.map +1 -0
- package/dist/utils/install-root.js +13 -0
- package/dist/utils/install-root.js.map +1 -0
- package/dist/utils/update-notify.d.ts +6 -0
- package/dist/utils/update-notify.d.ts.map +1 -0
- package/dist/utils/update-notify.js +123 -0
- package/dist/utils/update-notify.js.map +1 -0
- package/package.json +1 -1
- package/vendor/opencli/dist/cli-manifest.json +546 -2
- package/vendor/opencli/dist/clis/1688/item.js +3 -3
- package/vendor/opencli/dist/clis/1688/search.js +2 -2
- package/vendor/opencli/dist/clis/1688/shared.d.ts +1 -1
- package/vendor/opencli/dist/clis/1688/shared.js +1 -1
- package/vendor/opencli/dist/clis/1688/store.js +2 -2
- package/vendor/opencli/dist/clis/36kr/article.js +2 -2
- package/vendor/opencli/dist/clis/36kr/hot.js +12 -6
- package/vendor/opencli/dist/clis/36kr/news.js +1 -1
- package/vendor/opencli/dist/clis/36kr/search.js +12 -6
- package/vendor/opencli/dist/clis/_shared/desktop-commands.d.ts +5 -5
- package/vendor/opencli/dist/clis/_shared/desktop-commands.js +1 -1
- package/vendor/opencli/dist/clis/amazon/bestsellers.js +1 -1
- package/vendor/opencli/dist/clis/amazon/discussion.js +2 -2
- package/vendor/opencli/dist/clis/amazon/movers-shakers.js +1 -1
- package/vendor/opencli/dist/clis/amazon/new-releases.js +1 -1
- package/vendor/opencli/dist/clis/amazon/offer.js +2 -2
- package/vendor/opencli/dist/clis/amazon/product.js +2 -2
- package/vendor/opencli/dist/clis/amazon/rankings.d.ts +1 -1
- package/vendor/opencli/dist/clis/amazon/rankings.js +2 -2
- package/vendor/opencli/dist/clis/amazon/search.js +2 -2
- package/vendor/opencli/dist/clis/amazon/shared.d.ts +1 -1
- package/vendor/opencli/dist/clis/amazon/shared.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/dump.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/dump.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/extract-code.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/extract-code.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/model.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/model.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/new.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/read.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/send.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/serve.js +3 -3
- package/vendor/opencli/dist/clis/antigravity/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/status.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/watch.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/watch.js +1 -1
- package/vendor/opencli/dist/clis/apple-podcasts/commands.test.js +1 -1
- package/vendor/opencli/dist/clis/apple-podcasts/episodes.js +2 -2
- package/vendor/opencli/dist/clis/apple-podcasts/search.js +2 -2
- package/vendor/opencli/dist/clis/apple-podcasts/top.js +2 -2
- package/vendor/opencli/dist/clis/apple-podcasts/utils.js +1 -1
- package/vendor/opencli/dist/clis/arxiv/paper.js +2 -2
- package/vendor/opencli/dist/clis/arxiv/search.js +2 -2
- package/vendor/opencli/dist/clis/arxiv/utils.js +1 -1
- package/vendor/opencli/dist/clis/band/bands.js +2 -2
- package/vendor/opencli/dist/clis/band/mentions.js +2 -2
- package/vendor/opencli/dist/clis/band/post.js +4 -4
- package/vendor/opencli/dist/clis/band/posts.js +2 -2
- package/vendor/opencli/dist/clis/barchart/flow.js +1 -1
- package/vendor/opencli/dist/clis/barchart/greeks.js +1 -1
- package/vendor/opencli/dist/clis/barchart/options.js +1 -1
- package/vendor/opencli/dist/clis/barchart/quote.js +1 -1
- package/vendor/opencli/dist/clis/bbc/news.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/comments.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/comments.test.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/download.js +3 -3
- package/vendor/opencli/dist/clis/bilibili/dynamic.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/dynamic.test.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/favorite.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/feed.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/following.js +2 -2
- package/vendor/opencli/dist/clis/bilibili/history.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/me.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/ranking.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/search.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/subtitle.js +2 -2
- package/vendor/opencli/dist/clis/bilibili/subtitle.test.js +2 -2
- package/vendor/opencli/dist/clis/bilibili/user-videos.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/bilibili/utils.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/businessweek.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/economics.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/feeds.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/industries.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/main.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/markets.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/news.js +2 -2
- package/vendor/opencli/dist/clis/bloomberg/opinions.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/politics.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/tech.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/utils.js +1 -1
- package/vendor/opencli/dist/clis/boss/batchgreet.js +1 -1
- package/vendor/opencli/dist/clis/boss/chatlist.js +1 -1
- package/vendor/opencli/dist/clis/boss/chatmsg.js +1 -1
- package/vendor/opencli/dist/clis/boss/detail.js +1 -1
- package/vendor/opencli/dist/clis/boss/exchange.js +1 -1
- package/vendor/opencli/dist/clis/boss/greet.js +1 -1
- package/vendor/opencli/dist/clis/boss/invite.js +1 -1
- package/vendor/opencli/dist/clis/boss/joblist.js +1 -1
- package/vendor/opencli/dist/clis/boss/mark.js +2 -2
- package/vendor/opencli/dist/clis/boss/recommend.js +1 -1
- package/vendor/opencli/dist/clis/boss/resume.js +1 -1
- package/vendor/opencli/dist/clis/boss/search.js +1 -1
- package/vendor/opencli/dist/clis/boss/send.js +2 -2
- package/vendor/opencli/dist/clis/boss/stats.js +1 -1
- package/vendor/opencli/dist/clis/boss/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/chaoxing/assignments.js +2 -2
- package/vendor/opencli/dist/clis/chaoxing/exams.js +1 -1
- package/vendor/opencli/dist/clis/chaoxing/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/ask.js +2 -2
- package/vendor/opencli/dist/clis/chatgpt/model.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/model.js +2 -2
- package/vendor/opencli/dist/clis/chatgpt/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/new.js +2 -2
- package/vendor/opencli/dist/clis/chatgpt/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/read.js +2 -2
- package/vendor/opencli/dist/clis/chatgpt/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/send.js +2 -2
- package/vendor/opencli/dist/clis/chatgpt/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/status.js +2 -2
- package/vendor/opencli/dist/clis/chatwise/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/ask.js +2 -2
- package/vendor/opencli/dist/clis/chatwise/export.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/export.js +1 -1
- package/vendor/opencli/dist/clis/chatwise/history.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/history.js +1 -1
- package/vendor/opencli/dist/clis/chatwise/model.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/model.js +2 -2
- package/vendor/opencli/dist/clis/chatwise/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/read.js +1 -1
- package/vendor/opencli/dist/clis/chatwise/screenshot.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/send.js +2 -2
- package/vendor/opencli/dist/clis/chatwise/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/ask.js +2 -2
- package/vendor/opencli/dist/clis/codex/dump.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/export.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/export.js +1 -1
- package/vendor/opencli/dist/clis/codex/extract-diff.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/extract-diff.js +1 -1
- package/vendor/opencli/dist/clis/codex/history.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/history.js +1 -1
- package/vendor/opencli/dist/clis/codex/model.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/model.js +1 -1
- package/vendor/opencli/dist/clis/codex/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/read.js +1 -1
- package/vendor/opencli/dist/clis/codex/screenshot.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/send.js +2 -2
- package/vendor/opencli/dist/clis/codex/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/coupang/add-to-cart.js +1 -1
- package/vendor/opencli/dist/clis/coupang/search.js +1 -1
- package/vendor/opencli/dist/clis/ctrip/search.js +2 -2
- package/vendor/opencli/dist/clis/ctrip/search.test.js +1 -1
- package/vendor/opencli/dist/clis/cursor/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/ask.js +2 -2
- package/vendor/opencli/dist/clis/cursor/composer.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/composer.js +2 -2
- package/vendor/opencli/dist/clis/cursor/dump.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/export.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/export.js +1 -1
- package/vendor/opencli/dist/clis/cursor/extract-code.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/extract-code.js +1 -1
- package/vendor/opencli/dist/clis/cursor/history.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/history.js +1 -1
- package/vendor/opencli/dist/clis/cursor/model.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/model.js +1 -1
- package/vendor/opencli/dist/clis/cursor/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/read.js +2 -2
- package/vendor/opencli/dist/clis/cursor/screenshot.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/send.js +2 -2
- package/vendor/opencli/dist/clis/cursor/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/channels.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/channels.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/members.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/members.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/read.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/search.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/search.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/send.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/servers.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/servers.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/status.js +1 -1
- package/vendor/opencli/dist/clis/douban/book-hot.js +1 -1
- package/vendor/opencli/dist/clis/douban/download.js +4 -4
- package/vendor/opencli/dist/clis/douban/download.test.js +3 -3
- package/vendor/opencli/dist/clis/douban/marks.js +1 -1
- package/vendor/opencli/dist/clis/douban/movie-hot.js +1 -1
- package/vendor/opencli/dist/clis/douban/photos.js +1 -1
- package/vendor/opencli/dist/clis/douban/reviews.js +1 -1
- package/vendor/opencli/dist/clis/douban/search.js +1 -1
- package/vendor/opencli/dist/clis/douban/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/douban/utils.js +1 -1
- package/vendor/opencli/dist/clis/doubao/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/ask.js +1 -1
- package/vendor/opencli/dist/clis/doubao/detail.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/detail.js +1 -1
- package/vendor/opencli/dist/clis/doubao/detail.test.js +1 -1
- package/vendor/opencli/dist/clis/doubao/history.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/history.js +1 -1
- package/vendor/opencli/dist/clis/doubao/history.test.js +1 -1
- package/vendor/opencli/dist/clis/doubao/meeting-summary.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/meeting-summary.js +1 -1
- package/vendor/opencli/dist/clis/doubao/meeting-transcript.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/meeting-transcript.js +1 -1
- package/vendor/opencli/dist/clis/doubao/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/new.js +1 -1
- package/vendor/opencli/dist/clis/doubao/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/read.js +1 -1
- package/vendor/opencli/dist/clis/doubao/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/send.js +1 -1
- package/vendor/opencli/dist/clis/doubao/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/status.js +1 -1
- package/vendor/opencli/dist/clis/doubao/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/ask.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/dump.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/dump.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/new.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/read.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/screenshot.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/screenshot.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/send.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/status.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/browser-fetch.d.ts +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/browser-fetch.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/imagex-upload.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/imagex-upload.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/public-api.d.ts +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/sts2.d.ts +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/sts2.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/sts2.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/tos-upload-short-read.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/tos-upload.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/transcode.d.ts +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/transcode.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/transcode.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/activities.js +1 -1
- package/vendor/opencli/dist/clis/douyin/activities.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/collections.js +1 -1
- package/vendor/opencli/dist/clis/douyin/collections.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/delete.js +1 -1
- package/vendor/opencli/dist/clis/douyin/delete.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/draft.js +2 -2
- package/vendor/opencli/dist/clis/douyin/draft.test.js +2 -2
- package/vendor/opencli/dist/clis/douyin/drafts.js +1 -1
- package/vendor/opencli/dist/clis/douyin/drafts.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/hashtag.js +2 -2
- package/vendor/opencli/dist/clis/douyin/hashtag.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/location.js +1 -1
- package/vendor/opencli/dist/clis/douyin/location.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/profile.js +2 -2
- package/vendor/opencli/dist/clis/douyin/profile.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/publish.js +2 -2
- package/vendor/opencli/dist/clis/douyin/publish.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/stats.js +1 -1
- package/vendor/opencli/dist/clis/douyin/stats.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/update.js +2 -2
- package/vendor/opencli/dist/clis/douyin/update.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/user-videos.js +1 -1
- package/vendor/opencli/dist/clis/douyin/user-videos.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/videos.js +1 -1
- package/vendor/opencli/dist/clis/douyin/videos.test.js +1 -1
- package/vendor/opencli/dist/clis/facebook/search.test.js +1 -1
- package/vendor/opencli/dist/clis/gemini/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/gemini/ask.js +1 -1
- package/vendor/opencli/dist/clis/gemini/deep-research-result.d.ts +1 -0
- package/vendor/opencli/dist/clis/gemini/deep-research-result.js +91 -0
- package/vendor/opencli/dist/clis/gemini/deep-research-result.test.js +154 -0
- package/vendor/opencli/dist/clis/gemini/deep-research.d.ts +1 -0
- package/vendor/opencli/dist/clis/gemini/deep-research.js +98 -0
- package/vendor/opencli/dist/clis/gemini/deep-research.test.js +184 -0
- package/vendor/opencli/dist/clis/gemini/image.d.ts +1 -1
- package/vendor/opencli/dist/clis/gemini/image.js +2 -2
- package/vendor/opencli/dist/clis/gemini/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/gemini/new.js +1 -1
- package/vendor/opencli/dist/clis/gemini/reply-state.test.js +30 -0
- package/vendor/opencli/dist/clis/gemini/utils.d.ts +30 -1
- package/vendor/opencli/dist/clis/gemini/utils.js +1014 -2
- package/vendor/opencli/dist/clis/gemini/utils.test.js +21 -1
- package/vendor/opencli/dist/clis/google/news.js +2 -2
- package/vendor/opencli/dist/clis/google/search.js +2 -2
- package/vendor/opencli/dist/clis/google/suggest.js +2 -2
- package/vendor/opencli/dist/clis/google/trends.js +2 -2
- package/vendor/opencli/dist/clis/grok/ask.d.ts +2 -2
- package/vendor/opencli/dist/clis/grok/ask.js +1 -1
- package/vendor/opencli/dist/clis/hf/top.js +2 -2
- package/vendor/opencli/dist/clis/hupu/detail.js +1 -1
- package/vendor/opencli/dist/clis/hupu/like.js +2 -2
- package/vendor/opencli/dist/clis/hupu/mentions.js +159 -0
- package/vendor/opencli/dist/clis/hupu/reply.js +2 -2
- package/vendor/opencli/dist/clis/hupu/search.js +1 -1
- package/vendor/opencli/dist/clis/hupu/unlike.js +2 -2
- package/vendor/opencli/dist/clis/hupu/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/hupu/utils.js +1 -1
- package/vendor/opencli/dist/clis/imdb/person.js +2 -2
- package/vendor/opencli/dist/clis/imdb/reviews.js +2 -2
- package/vendor/opencli/dist/clis/imdb/search.js +2 -2
- package/vendor/opencli/dist/clis/imdb/title.js +2 -2
- package/vendor/opencli/dist/clis/imdb/top.js +2 -2
- package/vendor/opencli/dist/clis/imdb/trending.js +2 -2
- package/vendor/opencli/dist/clis/imdb/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/imdb/utils.js +1 -1
- package/vendor/opencli/dist/clis/instagram/_shared/private-publish.d.ts +1 -1
- package/vendor/opencli/dist/clis/instagram/_shared/private-publish.js +1 -1
- package/vendor/opencli/dist/clis/instagram/_shared/protocol-capture.d.ts +1 -1
- package/vendor/opencli/dist/clis/instagram/_shared/runtime-info.d.ts +1 -1
- package/vendor/opencli/dist/clis/instagram/download.js +3 -3
- package/vendor/opencli/dist/clis/instagram/download.test.js +4 -4
- package/vendor/opencli/dist/clis/instagram/note.js +2 -2
- package/vendor/opencli/dist/clis/instagram/note.test.js +2 -2
- package/vendor/opencli/dist/clis/instagram/post.js +2 -2
- package/vendor/opencli/dist/clis/instagram/post.test.js +2 -2
- package/vendor/opencli/dist/clis/instagram/reel.js +3 -3
- package/vendor/opencli/dist/clis/instagram/reel.test.js +2 -2
- package/vendor/opencli/dist/clis/instagram/story.js +2 -2
- package/vendor/opencli/dist/clis/instagram/story.test.js +2 -2
- package/vendor/opencli/dist/clis/jd/item.js +1 -1
- package/vendor/opencli/dist/clis/jd/item.test.js +1 -1
- package/vendor/opencli/dist/clis/jike/comment.js +1 -1
- package/vendor/opencli/dist/clis/jike/create.js +1 -1
- package/vendor/opencli/dist/clis/jike/feed.js +1 -1
- package/vendor/opencli/dist/clis/jike/like.js +1 -1
- package/vendor/opencli/dist/clis/jike/notifications.js +1 -1
- package/vendor/opencli/dist/clis/jike/repost.js +1 -1
- package/vendor/opencli/dist/clis/jike/search.js +1 -1
- package/vendor/opencli/dist/clis/lesswrong/_helpers.d.ts +15 -0
- package/vendor/opencli/dist/clis/lesswrong/_helpers.js +75 -0
- package/vendor/opencli/dist/clis/lesswrong/comments.js +64 -0
- package/vendor/opencli/dist/clis/lesswrong/curated.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/frontpage.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/new.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/read.js +45 -0
- package/vendor/opencli/dist/clis/lesswrong/sequences.js +27 -0
- package/vendor/opencli/dist/clis/lesswrong/shortform.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/tag.js +45 -0
- package/vendor/opencli/dist/clis/lesswrong/tags.js +27 -0
- package/vendor/opencli/dist/clis/lesswrong/top-month.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/top-week.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/top-year.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/top.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/user-posts.js +41 -0
- package/vendor/opencli/dist/clis/lesswrong/user.js +44 -0
- package/vendor/opencli/dist/clis/linkedin/search.js +2 -2
- package/vendor/opencli/dist/clis/linkedin/timeline.js +2 -2
- package/vendor/opencli/dist/clis/linkedin/timeline.test.js +1 -1
- package/vendor/opencli/dist/clis/linux-do/category.js +1 -1
- package/vendor/opencli/dist/clis/linux-do/feed.d.ts +2 -2
- package/vendor/opencli/dist/clis/linux-do/feed.js +2 -2
- package/vendor/opencli/dist/clis/linux-do/hot.js +1 -1
- package/vendor/opencli/dist/clis/linux-do/latest.js +1 -1
- package/vendor/opencli/dist/clis/medium/feed.js +1 -1
- package/vendor/opencli/dist/clis/medium/search.js +1 -1
- package/vendor/opencli/dist/clis/medium/user.js +1 -1
- package/vendor/opencli/dist/clis/medium/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/medium/utils.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/compat.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/current.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/get.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/history.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/history.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/list.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/note-list.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/note-list.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/notes-get.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/notes-get.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/open.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/open.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/rpc.d.ts +1 -1
- package/vendor/opencli/dist/clis/notebooklm/rpc.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/rpc.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/source-fulltext.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/source-fulltext.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/source-get.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/source-get.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/source-guide.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/source-guide.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/source-list.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/status.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/summary.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/summary.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/notebooklm/utils.js +1 -1
- package/vendor/opencli/dist/clis/notion/export.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/export.js +1 -1
- package/vendor/opencli/dist/clis/notion/favorites.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/favorites.js +1 -1
- package/vendor/opencli/dist/clis/notion/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/new.js +1 -1
- package/vendor/opencli/dist/clis/notion/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/read.js +1 -1
- package/vendor/opencli/dist/clis/notion/search.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/search.js +1 -1
- package/vendor/opencli/dist/clis/notion/sidebar.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/sidebar.js +1 -1
- package/vendor/opencli/dist/clis/notion/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/status.js +1 -1
- package/vendor/opencli/dist/clis/notion/write.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/write.js +1 -1
- package/vendor/opencli/dist/clis/ones/common.d.ts +1 -1
- package/vendor/opencli/dist/clis/ones/common.js +1 -1
- package/vendor/opencli/dist/clis/ones/enrich-tasks.d.ts +1 -1
- package/vendor/opencli/dist/clis/ones/login.js +2 -2
- package/vendor/opencli/dist/clis/ones/logout.js +1 -1
- package/vendor/opencli/dist/clis/ones/me.js +2 -2
- package/vendor/opencli/dist/clis/ones/my-tasks.js +2 -2
- package/vendor/opencli/dist/clis/ones/resolve-labels.d.ts +1 -1
- package/vendor/opencli/dist/clis/ones/task-helpers.js +1 -1
- package/vendor/opencli/dist/clis/ones/task.js +2 -2
- package/vendor/opencli/dist/clis/ones/tasks.js +2 -2
- package/vendor/opencli/dist/clis/ones/token-info.js +2 -2
- package/vendor/opencli/dist/clis/ones/worklog.js +2 -2
- package/vendor/opencli/dist/clis/paperreview/commands.test.js +1 -1
- package/vendor/opencli/dist/clis/paperreview/feedback.js +2 -2
- package/vendor/opencli/dist/clis/paperreview/review.js +2 -2
- package/vendor/opencli/dist/clis/paperreview/submit.js +2 -2
- package/vendor/opencli/dist/clis/paperreview/utils.js +1 -1
- package/vendor/opencli/dist/clis/paperreview/utils.test.js +1 -1
- package/vendor/opencli/dist/clis/pixiv/download.js +4 -4
- package/vendor/opencli/dist/clis/pixiv/download.test.js +3 -3
- package/vendor/opencli/dist/clis/pixiv/illusts.js +2 -2
- package/vendor/opencli/dist/clis/pixiv/illusts.test.js +2 -2
- package/vendor/opencli/dist/clis/pixiv/search.js +1 -1
- package/vendor/opencli/dist/clis/pixiv/search.test.js +2 -2
- package/vendor/opencli/dist/clis/pixiv/test-utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/pixiv/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/pixiv/utils.js +1 -1
- package/vendor/opencli/dist/clis/producthunt/browse.js +2 -2
- package/vendor/opencli/dist/clis/producthunt/hot.js +2 -2
- package/vendor/opencli/dist/clis/producthunt/posts.js +1 -1
- package/vendor/opencli/dist/clis/producthunt/today.js +1 -1
- package/vendor/opencli/dist/clis/reddit/comment.js +2 -2
- package/vendor/opencli/dist/clis/reddit/read.js +2 -2
- package/vendor/opencli/dist/clis/reddit/read.test.js +1 -1
- package/vendor/opencli/dist/clis/reddit/save.js +2 -2
- package/vendor/opencli/dist/clis/reddit/saved.js +2 -2
- package/vendor/opencli/dist/clis/reddit/subscribe.js +2 -2
- package/vendor/opencli/dist/clis/reddit/upvote.js +2 -2
- package/vendor/opencli/dist/clis/reddit/upvoted.js +2 -2
- package/vendor/opencli/dist/clis/reuters/search.js +1 -1
- package/vendor/opencli/dist/clis/sinablog/article.js +1 -1
- package/vendor/opencli/dist/clis/sinablog/hot.js +1 -1
- package/vendor/opencli/dist/clis/sinablog/search.js +1 -1
- package/vendor/opencli/dist/clis/sinablog/user.js +1 -1
- package/vendor/opencli/dist/clis/sinablog/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/sinafinance/news.js +2 -2
- package/vendor/opencli/dist/clis/sinafinance/rolling-news.js +1 -1
- package/vendor/opencli/dist/clis/sinafinance/stock-rank.js +1 -1
- package/vendor/opencli/dist/clis/sinafinance/stock.js +2 -2
- package/vendor/opencli/dist/clis/smzdm/search.js +1 -1
- package/vendor/opencli/dist/clis/spotify/spotify.js +2 -2
- package/vendor/opencli/dist/clis/spotify/utils.js +1 -1
- package/vendor/opencli/dist/clis/substack/feed.js +1 -1
- package/vendor/opencli/dist/clis/substack/publication.js +1 -1
- package/vendor/opencli/dist/clis/substack/search.js +2 -2
- package/vendor/opencli/dist/clis/substack/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/substack/utils.js +1 -1
- package/vendor/opencli/dist/clis/tieba/commands.test.js +1 -1
- package/vendor/opencli/dist/clis/tieba/hot.js +2 -2
- package/vendor/opencli/dist/clis/tieba/posts.js +2 -2
- package/vendor/opencli/dist/clis/tieba/read.js +2 -2
- package/vendor/opencli/dist/clis/tieba/search.js +2 -2
- package/vendor/opencli/dist/clis/twitter/accept.js +2 -2
- package/vendor/opencli/dist/clis/twitter/article.js +2 -2
- package/vendor/opencli/dist/clis/twitter/block.js +2 -2
- package/vendor/opencli/dist/clis/twitter/bookmark.js +2 -2
- package/vendor/opencli/dist/clis/twitter/bookmarks.js +2 -2
- package/vendor/opencli/dist/clis/twitter/delete.d.ts +6 -0
- package/vendor/opencli/dist/clis/twitter/delete.js +82 -47
- package/vendor/opencli/dist/clis/twitter/delete.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/delete.test.js +73 -0
- package/vendor/opencli/dist/clis/twitter/download.js +3 -3
- package/vendor/opencli/dist/clis/twitter/follow.js +2 -2
- package/vendor/opencli/dist/clis/twitter/followers.js +2 -2
- package/vendor/opencli/dist/clis/twitter/following.js +2 -2
- package/vendor/opencli/dist/clis/twitter/hide-reply.js +2 -2
- package/vendor/opencli/dist/clis/twitter/like.js +2 -2
- package/vendor/opencli/dist/clis/twitter/likes.js +2 -2
- package/vendor/opencli/dist/clis/twitter/notifications.js +2 -2
- package/vendor/opencli/dist/clis/twitter/post.js +2 -2
- package/vendor/opencli/dist/clis/twitter/post.test.js +1 -1
- package/vendor/opencli/dist/clis/twitter/profile.js +2 -2
- package/vendor/opencli/dist/clis/twitter/reply-dm.js +2 -2
- package/vendor/opencli/dist/clis/twitter/reply.js +2 -2
- package/vendor/opencli/dist/clis/twitter/reply.test.js +1 -1
- package/vendor/opencli/dist/clis/twitter/search.js +2 -2
- package/vendor/opencli/dist/clis/twitter/search.test.js +1 -1
- package/vendor/opencli/dist/clis/twitter/shared.d.ts +1 -1
- package/vendor/opencli/dist/clis/twitter/thread.js +2 -2
- package/vendor/opencli/dist/clis/twitter/timeline.js +2 -2
- package/vendor/opencli/dist/clis/twitter/trending.js +2 -2
- package/vendor/opencli/dist/clis/twitter/unblock.js +2 -2
- package/vendor/opencli/dist/clis/twitter/unbookmark.js +2 -2
- package/vendor/opencli/dist/clis/twitter/unfollow.js +2 -2
- package/vendor/opencli/dist/clis/v2ex/daily.js +2 -2
- package/vendor/opencli/dist/clis/v2ex/me.js +2 -2
- package/vendor/opencli/dist/clis/v2ex/notifications.js +2 -2
- package/vendor/opencli/dist/clis/web/read.js +2 -2
- package/vendor/opencli/dist/clis/weibo/comments.js +1 -1
- package/vendor/opencli/dist/clis/weibo/feed.js +1 -1
- package/vendor/opencli/dist/clis/weibo/hot.js +1 -1
- package/vendor/opencli/dist/clis/weibo/me.js +2 -2
- package/vendor/opencli/dist/clis/weibo/post.js +2 -2
- package/vendor/opencli/dist/clis/weibo/search.js +2 -2
- package/vendor/opencli/dist/clis/weibo/user.js +2 -2
- package/vendor/opencli/dist/clis/weibo/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/weibo/utils.js +1 -1
- package/vendor/opencli/dist/clis/weixin/download.js +2 -2
- package/vendor/opencli/dist/clis/weread/book.js +2 -2
- package/vendor/opencli/dist/clis/weread/commands.test.js +2 -2
- package/vendor/opencli/dist/clis/weread/highlights.js +1 -1
- package/vendor/opencli/dist/clis/weread/notebooks.js +1 -1
- package/vendor/opencli/dist/clis/weread/notes.js +1 -1
- package/vendor/opencli/dist/clis/weread/private-api-regression.test.js +2 -2
- package/vendor/opencli/dist/clis/weread/ranking.js +1 -1
- package/vendor/opencli/dist/clis/weread/search-regression.test.js +1 -1
- package/vendor/opencli/dist/clis/weread/search.js +1 -1
- package/vendor/opencli/dist/clis/weread/shelf.js +3 -3
- package/vendor/opencli/dist/clis/weread/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/weread/utils.js +1 -1
- package/vendor/opencli/dist/clis/wikipedia/random.js +2 -2
- package/vendor/opencli/dist/clis/wikipedia/search.js +2 -2
- package/vendor/opencli/dist/clis/wikipedia/summary.js +2 -2
- package/vendor/opencli/dist/clis/wikipedia/trending.js +2 -2
- package/vendor/opencli/dist/clis/wikipedia/utils.js +1 -1
- package/vendor/opencli/dist/clis/xianyu/chat.js +2 -2
- package/vendor/opencli/dist/clis/xianyu/item.js +2 -2
- package/vendor/opencli/dist/clis/xianyu/item.test.js +2 -2
- package/vendor/opencli/dist/clis/xianyu/search.js +2 -2
- package/vendor/opencli/dist/clis/xianyu/utils.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/comments.js +2 -2
- package/vendor/opencli/dist/clis/xiaohongshu/comments.test.js +3 -3
- package/vendor/opencli/dist/clis/xiaohongshu/creator-note-detail.d.ts +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-note-detail.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-note-detail.test.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes-summary.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes.d.ts +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes.test.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-profile.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-stats.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/download.js +3 -3
- package/vendor/opencli/dist/clis/xiaohongshu/download.test.js +3 -3
- package/vendor/opencli/dist/clis/xiaohongshu/note-helpers.d.ts +2 -2
- package/vendor/opencli/dist/clis/xiaohongshu/note-helpers.js +5 -3
- package/vendor/opencli/dist/clis/xiaohongshu/note.d.ts +4 -0
- package/vendor/opencli/dist/clis/xiaohongshu/note.js +10 -12
- package/vendor/opencli/dist/clis/xiaohongshu/note.test.js +6 -6
- package/vendor/opencli/dist/clis/xiaohongshu/publish.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/publish.test.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/search.js +2 -2
- package/vendor/opencli/dist/clis/xiaohongshu/search.test.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/user.js +1 -1
- package/vendor/opencli/dist/clis/xiaoyuzhou/episode.js +2 -2
- package/vendor/opencli/dist/clis/xiaoyuzhou/podcast-episodes.js +2 -2
- package/vendor/opencli/dist/clis/xiaoyuzhou/podcast.js +2 -2
- package/vendor/opencli/dist/clis/xiaoyuzhou/utils.js +1 -1
- package/vendor/opencli/dist/clis/xueqiu/comments.d.ts +1 -1
- package/vendor/opencli/dist/clis/xueqiu/comments.js +4 -4
- package/vendor/opencli/dist/clis/xueqiu/comments.test.js +3 -3
- package/vendor/opencli/dist/clis/xueqiu/danjuan-utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/xueqiu/fund-holdings.js +1 -1
- package/vendor/opencli/dist/clis/xueqiu/fund-snapshot.js +1 -1
- package/vendor/opencli/dist/clis/yahoo-finance/quote.js +1 -1
- package/vendor/opencli/dist/clis/yollomi/background.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/edit.js +5 -5
- package/vendor/opencli/dist/clis/yollomi/face-swap.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/generate.js +5 -5
- package/vendor/opencli/dist/clis/yollomi/models.js +1 -1
- package/vendor/opencli/dist/clis/yollomi/object-remover.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/remove-bg.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/restore.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/try-on.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/upload.js +5 -5
- package/vendor/opencli/dist/clis/yollomi/upscale.js +5 -5
- package/vendor/opencli/dist/clis/yollomi/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/yollomi/utils.js +1 -1
- package/vendor/opencli/dist/clis/yollomi/video.js +5 -5
- package/vendor/opencli/dist/clis/youtube/channel.js +2 -2
- package/vendor/opencli/dist/clis/youtube/comments.js +2 -2
- package/vendor/opencli/dist/clis/youtube/search.js +1 -1
- package/vendor/opencli/dist/clis/youtube/transcript.js +2 -2
- package/vendor/opencli/dist/clis/youtube/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/youtube/video.js +2 -2
- package/vendor/opencli/dist/clis/yuanbao/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/yuanbao/ask.js +36 -53
- package/vendor/opencli/dist/clis/yuanbao/ask.test.js +1 -1
- package/vendor/opencli/dist/clis/yuanbao/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/yuanbao/new.js +1 -1
- package/vendor/opencli/dist/clis/yuanbao/new.test.js +1 -1
- package/vendor/opencli/dist/clis/yuanbao/shared.d.ts +2 -2
- package/vendor/opencli/dist/clis/yuanbao/shared.js +1 -1
- package/vendor/opencli/dist/clis/zhihu/download.js +2 -2
- package/vendor/opencli/dist/clis/zhihu/question.js +2 -2
- package/vendor/opencli/dist/clis/zhihu/question.test.js +2 -2
- package/vendor/opencli/dist/clis/zsxq/dynamics.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/groups.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/search.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/search.test.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/topic.js +2 -2
- package/vendor/opencli/dist/clis/zsxq/topic.test.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/topics.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/topics.test.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/zsxq/utils.js +1 -1
- package/vendor/opencli/dist/{build-manifest.js → src/build-manifest.js} +5 -4
- package/vendor/opencli/dist/{cascade.js → src/cascade.js} +16 -31
- package/vendor/opencli/dist/src/cli.d.ts +22 -0
- package/vendor/opencli/dist/{cli.js → src/cli.js} +78 -8
- package/vendor/opencli/dist/{cli.test.js → src/cli.test.js} +84 -1
- package/vendor/opencli/dist/{commanderAdapter.d.ts → src/commanderAdapter.d.ts} +1 -0
- package/vendor/opencli/dist/{commanderAdapter.js → src/commanderAdapter.js} +26 -46
- package/vendor/opencli/dist/src/diagnostic.d.ts +38 -0
- package/vendor/opencli/dist/src/diagnostic.js +71 -0
- package/vendor/opencli/dist/src/diagnostic.test.d.ts +1 -0
- package/vendor/opencli/dist/src/diagnostic.test.js +84 -0
- package/vendor/opencli/dist/{discovery.d.ts → src/discovery.d.ts} +11 -2
- package/vendor/opencli/dist/{discovery.js → src/discovery.js} +71 -37
- package/vendor/opencli/dist/src/doctor.test.d.ts +1 -0
- package/vendor/opencli/dist/src/download/index.test.d.ts +1 -0
- package/vendor/opencli/dist/src/electron-apps.test.d.ts +1 -0
- package/vendor/opencli/dist/src/engine.test.d.ts +1 -0
- package/vendor/opencli/dist/{engine.test.js → src/engine.test.js} +6 -5
- package/vendor/opencli/dist/src/errors.test.d.ts +1 -0
- package/vendor/opencli/dist/{execution.js → src/execution.js} +25 -4
- package/vendor/opencli/dist/src/execution.test.d.ts +1 -0
- package/vendor/opencli/dist/src/extension-manifest-regression.test.d.ts +1 -0
- package/vendor/opencli/dist/src/external.test.d.ts +1 -0
- package/vendor/opencli/dist/{interceptor.d.ts → src/interceptor.d.ts} +2 -0
- package/vendor/opencli/dist/{interceptor.js → src/interceptor.js} +3 -6
- package/vendor/opencli/dist/src/launcher.test.d.ts +1 -0
- package/vendor/opencli/dist/{logger.d.ts → src/logger.d.ts} +4 -0
- package/vendor/opencli/dist/{logger.js → src/logger.js} +8 -0
- package/vendor/opencli/dist/{main.js → src/main.js} +3 -2
- package/vendor/opencli/dist/src/node-network.test.d.ts +1 -0
- package/vendor/opencli/dist/src/output.test.d.ts +1 -0
- package/vendor/opencli/dist/src/package-exports.test.d.ts +1 -0
- package/vendor/opencli/dist/src/package-exports.test.js +112 -0
- package/vendor/opencli/dist/src/pipeline/steps/download.test.d.ts +1 -0
- package/vendor/opencli/dist/src/pipeline/steps/fetch.test.d.ts +1 -0
- package/vendor/opencli/dist/{record.js → src/record.js} +1 -1
- package/vendor/opencli/dist/src/record.test.d.ts +1 -0
- package/vendor/opencli/dist/{registry-api.d.ts → src/registry-api.d.ts} +1 -1
- package/vendor/opencli/dist/src/runtime-detect.test.d.ts +1 -0
- package/vendor/opencli/dist/src/serialization.test.d.ts +1 -0
- package/vendor/opencli/dist/{synthesize.d.ts → src/synthesize.d.ts} +0 -4
- package/vendor/opencli/dist/{synthesize.js → src/synthesize.js} +4 -15
- package/vendor/opencli/dist/src/tui.test.d.ts +1 -0
- package/vendor/opencli/dist/{utils.d.ts → src/utils.d.ts} +3 -0
- package/vendor/opencli/dist/{utils.js → src/utils.js} +22 -0
- package/vendor/opencli/dist/{version.js → src/version.js} +7 -1
- package/vendor/opencli/dist/src/weixin-download.test.d.ts +1 -0
- package/vendor/opencli/dist/{weixin-download.test.js → src/weixin-download.test.js} +1 -1
- package/vendor/opencli/dist/cli.d.ts +0 -9
- /package/vendor/opencli/dist/{browser.test.d.ts → clis/gemini/deep-research-result.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser/cdp.test.d.ts → clis/gemini/deep-research.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser/daemon-client.test.d.ts → clis/hupu/mentions.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser/dom-helpers.test.d.ts → clis/lesswrong/comments.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser/page.test.d.ts → clis/lesswrong/curated.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser/stealth.test.d.ts → clis/lesswrong/frontpage.d.ts} +0 -0
- /package/vendor/opencli/dist/{build-manifest.test.d.ts → clis/lesswrong/new.d.ts} +0 -0
- /package/vendor/opencli/dist/{capabilityRouting.test.d.ts → clis/lesswrong/read.d.ts} +0 -0
- /package/vendor/opencli/dist/{cli.test.d.ts → clis/lesswrong/sequences.d.ts} +0 -0
- /package/vendor/opencli/dist/{commanderAdapter.test.d.ts → clis/lesswrong/shortform.d.ts} +0 -0
- /package/vendor/opencli/dist/{commands/daemon.test.d.ts → clis/lesswrong/tag.d.ts} +0 -0
- /package/vendor/opencli/dist/{completion.test.d.ts → clis/lesswrong/tags.d.ts} +0 -0
- /package/vendor/opencli/dist/{daemon.test.d.ts → clis/lesswrong/top-month.d.ts} +0 -0
- /package/vendor/opencli/dist/{doctor.test.d.ts → clis/lesswrong/top-week.d.ts} +0 -0
- /package/vendor/opencli/dist/{download/index.test.d.ts → clis/lesswrong/top-year.d.ts} +0 -0
- /package/vendor/opencli/dist/{electron-apps.test.d.ts → clis/lesswrong/top.d.ts} +0 -0
- /package/vendor/opencli/dist/{engine.test.d.ts → clis/lesswrong/user-posts.d.ts} +0 -0
- /package/vendor/opencli/dist/{errors.test.d.ts → clis/lesswrong/user.d.ts} +0 -0
- /package/vendor/opencli/dist/{analysis.d.ts → src/analysis.d.ts} +0 -0
- /package/vendor/opencli/dist/{analysis.js → src/analysis.js} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/base-page.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/base-page.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/bridge.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/bridge.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/cdp.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/cdp.js +0 -0
- /package/vendor/opencli/dist/{extension-manifest-regression.test.d.ts → src/browser/cdp.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/cdp.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/daemon-client.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/daemon-client.js +0 -0
- /package/vendor/opencli/dist/{external.test.d.ts → src/browser/daemon-client.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/daemon-client.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/discover.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/discover.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-helpers.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-helpers.js +0 -0
- /package/vendor/opencli/dist/{launcher.test.d.ts → src/browser/dom-helpers.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-helpers.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-snapshot.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-snapshot.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-snapshot.test.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-snapshot.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/errors.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/errors.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/index.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/index.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/page.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/page.js +0 -0
- /package/vendor/opencli/dist/{node-network.test.d.ts → src/browser/page.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/page.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/stealth.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/stealth.js +0 -0
- /package/vendor/opencli/dist/{output.test.d.ts → src/browser/stealth.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/stealth.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/tabs.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/tabs.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/utils.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/utils.js +0 -0
- /package/vendor/opencli/dist/{execution.test.d.ts → src/browser.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser.test.js → src/browser.test.js} +0 -0
- /package/vendor/opencli/dist/{build-manifest.d.ts → src/build-manifest.d.ts} +0 -0
- /package/vendor/opencli/dist/{pipeline/steps/download.test.d.ts → src/build-manifest.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{build-manifest.test.js → src/build-manifest.test.js} +0 -0
- /package/vendor/opencli/dist/{capabilityRouting.d.ts → src/capabilityRouting.d.ts} +0 -0
- /package/vendor/opencli/dist/{capabilityRouting.js → src/capabilityRouting.js} +0 -0
- /package/vendor/opencli/dist/{pipeline/steps/fetch.test.d.ts → src/capabilityRouting.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{capabilityRouting.test.js → src/capabilityRouting.test.js} +0 -0
- /package/vendor/opencli/dist/{cascade.d.ts → src/cascade.d.ts} +0 -0
- /package/vendor/opencli/dist/{record.test.d.ts → src/cli.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{runtime-detect.test.d.ts → src/commanderAdapter.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{commanderAdapter.test.js → src/commanderAdapter.test.js} +0 -0
- /package/vendor/opencli/dist/{commands → src/commands}/daemon.d.ts +0 -0
- /package/vendor/opencli/dist/{commands → src/commands}/daemon.js +0 -0
- /package/vendor/opencli/dist/{serialization.test.d.ts → src/commands/daemon.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{commands → src/commands}/daemon.test.js +0 -0
- /package/vendor/opencli/dist/{completion.d.ts → src/completion.d.ts} +0 -0
- /package/vendor/opencli/dist/{completion.js → src/completion.js} +0 -0
- /package/vendor/opencli/dist/{tui.test.d.ts → src/completion.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{completion.test.js → src/completion.test.js} +0 -0
- /package/vendor/opencli/dist/{constants.d.ts → src/constants.d.ts} +0 -0
- /package/vendor/opencli/dist/{constants.js → src/constants.js} +0 -0
- /package/vendor/opencli/dist/{daemon.d.ts → src/daemon.d.ts} +0 -0
- /package/vendor/opencli/dist/{daemon.js → src/daemon.js} +0 -0
- /package/vendor/opencli/dist/{weixin-download.test.d.ts → src/daemon.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{daemon.test.js → src/daemon.test.js} +0 -0
- /package/vendor/opencli/dist/{doctor.d.ts → src/doctor.d.ts} +0 -0
- /package/vendor/opencli/dist/{doctor.js → src/doctor.js} +0 -0
- /package/vendor/opencli/dist/{doctor.test.js → src/doctor.test.js} +0 -0
- /package/vendor/opencli/dist/{download → src/download}/article-download.d.ts +0 -0
- /package/vendor/opencli/dist/{download → src/download}/article-download.js +0 -0
- /package/vendor/opencli/dist/{download → src/download}/index.d.ts +0 -0
- /package/vendor/opencli/dist/{download → src/download}/index.js +0 -0
- /package/vendor/opencli/dist/{download → src/download}/index.test.js +0 -0
- /package/vendor/opencli/dist/{download → src/download}/media-download.d.ts +0 -0
- /package/vendor/opencli/dist/{download → src/download}/media-download.js +0 -0
- /package/vendor/opencli/dist/{download → src/download}/progress.d.ts +0 -0
- /package/vendor/opencli/dist/{download → src/download}/progress.js +0 -0
- /package/vendor/opencli/dist/{electron-apps.d.ts → src/electron-apps.d.ts} +0 -0
- /package/vendor/opencli/dist/{electron-apps.js → src/electron-apps.js} +0 -0
- /package/vendor/opencli/dist/{electron-apps.test.js → src/electron-apps.test.js} +0 -0
- /package/vendor/opencli/dist/{errors.d.ts → src/errors.d.ts} +0 -0
- /package/vendor/opencli/dist/{errors.js → src/errors.js} +0 -0
- /package/vendor/opencli/dist/{errors.test.js → src/errors.test.js} +0 -0
- /package/vendor/opencli/dist/{execution.d.ts → src/execution.d.ts} +0 -0
- /package/vendor/opencli/dist/{execution.test.js → src/execution.test.js} +0 -0
- /package/vendor/opencli/dist/{explore.d.ts → src/explore.d.ts} +0 -0
- /package/vendor/opencli/dist/{explore.js → src/explore.js} +0 -0
- /package/vendor/opencli/dist/{extension-manifest-regression.test.js → src/extension-manifest-regression.test.js} +0 -0
- /package/vendor/opencli/dist/{external-clis.yaml → src/external-clis.yaml} +0 -0
- /package/vendor/opencli/dist/{external.d.ts → src/external.d.ts} +0 -0
- /package/vendor/opencli/dist/{external.js → src/external.js} +0 -0
- /package/vendor/opencli/dist/{external.test.js → src/external.test.js} +0 -0
- /package/vendor/opencli/dist/{generate.d.ts → src/generate.d.ts} +0 -0
- /package/vendor/opencli/dist/{generate.js → src/generate.js} +0 -0
- /package/vendor/opencli/dist/{hooks.d.ts → src/hooks.d.ts} +0 -0
- /package/vendor/opencli/dist/{hooks.js → src/hooks.js} +0 -0
- /package/vendor/opencli/dist/{hooks.test.d.ts → src/hooks.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{hooks.test.js → src/hooks.test.js} +0 -0
- /package/vendor/opencli/dist/{idle-manager.d.ts → src/idle-manager.d.ts} +0 -0
- /package/vendor/opencli/dist/{idle-manager.js → src/idle-manager.js} +0 -0
- /package/vendor/opencli/dist/{interceptor.test.d.ts → src/interceptor.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{interceptor.test.js → src/interceptor.test.js} +0 -0
- /package/vendor/opencli/dist/{launcher.d.ts → src/launcher.d.ts} +0 -0
- /package/vendor/opencli/dist/{launcher.js → src/launcher.js} +0 -0
- /package/vendor/opencli/dist/{launcher.test.js → src/launcher.test.js} +0 -0
- /package/vendor/opencli/dist/{main.d.ts → src/main.d.ts} +0 -0
- /package/vendor/opencli/dist/{node-network.d.ts → src/node-network.d.ts} +0 -0
- /package/vendor/opencli/dist/{node-network.js → src/node-network.js} +0 -0
- /package/vendor/opencli/dist/{node-network.test.js → src/node-network.test.js} +0 -0
- /package/vendor/opencli/dist/{output.d.ts → src/output.d.ts} +0 -0
- /package/vendor/opencli/dist/{output.js → src/output.js} +0 -0
- /package/vendor/opencli/dist/{output.test.js → src/output.test.js} +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/executor.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/executor.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/executor.test.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/executor.test.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/index.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/index.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/registry.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/registry.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/browser.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/browser.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/download.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/download.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/download.test.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/fetch.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/fetch.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/fetch.test.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/intercept.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/intercept.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/tap.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/tap.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/transform.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/transform.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/template.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/template.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/template.test.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/template.test.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/transform.test.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/transform.test.js +0 -0
- /package/vendor/opencli/dist/{plugin-manifest.d.ts → src/plugin-manifest.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin-manifest.js → src/plugin-manifest.js} +0 -0
- /package/vendor/opencli/dist/{plugin-manifest.test.d.ts → src/plugin-manifest.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin-manifest.test.js → src/plugin-manifest.test.js} +0 -0
- /package/vendor/opencli/dist/{plugin-scaffold.d.ts → src/plugin-scaffold.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin-scaffold.js → src/plugin-scaffold.js} +0 -0
- /package/vendor/opencli/dist/{plugin-scaffold.test.d.ts → src/plugin-scaffold.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin-scaffold.test.js → src/plugin-scaffold.test.js} +0 -0
- /package/vendor/opencli/dist/{plugin.d.ts → src/plugin.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin.js → src/plugin.js} +0 -0
- /package/vendor/opencli/dist/{plugin.test.d.ts → src/plugin.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin.test.js → src/plugin.test.js} +0 -0
- /package/vendor/opencli/dist/{record.d.ts → src/record.d.ts} +0 -0
- /package/vendor/opencli/dist/{record.test.js → src/record.test.js} +0 -0
- /package/vendor/opencli/dist/{registry-api.js → src/registry-api.js} +0 -0
- /package/vendor/opencli/dist/{registry.d.ts → src/registry.d.ts} +0 -0
- /package/vendor/opencli/dist/{registry.js → src/registry.js} +0 -0
- /package/vendor/opencli/dist/{registry.test.d.ts → src/registry.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{registry.test.js → src/registry.test.js} +0 -0
- /package/vendor/opencli/dist/{runtime-detect.d.ts → src/runtime-detect.d.ts} +0 -0
- /package/vendor/opencli/dist/{runtime-detect.js → src/runtime-detect.js} +0 -0
- /package/vendor/opencli/dist/{runtime-detect.test.js → src/runtime-detect.test.js} +0 -0
- /package/vendor/opencli/dist/{runtime.d.ts → src/runtime.d.ts} +0 -0
- /package/vendor/opencli/dist/{runtime.js → src/runtime.js} +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/framework.d.ts +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/framework.js +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/interact.d.ts +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/interact.js +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/store.d.ts +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/store.js +0 -0
- /package/vendor/opencli/dist/{serialization.d.ts → src/serialization.d.ts} +0 -0
- /package/vendor/opencli/dist/{serialization.js → src/serialization.js} +0 -0
- /package/vendor/opencli/dist/{serialization.test.js → src/serialization.test.js} +0 -0
- /package/vendor/opencli/dist/{snapshotFormatter.d.ts → src/snapshotFormatter.d.ts} +0 -0
- /package/vendor/opencli/dist/{snapshotFormatter.js → src/snapshotFormatter.js} +0 -0
- /package/vendor/opencli/dist/{snapshotFormatter.test.d.ts → src/snapshotFormatter.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{snapshotFormatter.test.js → src/snapshotFormatter.test.js} +0 -0
- /package/vendor/opencli/dist/{tui.d.ts → src/tui.d.ts} +0 -0
- /package/vendor/opencli/dist/{tui.js → src/tui.js} +0 -0
- /package/vendor/opencli/dist/{tui.test.js → src/tui.test.js} +0 -0
- /package/vendor/opencli/dist/{types.d.ts → src/types.d.ts} +0 -0
- /package/vendor/opencli/dist/{types.js → src/types.js} +0 -0
- /package/vendor/opencli/dist/{update-check.d.ts → src/update-check.d.ts} +0 -0
- /package/vendor/opencli/dist/{update-check.js → src/update-check.js} +0 -0
- /package/vendor/opencli/dist/{validate.d.ts → src/validate.d.ts} +0 -0
- /package/vendor/opencli/dist/{validate.js → src/validate.js} +0 -0
- /package/vendor/opencli/dist/{verify.d.ts → src/verify.d.ts} +0 -0
- /package/vendor/opencli/dist/{verify.js → src/verify.js} +0 -0
- /package/vendor/opencli/dist/{version.d.ts → src/version.d.ts} +0 -0
- /package/vendor/opencli/dist/{yaml-schema.d.ts → src/yaml-schema.d.ts} +0 -0
- /package/vendor/opencli/dist/{yaml-schema.js → src/yaml-schema.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cli, Strategy } from '
|
|
2
|
-
import { CliError } from '
|
|
1
|
+
import { cli, Strategy } from '@jackwener/opencli/registry';
|
|
2
|
+
import { CliError } from '@jackwener/opencli/errors';
|
|
3
3
|
import { browserJsonRequest, ensureZsxqAuth, ensureZsxqPage, fetchFirstJson, getCommentsFromResponse, getTopicFromResponse, getTopicUrl, summarizeComments, toTopicRow, } from './utils.js';
|
|
4
4
|
cli({
|
|
5
5
|
site: 'zsxq',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArgumentError, AuthRequiredError, CliError } from '
|
|
1
|
+
import { ArgumentError, AuthRequiredError, CliError } from '@jackwener/opencli/errors';
|
|
2
2
|
const SITE_DOMAIN = 'wx.zsxq.com';
|
|
3
3
|
const SITE_URL = 'https://wx.zsxq.com';
|
|
4
4
|
function asRecord(value) {
|
|
@@ -15,8 +15,8 @@ import yaml from 'js-yaml';
|
|
|
15
15
|
import { getErrorMessage } from './errors.js';
|
|
16
16
|
import { fullName, getRegistry } from './registry.js';
|
|
17
17
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
18
|
-
const CLIS_DIR = path.resolve(__dirname, 'clis');
|
|
19
|
-
const OUTPUT = path.resolve(__dirname, '..', '
|
|
18
|
+
const CLIS_DIR = path.resolve(__dirname, '..', 'clis');
|
|
19
|
+
const OUTPUT = path.resolve(__dirname, '..', 'cli-manifest.json');
|
|
20
20
|
import { parseYamlArgs } from './yaml-schema.js';
|
|
21
21
|
import { isRecord } from './utils.js';
|
|
22
22
|
const CLI_MODULE_PATTERN = /\bcli\s*\(/;
|
|
@@ -200,14 +200,15 @@ async function main() {
|
|
|
200
200
|
// entry-point loses its executable permission, causing "Permission denied".
|
|
201
201
|
// See: https://github.com/jackwener/opencli/issues/446
|
|
202
202
|
if (process.platform !== 'win32') {
|
|
203
|
-
const
|
|
203
|
+
const projectRoot = path.resolve(__dirname, '..', '..');
|
|
204
|
+
const pkgPath = path.resolve(projectRoot, 'package.json');
|
|
204
205
|
try {
|
|
205
206
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
206
207
|
const bins = typeof pkg.bin === 'string'
|
|
207
208
|
? { [pkg.name ?? 'cli']: pkg.bin }
|
|
208
209
|
: pkg.bin ?? {};
|
|
209
210
|
for (const binPath of Object.values(bins)) {
|
|
210
|
-
const abs = path.resolve(
|
|
211
|
+
const abs = path.resolve(projectRoot, binPath);
|
|
211
212
|
if (fs.existsSync(abs)) {
|
|
212
213
|
fs.chmodSync(abs, 0o755);
|
|
213
214
|
console.log(`✅ Restored executable permission: ${binPath}`);
|
|
@@ -57,6 +57,12 @@ function buildFetchProbeJs(url, opts) {
|
|
|
57
57
|
}
|
|
58
58
|
`;
|
|
59
59
|
}
|
|
60
|
+
/** Strategy → fetch probe options mapping for strategies that support probing. */
|
|
61
|
+
const PROBE_OPTIONS = {
|
|
62
|
+
[Strategy.PUBLIC]: {},
|
|
63
|
+
[Strategy.COOKIE]: { credentials: true },
|
|
64
|
+
[Strategy.HEADER]: { credentials: true, extractCsrf: true },
|
|
65
|
+
};
|
|
60
66
|
/**
|
|
61
67
|
* Probe an endpoint with a specific strategy.
|
|
62
68
|
* Returns whether the probe succeeded and basic response info.
|
|
@@ -64,37 +70,16 @@ function buildFetchProbeJs(url, opts) {
|
|
|
64
70
|
export async function probeEndpoint(page, url, strategy, _opts = {}) {
|
|
65
71
|
const result = { strategy, success: false };
|
|
66
72
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const resp = await page.evaluate(buildFetchProbeJs(url, { credentials: true }));
|
|
78
|
-
result.statusCode = resp?.status;
|
|
79
|
-
result.success = resp?.ok && resp?.hasData;
|
|
80
|
-
result.hasData = resp?.hasData;
|
|
81
|
-
result.responsePreview = resp?.preview;
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
case Strategy.HEADER: {
|
|
85
|
-
const resp = await page.evaluate(buildFetchProbeJs(url, { credentials: true, extractCsrf: true }));
|
|
86
|
-
result.statusCode = resp?.status;
|
|
87
|
-
result.success = resp?.ok && resp?.hasData;
|
|
88
|
-
result.hasData = resp?.hasData;
|
|
89
|
-
result.responsePreview = resp?.preview;
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
case Strategy.INTERCEPT:
|
|
93
|
-
case Strategy.UI:
|
|
94
|
-
// These require specific implementation per-site
|
|
95
|
-
result.success = false;
|
|
96
|
-
result.error = `Strategy ${strategy} requires site-specific implementation`;
|
|
97
|
-
break;
|
|
73
|
+
const opts = PROBE_OPTIONS[strategy];
|
|
74
|
+
if (opts) {
|
|
75
|
+
const resp = await page.evaluate(buildFetchProbeJs(url, opts));
|
|
76
|
+
result.statusCode = resp?.status;
|
|
77
|
+
result.success = resp?.ok && resp?.hasData;
|
|
78
|
+
result.hasData = resp?.hasData;
|
|
79
|
+
result.responsePreview = resp?.preview;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
result.error = `Strategy ${strategy} requires site-specific implementation`;
|
|
98
83
|
}
|
|
99
84
|
}
|
|
100
85
|
catch (err) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI entry point: registers built-in commands and wires up Commander.
|
|
3
|
+
*
|
|
4
|
+
* Built-in commands are registered inline here (list, validate, explore, etc.).
|
|
5
|
+
* Dynamic adapter commands are registered via commanderAdapter.ts.
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from 'commander';
|
|
8
|
+
export declare function createProgram(BUILTIN_CLIS: string, USER_CLIS: string): Command;
|
|
9
|
+
export declare function runCli(BUILTIN_CLIS: string, USER_CLIS: string): void;
|
|
10
|
+
export interface OperateVerifyInvocation {
|
|
11
|
+
binary: string;
|
|
12
|
+
args: string[];
|
|
13
|
+
cwd: string;
|
|
14
|
+
shell?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function findPackageRoot(startFile: string, fileExists?: (path: string) => boolean): string;
|
|
17
|
+
export declare function resolveOperateVerifyInvocation(opts?: {
|
|
18
|
+
projectRoot?: string;
|
|
19
|
+
platform?: NodeJS.Platform;
|
|
20
|
+
fileExists?: (path: string) => boolean;
|
|
21
|
+
readFile?: (path: string) => string;
|
|
22
|
+
}): OperateVerifyInvocation;
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* Built-in commands are registered inline here (list, validate, explore, etc.).
|
|
5
5
|
* Dynamic adapter commands are registered via commanderAdapter.ts.
|
|
6
6
|
*/
|
|
7
|
+
import * as fs from 'node:fs';
|
|
8
|
+
import * as path from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
7
10
|
import { Command } from 'commander';
|
|
8
11
|
import chalk from 'chalk';
|
|
9
12
|
import { fullName, getRegistry, strategyLabel } from './registry.js';
|
|
@@ -16,6 +19,7 @@ import { loadExternalClis, executeExternalCli, installExternalCli, registerExter
|
|
|
16
19
|
import { registerAllCommands } from './commanderAdapter.js';
|
|
17
20
|
import { EXIT_CODES, getErrorMessage } from './errors.js';
|
|
18
21
|
import { daemonStatus, daemonStop, daemonRestart } from './commands/daemon.js';
|
|
22
|
+
const CLI_FILE = fileURLToPath(import.meta.url);
|
|
19
23
|
/** Create a browser page for operate commands. Uses 'operate' workspace for session persistence. */
|
|
20
24
|
async function getOperatePage() {
|
|
21
25
|
const { BrowserBridge } = await import('./browser/index.js');
|
|
@@ -587,11 +591,9 @@ cli({
|
|
|
587
591
|
process.exitCode = EXIT_CODES.USAGE_ERROR;
|
|
588
592
|
return;
|
|
589
593
|
}
|
|
590
|
-
const {
|
|
594
|
+
const { execFileSync } = await import('node:child_process');
|
|
591
595
|
const os = await import('node:os');
|
|
592
|
-
const path = await import('node:path');
|
|
593
596
|
const filePath = path.join(os.homedir(), '.opencli', 'clis', site, `${command}.ts`);
|
|
594
|
-
const fs = await import('node:fs');
|
|
595
597
|
if (!fs.existsSync(filePath)) {
|
|
596
598
|
console.error(`Adapter not found: ${filePath}`);
|
|
597
599
|
console.error(`Run "opencli operate init ${name}" to create it.`);
|
|
@@ -604,14 +606,16 @@ cli({
|
|
|
604
606
|
const adapterSrc = fs.readFileSync(filePath, 'utf-8');
|
|
605
607
|
const hasLimitArg = /['"]limit['"]/.test(adapterSrc);
|
|
606
608
|
const limitFlag = hasLimitArg ? ' --limit 3' : '';
|
|
607
|
-
const
|
|
609
|
+
const limitArgs = hasLimitArg ? ['--limit', '3'] : [];
|
|
610
|
+
const invocation = resolveOperateVerifyInvocation();
|
|
608
611
|
try {
|
|
609
|
-
const output =
|
|
610
|
-
cwd:
|
|
612
|
+
const output = execFileSync(invocation.binary, [...invocation.args, site, command, ...limitArgs], {
|
|
613
|
+
cwd: invocation.cwd,
|
|
611
614
|
timeout: 30000,
|
|
612
615
|
encoding: 'utf-8',
|
|
613
616
|
env: process.env,
|
|
614
617
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
618
|
+
...(invocation.shell ? { shell: true } : {}),
|
|
615
619
|
});
|
|
616
620
|
console.log(` Executing: opencli ${site} ${command}${limitFlag}\n`);
|
|
617
621
|
console.log(output);
|
|
@@ -915,7 +919,7 @@ cli({
|
|
|
915
919
|
.description('Start Anthropic-compatible API proxy for Antigravity')
|
|
916
920
|
.option('--port <port>', 'Server port (default: 8082)', '8082')
|
|
917
921
|
.action(async (opts) => {
|
|
918
|
-
const { startServe } = await import('
|
|
922
|
+
const { startServe } = await import('../clis/antigravity/serve.js');
|
|
919
923
|
await startServe({ port: parseInt(opts.port) });
|
|
920
924
|
});
|
|
921
925
|
// ── Dynamic adapter commands ──────────────────────────────────────────────
|
|
@@ -939,7 +943,73 @@ cli({
|
|
|
939
943
|
export function runCli(BUILTIN_CLIS, USER_CLIS) {
|
|
940
944
|
createProgram(BUILTIN_CLIS, USER_CLIS).parse();
|
|
941
945
|
}
|
|
942
|
-
|
|
946
|
+
export function findPackageRoot(startFile, fileExists = fs.existsSync) {
|
|
947
|
+
let dir = path.dirname(startFile);
|
|
948
|
+
while (true) {
|
|
949
|
+
if (fileExists(path.join(dir, 'package.json')))
|
|
950
|
+
return dir;
|
|
951
|
+
const parent = path.dirname(dir);
|
|
952
|
+
if (parent === dir) {
|
|
953
|
+
throw new Error(`Could not find package.json above ${startFile}`);
|
|
954
|
+
}
|
|
955
|
+
dir = parent;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
function getBuiltEntryCandidates(packageRoot, readFile) {
|
|
959
|
+
const candidates = [];
|
|
960
|
+
try {
|
|
961
|
+
const pkg = JSON.parse(readFile(path.join(packageRoot, 'package.json')));
|
|
962
|
+
if (typeof pkg.bin === 'string') {
|
|
963
|
+
candidates.push(path.join(packageRoot, pkg.bin));
|
|
964
|
+
}
|
|
965
|
+
else if (pkg.bin && typeof pkg.bin === 'object' && typeof pkg.bin.opencli === 'string') {
|
|
966
|
+
candidates.push(path.join(packageRoot, pkg.bin.opencli));
|
|
967
|
+
}
|
|
968
|
+
if (typeof pkg.main === 'string') {
|
|
969
|
+
candidates.push(path.join(packageRoot, pkg.main));
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
catch {
|
|
973
|
+
// Fall through to compatibility candidates below.
|
|
974
|
+
}
|
|
975
|
+
// Compatibility fallback for partially-built trees or older layouts.
|
|
976
|
+
candidates.push(path.join(packageRoot, 'dist', 'src', 'main.js'), path.join(packageRoot, 'dist', 'main.js'));
|
|
977
|
+
return [...new Set(candidates)];
|
|
978
|
+
}
|
|
979
|
+
export function resolveOperateVerifyInvocation(opts = {}) {
|
|
980
|
+
const platform = opts.platform ?? process.platform;
|
|
981
|
+
const fileExists = opts.fileExists ?? fs.existsSync;
|
|
982
|
+
const readFile = opts.readFile ?? ((filePath) => fs.readFileSync(filePath, 'utf-8'));
|
|
983
|
+
const projectRoot = opts.projectRoot ?? findPackageRoot(CLI_FILE, fileExists);
|
|
984
|
+
for (const builtEntry of getBuiltEntryCandidates(projectRoot, readFile)) {
|
|
985
|
+
if (fileExists(builtEntry)) {
|
|
986
|
+
return {
|
|
987
|
+
binary: process.execPath,
|
|
988
|
+
args: [builtEntry],
|
|
989
|
+
cwd: projectRoot,
|
|
990
|
+
};
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
const sourceEntry = path.join(projectRoot, 'src', 'main.ts');
|
|
994
|
+
if (!fileExists(sourceEntry)) {
|
|
995
|
+
throw new Error(`Could not find opencli entrypoint under ${projectRoot}. Expected built entry from package.json or src/main.ts.`);
|
|
996
|
+
}
|
|
997
|
+
const localTsxBin = path.join(projectRoot, 'node_modules', '.bin', platform === 'win32' ? 'tsx.cmd' : 'tsx');
|
|
998
|
+
if (fileExists(localTsxBin)) {
|
|
999
|
+
return {
|
|
1000
|
+
binary: localTsxBin,
|
|
1001
|
+
args: [sourceEntry],
|
|
1002
|
+
cwd: projectRoot,
|
|
1003
|
+
...(platform === 'win32' ? { shell: true } : {}),
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1006
|
+
return {
|
|
1007
|
+
binary: platform === 'win32' ? 'npx.cmd' : 'npx',
|
|
1008
|
+
args: ['tsx', sourceEntry],
|
|
1009
|
+
cwd: projectRoot,
|
|
1010
|
+
...(platform === 'win32' ? { shell: true } : {}),
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
943
1013
|
/** Infer a workspace-friendly hostname from a URL, with site override. */
|
|
944
1014
|
function inferHost(url, site) {
|
|
945
1015
|
if (site)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
+
import * as path from 'node:path';
|
|
2
3
|
const { mockExploreUrl, mockRenderExploreSummary, mockGenerateCliFromUrl, mockRenderGenerateSummary, mockRecordSession, mockRenderRecordSummary, mockCascadeProbe, mockRenderCascadeResult, mockGetBrowserFactory, mockBrowserSession, } = vi.hoisted(() => ({
|
|
3
4
|
mockExploreUrl: vi.fn(),
|
|
4
5
|
mockRenderExploreSummary: vi.fn(),
|
|
@@ -31,7 +32,7 @@ vi.mock('./runtime.js', () => ({
|
|
|
31
32
|
getBrowserFactory: mockGetBrowserFactory,
|
|
32
33
|
browserSession: mockBrowserSession,
|
|
33
34
|
}));
|
|
34
|
-
import { createProgram } from './cli.js';
|
|
35
|
+
import { createProgram, findPackageRoot, resolveOperateVerifyInvocation } from './cli.js';
|
|
35
36
|
describe('built-in browser commands verbose wiring', () => {
|
|
36
37
|
const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
|
|
37
38
|
beforeEach(() => {
|
|
@@ -86,3 +87,85 @@ describe('built-in browser commands verbose wiring', () => {
|
|
|
86
87
|
});
|
|
87
88
|
consoleLogSpy.mockClear();
|
|
88
89
|
});
|
|
90
|
+
describe('resolveOperateVerifyInvocation', () => {
|
|
91
|
+
it('prefers the built entry declared in package metadata', () => {
|
|
92
|
+
const projectRoot = path.join('repo-root');
|
|
93
|
+
const exists = new Set([
|
|
94
|
+
path.join(projectRoot, 'dist', 'src', 'main.js'),
|
|
95
|
+
]);
|
|
96
|
+
expect(resolveOperateVerifyInvocation({
|
|
97
|
+
projectRoot,
|
|
98
|
+
readFile: () => JSON.stringify({ bin: { opencli: 'dist/src/main.js' } }),
|
|
99
|
+
fileExists: (candidate) => exists.has(candidate),
|
|
100
|
+
})).toEqual({
|
|
101
|
+
binary: process.execPath,
|
|
102
|
+
args: [path.join(projectRoot, 'dist', 'src', 'main.js')],
|
|
103
|
+
cwd: projectRoot,
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
it('falls back to compatibility built-entry candidates when package metadata is unavailable', () => {
|
|
107
|
+
const projectRoot = path.join('repo-root');
|
|
108
|
+
const exists = new Set([
|
|
109
|
+
path.join(projectRoot, 'dist', 'src', 'main.js'),
|
|
110
|
+
]);
|
|
111
|
+
expect(resolveOperateVerifyInvocation({
|
|
112
|
+
projectRoot,
|
|
113
|
+
readFile: () => { throw new Error('no package json'); },
|
|
114
|
+
fileExists: (candidate) => exists.has(candidate),
|
|
115
|
+
})).toEqual({
|
|
116
|
+
binary: process.execPath,
|
|
117
|
+
args: [path.join(projectRoot, 'dist', 'src', 'main.js')],
|
|
118
|
+
cwd: projectRoot,
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
it('falls back to the local tsx binary in source checkouts on Windows', () => {
|
|
122
|
+
const projectRoot = path.join('repo-root');
|
|
123
|
+
const exists = new Set([
|
|
124
|
+
path.join(projectRoot, 'src', 'main.ts'),
|
|
125
|
+
path.join(projectRoot, 'node_modules', '.bin', 'tsx.cmd'),
|
|
126
|
+
]);
|
|
127
|
+
expect(resolveOperateVerifyInvocation({
|
|
128
|
+
projectRoot,
|
|
129
|
+
platform: 'win32',
|
|
130
|
+
fileExists: (candidate) => exists.has(candidate),
|
|
131
|
+
})).toEqual({
|
|
132
|
+
binary: path.join(projectRoot, 'node_modules', '.bin', 'tsx.cmd'),
|
|
133
|
+
args: [path.join(projectRoot, 'src', 'main.ts')],
|
|
134
|
+
cwd: projectRoot,
|
|
135
|
+
shell: true,
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
it('falls back to npx tsx when local tsx is unavailable', () => {
|
|
139
|
+
const projectRoot = path.join('repo-root');
|
|
140
|
+
const exists = new Set([
|
|
141
|
+
path.join(projectRoot, 'src', 'main.ts'),
|
|
142
|
+
]);
|
|
143
|
+
expect(resolveOperateVerifyInvocation({
|
|
144
|
+
projectRoot,
|
|
145
|
+
platform: 'linux',
|
|
146
|
+
fileExists: (candidate) => exists.has(candidate),
|
|
147
|
+
})).toEqual({
|
|
148
|
+
binary: 'npx',
|
|
149
|
+
args: ['tsx', path.join(projectRoot, 'src', 'main.ts')],
|
|
150
|
+
cwd: projectRoot,
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
describe('findPackageRoot', () => {
|
|
155
|
+
it('walks up from dist/src to the package root', () => {
|
|
156
|
+
const packageRoot = path.join('repo-root');
|
|
157
|
+
const cliFile = path.join(packageRoot, 'dist', 'src', 'cli.js');
|
|
158
|
+
const exists = new Set([
|
|
159
|
+
path.join(packageRoot, 'package.json'),
|
|
160
|
+
]);
|
|
161
|
+
expect(findPackageRoot(cliFile, (candidate) => exists.has(candidate))).toBe(packageRoot);
|
|
162
|
+
});
|
|
163
|
+
it('walks up from src to the package root', () => {
|
|
164
|
+
const packageRoot = path.join('repo-root');
|
|
165
|
+
const cliFile = path.join(packageRoot, 'src', 'cli.ts');
|
|
166
|
+
const exists = new Set([
|
|
167
|
+
path.join(packageRoot, 'package.json'),
|
|
168
|
+
]);
|
|
169
|
+
expect(findPackageRoot(cliFile, (candidate) => exists.has(candidate))).toBe(packageRoot);
|
|
170
|
+
});
|
|
171
|
+
});
|
|
@@ -16,6 +16,7 @@ export declare function normalizeArgValue(argType: string | undefined, value: un
|
|
|
16
16
|
* Register a single CliCommand as a Commander subcommand.
|
|
17
17
|
*/
|
|
18
18
|
export declare function registerCommandToProgram(siteCmd: Command, cmd: CliCommand): void;
|
|
19
|
+
export type GenericErrorKind = 'auth' | 'http' | 'not-found' | 'other';
|
|
19
20
|
/**
|
|
20
21
|
* Register all commands from the registry onto a Commander program.
|
|
21
22
|
*/
|
|
@@ -122,42 +122,31 @@ export function registerCommandToProgram(siteCmd, cmd) {
|
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
-
// ──
|
|
126
|
-
/**
|
|
127
|
-
* Map any thrown value to a Unix process exit code.
|
|
128
|
-
*
|
|
129
|
-
* - CliError subclasses carry their own exitCode (set in errors.ts).
|
|
130
|
-
* - Generic Error objects are classified by message pattern so that
|
|
131
|
-
* un-typed auth / not-found errors from adapters still produce
|
|
132
|
-
* meaningful exit codes for shell scripts.
|
|
133
|
-
*/
|
|
134
|
-
function resolveExitCode(err) {
|
|
135
|
-
if (err instanceof CliError)
|
|
136
|
-
return err.exitCode;
|
|
137
|
-
// Pattern-based fallback for untyped errors thrown by third-party adapters.
|
|
138
|
-
const msg = getErrorMessage(err);
|
|
139
|
-
const kind = classifyGenericError(msg);
|
|
140
|
-
if (kind === 'auth')
|
|
141
|
-
return EXIT_CODES.NOPERM;
|
|
142
|
-
if (kind === 'not-found')
|
|
143
|
-
return EXIT_CODES.EMPTY_RESULT;
|
|
144
|
-
if (kind === 'http')
|
|
145
|
-
return EXIT_CODES.GENERIC_ERROR; // HTTP 4xx/5xx → generic; renderer shows details
|
|
146
|
-
return EXIT_CODES.GENERIC_ERROR;
|
|
147
|
-
}
|
|
148
|
-
// ── Error rendering ──────────────────────────────────────────────────────────
|
|
125
|
+
// ── Error classification ─────────────────────────────────────────────────────
|
|
149
126
|
const ISSUES_URL = 'https://github.com/jackwener/opencli/issues';
|
|
127
|
+
const GENERIC_ERROR_MAP = {
|
|
128
|
+
auth: { icon: '🔒', exitCode: EXIT_CODES.NOPERM, hint: 'Open Chrome or Chromium, log in to the target site, then retry.' },
|
|
129
|
+
http: { icon: '🌐', exitCode: EXIT_CODES.GENERIC_ERROR, hint: 'Check your login status, or the site may be temporarily unavailable.' },
|
|
130
|
+
'not-found': { icon: '📭', exitCode: EXIT_CODES.EMPTY_RESULT, hint: 'The resource was not found. The adapter or page structure may have changed.' },
|
|
131
|
+
other: { icon: '💥', exitCode: EXIT_CODES.GENERIC_ERROR, hint: '' },
|
|
132
|
+
};
|
|
150
133
|
/** Pattern-based classifier for untyped errors thrown by adapters. */
|
|
151
134
|
function classifyGenericError(msg) {
|
|
152
135
|
const m = msg.toLowerCase();
|
|
136
|
+
let kind = 'other';
|
|
153
137
|
if (/not logged in|login required|please log in|未登录|请先登录|authentication required|cookie expired/.test(m))
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
138
|
+
kind = 'auth';
|
|
139
|
+
else if (/\b(status[: ]+)?[45]\d{2}\b|http[/ ][45]\d{2}/.test(m))
|
|
140
|
+
kind = 'http';
|
|
141
|
+
else if (/not found|未找到|could not find|no .+ found/.test(m))
|
|
142
|
+
kind = 'not-found';
|
|
143
|
+
return { kind, ...GENERIC_ERROR_MAP[kind] };
|
|
144
|
+
}
|
|
145
|
+
// ── Exit code resolution ─────────────────────────────────────────────────────
|
|
146
|
+
function resolveExitCode(err) {
|
|
147
|
+
if (err instanceof CliError)
|
|
148
|
+
return err.exitCode;
|
|
149
|
+
return classifyGenericError(getErrorMessage(err)).exitCode;
|
|
161
150
|
}
|
|
162
151
|
/** Render a status line for BrowserConnectError based on real-time or kind-derived state. */
|
|
163
152
|
function renderBridgeStatus(running, extensionConnected) {
|
|
@@ -256,21 +245,12 @@ async function renderError(err, cmdName, verbose) {
|
|
|
256
245
|
}
|
|
257
246
|
// ── Generic Error from adapters: classify by message pattern ──────────
|
|
258
247
|
const msg = getErrorMessage(err);
|
|
259
|
-
const
|
|
260
|
-
if (kind
|
|
261
|
-
console.error(chalk.red(
|
|
262
|
-
console.error(chalk.yellow(
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
if (kind === 'http') {
|
|
266
|
-
console.error(chalk.red(`🌐 ${msg}`));
|
|
267
|
-
console.error(chalk.yellow('→ Check your login status, or the site may be temporarily unavailable.'));
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
if (kind === 'not-found') {
|
|
271
|
-
console.error(chalk.red(`📭 ${msg}`));
|
|
272
|
-
console.error(chalk.yellow('→ The resource was not found. The adapter or page structure may have changed.'));
|
|
273
|
-
console.error(chalk.dim(` Report: ${ISSUES_URL}`));
|
|
248
|
+
const classified = classifyGenericError(msg);
|
|
249
|
+
if (classified.kind !== 'other') {
|
|
250
|
+
console.error(chalk.red(`${classified.icon} ${msg}`));
|
|
251
|
+
console.error(chalk.yellow(`→ ${classified.hint}`));
|
|
252
|
+
if (classified.kind === 'not-found')
|
|
253
|
+
console.error(chalk.dim(` Report: ${ISSUES_URL}`));
|
|
274
254
|
return;
|
|
275
255
|
}
|
|
276
256
|
// ── Unknown error: show stack in verbose mode ─────────────────────────
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured diagnostic output for AI-driven adapter repair.
|
|
3
|
+
*
|
|
4
|
+
* When OPENCLI_DIAGNOSTIC=1, failed commands emit a JSON RepairContext to stderr
|
|
5
|
+
* containing the error, adapter source, and browser state (DOM snapshot, network
|
|
6
|
+
* requests, console errors). AI Agents consume this to diagnose and fix adapters.
|
|
7
|
+
*/
|
|
8
|
+
import type { IPage } from './types.js';
|
|
9
|
+
import type { InternalCliCommand } from './registry.js';
|
|
10
|
+
export interface RepairContext {
|
|
11
|
+
error: {
|
|
12
|
+
code: string;
|
|
13
|
+
message: string;
|
|
14
|
+
hint?: string;
|
|
15
|
+
stack?: string;
|
|
16
|
+
};
|
|
17
|
+
adapter: {
|
|
18
|
+
site: string;
|
|
19
|
+
command: string;
|
|
20
|
+
sourcePath?: string;
|
|
21
|
+
source?: string;
|
|
22
|
+
};
|
|
23
|
+
page?: {
|
|
24
|
+
url: string;
|
|
25
|
+
snapshot: string;
|
|
26
|
+
networkRequests: unknown[];
|
|
27
|
+
consoleErrors: unknown[];
|
|
28
|
+
};
|
|
29
|
+
timestamp: string;
|
|
30
|
+
}
|
|
31
|
+
/** Whether diagnostic mode is enabled. */
|
|
32
|
+
export declare function isDiagnosticEnabled(): boolean;
|
|
33
|
+
/** Build a RepairContext from an error, command metadata, and optional page state. */
|
|
34
|
+
export declare function buildRepairContext(err: unknown, cmd: InternalCliCommand, pageState?: RepairContext['page']): RepairContext;
|
|
35
|
+
/** Collect full diagnostic context including page state. */
|
|
36
|
+
export declare function collectDiagnostic(err: unknown, cmd: InternalCliCommand, page: IPage | null): Promise<RepairContext>;
|
|
37
|
+
/** Emit diagnostic JSON to stderr. */
|
|
38
|
+
export declare function emitDiagnostic(ctx: RepairContext): void;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured diagnostic output for AI-driven adapter repair.
|
|
3
|
+
*
|
|
4
|
+
* When OPENCLI_DIAGNOSTIC=1, failed commands emit a JSON RepairContext to stderr
|
|
5
|
+
* containing the error, adapter source, and browser state (DOM snapshot, network
|
|
6
|
+
* requests, console errors). AI Agents consume this to diagnose and fix adapters.
|
|
7
|
+
*/
|
|
8
|
+
import * as fs from 'node:fs';
|
|
9
|
+
import { CliError, getErrorMessage } from './errors.js';
|
|
10
|
+
import { fullName } from './registry.js';
|
|
11
|
+
// ── Diagnostic collection ────────────────────────────────────────────────────
|
|
12
|
+
/** Whether diagnostic mode is enabled. */
|
|
13
|
+
export function isDiagnosticEnabled() {
|
|
14
|
+
return process.env.OPENCLI_DIAGNOSTIC === '1';
|
|
15
|
+
}
|
|
16
|
+
/** Safely collect page diagnostic state. Individual failures are swallowed. */
|
|
17
|
+
async function collectPageState(page) {
|
|
18
|
+
try {
|
|
19
|
+
const [url, snapshot, networkRequests, consoleErrors] = await Promise.all([
|
|
20
|
+
page.getCurrentUrl?.().catch(() => null) ?? Promise.resolve(null),
|
|
21
|
+
page.snapshot().catch(() => '(snapshot unavailable)'),
|
|
22
|
+
page.networkRequests().catch(() => []),
|
|
23
|
+
page.consoleMessages('error').catch(() => []),
|
|
24
|
+
]);
|
|
25
|
+
return { url: url ?? 'unknown', snapshot, networkRequests, consoleErrors };
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** Read adapter source file content. */
|
|
32
|
+
function readAdapterSource(modulePath) {
|
|
33
|
+
if (!modulePath)
|
|
34
|
+
return undefined;
|
|
35
|
+
try {
|
|
36
|
+
return fs.readFileSync(modulePath, 'utf-8');
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** Build a RepairContext from an error, command metadata, and optional page state. */
|
|
43
|
+
export function buildRepairContext(err, cmd, pageState) {
|
|
44
|
+
const isCliError = err instanceof CliError;
|
|
45
|
+
return {
|
|
46
|
+
error: {
|
|
47
|
+
code: isCliError ? err.code : 'UNKNOWN',
|
|
48
|
+
message: getErrorMessage(err),
|
|
49
|
+
hint: isCliError ? err.hint : undefined,
|
|
50
|
+
stack: err instanceof Error ? err.stack : undefined,
|
|
51
|
+
},
|
|
52
|
+
adapter: {
|
|
53
|
+
site: cmd.site,
|
|
54
|
+
command: fullName(cmd),
|
|
55
|
+
sourcePath: cmd._modulePath,
|
|
56
|
+
source: readAdapterSource(cmd._modulePath),
|
|
57
|
+
},
|
|
58
|
+
page: pageState,
|
|
59
|
+
timestamp: new Date().toISOString(),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** Collect full diagnostic context including page state. */
|
|
63
|
+
export async function collectDiagnostic(err, cmd, page) {
|
|
64
|
+
const pageState = page ? await collectPageState(page) : undefined;
|
|
65
|
+
return buildRepairContext(err, cmd, pageState);
|
|
66
|
+
}
|
|
67
|
+
/** Emit diagnostic JSON to stderr. */
|
|
68
|
+
export function emitDiagnostic(ctx) {
|
|
69
|
+
const marker = '___OPENCLI_DIAGNOSTIC___';
|
|
70
|
+
process.stderr.write(`\n${marker}\n${JSON.stringify(ctx)}\n${marker}\n`);
|
|
71
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|