@huyuan-ai/cli 1.1.0 → 1.3.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 +7 -6
- package/UPGRADE.md +23 -0
- package/dist/cli/program.js +2 -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/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/package.json +5 -3
- 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
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { describe, it, expect, vi, afterEach } from 'vitest';
|
|
2
|
+
import { buildRepairContext, isDiagnosticEnabled, emitDiagnostic } from './diagnostic.js';
|
|
3
|
+
import { SelectorError, CommandExecutionError } from './errors.js';
|
|
4
|
+
function makeCmd(overrides = {}) {
|
|
5
|
+
return {
|
|
6
|
+
site: 'test-site',
|
|
7
|
+
name: 'test-cmd',
|
|
8
|
+
description: 'test',
|
|
9
|
+
args: [],
|
|
10
|
+
...overrides,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
describe('isDiagnosticEnabled', () => {
|
|
14
|
+
const origEnv = process.env.OPENCLI_DIAGNOSTIC;
|
|
15
|
+
afterEach(() => {
|
|
16
|
+
if (origEnv === undefined)
|
|
17
|
+
delete process.env.OPENCLI_DIAGNOSTIC;
|
|
18
|
+
else
|
|
19
|
+
process.env.OPENCLI_DIAGNOSTIC = origEnv;
|
|
20
|
+
});
|
|
21
|
+
it('returns false when env not set', () => {
|
|
22
|
+
delete process.env.OPENCLI_DIAGNOSTIC;
|
|
23
|
+
expect(isDiagnosticEnabled()).toBe(false);
|
|
24
|
+
});
|
|
25
|
+
it('returns true when env is "1"', () => {
|
|
26
|
+
process.env.OPENCLI_DIAGNOSTIC = '1';
|
|
27
|
+
expect(isDiagnosticEnabled()).toBe(true);
|
|
28
|
+
});
|
|
29
|
+
it('returns false for other values', () => {
|
|
30
|
+
process.env.OPENCLI_DIAGNOSTIC = 'true';
|
|
31
|
+
expect(isDiagnosticEnabled()).toBe(false);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
describe('buildRepairContext', () => {
|
|
35
|
+
it('captures CliError fields', () => {
|
|
36
|
+
const err = new SelectorError('.missing-element', 'Element removed');
|
|
37
|
+
const ctx = buildRepairContext(err, makeCmd());
|
|
38
|
+
expect(ctx.error.code).toBe('SELECTOR');
|
|
39
|
+
expect(ctx.error.message).toContain('.missing-element');
|
|
40
|
+
expect(ctx.error.hint).toBe('Element removed');
|
|
41
|
+
expect(ctx.error.stack).toBeDefined();
|
|
42
|
+
expect(ctx.adapter.site).toBe('test-site');
|
|
43
|
+
expect(ctx.adapter.command).toBe('test-site/test-cmd');
|
|
44
|
+
expect(ctx.timestamp).toMatch(/^\d{4}-\d{2}-\d{2}T/);
|
|
45
|
+
});
|
|
46
|
+
it('handles non-CliError errors', () => {
|
|
47
|
+
const err = new TypeError('Cannot read property "x" of undefined');
|
|
48
|
+
const ctx = buildRepairContext(err, makeCmd());
|
|
49
|
+
expect(ctx.error.code).toBe('UNKNOWN');
|
|
50
|
+
expect(ctx.error.message).toContain('Cannot read property');
|
|
51
|
+
expect(ctx.error.hint).toBeUndefined();
|
|
52
|
+
});
|
|
53
|
+
it('includes page state when provided', () => {
|
|
54
|
+
const pageState = {
|
|
55
|
+
url: 'https://example.com/page',
|
|
56
|
+
snapshot: '<div>...</div>',
|
|
57
|
+
networkRequests: [{ url: '/api/data', status: 200 }],
|
|
58
|
+
consoleErrors: ['Uncaught TypeError'],
|
|
59
|
+
};
|
|
60
|
+
const ctx = buildRepairContext(new CommandExecutionError('boom'), makeCmd(), pageState);
|
|
61
|
+
expect(ctx.page).toEqual(pageState);
|
|
62
|
+
});
|
|
63
|
+
it('omits page when not provided', () => {
|
|
64
|
+
const ctx = buildRepairContext(new Error('boom'), makeCmd());
|
|
65
|
+
expect(ctx.page).toBeUndefined();
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
describe('emitDiagnostic', () => {
|
|
69
|
+
it('writes delimited JSON to stderr', () => {
|
|
70
|
+
const writeSpy = vi.spyOn(process.stderr, 'write').mockReturnValue(true);
|
|
71
|
+
const ctx = buildRepairContext(new CommandExecutionError('test error'), makeCmd());
|
|
72
|
+
emitDiagnostic(ctx);
|
|
73
|
+
const output = writeSpy.mock.calls.map(c => c[0]).join('');
|
|
74
|
+
expect(output).toContain('___OPENCLI_DIAGNOSTIC___');
|
|
75
|
+
expect(output).toContain('"code":"COMMAND_EXEC"');
|
|
76
|
+
expect(output).toContain('"message":"test error"');
|
|
77
|
+
// Verify JSON is parseable between markers
|
|
78
|
+
const match = output.match(/___OPENCLI_DIAGNOSTIC___\n(.*)\n___OPENCLI_DIAGNOSTIC___/);
|
|
79
|
+
expect(match).toBeTruthy();
|
|
80
|
+
const parsed = JSON.parse(match[1]);
|
|
81
|
+
expect(parsed.error.code).toBe('COMMAND_EXEC');
|
|
82
|
+
writeSpy.mockRestore();
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -14,10 +14,19 @@ export declare const USER_CLIS_DIR: string;
|
|
|
14
14
|
/** Plugins directory: ~/.opencli/plugins/ */
|
|
15
15
|
export declare const PLUGINS_DIR: string;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* Ensure ~/.opencli/node_modules/@jackwener/opencli symlink exists so that
|
|
18
|
+
* user CLIs in ~/.opencli/clis/ can `import { cli } from '@jackwener/opencli/registry'`.
|
|
19
|
+
*
|
|
20
|
+
* This is the sole resolution mechanism — adapters use package exports
|
|
21
|
+
* (e.g. `@jackwener/opencli/registry`, `@jackwener/opencli/errors`) and
|
|
22
|
+
* Node.js resolves them through this symlink.
|
|
19
23
|
*/
|
|
20
24
|
export declare function ensureUserCliCompatShims(baseDir?: string): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* First-run fallback: if postinstall was skipped (--ignore-scripts) or failed,
|
|
27
|
+
* trigger adapter fetch on first CLI invocation when ~/.opencli/clis/ is empty.
|
|
28
|
+
*/
|
|
29
|
+
export declare function ensureUserAdapters(): Promise<void>;
|
|
21
30
|
/**
|
|
22
31
|
* Discover and register CLI commands.
|
|
23
32
|
* Uses pre-compiled manifest when available for instant startup.
|
|
@@ -31,49 +31,44 @@ function parseStrategy(rawStrategy, fallback = Strategy.COOKIE) {
|
|
|
31
31
|
return Strategy[key] ?? fallback;
|
|
32
32
|
}
|
|
33
33
|
import { isRecord } from './utils.js';
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
async function writeCompatShimIfNeeded(filePath, content) {
|
|
44
|
-
try {
|
|
45
|
-
const existing = await fs.promises.readFile(filePath, 'utf-8');
|
|
46
|
-
if (existing === content)
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
catch {
|
|
50
|
-
// Fall through to write missing shim
|
|
34
|
+
/**
|
|
35
|
+
* Find the package root (directory containing package.json).
|
|
36
|
+
* Dev: import.meta.url is in src/ → one level up.
|
|
37
|
+
* Prod: import.meta.url is in dist/src/ → two levels up.
|
|
38
|
+
*/
|
|
39
|
+
function findPackageRoot() {
|
|
40
|
+
let dir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
41
|
+
if (!fs.existsSync(path.join(dir, 'package.json'))) {
|
|
42
|
+
dir = path.resolve(dir, '..');
|
|
51
43
|
}
|
|
52
|
-
|
|
44
|
+
return dir;
|
|
53
45
|
}
|
|
54
46
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
47
|
+
* Ensure ~/.opencli/node_modules/@jackwener/opencli symlink exists so that
|
|
48
|
+
* user CLIs in ~/.opencli/clis/ can `import { cli } from '@jackwener/opencli/registry'`.
|
|
49
|
+
*
|
|
50
|
+
* This is the sole resolution mechanism — adapters use package exports
|
|
51
|
+
* (e.g. `@jackwener/opencli/registry`, `@jackwener/opencli/errors`) and
|
|
52
|
+
* Node.js resolves them through this symlink.
|
|
57
53
|
*/
|
|
58
54
|
export async function ensureUserCliCompatShims(baseDir = USER_OPENCLI_DIR) {
|
|
59
55
|
await fs.promises.mkdir(baseDir, { recursive: true });
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
//
|
|
72
|
-
const opencliRoot =
|
|
56
|
+
// package.json for ESM resolution in ~/.opencli/
|
|
57
|
+
const pkgJsonPath = path.join(baseDir, 'package.json');
|
|
58
|
+
const pkgJsonContent = `${JSON.stringify({ name: 'opencli-user-runtime', private: true, type: 'module' }, null, 2)}\n`;
|
|
59
|
+
try {
|
|
60
|
+
const existing = await fs.promises.readFile(pkgJsonPath, 'utf-8');
|
|
61
|
+
if (existing !== pkgJsonContent)
|
|
62
|
+
await fs.promises.writeFile(pkgJsonPath, pkgJsonContent, 'utf-8');
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
await fs.promises.writeFile(pkgJsonPath, pkgJsonContent, 'utf-8');
|
|
66
|
+
}
|
|
67
|
+
// Create node_modules/@jackwener/opencli symlink pointing to the installed package root.
|
|
68
|
+
const opencliRoot = findPackageRoot();
|
|
73
69
|
const symlinkDir = path.join(baseDir, 'node_modules', '@jackwener');
|
|
74
70
|
const symlinkPath = path.join(symlinkDir, 'opencli');
|
|
75
71
|
try {
|
|
76
|
-
// Only recreate if symlink is missing or points to wrong target
|
|
77
72
|
let needsUpdate = true;
|
|
78
73
|
try {
|
|
79
74
|
const existing = await fs.promises.readlink(symlinkPath);
|
|
@@ -84,14 +79,53 @@ export async function ensureUserCliCompatShims(baseDir = USER_OPENCLI_DIR) {
|
|
|
84
79
|
if (needsUpdate) {
|
|
85
80
|
await fs.promises.mkdir(symlinkDir, { recursive: true });
|
|
86
81
|
try {
|
|
87
|
-
await fs.promises.
|
|
82
|
+
await fs.promises.rm(symlinkPath, { recursive: true, force: true });
|
|
88
83
|
}
|
|
89
84
|
catch { /* doesn't exist */ }
|
|
90
|
-
|
|
85
|
+
const symlinkType = process.platform === 'win32' ? 'junction' : 'dir';
|
|
86
|
+
await fs.promises.symlink(opencliRoot, symlinkPath, symlinkType);
|
|
91
87
|
}
|
|
92
88
|
}
|
|
89
|
+
catch (err) {
|
|
90
|
+
log.warn(`Could not create symlink at ${symlinkPath}: ${getErrorMessage(err)}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const ADAPTER_MANIFEST_PATH = path.join(USER_OPENCLI_DIR, 'adapter-manifest.json');
|
|
94
|
+
/**
|
|
95
|
+
* First-run fallback: if postinstall was skipped (--ignore-scripts) or failed,
|
|
96
|
+
* trigger adapter fetch on first CLI invocation when ~/.opencli/clis/ is empty.
|
|
97
|
+
*/
|
|
98
|
+
export async function ensureUserAdapters() {
|
|
99
|
+
// If adapter manifest already exists, adapters were fetched — nothing to do
|
|
100
|
+
try {
|
|
101
|
+
await fs.promises.access(ADAPTER_MANIFEST_PATH);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
93
104
|
catch {
|
|
94
|
-
//
|
|
105
|
+
// No manifest — first run or postinstall was skipped
|
|
106
|
+
}
|
|
107
|
+
// Check if clis dir has any content (could be manually populated)
|
|
108
|
+
try {
|
|
109
|
+
const entries = await fs.promises.readdir(USER_CLIS_DIR);
|
|
110
|
+
if (entries.length > 0)
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
// Dir doesn't exist — needs fetch
|
|
115
|
+
}
|
|
116
|
+
log.info('First run detected — copying adapters (one-time setup)...');
|
|
117
|
+
try {
|
|
118
|
+
const { execFileSync } = await import('node:child_process');
|
|
119
|
+
const scriptPath = path.join(findPackageRoot(), 'scripts', 'fetch-adapters.js');
|
|
120
|
+
execFileSync(process.execPath, [scriptPath], {
|
|
121
|
+
stdio: 'inherit',
|
|
122
|
+
env: { ...process.env, _OPENCLI_FIRST_RUN: '1' },
|
|
123
|
+
timeout: 120_000,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
log.warn(`Could not fetch adapters on first run: ${getErrorMessage(err)}`);
|
|
128
|
+
log.warn('Built-in adapters from the package will be used.');
|
|
95
129
|
}
|
|
96
130
|
}
|
|
97
131
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -71,7 +71,7 @@ cli({
|
|
|
71
71
|
await fs.promises.rm(tempBuildRoot, { recursive: true, force: true });
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
-
it('loads
|
|
74
|
+
it('loads user CLI modules via package exports symlink', async () => {
|
|
75
75
|
const tempOpencliRoot = await fs.promises.mkdtemp(path.join(os.tmpdir(), 'opencli-user-clis-'));
|
|
76
76
|
const userClisDir = path.join(tempOpencliRoot, 'clis');
|
|
77
77
|
const siteDir = path.join(userClisDir, 'legacy-site');
|
|
@@ -80,8 +80,9 @@ cli({
|
|
|
80
80
|
await ensureUserCliCompatShims(tempOpencliRoot);
|
|
81
81
|
await fs.promises.mkdir(siteDir, { recursive: true });
|
|
82
82
|
await fs.promises.writeFile(commandPath, `
|
|
83
|
-
import { cli, Strategy } from '
|
|
84
|
-
import { CommandExecutionError } from '
|
|
83
|
+
import { cli, Strategy } from '@jackwener/opencli/registry';
|
|
84
|
+
import { CommandExecutionError } from '@jackwener/opencli/errors';
|
|
85
|
+
import { htmlToMarkdown } from '@jackwener/opencli/utils';
|
|
85
86
|
|
|
86
87
|
cli({
|
|
87
88
|
site: 'legacy-site',
|
|
@@ -89,13 +90,13 @@ cli({
|
|
|
89
90
|
description: 'hello command',
|
|
90
91
|
strategy: Strategy.PUBLIC,
|
|
91
92
|
browser: false,
|
|
92
|
-
func: async () => [{ ok: true, errorName: new CommandExecutionError('boom').name }],
|
|
93
|
+
func: async () => [{ ok: true, errorName: new CommandExecutionError('boom').name, markdown: htmlToMarkdown('<p>hello</p>') }],
|
|
93
94
|
});
|
|
94
95
|
`);
|
|
95
96
|
await discoverClis(userClisDir);
|
|
96
97
|
const cmd = getRegistry().get('legacy-site/hello');
|
|
97
98
|
expect(cmd).toBeDefined();
|
|
98
|
-
await expect(executeCommand(cmd, {})).resolves.toEqual([{ ok: true, errorName: 'CommandExecutionError' }]);
|
|
99
|
+
await expect(executeCommand(cmd, {})).resolves.toEqual([{ ok: true, errorName: 'CommandExecutionError', markdown: 'hello' }]);
|
|
99
100
|
}
|
|
100
101
|
finally {
|
|
101
102
|
await fs.promises.rm(tempOpencliRoot, { recursive: true, force: true });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,6 +13,7 @@ import { Strategy, getRegistry, fullName } from './registry.js';
|
|
|
13
13
|
import { pathToFileURL } from 'node:url';
|
|
14
14
|
import { executePipeline } from './pipeline/index.js';
|
|
15
15
|
import { AdapterLoadError, ArgumentError, BrowserConnectError, CommandExecutionError, getErrorMessage } from './errors.js';
|
|
16
|
+
import { isDiagnosticEnabled, collectDiagnostic, emitDiagnostic } from './diagnostic.js';
|
|
16
17
|
import { shouldUseBrowserSession } from './capabilityRouting.js';
|
|
17
18
|
import { getBrowserFactory, browserSession, runWithTimeout, DEFAULT_BROWSER_COMMAND_TIMEOUT } from './runtime.js';
|
|
18
19
|
import { emitHook } from './hooks.js';
|
|
@@ -129,6 +130,7 @@ export async function executeCommand(cmd, rawKwargs, debug = false) {
|
|
|
129
130
|
};
|
|
130
131
|
await emitHook('onBeforeExecute', hookCtx);
|
|
131
132
|
let result;
|
|
133
|
+
let diagnosticEmitted = false;
|
|
132
134
|
try {
|
|
133
135
|
if (shouldUseBrowserSession(cmd)) {
|
|
134
136
|
const electron = isElectronApp(cmd.site);
|
|
@@ -176,10 +178,22 @@ export async function executeCommand(cmd, rawKwargs, debug = false) {
|
|
|
176
178
|
log.debug(`[pre-nav] Failed to navigate to ${preNavUrl}: ${err instanceof Error ? err.message : err}`);
|
|
177
179
|
}
|
|
178
180
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
try {
|
|
182
|
+
return await runWithTimeout(runCommand(cmd, page, kwargs, debug), {
|
|
183
|
+
timeout: cmd.timeoutSeconds ?? DEFAULT_BROWSER_COMMAND_TIMEOUT,
|
|
184
|
+
label: fullName(cmd),
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
catch (err) {
|
|
188
|
+
// Collect diagnostic while page is still alive (before browserSession closes it).
|
|
189
|
+
if (isDiagnosticEnabled()) {
|
|
190
|
+
const internal = cmd;
|
|
191
|
+
const ctx = await collectDiagnostic(err, internal, page);
|
|
192
|
+
emitDiagnostic(ctx);
|
|
193
|
+
diagnosticEmitted = true;
|
|
194
|
+
}
|
|
195
|
+
throw err;
|
|
196
|
+
}
|
|
183
197
|
}, { workspace: `site:${cmd.site}`, cdpEndpoint });
|
|
184
198
|
}
|
|
185
199
|
else {
|
|
@@ -198,6 +212,13 @@ export async function executeCommand(cmd, rawKwargs, debug = false) {
|
|
|
198
212
|
}
|
|
199
213
|
}
|
|
200
214
|
catch (err) {
|
|
215
|
+
// Emit diagnostic if not already emitted (browser session emits with page state;
|
|
216
|
+
// this fallback covers non-browser commands and pre-session failures like BrowserConnectError).
|
|
217
|
+
if (isDiagnosticEnabled() && !diagnosticEmitted) {
|
|
218
|
+
const internal = cmd;
|
|
219
|
+
const ctx = await collectDiagnostic(err, internal, null);
|
|
220
|
+
emitDiagnostic(ctx);
|
|
221
|
+
}
|
|
201
222
|
hookCtx.error = err;
|
|
202
223
|
hookCtx.finishedAt = Date.now();
|
|
203
224
|
await emitHook('onAfterExecute', hookCtx);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -30,6 +30,8 @@ export declare function generateReadInterceptedJs(arrayName?: string): string;
|
|
|
30
30
|
* - Installs temporarily, restores originals in finally block
|
|
31
31
|
* - Resolves a promise on first capture (for immediate await)
|
|
32
32
|
* - Returns captured data directly
|
|
33
|
+
*
|
|
34
|
+
* Reuses the shared DISGUISE_FN for consistent toString() disguising.
|
|
33
35
|
*/
|
|
34
36
|
export declare function generateTapInterceptorJs(patternExpr: string): {
|
|
35
37
|
setupVar: string;
|
|
@@ -127,6 +127,8 @@ export function generateReadInterceptedJs(arrayName = '__opencli_intercepted') {
|
|
|
127
127
|
* - Installs temporarily, restores originals in finally block
|
|
128
128
|
* - Resolves a promise on first capture (for immediate await)
|
|
129
129
|
* - Returns captured data directly
|
|
130
|
+
*
|
|
131
|
+
* Reuses the shared DISGUISE_FN for consistent toString() disguising.
|
|
130
132
|
*/
|
|
131
133
|
export function generateTapInterceptorJs(patternExpr) {
|
|
132
134
|
return {
|
|
@@ -135,12 +137,7 @@ export function generateTapInterceptorJs(patternExpr) {
|
|
|
135
137
|
let captureResolve;
|
|
136
138
|
const capturePromise = new Promise(r => { captureResolve = r; });
|
|
137
139
|
const capturePattern = ${patternExpr};
|
|
138
|
-
|
|
139
|
-
const s = 'function ' + name + '() { [native code] }';
|
|
140
|
-
Object.defineProperty(fn, 'toString', { value: function() { return s; }, writable: true, configurable: true, enumerable: false });
|
|
141
|
-
try { Object.defineProperty(fn, 'name', { value: name, configurable: true }); } catch {}
|
|
142
|
-
return fn;
|
|
143
|
-
}
|
|
140
|
+
${DISGUISE_FN}
|
|
144
141
|
`,
|
|
145
142
|
capturedVar: 'captured',
|
|
146
143
|
promiseVar: 'capturePromise',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
export declare const log: {
|
|
8
8
|
/** Informational message (always shown) */
|
|
9
9
|
info(msg: string): void;
|
|
10
|
+
/** Lightweight status line for adapter progress updates */
|
|
11
|
+
status(msg: string): void;
|
|
12
|
+
/** Positive completion/status line without the heavier info prefix */
|
|
13
|
+
success(msg: string): void;
|
|
10
14
|
/** Warning (always shown) */
|
|
11
15
|
warn(msg: string): void;
|
|
12
16
|
/** Error (always shown) */
|
|
@@ -16,6 +16,14 @@ export const log = {
|
|
|
16
16
|
info(msg) {
|
|
17
17
|
process.stderr.write(`${chalk.blue('ℹ')} ${msg}\n`);
|
|
18
18
|
},
|
|
19
|
+
/** Lightweight status line for adapter progress updates */
|
|
20
|
+
status(msg) {
|
|
21
|
+
process.stderr.write(`${chalk.dim(msg)}\n`);
|
|
22
|
+
},
|
|
23
|
+
/** Positive completion/status line without the heavier info prefix */
|
|
24
|
+
success(msg) {
|
|
25
|
+
process.stderr.write(`${chalk.green(msg)}\n`);
|
|
26
|
+
},
|
|
19
27
|
/** Warning (always shown) */
|
|
20
28
|
warn(msg) {
|
|
21
29
|
process.stderr.write(`${chalk.yellow('⚠')} ${msg}\n`);
|
|
@@ -14,7 +14,7 @@ if (process.platform !== 'win32') {
|
|
|
14
14
|
}
|
|
15
15
|
import * as path from 'node:path';
|
|
16
16
|
import { fileURLToPath } from 'node:url';
|
|
17
|
-
import { discoverClis, discoverPlugins, ensureUserCliCompatShims, USER_CLIS_DIR } from './discovery.js';
|
|
17
|
+
import { discoverClis, discoverPlugins, ensureUserCliCompatShims, ensureUserAdapters, USER_CLIS_DIR } from './discovery.js';
|
|
18
18
|
import { getCompletions } from './completion.js';
|
|
19
19
|
import { runCli } from './cli.js';
|
|
20
20
|
import { emitHook } from './hooks.js';
|
|
@@ -24,10 +24,11 @@ import { EXIT_CODES } from './errors.js';
|
|
|
24
24
|
installNodeNetwork();
|
|
25
25
|
const __filename = fileURLToPath(import.meta.url);
|
|
26
26
|
const __dirname = path.dirname(__filename);
|
|
27
|
-
const BUILTIN_CLIS = path.resolve(__dirname, 'clis');
|
|
27
|
+
const BUILTIN_CLIS = path.resolve(__dirname, '..', 'clis');
|
|
28
28
|
const USER_CLIS = USER_CLIS_DIR;
|
|
29
29
|
// Sequential: plugins must run after built-in discovery so they can override built-in commands.
|
|
30
30
|
await ensureUserCliCompatShims();
|
|
31
|
+
await ensureUserAdapters();
|
|
31
32
|
await discoverClis(BUILTIN_CLIS, USER_CLIS);
|
|
32
33
|
await discoverPlugins();
|
|
33
34
|
// Register exit hook: notice appears after command output (same as npm/gh/yarn)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regression tests for package exports.
|
|
3
|
+
*
|
|
4
|
+
* Ensures adapter files use @jackwener/opencli/... package imports
|
|
5
|
+
* (not fragile relative paths) and that all declared exports resolve
|
|
6
|
+
* to real files. Prevents regressions like #788 / #791.
|
|
7
|
+
*/
|
|
8
|
+
import { describe, it, expect } from 'vitest';
|
|
9
|
+
import * as fs from 'node:fs';
|
|
10
|
+
import * as path from 'node:path';
|
|
11
|
+
import { builtinModules } from 'node:module';
|
|
12
|
+
import { fileURLToPath } from 'node:url';
|
|
13
|
+
import ts from 'typescript';
|
|
14
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
16
|
+
const CLIS_DIR = path.join(ROOT, 'clis');
|
|
17
|
+
/** Recursively collect all .ts files in a directory. */
|
|
18
|
+
function collectTsFiles(dir, opts) {
|
|
19
|
+
const results = [];
|
|
20
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
21
|
+
const full = path.join(dir, entry.name);
|
|
22
|
+
if (entry.isDirectory()) {
|
|
23
|
+
results.push(...collectTsFiles(full, opts));
|
|
24
|
+
}
|
|
25
|
+
else if (entry.name.endsWith('.ts') && !entry.name.endsWith('.d.ts')) {
|
|
26
|
+
if (opts?.excludeTests && (entry.name.endsWith('.test.ts') || entry.name === 'test-utils.ts'))
|
|
27
|
+
continue;
|
|
28
|
+
results.push(full);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return results;
|
|
32
|
+
}
|
|
33
|
+
const ALLOWED_BARE_IMPORTS = new Set([
|
|
34
|
+
'@jackwener/opencli',
|
|
35
|
+
...builtinModules.flatMap((name) => name.startsWith('node:')
|
|
36
|
+
? [name, name.slice(5)]
|
|
37
|
+
: [name, `node:${name}`]),
|
|
38
|
+
]);
|
|
39
|
+
function isAllowedImport(specifier) {
|
|
40
|
+
return specifier.startsWith('./')
|
|
41
|
+
|| specifier.startsWith('../')
|
|
42
|
+
|| specifier.startsWith('/')
|
|
43
|
+
|| specifier.startsWith('@jackwener/opencli/')
|
|
44
|
+
|| ALLOWED_BARE_IMPORTS.has(specifier);
|
|
45
|
+
}
|
|
46
|
+
/** Forbidden relative import patterns that should have been replaced.
|
|
47
|
+
* Uses (?:\.\./)+ to catch any depth of ../ traversal.
|
|
48
|
+
* Covers: import/export from, vi.mock(), vi.importActual(). */
|
|
49
|
+
const FORBIDDEN_PATTERNS = [
|
|
50
|
+
/(?:from|mock|importActual)\s*\(?['"](?:\.\.\/)+src\//,
|
|
51
|
+
/(?:from|mock|importActual)\s*\(?['"](?:\.\.\/)+browser\//,
|
|
52
|
+
/(?:from|mock|importActual)\s*\(?['"](?:\.\.\/)+download\//,
|
|
53
|
+
/(?:from|mock|importActual)\s*\(?['"](?:\.\.\/)+pipeline\//,
|
|
54
|
+
];
|
|
55
|
+
describe('adapter imports use package exports', () => {
|
|
56
|
+
const adapterFiles = collectTsFiles(CLIS_DIR);
|
|
57
|
+
const runtimeAdapterFiles = collectTsFiles(CLIS_DIR, { excludeTests: true });
|
|
58
|
+
it('found adapter files to check', () => {
|
|
59
|
+
expect(adapterFiles.length).toBeGreaterThan(100);
|
|
60
|
+
});
|
|
61
|
+
it('no adapter uses relative imports to src/, browser/, download/, or pipeline/', () => {
|
|
62
|
+
const violations = [];
|
|
63
|
+
for (const file of adapterFiles) {
|
|
64
|
+
const content = fs.readFileSync(file, 'utf-8');
|
|
65
|
+
for (const pattern of FORBIDDEN_PATTERNS) {
|
|
66
|
+
if (pattern.test(content)) {
|
|
67
|
+
const rel = path.relative(ROOT, file);
|
|
68
|
+
const match = content.match(pattern)?.[0];
|
|
69
|
+
violations.push(`${rel}: ${match}`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
expect(violations).toEqual([]);
|
|
74
|
+
});
|
|
75
|
+
it('non-test adapters only import node builtins, relative modules, or opencli public APIs', () => {
|
|
76
|
+
const violations = [];
|
|
77
|
+
for (const file of runtimeAdapterFiles) {
|
|
78
|
+
const source = fs.readFileSync(file, 'utf-8');
|
|
79
|
+
const module = ts.createSourceFile(file, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
|
|
80
|
+
for (const stmt of module.statements) {
|
|
81
|
+
if (!ts.isImportDeclaration(stmt) && !ts.isExportDeclaration(stmt))
|
|
82
|
+
continue;
|
|
83
|
+
const specifier = stmt.moduleSpecifier?.getText(module).slice(1, -1);
|
|
84
|
+
if (specifier && !isAllowedImport(specifier)) {
|
|
85
|
+
violations.push({
|
|
86
|
+
file: path.relative(ROOT, file),
|
|
87
|
+
specifier,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
expect(violations).toEqual([]);
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
describe('package.json exports resolve to real files', () => {
|
|
96
|
+
const pkgJson = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf-8'));
|
|
97
|
+
const exports = pkgJson.exports;
|
|
98
|
+
it('has exports defined', () => {
|
|
99
|
+
expect(Object.keys(exports).length).toBeGreaterThan(5);
|
|
100
|
+
});
|
|
101
|
+
for (const [exportPath, target] of Object.entries(exports)) {
|
|
102
|
+
it(`export "${exportPath}" → ${target} has a source file`, () => {
|
|
103
|
+
// Export targets point to dist/ (compiled). Verify the source .ts exists.
|
|
104
|
+
// dist/src/foo.js → src/foo.ts
|
|
105
|
+
const sourcePath = target
|
|
106
|
+
.replace(/^\.\/dist\//, './')
|
|
107
|
+
.replace(/\.js$/, '.ts');
|
|
108
|
+
const fullPath = path.join(ROOT, sourcePath);
|
|
109
|
+
expect(fs.existsSync(fullPath), `Missing source: ${sourcePath}`).toBe(true);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -688,7 +688,7 @@ export function renderRecordSummary(result) {
|
|
|
688
688
|
}
|
|
689
689
|
if (result.candidateCount > 0) {
|
|
690
690
|
lines.push('');
|
|
691
|
-
lines.push(chalk.dim(` Copy a candidate to
|
|
691
|
+
lines.push(chalk.dim(` Copy a candidate to clis/${result.site}/ and run: npm run build`));
|
|
692
692
|
}
|
|
693
693
|
return lines.join('\n');
|
|
694
694
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* plugins are dynamically imported during discoverPlugins().
|
|
8
8
|
*/
|
|
9
9
|
export { cli, Strategy, getRegistry, fullName, registerCommand } from './registry.js';
|
|
10
|
-
export type { CliCommand, Arg, CliOptions } from './registry.js';
|
|
10
|
+
export type { CliCommand, Arg, CliOptions, CommandArgs } from './registry.js';
|
|
11
11
|
export type { IPage } from './types.js';
|
|
12
12
|
export { onStartup, onBeforeExecute, onAfterExecute } from './hooks.js';
|
|
13
13
|
export type { HookFn, HookContext, HookName } from './hooks.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -22,9 +22,6 @@ export interface SynthesizeCapability {
|
|
|
22
22
|
itemPath?: string | null;
|
|
23
23
|
recommendedColumns?: string[];
|
|
24
24
|
recommendedArgs?: RecommendedArg[];
|
|
25
|
-
recommended_args?: RecommendedArg[];
|
|
26
|
-
recommendedColumnsLegacy?: string[];
|
|
27
|
-
recommended_columns?: string[];
|
|
28
25
|
storeHint?: StoreHint;
|
|
29
26
|
}
|
|
30
27
|
export interface GeneratedArgDefinition {
|
|
@@ -95,7 +92,6 @@ export declare function synthesizeFromExplore(target: string, opts?: {
|
|
|
95
92
|
export declare function renderSynthesizeSummary(result: SynthesizeResult): string;
|
|
96
93
|
export declare function resolveExploreDir(target: string): string;
|
|
97
94
|
export declare function loadExploreBundle(exploreDir: string): LoadedExploreBundle;
|
|
98
|
-
/** Backward-compatible export for scaffold.ts */
|
|
99
95
|
export declare function buildCandidate(site: string, targetUrl: string, cap: SynthesizeCapability, endpoint: ExploreEndpointArtifact): {
|
|
100
96
|
name: string;
|
|
101
97
|
yaml: CandidateYaml;
|